blockly 7.20211209.0-beta.2 → 7.20211209.0-beta.3

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 (161) hide show
  1. package/blockly.min.js +198 -191
  2. package/blockly_compressed.js +137 -137
  3. package/blockly_compressed.js.map +1 -1
  4. package/blocks/math.js +278 -276
  5. package/blocks_compressed.js +20 -19
  6. package/blocks_compressed.js.map +1 -1
  7. package/dart_compressed.js +27 -27
  8. package/dart_compressed.js.map +1 -1
  9. package/generators/dart/colour.js +33 -33
  10. package/generators/dart/lists.js +141 -177
  11. package/generators/dart/logic.js +50 -53
  12. package/generators/dart/loops.js +63 -72
  13. package/generators/dart/math.js +200 -259
  14. package/generators/dart/procedures.js +37 -43
  15. package/generators/dart/text.js +135 -175
  16. package/generators/dart/variables.js +12 -12
  17. package/generators/dart/variables_dynamic.js +5 -5
  18. package/generators/javascript/colour.js +54 -60
  19. package/generators/javascript/lists.js +142 -142
  20. package/generators/javascript/logic.js +54 -55
  21. package/generators/javascript/loops.js +75 -80
  22. package/generators/javascript/math.js +106 -105
  23. package/generators/javascript/procedures.js +45 -48
  24. package/generators/javascript.js +87 -85
  25. package/javascript_compressed.js +41 -35
  26. package/javascript_compressed.js.map +1 -1
  27. package/package.json +1 -1
  28. package/blockly.d.ts +0 -4078
  29. package/blocks.d.ts +0 -15
  30. package/core.d.ts +0 -15
  31. package/dart.d.ts +0 -16
  32. package/index.d.ts +0 -22
  33. package/javascript.d.ts +0 -16
  34. package/lua.d.ts +0 -16
  35. package/msg/ab.d.ts +0 -15
  36. package/msg/ace.d.ts +0 -15
  37. package/msg/af.d.ts +0 -15
  38. package/msg/am.d.ts +0 -15
  39. package/msg/ar.d.ts +0 -15
  40. package/msg/ast.d.ts +0 -15
  41. package/msg/az.d.ts +0 -15
  42. package/msg/ba.d.ts +0 -15
  43. package/msg/bcc.d.ts +0 -15
  44. package/msg/be-tarask.d.ts +0 -15
  45. package/msg/be.d.ts +0 -15
  46. package/msg/bg.d.ts +0 -15
  47. package/msg/bn.d.ts +0 -15
  48. package/msg/br.d.ts +0 -15
  49. package/msg/bs.d.ts +0 -15
  50. package/msg/ca.d.ts +0 -15
  51. package/msg/cdo.d.ts +0 -15
  52. package/msg/constants.d.ts +0 -15
  53. package/msg/cs.d.ts +0 -15
  54. package/msg/da.d.ts +0 -15
  55. package/msg/de.d.ts +0 -15
  56. package/msg/diq.d.ts +0 -15
  57. package/msg/dty.d.ts +0 -15
  58. package/msg/ee.d.ts +0 -15
  59. package/msg/el.d.ts +0 -15
  60. package/msg/en-gb.d.ts +0 -15
  61. package/msg/en.d.ts +0 -15
  62. package/msg/eo.d.ts +0 -15
  63. package/msg/es.d.ts +0 -15
  64. package/msg/et.d.ts +0 -15
  65. package/msg/eu.d.ts +0 -15
  66. package/msg/fa.d.ts +0 -15
  67. package/msg/fi.d.ts +0 -15
  68. package/msg/fo.d.ts +0 -15
  69. package/msg/fr.d.ts +0 -15
  70. package/msg/frr.d.ts +0 -15
  71. package/msg/gl.d.ts +0 -15
  72. package/msg/gn.d.ts +0 -15
  73. package/msg/gor.d.ts +0 -15
  74. package/msg/ha.d.ts +0 -15
  75. package/msg/hak.d.ts +0 -15
  76. package/msg/he.d.ts +0 -15
  77. package/msg/hi.d.ts +0 -15
  78. package/msg/hr.d.ts +0 -15
  79. package/msg/hrx.d.ts +0 -15
  80. package/msg/hu.d.ts +0 -15
  81. package/msg/hy.d.ts +0 -15
  82. package/msg/ia.d.ts +0 -15
  83. package/msg/id.d.ts +0 -15
  84. package/msg/ig.d.ts +0 -15
  85. package/msg/inh.d.ts +0 -15
  86. package/msg/is.d.ts +0 -15
  87. package/msg/it.d.ts +0 -15
  88. package/msg/ja.d.ts +0 -15
  89. package/msg/ka.d.ts +0 -15
  90. package/msg/kab.d.ts +0 -15
  91. package/msg/kbd-cyrl.d.ts +0 -15
  92. package/msg/km.d.ts +0 -15
  93. package/msg/kn.d.ts +0 -15
  94. package/msg/ko.d.ts +0 -15
  95. package/msg/ksh.d.ts +0 -15
  96. package/msg/ku-latn.d.ts +0 -15
  97. package/msg/ky.d.ts +0 -15
  98. package/msg/la.d.ts +0 -15
  99. package/msg/lb.d.ts +0 -15
  100. package/msg/lki.d.ts +0 -15
  101. package/msg/lo.d.ts +0 -15
  102. package/msg/lrc.d.ts +0 -15
  103. package/msg/lt.d.ts +0 -15
  104. package/msg/lv.d.ts +0 -15
  105. package/msg/mg.d.ts +0 -15
  106. package/msg/mk.d.ts +0 -15
  107. package/msg/ml.d.ts +0 -15
  108. package/msg/mnw.d.ts +0 -15
  109. package/msg/ms.d.ts +0 -15
  110. package/msg/msg.d.ts +0 -444
  111. package/msg/my.d.ts +0 -15
  112. package/msg/mzn.d.ts +0 -15
  113. package/msg/nb.d.ts +0 -15
  114. package/msg/ne.d.ts +0 -15
  115. package/msg/nl.d.ts +0 -15
  116. package/msg/oc.d.ts +0 -15
  117. package/msg/olo.d.ts +0 -15
  118. package/msg/pa.d.ts +0 -15
  119. package/msg/pl.d.ts +0 -15
  120. package/msg/pms.d.ts +0 -15
  121. package/msg/ps.d.ts +0 -15
  122. package/msg/pt-br.d.ts +0 -15
  123. package/msg/pt.d.ts +0 -15
  124. package/msg/qqq.d.ts +0 -15
  125. package/msg/ro.d.ts +0 -15
  126. package/msg/ru.d.ts +0 -15
  127. package/msg/sc.d.ts +0 -15
  128. package/msg/sco.d.ts +0 -15
  129. package/msg/sd.d.ts +0 -15
  130. package/msg/shn.d.ts +0 -15
  131. package/msg/si.d.ts +0 -15
  132. package/msg/sk.d.ts +0 -15
  133. package/msg/skr-arab.d.ts +0 -15
  134. package/msg/sl.d.ts +0 -15
  135. package/msg/sq.d.ts +0 -15
  136. package/msg/sr-latn.d.ts +0 -15
  137. package/msg/sr.d.ts +0 -15
  138. package/msg/sv.d.ts +0 -15
  139. package/msg/sw.d.ts +0 -15
  140. package/msg/synonyms.d.ts +0 -15
  141. package/msg/ta.d.ts +0 -15
  142. package/msg/tcy.d.ts +0 -15
  143. package/msg/te.d.ts +0 -15
  144. package/msg/th.d.ts +0 -15
  145. package/msg/ti.d.ts +0 -15
  146. package/msg/tl.d.ts +0 -15
  147. package/msg/tlh.d.ts +0 -15
  148. package/msg/tr.d.ts +0 -15
  149. package/msg/ug-arab.d.ts +0 -15
  150. package/msg/uk.d.ts +0 -15
  151. package/msg/ur.d.ts +0 -15
  152. package/msg/uz.d.ts +0 -15
  153. package/msg/vi.d.ts +0 -15
  154. package/msg/xmf.d.ts +0 -15
  155. package/msg/yo.d.ts +0 -15
  156. package/msg/yue.d.ts +0 -15
  157. package/msg/zgh.d.ts +0 -15
  158. package/msg/zh-hans.d.ts +0 -15
  159. package/msg/zh-hant.d.ts +0 -15
  160. package/php.d.ts +0 -16
  161. package/python.d.ts +0 -16
package/blockly.min.js CHANGED
@@ -40,11 +40,11 @@ $jscomp.polyfill("Object.getOwnPropertyDescriptors",function(a){return a?a:funct
40
40
  $jscomp.typedArrayFill=function(a){return a?a:Array.prototype.fill};$jscomp.polyfill("Int8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Int16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");
41
41
  $jscomp.polyfill("Int32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Float32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Float64Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}},"es6","es3");
42
42
  $jscomp.polyfill("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}},"es7","es3");$jscomp.polyfill("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==$jscomp.checkStringArgs(this,b,"includes").indexOf(b,c||0)}},"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=globalThis||root;
43
- goog.define=function(a,b){return b};goog.DEBUG=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG;goog.provide=function(a){};goog.module=function(a){};goog.module.get=function(a){};goog.module.declareLegacyNamespace=function(){};goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};goog.require=function(a){};goog.requireType=function(a){};var module$exports$Blockly$utils$global={};module$exports$Blockly$utils$global.globalThis=function(){return"object"===typeof globalThis?globalThis:"object"===typeof self?self:"object"===typeof window?window:"object"===typeof global?global:this}();var module$exports$Blockly$utils$userAgent={};
43
+ goog.define=function(a,b){return b};goog.DEBUG=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG;goog.provide=function(a){};goog.module=function(a){};goog.module.get=function(a){};goog.module.declareLegacyNamespace=function(){};goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};goog.require=function(a){};goog.requireType=function(a){};$.module$exports$Blockly$utils$global={};$.module$exports$Blockly$utils$global.globalThis=function(){return"object"===typeof globalThis?globalThis:"object"===typeof self?self:"object"===typeof window?window:"object"===typeof global?global:this}();var module$exports$Blockly$utils$userAgent={};
44
44
  (function(a){function b(d){return-1!==c.indexOf(d.toUpperCase())}module$exports$Blockly$utils$userAgent.raw=a;var c=module$exports$Blockly$utils$userAgent.raw.toUpperCase();module$exports$Blockly$utils$userAgent.IE=b("Trident")||b("MSIE");module$exports$Blockly$utils$userAgent.EDGE=b("Edge");module$exports$Blockly$utils$userAgent.JavaFx=b("JavaFX");module$exports$Blockly$utils$userAgent.CHROME=(b("Chrome")||b("CriOS"))&&!module$exports$Blockly$utils$userAgent.EDGE;module$exports$Blockly$utils$userAgent.WEBKIT=
45
- b("WebKit")&&!module$exports$Blockly$utils$userAgent.EDGE;module$exports$Blockly$utils$userAgent.GECKO=b("Gecko")&&!module$exports$Blockly$utils$userAgent.WEBKIT&&!module$exports$Blockly$utils$userAgent.IE&&!module$exports$Blockly$utils$userAgent.EDGE;module$exports$Blockly$utils$userAgent.ANDROID=b("Android");a=module$exports$Blockly$utils$global.globalThis.navigator&&module$exports$Blockly$utils$global.globalThis.navigator.maxTouchPoints;module$exports$Blockly$utils$userAgent.IPAD=b("iPad")||b("Macintosh")&&
46
- 0<a;module$exports$Blockly$utils$userAgent.IPOD=b("iPod");module$exports$Blockly$utils$userAgent.IPHONE=b("iPhone")&&!module$exports$Blockly$utils$userAgent.IPAD&&!module$exports$Blockly$utils$userAgent.IPOD;module$exports$Blockly$utils$userAgent.MAC=b("Macintosh");module$exports$Blockly$utils$userAgent.TABLET=module$exports$Blockly$utils$userAgent.IPAD||module$exports$Blockly$utils$userAgent.ANDROID&&!b("Mobile")||b("Silk");module$exports$Blockly$utils$userAgent.MOBILE=!module$exports$Blockly$utils$userAgent.TABLET&&
47
- (module$exports$Blockly$utils$userAgent.IPOD||module$exports$Blockly$utils$userAgent.IPHONE||module$exports$Blockly$utils$userAgent.ANDROID||b("IEMobile"))})(module$exports$Blockly$utils$global.globalThis.navigator&&module$exports$Blockly$utils$global.globalThis.navigator.userAgent||"");var module$exports$Blockly$utils$dom={SVG_NS:"http://www.w3.org/2000/svg",HTML_NS:"http://www.w3.org/1999/xhtml",XLINK_NS:"http://www.w3.org/1999/xlink",NodeType:{ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_POSITION_CONTAINED_BY:16}},module$contents$Blockly$utils$dom_cacheWidths=null,module$contents$Blockly$utils$dom_cacheReference=0,module$contents$Blockly$utils$dom_canvasContext=null;
45
+ b("WebKit")&&!module$exports$Blockly$utils$userAgent.EDGE;module$exports$Blockly$utils$userAgent.GECKO=b("Gecko")&&!module$exports$Blockly$utils$userAgent.WEBKIT&&!module$exports$Blockly$utils$userAgent.IE&&!module$exports$Blockly$utils$userAgent.EDGE;module$exports$Blockly$utils$userAgent.ANDROID=b("Android");a=$.module$exports$Blockly$utils$global.globalThis.navigator&&$.module$exports$Blockly$utils$global.globalThis.navigator.maxTouchPoints;module$exports$Blockly$utils$userAgent.IPAD=b("iPad")||
46
+ b("Macintosh")&&0<a;module$exports$Blockly$utils$userAgent.IPOD=b("iPod");module$exports$Blockly$utils$userAgent.IPHONE=b("iPhone")&&!module$exports$Blockly$utils$userAgent.IPAD&&!module$exports$Blockly$utils$userAgent.IPOD;module$exports$Blockly$utils$userAgent.MAC=b("Macintosh");module$exports$Blockly$utils$userAgent.TABLET=module$exports$Blockly$utils$userAgent.IPAD||module$exports$Blockly$utils$userAgent.ANDROID&&!b("Mobile")||b("Silk");module$exports$Blockly$utils$userAgent.MOBILE=!module$exports$Blockly$utils$userAgent.TABLET&&
47
+ (module$exports$Blockly$utils$userAgent.IPOD||module$exports$Blockly$utils$userAgent.IPHONE||module$exports$Blockly$utils$userAgent.ANDROID||b("IEMobile"))})($.module$exports$Blockly$utils$global.globalThis.navigator&&$.module$exports$Blockly$utils$global.globalThis.navigator.userAgent||"");var module$exports$Blockly$utils$dom={SVG_NS:"http://www.w3.org/2000/svg",HTML_NS:"http://www.w3.org/1999/xhtml",XLINK_NS:"http://www.w3.org/1999/xlink",NodeType:{ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8,DOCUMENT_POSITION_CONTAINED_BY:16}},module$contents$Blockly$utils$dom_cacheWidths=null,module$contents$Blockly$utils$dom_cacheReference=0,module$contents$Blockly$utils$dom_canvasContext=null;
48
48
  module$exports$Blockly$utils$dom.createSvgElement=function(a,b,c){a=document.createElementNS(module$exports$Blockly$utils$dom.SVG_NS,String(a));for(var d in b)a.setAttribute(d,b[d]);document.body.runtimeStyle&&(a.runtimeStyle=a.currentStyle=a.style);c&&c.appendChild(a);return a};module$exports$Blockly$utils$dom.addClass=function(a,b){var c=a.getAttribute("class")||"";if(-1!==(" "+c+" ").indexOf(" "+b+" "))return!1;c&&(c+=" ");a.setAttribute("class",c+b);return!0};
49
49
  module$exports$Blockly$utils$dom.removeClasses=function(a,b){b=b.split(" ");for(var c=0;c<b.length;c++)(0,module$exports$Blockly$utils$dom.removeClass)(a,b[c])};module$exports$Blockly$utils$dom.removeClass=function(a,b){var c=a.getAttribute("class");if(-1===(" "+c+" ").indexOf(" "+b+" "))return!1;c=c.split(/\s+/);for(var d=0;d<c.length;d++)c[d]&&c[d]!==b||(c.splice(d,1),d--);c.length?a.setAttribute("class",c.join(" ")):a.removeAttribute("class");return!0};
50
50
  module$exports$Blockly$utils$dom.hasClass=function(a,b){return-1!==(" "+a.getAttribute("class")+" ").indexOf(" "+b+" ")};module$exports$Blockly$utils$dom.removeNode=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};module$exports$Blockly$utils$dom.insertAfter=function(a,b){var c=b.nextSibling;b=b.parentNode;if(!b)throw Error("Reference node has no parent.");c?b.insertBefore(a,c):b.appendChild(a)};
@@ -80,7 +80,7 @@ module$exports$Blockly$Events$utils.CHANGE&&f.element===k.element&&f.name===k.na
80
80
  module$exports$Blockly$Events$utils.getGroup=function(){return module$contents$Blockly$Events$utils_group};module$exports$Blockly$Events$utils.setGroup=function(a){module$contents$Blockly$Events$utils_group="boolean"===typeof a?a?(0,module$exports$Blockly$utils$idGenerator.genUid)():"":a};module$exports$Blockly$Events$utils.getDescendantIds=function(a){var b=[];a=a.getDescendants(!1);for(var c=0,d;d=a[c];c++)b[c]=d.id;return b};
81
81
  module$exports$Blockly$Events$utils.fromJson=function(a,b){var c=(0,module$exports$Blockly$Events$utils.get)(a.type);if(!c)throw Error("Unknown event type.");c=new c;c.fromJson(a);c.workspaceId=b.id;return c};module$exports$Blockly$Events$utils.get=function(a){return(0,module$exports$Blockly$registry.getClass)(module$exports$Blockly$registry.Type.EVENT,a)};
82
82
  module$exports$Blockly$Events$utils.disableOrphans=function(a){if((a.type===module$exports$Blockly$Events$utils.MOVE||a.type===module$exports$Blockly$Events$utils.CREATE)&&a.workspaceId){var b=module$exports$Blockly$Workspace.Workspace.getById(a.workspaceId),c=b.getBlockById(a.blockId);if(c){a=module$contents$Blockly$Events$utils_recordUndo;try{module$contents$Blockly$Events$utils_recordUndo=!1;var d=c.getParent();if(d&&d.isEnabled()){var e=c.getDescendants(!1);b=0;for(d=void 0;d=e[b];b++)d.setEnabled(!0)}else if((c.outputConnection||
83
- c.previousConnection)&&!b.isDragging()){do c.setEnabled(!1),c=c.getNextBlock();while(c)}}finally{module$contents$Blockly$Events$utils_recordUndo=a}}}};module$exports$Blockly$Events$utils.TEST_ONLY={FIRE_QUEUE:module$contents$Blockly$Events$utils_FIRE_QUEUE,fireNow:module$contents$Blockly$Events$utils_fireNow};var module$exports$Blockly$utils$array={removeElem:function(a,b){b=a.indexOf(b);if(-1===b)return!1;a.splice(b,1);return!0}};var module$exports$Blockly$utils$math={toRadians:function(a){return a*Math.PI/180},toDegrees:function(a){return 180*a/Math.PI},clamp:function(a,b,c){if(c<a){var d=c;c=a;a=d}return Math.max(a,Math.min(b,c))}};var module$exports$Blockly$IASTNodeLocation={IASTNodeLocation:function(){}};var module$contents$Blockly$utils$xml_xmlDocument;$.module$exports$Blockly$utils$xml={NAME_SPACE:"https://developers.google.com/blockly/xml"};module$contents$Blockly$utils$xml_xmlDocument=module$exports$Blockly$utils$global.globalThis.document;$.module$exports$Blockly$utils$xml.getDocument=function(){return module$contents$Blockly$utils$xml_xmlDocument};$.module$exports$Blockly$utils$xml.setDocument=function(a){module$contents$Blockly$utils$xml_xmlDocument=a};
83
+ c.previousConnection)&&!b.isDragging()){do c.setEnabled(!1),c=c.getNextBlock();while(c)}}finally{module$contents$Blockly$Events$utils_recordUndo=a}}}};module$exports$Blockly$Events$utils.TEST_ONLY={FIRE_QUEUE:module$contents$Blockly$Events$utils_FIRE_QUEUE,fireNow:module$contents$Blockly$Events$utils_fireNow};var module$exports$Blockly$utils$array={removeElem:function(a,b){b=a.indexOf(b);if(-1===b)return!1;a.splice(b,1);return!0}};var module$exports$Blockly$utils$math={toRadians:function(a){return a*Math.PI/180},toDegrees:function(a){return 180*a/Math.PI},clamp:function(a,b,c){if(c<a){var d=c;c=a;a=d}return Math.max(a,Math.min(b,c))}};var module$exports$Blockly$IASTNodeLocation={IASTNodeLocation:function(){}};var module$contents$Blockly$utils$xml_xmlDocument;$.module$exports$Blockly$utils$xml={NAME_SPACE:"https://developers.google.com/blockly/xml"};module$contents$Blockly$utils$xml_xmlDocument=$.module$exports$Blockly$utils$global.globalThis.document;$.module$exports$Blockly$utils$xml.getDocument=function(){return module$contents$Blockly$utils$xml_xmlDocument};$.module$exports$Blockly$utils$xml.setDocument=function(a){module$contents$Blockly$utils$xml_xmlDocument=a};
84
84
  $.module$exports$Blockly$utils$xml.createElement=function(a){return module$contents$Blockly$utils$xml_xmlDocument.createElementNS($.module$exports$Blockly$utils$xml.NAME_SPACE,a)};$.module$exports$Blockly$utils$xml.createTextNode=function(a){return module$contents$Blockly$utils$xml_xmlDocument.createTextNode(a)};$.module$exports$Blockly$utils$xml.textToDomDocument=function(a){return(new DOMParser).parseFromString(a,"text/xml")};$.module$exports$Blockly$utils$xml.domToText=function(a){return(new XMLSerializer).serializeToString(a)};var module$exports$Blockly$utils$Size={Size:function(a,b){this.width=a;this.height=b}};module$exports$Blockly$utils$Size.Size.equals=function(a,b){return a===b?!0:a&&b?a.width===b.width&&a.height===b.height:!1};$.module$exports$Blockly$ConnectionType={ConnectionType:{INPUT_VALUE:1,OUTPUT_VALUE:2,NEXT_STATEMENT:3,PREVIOUS_STATEMENT:4}};$.module$exports$Blockly$inputTypes={};$.module$exports$Blockly$inputTypes.inputTypes={VALUE:$.module$exports$Blockly$ConnectionType.ConnectionType.INPUT_VALUE,STATEMENT:$.module$exports$Blockly$ConnectionType.ConnectionType.NEXT_STATEMENT,DUMMY:5};var module$contents$Blockly$Xml_fieldToDom,module$contents$Blockly$Xml_allFieldsToDom;
85
85
  $.module$exports$Blockly$Xml={workspaceToDom:function(a,b){var c=(0,$.module$exports$Blockly$utils$xml.createElement)("xml"),d=(0,$.module$exports$Blockly$Xml.variablesToDom)($.module$exports$Blockly$Variables.allUsedVarModels(a));d.hasChildNodes()&&c.appendChild(d);d=a.getTopComments(!0);for(var e=0;e<d.length;e++)c.appendChild(d[e].toXmlWithXY(b));a=a.getTopBlocks(!0);for(d=0;d<a.length;d++)c.appendChild((0,$.module$exports$Blockly$Xml.blockToDomWithXY)(a[d],b));return c},variablesToDom:function(a){for(var b=
86
86
  (0,$.module$exports$Blockly$utils$xml.createElement)("variables"),c=0;c<a.length;c++){var d=a[c],e=(0,$.module$exports$Blockly$utils$xml.createElement)("variable");e.appendChild((0,$.module$exports$Blockly$utils$xml.createTextNode)(d.name));d.type&&e.setAttribute("type",d.type);e.id=d.getId();b.appendChild(e)}return b},blockToDomWithXY:function(a,b){if(a.isInsertionMarker()&&(a=a.getChildren(!1)[0],!a))return new DocumentFragment;var c;a.workspace.RTL&&(c=a.workspace.getWidth());b=(0,$.module$exports$Blockly$Xml.blockToDom)(a,
@@ -119,11 +119,11 @@ module$exports$Blockly$utils$toolbox.convertFlyoutDefToJsonArray=function(a){ret
119
119
  module$exports$Blockly$utils$toolbox.isCategoryCollapsible=function(a){return a&&a.contents?!!a.contents.filter(function(b){return"CATEGORY"===b.kind.toUpperCase()}).length:!1};
120
120
  var module$contents$Blockly$utils$toolbox_convertToToolboxJson=function(a){var b={contents:module$contents$Blockly$utils$toolbox_xmlToJsonArray(a)};a instanceof Node&&module$contents$Blockly$utils$toolbox_addAttributes(a,b);return b},module$contents$Blockly$utils$toolbox_xmlToJsonArray=function(a){var b=[],c=a.childNodes;c||(c=a);a=0;for(var d;d=c[a];a++)if(d.tagName){var e={},f=d.tagName.toUpperCase();e.kind=f;"BLOCK"===f?e.blockxml=d:d.childNodes&&0<d.childNodes.length&&(e.contents=module$contents$Blockly$utils$toolbox_xmlToJsonArray(d));
121
121
  module$contents$Blockly$utils$toolbox_addAttributes(d,e);b.push(e)}return b},module$contents$Blockly$utils$toolbox_addAttributes=function(a,b){for(var c=0;c<a.attributes.length;c++){var d=a.attributes[c];-1<d.nodeName.indexOf("css-")?(b.cssconfig=b.cssconfig||{},b.cssconfig[d.nodeName.replace("css-","")]=d.value):b[d.nodeName]=d.value}};
122
- module$exports$Blockly$utils$toolbox.parseToolboxTree=function(a){if(a){if("string"!==typeof a&&(module$exports$Blockly$utils$userAgent.IE&&a.outerHTML?a=a.outerHTML:a instanceof Element||(a=null)),"string"===typeof a&&(a=(0,$.module$exports$Blockly$Xml.textToDom)(a),"xml"!==a.nodeName.toLowerCase()))throw TypeError("Toolbox should be an <xml> document.");}else a=null;return a};var module$exports$Blockly$utils$object={inherits:function(a,b){a.superClass_=b.prototype;Object.setPrototypeOf(a,b);a.prototype=Object.create(b.prototype);a.prototype.constructor=a},mixin:function(a,b){for(var c in b)a[c]=b[c]},deepMerge:function(a,b){for(var c in b)a[c]=null!==b[c]&&"object"===typeof b[c]?(0,module$exports$Blockly$utils$object.deepMerge)(a[c]||Object.create(null),b[c]):b[c];return a},values:function(a){return Object.values?Object.values(a):Object.keys(a).map(function(b){return a[b]})}};var module$exports$Blockly$Theme={Theme:function(a,b,c,d){this.name=a;this.blockStyles=b||Object.create(null);this.categoryStyles=c||Object.create(null);this.componentStyles=d||Object.create(null);this.fontStyle=Object.create(null);this.startHats=null;(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.THEME,a,this)}};module$exports$Blockly$Theme.Theme.prototype.getClassName=function(){return this.name+"-theme"};
122
+ module$exports$Blockly$utils$toolbox.parseToolboxTree=function(a){if(a){if("string"!==typeof a&&(module$exports$Blockly$utils$userAgent.IE&&a.outerHTML?a=a.outerHTML:a instanceof Element||(a=null)),"string"===typeof a&&(a=(0,$.module$exports$Blockly$Xml.textToDom)(a),"xml"!==a.nodeName.toLowerCase()))throw TypeError("Toolbox should be an <xml> document.");}else a=null;return a};$.module$exports$Blockly$utils$object={inherits:function(a,b){a.superClass_=b.prototype;Object.setPrototypeOf(a,b);a.prototype=Object.create(b.prototype);a.prototype.constructor=a},mixin:function(a,b){for(var c in b)a[c]=b[c]},deepMerge:function(a,b){for(var c in b)a[c]=null!==b[c]&&"object"===typeof b[c]?(0,$.module$exports$Blockly$utils$object.deepMerge)(a[c]||Object.create(null),b[c]):b[c];return a},values:function(a){return Object.values?Object.values(a):Object.keys(a).map(function(b){return a[b]})}};var module$exports$Blockly$Theme={Theme:function(a,b,c,d){this.name=a;this.blockStyles=b||Object.create(null);this.categoryStyles=c||Object.create(null);this.componentStyles=d||Object.create(null);this.fontStyle=Object.create(null);this.startHats=null;(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.THEME,a,this)}};module$exports$Blockly$Theme.Theme.prototype.getClassName=function(){return this.name+"-theme"};
123
123
  module$exports$Blockly$Theme.Theme.prototype.setBlockStyle=function(a,b){this.blockStyles[a]=b};module$exports$Blockly$Theme.Theme.prototype.setCategoryStyle=function(a,b){this.categoryStyles[a]=b};module$exports$Blockly$Theme.Theme.prototype.getComponentStyle=function(a){return(a=this.componentStyles[a])&&"string"===typeof a&&this.getComponentStyle(a)?this.getComponentStyle(a):a?String(a):null};module$exports$Blockly$Theme.Theme.prototype.setComponentStyle=function(a,b){this.componentStyles[a]=b};
124
124
  module$exports$Blockly$Theme.Theme.prototype.setFontStyle=function(a){this.fontStyle=a};module$exports$Blockly$Theme.Theme.prototype.setStartHats=function(a){this.startHats=a};
125
- module$exports$Blockly$Theme.Theme.defineTheme=function(a,b){var c=new module$exports$Blockly$Theme.Theme(a),d=b.base;d&&("string"===typeof d&&(d=(0,module$exports$Blockly$registry.getObject)(module$exports$Blockly$registry.Type.THEME,d)),d instanceof module$exports$Blockly$Theme.Theme&&((0,module$exports$Blockly$utils$object.deepMerge)(c,d),c.name=a));(0,module$exports$Blockly$utils$object.deepMerge)(c.blockStyles,b.blockStyles);(0,module$exports$Blockly$utils$object.deepMerge)(c.categoryStyles,
126
- b.categoryStyles);(0,module$exports$Blockly$utils$object.deepMerge)(c.componentStyles,b.componentStyles);(0,module$exports$Blockly$utils$object.deepMerge)(c.fontStyle,b.fontStyle);null!==b.startHats&&(c.startHats=b.startHats);return c};var module$exports$Blockly$Themes$Classic={},module$contents$Blockly$Themes$Classic_defaultBlockStyles={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"}},module$contents$Blockly$Themes$Classic_categoryStyles=
125
+ module$exports$Blockly$Theme.Theme.defineTheme=function(a,b){var c=new module$exports$Blockly$Theme.Theme(a),d=b.base;d&&("string"===typeof d&&(d=(0,module$exports$Blockly$registry.getObject)(module$exports$Blockly$registry.Type.THEME,d)),d instanceof module$exports$Blockly$Theme.Theme&&((0,$.module$exports$Blockly$utils$object.deepMerge)(c,d),c.name=a));(0,$.module$exports$Blockly$utils$object.deepMerge)(c.blockStyles,b.blockStyles);(0,$.module$exports$Blockly$utils$object.deepMerge)(c.categoryStyles,
126
+ b.categoryStyles);(0,$.module$exports$Blockly$utils$object.deepMerge)(c.componentStyles,b.componentStyles);(0,$.module$exports$Blockly$utils$object.deepMerge)(c.fontStyle,b.fontStyle);null!==b.startHats&&(c.startHats=b.startHats);return c};var module$exports$Blockly$Themes$Classic={},module$contents$Blockly$Themes$Classic_defaultBlockStyles={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"}},module$contents$Blockly$Themes$Classic_categoryStyles=
127
127
  {colour_category:{colour:"20"},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"}};module$exports$Blockly$Themes$Classic.Classic=new module$exports$Blockly$Theme.Theme("classic",module$contents$Blockly$Themes$Classic_defaultBlockStyles,module$contents$Blockly$Themes$Classic_categoryStyles);var module$exports$Blockly$Options={Options:function(a){var b=null,c=!1,d=!1,e=!1,f=!1,g=!1,h=!1,k=!!a.readOnly;k||(b=(0,module$exports$Blockly$utils$toolbox.convertToolboxDefToJson)(a.toolbox),c=(0,module$exports$Blockly$utils$toolbox.hasCategories)(b),d=a.trashcan,void 0===d&&(d=c),e=a.collapse,void 0===e&&(e=c),f=a.comments,void 0===f&&(f=c),g=a.disable,void 0===g&&(g=c),h=a.sounds,void 0===h&&(h=!0));var l=a.maxTrashcanContents;d?void 0===l&&(l=32):l=0;var m=!!a.rtl,n=a.horizontalLayout;void 0===
128
128
  n&&(n=!1);var p=a.toolboxPosition;p="end"!==p;p=n?p?module$exports$Blockly$utils$toolbox.Position.TOP:module$exports$Blockly$utils$toolbox.Position.BOTTOM:p===m?module$exports$Blockly$utils$toolbox.Position.RIGHT:module$exports$Blockly$utils$toolbox.Position.LEFT;var q=a.css;void 0===q&&(q=!0);var r="https://blockly-demo.appspot.com/static/media/";a.media?r=a.media:a.path&&(r=a.path+"media/");var t=void 0===a.oneBasedIndex?!0:!!a.oneBasedIndex;var u=a.renderer||"geras",v=a.plugins||{};this.RTL=m;
129
129
  this.oneBasedIndex=t;this.collapse=e;this.comments=f;this.disable=g;this.readOnly=k;this.maxBlocks=a.maxBlocks||Infinity;this.maxInstances=a.maxInstances;this.pathToMedia=r;this.hasCategories=c;this.moveOptions=module$exports$Blockly$Options.Options.parseMoveOptions_(a,c);this.hasScrollbars=!!this.moveOptions.scrollbars;this.hasTrashcan=d;this.maxTrashcanContents=l;this.hasSounds=h;this.hasCss=q;this.horizontalLayout=n;this.languageTree=b;this.gridOptions=module$exports$Blockly$Options.Options.parseGridOptions_(a);
@@ -132,12 +132,12 @@ module$exports$Blockly$Options.Options.parseMoveOptions_=function(a,b){var c=a.m
132
132
  c.wheel?!!c.wheel:"object"===typeof d.scrollbars;d.drag=d.scrollbars?void 0===c.drag?!0:!!c.drag:!1;return d};
133
133
  module$exports$Blockly$Options.Options.parseZoomOptions_=function(a){a=a.zoom||{};var b={};b.controls=void 0===a.controls?!1:!!a.controls;b.wheel=void 0===a.wheel?!1:!!a.wheel;b.startScale=void 0===a.startScale?1:Number(a.startScale);b.maxScale=void 0===a.maxScale?3:Number(a.maxScale);b.minScale=void 0===a.minScale?.3:Number(a.minScale);b.scaleSpeed=void 0===a.scaleSpeed?1.2:Number(a.scaleSpeed);b.pinch=void 0===a.pinch?b.wheel||b.controls:!!a.pinch;return b};
134
134
  module$exports$Blockly$Options.Options.parseGridOptions_=function(a){a=a.grid||{};var b={};b.spacing=Number(a.spacing)||0;b.colour=a.colour||"#888";b.length=void 0===a.length?1:Number(a.length);b.snap=0<b.spacing&&!!a.snap;return b};
135
- module$exports$Blockly$Options.Options.parseThemeOptions_=function(a){a=a.theme||module$exports$Blockly$Themes$Classic.Classic;return"string"===typeof a?(0,module$exports$Blockly$registry.getObject)(module$exports$Blockly$registry.Type.THEME,a):a instanceof module$exports$Blockly$Theme.Theme?a:module$exports$Blockly$Theme.Theme.defineTheme(a.name||"builtin"+(0,module$exports$Blockly$utils$idGenerator.getNextUniqueId)(),a)};$.Blockly={Msg:{}};module$exports$Blockly$utils$global.globalThis.Blockly||(module$exports$Blockly$utils$global.globalThis.Blockly={});module$exports$Blockly$utils$global.globalThis.Blockly.Msg||(module$exports$Blockly$utils$global.globalThis.Blockly.Msg=$.Blockly.Msg);var module$exports$Blockly$dialog={},module$contents$Blockly$dialog_alertImplementation=function(a,b){window.alert(a);b&&b()},module$contents$Blockly$dialog_confirmImplementation=function(a,b){b(window.confirm(a))},module$contents$Blockly$dialog_promptImplementation=function(a,b,c){c(window.prompt(a,b))};module$exports$Blockly$dialog.alert=function(a,b){module$contents$Blockly$dialog_alertImplementation(a,b)};
135
+ module$exports$Blockly$Options.Options.parseThemeOptions_=function(a){a=a.theme||module$exports$Blockly$Themes$Classic.Classic;return"string"===typeof a?(0,module$exports$Blockly$registry.getObject)(module$exports$Blockly$registry.Type.THEME,a):a instanceof module$exports$Blockly$Theme.Theme?a:module$exports$Blockly$Theme.Theme.defineTheme(a.name||"builtin"+(0,module$exports$Blockly$utils$idGenerator.getNextUniqueId)(),a)};$.Blockly={Msg:{}};$.module$exports$Blockly$utils$global.globalThis.Blockly||($.module$exports$Blockly$utils$global.globalThis.Blockly={});$.module$exports$Blockly$utils$global.globalThis.Blockly.Msg||($.module$exports$Blockly$utils$global.globalThis.Blockly.Msg=$.Blockly.Msg);var module$exports$Blockly$dialog={},module$contents$Blockly$dialog_alertImplementation=function(a,b){window.alert(a);b&&b()},module$contents$Blockly$dialog_confirmImplementation=function(a,b){b(window.confirm(a))},module$contents$Blockly$dialog_promptImplementation=function(a,b,c){c(window.prompt(a,b))};module$exports$Blockly$dialog.alert=function(a,b){module$contents$Blockly$dialog_alertImplementation(a,b)};
136
136
  module$exports$Blockly$dialog.setAlert=function(a){module$contents$Blockly$dialog_alertImplementation=a};module$exports$Blockly$dialog.confirm=function(a,b){module$contents$Blockly$dialog_confirmImplementation(a,b)};module$exports$Blockly$dialog.setConfirm=function(a){module$contents$Blockly$dialog_confirmImplementation=a};module$exports$Blockly$dialog.prompt=function(a,b,c){module$contents$Blockly$dialog_promptImplementation(a,b,c)};
137
137
  module$exports$Blockly$dialog.setPrompt=function(a){module$contents$Blockly$dialog_promptImplementation=a};$.module$exports$Blockly$blocks={};$.module$exports$Blockly$blocks.Blocks=Object.create(null);var module$exports$Blockly$Events$Abstract=function(){this.isBlank=null;this.workspaceId=void 0;this.group=(0,module$exports$Blockly$Events$utils.getGroup)();this.recordUndo=(0,module$exports$Blockly$Events$utils.getRecordUndo)()};module$exports$Blockly$Events$Abstract.prototype.isUiEvent=!1;module$exports$Blockly$Events$Abstract.prototype.toJson=function(){var a={type:this.type};this.group&&(a.group=this.group);return a};
138
138
  module$exports$Blockly$Events$Abstract.prototype.fromJson=function(a){this.isBlank=!1;this.group=a.group};module$exports$Blockly$Events$Abstract.prototype.isNull=function(){return!1};module$exports$Blockly$Events$Abstract.prototype.run=function(a){};
139
- module$exports$Blockly$Events$Abstract.prototype.getEventWorkspace_=function(){var a;this.workspaceId&&(a=module$exports$Blockly$Workspace.Workspace.getById(this.workspaceId));if(!a)throw Error("Workspace is null. Event must have been generated from real Blockly events.");return a};var module$exports$Blockly$Events$VarBase={VarBase:function(a){module$exports$Blockly$Events$VarBase.VarBase.superClass_.constructor.call(this);this.varId=(this.isBlank="undefined"===typeof a)?"":a.getId();this.workspaceId=this.isBlank?"":a.workspace.id}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$VarBase.VarBase,module$exports$Blockly$Events$Abstract);
140
- module$exports$Blockly$Events$VarBase.VarBase.prototype.toJson=function(){var a=module$exports$Blockly$Events$VarBase.VarBase.superClass_.toJson.call(this);a.varId=this.varId;return a};module$exports$Blockly$Events$VarBase.VarBase.prototype.fromJson=function(a){module$exports$Blockly$Events$VarBase.VarBase.superClass_.toJson.call(this);this.varId=a.varId};var module$exports$Blockly$Events$VarCreate={VarCreate:function(a){module$exports$Blockly$Events$VarCreate.VarCreate.superClass_.constructor.call(this,a);a&&(this.varType=a.type,this.varName=a.name)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$VarCreate.VarCreate,module$exports$Blockly$Events$VarBase.VarBase);module$exports$Blockly$Events$VarCreate.VarCreate.prototype.type=module$exports$Blockly$Events$utils.VAR_CREATE;
139
+ module$exports$Blockly$Events$Abstract.prototype.getEventWorkspace_=function(){var a;this.workspaceId&&(a=module$exports$Blockly$Workspace.Workspace.getById(this.workspaceId));if(!a)throw Error("Workspace is null. Event must have been generated from real Blockly events.");return a};var module$exports$Blockly$Events$VarBase={VarBase:function(a){module$exports$Blockly$Events$VarBase.VarBase.superClass_.constructor.call(this);this.varId=(this.isBlank="undefined"===typeof a)?"":a.getId();this.workspaceId=this.isBlank?"":a.workspace.id}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$VarBase.VarBase,module$exports$Blockly$Events$Abstract);
140
+ module$exports$Blockly$Events$VarBase.VarBase.prototype.toJson=function(){var a=module$exports$Blockly$Events$VarBase.VarBase.superClass_.toJson.call(this);a.varId=this.varId;return a};module$exports$Blockly$Events$VarBase.VarBase.prototype.fromJson=function(a){module$exports$Blockly$Events$VarBase.VarBase.superClass_.toJson.call(this);this.varId=a.varId};var module$exports$Blockly$Events$VarCreate={VarCreate:function(a){module$exports$Blockly$Events$VarCreate.VarCreate.superClass_.constructor.call(this,a);a&&(this.varType=a.type,this.varName=a.name)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$VarCreate.VarCreate,module$exports$Blockly$Events$VarBase.VarBase);module$exports$Blockly$Events$VarCreate.VarCreate.prototype.type=module$exports$Blockly$Events$utils.VAR_CREATE;
141
141
  module$exports$Blockly$Events$VarCreate.VarCreate.prototype.toJson=function(){var a=module$exports$Blockly$Events$VarCreate.VarCreate.superClass_.toJson.call(this);a.varType=this.varType;a.varName=this.varName;return a};module$exports$Blockly$Events$VarCreate.VarCreate.prototype.fromJson=function(a){module$exports$Blockly$Events$VarCreate.VarCreate.superClass_.fromJson.call(this,a);this.varType=a.varType;this.varName=a.varName};
142
142
  module$exports$Blockly$Events$VarCreate.VarCreate.prototype.run=function(a){var b=this.getEventWorkspace_();a?b.createVariable(this.varName,this.varType,this.varId):b.deleteVariableById(this.varId)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.VAR_CREATE,module$exports$Blockly$Events$VarCreate.VarCreate);var module$exports$Blockly$VariableModel={VariableModel:function(a,b,c,d){this.workspace=a;this.name=b;this.type=c||"";this.id_=d||(0,module$exports$Blockly$utils$idGenerator.genUid)();(0,module$exports$Blockly$Events$utils.fire)(new ((0,module$exports$Blockly$Events$utils.get)(module$exports$Blockly$Events$utils.VAR_CREATE))(this))}};module$exports$Blockly$VariableModel.VariableModel.prototype.getId=function(){return this.id_};
143
143
  module$exports$Blockly$VariableModel.VariableModel.compareByName=function(a,b){return a.name.localeCompare(b.name,void 0,{sensitivity:"base"})};var module$contents$Blockly$Variables_ALL_DEVELOPER_VARS_WARNINGS_BY_BLOCK_TYPE;$.module$exports$Blockly$Variables={CATEGORY_NAME:"VARIABLE",allUsedVarModels:function(a){var b=a.getAllBlocks(!1);a=Object.create(null);for(var c=0;c<b.length;c++){var d=b[c].getVarModels();if(d)for(var e=0;e<d.length;e++){var f=d[e],g=f.getId();g&&(a[g]=f)}}b=[];for(var h in a)b.push(a[h]);return b}};module$contents$Blockly$Variables_ALL_DEVELOPER_VARS_WARNINGS_BY_BLOCK_TYPE={};
@@ -162,9 +162,9 @@ $.module$exports$Blockly$Names.Names.prototype.getNameForUserVariable_=function(
162
162
  $.module$exports$Blockly$Names.Names.prototype.populateVariables=function(a){a=(0,$.module$exports$Blockly$Variables.allUsedVarModels)(a);for(var b=0;b<a.length;b++)this.getName(a[b].getId(),$.module$exports$Blockly$Names.NameType.VARIABLE)};$.module$exports$Blockly$Names.Names.prototype.populateProcedures=function(a){a=$.module$exports$Blockly$Procedures.allProcedures(a);a=a[0].concat(a[1]);for(var b=0;b<a.length;b++)this.getName(a[b][0],$.module$exports$Blockly$Names.NameType.PROCEDURE)};
163
163
  $.module$exports$Blockly$Names.Names.prototype.getName=function(a,b){var c=a;b===$.module$exports$Blockly$Names.NameType.VARIABLE&&(a=this.getNameForUserVariable_(a))&&(c=a);a=c.toLowerCase();var d=b===$.module$exports$Blockly$Names.NameType.VARIABLE||b===$.module$exports$Blockly$Names.NameType.DEVELOPER_VARIABLE?this.variablePrefix_:"";b in this.db_||(this.db_[b]=Object.create(null));var e=this.db_[b];if(a in e)return d+e[a];b=this.getDistinctName(c,b);e[a]=b.substr(d.length);return b};
164
164
  $.module$exports$Blockly$Names.Names.prototype.getUserNames=function(a){return Object.keys(this.db_[a]||{})};$.module$exports$Blockly$Names.Names.prototype.getDistinctName=function(a,b){a=this.safeName_(a);for(var c="";this.dbReverse_[a+c]||a+c in this.reservedDict_;)c=c?c+1:2;a+=c;this.dbReverse_[a]=!0;return(b===$.module$exports$Blockly$Names.NameType.VARIABLE||b===$.module$exports$Blockly$Names.NameType.DEVELOPER_VARIABLE?this.variablePrefix_:"")+a};
165
- $.module$exports$Blockly$Names.Names.prototype.safeName_=function(a){a?(a=encodeURI(a.replace(/ /g,"_")).replace(/[^\w]/g,"_"),-1!=="0123456789".indexOf(a[0])&&(a="my_"+a)):a=$.Blockly.Msg.UNNAMED_KEY||"unnamed";return a};$.module$exports$Blockly$Names.Names.equals=function(a,b){return a.toLowerCase()===b.toLowerCase()};var module$exports$Blockly$Events$VarDelete={VarDelete:function(a){module$exports$Blockly$Events$VarDelete.VarDelete.superClass_.constructor.call(this,a);a&&(this.varType=a.type,this.varName=a.name)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$VarDelete.VarDelete,module$exports$Blockly$Events$VarBase.VarBase);module$exports$Blockly$Events$VarDelete.VarDelete.prototype.type=module$exports$Blockly$Events$utils.VAR_DELETE;
165
+ $.module$exports$Blockly$Names.Names.prototype.safeName_=function(a){a?(a=encodeURI(a.replace(/ /g,"_")).replace(/[^\w]/g,"_"),-1!=="0123456789".indexOf(a[0])&&(a="my_"+a)):a=$.Blockly.Msg.UNNAMED_KEY||"unnamed";return a};$.module$exports$Blockly$Names.Names.equals=function(a,b){return a.toLowerCase()===b.toLowerCase()};var module$exports$Blockly$Events$VarDelete={VarDelete:function(a){module$exports$Blockly$Events$VarDelete.VarDelete.superClass_.constructor.call(this,a);a&&(this.varType=a.type,this.varName=a.name)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$VarDelete.VarDelete,module$exports$Blockly$Events$VarBase.VarBase);module$exports$Blockly$Events$VarDelete.VarDelete.prototype.type=module$exports$Blockly$Events$utils.VAR_DELETE;
166
166
  module$exports$Blockly$Events$VarDelete.VarDelete.prototype.toJson=function(){var a=module$exports$Blockly$Events$VarDelete.VarDelete.superClass_.toJson.call(this);a.varType=this.varType;a.varName=this.varName;return a};module$exports$Blockly$Events$VarDelete.VarDelete.prototype.fromJson=function(a){module$exports$Blockly$Events$VarDelete.VarDelete.superClass_.fromJson.call(this,a);this.varType=a.varType;this.varName=a.varName};
167
- module$exports$Blockly$Events$VarDelete.VarDelete.prototype.run=function(a){var b=this.getEventWorkspace_();a?b.deleteVariableById(this.varId):b.createVariable(this.varName,this.varType,this.varId)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.VAR_DELETE,module$exports$Blockly$Events$VarDelete.VarDelete);var module$exports$Blockly$Events$VarRename={VarRename:function(a,b){module$exports$Blockly$Events$VarRename.VarRename.superClass_.constructor.call(this,a);a&&(this.oldName=a.name,this.newName="undefined"===typeof b?"":b)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$VarRename.VarRename,module$exports$Blockly$Events$VarBase.VarBase);module$exports$Blockly$Events$VarRename.VarRename.prototype.type=module$exports$Blockly$Events$utils.VAR_RENAME;
167
+ module$exports$Blockly$Events$VarDelete.VarDelete.prototype.run=function(a){var b=this.getEventWorkspace_();a?b.deleteVariableById(this.varId):b.createVariable(this.varName,this.varType,this.varId)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.VAR_DELETE,module$exports$Blockly$Events$VarDelete.VarDelete);var module$exports$Blockly$Events$VarRename={VarRename:function(a,b){module$exports$Blockly$Events$VarRename.VarRename.superClass_.constructor.call(this,a);a&&(this.oldName=a.name,this.newName="undefined"===typeof b?"":b)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$VarRename.VarRename,module$exports$Blockly$Events$VarBase.VarBase);module$exports$Blockly$Events$VarRename.VarRename.prototype.type=module$exports$Blockly$Events$utils.VAR_RENAME;
168
168
  module$exports$Blockly$Events$VarRename.VarRename.prototype.toJson=function(){var a=module$exports$Blockly$Events$VarRename.VarRename.superClass_.toJson.call(this);a.oldName=this.oldName;a.newName=this.newName;return a};module$exports$Blockly$Events$VarRename.VarRename.prototype.fromJson=function(a){module$exports$Blockly$Events$VarRename.VarRename.superClass_.fromJson.call(this,a);this.oldName=a.oldName;this.newName=a.newName};
169
169
  module$exports$Blockly$Events$VarRename.VarRename.prototype.run=function(a){var b=this.getEventWorkspace_();a?b.renameVariableById(this.varId,this.newName):b.renameVariableById(this.varId,this.oldName)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.VAR_RENAME,module$exports$Blockly$Events$VarRename.VarRename);var module$exports$Blockly$VariableMap={VariableMap:function(a){this.variableMap_=Object.create(null);this.workspace=a}};module$exports$Blockly$VariableMap.VariableMap.prototype.clear=function(){this.variableMap_=Object.create(null)};
170
170
  module$exports$Blockly$VariableMap.VariableMap.prototype.renameVariable=function(a,b){var c=this.getVariable(b,a.type),d=this.workspace.getAllBlocks(!1);(0,module$exports$Blockly$Events$utils.setGroup)(!0);try{c&&c.getId()!==a.getId()?this.renameVariableWithConflict_(a,b,c,d):this.renameVariableAndUses_(a,b,d)}finally{(0,module$exports$Blockly$Events$utils.setGroup)(!1)}};
@@ -177,7 +177,7 @@ String(d.length)).replace("%2",c),(0,module$exports$Blockly$dialog.confirm)(c,fu
177
177
  module$exports$Blockly$VariableMap.VariableMap.prototype.deleteVariableInternal=function(a,b){var c=(0,module$exports$Blockly$Events$utils.getGroup)();c||(0,module$exports$Blockly$Events$utils.setGroup)(!0);try{for(var d=0;d<b.length;d++)b[d].dispose(!0);this.deleteVariable(a)}finally{c||(0,module$exports$Blockly$Events$utils.setGroup)(!1)}};
178
178
  module$exports$Blockly$VariableMap.VariableMap.prototype.getVariable=function(a,b){if(b=this.variableMap_[b||""])for(var c=0,d;d=b[c];c++)if($.module$exports$Blockly$Names.Names.equals(d.name,a))return d;return null};module$exports$Blockly$VariableMap.VariableMap.prototype.getVariableById=function(a){for(var b=Object.keys(this.variableMap_),c=0;c<b.length;c++)for(var d=b[c],e=0,f;f=this.variableMap_[d][e];e++)if(f.getId()===a)return f;return null};
179
179
  module$exports$Blockly$VariableMap.VariableMap.prototype.getVariablesOfType=function(a){return(a=this.variableMap_[a||""])?a.slice():[]};
180
- module$exports$Blockly$VariableMap.VariableMap.prototype.getVariableTypes=function(a){var b={};(0,module$exports$Blockly$utils$object.mixin)(b,this.variableMap_);a&&a.getPotentialVariableMap()&&(0,module$exports$Blockly$utils$object.mixin)(b,a.getPotentialVariableMap().variableMap_);a=Object.keys(b);b=!1;for(var c=0;c<a.length;c++)""===a[c]&&(b=!0);b||a.push("");return a};
180
+ module$exports$Blockly$VariableMap.VariableMap.prototype.getVariableTypes=function(a){var b={};(0,$.module$exports$Blockly$utils$object.mixin)(b,this.variableMap_);a&&a.getPotentialVariableMap()&&(0,$.module$exports$Blockly$utils$object.mixin)(b,a.getPotentialVariableMap().variableMap_);a=Object.keys(b);b=!1;for(var c=0;c<a.length;c++)""===a[c]&&(b=!0);b||a.push("");return a};
181
181
  module$exports$Blockly$VariableMap.VariableMap.prototype.getAllVariables=function(){var a=[],b;for(b in this.variableMap_)a=a.concat(this.variableMap_[b]);return a};module$exports$Blockly$VariableMap.VariableMap.prototype.getAllVariableNames=function(){var a=[],b;for(b in this.variableMap_)for(var c=this.variableMap_[b],d=0,e;e=c[d];d++)a.push(e.name);return a};
182
182
  module$exports$Blockly$VariableMap.VariableMap.prototype.getVariableUsesById=function(a){for(var b=[],c=this.workspace.getAllBlocks(!1),d=0;d<c.length;d++){var e=c[d].getVarModels();if(e)for(var f=0;f<e.length;f++)e[f].getId()===a&&b.push(c[d])}return b};var module$contents$Blockly$common_mainWorkspace;$.module$exports$Blockly$common={};$.module$exports$Blockly$common.getMainWorkspace=function(){return module$contents$Blockly$common_mainWorkspace};$.module$exports$Blockly$common.setMainWorkspace=function(a){module$contents$Blockly$common_mainWorkspace=a};var module$contents$Blockly$common_selected=null;$.module$exports$Blockly$common.getSelected=function(){return module$contents$Blockly$common_selected};
183
183
  $.module$exports$Blockly$common.setSelected=function(a){module$contents$Blockly$common_selected=a};var module$contents$Blockly$common_parentContainer;$.module$exports$Blockly$common.getParentContainer=function(){return module$contents$Blockly$common_parentContainer};$.module$exports$Blockly$common.setParentContainer=function(a){module$contents$Blockly$common_parentContainer=a};
@@ -215,10 +215,10 @@ c[d],f=a.getInput(e);if(!f||!f.connection)throw new $.Blockly.serialization.exce
215
215
  function(a,b){b.shadow&&a.setShadowState(b.shadow);b.block&&module$contents$Blockly$serialization$blocks_appendPrivate(b.block,a.getSourceBlock().workspace,{parentConnection:a})},module$contents$Blockly$serialization$blocks_initBlock=function(a,b){b?(a.setConnectionTracking(!1),a.initSvg(),a.render(!1)):a.initModel()},module$contents$Blockly$serialization$blocks_saveBlock=module$contents$Blockly$serialization$blocks_save,module$contents$Blockly$serialization$blocks_BlockSerializer=function(){this.priority=
216
216
  $.Blockly.serialization.priorities.BLOCKS};module$contents$Blockly$serialization$blocks_BlockSerializer.prototype.save=function(a){var b=[];a=$jscomp.makeIterator(a.getTopBlocks(!1));for(var c=a.next();!c.done;c=a.next())(c=module$contents$Blockly$serialization$blocks_save(c.value,{addCoordinates:!0,doFullSerialization:!1}))&&b.push(c);return b.length?{languageVersion:0,blocks:b}:null};
217
217
  module$contents$Blockly$serialization$blocks_BlockSerializer.prototype.load=function(a,b){a=$jscomp.makeIterator(a.blocks);for(var c=a.next();!c.done;c=a.next())module$contents$Blockly$serialization$blocks_append(c.value,b,{recordUndo:(0,module$exports$Blockly$Events$utils.getRecordUndo)()})};module$contents$Blockly$serialization$blocks_BlockSerializer.prototype.clear=function(a){a=$jscomp.makeIterator(a.getTopBlocks(!1));for(var b=a.next();!b.done;b=a.next())b.value.dispose(!1)};
218
- $.Blockly.serialization.registry.register("blocks",new module$contents$Blockly$serialization$blocks_BlockSerializer);var module$exports$Blockly$utils$deprecation={warn:function(a,b,c,d){a=a+" was deprecated on "+b+" and will be deleted on "+c+".";d&&(a+="\nUse "+d+" instead.");console.warn(a)}};var module$exports$Blockly$IASTNodeLocationWithBlock={IASTNodeLocationWithBlock:function(){}};var module$exports$Blockly$Events$BlockBase={BlockBase:function(a){module$exports$Blockly$Events$BlockBase.BlockBase.superClass_.constructor.call(this);this.blockId=(this.isBlank="undefined"===typeof a)?"":a.id;this.workspaceId=this.isBlank?"":a.workspace.id}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockBase.BlockBase,module$exports$Blockly$Events$Abstract);
218
+ $.Blockly.serialization.registry.register("blocks",new module$contents$Blockly$serialization$blocks_BlockSerializer);var module$exports$Blockly$utils$deprecation={warn:function(a,b,c,d){a=a+" was deprecated on "+b+" and will be deleted on "+c+".";d&&(a+="\nUse "+d+" instead.");console.warn(a)}};var module$exports$Blockly$IASTNodeLocationWithBlock={IASTNodeLocationWithBlock:function(){}};var module$exports$Blockly$Events$BlockBase={BlockBase:function(a){module$exports$Blockly$Events$BlockBase.BlockBase.superClass_.constructor.call(this);this.blockId=(this.isBlank="undefined"===typeof a)?"":a.id;this.workspaceId=this.isBlank?"":a.workspace.id}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockBase.BlockBase,module$exports$Blockly$Events$Abstract);
219
219
  module$exports$Blockly$Events$BlockBase.BlockBase.prototype.toJson=function(){var a=module$exports$Blockly$Events$BlockBase.BlockBase.superClass_.toJson.call(this);a.blockId=this.blockId;return a};module$exports$Blockly$Events$BlockBase.BlockBase.prototype.fromJson=function(a){module$exports$Blockly$Events$BlockBase.BlockBase.superClass_.fromJson.call(this,a);this.blockId=a.blockId};var module$exports$Blockly$utils$Coordinate={Coordinate:function(a,b){this.x=a;this.y=b}};module$exports$Blockly$utils$Coordinate.Coordinate.equals=function(a,b){return a===b?!0:a&&b?a.x===b.x&&a.y===b.y:!1};module$exports$Blockly$utils$Coordinate.Coordinate.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};module$exports$Blockly$utils$Coordinate.Coordinate.magnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)};
220
220
  module$exports$Blockly$utils$Coordinate.Coordinate.difference=function(a,b){return new module$exports$Blockly$utils$Coordinate.Coordinate(a.x-b.x,a.y-b.y)};module$exports$Blockly$utils$Coordinate.Coordinate.sum=function(a,b){return new module$exports$Blockly$utils$Coordinate.Coordinate(a.x+b.x,a.y+b.y)};module$exports$Blockly$utils$Coordinate.Coordinate.prototype.clone=function(){return new module$exports$Blockly$utils$Coordinate.Coordinate(this.x,this.y)};
221
- module$exports$Blockly$utils$Coordinate.Coordinate.prototype.scale=function(a){this.x*=a;this.y*=a;return this};module$exports$Blockly$utils$Coordinate.Coordinate.prototype.translate=function(a,b){this.x+=a;this.y+=b;return this};var module$exports$Blockly$Events$BlockMove={BlockMove:function(a){module$exports$Blockly$Events$BlockMove.BlockMove.superClass_.constructor.call(this,a);a&&(a.isShadow()&&(this.recordUndo=!1),a=this.currentLocation_(),this.oldParentId=a.parentId,this.oldInputName=a.inputName,this.oldCoordinate=a.coordinate)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockMove.BlockMove,module$exports$Blockly$Events$BlockBase.BlockBase);
221
+ module$exports$Blockly$utils$Coordinate.Coordinate.prototype.scale=function(a){this.x*=a;this.y*=a;return this};module$exports$Blockly$utils$Coordinate.Coordinate.prototype.translate=function(a,b){this.x+=a;this.y+=b;return this};var module$exports$Blockly$Events$BlockMove={BlockMove:function(a){module$exports$Blockly$Events$BlockMove.BlockMove.superClass_.constructor.call(this,a);a&&(a.isShadow()&&(this.recordUndo=!1),a=this.currentLocation_(),this.oldParentId=a.parentId,this.oldInputName=a.inputName,this.oldCoordinate=a.coordinate)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockMove.BlockMove,module$exports$Blockly$Events$BlockBase.BlockBase);
222
222
  module$exports$Blockly$Events$BlockMove.BlockMove.prototype.type=module$exports$Blockly$Events$utils.MOVE;
223
223
  module$exports$Blockly$Events$BlockMove.BlockMove.prototype.toJson=function(){var a=module$exports$Blockly$Events$BlockMove.BlockMove.superClass_.toJson.call(this);this.newParentId&&(a.newParentId=this.newParentId);this.newInputName&&(a.newInputName=this.newInputName);this.newCoordinate&&(a.newCoordinate=Math.round(this.newCoordinate.x)+","+Math.round(this.newCoordinate.y));this.recordUndo||(a.recordUndo=this.recordUndo);return a};
224
224
  module$exports$Blockly$Events$BlockMove.BlockMove.prototype.fromJson=function(a){module$exports$Blockly$Events$BlockMove.BlockMove.superClass_.fromJson.call(this,a);this.newParentId=a.newParentId;this.newInputName=a.newInputName;if(a.newCoordinate){var b=a.newCoordinate.split(",");this.newCoordinate=new module$exports$Blockly$utils$Coordinate.Coordinate(Number(b[0]),Number(b[1]))}void 0!==a.recordUndo&&(this.recordUndo=a.recordUndo)};
@@ -290,40 +290,40 @@ var module$contents$Blockly$serialization$workspaces_load=function(a,b,c){c=void
290
290
  (0,module$exports$Blockly$utils$dom.startTextWidthCache)();b.setResizesEnabled&&b.setResizesEnabled(!1);for(var f=$jscomp.makeIterator(e.reverse()),g=f.next();!g.done;g=f.next())g=$jscomp.makeIterator(g.value),g.next(),g.next().value.clear(b);e=$jscomp.makeIterator(e.reverse());for(f=e.next();!f.done;f=e.next())g=$jscomp.makeIterator(f.value),f=g.next().value,g=g.next().value,a[f]&&g.load(a[f],b);b.setResizesEnabled&&b.setResizesEnabled(!0);(0,module$exports$Blockly$utils$dom.stopTextWidthCache)();
291
291
  (0,module$exports$Blockly$Events$utils.fire)(new ((0,module$exports$Blockly$Events$utils.get)(module$exports$Blockly$Events$utils.FINISHED_LOADING))(b));(0,module$exports$Blockly$Events$utils.setGroup)(d);(0,module$exports$Blockly$Events$utils.setRecordUndo)(c)}};$.Blockly.serialization.workspaces.load=module$contents$Blockly$serialization$workspaces_load;$.Blockly.serialization.variables={};var module$contents$Blockly$serialization$variables_State;$.Blockly.serialization.variables.State=module$contents$Blockly$serialization$variables_State;var module$contents$Blockly$serialization$variables_VariableSerializer=function(){this.priority=$.Blockly.serialization.priorities.VARIABLES};
292
292
  module$contents$Blockly$serialization$variables_VariableSerializer.prototype.save=function(a){var b=[];a=$jscomp.makeIterator(a.getAllVariables());for(var c=a.next();!c.done;c=a.next()){c=c.value;var d={name:c.name,id:c.getId()};c.type&&(d.type=c.type);b.push(d)}return b.length?b:null};module$contents$Blockly$serialization$variables_VariableSerializer.prototype.load=function(a,b){a=$jscomp.makeIterator(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.createVariable(c.name,c.type,c.id)};
293
- module$contents$Blockly$serialization$variables_VariableSerializer.prototype.clear=function(a){a.getVariableMap().clear()};$.Blockly.serialization.registry.register("variables",new module$contents$Blockly$serialization$variables_VariableSerializer);var module$exports$Blockly$Events$BlockChange={BlockChange:function(a,b,c,d,e){module$exports$Blockly$Events$BlockChange.BlockChange.superClass_.constructor.call(this,a);a&&(this.element="undefined"===typeof b?"":b,this.name="undefined"===typeof c?"":c,this.oldValue="undefined"===typeof d?"":d,this.newValue="undefined"===typeof e?"":e)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockChange.BlockChange,module$exports$Blockly$Events$BlockBase.BlockBase);
293
+ module$contents$Blockly$serialization$variables_VariableSerializer.prototype.clear=function(a){a.getVariableMap().clear()};$.Blockly.serialization.registry.register("variables",new module$contents$Blockly$serialization$variables_VariableSerializer);var module$exports$Blockly$Events$BlockChange={BlockChange:function(a,b,c,d,e){module$exports$Blockly$Events$BlockChange.BlockChange.superClass_.constructor.call(this,a);a&&(this.element="undefined"===typeof b?"":b,this.name="undefined"===typeof c?"":c,this.oldValue="undefined"===typeof d?"":d,this.newValue="undefined"===typeof e?"":e)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockChange.BlockChange,module$exports$Blockly$Events$BlockBase.BlockBase);
294
294
  module$exports$Blockly$Events$BlockChange.BlockChange.prototype.type=module$exports$Blockly$Events$utils.CHANGE;module$exports$Blockly$Events$BlockChange.BlockChange.prototype.toJson=function(){var a=module$exports$Blockly$Events$BlockChange.BlockChange.superClass_.toJson.call(this);a.element=this.element;this.name&&(a.name=this.name);a.oldValue=this.oldValue;a.newValue=this.newValue;return a};
295
295
  module$exports$Blockly$Events$BlockChange.BlockChange.prototype.fromJson=function(a){module$exports$Blockly$Events$BlockChange.BlockChange.superClass_.fromJson.call(this,a);this.element=a.element;this.name=a.name;this.oldValue=a.oldValue;this.newValue=a.newValue};module$exports$Blockly$Events$BlockChange.BlockChange.prototype.isNull=function(){return this.oldValue===this.newValue};
296
296
  module$exports$Blockly$Events$BlockChange.BlockChange.prototype.run=function(a){var b=this.getEventWorkspace_().getBlockById(this.blockId);if(b)switch(b.mutator&&b.mutator.setVisible(!1),a=a?this.newValue:this.oldValue,this.element){case "field":(b=b.getField(this.name))?b.setValue(a):console.warn("Can't set non-existent field: "+this.name);break;case "comment":b.setCommentText(a||null);break;case "collapsed":b.setCollapsed(!!a);break;case "disabled":b.setEnabled(!a);break;case "inline":b.setInputsInline(!!a);
297
297
  break;case "mutation":var c=module$exports$Blockly$Events$BlockChange.BlockChange.getExtraBlockState_(b);b.loadExtraState?b.loadExtraState(JSON.parse(a||"{}")):b.domToMutation&&b.domToMutation((0,$.module$exports$Blockly$Xml.textToDom)(a||"<mutation/>"));(0,module$exports$Blockly$Events$utils.fire)(new module$exports$Blockly$Events$BlockChange.BlockChange(b,"mutation",null,c,a));break;default:console.warn("Unknown change type: "+this.element)}else console.warn("Can't change non-existent block: "+
298
298
  this.blockId)};module$exports$Blockly$Events$BlockChange.BlockChange.getExtraBlockState_=function(a){return a.saveExtraState?(a=a.saveExtraState())?JSON.stringify(a):"":a.mutationToDom?(a=a.mutationToDom())?(0,$.module$exports$Blockly$Xml.domToText)(a):"":""};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.CHANGE,module$exports$Blockly$Events$BlockChange.BlockChange);var module$exports$Blockly$Events$BlockCreate={BlockCreate:function(a){module$exports$Blockly$Events$BlockCreate.BlockCreate.superClass_.constructor.call(this,a);a&&(a.isShadow()&&(this.recordUndo=!1),this.xml=(0,$.module$exports$Blockly$Xml.blockToDomWithXY)(a),this.ids=(0,module$exports$Blockly$Events$utils.getDescendantIds)(a),this.json=$.Blockly.serialization.blocks.save(a,{addCoordinates:!0}))}};
299
- (0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockCreate.BlockCreate,module$exports$Blockly$Events$BlockBase.BlockBase);module$exports$Blockly$Events$BlockCreate.BlockCreate.prototype.type=module$exports$Blockly$Events$utils.CREATE;
299
+ (0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockCreate.BlockCreate,module$exports$Blockly$Events$BlockBase.BlockBase);module$exports$Blockly$Events$BlockCreate.BlockCreate.prototype.type=module$exports$Blockly$Events$utils.CREATE;
300
300
  module$exports$Blockly$Events$BlockCreate.BlockCreate.prototype.toJson=function(){var a=module$exports$Blockly$Events$BlockCreate.BlockCreate.superClass_.toJson.call(this);a.xml=(0,$.module$exports$Blockly$Xml.domToText)(this.xml);a.ids=this.ids;a.json=this.json;this.recordUndo||(a.recordUndo=this.recordUndo);return a};
301
301
  module$exports$Blockly$Events$BlockCreate.BlockCreate.prototype.fromJson=function(a){module$exports$Blockly$Events$BlockCreate.BlockCreate.superClass_.fromJson.call(this,a);this.xml=(0,$.module$exports$Blockly$Xml.textToDom)(a.xml);this.ids=a.ids;this.json=a.json;void 0!==a.recordUndo&&(this.recordUndo=a.recordUndo)};
302
302
  module$exports$Blockly$Events$BlockCreate.BlockCreate.prototype.run=function(a){var b=this.getEventWorkspace_();if(a)$.Blockly.serialization.blocks.append(this.json,b);else for(a=0;a<this.ids.length;a++){var c=this.ids[a],d=b.getBlockById(c);d?d.dispose(!1):c===this.blockId&&console.warn("Can't uncreate non-existent block: "+c)}};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.CREATE,module$exports$Blockly$Events$BlockCreate.BlockCreate);var module$exports$Blockly$Events$BlockDelete={BlockDelete:function(a){module$exports$Blockly$Events$BlockDelete.BlockDelete.superClass_.constructor.call(this,a);if(a){if(a.getParent())throw Error("Connected blocks cannot be deleted.");a.isShadow()&&(this.recordUndo=!1);this.oldXml=(0,$.module$exports$Blockly$Xml.blockToDomWithXY)(a);this.ids=(0,module$exports$Blockly$Events$utils.getDescendantIds)(a);this.wasShadow=a.isShadow();this.oldJson=$.Blockly.serialization.blocks.save(a,{addCoordinates:!0})}}};
303
- (0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockDelete.BlockDelete,module$exports$Blockly$Events$BlockBase.BlockBase);module$exports$Blockly$Events$BlockDelete.BlockDelete.prototype.type=module$exports$Blockly$Events$utils.DELETE;
303
+ (0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockDelete.BlockDelete,module$exports$Blockly$Events$BlockBase.BlockBase);module$exports$Blockly$Events$BlockDelete.BlockDelete.prototype.type=module$exports$Blockly$Events$utils.DELETE;
304
304
  module$exports$Blockly$Events$BlockDelete.BlockDelete.prototype.toJson=function(){var a=module$exports$Blockly$Events$BlockDelete.BlockDelete.superClass_.toJson.call(this);a.oldXml=(0,$.module$exports$Blockly$Xml.domToText)(this.oldXml);a.ids=this.ids;a.wasShadow=this.wasShadow;a.oldJson=this.oldJson;this.recordUndo||(a.recordUndo=this.recordUndo);return a};
305
305
  module$exports$Blockly$Events$BlockDelete.BlockDelete.prototype.fromJson=function(a){module$exports$Blockly$Events$BlockDelete.BlockDelete.superClass_.fromJson.call(this,a);this.oldXml=(0,$.module$exports$Blockly$Xml.textToDom)(a.oldXml);this.ids=a.ids;this.wasShadow=a.wasShadow||"shadow"===this.oldXml.tagName.toLowerCase();this.oldJson=a.oldJson;void 0!==a.recordUndo&&(this.recordUndo=a.recordUndo)};
306
- module$exports$Blockly$Events$BlockDelete.BlockDelete.prototype.run=function(a){var b=this.getEventWorkspace_();if(a)for(a=0;a<this.ids.length;a++){var c=this.ids[a],d=b.getBlockById(c);d?d.dispose(!1):c===this.blockId&&console.warn("Can't delete non-existent block: "+c)}else $.Blockly.serialization.blocks.append(this.oldJson,b)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.DELETE,module$exports$Blockly$Events$BlockDelete.BlockDelete);var module$exports$Blockly$Events$UiBase={UiBase:function(a){module$exports$Blockly$Events$UiBase.UiBase.superClass_.constructor.call(this);this.isBlank="undefined"===typeof a;this.workspaceId=a?a:"";this.recordUndo=!1}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$UiBase.UiBase,module$exports$Blockly$Events$Abstract);module$exports$Blockly$Events$UiBase.UiBase.prototype.isUiEvent=!0;var module$exports$Blockly$Events$BlockDrag={BlockDrag:function(a,b,c){module$exports$Blockly$Events$BlockDrag.BlockDrag.superClass_.constructor.call(this,a?a.workspace.id:void 0);this.blockId=a?a.id:null;this.isStart=b;this.blocks=c}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockDrag.BlockDrag,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$BlockDrag.BlockDrag.prototype.type=module$exports$Blockly$Events$utils.BLOCK_DRAG;
306
+ module$exports$Blockly$Events$BlockDelete.BlockDelete.prototype.run=function(a){var b=this.getEventWorkspace_();if(a)for(a=0;a<this.ids.length;a++){var c=this.ids[a],d=b.getBlockById(c);d?d.dispose(!1):c===this.blockId&&console.warn("Can't delete non-existent block: "+c)}else $.Blockly.serialization.blocks.append(this.oldJson,b)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.DELETE,module$exports$Blockly$Events$BlockDelete.BlockDelete);var module$exports$Blockly$Events$UiBase={UiBase:function(a){module$exports$Blockly$Events$UiBase.UiBase.superClass_.constructor.call(this);this.isBlank="undefined"===typeof a;this.workspaceId=a?a:"";this.recordUndo=!1}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$UiBase.UiBase,module$exports$Blockly$Events$Abstract);module$exports$Blockly$Events$UiBase.UiBase.prototype.isUiEvent=!0;var module$exports$Blockly$Events$BlockDrag={BlockDrag:function(a,b,c){module$exports$Blockly$Events$BlockDrag.BlockDrag.superClass_.constructor.call(this,a?a.workspace.id:void 0);this.blockId=a?a.id:null;this.isStart=b;this.blocks=c}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BlockDrag.BlockDrag,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$BlockDrag.BlockDrag.prototype.type=module$exports$Blockly$Events$utils.BLOCK_DRAG;
307
307
  module$exports$Blockly$Events$BlockDrag.BlockDrag.prototype.toJson=function(){var a=module$exports$Blockly$Events$BlockDrag.BlockDrag.superClass_.toJson.call(this);a.isStart=this.isStart;a.blockId=this.blockId;a.blocks=this.blocks;return a};module$exports$Blockly$Events$BlockDrag.BlockDrag.prototype.fromJson=function(a){module$exports$Blockly$Events$BlockDrag.BlockDrag.superClass_.fromJson.call(this,a);this.isStart=a.isStart;this.blockId=a.blockId;this.blocks=a.blocks};
308
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.BLOCK_DRAG,module$exports$Blockly$Events$BlockDrag.BlockDrag);var module$exports$Blockly$Events$BubbleOpen={BubbleOpen:function(a,b,c){module$exports$Blockly$Events$BubbleOpen.BubbleOpen.superClass_.constructor.call(this,a?a.workspace.id:void 0);this.blockId=a?a.id:null;this.isOpen=b;this.bubbleType=c}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BubbleOpen.BubbleOpen,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$BubbleOpen.BubbleOpen.prototype.type=module$exports$Blockly$Events$utils.BUBBLE_OPEN;
308
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.BLOCK_DRAG,module$exports$Blockly$Events$BlockDrag.BlockDrag);var module$exports$Blockly$Events$BubbleOpen={BubbleOpen:function(a,b,c){module$exports$Blockly$Events$BubbleOpen.BubbleOpen.superClass_.constructor.call(this,a?a.workspace.id:void 0);this.blockId=a?a.id:null;this.isOpen=b;this.bubbleType=c}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$BubbleOpen.BubbleOpen,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$BubbleOpen.BubbleOpen.prototype.type=module$exports$Blockly$Events$utils.BUBBLE_OPEN;
309
309
  module$exports$Blockly$Events$BubbleOpen.BubbleOpen.prototype.toJson=function(){var a=module$exports$Blockly$Events$BubbleOpen.BubbleOpen.superClass_.toJson.call(this);a.isOpen=this.isOpen;a.bubbleType=this.bubbleType;a.blockId=this.blockId;return a};module$exports$Blockly$Events$BubbleOpen.BubbleOpen.prototype.fromJson=function(a){module$exports$Blockly$Events$BubbleOpen.BubbleOpen.superClass_.fromJson.call(this,a);this.isOpen=a.isOpen;this.bubbleType=a.bubbleType;this.blockId=a.blockId};
310
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.BUBBLE_OPEN,module$exports$Blockly$Events$BubbleOpen.BubbleOpen);var module$exports$Blockly$Events$Click={Click:function(a,b,c){module$exports$Blockly$Events$Click.Click.superClass_.constructor.call(this,a?a.workspace.id:b);this.blockId=a?a.id:null;this.targetType=c}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$Click.Click,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$Click.Click.prototype.type=module$exports$Blockly$Events$utils.CLICK;
310
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.BUBBLE_OPEN,module$exports$Blockly$Events$BubbleOpen.BubbleOpen);var module$exports$Blockly$Events$Click={Click:function(a,b,c){module$exports$Blockly$Events$Click.Click.superClass_.constructor.call(this,a?a.workspace.id:b);this.blockId=a?a.id:null;this.targetType=c}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$Click.Click,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$Click.Click.prototype.type=module$exports$Blockly$Events$utils.CLICK;
311
311
  module$exports$Blockly$Events$Click.Click.prototype.toJson=function(){var a=module$exports$Blockly$Events$Click.Click.superClass_.toJson.call(this);a.targetType=this.targetType;this.blockId&&(a.blockId=this.blockId);return a};module$exports$Blockly$Events$Click.Click.prototype.fromJson=function(a){module$exports$Blockly$Events$Click.Click.superClass_.fromJson.call(this,a);this.targetType=a.targetType;this.blockId=a.blockId};
312
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.CLICK,module$exports$Blockly$Events$Click.Click);var module$exports$Blockly$Events$CommentBase={CommentBase:function(a){this.commentId=(this.isBlank="undefined"===typeof a)?"":a.id;this.workspaceId=this.isBlank?"":a.workspace.id;this.group=(0,module$exports$Blockly$Events$utils.getGroup)();this.recordUndo=(0,module$exports$Blockly$Events$utils.getRecordUndo)()}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$CommentBase.CommentBase,module$exports$Blockly$Events$Abstract);
312
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.CLICK,module$exports$Blockly$Events$Click.Click);var module$exports$Blockly$Events$CommentBase={CommentBase:function(a){this.commentId=(this.isBlank="undefined"===typeof a)?"":a.id;this.workspaceId=this.isBlank?"":a.workspace.id;this.group=(0,module$exports$Blockly$Events$utils.getGroup)();this.recordUndo=(0,module$exports$Blockly$Events$utils.getRecordUndo)()}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$CommentBase.CommentBase,module$exports$Blockly$Events$Abstract);
313
313
  module$exports$Blockly$Events$CommentBase.CommentBase.prototype.toJson=function(){var a=module$exports$Blockly$Events$CommentBase.CommentBase.superClass_.toJson.call(this);this.commentId&&(a.commentId=this.commentId);return a};module$exports$Blockly$Events$CommentBase.CommentBase.prototype.fromJson=function(a){module$exports$Blockly$Events$CommentBase.CommentBase.superClass_.fromJson.call(this,a);this.commentId=a.commentId};
314
- module$exports$Blockly$Events$CommentBase.CommentBase.CommentCreateDeleteHelper=function(a,b){var c=a.getEventWorkspace_();b?(b=(0,$.module$exports$Blockly$utils$xml.createElement)("xml"),b.appendChild(a.xml),(0,$.module$exports$Blockly$Xml.domToWorkspace)(b,c)):(c=c.getCommentById(a.commentId))?c.dispose():console.warn("Can't uncreate non-existent comment: "+a.commentId)};var module$exports$Blockly$Events$CommentChange={CommentChange:function(a,b,c){module$exports$Blockly$Events$CommentChange.CommentChange.superClass_.constructor.call(this,a);a&&(this.oldContents_="undefined"===typeof b?"":b,this.newContents_="undefined"===typeof c?"":c)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$CommentChange.CommentChange,module$exports$Blockly$Events$CommentBase.CommentBase);
314
+ module$exports$Blockly$Events$CommentBase.CommentBase.CommentCreateDeleteHelper=function(a,b){var c=a.getEventWorkspace_();b?(b=(0,$.module$exports$Blockly$utils$xml.createElement)("xml"),b.appendChild(a.xml),(0,$.module$exports$Blockly$Xml.domToWorkspace)(b,c)):(c=c.getCommentById(a.commentId))?c.dispose():console.warn("Can't uncreate non-existent comment: "+a.commentId)};var module$exports$Blockly$Events$CommentChange={CommentChange:function(a,b,c){module$exports$Blockly$Events$CommentChange.CommentChange.superClass_.constructor.call(this,a);a&&(this.oldContents_="undefined"===typeof b?"":b,this.newContents_="undefined"===typeof c?"":c)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$CommentChange.CommentChange,module$exports$Blockly$Events$CommentBase.CommentBase);
315
315
  module$exports$Blockly$Events$CommentChange.CommentChange.prototype.type=module$exports$Blockly$Events$utils.COMMENT_CHANGE;module$exports$Blockly$Events$CommentChange.CommentChange.prototype.toJson=function(){var a=module$exports$Blockly$Events$CommentChange.CommentChange.superClass_.toJson.call(this);a.oldContents=this.oldContents_;a.newContents=this.newContents_;return a};
316
316
  module$exports$Blockly$Events$CommentChange.CommentChange.prototype.fromJson=function(a){module$exports$Blockly$Events$CommentChange.CommentChange.superClass_.fromJson.call(this,a);this.oldContents_=a.oldContents;this.newContents_=a.newContents};module$exports$Blockly$Events$CommentChange.CommentChange.prototype.isNull=function(){return this.oldContents_===this.newContents_};
317
- module$exports$Blockly$Events$CommentChange.CommentChange.prototype.run=function(a){var b=this.getEventWorkspace_().getCommentById(this.commentId);b?b.setContent(a?this.newContents_:this.oldContents_):console.warn("Can't change non-existent comment: "+this.commentId)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.COMMENT_CHANGE,module$exports$Blockly$Events$CommentChange.CommentChange);var module$exports$Blockly$Events$CommentCreate={CommentCreate:function(a){module$exports$Blockly$Events$CommentCreate.CommentCreate.superClass_.constructor.call(this,a);a&&(this.xml=a.toXmlWithXY())}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$CommentCreate.CommentCreate,module$exports$Blockly$Events$CommentBase.CommentBase);module$exports$Blockly$Events$CommentCreate.CommentCreate.prototype.type=module$exports$Blockly$Events$utils.COMMENT_CREATE;
317
+ module$exports$Blockly$Events$CommentChange.CommentChange.prototype.run=function(a){var b=this.getEventWorkspace_().getCommentById(this.commentId);b?b.setContent(a?this.newContents_:this.oldContents_):console.warn("Can't change non-existent comment: "+this.commentId)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.COMMENT_CHANGE,module$exports$Blockly$Events$CommentChange.CommentChange);var module$exports$Blockly$Events$CommentCreate={CommentCreate:function(a){module$exports$Blockly$Events$CommentCreate.CommentCreate.superClass_.constructor.call(this,a);a&&(this.xml=a.toXmlWithXY())}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$CommentCreate.CommentCreate,module$exports$Blockly$Events$CommentBase.CommentBase);module$exports$Blockly$Events$CommentCreate.CommentCreate.prototype.type=module$exports$Blockly$Events$utils.COMMENT_CREATE;
318
318
  module$exports$Blockly$Events$CommentCreate.CommentCreate.prototype.toJson=function(){var a=module$exports$Blockly$Events$CommentCreate.CommentCreate.superClass_.toJson.call(this);a.xml=(0,$.module$exports$Blockly$Xml.domToText)(this.xml);return a};module$exports$Blockly$Events$CommentCreate.CommentCreate.prototype.fromJson=function(a){module$exports$Blockly$Events$CommentCreate.CommentCreate.superClass_.fromJson.call(this,a);this.xml=(0,$.module$exports$Blockly$Xml.textToDom)(a.xml)};
319
- module$exports$Blockly$Events$CommentCreate.CommentCreate.prototype.run=function(a){module$exports$Blockly$Events$CommentBase.CommentBase.CommentCreateDeleteHelper(this,a)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.COMMENT_CREATE,module$exports$Blockly$Events$CommentCreate.CommentCreate);var module$exports$Blockly$Events$CommentDelete={CommentDelete:function(a){module$exports$Blockly$Events$CommentDelete.CommentDelete.superClass_.constructor.call(this,a);a&&(this.xml=a.toXmlWithXY())}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$CommentDelete.CommentDelete,module$exports$Blockly$Events$CommentBase.CommentBase);module$exports$Blockly$Events$CommentDelete.CommentDelete.prototype.type=module$exports$Blockly$Events$utils.COMMENT_DELETE;
319
+ module$exports$Blockly$Events$CommentCreate.CommentCreate.prototype.run=function(a){module$exports$Blockly$Events$CommentBase.CommentBase.CommentCreateDeleteHelper(this,a)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.COMMENT_CREATE,module$exports$Blockly$Events$CommentCreate.CommentCreate);var module$exports$Blockly$Events$CommentDelete={CommentDelete:function(a){module$exports$Blockly$Events$CommentDelete.CommentDelete.superClass_.constructor.call(this,a);a&&(this.xml=a.toXmlWithXY())}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$CommentDelete.CommentDelete,module$exports$Blockly$Events$CommentBase.CommentBase);module$exports$Blockly$Events$CommentDelete.CommentDelete.prototype.type=module$exports$Blockly$Events$utils.COMMENT_DELETE;
320
320
  module$exports$Blockly$Events$CommentDelete.CommentDelete.prototype.toJson=function(){return module$exports$Blockly$Events$CommentDelete.CommentDelete.superClass_.toJson.call(this)};module$exports$Blockly$Events$CommentDelete.CommentDelete.prototype.fromJson=function(a){module$exports$Blockly$Events$CommentDelete.CommentDelete.superClass_.fromJson.call(this,a)};
321
- module$exports$Blockly$Events$CommentDelete.CommentDelete.prototype.run=function(a){module$exports$Blockly$Events$CommentBase.CommentBase.CommentCreateDeleteHelper(this,!a)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.COMMENT_DELETE,module$exports$Blockly$Events$CommentDelete.CommentDelete);var module$exports$Blockly$Events$CommentMove={CommentMove:function(a){module$exports$Blockly$Events$CommentMove.CommentMove.superClass_.constructor.call(this,a);a&&(this.comment_=a,this.oldCoordinate_=a.getXY(),this.newCoordinate_=null)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$CommentMove.CommentMove,module$exports$Blockly$Events$CommentBase.CommentBase);
321
+ module$exports$Blockly$Events$CommentDelete.CommentDelete.prototype.run=function(a){module$exports$Blockly$Events$CommentBase.CommentBase.CommentCreateDeleteHelper(this,!a)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.COMMENT_DELETE,module$exports$Blockly$Events$CommentDelete.CommentDelete);var module$exports$Blockly$Events$CommentMove={CommentMove:function(a){module$exports$Blockly$Events$CommentMove.CommentMove.superClass_.constructor.call(this,a);a&&(this.comment_=a,this.oldCoordinate_=a.getXY(),this.newCoordinate_=null)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$CommentMove.CommentMove,module$exports$Blockly$Events$CommentBase.CommentBase);
322
322
  module$exports$Blockly$Events$CommentMove.CommentMove.prototype.recordNew=function(){if(!this.comment_)throw Error("Tried to record the new position of a comment on the same event twice.");this.newCoordinate_=this.comment_.getXY();this.comment_=null};module$exports$Blockly$Events$CommentMove.CommentMove.prototype.type=module$exports$Blockly$Events$utils.COMMENT_MOVE;module$exports$Blockly$Events$CommentMove.CommentMove.prototype.setOldCoordinate=function(a){this.oldCoordinate_=a};
323
323
  module$exports$Blockly$Events$CommentMove.CommentMove.prototype.toJson=function(){var a=module$exports$Blockly$Events$CommentMove.CommentMove.superClass_.toJson.call(this);this.oldCoordinate_&&(a.oldCoordinate=Math.round(this.oldCoordinate_.x)+","+Math.round(this.oldCoordinate_.y));this.newCoordinate_&&(a.newCoordinate=Math.round(this.newCoordinate_.x)+","+Math.round(this.newCoordinate_.y));return a};
324
324
  module$exports$Blockly$Events$CommentMove.CommentMove.prototype.fromJson=function(a){module$exports$Blockly$Events$CommentMove.CommentMove.superClass_.fromJson.call(this,a);if(a.oldCoordinate){var b=a.oldCoordinate.split(",");this.oldCoordinate_=new module$exports$Blockly$utils$Coordinate.Coordinate(Number(b[0]),Number(b[1]))}a.newCoordinate&&(a=a.newCoordinate.split(","),this.newCoordinate_=new module$exports$Blockly$utils$Coordinate.Coordinate(Number(a[0]),Number(a[1])))};
325
325
  module$exports$Blockly$Events$CommentMove.CommentMove.prototype.isNull=function(){return module$exports$Blockly$utils$Coordinate.Coordinate.equals(this.oldCoordinate_,this.newCoordinate_)};module$exports$Blockly$Events$CommentMove.CommentMove.prototype.run=function(a){var b=this.getEventWorkspace_().getCommentById(this.commentId);if(b){a=a?this.newCoordinate_:this.oldCoordinate_;var c=b.getXY();b.moveBy(a.x-c.x,a.y-c.y)}else console.warn("Can't move non-existent comment: "+this.commentId)};
326
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.COMMENT_MOVE,module$exports$Blockly$Events$CommentMove.CommentMove);var module$exports$Blockly$Events$FinishedLoading={FinishedLoading:function(a){this.isBlank="undefined"===typeof a;this.workspaceId=a?a.id:"";this.group=(0,module$exports$Blockly$Events$utils.getGroup)();this.recordUndo=!1}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$FinishedLoading.FinishedLoading,module$exports$Blockly$Events$Abstract);module$exports$Blockly$Events$FinishedLoading.FinishedLoading.prototype.type=module$exports$Blockly$Events$utils.FINISHED_LOADING;
326
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.COMMENT_MOVE,module$exports$Blockly$Events$CommentMove.CommentMove);var module$exports$Blockly$Events$FinishedLoading={FinishedLoading:function(a){this.isBlank="undefined"===typeof a;this.workspaceId=a?a.id:"";this.group=(0,module$exports$Blockly$Events$utils.getGroup)();this.recordUndo=!1}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$FinishedLoading.FinishedLoading,module$exports$Blockly$Events$Abstract);module$exports$Blockly$Events$FinishedLoading.FinishedLoading.prototype.type=module$exports$Blockly$Events$utils.FINISHED_LOADING;
327
327
  module$exports$Blockly$Events$FinishedLoading.FinishedLoading.prototype.toJson=function(){var a={type:this.type};this.group&&(a.group=this.group);this.workspaceId&&(a.workspaceId=this.workspaceId);return a};module$exports$Blockly$Events$FinishedLoading.FinishedLoading.prototype.fromJson=function(a){this.isBlank=!1;this.workspaceId=a.workspaceId;this.group=a.group};
328
328
  (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.FINISHED_LOADING,module$exports$Blockly$Events$FinishedLoading.FinishedLoading);var module$exports$Blockly$ASTNode={ASTNode:function(a,b,c){if(!b)throw Error("Cannot create a node without a location.");this.type_=a;this.isConnection_=module$exports$Blockly$ASTNode.ASTNode.isConnectionType_(a);this.location_=b;this.wsCoordinate_=null;this.processParams_(c||null)}};module$exports$Blockly$ASTNode.ASTNode.types={FIELD:"field",BLOCK:"block",INPUT:"input",OUTPUT:"output",NEXT:"next",PREVIOUS:"previous",STACK:"stack",WORKSPACE:"workspace"};
329
329
  module$exports$Blockly$ASTNode.ASTNode.NAVIGATE_ALL_FIELDS=!1;module$exports$Blockly$ASTNode.ASTNode.DEFAULT_OFFSET_Y=-20;module$exports$Blockly$ASTNode.ASTNode.isConnectionType_=function(a){switch(a){case module$exports$Blockly$ASTNode.ASTNode.types.PREVIOUS:case module$exports$Blockly$ASTNode.ASTNode.types.NEXT:case module$exports$Blockly$ASTNode.ASTNode.types.INPUT:case module$exports$Blockly$ASTNode.ASTNode.types.OUTPUT:return!0}return!1};
@@ -351,19 +351,19 @@ module$exports$Blockly$ASTNode.ASTNode.prototype.prev=function(){switch(this.typ
351
351
  case module$exports$Blockly$ASTNode.ASTNode.types.PREVIOUS:if((a=this.location_.targetConnection)&&!a.getParentInput())return module$exports$Blockly$ASTNode.ASTNode.createConnectionNode(a);break;case module$exports$Blockly$ASTNode.ASTNode.types.NEXT:return module$exports$Blockly$ASTNode.ASTNode.createBlockNode(this.location_.getSourceBlock())}return null};
352
352
  module$exports$Blockly$ASTNode.ASTNode.prototype.out=function(){switch(this.type_){case module$exports$Blockly$ASTNode.ASTNode.types.STACK:var a=this.location_,b=a.getRelativeToSurfaceXY();b=new module$exports$Blockly$utils$Coordinate.Coordinate(b.x,b.y+module$exports$Blockly$ASTNode.ASTNode.DEFAULT_OFFSET_Y);return module$exports$Blockly$ASTNode.ASTNode.createWorkspaceNode(a.workspace,b);case module$exports$Blockly$ASTNode.ASTNode.types.OUTPUT:return a=this.location_,(b=a.targetConnection)?module$exports$Blockly$ASTNode.ASTNode.createConnectionNode(b):
353
353
  module$exports$Blockly$ASTNode.ASTNode.createStackNode(a.getSourceBlock());case module$exports$Blockly$ASTNode.ASTNode.types.FIELD:return module$exports$Blockly$ASTNode.ASTNode.createBlockNode(this.location_.getSourceBlock());case module$exports$Blockly$ASTNode.ASTNode.types.INPUT:return module$exports$Blockly$ASTNode.ASTNode.createBlockNode(this.location_.getSourceBlock());case module$exports$Blockly$ASTNode.ASTNode.types.BLOCK:return this.getOutAstNodeForBlock_(this.location_);case module$exports$Blockly$ASTNode.ASTNode.types.PREVIOUS:return this.getOutAstNodeForBlock_(this.location_.getSourceBlock());
354
- case module$exports$Blockly$ASTNode.ASTNode.types.NEXT:return this.getOutAstNodeForBlock_(this.location_.getSourceBlock())}return null};var module$exports$Blockly$Events$MarkerMove={MarkerMove:function(a,b,c,d){var e=a?a.workspace.id:void 0;d&&d.getType()===module$exports$Blockly$ASTNode.ASTNode.types.WORKSPACE&&(e=d.getLocation().id);module$exports$Blockly$Events$MarkerMove.MarkerMove.superClass_.constructor.call(this,e);this.blockId=a?a.id:null;this.oldNode=c;this.newNode=d;this.isCursor=b}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$MarkerMove.MarkerMove,module$exports$Blockly$Events$UiBase.UiBase);
354
+ case module$exports$Blockly$ASTNode.ASTNode.types.NEXT:return this.getOutAstNodeForBlock_(this.location_.getSourceBlock())}return null};var module$exports$Blockly$Events$MarkerMove={MarkerMove:function(a,b,c,d){var e=a?a.workspace.id:void 0;d&&d.getType()===module$exports$Blockly$ASTNode.ASTNode.types.WORKSPACE&&(e=d.getLocation().id);module$exports$Blockly$Events$MarkerMove.MarkerMove.superClass_.constructor.call(this,e);this.blockId=a?a.id:null;this.oldNode=c;this.newNode=d;this.isCursor=b}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$MarkerMove.MarkerMove,module$exports$Blockly$Events$UiBase.UiBase);
355
355
  module$exports$Blockly$Events$MarkerMove.MarkerMove.prototype.type=module$exports$Blockly$Events$utils.MARKER_MOVE;module$exports$Blockly$Events$MarkerMove.MarkerMove.prototype.toJson=function(){var a=module$exports$Blockly$Events$MarkerMove.MarkerMove.superClass_.toJson.call(this);a.isCursor=this.isCursor;a.blockId=this.blockId;a.oldNode=this.oldNode;a.newNode=this.newNode;return a};
356
- module$exports$Blockly$Events$MarkerMove.MarkerMove.prototype.fromJson=function(a){module$exports$Blockly$Events$MarkerMove.MarkerMove.superClass_.fromJson.call(this,a);this.isCursor=a.isCursor;this.blockId=a.blockId;this.oldNode=a.oldNode;this.newNode=a.newNode};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.MARKER_MOVE,module$exports$Blockly$Events$MarkerMove.MarkerMove);var module$exports$Blockly$Events$Selected={Selected:function(a,b,c){module$exports$Blockly$Events$Selected.Selected.superClass_.constructor.call(this,c);this.oldElementId=a;this.newElementId=b}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$Selected.Selected,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$Selected.Selected.prototype.type=module$exports$Blockly$Events$utils.SELECTED;
356
+ module$exports$Blockly$Events$MarkerMove.MarkerMove.prototype.fromJson=function(a){module$exports$Blockly$Events$MarkerMove.MarkerMove.superClass_.fromJson.call(this,a);this.isCursor=a.isCursor;this.blockId=a.blockId;this.oldNode=a.oldNode;this.newNode=a.newNode};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.MARKER_MOVE,module$exports$Blockly$Events$MarkerMove.MarkerMove);var module$exports$Blockly$Events$Selected={Selected:function(a,b,c){module$exports$Blockly$Events$Selected.Selected.superClass_.constructor.call(this,c);this.oldElementId=a;this.newElementId=b}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$Selected.Selected,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$Selected.Selected.prototype.type=module$exports$Blockly$Events$utils.SELECTED;
357
357
  module$exports$Blockly$Events$Selected.Selected.prototype.toJson=function(){var a=module$exports$Blockly$Events$Selected.Selected.superClass_.toJson.call(this);a.oldElementId=this.oldElementId;a.newElementId=this.newElementId;return a};module$exports$Blockly$Events$Selected.Selected.prototype.fromJson=function(a){module$exports$Blockly$Events$Selected.Selected.superClass_.fromJson.call(this,a);this.oldElementId=a.oldElementId;this.newElementId=a.newElementId};
358
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.SELECTED,module$exports$Blockly$Events$Selected.Selected);var module$exports$Blockly$Events$ThemeChange={ThemeChange:function(a,b){module$exports$Blockly$Events$ThemeChange.ThemeChange.superClass_.constructor.call(this,b);this.themeName=a}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$ThemeChange.ThemeChange,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$ThemeChange.ThemeChange.prototype.type=module$exports$Blockly$Events$utils.THEME_CHANGE;
358
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.SELECTED,module$exports$Blockly$Events$Selected.Selected);var module$exports$Blockly$Events$ThemeChange={ThemeChange:function(a,b){module$exports$Blockly$Events$ThemeChange.ThemeChange.superClass_.constructor.call(this,b);this.themeName=a}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$ThemeChange.ThemeChange,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$ThemeChange.ThemeChange.prototype.type=module$exports$Blockly$Events$utils.THEME_CHANGE;
359
359
  module$exports$Blockly$Events$ThemeChange.ThemeChange.prototype.toJson=function(){var a=module$exports$Blockly$Events$ThemeChange.ThemeChange.superClass_.toJson.call(this);a.themeName=this.themeName;return a};module$exports$Blockly$Events$ThemeChange.ThemeChange.prototype.fromJson=function(a){module$exports$Blockly$Events$ThemeChange.ThemeChange.superClass_.fromJson.call(this,a);this.themeName=a.themeName};
360
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.THEME_CHANGE,module$exports$Blockly$Events$ThemeChange.ThemeChange);var module$exports$Blockly$Events$ToolboxItemSelect={ToolboxItemSelect:function(a,b,c){module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect.superClass_.constructor.call(this,c);this.oldItem=a;this.newItem=b}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect.prototype.type=module$exports$Blockly$Events$utils.TOOLBOX_ITEM_SELECT;
360
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.THEME_CHANGE,module$exports$Blockly$Events$ThemeChange.ThemeChange);var module$exports$Blockly$Events$ToolboxItemSelect={ToolboxItemSelect:function(a,b,c){module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect.superClass_.constructor.call(this,c);this.oldItem=a;this.newItem=b}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect.prototype.type=module$exports$Blockly$Events$utils.TOOLBOX_ITEM_SELECT;
361
361
  module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect.prototype.toJson=function(){var a=module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect.superClass_.toJson.call(this);a.oldItem=this.oldItem;a.newItem=this.newItem;return a};module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect.prototype.fromJson=function(a){module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect.superClass_.fromJson.call(this,a);this.oldItem=a.oldItem;this.newItem=a.newItem};
362
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.TOOLBOX_ITEM_SELECT,module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect);var module$exports$Blockly$Events$TrashcanOpen={TrashcanOpen:function(a,b){module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen.superClass_.constructor.call(this,b);this.isOpen=a}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen.prototype.type=module$exports$Blockly$Events$utils.TRASHCAN_OPEN;
362
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.TOOLBOX_ITEM_SELECT,module$exports$Blockly$Events$ToolboxItemSelect.ToolboxItemSelect);var module$exports$Blockly$Events$TrashcanOpen={TrashcanOpen:function(a,b){module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen.superClass_.constructor.call(this,b);this.isOpen=a}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen.prototype.type=module$exports$Blockly$Events$utils.TRASHCAN_OPEN;
363
363
  module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen.prototype.toJson=function(){var a=module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen.superClass_.toJson.call(this);a.isOpen=this.isOpen;return a};module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen.prototype.fromJson=function(a){module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen.superClass_.fromJson.call(this,a);this.isOpen=a.isOpen};
364
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.TRASHCAN_OPEN,module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen);var module$exports$Blockly$Events$Ui={Ui:function(a,b,c,d){module$exports$Blockly$Events$Ui.Ui.superClass_.constructor.call(this,a?a.workspace.id:void 0);this.blockId=a?a.id:null;this.element="undefined"===typeof b?"":b;this.oldValue="undefined"===typeof c?"":c;this.newValue="undefined"===typeof d?"":d}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$Ui.Ui,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$Ui.Ui.prototype.type=module$exports$Blockly$Events$utils.UI;
364
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.TRASHCAN_OPEN,module$exports$Blockly$Events$TrashcanOpen.TrashcanOpen);var module$exports$Blockly$Events$Ui={Ui:function(a,b,c,d){module$exports$Blockly$Events$Ui.Ui.superClass_.constructor.call(this,a?a.workspace.id:void 0);this.blockId=a?a.id:null;this.element="undefined"===typeof b?"":b;this.oldValue="undefined"===typeof c?"":c;this.newValue="undefined"===typeof d?"":d}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$Ui.Ui,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$Ui.Ui.prototype.type=module$exports$Blockly$Events$utils.UI;
365
365
  module$exports$Blockly$Events$Ui.Ui.prototype.toJson=function(){var a=module$exports$Blockly$Events$Ui.Ui.superClass_.toJson.call(this);a.element=this.element;void 0!==this.newValue&&(a.newValue=this.newValue);this.blockId&&(a.blockId=this.blockId);return a};module$exports$Blockly$Events$Ui.Ui.prototype.fromJson=function(a){module$exports$Blockly$Events$Ui.Ui.superClass_.fromJson.call(this,a);this.element=a.element;this.newValue=a.newValue;this.blockId=a.blockId};
366
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.UI,module$exports$Blockly$Events$Ui.Ui);var module$exports$Blockly$Events$ViewportChange={ViewportChange:function(a,b,c,d,e){module$exports$Blockly$Events$ViewportChange.ViewportChange.superClass_.constructor.call(this,d);this.viewTop=a;this.viewLeft=b;this.scale=c;this.oldScale=e}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$ViewportChange.ViewportChange,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$ViewportChange.ViewportChange.prototype.type=module$exports$Blockly$Events$utils.VIEWPORT_CHANGE;
366
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.UI,module$exports$Blockly$Events$Ui.Ui);var module$exports$Blockly$Events$ViewportChange={ViewportChange:function(a,b,c,d,e){module$exports$Blockly$Events$ViewportChange.ViewportChange.superClass_.constructor.call(this,d);this.viewTop=a;this.viewLeft=b;this.scale=c;this.oldScale=e}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Events$ViewportChange.ViewportChange,module$exports$Blockly$Events$UiBase.UiBase);module$exports$Blockly$Events$ViewportChange.ViewportChange.prototype.type=module$exports$Blockly$Events$utils.VIEWPORT_CHANGE;
367
367
  module$exports$Blockly$Events$ViewportChange.ViewportChange.prototype.toJson=function(){var a=module$exports$Blockly$Events$ViewportChange.ViewportChange.superClass_.toJson.call(this);a.viewTop=this.viewTop;a.viewLeft=this.viewLeft;a.scale=this.scale;a.oldScale=this.oldScale;return a};
368
368
  module$exports$Blockly$Events$ViewportChange.ViewportChange.prototype.fromJson=function(a){module$exports$Blockly$Events$ViewportChange.ViewportChange.superClass_.fromJson.call(this,a);this.viewTop=a.viewTop;this.viewLeft=a.viewLeft;this.scale=a.scale;this.oldScale=a.oldScale};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.EVENT,module$exports$Blockly$Events$utils.VIEWPORT_CHANGE,module$exports$Blockly$Events$ViewportChange.ViewportChange);$.module$exports$Blockly$Events={Abstract:module$exports$Blockly$Events$Abstract};$.module$exports$Blockly$Events.BubbleOpen=module$exports$Blockly$Events$BubbleOpen.BubbleOpen;$.module$exports$Blockly$Events.BlockBase=module$exports$Blockly$Events$BlockBase.BlockBase;$.module$exports$Blockly$Events.BlockChange=module$exports$Blockly$Events$BlockChange.BlockChange;$.module$exports$Blockly$Events.BlockCreate=module$exports$Blockly$Events$BlockCreate.BlockCreate;
369
369
  $.module$exports$Blockly$Events.BlockDelete=module$exports$Blockly$Events$BlockDelete.BlockDelete;$.module$exports$Blockly$Events.BlockDrag=module$exports$Blockly$Events$BlockDrag.BlockDrag;$.module$exports$Blockly$Events.BlockMove=module$exports$Blockly$Events$BlockMove.BlockMove;$.module$exports$Blockly$Events.Click=module$exports$Blockly$Events$Click.Click;$.module$exports$Blockly$Events.CommentBase=module$exports$Blockly$Events$CommentBase.CommentBase;
@@ -416,17 +416,17 @@ a[e][d])&&" "!==f)return c;return b},commonWordSuffix:function(a,b){if(!a.length
416
416
  b);return a.join("\n")}};module$contents$Blockly$utils$string_wrapLine=function(a,b){if(a.length<=b)return a;for(var c=a.trim().split(/\s+/),d=0;d<c.length;d++)c[d].length>b&&(b=c[d].length);var e=-Infinity,f=1;do{d=e;var g=a;a=[];e=c.length/f;for(var h=1,k=0;k<c.length-1;k++)h<(k+1.5)/e?(h++,a[k]=!0):a[k]=!1;a=module$contents$Blockly$utils$string_wrapMutate(c,a,b);e=module$contents$Blockly$utils$string_wrapScore(c,a,b);a=module$contents$Blockly$utils$string_wrapToText(c,a);f++}while(e>d);return g};
417
417
  module$contents$Blockly$utils$string_wrapScore=function(a,b,c){for(var d=[0],e=[],f=0;f<a.length;f++)d[d.length-1]+=a[f].length,!0===b[f]?(d.push(0),e.push(a[f].charAt(a[f].length-1))):!1===b[f]&&d[d.length-1]++;a=Math.max.apply(Math,d);for(f=b=0;f<d.length;f++)b-=2*Math.pow(Math.abs(c-d[f]),1.5),b-=Math.pow(a-d[f],1.5),-1!==".?!".indexOf(e[f])?b+=c/3:-1!==",;)]}".indexOf(e[f])&&(b+=c/4);1<d.length&&d[d.length-1]<=d[d.length-2]&&(b+=.5);return b};
418
418
  module$contents$Blockly$utils$string_wrapMutate=function(a,b,c){for(var d=module$contents$Blockly$utils$string_wrapScore(a,b,c),e,f=0;f<b.length-1;f++)if(b[f]!==b[f+1]){var g=[].concat(b);g[f]=!g[f];g[f+1]=!g[f+1];var h=module$contents$Blockly$utils$string_wrapScore(a,g,c);h>d&&(d=h,e=g)}return e?module$contents$Blockly$utils$string_wrapMutate(a,e,c):b};module$contents$Blockly$utils$string_wrapToText=function(a,b){for(var c=[],d=0;d<a.length;d++)c.push(a[d]),void 0!==b[d]&&c.push(b[d]?"\n":" ");return c.join("")};
419
- $.module$exports$Blockly$utils$string.isNumber=function(a){return/^\s*-?\d+(\.\d+)?\s*$/.test(a)};var module$exports$Blockly$Touch={};module$exports$Blockly$Touch.TOUCH_ENABLED="ontouchstart"in module$exports$Blockly$utils$global.globalThis||!!(module$exports$Blockly$utils$global.globalThis.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!module$exports$Blockly$utils$global.globalThis.navigator||!module$exports$Blockly$utils$global.globalThis.navigator.maxTouchPoints&&!module$exports$Blockly$utils$global.globalThis.navigator.msMaxTouchPoints);
419
+ $.module$exports$Blockly$utils$string.isNumber=function(a){return/^\s*-?\d+(\.\d+)?\s*$/.test(a)};var module$exports$Blockly$Touch={};module$exports$Blockly$Touch.TOUCH_ENABLED="ontouchstart"in $.module$exports$Blockly$utils$global.globalThis||!!($.module$exports$Blockly$utils$global.globalThis.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!$.module$exports$Blockly$utils$global.globalThis.navigator||!$.module$exports$Blockly$utils$global.globalThis.navigator.maxTouchPoints&&!$.module$exports$Blockly$utils$global.globalThis.navigator.msMaxTouchPoints);
420
420
  var module$contents$Blockly$Touch_touchIdentifier_=null;module$exports$Blockly$Touch.TOUCH_MAP={};
421
- module$exports$Blockly$utils$global.globalThis.PointerEvent?module$exports$Blockly$Touch.TOUCH_MAP={mousedown:["pointerdown"],mouseenter:["pointerenter"],mouseleave:["pointerleave"],mousemove:["pointermove"],mouseout:["pointerout"],mouseover:["pointerover"],mouseup:["pointerup","pointercancel"],touchend:["pointerup"],touchcancel:["pointercancel"]}:module$exports$Blockly$Touch.TOUCH_ENABLED&&(module$exports$Blockly$Touch.TOUCH_MAP={mousedown:["touchstart"],mousemove:["touchmove"],mouseup:["touchend",
421
+ $.module$exports$Blockly$utils$global.globalThis.PointerEvent?module$exports$Blockly$Touch.TOUCH_MAP={mousedown:["pointerdown"],mouseenter:["pointerenter"],mouseleave:["pointerleave"],mousemove:["pointermove"],mouseout:["pointerout"],mouseover:["pointerover"],mouseup:["pointerup","pointercancel"],touchend:["pointerup"],touchcancel:["pointercancel"]}:module$exports$Blockly$Touch.TOUCH_ENABLED&&(module$exports$Blockly$Touch.TOUCH_MAP={mousedown:["touchstart"],mousemove:["touchmove"],mouseup:["touchend",
422
422
  "touchcancel"]});var module$contents$Blockly$Touch_longPid_=0;module$exports$Blockly$Touch.longStart=function(a,b){(0,module$exports$Blockly$Touch.longStop)();a.changedTouches&&1!==a.changedTouches.length||(module$contents$Blockly$Touch_longPid_=setTimeout(function(){a.changedTouches&&(a.button=2,a.clientX=a.changedTouches[0].clientX,a.clientY=a.changedTouches[0].clientY);b&&b.handleRightClick(a)},$.module$exports$Blockly$internalConstants.LONGPRESS))};
423
423
  module$exports$Blockly$Touch.longStop=function(){module$contents$Blockly$Touch_longPid_&&(clearTimeout(module$contents$Blockly$Touch_longPid_),module$contents$Blockly$Touch_longPid_=0)};module$exports$Blockly$Touch.clearTouchIdentifier=function(){module$contents$Blockly$Touch_touchIdentifier_=null};module$exports$Blockly$Touch.shouldHandleEvent=function(a){return!(0,module$exports$Blockly$Touch.isMouseOrTouchEvent)(a)||(0,module$exports$Blockly$Touch.checkTouchIdentifier)(a)};
424
424
  module$exports$Blockly$Touch.getTouchIdentifierFromEvent=function(a){return void 0!==a.pointerId?a.pointerId:a.changedTouches&&a.changedTouches[0]&&void 0!==a.changedTouches[0].identifier&&null!==a.changedTouches[0].identifier?a.changedTouches[0].identifier:"mouse"};
425
425
  module$exports$Blockly$Touch.checkTouchIdentifier=function(a){var b=(0,module$exports$Blockly$Touch.getTouchIdentifierFromEvent)(a);return void 0!==module$contents$Blockly$Touch_touchIdentifier_&&null!==module$contents$Blockly$Touch_touchIdentifier_?module$contents$Blockly$Touch_touchIdentifier_===b:"mousedown"===a.type||"touchstart"===a.type||"pointerdown"===a.type?(module$contents$Blockly$Touch_touchIdentifier_=b,!0):!1};
426
426
  module$exports$Blockly$Touch.setClientFromTouch=function(a){if((0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"touch")){var b=a.changedTouches[0];a.clientX=b.clientX;a.clientY=b.clientY}};module$exports$Blockly$Touch.isMouseOrTouchEvent=function(a){return(0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"touch")||(0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"mouse")||(0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"pointer")};
427
427
  module$exports$Blockly$Touch.isTouchEvent=function(a){return(0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"touch")||(0,$.module$exports$Blockly$utils$string.startsWith)(a.type,"pointer")};
428
- module$exports$Blockly$Touch.splitEventByTouches=function(a){var b=[];if(a.changedTouches)for(var c=0;c<a.changedTouches.length;c++)b[c]={type:a.type,changedTouches:[a.changedTouches[c]],target:a.target,stopPropagation:function(){a.stopPropagation()},preventDefault:function(){a.preventDefault()}};else b.push(a);return b};var module$exports$Blockly$browserEvents={conditionalBind:function(a,b,c,d,e,f){var g=!1,h=function(p){var q=!e;p=(0,module$exports$Blockly$Touch.splitEventByTouches)(p);for(var r=0;r<p.length;r++){var t=p[r];if(!q||(0,module$exports$Blockly$Touch.shouldHandleEvent)(t))(0,module$exports$Blockly$Touch.setClientFromTouch)(t),c?d.call(c,t):d(t),g=!0}},k=[];if(module$exports$Blockly$utils$global.globalThis.PointerEvent&&b in module$exports$Blockly$Touch.TOUCH_MAP)for(var l=0;l<module$exports$Blockly$Touch.TOUCH_MAP[b].length;l++){var m=
429
- module$exports$Blockly$Touch.TOUCH_MAP[b][l];a.addEventListener(m,h,!1);k.push([a,m,h])}else if(a.addEventListener(b,h,!1),k.push([a,b,h]),b in module$exports$Blockly$Touch.TOUCH_MAP)for(l=function(p){h(p);var q=!f;g&&q&&p.preventDefault()},m=0;m<module$exports$Blockly$Touch.TOUCH_MAP[b].length;m++){var n=module$exports$Blockly$Touch.TOUCH_MAP[b][m];a.addEventListener(n,l,!1);k.push([a,n,l])}return k},bind:function(a,b,c,d){var e=function(l){c?d.call(c,l):d(l)},f=[];if(module$exports$Blockly$utils$global.globalThis.PointerEvent&&
428
+ module$exports$Blockly$Touch.splitEventByTouches=function(a){var b=[];if(a.changedTouches)for(var c=0;c<a.changedTouches.length;c++)b[c]={type:a.type,changedTouches:[a.changedTouches[c]],target:a.target,stopPropagation:function(){a.stopPropagation()},preventDefault:function(){a.preventDefault()}};else b.push(a);return b};var module$exports$Blockly$browserEvents={conditionalBind:function(a,b,c,d,e,f){var g=!1,h=function(p){var q=!e;p=(0,module$exports$Blockly$Touch.splitEventByTouches)(p);for(var r=0;r<p.length;r++){var t=p[r];if(!q||(0,module$exports$Blockly$Touch.shouldHandleEvent)(t))(0,module$exports$Blockly$Touch.setClientFromTouch)(t),c?d.call(c,t):d(t),g=!0}},k=[];if($.module$exports$Blockly$utils$global.globalThis.PointerEvent&&b in module$exports$Blockly$Touch.TOUCH_MAP)for(var l=0;l<module$exports$Blockly$Touch.TOUCH_MAP[b].length;l++){var m=
429
+ module$exports$Blockly$Touch.TOUCH_MAP[b][l];a.addEventListener(m,h,!1);k.push([a,m,h])}else if(a.addEventListener(b,h,!1),k.push([a,b,h]),b in module$exports$Blockly$Touch.TOUCH_MAP)for(l=function(p){h(p);var q=!f;g&&q&&p.preventDefault()},m=0;m<module$exports$Blockly$Touch.TOUCH_MAP[b].length;m++){var n=module$exports$Blockly$Touch.TOUCH_MAP[b][m];a.addEventListener(n,l,!1);k.push([a,n,l])}return k},bind:function(a,b,c,d){var e=function(l){c?d.call(c,l):d(l)},f=[];if($.module$exports$Blockly$utils$global.globalThis.PointerEvent&&
430
430
  b in module$exports$Blockly$Touch.TOUCH_MAP)for(var g=0;g<module$exports$Blockly$Touch.TOUCH_MAP[b].length;g++){var h=module$exports$Blockly$Touch.TOUCH_MAP[b][g];a.addEventListener(h,e,!1);f.push([a,h,e])}else if(a.addEventListener(b,e,!1),f.push([a,b,e]),b in module$exports$Blockly$Touch.TOUCH_MAP)for(g=function(l){if(l.changedTouches&&1===l.changedTouches.length){var m=l.changedTouches[0];l.clientX=m.clientX;l.clientY=m.clientY}e(l);l.preventDefault()},h=0;h<module$exports$Blockly$Touch.TOUCH_MAP[b].length;h++){var k=
431
431
  module$exports$Blockly$Touch.TOUCH_MAP[b][h];a.addEventListener(k,g,!1);f.push([a,k,g])}return f},unbind:function(a){for(var b;a.length;){b=a.pop();var c=b[0],d=b[1];b=b[2];c.removeEventListener(d,b,!1)}return b},isTargetInput:function(a){return"textarea"===a.target.type||"text"===a.target.type||"number"===a.target.type||"email"===a.target.type||"password"===a.target.type||"search"===a.target.type||"tel"===a.target.type||"url"===a.target.type||a.target.isContentEditable||a.target.dataset&&"true"===
432
432
  a.target.dataset.isTextInput},isRightButton:function(a){return a.ctrlKey&&module$exports$Blockly$utils$userAgent.MAC?!0:2===a.button},mouseToSvg:function(a,b,c){var d=b.createSVGPoint();d.x=a.clientX;d.y=a.clientY;c||(c=b.getScreenCTM().inverse());return d.matrixTransform(c)},getScrollDeltaPixels:function(a){switch(a.deltaMode){default:return{x:a.deltaX,y:a.deltaY};case 1:return{x:a.deltaX*$.module$exports$Blockly$internalConstants.LINE_MODE_MULTIPLIER,y:a.deltaY*$.module$exports$Blockly$internalConstants.LINE_MODE_MULTIPLIER};
@@ -467,8 +467,8 @@ module$exports$Blockly$utils$style.getContainerOffsetToScrollInto=function(a,b,c
467
467
  e,0)));return new module$exports$Blockly$utils$Coordinate.Coordinate(f,b)};var module$exports$Blockly$utils$Rect={Rect:function(a,b,c,d){this.top=a;this.bottom=b;this.left=c;this.right=d}};module$exports$Blockly$utils$Rect.Rect.prototype.contains=function(a,b){return a>=this.left&&a<=this.right&&b>=this.top&&b<=this.bottom};module$exports$Blockly$utils$Rect.Rect.prototype.intersects=function(a){return!(this.left>a.right||this.right<a.left||this.top>a.bottom||this.bottom<a.top)};var module$exports$Blockly$utils$svgMath={},module$contents$Blockly$utils$svgMath_XY_REGEX=/translate\(\s*([-+\d.e]+)([ ,]\s*([-+\d.e]+)\s*)?/,module$contents$Blockly$utils$svgMath_XY_STYLE_REGEX=/transform:\s*translate(?:3d)?\(\s*([-+\d.e]+)\s*px([ ,]\s*([-+\d.e]+)\s*px)?/;
468
468
  module$exports$Blockly$utils$svgMath.getRelativeXY=function(a){var b=new module$exports$Blockly$utils$Coordinate.Coordinate(0,0),c=a.getAttribute("x");c&&(b.x=parseInt(c,10));if(c=a.getAttribute("y"))b.y=parseInt(c,10);if(c=(c=a.getAttribute("transform"))&&c.match(module$contents$Blockly$utils$svgMath_XY_REGEX))b.x+=Number(c[1]),c[3]&&(b.y+=Number(c[3]));(a=a.getAttribute("style"))&&-1<a.indexOf("translate")&&(a=a.match(module$contents$Blockly$utils$svgMath_XY_STYLE_REGEX))&&(b.x+=Number(a[1]),a[3]&&
469
469
  (b.y+=Number(a[3])));return b};module$exports$Blockly$utils$svgMath.getInjectionDivXY=function(a){for(var b=0,c=0;a;){var d=(0,module$exports$Blockly$utils$svgMath.getRelativeXY)(a);b+=d.x;c+=d.y;if(-1!==(" "+(a.getAttribute("class")||"")+" ").indexOf(" injectionDiv "))break;a=a.parentNode}return new module$exports$Blockly$utils$Coordinate.Coordinate(b,c)};
470
- module$exports$Blockly$utils$svgMath.is3dSupported=function(){if(void 0!==module$exports$Blockly$utils$svgMath.is3dSupported.cached_)return module$exports$Blockly$utils$svgMath.is3dSupported.cached_;if(!module$exports$Blockly$utils$global.globalThis.getComputedStyle)return!1;var a=document.createElement("p"),b="none",c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(a,null);for(var d in c)if(void 0!==
471
- a.style[d]){a.style[d]="translate3d(1px,1px,1px)";b=module$exports$Blockly$utils$global.globalThis.getComputedStyle(a);if(!b)return document.body.removeChild(a),!1;b=b.getPropertyValue(c[d])}document.body.removeChild(a);module$exports$Blockly$utils$svgMath.is3dSupported.cached_="none"!==b;return module$exports$Blockly$utils$svgMath.is3dSupported.cached_};
470
+ module$exports$Blockly$utils$svgMath.is3dSupported=function(){if(void 0!==module$exports$Blockly$utils$svgMath.is3dSupported.cached_)return module$exports$Blockly$utils$svgMath.is3dSupported.cached_;if(!$.module$exports$Blockly$utils$global.globalThis.getComputedStyle)return!1;var a=document.createElement("p"),b="none",c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(a,null);
471
+ for(var d in c)if(void 0!==a.style[d]){a.style[d]="translate3d(1px,1px,1px)";b=$.module$exports$Blockly$utils$global.globalThis.getComputedStyle(a);if(!b)return document.body.removeChild(a),!1;b=b.getPropertyValue(c[d])}document.body.removeChild(a);module$exports$Blockly$utils$svgMath.is3dSupported.cached_="none"!==b;return module$exports$Blockly$utils$svgMath.is3dSupported.cached_};
472
472
  module$exports$Blockly$utils$svgMath.getViewportBBox=function(){var a=(0,module$exports$Blockly$utils$style.getViewportPageOffset)();return new module$exports$Blockly$utils$Rect.Rect(a.y,document.documentElement.clientHeight+a.y,a.x,document.documentElement.clientWidth+a.x)};
473
473
  module$exports$Blockly$utils$svgMath.getDocumentScroll=function(){var a=document.documentElement,b=window;return module$exports$Blockly$utils$userAgent.IE&&b.pageYOffset!==a.scrollTop?new module$exports$Blockly$utils$Coordinate.Coordinate(a.scrollLeft,a.scrollTop):new module$exports$Blockly$utils$Coordinate.Coordinate(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)};
474
474
  module$exports$Blockly$utils$svgMath.screenToWsCoordinates=function(a,b){var c=b.x;b=b.y;var d=a.getInjectionDiv().getBoundingClientRect();c=new module$exports$Blockly$utils$Coordinate.Coordinate(c-d.left,b-d.top);b=a.getOriginOffsetInPixels();return module$exports$Blockly$utils$Coordinate.Coordinate.difference(c,b).scale(1/a.scale)};
@@ -631,11 +631,11 @@ DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,TILDE:192,SING
631
631
  module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.register=function(a,b){if(this.registry_[a.name]&&!b)throw Error('Shortcut with name "'+a.name+'" already exists.');this.registry_[a.name]=a};module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.unregister=function(a){if(!this.registry_[a])return console.warn('Keyboard shortcut with name "'+a+'" not found.'),!1;this.removeAllKeyMappings(a);delete this.registry_[a];return!0};
632
632
  module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.addKeyMapping=function(a,b,c){a=String(a);var d=this.keyMap_[a];if(d&&!c)throw Error('Shortcut with name "'+b+'" collides with shortcuts '+d.toString());d&&c?d.unshift(b):this.keyMap_[a]=[b]};
633
633
  module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.removeKeyMapping=function(a,b,c){var d=this.keyMap_[a];if(!d&&!c)return console.warn('No keyboard shortcut with name "'+b+'" registered with key code "'+a+'"'),!1;var e=d.indexOf(b);if(-1<e)return d.splice(e,1),0===d.length&&delete this.keyMap_[a],!0;c||console.warn('No keyboard shortcut with name "'+b+'" registered with key code "'+a+'"');return!1};
634
- module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.removeAllKeyMappings=function(a){for(var b in this.keyMap_)this.removeKeyMapping(b,a,!0)};module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.setKeyMap=function(a){this.keyMap_=a};module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.getKeyMap=function(){return(0,module$exports$Blockly$utils$object.deepMerge)(Object.create(null),this.keyMap_)};
635
- module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.getRegistry=function(){return(0,module$exports$Blockly$utils$object.deepMerge)(Object.create(null),this.registry_)};module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.onKeyDown=function(a,b){var c=this.serializeKeyEvent_(b);c=this.getShortcutNamesByKeyCode(c);if(!c)return!1;for(var d=0,e;e=c[d];d++)if(e=this.registry_[e],(!e.preconditionFn||e.preconditionFn(a))&&e.callback&&e.callback(a,b,e))return!0;return!1};
634
+ module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.removeAllKeyMappings=function(a){for(var b in this.keyMap_)this.removeKeyMapping(b,a,!0)};module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.setKeyMap=function(a){this.keyMap_=a};module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.getKeyMap=function(){return(0,$.module$exports$Blockly$utils$object.deepMerge)(Object.create(null),this.keyMap_)};
635
+ module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.getRegistry=function(){return(0,$.module$exports$Blockly$utils$object.deepMerge)(Object.create(null),this.registry_)};module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.onKeyDown=function(a,b){var c=this.serializeKeyEvent_(b);c=this.getShortcutNamesByKeyCode(c);if(!c)return!1;for(var d=0,e;e=c[d];d++)if(e=this.registry_[e],(!e.preconditionFn||e.preconditionFn(a))&&e.callback&&e.callback(a,b,e))return!0;return!1};
636
636
  module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.getShortcutNamesByKeyCode=function(a){return this.keyMap_[a]||[]};module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.getKeyCodesByShortcutName=function(a){var b=[],c;for(c in this.keyMap_)-1<this.keyMap_[c].indexOf(a)&&b.push(c);return b};
637
637
  module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.serializeKeyEvent_=function(a){var b="",c;for(c in module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.modifierKeys)a.getModifierState(c)&&(""!==b&&(b+="+"),b+=c);""!==b&&a.keyCode?b=b+"+"+a.keyCode:a.keyCode&&(b=a.keyCode.toString());return b};
638
- module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.checkModifiers_=function(a){for(var b=(0,module$exports$Blockly$utils$object.values)(module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.modifierKeys),c=0,d;d=a[c];c++)if(0>b.indexOf(d))throw Error(d+" is not a valid modifier key.");};
638
+ module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.checkModifiers_=function(a){for(var b=(0,$.module$exports$Blockly$utils$object.values)(module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.modifierKeys),c=0,d;d=a[c];c++)if(0>b.indexOf(d))throw Error(d+" is not a valid modifier key.");};
639
639
  module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.prototype.createSerializedKey=function(a,b){var c="";if(b){this.checkModifiers_(b);for(var d in module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.modifierKeys)-1<b.indexOf(module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.modifierKeys[d])&&(""!==c&&(c+="+"),c+=d)}""!==c&&a?c=c+"+"+a:a&&(c=a.toString());return c};new module$exports$Blockly$ShortcutRegistry.ShortcutRegistry;var module$exports$Blockly$ShortcutItems={names:{ESCAPE:"escape",DELETE:"delete",COPY:"copy",CUT:"cut",PASTE:"paste",UNDO:"undo",REDO:"redo"},registerEscape:function(){var a={name:module$exports$Blockly$ShortcutItems.names.ESCAPE,preconditionFn:function(b){return!b.options.readOnly},callback:function(b){b.hideChaff();return!0}};module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.registry.register(a);module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.registry.addKeyMapping(module$exports$Blockly$utils$KeyCodes.KeyCodes.ESC,
640
640
  a.name)},registerDelete:function(){var a={name:module$exports$Blockly$ShortcutItems.names.DELETE,preconditionFn:function(b){var c=(0,$.module$exports$Blockly$common.getSelected)();return!b.options.readOnly&&c&&c.isDeletable()},callback:function(b,c){c.preventDefault();if(module$exports$Blockly$Gesture.Gesture.inProgress())return!1;(0,$.module$exports$Blockly$common.getSelected)().checkAndDelete();return!0}};module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.registry.register(a);module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.registry.addKeyMapping(module$exports$Blockly$utils$KeyCodes.KeyCodes.DELETE,
641
641
  a.name);module$exports$Blockly$ShortcutRegistry.ShortcutRegistry.registry.addKeyMapping(module$exports$Blockly$utils$KeyCodes.KeyCodes.BACKSPACE,a.name)},registerCopy:function(){var a={name:module$exports$Blockly$ShortcutItems.names.COPY,preconditionFn:function(c){var d=(0,$.module$exports$Blockly$common.getSelected)();return!c.options.readOnly&&!module$exports$Blockly$Gesture.Gesture.inProgress()&&d&&d.isDeletable()&&d.isMovable()},callback:function(c,d){d.preventDefault();c.hideChaff();(0,module$exports$Blockly$clipboard.copy)((0,$.module$exports$Blockly$common.getSelected)());
@@ -676,7 +676,7 @@ this.FIELD_TEXT_FONTSIZE+"pt",this.FIELD_TEXT_FONTWEIGHT,this.FIELD_TEXT_FONTFAM
676
676
  module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.setComponentConstants_=function(a){this.CURSOR_COLOUR=a.getComponentStyle("cursorColour")||this.CURSOR_COLOUR;this.MARKER_COLOUR=a.getComponentStyle("markerColour")||this.MARKER_COLOUR;this.INSERTION_MARKER_COLOUR=a.getComponentStyle("insertionMarkerColour")||this.INSERTION_MARKER_COLOUR;this.INSERTION_MARKER_OPACITY=Number(a.getComponentStyle("insertionMarkerOpacity"))||this.INSERTION_MARKER_OPACITY};
677
677
  module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.getBlockStyleForColour=function(a){var b="auto_"+a;this.blockStyles[b]||(this.blockStyles[b]=this.createBlockStyle_(a));return{style:this.blockStyles[b],name:b}};module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.getBlockStyle=function(a){return this.blockStyles[a||""]||(a&&0===a.indexOf("auto_")?this.getBlockStyleForColour(a.substring(5)).style:this.createBlockStyle_("#000000"))};
678
678
  module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.createBlockStyle_=function(a){return this.validatedBlockStyle_({colourPrimary:a})};
679
- module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.validatedBlockStyle_=function(a){var b={};a&&(0,module$exports$Blockly$utils$object.mixin)(b,a);a=(0,module$exports$Blockly$utils$parsing.parseBlockColour)(b.colourPrimary||"#000");b.colourPrimary=a.hex;b.colourSecondary=b.colourSecondary?(0,module$exports$Blockly$utils$parsing.parseBlockColour)(b.colourSecondary).hex:this.generateSecondaryColour_(b.colourPrimary);b.colourTertiary=b.colourTertiary?(0,module$exports$Blockly$utils$parsing.parseBlockColour)(b.colourTertiary).hex:
679
+ module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.validatedBlockStyle_=function(a){var b={};a&&(0,$.module$exports$Blockly$utils$object.mixin)(b,a);a=(0,module$exports$Blockly$utils$parsing.parseBlockColour)(b.colourPrimary||"#000");b.colourPrimary=a.hex;b.colourSecondary=b.colourSecondary?(0,module$exports$Blockly$utils$parsing.parseBlockColour)(b.colourSecondary).hex:this.generateSecondaryColour_(b.colourPrimary);b.colourTertiary=b.colourTertiary?(0,module$exports$Blockly$utils$parsing.parseBlockColour)(b.colourTertiary).hex:
680
680
  this.generateTertiaryColour_(b.colourPrimary);b.hat=b.hat||"";return b};module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.generateSecondaryColour_=function(a){return(0,module$exports$Blockly$utils$colour.blend)("#fff",a,.6)||a};module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.generateTertiaryColour_=function(a){return(0,module$exports$Blockly$utils$colour.blend)("#fff",a,.3)||a};
681
681
  module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.dispose=function(){this.embossFilter_&&(0,module$exports$Blockly$utils$dom.removeNode)(this.embossFilter_);this.disabledPattern_&&(0,module$exports$Blockly$utils$dom.removeNode)(this.disabledPattern_);this.debugFilter_&&(0,module$exports$Blockly$utils$dom.removeNode)(this.debugFilter_);this.cssNode_=null};
682
682
  module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.makeJaggedTeeth=function(){var a=this.JAGGED_TEETH_HEIGHT,b=this.JAGGED_TEETH_WIDTH,c=(0,module$exports$Blockly$utils$svgPaths.line)([(0,module$exports$Blockly$utils$svgPaths.point)(b,a/4),(0,module$exports$Blockly$utils$svgPaths.point)(2*-b,a/2),(0,module$exports$Blockly$utils$svgPaths.point)(b,a/4)]);return{height:a,width:b,path:c}};
@@ -698,7 +698,7 @@ module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototyp
698
698
  module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.injectCSS_=function(a,b){b=this.getCSS_(b);a="blockly-renderer-style-"+a;this.cssNode_=document.getElementById(a);var c=b.join("\n");this.cssNode_?this.cssNode_.firstChild.textContent=c:(b=document.createElement("style"),b.id=a,a=document.createTextNode(c),b.appendChild(a),document.head.insertBefore(b,document.head.firstChild),this.cssNode_=b)};
699
699
  module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider.prototype.getCSS_=function(a){return[a+" .blocklyText, ",a+" .blocklyFlyoutLabelText {","font: "+this.FIELD_TEXT_FONTWEIGHT+" "+this.FIELD_TEXT_FONTSIZE+"pt "+this.FIELD_TEXT_FONTFAMILY+";","}",a+" .blocklyText {","fill: #fff;","}",a+" .blocklyNonEditableText>rect,",a+" .blocklyEditableText>rect {","fill: "+this.FIELD_BORDER_RECT_COLOUR+";","fill-opacity: .6;","stroke: none;","}",a+" .blocklyNonEditableText>text,",a+" .blocklyEditableText>text {",
700
700
  "fill: #000;","}",a+" .blocklyFlyoutLabelText {","fill: #000;","}",a+" .blocklyText.blocklyBubbleText {","fill: #000;","}",a+" .blocklyEditableText:not(.editing):hover>rect {","stroke: #fff;","stroke-width: 2;","}",a+" .blocklyHtmlInput {","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 {",
701
- "fill-opacity: .5;","}",a+" .blocklyReplaceable .blocklyPathLight,",a+" .blocklyReplaceable .blocklyPathDark {","display: none;","}",a+" .blocklyInsertionMarker>.blocklyPath {","fill-opacity: "+this.INSERTION_MARKER_OPACITY+";","stroke: none;","}"]};var module$exports$Blockly$geras$ConstantProvider={ConstantProvider:function(){module$exports$Blockly$geras$ConstantProvider.ConstantProvider.superClass_.constructor.call(this);this.FIELD_TEXT_BASELINE_CENTER=!1;this.DARK_PATH_OFFSET=1;this.MAX_BOTTOM_WIDTH=30;this.STATEMENT_BOTTOM_SPACER=-this.NOTCH_HEIGHT/2}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$ConstantProvider.ConstantProvider,module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider);
701
+ "fill-opacity: .5;","}",a+" .blocklyReplaceable .blocklyPathLight,",a+" .blocklyReplaceable .blocklyPathDark {","display: none;","}",a+" .blocklyInsertionMarker>.blocklyPath {","fill-opacity: "+this.INSERTION_MARKER_OPACITY+";","stroke: none;","}"]};var module$exports$Blockly$geras$ConstantProvider={ConstantProvider:function(){module$exports$Blockly$geras$ConstantProvider.ConstantProvider.superClass_.constructor.call(this);this.FIELD_TEXT_BASELINE_CENTER=!1;this.DARK_PATH_OFFSET=1;this.MAX_BOTTOM_WIDTH=30;this.STATEMENT_BOTTOM_SPACER=-this.NOTCH_HEIGHT/2}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$ConstantProvider.ConstantProvider,module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider);
702
702
  module$exports$Blockly$geras$ConstantProvider.ConstantProvider.prototype.getCSS_=function(a){return module$exports$Blockly$geras$ConstantProvider.ConstantProvider.superClass_.getCSS_.call(this,a).concat([a+" .blocklyInsertionMarker>.blocklyPathLight,",a+" .blocklyInsertionMarker>.blocklyPathDark {","fill-opacity: "+this.INSERTION_MARKER_OPACITY+";","stroke: none;","}"])};var module$exports$Blockly$geras$HighlightConstantProvider={HighlightConstantProvider:function(a){this.constantProvider=a;this.OFFSET=.5;this.START_POINT=(0,module$exports$Blockly$utils$svgPaths.moveBy)(this.OFFSET,this.OFFSET)}};
703
703
  module$exports$Blockly$geras$HighlightConstantProvider.HighlightConstantProvider.prototype.init=function(){this.INSIDE_CORNER=this.makeInsideCorner();this.OUTSIDE_CORNER=this.makeOutsideCorner();this.PUZZLE_TAB=this.makePuzzleTab();this.NOTCH=this.makeNotch();this.JAGGED_TEETH=this.makeJaggedTeeth();this.START_HAT=this.makeStartHat()};
704
704
  module$exports$Blockly$geras$HighlightConstantProvider.HighlightConstantProvider.prototype.makeInsideCorner=function(){var a=this.constantProvider.CORNER_RADIUS,b=this.OFFSET,c=(1-Math.SQRT1_2)*(a+b)-b,d=(0,module$exports$Blockly$utils$svgPaths.moveBy)(c,c)+(0,module$exports$Blockly$utils$svgPaths.arc)("a","0 0,0",a,(0,module$exports$Blockly$utils$svgPaths.point)(-c-b,a-c)),e=(0,module$exports$Blockly$utils$svgPaths.arc)("a","0 0,0",a+b,(0,module$exports$Blockly$utils$svgPaths.point)(a+b,a+b)),f=
@@ -720,10 +720,10 @@ module$exports$Blockly$blockRendering$Types.Types.isNextConnection=function(a){r
720
720
  module$exports$Blockly$blockRendering$Types.Types.isRightRoundedCorner=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.RIGHT_ROUND_CORNER};module$exports$Blockly$blockRendering$Types.Types.isLeftSquareCorner=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.LEFT_SQUARE_CORNER};module$exports$Blockly$blockRendering$Types.Types.isRightSquareCorner=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.RIGHT_SQUARE_CORNER};
721
721
  module$exports$Blockly$blockRendering$Types.Types.isCorner=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.CORNER};module$exports$Blockly$blockRendering$Types.Types.isJaggedEdge=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.JAGGED_EDGE};module$exports$Blockly$blockRendering$Types.Types.isRow=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.ROW};
722
722
  module$exports$Blockly$blockRendering$Types.Types.isBetweenRowSpacer=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.BETWEEN_ROW_SPACER};module$exports$Blockly$blockRendering$Types.Types.isTopRow=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.TOP_ROW};module$exports$Blockly$blockRendering$Types.Types.isBottomRow=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.BOTTOM_ROW};
723
- module$exports$Blockly$blockRendering$Types.Types.isTopOrBottomRow=function(a){return a.type&(module$exports$Blockly$blockRendering$Types.Types.TOP_ROW|module$exports$Blockly$blockRendering$Types.Types.BOTTOM_ROW)};module$exports$Blockly$blockRendering$Types.Types.isInputRow=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.INPUT_ROW};var module$exports$Blockly$blockRendering$Measurable={Measurable:function(a){this.height=this.width=0;this.type=module$exports$Blockly$blockRendering$Types.Types.NONE;this.centerline=this.xPos=0;this.constants_=a;this.notchOffset=this.constants_.NOTCH_OFFSET_LEFT}};var module$exports$Blockly$blockRendering$Connection={Connection:function(a,b){module$exports$Blockly$blockRendering$Connection.Connection.superClass_.constructor.call(this,a);this.connectionModel=b;this.shape=this.constants_.shapeFor(b);this.isDynamicShape=!!this.shape.isDynamic;this.type|=module$exports$Blockly$blockRendering$Types.Types.CONNECTION}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$Connection.Connection,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$InputConnection={InputConnection:function(a,b){module$exports$Blockly$blockRendering$InputConnection.InputConnection.superClass_.constructor.call(this,a,b.connection);this.type|=module$exports$Blockly$blockRendering$Types.Types.INPUT;this.input=b;this.align=b.align;(this.connectedBlock=b.connection&&b.connection.targetBlock()?b.connection.targetBlock():null)?(a=this.connectedBlock.getHeightWidth(),this.connectedBlockWidth=a.width,this.connectedBlockHeight=
724
- a.height):this.connectedBlockHeight=this.connectedBlockWidth=0;this.connectionOffsetY=this.connectionOffsetX=0}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$InputConnection.InputConnection,module$exports$Blockly$blockRendering$Connection.Connection);var module$exports$Blockly$blockRendering$InlineInput={InlineInput:function(a,b){module$exports$Blockly$blockRendering$InlineInput.InlineInput.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.INLINE_INPUT;this.connectedBlock?(this.width=this.connectedBlockWidth,this.height=this.connectedBlockHeight):(this.height=this.constants_.EMPTY_INLINE_INPUT_HEIGHT,this.width=this.constants_.EMPTY_INLINE_INPUT_PADDING);this.connectionHeight=this.isDynamicShape?
723
+ module$exports$Blockly$blockRendering$Types.Types.isTopOrBottomRow=function(a){return a.type&(module$exports$Blockly$blockRendering$Types.Types.TOP_ROW|module$exports$Blockly$blockRendering$Types.Types.BOTTOM_ROW)};module$exports$Blockly$blockRendering$Types.Types.isInputRow=function(a){return a.type&module$exports$Blockly$blockRendering$Types.Types.INPUT_ROW};var module$exports$Blockly$blockRendering$Measurable={Measurable:function(a){this.height=this.width=0;this.type=module$exports$Blockly$blockRendering$Types.Types.NONE;this.centerline=this.xPos=0;this.constants_=a;this.notchOffset=this.constants_.NOTCH_OFFSET_LEFT}};var module$exports$Blockly$blockRendering$Connection={Connection:function(a,b){module$exports$Blockly$blockRendering$Connection.Connection.superClass_.constructor.call(this,a);this.connectionModel=b;this.shape=this.constants_.shapeFor(b);this.isDynamicShape=!!this.shape.isDynamic;this.type|=module$exports$Blockly$blockRendering$Types.Types.CONNECTION}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$Connection.Connection,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$InputConnection={InputConnection:function(a,b){module$exports$Blockly$blockRendering$InputConnection.InputConnection.superClass_.constructor.call(this,a,b.connection);this.type|=module$exports$Blockly$blockRendering$Types.Types.INPUT;this.input=b;this.align=b.align;(this.connectedBlock=b.connection&&b.connection.targetBlock()?b.connection.targetBlock():null)?(a=this.connectedBlock.getHeightWidth(),this.connectedBlockWidth=a.width,this.connectedBlockHeight=
724
+ a.height):this.connectedBlockHeight=this.connectedBlockWidth=0;this.connectionOffsetY=this.connectionOffsetX=0}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$InputConnection.InputConnection,module$exports$Blockly$blockRendering$Connection.Connection);var module$exports$Blockly$blockRendering$InlineInput={InlineInput:function(a,b){module$exports$Blockly$blockRendering$InlineInput.InlineInput.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.INLINE_INPUT;this.connectedBlock?(this.width=this.connectedBlockWidth,this.height=this.connectedBlockHeight):(this.height=this.constants_.EMPTY_INLINE_INPUT_HEIGHT,this.width=this.constants_.EMPTY_INLINE_INPUT_PADDING);this.connectionHeight=this.isDynamicShape?
725
725
  this.shape.height(this.height):this.shape.height;this.connectionWidth=this.isDynamicShape?this.shape.width(this.height):this.shape.width;this.connectedBlock||(this.width+=this.connectionWidth*(this.isDynamicShape?2:1));this.connectionOffsetY=this.isDynamicShape?this.shape.connectionOffsetY(this.connectionHeight):this.constants_.TAB_OFFSET_FROM_TOP;this.connectionOffsetX=this.isDynamicShape?this.shape.connectionOffsetX(this.connectionWidth):0}};
726
- (0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$InlineInput.InlineInput,module$exports$Blockly$blockRendering$InputConnection.InputConnection);var module$exports$Blockly$geras$InlineInput={InlineInput:function(a,b){module$exports$Blockly$geras$InlineInput.InlineInput.superClass_.constructor.call(this,a,b);this.connectedBlock&&(this.width+=this.constants_.DARK_PATH_OFFSET,this.height+=this.constants_.DARK_PATH_OFFSET)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$InlineInput.InlineInput,module$exports$Blockly$blockRendering$InlineInput.InlineInput);var module$exports$Blockly$blockRendering$IPathObject={IPathObject:function(a,b){}};var module$exports$Blockly$blockRendering$PathObject={PathObject:function(a,b,c){this.constants=c;this.svgRoot=a;this.svgPath=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.PATH,{"class":"blocklyPath"},this.svgRoot);this.style=b;this.markerSvg=this.cursorSvg=null}};module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.setPath=function(a){this.svgPath.setAttribute("d",a)};
726
+ (0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$InlineInput.InlineInput,module$exports$Blockly$blockRendering$InputConnection.InputConnection);var module$exports$Blockly$geras$InlineInput={InlineInput:function(a,b){module$exports$Blockly$geras$InlineInput.InlineInput.superClass_.constructor.call(this,a,b);this.connectedBlock&&(this.width+=this.constants_.DARK_PATH_OFFSET,this.height+=this.constants_.DARK_PATH_OFFSET)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$InlineInput.InlineInput,module$exports$Blockly$blockRendering$InlineInput.InlineInput);var module$exports$Blockly$blockRendering$IPathObject={IPathObject:function(a,b){}};var module$exports$Blockly$blockRendering$PathObject={PathObject:function(a,b,c){this.constants=c;this.svgRoot=a;this.svgPath=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.PATH,{"class":"blocklyPath"},this.svgRoot);this.style=b;this.markerSvg=this.cursorSvg=null}};module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.setPath=function(a){this.svgPath.setAttribute("d",a)};
727
727
  module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.flipRTL=function(){this.svgPath.setAttribute("transform","scale(-1 1)")};module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.setCursorSvg=function(a){a?(this.svgRoot.appendChild(a),this.cursorSvg=a):this.cursorSvg=null};
728
728
  module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.setMarkerSvg=function(a){a?(this.cursorSvg?this.svgRoot.insertBefore(a,this.cursorSvg):this.svgRoot.appendChild(a),this.markerSvg=a):this.markerSvg=null};
729
729
  module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.applyColour=function(a){this.svgPath.setAttribute("stroke",this.style.colourTertiary);this.svgPath.setAttribute("fill",this.style.colourPrimary);this.updateShadow_(a.isShadow());this.updateDisabled_(!a.isEnabled()||a.getInheritedDisabled())};module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.setStyle=function(a){this.style=a};
@@ -731,7 +731,7 @@ module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.setClass_=
731
731
  module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.updateShadow_=function(a){a&&(this.svgPath.setAttribute("stroke","none"),this.svgPath.setAttribute("fill",this.style.colourSecondary))};module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.updateDisabled_=function(a){this.setClass_("blocklyDisabled",a);a&&this.svgPath.setAttribute("fill","url(#"+this.constants.disabledPatternId+")")};
732
732
  module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.updateSelected=function(a){this.setClass_("blocklySelected",a)};module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.updateDraggingDelete=function(a){this.setClass_("blocklyDraggingDelete",a)};module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.updateInsertionMarker=function(a){this.setClass_("blocklyInsertionMarker",a)};
733
733
  module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.updateMovable=function(a){this.setClass_("blocklyDraggable",a)};module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.updateReplacementFade=function(a){this.setClass_("blocklyReplaceable",a)};module$exports$Blockly$blockRendering$PathObject.PathObject.prototype.updateShapeForInputHighlight=function(a,b){};var module$exports$Blockly$geras$PathObject={PathObject:function(a,b,c){this.constants=c;this.svgRoot=a;this.svgPathDark=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.PATH,{"class":"blocklyPathDark",transform:"translate(1,1)"},this.svgRoot);this.svgPath=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.PATH,{"class":"blocklyPath"},this.svgRoot);this.svgPathLight=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.PATH,
734
- {"class":"blocklyPathLight"},this.svgRoot);this.colourDark="#000000";this.style=b}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$PathObject.PathObject,module$exports$Blockly$blockRendering$PathObject.PathObject);module$exports$Blockly$geras$PathObject.PathObject.prototype.setPath=function(a){this.svgPath.setAttribute("d",a);this.svgPathDark.setAttribute("d",a)};
734
+ {"class":"blocklyPathLight"},this.svgRoot);this.colourDark="#000000";this.style=b}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$PathObject.PathObject,module$exports$Blockly$blockRendering$PathObject.PathObject);module$exports$Blockly$geras$PathObject.PathObject.prototype.setPath=function(a){this.svgPath.setAttribute("d",a);this.svgPathDark.setAttribute("d",a)};
735
735
  module$exports$Blockly$geras$PathObject.PathObject.prototype.setHighlightPath=function(a){this.svgPathLight.setAttribute("d",a)};module$exports$Blockly$geras$PathObject.PathObject.prototype.flipRTL=function(){this.svgPath.setAttribute("transform","scale(-1 1)");this.svgPathLight.setAttribute("transform","scale(-1 1)");this.svgPathDark.setAttribute("transform","translate(1,1) scale(-1 1)")};
736
736
  module$exports$Blockly$geras$PathObject.PathObject.prototype.applyColour=function(a){this.svgPathLight.style.display="";this.svgPathDark.style.display="";this.svgPathLight.setAttribute("stroke",this.style.colourTertiary);this.svgPathDark.setAttribute("fill",this.colourDark);module$exports$Blockly$geras$PathObject.PathObject.superClass_.applyColour.call(this,a);this.svgPath.setAttribute("stroke","none")};
737
737
  module$exports$Blockly$geras$PathObject.PathObject.prototype.setStyle=function(a){this.style=a;this.colourDark=(0,module$exports$Blockly$utils$colour.blend)("#000",this.style.colourPrimary,.2)||this.colourDark};module$exports$Blockly$geras$PathObject.PathObject.prototype.updateHighlighted=function(a){a?(this.svgPath.setAttribute("filter","url(#"+this.constants.embossFilterId+")"),this.svgPathLight.style.display="none"):(this.svgPath.setAttribute("filter","none"),this.svgPathLight.style.display="inline")};
@@ -739,7 +739,7 @@ module$exports$Blockly$geras$PathObject.PathObject.prototype.updateShadow_=funct
739
739
  module$exports$Blockly$geras$PathObject.PathObject.prototype.updateDisabled_=function(a){module$exports$Blockly$geras$PathObject.PathObject.superClass_.updateDisabled_.call(this,a);a&&this.svgPath.setAttribute("stroke","none")};var module$exports$Blockly$blockRendering$debug={},module$contents$Blockly$blockRendering$debug_useDebugger=!1;module$exports$Blockly$blockRendering$debug.isDebuggerEnabled=function(){return module$contents$Blockly$blockRendering$debug_useDebugger};module$exports$Blockly$blockRendering$debug.startDebugger=function(){module$contents$Blockly$blockRendering$debug_useDebugger=!0};
740
740
  module$exports$Blockly$blockRendering$debug.stopDebugger=function(){module$contents$Blockly$blockRendering$debug_useDebugger=!1};var module$exports$Blockly$blockRendering$Row={Row:function(a){this.type=module$exports$Blockly$blockRendering$Types.Types.ROW;this.elements=[];this.xPos=this.yPos=this.widthWithConnectedBlocks=this.minWidth=this.minHeight=this.width=this.height=0;this.hasJaggedEdge=this.hasDummyInput=this.hasInlineInput=this.hasStatement=this.hasExternalInput=!1;this.constants_=a;this.notchOffset=this.constants_.NOTCH_OFFSET_LEFT;this.align=null}};
741
741
  module$exports$Blockly$blockRendering$Row.Row.prototype.getLastInput=function(){for(var a=this.elements.length-1;0<=a;a--){var b=this.elements[a];if(module$exports$Blockly$blockRendering$Types.Types.isInput(b))return b}return null};module$exports$Blockly$blockRendering$Row.Row.prototype.measure=function(){throw Error("Unexpected attempt to measure a base Row.");};module$exports$Blockly$blockRendering$Row.Row.prototype.startsWithElemSpacer=function(){return!0};
742
- module$exports$Blockly$blockRendering$Row.Row.prototype.endsWithElemSpacer=function(){return!0};module$exports$Blockly$blockRendering$Row.Row.prototype.getFirstSpacer=function(){for(var a=0;a<this.elements.length;a++){var b=this.elements[a];if(module$exports$Blockly$blockRendering$Types.Types.isSpacer(b))return b}return null};module$exports$Blockly$blockRendering$Row.Row.prototype.getLastSpacer=function(){for(var a=this.elements.length-1;0<=a;a--){var b=this.elements[a];if(module$exports$Blockly$blockRendering$Types.Types.isSpacer(b))return b}return null};var module$exports$Blockly$blockRendering$BottomRow={BottomRow:function(a){module$exports$Blockly$blockRendering$BottomRow.BottomRow.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.BOTTOM_ROW;this.hasNextConnection=!1;this.connection=null;this.baseline=this.descenderHeight=0}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$BottomRow.BottomRow,module$exports$Blockly$blockRendering$Row.Row);
742
+ module$exports$Blockly$blockRendering$Row.Row.prototype.endsWithElemSpacer=function(){return!0};module$exports$Blockly$blockRendering$Row.Row.prototype.getFirstSpacer=function(){for(var a=0;a<this.elements.length;a++){var b=this.elements[a];if(module$exports$Blockly$blockRendering$Types.Types.isSpacer(b))return b}return null};module$exports$Blockly$blockRendering$Row.Row.prototype.getLastSpacer=function(){for(var a=this.elements.length-1;0<=a;a--){var b=this.elements[a];if(module$exports$Blockly$blockRendering$Types.Types.isSpacer(b))return b}return null};var module$exports$Blockly$blockRendering$BottomRow={BottomRow:function(a){module$exports$Blockly$blockRendering$BottomRow.BottomRow.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.BOTTOM_ROW;this.hasNextConnection=!1;this.connection=null;this.baseline=this.descenderHeight=0}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$BottomRow.BottomRow,module$exports$Blockly$blockRendering$Row.Row);
743
743
  module$exports$Blockly$blockRendering$BottomRow.BottomRow.prototype.hasLeftSquareCorner=function(a){return!!a.outputConnection||!!a.getNextBlock()};module$exports$Blockly$blockRendering$BottomRow.BottomRow.prototype.hasRightSquareCorner=function(a){return!0};
744
744
  module$exports$Blockly$blockRendering$BottomRow.BottomRow.prototype.measure=function(){for(var a=0,b=0,c=0,d=0;d<this.elements.length;d++){var e=this.elements[d];b+=e.width;module$exports$Blockly$blockRendering$Types.Types.isSpacer(e)||(module$exports$Blockly$blockRendering$Types.Types.isNextConnection(e)?c=Math.max(c,e.height):a=Math.max(a,e.height))}this.width=Math.max(this.minWidth,b);this.height=Math.max(this.minHeight,a)+c;this.descenderHeight=c;this.widthWithConnectedBlocks=this.width};
745
745
  module$exports$Blockly$blockRendering$BottomRow.BottomRow.prototype.startsWithElemSpacer=function(){return!1};module$exports$Blockly$blockRendering$BottomRow.BottomRow.prototype.endsWithElemSpacer=function(){return!1};var module$exports$Blockly$fieldRegistry={register:function(a,b){(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.FIELD,a,b)},unregister:function(a){(0,module$exports$Blockly$registry.unregister)(module$exports$Blockly$registry.Type.FIELD,a)},fromJson:function(a){var b=(0,module$exports$Blockly$registry.getObject)(module$exports$Blockly$registry.Type.FIELD,a.type);return b?b.fromJson(a):(console.warn("Blockly could not create a field of type "+a.type+". The field is probably not being registered. This could be because the file is not loaded, the field does not register itself (Issue #1584), or the registration is not being reached."),
@@ -817,7 +817,7 @@ module$exports$Blockly$Field.Field.prototype.setTooltip=function(a){a||""===a||(
817
817
  module$exports$Blockly$Field.Field.prototype.getClickTarget_=function(){return this.clickTarget_||this.getSvgRoot()};module$exports$Blockly$Field.Field.prototype.getAbsoluteXY_=function(){return(0,module$exports$Blockly$utils$style.getPageOffset)(this.getClickTarget_())};module$exports$Blockly$Field.Field.prototype.referencesVariables=function(){return!1};
818
818
  module$exports$Blockly$Field.Field.prototype.getParentInput=function(){for(var a=null,b=this.sourceBlock_,c=b.inputList,d=0;d<b.inputList.length;d++)for(var e=c[d],f=e.fieldRow,g=0;g<f.length;g++)if(f[g]===this){a=e;break}return a};module$exports$Blockly$Field.Field.prototype.getFlipRtl=function(){return!1};module$exports$Blockly$Field.Field.prototype.isTabNavigable=function(){return!1};module$exports$Blockly$Field.Field.prototype.onShortcut=function(a){return!1};
819
819
  module$exports$Blockly$Field.Field.prototype.setCursorSvg=function(a){a?(this.fieldGroup_.appendChild(a),this.cursorSvg_=a):this.cursorSvg_=null};module$exports$Blockly$Field.Field.prototype.setMarkerSvg=function(a){a?(this.fieldGroup_.appendChild(a),this.markerSvg_=a):this.markerSvg_=null};
820
- module$exports$Blockly$Field.Field.prototype.updateMarkers_=function(){var a=this.sourceBlock_.workspace;a.keyboardAccessibilityMode&&this.cursorSvg_&&a.getCursor().draw();a.keyboardAccessibilityMode&&this.markerSvg_&&a.getMarker(module$exports$Blockly$MarkerManager.MarkerManager.LOCAL_MARKER).draw()};$.module$exports$Blockly$FieldLabel={FieldLabel:function(a,b,c){this.class_=null;$.module$exports$Blockly$FieldLabel.FieldLabel.superClass_.constructor.call(this,a,null,c);c||(this.class_=b||null)}};(0,module$exports$Blockly$utils$object.inherits)($.module$exports$Blockly$FieldLabel.FieldLabel,module$exports$Blockly$Field.Field);$.module$exports$Blockly$FieldLabel.FieldLabel.prototype.DEFAULT_VALUE="";
820
+ module$exports$Blockly$Field.Field.prototype.updateMarkers_=function(){var a=this.sourceBlock_.workspace;a.keyboardAccessibilityMode&&this.cursorSvg_&&a.getCursor().draw();a.keyboardAccessibilityMode&&this.markerSvg_&&a.getMarker(module$exports$Blockly$MarkerManager.MarkerManager.LOCAL_MARKER).draw()};$.module$exports$Blockly$FieldLabel={FieldLabel:function(a,b,c){this.class_=null;$.module$exports$Blockly$FieldLabel.FieldLabel.superClass_.constructor.call(this,a,null,c);c||(this.class_=b||null)}};(0,$.module$exports$Blockly$utils$object.inherits)($.module$exports$Blockly$FieldLabel.FieldLabel,module$exports$Blockly$Field.Field);$.module$exports$Blockly$FieldLabel.FieldLabel.prototype.DEFAULT_VALUE="";
821
821
  $.module$exports$Blockly$FieldLabel.FieldLabel.fromJson=function(a){return new this((0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.text),void 0,a)};$.module$exports$Blockly$FieldLabel.FieldLabel.prototype.EDITABLE=!1;$.module$exports$Blockly$FieldLabel.FieldLabel.prototype.configure_=function(a){$.module$exports$Blockly$FieldLabel.FieldLabel.superClass_.configure_.call(this,a);this.class_=a["class"]};
822
822
  $.module$exports$Blockly$FieldLabel.FieldLabel.prototype.initView=function(){this.createTextElement_();this.class_&&(0,module$exports$Blockly$utils$dom.addClass)(this.textElement_,this.class_)};$.module$exports$Blockly$FieldLabel.FieldLabel.prototype.doClassValidation_=function(a){return null===a||void 0===a?null:String(a)};
823
823
  $.module$exports$Blockly$FieldLabel.FieldLabel.prototype.setClass=function(a){this.textElement_&&(this.class_&&(0,module$exports$Blockly$utils$dom.removeClass)(this.textElement_,this.class_),a&&(0,module$exports$Blockly$utils$dom.addClass)(this.textElement_,a));this.class_=a};(0,module$exports$Blockly$fieldRegistry.register)("field_label",$.module$exports$Blockly$FieldLabel.FieldLabel);var module$exports$Blockly$blockRendering$Debug={Debug:function(a){this.debugElements_=[];this.svgRoot_=null;this.constants_=a}};module$exports$Blockly$blockRendering$Debug.Debug.config={rowSpacers:!0,elemSpacers:!0,rows:!0,elems:!0,connections:!0,blockBounds:!0,connectedBlockBounds:!0,render:!0};
@@ -859,9 +859,9 @@ module$exports$Blockly$blockRendering$Drawer.Drawer.prototype.positionStatementI
859
859
  module$exports$Blockly$blockRendering$Drawer.Drawer.prototype.positionExternalValueConnection_=function(a){var b=a.getLastInput();if(b.connectionModel){var c=a.xPos+a.width;this.info_.RTL&&(c*=-1);b.connectionModel.setOffsetInBlock(c,a.yPos)}};module$exports$Blockly$blockRendering$Drawer.Drawer.prototype.positionPreviousConnection_=function(){var a=this.info_.topRow;if(a.connection){var b=a.xPos+a.notchOffset;a.connection.connectionModel.setOffsetInBlock(this.info_.RTL?-b:b,0)}};
860
860
  module$exports$Blockly$blockRendering$Drawer.Drawer.prototype.positionNextConnection_=function(){var a=this.info_.bottomRow;if(a.connection){var b=a.connection,c=b.xPos;b.connectionModel.setOffsetInBlock(this.info_.RTL?-c:c,a.baseline)}};
861
861
  module$exports$Blockly$blockRendering$Drawer.Drawer.prototype.positionOutputConnection_=function(){if(this.info_.outputConnection){var a=this.info_.startX+this.info_.outputConnection.connectionOffsetX;this.block_.outputConnection.setOffsetInBlock(this.info_.RTL?-a:a,this.info_.outputConnection.connectionOffsetY)}};var module$exports$Blockly$blockRendering$ExternalValueInput={ExternalValueInput:function(a,b){module$exports$Blockly$blockRendering$ExternalValueInput.ExternalValueInput.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.EXTERNAL_VALUE_INPUT;this.height=this.connectedBlock?this.connectedBlockHeight-this.constants_.TAB_OFFSET_FROM_TOP-this.constants_.MEDIUM_PADDING:this.shape.height;this.width=this.shape.width+this.constants_.EXTERNAL_VALUE_INPUT_PADDING;
862
- this.connectionOffsetY=this.constants_.TAB_OFFSET_FROM_TOP;this.connectionHeight=this.shape.height;this.connectionWidth=this.shape.width}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$ExternalValueInput.ExternalValueInput,module$exports$Blockly$blockRendering$InputConnection.InputConnection);var module$exports$Blockly$blockRendering$Field={Field:function(a,b,c){module$exports$Blockly$blockRendering$Field.Field.superClass_.constructor.call(this,a);this.field=b;this.isEditable=b.EDITABLE;this.flipRtl=b.getFlipRtl();this.type|=module$exports$Blockly$blockRendering$Types.Types.FIELD;a=this.field.getSize();this.height=a.height;this.width=a.width;this.parentInput=c}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$Field.Field,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$Hat={Hat:function(a){module$exports$Blockly$blockRendering$Hat.Hat.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.HAT;this.height=this.constants_.START_HAT.height;this.width=this.constants_.START_HAT.width;this.ascenderHeight=this.height}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$Hat.Hat,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$Icon={Icon:function(a,b){module$exports$Blockly$blockRendering$Icon.Icon.superClass_.constructor.call(this,a);this.icon=b;this.isVisible=b.isVisible();this.type|=module$exports$Blockly$blockRendering$Types.Types.ICON;a=b.getCorrectedSize();this.height=a.height;this.width=a.width}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$Icon.Icon,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$InRowSpacer={InRowSpacer:function(a,b){module$exports$Blockly$blockRendering$InRowSpacer.InRowSpacer.superClass_.constructor.call(this,a);this.type=this.type|module$exports$Blockly$blockRendering$Types.Types.SPACER|module$exports$Blockly$blockRendering$Types.Types.IN_ROW_SPACER;this.width=b;this.height=this.constants_.SPACER_DEFAULT_HEIGHT}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$InRowSpacer.InRowSpacer,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$InputRow={InputRow:function(a){module$exports$Blockly$blockRendering$InputRow.InputRow.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.INPUT_ROW;this.connectedBlockWidths=0}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$InputRow.InputRow,module$exports$Blockly$blockRendering$Row.Row);
862
+ this.connectionOffsetY=this.constants_.TAB_OFFSET_FROM_TOP;this.connectionHeight=this.shape.height;this.connectionWidth=this.shape.width}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$ExternalValueInput.ExternalValueInput,module$exports$Blockly$blockRendering$InputConnection.InputConnection);var module$exports$Blockly$blockRendering$Field={Field:function(a,b,c){module$exports$Blockly$blockRendering$Field.Field.superClass_.constructor.call(this,a);this.field=b;this.isEditable=b.EDITABLE;this.flipRtl=b.getFlipRtl();this.type|=module$exports$Blockly$blockRendering$Types.Types.FIELD;a=this.field.getSize();this.height=a.height;this.width=a.width;this.parentInput=c}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$Field.Field,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$Hat={Hat:function(a){module$exports$Blockly$blockRendering$Hat.Hat.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.HAT;this.height=this.constants_.START_HAT.height;this.width=this.constants_.START_HAT.width;this.ascenderHeight=this.height}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$Hat.Hat,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$Icon={Icon:function(a,b){module$exports$Blockly$blockRendering$Icon.Icon.superClass_.constructor.call(this,a);this.icon=b;this.isVisible=b.isVisible();this.type|=module$exports$Blockly$blockRendering$Types.Types.ICON;a=b.getCorrectedSize();this.height=a.height;this.width=a.width}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$Icon.Icon,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$InRowSpacer={InRowSpacer:function(a,b){module$exports$Blockly$blockRendering$InRowSpacer.InRowSpacer.superClass_.constructor.call(this,a);this.type=this.type|module$exports$Blockly$blockRendering$Types.Types.SPACER|module$exports$Blockly$blockRendering$Types.Types.IN_ROW_SPACER;this.width=b;this.height=this.constants_.SPACER_DEFAULT_HEIGHT}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$InRowSpacer.InRowSpacer,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$InputRow={InputRow:function(a){module$exports$Blockly$blockRendering$InputRow.InputRow.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.INPUT_ROW;this.connectedBlockWidths=0}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$InputRow.InputRow,module$exports$Blockly$blockRendering$Row.Row);
863
863
  module$exports$Blockly$blockRendering$InputRow.InputRow.prototype.measure=function(){this.width=this.minWidth;this.height=this.minHeight;for(var a=0,b=0;b<this.elements.length;b++){var c=this.elements[b];this.width+=c.width;module$exports$Blockly$blockRendering$Types.Types.isInput(c)&&(module$exports$Blockly$blockRendering$Types.Types.isStatementInput(c)?a+=c.connectedBlockWidth:module$exports$Blockly$blockRendering$Types.Types.isExternalInput(c)&&0!==c.connectedBlockWidth&&(a+=c.connectedBlockWidth-
864
- c.connectionWidth));module$exports$Blockly$blockRendering$Types.Types.isSpacer(c)||(this.height=Math.max(this.height,c.height))}this.connectedBlockWidths=a;this.widthWithConnectedBlocks=this.width+a};module$exports$Blockly$blockRendering$InputRow.InputRow.prototype.endsWithElemSpacer=function(){return!this.hasExternalInput&&!this.hasStatement};var module$exports$Blockly$blockRendering$JaggedEdge={JaggedEdge:function(a){module$exports$Blockly$blockRendering$JaggedEdge.JaggedEdge.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.JAGGED_EDGE;this.height=this.constants_.JAGGED_TEETH.height;this.width=this.constants_.JAGGED_TEETH.width}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$JaggedEdge.JaggedEdge,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$MarkerSvg={},module$contents$Blockly$blockRendering$MarkerSvg_CURSOR_CLASS="blocklyCursor",module$contents$Blockly$blockRendering$MarkerSvg_MARKER_CLASS="blocklyMarker",module$contents$Blockly$blockRendering$MarkerSvg_HEIGHT_MULTIPLIER=.75;
864
+ c.connectionWidth));module$exports$Blockly$blockRendering$Types.Types.isSpacer(c)||(this.height=Math.max(this.height,c.height))}this.connectedBlockWidths=a;this.widthWithConnectedBlocks=this.width+a};module$exports$Blockly$blockRendering$InputRow.InputRow.prototype.endsWithElemSpacer=function(){return!this.hasExternalInput&&!this.hasStatement};var module$exports$Blockly$blockRendering$JaggedEdge={JaggedEdge:function(a){module$exports$Blockly$blockRendering$JaggedEdge.JaggedEdge.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.JAGGED_EDGE;this.height=this.constants_.JAGGED_TEETH.height;this.width=this.constants_.JAGGED_TEETH.width}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$JaggedEdge.JaggedEdge,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$MarkerSvg={},module$contents$Blockly$blockRendering$MarkerSvg_CURSOR_CLASS="blocklyCursor",module$contents$Blockly$blockRendering$MarkerSvg_MARKER_CLASS="blocklyMarker",module$contents$Blockly$blockRendering$MarkerSvg_HEIGHT_MULTIPLIER=.75;
865
865
  module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg=function(a,b,c){this.workspace_=a;this.marker_=c;this.parent_=null;this.constants_=b;this.currentMarkerSvg=null;a=this.isCursor()?this.constants_.CURSOR_COLOUR:this.constants_.MARKER_COLOUR;this.colour_=c.colour||a};module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg.prototype.getSvgRoot=function(){return this.svgGroup_};module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg.prototype.getMarker=function(){return this.marker_};
866
866
  module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg.prototype.isCursor=function(){return"cursor"===this.marker_.type};
867
867
  module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg.prototype.createDom=function(){var a=this.isCursor()?module$contents$Blockly$blockRendering$MarkerSvg_CURSOR_CLASS:module$contents$Blockly$blockRendering$MarkerSvg_MARKER_CLASS;this.svgGroup_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.G,{"class":a},null);this.createDomInternal_();return this.svgGroup_};
@@ -891,8 +891,8 @@ this.markerSvg_);this.markerSvgRect_=(0,module$exports$Blockly$utils$dom.createS
891
891
  style:"display: none",fill:"none","stroke-width":this.constants_.CURSOR_STROKE_WIDTH},this.markerSvg_);if(this.isCursor()){var a=this.getBlinkProperties_();(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.ANIMATE,a,this.markerSvgLine_);(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.ANIMATE,a,this.markerInput_);a.attributeName="stroke";(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.ANIMATE,
892
892
  a,this.markerBlock_)}return this.markerSvg_};
893
893
  module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg.prototype.applyColour_=function(a){this.markerSvgLine_.setAttribute("fill",this.colour_);this.markerSvgRect_.setAttribute("stroke",this.colour_);this.markerInput_.setAttribute("fill",this.colour_);this.markerBlock_.setAttribute("stroke",this.colour_);this.isCursor()&&(a=this.colour_+";transparent;transparent;",this.markerSvgLine_.firstChild.setAttribute("values",a),this.markerInput_.firstChild.setAttribute("values",a),this.markerBlock_.firstChild.setAttribute("values",
894
- a))};module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg.prototype.dispose=function(){this.svgGroup_&&(0,module$exports$Blockly$utils$dom.removeNode)(this.svgGroup_)};var module$exports$Blockly$blockRendering$NextConnection={NextConnection:function(a,b){module$exports$Blockly$blockRendering$NextConnection.NextConnection.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.NEXT_CONNECTION;this.height=this.shape.height;this.width=this.shape.width}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$NextConnection.NextConnection,module$exports$Blockly$blockRendering$Connection.Connection);var module$exports$Blockly$blockRendering$OutputConnection={OutputConnection:function(a,b){module$exports$Blockly$blockRendering$OutputConnection.OutputConnection.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.OUTPUT_CONNECTION;this.height=this.isDynamicShape?0:this.shape.height;this.startX=this.width=this.isDynamicShape?0:this.shape.width;this.connectionOffsetY=this.constants_.TAB_OFFSET_FROM_TOP;this.connectionOffsetX=0}};
895
- (0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$OutputConnection.OutputConnection,module$exports$Blockly$blockRendering$Connection.Connection);var module$exports$Blockly$blockRendering$PreviousConnection={PreviousConnection:function(a,b){module$exports$Blockly$blockRendering$PreviousConnection.PreviousConnection.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.PREVIOUS_CONNECTION;this.height=this.shape.height;this.width=this.shape.width}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$PreviousConnection.PreviousConnection,module$exports$Blockly$blockRendering$Connection.Connection);$.module$exports$Blockly$Input={Align:{LEFT:-1,CENTRE:0,RIGHT:1},Input:function(a,b,c,d){if(a!==$.module$exports$Blockly$inputTypes.inputTypes.DUMMY&&!b)throw Error("Value inputs and statement inputs must have non-empty name.");this.type=a;this.name=b;this.sourceBlock_=c;this.connection=d;this.fieldRow=[]}};$.module$exports$Blockly$Input.Input.prototype.align=$.module$exports$Blockly$Input.Align.LEFT;$.module$exports$Blockly$Input.Input.prototype.visible_=!0;
894
+ a))};module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg.prototype.dispose=function(){this.svgGroup_&&(0,module$exports$Blockly$utils$dom.removeNode)(this.svgGroup_)};var module$exports$Blockly$blockRendering$NextConnection={NextConnection:function(a,b){module$exports$Blockly$blockRendering$NextConnection.NextConnection.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.NEXT_CONNECTION;this.height=this.shape.height;this.width=this.shape.width}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$NextConnection.NextConnection,module$exports$Blockly$blockRendering$Connection.Connection);var module$exports$Blockly$blockRendering$OutputConnection={OutputConnection:function(a,b){module$exports$Blockly$blockRendering$OutputConnection.OutputConnection.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.OUTPUT_CONNECTION;this.height=this.isDynamicShape?0:this.shape.height;this.startX=this.width=this.isDynamicShape?0:this.shape.width;this.connectionOffsetY=this.constants_.TAB_OFFSET_FROM_TOP;this.connectionOffsetX=0}};
895
+ (0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$OutputConnection.OutputConnection,module$exports$Blockly$blockRendering$Connection.Connection);var module$exports$Blockly$blockRendering$PreviousConnection={PreviousConnection:function(a,b){module$exports$Blockly$blockRendering$PreviousConnection.PreviousConnection.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.PREVIOUS_CONNECTION;this.height=this.shape.height;this.width=this.shape.width}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$PreviousConnection.PreviousConnection,module$exports$Blockly$blockRendering$Connection.Connection);$.module$exports$Blockly$Input={Align:{LEFT:-1,CENTRE:0,RIGHT:1},Input:function(a,b,c,d){if(a!==$.module$exports$Blockly$inputTypes.inputTypes.DUMMY&&!b)throw Error("Value inputs and statement inputs must have non-empty name.");this.type=a;this.name=b;this.sourceBlock_=c;this.connection=d;this.fieldRow=[]}};$.module$exports$Blockly$Input.Input.prototype.align=$.module$exports$Blockly$Input.Align.LEFT;$.module$exports$Blockly$Input.Input.prototype.visible_=!0;
896
896
  $.module$exports$Blockly$Input.Input.prototype.getSourceBlock=function(){return this.sourceBlock_};$.module$exports$Blockly$Input.Input.prototype.appendField=function(a,b){this.insertFieldAt(this.fieldRow.length,a,b);return this};
897
897
  $.module$exports$Blockly$Input.Input.prototype.insertFieldAt=function(a,b,c){if(0>a||a>this.fieldRow.length)throw Error("index "+a+" out of bounds.");if(!(b||""===b&&c))return a;"string"===typeof b&&(b=(0,module$exports$Blockly$fieldRegistry.fromJson)({type:"field_label",text:b}));b.setSourceBlock(this.sourceBlock_);this.sourceBlock_.rendered&&(b.init(),b.applyColour());b.name=c;b.setVisible(this.isVisible());b.prefixField&&(a=this.insertFieldAt(a,b.prefixField));this.fieldRow.splice(a,0,b);a++;b.suffixField&&
898
898
  (a=this.insertFieldAt(a,b.suffixField));this.sourceBlock_.rendered&&(this.sourceBlock_=this.sourceBlock_,this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours());return a};
@@ -901,10 +901,10 @@ $.module$exports$Blockly$Input.Input.prototype.setVisible=function(a){var b=[];i
901
901
  $.module$exports$Blockly$Input.Input.prototype.setCheck=function(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setCheck(a);return this};$.module$exports$Blockly$Input.Input.prototype.setAlign=function(a){this.align=a;this.sourceBlock_.rendered&&(this.sourceBlock_=this.sourceBlock_,this.sourceBlock_.render());return this};
902
902
  $.module$exports$Blockly$Input.Input.prototype.setShadowDom=function(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setShadowDom(a);return this};$.module$exports$Blockly$Input.Input.prototype.getShadowDom=function(){if(!this.connection)throw Error("This input does not have a connection.");return this.connection.getShadowDom()};$.module$exports$Blockly$Input.Input.prototype.init=function(){if(this.sourceBlock_.workspace.rendered)for(var a=0;a<this.fieldRow.length;a++)this.fieldRow[a].init()};
903
903
  $.module$exports$Blockly$Input.Input.prototype.dispose=function(){for(var a=0,b;b=this.fieldRow[a];a++)b.dispose();this.connection&&this.connection.dispose();this.sourceBlock_=null};var module$exports$Blockly$blockRendering$RoundCorner={RoundCorner:function(a,b){module$exports$Blockly$blockRendering$RoundCorner.RoundCorner.superClass_.constructor.call(this,a);this.type=(b&&"left"!==b?module$exports$Blockly$blockRendering$Types.Types.RIGHT_ROUND_CORNER:module$exports$Blockly$blockRendering$Types.Types.LEFT_ROUND_CORNER)|module$exports$Blockly$blockRendering$Types.Types.CORNER;this.width=this.constants_.CORNER_RADIUS;this.height=this.constants_.CORNER_RADIUS/2}};
904
- (0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$RoundCorner.RoundCorner,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$SpacerRow={SpacerRow:function(a,b,c){module$exports$Blockly$blockRendering$SpacerRow.SpacerRow.superClass_.constructor.call(this,a);this.type=this.type|module$exports$Blockly$blockRendering$Types.Types.SPACER|module$exports$Blockly$blockRendering$Types.Types.BETWEEN_ROW_SPACER;this.width=c;this.height=b;this.followsStatement=!1;this.widthWithConnectedBlocks=0;this.elements=[new module$exports$Blockly$blockRendering$InRowSpacer.InRowSpacer(this.constants_,
905
- c)]}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$SpacerRow.SpacerRow,module$exports$Blockly$blockRendering$Row.Row);module$exports$Blockly$blockRendering$SpacerRow.SpacerRow.prototype.measure=function(){};var module$exports$Blockly$blockRendering$SquareCorner={SquareCorner:function(a,b){module$exports$Blockly$blockRendering$SquareCorner.SquareCorner.superClass_.constructor.call(this,a);this.type=(b&&"left"!==b?module$exports$Blockly$blockRendering$Types.Types.RIGHT_SQUARE_CORNER:module$exports$Blockly$blockRendering$Types.Types.LEFT_SQUARE_CORNER)|module$exports$Blockly$blockRendering$Types.Types.CORNER;this.width=this.height=this.constants_.NO_PADDING}};
906
- (0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$SquareCorner.SquareCorner,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$StatementInput={StatementInput:function(a,b){module$exports$Blockly$blockRendering$StatementInput.StatementInput.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.STATEMENT_INPUT;this.height=this.connectedBlock?this.connectedBlockHeight+this.constants_.STATEMENT_BOTTOM_SPACER:this.constants_.EMPTY_STATEMENT_INPUT_HEIGHT;this.width=this.constants_.STATEMENT_INPUT_NOTCH_OFFSET+this.shape.width}};
907
- (0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$StatementInput.StatementInput,module$exports$Blockly$blockRendering$InputConnection.InputConnection);var module$exports$Blockly$blockRendering$TopRow={TopRow:function(a){module$exports$Blockly$blockRendering$TopRow.TopRow.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.TOP_ROW;this.ascenderHeight=this.capline=0;this.hasPreviousConnection=!1;this.connection=null}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$TopRow.TopRow,module$exports$Blockly$blockRendering$Row.Row);
904
+ (0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$RoundCorner.RoundCorner,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$SpacerRow={SpacerRow:function(a,b,c){module$exports$Blockly$blockRendering$SpacerRow.SpacerRow.superClass_.constructor.call(this,a);this.type=this.type|module$exports$Blockly$blockRendering$Types.Types.SPACER|module$exports$Blockly$blockRendering$Types.Types.BETWEEN_ROW_SPACER;this.width=c;this.height=b;this.followsStatement=!1;this.widthWithConnectedBlocks=0;this.elements=[new module$exports$Blockly$blockRendering$InRowSpacer.InRowSpacer(this.constants_,
905
+ c)]}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$SpacerRow.SpacerRow,module$exports$Blockly$blockRendering$Row.Row);module$exports$Blockly$blockRendering$SpacerRow.SpacerRow.prototype.measure=function(){};var module$exports$Blockly$blockRendering$SquareCorner={SquareCorner:function(a,b){module$exports$Blockly$blockRendering$SquareCorner.SquareCorner.superClass_.constructor.call(this,a);this.type=(b&&"left"!==b?module$exports$Blockly$blockRendering$Types.Types.RIGHT_SQUARE_CORNER:module$exports$Blockly$blockRendering$Types.Types.LEFT_SQUARE_CORNER)|module$exports$Blockly$blockRendering$Types.Types.CORNER;this.width=this.height=this.constants_.NO_PADDING}};
906
+ (0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$SquareCorner.SquareCorner,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$blockRendering$StatementInput={StatementInput:function(a,b){module$exports$Blockly$blockRendering$StatementInput.StatementInput.superClass_.constructor.call(this,a,b);this.type|=module$exports$Blockly$blockRendering$Types.Types.STATEMENT_INPUT;this.height=this.connectedBlock?this.connectedBlockHeight+this.constants_.STATEMENT_BOTTOM_SPACER:this.constants_.EMPTY_STATEMENT_INPUT_HEIGHT;this.width=this.constants_.STATEMENT_INPUT_NOTCH_OFFSET+this.shape.width}};
907
+ (0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$StatementInput.StatementInput,module$exports$Blockly$blockRendering$InputConnection.InputConnection);var module$exports$Blockly$blockRendering$TopRow={TopRow:function(a){module$exports$Blockly$blockRendering$TopRow.TopRow.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.TOP_ROW;this.ascenderHeight=this.capline=0;this.hasPreviousConnection=!1;this.connection=null}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$blockRendering$TopRow.TopRow,module$exports$Blockly$blockRendering$Row.Row);
908
908
  module$exports$Blockly$blockRendering$TopRow.TopRow.prototype.hasLeftSquareCorner=function(a){var b=(a.hat?"cap"===a.hat:this.constants_.ADD_START_HATS)&&!a.outputConnection&&!a.previousConnection,c=a.getPreviousBlock();return!!a.outputConnection||b||(c?c.getNextBlock()===a:!1)};module$exports$Blockly$blockRendering$TopRow.TopRow.prototype.hasRightSquareCorner=function(a){return!0};
909
909
  module$exports$Blockly$blockRendering$TopRow.TopRow.prototype.measure=function(){for(var a=0,b=0,c=0,d=0;d<this.elements.length;d++){var e=this.elements[d];b+=e.width;module$exports$Blockly$blockRendering$Types.Types.isSpacer(e)||(module$exports$Blockly$blockRendering$Types.Types.isHat(e)?c=Math.max(c,e.ascenderHeight):a=Math.max(a,e.height))}this.width=Math.max(this.minWidth,b);this.height=Math.max(this.minHeight,a)+c;this.capline=this.ascenderHeight=c;this.widthWithConnectedBlocks=this.width};
910
910
  module$exports$Blockly$blockRendering$TopRow.TopRow.prototype.startsWithElemSpacer=function(){return!1};module$exports$Blockly$blockRendering$TopRow.TopRow.prototype.endsWithElemSpacer=function(){return!1};var module$exports$Blockly$blockRendering$RenderInfo={RenderInfo:function(a,b){this.block_=b;this.renderer_=a;this.constants_=this.renderer_.getConstants();this.outputConnection=b.outputConnection?new module$exports$Blockly$blockRendering$OutputConnection.OutputConnection(this.constants_,b.outputConnection):null;this.isInline=b.getInputsInline()&&!b.isCollapsed();this.isCollapsed=b.isCollapsed();this.isInsertionMarker=b.isInsertionMarker();this.RTL=b.RTL;this.statementEdge=this.width=this.widthWithChildren=
@@ -937,9 +937,9 @@ module$exports$Blockly$blockRendering$RenderInfo.RenderInfo.prototype.getSpacerR
937
937
  module$exports$Blockly$blockRendering$RenderInfo.RenderInfo.prototype.getElemCenterline_=function(a,b){return module$exports$Blockly$blockRendering$Types.Types.isSpacer(b)?a.yPos+b.height/2:module$exports$Blockly$blockRendering$Types.Types.isBottomRow(a)?(a=a.yPos+a.height-a.descenderHeight,module$exports$Blockly$blockRendering$Types.Types.isNextConnection(b)?a+b.height/2:a-b.height/2):module$exports$Blockly$blockRendering$Types.Types.isTopRow(a)?module$exports$Blockly$blockRendering$Types.Types.isHat(b)?
938
938
  a.capline-b.height/2:a.capline+b.height/2:a.yPos+a.height/2};module$exports$Blockly$blockRendering$RenderInfo.RenderInfo.prototype.recordElemPositions_=function(a){for(var b=a.xPos,c=0,d;d=a.elements[c];c++)module$exports$Blockly$blockRendering$Types.Types.isSpacer(d)&&(d.height=a.height),d.xPos=b,d.centerline=this.getElemCenterline_(a,d),b+=d.width};
939
939
  module$exports$Blockly$blockRendering$RenderInfo.RenderInfo.prototype.finalize_=function(){for(var a=0,b=0,c=0,d;d=this.rows[c];c++)d.yPos=b,d.xPos=this.startX,b+=d.height,a=Math.max(a,d.widthWithConnectedBlocks),this.recordElemPositions_(d);this.outputConnection&&this.block_.nextConnection&&this.block_.nextConnection.isConnected()&&(a=Math.max(a,this.block_.nextConnection.targetBlock().getHeightWidth().width));this.widthWithChildren=a+this.startX;this.height=b;this.startY=this.topRow.capline;this.bottomRow.baseline=
940
- b-this.bottomRow.descenderHeight};var module$exports$Blockly$blockRendering$Renderer={Renderer:function(a){this.name=a;this.overrides=this.constants_=null}};module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.getClassName=function(){return this.name+"-renderer"};module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.init=function(a,b){this.constants_=this.makeConstants_();b&&(this.overrides=b,(0,module$exports$Blockly$utils$object.mixin)(this.constants_,b));this.constants_.setTheme(a);this.constants_.init()};
940
+ b-this.bottomRow.descenderHeight};var module$exports$Blockly$blockRendering$Renderer={Renderer:function(a){this.name=a;this.overrides=this.constants_=null}};module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.getClassName=function(){return this.name+"-renderer"};module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.init=function(a,b){this.constants_=this.makeConstants_();b&&(this.overrides=b,(0,$.module$exports$Blockly$utils$object.mixin)(this.constants_,b));this.constants_.setTheme(a);this.constants_.init()};
941
941
  module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.createDom=function(a,b){this.constants_.createDom(a,this.name+"-"+b.name,"."+this.getClassName()+"."+b.getClassName())};
942
- module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.refreshDom=function(a,b){var c=this.getConstants();c.dispose();this.constants_=this.makeConstants_();this.overrides&&(0,module$exports$Blockly$utils$object.mixin)(this.constants_,this.overrides);this.constants_.randomIdentifier=c.randomIdentifier;this.constants_.setTheme(b);this.constants_.init();this.createDom(a,b)};module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.dispose=function(){this.constants_&&this.constants_.dispose()};
942
+ module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.refreshDom=function(a,b){var c=this.getConstants();c.dispose();this.constants_=this.makeConstants_();this.overrides&&(0,$.module$exports$Blockly$utils$object.mixin)(this.constants_,this.overrides);this.constants_.randomIdentifier=c.randomIdentifier;this.constants_.setTheme(b);this.constants_.init();this.createDom(a,b)};module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.dispose=function(){this.constants_&&this.constants_.dispose()};
943
943
  module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.makeConstants_=function(){return new module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider};module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.makeRenderInfo_=function(a){return new module$exports$Blockly$blockRendering$RenderInfo.RenderInfo(this,a)};
944
944
  module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.makeDrawer_=function(a,b){return new module$exports$Blockly$blockRendering$Drawer.Drawer(a,b)};module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.makeDebugger_=function(){var a=module$exports$Blockly$blockRendering$Debug.Debug;if(!a)throw Error("Missing require for Blockly.blockRendering.Debug");return new a(this.getConstants())};
945
945
  module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.makeMarkerDrawer=function(a,b){return new module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg(a,this.getConstants(),b)};module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.makePathObject=function(a,b){return new module$exports$Blockly$blockRendering$PathObject.PathObject(a,b,this.constants_)};module$exports$Blockly$blockRendering$Renderer.Renderer.prototype.getConstants=function(){return this.constants_};
@@ -967,7 +967,7 @@ module$exports$Blockly$geras$Highlighter.Highlighter.prototype.drawBottomRow=fun
967
967
  module$exports$Blockly$geras$Highlighter.Highlighter.prototype.drawLeft=function(){var a=this.info_.outputConnection;a&&(a=a.connectionOffsetY+a.height,this.RTL_?this.steps_+=(0,module$exports$Blockly$utils$svgPaths.moveTo)(this.info_.startX,a):(this.steps_+=(0,module$exports$Blockly$utils$svgPaths.moveTo)(this.info_.startX+this.highlightOffset_,this.info_.bottomRow.baseline-this.highlightOffset_),this.steps_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("V",a)),this.steps_+=this.puzzleTabPaths_.pathUp(this.RTL_));
968
968
  this.RTL_||(a=this.info_.topRow,module$exports$Blockly$blockRendering$Types.Types.isLeftRoundedCorner(a.elements[0])?this.steps_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("V",this.outsideCornerPaths_.height):this.steps_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("V",a.capline+this.highlightOffset_))};
969
969
  module$exports$Blockly$geras$Highlighter.Highlighter.prototype.drawInlineInput=function(a){var b=this.highlightOffset_,c=a.xPos+a.connectionWidth,d=a.centerline-a.height/2,e=a.width-a.connectionWidth,f=d+b;this.RTL_?(d=a.connectionOffsetY-b,a=a.height-(a.connectionOffsetY+a.connectionHeight)+b,this.inlineSteps_+=(0,module$exports$Blockly$utils$svgPaths.moveTo)(c-b,f)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("v",d)+this.puzzleTabPaths_.pathDown(this.RTL_)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("v",
970
- a)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",e)):this.inlineSteps_+=(0,module$exports$Blockly$utils$svgPaths.moveTo)(a.xPos+a.width+b,f)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("v",a.height)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",-e)+(0,module$exports$Blockly$utils$svgPaths.moveTo)(c,d+a.connectionOffsetY)+this.puzzleTabPaths_.pathDown(this.RTL_)};var module$exports$Blockly$geras$Drawer={Drawer:function(a,b){module$exports$Blockly$geras$Drawer.Drawer.superClass_.constructor.call(this,a,b);this.highlighter_=new module$exports$Blockly$geras$Highlighter.Highlighter(b)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$Drawer.Drawer,module$exports$Blockly$blockRendering$Drawer.Drawer);
970
+ a)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",e)):this.inlineSteps_+=(0,module$exports$Blockly$utils$svgPaths.moveTo)(a.xPos+a.width+b,f)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("v",a.height)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",-e)+(0,module$exports$Blockly$utils$svgPaths.moveTo)(c,d+a.connectionOffsetY)+this.puzzleTabPaths_.pathDown(this.RTL_)};var module$exports$Blockly$geras$Drawer={Drawer:function(a,b){module$exports$Blockly$geras$Drawer.Drawer.superClass_.constructor.call(this,a,b);this.highlighter_=new module$exports$Blockly$geras$Highlighter.Highlighter(b)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$Drawer.Drawer,module$exports$Blockly$blockRendering$Drawer.Drawer);
971
971
  module$exports$Blockly$geras$Drawer.Drawer.prototype.draw=function(){this.hideHiddenIcons_();this.drawOutline_();this.drawInternals_();var a=this.block_.pathObject;a.setPath(this.outlinePath_+"\n"+this.inlinePath_);a.setHighlightPath(this.highlighter_.getPath());this.info_.RTL&&a.flipRTL();(0,module$exports$Blockly$blockRendering$debug.isDebuggerEnabled)()&&this.block_.renderingDebugger.drawDebug(this.block_,this.info_);this.recordSizeOnBlock_()};
972
972
  module$exports$Blockly$geras$Drawer.Drawer.prototype.drawTop_=function(){this.highlighter_.drawTopCorner(this.info_.topRow);this.highlighter_.drawRightSideRow(this.info_.topRow);module$exports$Blockly$geras$Drawer.Drawer.superClass_.drawTop_.call(this)};module$exports$Blockly$geras$Drawer.Drawer.prototype.drawJaggedEdge_=function(a){this.highlighter_.drawJaggedEdge_(a);module$exports$Blockly$geras$Drawer.Drawer.superClass_.drawJaggedEdge_.call(this,a)};
973
973
  module$exports$Blockly$geras$Drawer.Drawer.prototype.drawValueInput_=function(a){this.highlighter_.drawValueInput(a);module$exports$Blockly$geras$Drawer.Drawer.superClass_.drawValueInput_.call(this,a)};module$exports$Blockly$geras$Drawer.Drawer.prototype.drawStatementInput_=function(a){this.highlighter_.drawStatementInput(a);module$exports$Blockly$geras$Drawer.Drawer.superClass_.drawStatementInput_.call(this,a)};
@@ -976,7 +976,7 @@ module$exports$Blockly$geras$Drawer.Drawer.prototype.drawLeft_=function(){this.h
976
976
  module$exports$Blockly$geras$Drawer.Drawer.prototype.positionInlineInputConnection_=function(a){var b=a.centerline-a.height/2;if(a.connectionModel){var c=a.xPos+a.connectionWidth+this.constants_.DARK_PATH_OFFSET;this.info_.RTL&&(c*=-1);a.connectionModel.setOffsetInBlock(c,b+a.connectionOffsetY+this.constants_.DARK_PATH_OFFSET)}};
977
977
  module$exports$Blockly$geras$Drawer.Drawer.prototype.positionStatementInputConnection_=function(a){var b=a.getLastInput();if(b.connectionModel){var c=a.xPos+a.statementEdge+b.notchOffset;c=this.info_.RTL?-1*c:c+this.constants_.DARK_PATH_OFFSET;b.connectionModel.setOffsetInBlock(c,a.yPos+this.constants_.DARK_PATH_OFFSET)}};
978
978
  module$exports$Blockly$geras$Drawer.Drawer.prototype.positionExternalValueConnection_=function(a){var b=a.getLastInput();if(b.connectionModel){var c=a.xPos+a.width+this.constants_.DARK_PATH_OFFSET;this.info_.RTL&&(c*=-1);b.connectionModel.setOffsetInBlock(c,a.yPos)}};
979
- module$exports$Blockly$geras$Drawer.Drawer.prototype.positionNextConnection_=function(){var a=this.info_.bottomRow;if(a.connection){var b=a.connection,c=b.xPos;b.connectionModel.setOffsetInBlock((this.info_.RTL?-c:c)+this.constants_.DARK_PATH_OFFSET/2,a.baseline+this.constants_.DARK_PATH_OFFSET)}};var module$exports$Blockly$geras$StatementInput={StatementInput:function(a,b){module$exports$Blockly$geras$StatementInput.StatementInput.superClass_.constructor.call(this,a,b);this.connectedBlock&&(this.height+=this.constants_.DARK_PATH_OFFSET)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$StatementInput.StatementInput,module$exports$Blockly$blockRendering$StatementInput.StatementInput);var module$exports$Blockly$geras$RenderInfo={RenderInfo:function(a,b){module$exports$Blockly$geras$RenderInfo.RenderInfo.superClass_.constructor.call(this,a,b)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$RenderInfo.RenderInfo,module$exports$Blockly$blockRendering$RenderInfo.RenderInfo);module$exports$Blockly$geras$RenderInfo.RenderInfo.prototype.getRenderer=function(){return this.renderer_};
979
+ module$exports$Blockly$geras$Drawer.Drawer.prototype.positionNextConnection_=function(){var a=this.info_.bottomRow;if(a.connection){var b=a.connection,c=b.xPos;b.connectionModel.setOffsetInBlock((this.info_.RTL?-c:c)+this.constants_.DARK_PATH_OFFSET/2,a.baseline+this.constants_.DARK_PATH_OFFSET)}};var module$exports$Blockly$geras$StatementInput={StatementInput:function(a,b){module$exports$Blockly$geras$StatementInput.StatementInput.superClass_.constructor.call(this,a,b);this.connectedBlock&&(this.height+=this.constants_.DARK_PATH_OFFSET)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$StatementInput.StatementInput,module$exports$Blockly$blockRendering$StatementInput.StatementInput);var module$exports$Blockly$geras$RenderInfo={RenderInfo:function(a,b){module$exports$Blockly$geras$RenderInfo.RenderInfo.superClass_.constructor.call(this,a,b)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$RenderInfo.RenderInfo,module$exports$Blockly$blockRendering$RenderInfo.RenderInfo);module$exports$Blockly$geras$RenderInfo.RenderInfo.prototype.getRenderer=function(){return this.renderer_};
980
980
  module$exports$Blockly$geras$RenderInfo.RenderInfo.prototype.populateBottomRow_=function(){module$exports$Blockly$geras$RenderInfo.RenderInfo.superClass_.populateBottomRow_.call(this);this.block_.inputList.length&&this.block_.inputList[this.block_.inputList.length-1].type===$.module$exports$Blockly$inputTypes.inputTypes.STATEMENT||(this.bottomRow.minHeight=this.constants_.MEDIUM_PADDING-this.constants_.DARK_PATH_OFFSET)};
981
981
  module$exports$Blockly$geras$RenderInfo.RenderInfo.prototype.addInput_=function(a,b){this.isInline&&a.type===$.module$exports$Blockly$inputTypes.inputTypes.VALUE?(b.elements.push(new module$exports$Blockly$geras$InlineInput.InlineInput(this.constants_,a)),b.hasInlineInput=!0):a.type===$.module$exports$Blockly$inputTypes.inputTypes.STATEMENT?(b.elements.push(new module$exports$Blockly$geras$StatementInput.StatementInput(this.constants_,a)),b.hasStatement=!0):a.type===$.module$exports$Blockly$inputTypes.inputTypes.VALUE?
982
982
  (b.elements.push(new module$exports$Blockly$blockRendering$ExternalValueInput.ExternalValueInput(this.constants_,a)),b.hasExternalInput=!0):a.type===$.module$exports$Blockly$inputTypes.inputTypes.DUMMY&&(b.minHeight=Math.max(b.minHeight,this.constants_.DUMMY_INPUT_MIN_HEIGHT),b.hasDummyInput=!0);this.isInline||null!==b.align||(b.align=a.align)};
@@ -998,13 +998,13 @@ module$exports$Blockly$geras$RenderInfo.RenderInfo.prototype.alignRowElements_=f
998
998
  b.width=Math.max(c,b.nextRightEdge):(c=Math.max(c,b.nextRightEdge)-b.width,0<c&&this.addAlignmentPadding_(b,c),c=b.width)}else module$exports$Blockly$geras$RenderInfo.RenderInfo.superClass_.alignRowElements_.call(this)};
999
999
  module$exports$Blockly$geras$RenderInfo.RenderInfo.prototype.getDesiredRowWidth_=function(a){return this.isInline&&a.hasStatement?this.statementEdge+this.constants_.MAX_BOTTOM_WIDTH+this.startX:module$exports$Blockly$geras$RenderInfo.RenderInfo.superClass_.getDesiredRowWidth_.call(this,a)};
1000
1000
  module$exports$Blockly$geras$RenderInfo.RenderInfo.prototype.finalize_=function(){for(var a=0,b=0,c=0,d;d=this.rows[c];c++){d.yPos=b;d.xPos=this.startX;b+=d.height;a=Math.max(a,d.widthWithConnectedBlocks);var e=b-this.topRow.ascenderHeight;d===this.bottomRow&&e<this.constants_.MIN_BLOCK_HEIGHT&&(e=this.constants_.MIN_BLOCK_HEIGHT-e,this.bottomRow.height+=e,b+=e);this.recordElemPositions_(d)}this.outputConnection&&this.block_.nextConnection&&this.block_.nextConnection.isConnected()&&(a=Math.max(a,
1001
- this.block_.nextConnection.targetBlock().getHeightWidth().width-this.constants_.DARK_PATH_OFFSET));this.bottomRow.baseline=b-this.bottomRow.descenderHeight;this.widthWithChildren=a+this.startX+this.constants_.DARK_PATH_OFFSET;this.width+=this.constants_.DARK_PATH_OFFSET;this.height=b+this.constants_.DARK_PATH_OFFSET;this.startY=this.topRow.capline};var module$exports$Blockly$geras$Renderer={Renderer:function(a){module$exports$Blockly$geras$Renderer.Renderer.superClass_.constructor.call(this,a);this.highlightConstants_=null}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$Renderer.Renderer,module$exports$Blockly$blockRendering$Renderer.Renderer);
1001
+ this.block_.nextConnection.targetBlock().getHeightWidth().width-this.constants_.DARK_PATH_OFFSET));this.bottomRow.baseline=b-this.bottomRow.descenderHeight;this.widthWithChildren=a+this.startX+this.constants_.DARK_PATH_OFFSET;this.width+=this.constants_.DARK_PATH_OFFSET;this.height=b+this.constants_.DARK_PATH_OFFSET;this.startY=this.topRow.capline};var module$exports$Blockly$geras$Renderer={Renderer:function(a){module$exports$Blockly$geras$Renderer.Renderer.superClass_.constructor.call(this,a);this.highlightConstants_=null}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$geras$Renderer.Renderer,module$exports$Blockly$blockRendering$Renderer.Renderer);
1002
1002
  module$exports$Blockly$geras$Renderer.Renderer.prototype.init=function(a,b){module$exports$Blockly$geras$Renderer.Renderer.superClass_.init.call(this,a,b);this.highlightConstants_=this.makeHighlightConstants_();this.highlightConstants_.init()};module$exports$Blockly$geras$Renderer.Renderer.prototype.refreshDom=function(a,b){module$exports$Blockly$geras$Renderer.Renderer.superClass_.refreshDom.call(this,a,b);this.getHighlightConstants().init()};
1003
1003
  module$exports$Blockly$geras$Renderer.Renderer.prototype.makeConstants_=function(){return new module$exports$Blockly$geras$ConstantProvider.ConstantProvider};module$exports$Blockly$geras$Renderer.Renderer.prototype.makeRenderInfo_=function(a){return new module$exports$Blockly$geras$RenderInfo.RenderInfo(this,a)};module$exports$Blockly$geras$Renderer.Renderer.prototype.makeDrawer_=function(a,b){return new module$exports$Blockly$geras$Drawer.Drawer(a,b)};
1004
1004
  module$exports$Blockly$geras$Renderer.Renderer.prototype.makePathObject=function(a,b){return new module$exports$Blockly$geras$PathObject.PathObject(a,b,this.getConstants())};module$exports$Blockly$geras$Renderer.Renderer.prototype.makeHighlightConstants_=function(){return new module$exports$Blockly$geras$HighlightConstantProvider.HighlightConstantProvider(this.getConstants())};module$exports$Blockly$geras$Renderer.Renderer.prototype.getHighlightConstants=function(){return this.highlightConstants_};
1005
1005
  (0,module$exports$Blockly$blockRendering.register)("geras",module$exports$Blockly$geras$Renderer.Renderer);var module$exports$Blockly$geras={};module$exports$Blockly$geras.ConstantProvider=module$exports$Blockly$geras$ConstantProvider.ConstantProvider;module$exports$Blockly$geras.Drawer=module$exports$Blockly$geras$Drawer.Drawer;module$exports$Blockly$geras.HighlightConstantProvider=module$exports$Blockly$geras$HighlightConstantProvider.HighlightConstantProvider;module$exports$Blockly$geras.Highlighter=module$exports$Blockly$geras$Highlighter.Highlighter;module$exports$Blockly$geras.InlineInput=module$exports$Blockly$geras$InlineInput.InlineInput;
1006
- module$exports$Blockly$geras.PathObject=module$exports$Blockly$geras$PathObject.PathObject;module$exports$Blockly$geras.RenderInfo=module$exports$Blockly$geras$RenderInfo.RenderInfo;module$exports$Blockly$geras.Renderer=module$exports$Blockly$geras$Renderer.Renderer;module$exports$Blockly$geras.StatementInput=module$exports$Blockly$geras$StatementInput.StatementInput;var module$exports$Blockly$minimalist$ConstantProvider={ConstantProvider:function(){module$exports$Blockly$minimalist$ConstantProvider.ConstantProvider.superClass_.constructor.call(this)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$minimalist$ConstantProvider.ConstantProvider,module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider);var module$exports$Blockly$minimalist$Drawer={Drawer:function(a,b){module$exports$Blockly$minimalist$Drawer.Drawer.superClass_.constructor.call(this,a,b)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$minimalist$Drawer.Drawer,module$exports$Blockly$blockRendering$Drawer.Drawer);var module$exports$Blockly$minimalist$RenderInfo={RenderInfo:function(a,b){module$exports$Blockly$minimalist$RenderInfo.RenderInfo.superClass_.constructor.call(this,a,b)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$minimalist$RenderInfo.RenderInfo,module$exports$Blockly$blockRendering$RenderInfo.RenderInfo);module$exports$Blockly$minimalist$RenderInfo.RenderInfo.prototype.getRenderer=function(){return this.renderer_};var module$exports$Blockly$minimalist$Renderer={Renderer:function(a){module$exports$Blockly$minimalist$Renderer.Renderer.superClass_.constructor.call(this,a)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$minimalist$Renderer.Renderer,module$exports$Blockly$blockRendering$Renderer.Renderer);module$exports$Blockly$minimalist$Renderer.Renderer.prototype.makeConstants_=function(){return new module$exports$Blockly$minimalist$ConstantProvider.ConstantProvider};
1007
- module$exports$Blockly$minimalist$Renderer.Renderer.prototype.makeRenderInfo_=function(a){return new module$exports$Blockly$minimalist$RenderInfo.RenderInfo(this,a)};module$exports$Blockly$minimalist$Renderer.Renderer.prototype.makeDrawer_=function(a,b){return new module$exports$Blockly$minimalist$Drawer.Drawer(a,b)};(0,module$exports$Blockly$blockRendering.register)("minimalist",module$exports$Blockly$minimalist$Renderer.Renderer);var module$exports$Blockly$minimalist={};module$exports$Blockly$minimalist.ConstantProvider=module$exports$Blockly$minimalist$ConstantProvider.ConstantProvider;module$exports$Blockly$minimalist.Drawer=module$exports$Blockly$minimalist$Drawer.Drawer;module$exports$Blockly$minimalist.RenderInfo=module$exports$Blockly$minimalist$RenderInfo.RenderInfo;module$exports$Blockly$minimalist.Renderer=module$exports$Blockly$minimalist$Renderer.Renderer;var module$exports$Blockly$thrasos$RenderInfo={RenderInfo:function(a,b){module$exports$Blockly$thrasos$RenderInfo.RenderInfo.superClass_.constructor.call(this,a,b)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$thrasos$RenderInfo.RenderInfo,module$exports$Blockly$blockRendering$RenderInfo.RenderInfo);module$exports$Blockly$thrasos$RenderInfo.RenderInfo.prototype.getRenderer=function(){return this.renderer_};
1006
+ module$exports$Blockly$geras.PathObject=module$exports$Blockly$geras$PathObject.PathObject;module$exports$Blockly$geras.RenderInfo=module$exports$Blockly$geras$RenderInfo.RenderInfo;module$exports$Blockly$geras.Renderer=module$exports$Blockly$geras$Renderer.Renderer;module$exports$Blockly$geras.StatementInput=module$exports$Blockly$geras$StatementInput.StatementInput;var module$exports$Blockly$minimalist$ConstantProvider={ConstantProvider:function(){module$exports$Blockly$minimalist$ConstantProvider.ConstantProvider.superClass_.constructor.call(this)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$minimalist$ConstantProvider.ConstantProvider,module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider);var module$exports$Blockly$minimalist$Drawer={Drawer:function(a,b){module$exports$Blockly$minimalist$Drawer.Drawer.superClass_.constructor.call(this,a,b)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$minimalist$Drawer.Drawer,module$exports$Blockly$blockRendering$Drawer.Drawer);var module$exports$Blockly$minimalist$RenderInfo={RenderInfo:function(a,b){module$exports$Blockly$minimalist$RenderInfo.RenderInfo.superClass_.constructor.call(this,a,b)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$minimalist$RenderInfo.RenderInfo,module$exports$Blockly$blockRendering$RenderInfo.RenderInfo);module$exports$Blockly$minimalist$RenderInfo.RenderInfo.prototype.getRenderer=function(){return this.renderer_};var module$exports$Blockly$minimalist$Renderer={Renderer:function(a){module$exports$Blockly$minimalist$Renderer.Renderer.superClass_.constructor.call(this,a)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$minimalist$Renderer.Renderer,module$exports$Blockly$blockRendering$Renderer.Renderer);module$exports$Blockly$minimalist$Renderer.Renderer.prototype.makeConstants_=function(){return new module$exports$Blockly$minimalist$ConstantProvider.ConstantProvider};
1007
+ module$exports$Blockly$minimalist$Renderer.Renderer.prototype.makeRenderInfo_=function(a){return new module$exports$Blockly$minimalist$RenderInfo.RenderInfo(this,a)};module$exports$Blockly$minimalist$Renderer.Renderer.prototype.makeDrawer_=function(a,b){return new module$exports$Blockly$minimalist$Drawer.Drawer(a,b)};(0,module$exports$Blockly$blockRendering.register)("minimalist",module$exports$Blockly$minimalist$Renderer.Renderer);var module$exports$Blockly$minimalist={};module$exports$Blockly$minimalist.ConstantProvider=module$exports$Blockly$minimalist$ConstantProvider.ConstantProvider;module$exports$Blockly$minimalist.Drawer=module$exports$Blockly$minimalist$Drawer.Drawer;module$exports$Blockly$minimalist.RenderInfo=module$exports$Blockly$minimalist$RenderInfo.RenderInfo;module$exports$Blockly$minimalist.Renderer=module$exports$Blockly$minimalist$Renderer.Renderer;var module$exports$Blockly$thrasos$RenderInfo={RenderInfo:function(a,b){module$exports$Blockly$thrasos$RenderInfo.RenderInfo.superClass_.constructor.call(this,a,b)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$thrasos$RenderInfo.RenderInfo,module$exports$Blockly$blockRendering$RenderInfo.RenderInfo);module$exports$Blockly$thrasos$RenderInfo.RenderInfo.prototype.getRenderer=function(){return this.renderer_};
1008
1008
  module$exports$Blockly$thrasos$RenderInfo.RenderInfo.prototype.addElemSpacing_=function(){for(var a=!1,b=0;b<this.rows.length;b++)if(this.rows[b].hasExternalInput){a=!0;break}for(b=0;b<this.rows.length;b++){var c=this.rows[b],d=c.elements;c.elements=[];c.startsWithElemSpacer()&&c.elements.push(new module$exports$Blockly$blockRendering$InRowSpacer.InRowSpacer(this.constants_,this.getInRowSpacing_(null,d[0])));for(var e=0;e<d.length-1;e++){c.elements.push(d[e]);var f=this.getInRowSpacing_(d[e],d[e+
1009
1009
  1]);c.elements.push(new module$exports$Blockly$blockRendering$InRowSpacer.InRowSpacer(this.constants_,f))}c.elements.push(d[d.length-1]);c.endsWithElemSpacer()&&(d=this.getInRowSpacing_(d[d.length-1],null),a&&c.hasDummyInput&&(d+=this.constants_.TAB_WIDTH),c.elements.push(new module$exports$Blockly$blockRendering$InRowSpacer.InRowSpacer(this.constants_,d)))}};
1010
1010
  module$exports$Blockly$thrasos$RenderInfo.RenderInfo.prototype.getInRowSpacing_=function(a,b){if(!a)return b&&module$exports$Blockly$blockRendering$Types.Types.isField(b)&&b.isEditable?this.constants_.MEDIUM_PADDING:b&&module$exports$Blockly$blockRendering$Types.Types.isInlineInput(b)?this.constants_.MEDIUM_LARGE_PADDING:b&&module$exports$Blockly$blockRendering$Types.Types.isStatementInput(b)?this.constants_.STATEMENT_INPUT_PADDING_LEFT:this.constants_.LARGE_PADDING;if(!module$exports$Blockly$blockRendering$Types.Types.isInput(a)&&
@@ -1019,14 +1019,14 @@ b.hasStatement?this.constants_.BETWEEN_STATEMENT_PADDING_Y:a.hasStatement&&b.has
1019
1019
  module$exports$Blockly$thrasos$RenderInfo.RenderInfo.prototype.getElemCenterline_=function(a,b){if(module$exports$Blockly$blockRendering$Types.Types.isSpacer(b))return a.yPos+b.height/2;if(module$exports$Blockly$blockRendering$Types.Types.isBottomRow(a))return a=a.yPos+a.height-a.descenderHeight,module$exports$Blockly$blockRendering$Types.Types.isNextConnection(b)?a+b.height/2:a-b.height/2;if(module$exports$Blockly$blockRendering$Types.Types.isTopRow(a))return module$exports$Blockly$blockRendering$Types.Types.isHat(b)?
1020
1020
  a.capline-b.height/2:a.capline+b.height/2;var c=a.yPos;return c=module$exports$Blockly$blockRendering$Types.Types.isField(b)&&a.hasStatement?c+(this.constants_.TALL_INPUT_FIELD_OFFSET_Y+b.height/2):c+a.height/2};
1021
1021
  module$exports$Blockly$thrasos$RenderInfo.RenderInfo.prototype.finalize_=function(){for(var a=0,b=0,c=0;c<this.rows.length;c++){var d=this.rows[c];d.yPos=b;d.xPos=this.startX;b+=d.height;a=Math.max(a,d.widthWithConnectedBlocks);var e=b-this.topRow.ascenderHeight;d===this.bottomRow&&e<this.constants_.MIN_BLOCK_HEIGHT&&(e=this.constants_.MIN_BLOCK_HEIGHT-e,this.bottomRow.height+=e,b+=e);this.recordElemPositions_(d)}this.outputConnection&&this.block_.nextConnection&&this.block_.nextConnection.isConnected()&&
1022
- (a=Math.max(a,this.block_.nextConnection.targetBlock().getHeightWidth().width));this.bottomRow.baseline=b-this.bottomRow.descenderHeight;this.widthWithChildren=a+this.startX;this.height=b;this.startY=this.topRow.capline};var module$exports$Blockly$thrasos$Renderer={Renderer:function(a){module$exports$Blockly$thrasos$Renderer.Renderer.superClass_.constructor.call(this,a)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$thrasos$Renderer.Renderer,module$exports$Blockly$blockRendering$Renderer.Renderer);module$exports$Blockly$thrasos$Renderer.Renderer.prototype.makeRenderInfo_=function(a){return new module$exports$Blockly$thrasos$RenderInfo.RenderInfo(this,a)};
1023
- (0,module$exports$Blockly$blockRendering.register)("thrasos",module$exports$Blockly$thrasos$Renderer.Renderer);var module$exports$Blockly$thrasos={};module$exports$Blockly$thrasos.RenderInfo=module$exports$Blockly$thrasos$RenderInfo.RenderInfo;module$exports$Blockly$thrasos.Renderer=module$exports$Blockly$thrasos$Renderer.Renderer;var module$exports$Blockly$zelos$BottomRow={BottomRow:function(a){module$exports$Blockly$zelos$BottomRow.BottomRow.superClass_.constructor.call(this,a)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$BottomRow.BottomRow,module$exports$Blockly$blockRendering$BottomRow.BottomRow);module$exports$Blockly$zelos$BottomRow.BottomRow.prototype.endsWithElemSpacer=function(){return!1};module$exports$Blockly$zelos$BottomRow.BottomRow.prototype.hasLeftSquareCorner=function(a){return!!a.outputConnection};
1022
+ (a=Math.max(a,this.block_.nextConnection.targetBlock().getHeightWidth().width));this.bottomRow.baseline=b-this.bottomRow.descenderHeight;this.widthWithChildren=a+this.startX;this.height=b;this.startY=this.topRow.capline};var module$exports$Blockly$thrasos$Renderer={Renderer:function(a){module$exports$Blockly$thrasos$Renderer.Renderer.superClass_.constructor.call(this,a)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$thrasos$Renderer.Renderer,module$exports$Blockly$blockRendering$Renderer.Renderer);module$exports$Blockly$thrasos$Renderer.Renderer.prototype.makeRenderInfo_=function(a){return new module$exports$Blockly$thrasos$RenderInfo.RenderInfo(this,a)};
1023
+ (0,module$exports$Blockly$blockRendering.register)("thrasos",module$exports$Blockly$thrasos$Renderer.Renderer);var module$exports$Blockly$thrasos={};module$exports$Blockly$thrasos.RenderInfo=module$exports$Blockly$thrasos$RenderInfo.RenderInfo;module$exports$Blockly$thrasos.Renderer=module$exports$Blockly$thrasos$Renderer.Renderer;var module$exports$Blockly$zelos$BottomRow={BottomRow:function(a){module$exports$Blockly$zelos$BottomRow.BottomRow.superClass_.constructor.call(this,a)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$BottomRow.BottomRow,module$exports$Blockly$blockRendering$BottomRow.BottomRow);module$exports$Blockly$zelos$BottomRow.BottomRow.prototype.endsWithElemSpacer=function(){return!1};module$exports$Blockly$zelos$BottomRow.BottomRow.prototype.hasLeftSquareCorner=function(a){return!!a.outputConnection};
1024
1024
  module$exports$Blockly$zelos$BottomRow.BottomRow.prototype.hasRightSquareCorner=function(a){return!!a.outputConnection&&!a.statementInputCount&&!a.nextConnection};var module$exports$Blockly$zelos$ConstantProvider={ConstantProvider:function(){module$exports$Blockly$zelos$ConstantProvider.ConstantProvider.superClass_.constructor.call(this);this.SMALL_PADDING=this.GRID_UNIT=4;this.MEDIUM_PADDING=2*this.GRID_UNIT;this.MEDIUM_LARGE_PADDING=3*this.GRID_UNIT;this.LARGE_PADDING=4*this.GRID_UNIT;this.CORNER_RADIUS=1*this.GRID_UNIT;this.NOTCH_WIDTH=9*this.GRID_UNIT;this.NOTCH_HEIGHT=2*this.GRID_UNIT;this.STATEMENT_INPUT_NOTCH_OFFSET=this.NOTCH_OFFSET_LEFT=3*this.GRID_UNIT;
1025
1025
  this.MIN_BLOCK_WIDTH=2*this.GRID_UNIT;this.MIN_BLOCK_HEIGHT=12*this.GRID_UNIT;this.EMPTY_STATEMENT_INPUT_HEIGHT=6*this.GRID_UNIT;this.TAB_OFFSET_FROM_TOP=0;this.TOP_ROW_MIN_HEIGHT=this.CORNER_RADIUS;this.TOP_ROW_PRECEDES_STATEMENT_MIN_HEIGHT=this.LARGE_PADDING;this.BOTTOM_ROW_MIN_HEIGHT=this.CORNER_RADIUS;this.BOTTOM_ROW_AFTER_STATEMENT_MIN_HEIGHT=6*this.GRID_UNIT;this.STATEMENT_BOTTOM_SPACER=-this.NOTCH_HEIGHT;this.STATEMENT_INPUT_SPACER_MIN_WIDTH=40*this.GRID_UNIT;this.STATEMENT_INPUT_PADDING_LEFT=
1026
1026
  4*this.GRID_UNIT;this.EMPTY_INLINE_INPUT_PADDING=4*this.GRID_UNIT;this.EMPTY_INLINE_INPUT_HEIGHT=8*this.GRID_UNIT;this.DUMMY_INPUT_MIN_HEIGHT=8*this.GRID_UNIT;this.DUMMY_INPUT_SHADOW_MIN_HEIGHT=6*this.GRID_UNIT;this.CURSOR_WS_WIDTH=20*this.GRID_UNIT;this.CURSOR_COLOUR="#ffa200";this.CURSOR_RADIUS=5;this.JAGGED_TEETH_WIDTH=this.JAGGED_TEETH_HEIGHT=0;this.START_HAT_HEIGHT=22;this.START_HAT_WIDTH=96;this.SHAPES={HEXAGONAL:1,ROUND:2,SQUARE:3,PUZZLE:4,NOTCH:5};this.SHAPE_IN_SHAPE_PADDING={1:{0:5*this.GRID_UNIT,
1027
1027
  1:2*this.GRID_UNIT,2:5*this.GRID_UNIT,3:5*this.GRID_UNIT},2:{0:3*this.GRID_UNIT,1:3*this.GRID_UNIT,2:1*this.GRID_UNIT,3:2*this.GRID_UNIT},3:{0:2*this.GRID_UNIT,1:2*this.GRID_UNIT,2:2*this.GRID_UNIT,3:2*this.GRID_UNIT}};this.FULL_BLOCK_FIELDS=!0;this.FIELD_TEXT_FONTSIZE=3*this.GRID_UNIT;this.FIELD_TEXT_FONTWEIGHT="bold";this.FIELD_TEXT_FONTFAMILY='"Helvetica Neue", "Segoe UI", Helvetica, sans-serif';this.FIELD_BORDER_RECT_RADIUS=this.CORNER_RADIUS;this.FIELD_BORDER_RECT_X_PADDING=2*this.GRID_UNIT;
1028
1028
  this.FIELD_BORDER_RECT_Y_PADDING=1.625*this.GRID_UNIT;this.FIELD_BORDER_RECT_HEIGHT=8*this.GRID_UNIT;this.FIELD_DROPDOWN_BORDER_RECT_HEIGHT=8*this.GRID_UNIT;this.FIELD_DROPDOWN_SVG_ARROW=this.FIELD_DROPDOWN_COLOURED_DIV=this.FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW=!0;this.FIELD_DROPDOWN_SVG_ARROW_PADDING=this.FIELD_BORDER_RECT_X_PADDING;this.FIELD_COLOUR_FULL_BLOCK=this.FIELD_TEXTINPUT_BOX_SHADOW=!0;this.FIELD_COLOUR_DEFAULT_WIDTH=2*this.GRID_UNIT;this.FIELD_COLOUR_DEFAULT_HEIGHT=4*this.GRID_UNIT;this.FIELD_CHECKBOX_X_OFFSET=
1029
- 1*this.GRID_UNIT;this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH=12*this.GRID_UNIT;this.SELECTED_GLOW_COLOUR="#fff200";this.SELECTED_GLOW_SIZE=.5;this.REPLACEMENT_GLOW_COLOUR="#fff200";this.REPLACEMENT_GLOW_SIZE=2;this.selectedGlowFilterId="";this.selectedGlowFilter_=null;this.replacementGlowFilterId="";this.replacementGlowFilter_=null}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$ConstantProvider.ConstantProvider,module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider);
1029
+ 1*this.GRID_UNIT;this.MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH=12*this.GRID_UNIT;this.SELECTED_GLOW_COLOUR="#fff200";this.SELECTED_GLOW_SIZE=.5;this.REPLACEMENT_GLOW_COLOUR="#fff200";this.REPLACEMENT_GLOW_SIZE=2;this.selectedGlowFilterId="";this.selectedGlowFilter_=null;this.replacementGlowFilterId="";this.replacementGlowFilter_=null}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$ConstantProvider.ConstantProvider,module$exports$Blockly$blockRendering$ConstantProvider.ConstantProvider);
1030
1030
  module$exports$Blockly$zelos$ConstantProvider.ConstantProvider.prototype.setFontConstants_=function(a){module$exports$Blockly$zelos$ConstantProvider.ConstantProvider.superClass_.setFontConstants_.call(this,a);this.FIELD_DROPDOWN_BORDER_RECT_HEIGHT=this.FIELD_BORDER_RECT_HEIGHT=this.FIELD_TEXT_HEIGHT+2*this.FIELD_BORDER_RECT_Y_PADDING};
1031
1031
  module$exports$Blockly$zelos$ConstantProvider.ConstantProvider.prototype.init=function(){module$exports$Blockly$zelos$ConstantProvider.ConstantProvider.superClass_.init.call(this);this.HEXAGONAL=this.makeHexagonal();this.ROUNDED=this.makeRounded();this.SQUARED=this.makeSquared();this.STATEMENT_INPUT_NOTCH_OFFSET=this.NOTCH_OFFSET_LEFT+this.INSIDE_CORNERS.rightWidth};
1032
1032
  module$exports$Blockly$zelos$ConstantProvider.ConstantProvider.prototype.setDynamicProperties_=function(a){module$exports$Blockly$zelos$ConstantProvider.ConstantProvider.superClass_.setDynamicProperties_.call(this,a);this.SELECTED_GLOW_COLOUR=a.getComponentStyle("selectedGlowColour")||this.SELECTED_GLOW_COLOUR;var b=Number(a.getComponentStyle("selectedGlowSize"));this.SELECTED_GLOW_SIZE=b&&!isNaN(b)?b:this.SELECTED_GLOW_SIZE;this.REPLACEMENT_GLOW_COLOUR=a.getComponentStyle("replacementGlowColour")||
@@ -1054,7 +1054,7 @@ x:"-40%"},a);(0,module$exports$Blockly$utils$dom.createSvgElement)(module$export
1054
1054
  module$exports$Blockly$zelos$ConstantProvider.ConstantProvider.prototype.getCSS_=function(a){return[a+" .blocklyText,",a+" .blocklyFlyoutLabelText {","font: "+this.FIELD_TEXT_FONTWEIGHT+" "+this.FIELD_TEXT_FONTSIZE+"pt "+this.FIELD_TEXT_FONTFAMILY+";","}",a+" .blocklyText {","fill: #fff;","}",a+" .blocklyNonEditableText>rect:not(.blocklyDropdownRect),",a+" .blocklyEditableText>rect:not(.blocklyDropdownRect) {","fill: "+this.FIELD_BORDER_RECT_COLOUR+";","}",a+" .blocklyNonEditableText>text,",a+" .blocklyEditableText>text,",
1055
1055
  a+" .blocklyNonEditableText>g>text,",a+" .blocklyEditableText>g>text {","fill: #575E75;","}",a+" .blocklyFlyoutLabelText {","fill: #575E75;","}",a+" .blocklyText.blocklyBubbleText {","fill: #575E75;","}",a+" .blocklyDraggable:not(.blocklyDisabled)"," .blocklyEditableText:not(.editing):hover>rect,",a+" .blocklyDraggable:not(.blocklyDisabled)"," .blocklyEditableText:not(.editing):hover>.blocklyPath {","stroke: #fff;","stroke-width: 2;","}",a+" .blocklyHtmlInput {","font-family: "+this.FIELD_TEXT_FONTFAMILY+
1056
1056
  ";","font-weight: "+this.FIELD_TEXT_FONTWEIGHT+";","color: #575E75;","}",a+" .blocklyDropdownText {","fill: #fff !important;","}",a+".blocklyWidgetDiv .goog-menuitem,",a+".blocklyDropDownDiv .goog-menuitem {","font-family: "+this.FIELD_TEXT_FONTFAMILY+";","}",a+".blocklyDropDownDiv .goog-menuitem-content {","color: #fff;","}",a+" .blocklyHighlightedConnectionPath {","stroke: "+this.SELECTED_GLOW_COLOUR+";","}",a+" .blocklyDisabled > .blocklyOutlinePath {","fill: url(#blocklyDisabledPattern"+this.randomIdentifier+
1057
- ")","}",a+" .blocklyInsertionMarker>.blocklyPath {","fill-opacity: "+this.INSERTION_MARKER_OPACITY+";","stroke: none;","}"]};var module$exports$Blockly$zelos$PathObject={PathObject:function(a,b,c){module$exports$Blockly$zelos$PathObject.PathObject.superClass_.constructor.call(this,a,b,c);this.constants=c;this.svgPathSelected_=null;this.outlines_=Object.create(null);this.outputShapeType=this.remainingOutlines_=null}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$PathObject.PathObject,module$exports$Blockly$blockRendering$PathObject.PathObject);
1057
+ ")","}",a+" .blocklyInsertionMarker>.blocklyPath {","fill-opacity: "+this.INSERTION_MARKER_OPACITY+";","stroke: none;","}"]};var module$exports$Blockly$zelos$PathObject={PathObject:function(a,b,c){module$exports$Blockly$zelos$PathObject.PathObject.superClass_.constructor.call(this,a,b,c);this.constants=c;this.svgPathSelected_=null;this.outlines_=Object.create(null);this.outputShapeType=this.remainingOutlines_=null}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$PathObject.PathObject,module$exports$Blockly$blockRendering$PathObject.PathObject);
1058
1058
  module$exports$Blockly$zelos$PathObject.PathObject.prototype.setPath=function(a){module$exports$Blockly$zelos$PathObject.PathObject.superClass_.setPath.call(this,a);this.svgPathSelected_&&this.svgPathSelected_.setAttribute("d",a)};
1059
1059
  module$exports$Blockly$zelos$PathObject.PathObject.prototype.applyColour=function(a){module$exports$Blockly$zelos$PathObject.PathObject.superClass_.applyColour.call(this,a);a.isShadow()&&a.getParent()&&this.svgPath.setAttribute("stroke",a.getParent().style.colourTertiary);for(var b in this.outlines_)this.outlines_[b].setAttribute("fill",this.style.colourTertiary)};
1060
1060
  module$exports$Blockly$zelos$PathObject.PathObject.prototype.flipRTL=function(){module$exports$Blockly$zelos$PathObject.PathObject.superClass_.flipRTL.call(this);for(var a in this.outlines_)this.outlines_[a].setAttribute("transform","scale(-1 1)")};
@@ -1065,14 +1065,30 @@ module$exports$Blockly$zelos$PathObject.PathObject.prototype.endDrawing=function
1065
1065
  module$exports$Blockly$zelos$PathObject.PathObject.prototype.getOutlinePath_=function(a){this.outlines_[a]||(this.outlines_[a]=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.PATH,{"class":"blocklyOutlinePath",d:""},this.svgRoot));this.remainingOutlines_&&delete this.remainingOutlines_[a];return this.outlines_[a]};
1066
1066
  module$exports$Blockly$zelos$PathObject.PathObject.prototype.removeOutlinePath_=function(a){this.outlines_[a].parentNode.removeChild(this.outlines_[a]);delete this.outlines_[a]};var module$exports$Blockly$FieldImage={FieldImage:function(a,b,c,d,e,f,g){if(!a)throw Error("Src value of an image field is required");a=(0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a);c=Number((0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(c));b=Number((0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(b));if(isNaN(c)||isNaN(b))throw Error("Height and width values of an image field must cast to numbers.");if(0>=c||0>=b)throw Error("Height and width values of an image field must be greater than 0.");
1067
1067
  this.flipRtl_=!1;this.altText_="";module$exports$Blockly$FieldImage.FieldImage.superClass_.constructor.call(this,a,null,g);g||(this.flipRtl_=!!f,this.altText_=(0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(d)||"");this.size_=new module$exports$Blockly$utils$Size.Size(b,c+module$exports$Blockly$FieldImage.FieldImage.Y_PADDING);this.imageHeight_=c;this.clickHandler_=null;"function"===typeof e&&(this.clickHandler_=e);this.imageElement_=null}};
1068
- (0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldImage.FieldImage,module$exports$Blockly$Field.Field);module$exports$Blockly$FieldImage.FieldImage.prototype.DEFAULT_VALUE="";module$exports$Blockly$FieldImage.FieldImage.fromJson=function(a){return new this(a.src,a.width,a.height,void 0,void 0,void 0,a)};module$exports$Blockly$FieldImage.FieldImage.Y_PADDING=1;module$exports$Blockly$FieldImage.FieldImage.prototype.EDITABLE=!1;
1068
+ (0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldImage.FieldImage,module$exports$Blockly$Field.Field);module$exports$Blockly$FieldImage.FieldImage.prototype.DEFAULT_VALUE="";module$exports$Blockly$FieldImage.FieldImage.fromJson=function(a){return new this(a.src,a.width,a.height,void 0,void 0,void 0,a)};module$exports$Blockly$FieldImage.FieldImage.Y_PADDING=1;module$exports$Blockly$FieldImage.FieldImage.prototype.EDITABLE=!1;
1069
1069
  module$exports$Blockly$FieldImage.FieldImage.prototype.isDirty_=!1;module$exports$Blockly$FieldImage.FieldImage.prototype.configure_=function(a){module$exports$Blockly$FieldImage.FieldImage.superClass_.configure_.call(this,a);this.flipRtl_=!!a.flipRtl;this.altText_=(0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.alt)||""};
1070
1070
  module$exports$Blockly$FieldImage.FieldImage.prototype.initView=function(){this.imageElement_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.IMAGE,{height:this.imageHeight_+"px",width:this.size_.width+"px",alt:this.altText_},this.fieldGroup_);this.imageElement_.setAttributeNS(module$exports$Blockly$utils$dom.XLINK_NS,"xlink:href",this.value_);this.clickHandler_&&(this.imageElement_.style.cursor="pointer")};
1071
1071
  module$exports$Blockly$FieldImage.FieldImage.prototype.updateSize_=function(){};module$exports$Blockly$FieldImage.FieldImage.prototype.doClassValidation_=function(a){return"string"!==typeof a?null:a};module$exports$Blockly$FieldImage.FieldImage.prototype.doValueUpdate_=function(a){this.value_=a;this.imageElement_&&this.imageElement_.setAttributeNS(module$exports$Blockly$utils$dom.XLINK_NS,"xlink:href",String(this.value_))};module$exports$Blockly$FieldImage.FieldImage.prototype.getFlipRtl=function(){return this.flipRtl_};
1072
1072
  module$exports$Blockly$FieldImage.FieldImage.prototype.setAlt=function(a){a!==this.altText_&&(this.altText_=a||"",this.imageElement_&&this.imageElement_.setAttribute("alt",this.altText_))};module$exports$Blockly$FieldImage.FieldImage.prototype.showEditor_=function(){this.clickHandler_&&this.clickHandler_(this)};module$exports$Blockly$FieldImage.FieldImage.prototype.setOnClickHandler=function(a){this.clickHandler_=a};module$exports$Blockly$FieldImage.FieldImage.prototype.getText_=function(){return this.altText_};
1073
- (0,module$exports$Blockly$fieldRegistry.register)("field_image",module$exports$Blockly$FieldImage.FieldImage);var module$exports$Blockly$utils$aria={},module$contents$Blockly$utils$aria_ARIA_PREFIX="aria-",module$contents$Blockly$utils$aria_ROLE_ATTRIBUTE="role";module$exports$Blockly$utils$aria.Role={GRID:"grid",GRIDCELL:"gridcell",GROUP:"group",LISTBOX:"listbox",MENU:"menu",MENUITEM:"menuitem",MENUITEMCHECKBOX:"menuitemcheckbox",OPTION:"option",PRESENTATION:"presentation",ROW:"row",TREE:"tree",TREEITEM:"treeitem"};
1073
+ (0,module$exports$Blockly$fieldRegistry.register)("field_image",module$exports$Blockly$FieldImage.FieldImage);var module$exports$Blockly$zelos$MarkerSvg={MarkerSvg:function(a,b,c){module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.superClass_.constructor.call(this,a,b,c)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$MarkerSvg.MarkerSvg,module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg);
1074
+ module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.showWithInputOutput_=function(a){var b=a.getSourceBlock();a=a.getLocation().getOffsetInBlock();this.positionCircle_(a.x,a.y);this.setParent_(b);this.showCurrent_()};module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.showWithOutput_=function(a){this.showWithInputOutput_(a)};module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.showWithInput_=function(a){this.showWithInputOutput_(a)};
1075
+ module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.showWithBlock_=function(a){a=a.getLocation();var b=a.getHeightWidth();this.positionRect_(0,0,b.width,b.height);this.setParent_(a);this.showCurrent_()};module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.positionCircle_=function(a,b){this.markerCircle_.setAttribute("cx",a);this.markerCircle_.setAttribute("cy",b);this.currentMarkerSvg=this.markerCircle_};
1076
+ module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.hide=function(){module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.superClass_.hide.call(this);this.markerCircle_.style.display="none"};
1077
+ module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.createDomInternal_=function(){module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.superClass_.createDomInternal_.call(this);this.markerCircle_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.CIRCLE,{r:this.constants_.CURSOR_RADIUS,style:"display: none","stroke-width":this.constants_.CURSOR_STROKE_WIDTH},this.markerSvg_);if(this.isCursor()){var a=this.getBlinkProperties_();(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.ANIMATE,
1078
+ a,this.markerCircle_)}return this.markerSvg_};module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.applyColour_=function(a){module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.superClass_.applyColour_.call(this,a);this.markerCircle_.setAttribute("fill",this.colour_);this.markerCircle_.setAttribute("stroke",this.colour_);this.isCursor()&&this.markerCircle_.firstChild.setAttribute("values",this.colour_+";transparent;transparent;")};var module$exports$Blockly$zelos$Drawer={Drawer:function(a,b){module$exports$Blockly$zelos$Drawer.Drawer.superClass_.constructor.call(this,a,b)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$Drawer.Drawer,module$exports$Blockly$blockRendering$Drawer.Drawer);
1079
+ module$exports$Blockly$zelos$Drawer.Drawer.prototype.draw=function(){var a=this.block_.pathObject;a.beginDrawing();this.hideHiddenIcons_();this.drawOutline_();this.drawInternals_();a.setPath(this.outlinePath_+"\n"+this.inlinePath_);this.info_.RTL&&a.flipRTL();(0,module$exports$Blockly$blockRendering$debug.isDebuggerEnabled)()&&this.block_.renderingDebugger.drawDebug(this.block_,this.info_);this.recordSizeOnBlock_();this.info_.outputConnection&&(a.outputShapeType=this.info_.outputConnection.shape.type);
1080
+ a.endDrawing()};module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawOutline_=function(){this.info_.outputConnection&&this.info_.outputConnection.isDynamicShape&&!this.info_.hasStatementInput&&!this.info_.bottomRow.hasNextConnection?(this.drawFlatTop_(),this.drawRightDynamicConnection_(),this.drawFlatBottom_(),this.drawLeftDynamicConnection_()):module$exports$Blockly$zelos$Drawer.Drawer.superClass_.drawOutline_.call(this)};
1081
+ module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawLeft_=function(){this.info_.outputConnection&&this.info_.outputConnection.isDynamicShape?this.drawLeftDynamicConnection_():module$exports$Blockly$zelos$Drawer.Drawer.superClass_.drawLeft_.call(this)};
1082
+ module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawRightSideRow_=function(a){if(!(0>=a.height))if(a.precedesStatement||a.followsStatement){var b=this.constants_.INSIDE_CORNERS.rightHeight;b=a.height-(a.precedesStatement?b:0);this.outlinePath_+=(a.followsStatement?this.constants_.INSIDE_CORNERS.pathBottomRight:"")+(0<b?(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("V",a.yPos+b):"")+(a.precedesStatement?this.constants_.INSIDE_CORNERS.pathTopRight:"")}else this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("V",
1083
+ a.yPos+a.height)};module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawRightDynamicConnection_=function(){this.outlinePath_+=this.info_.outputConnection.shape.pathRightDown(this.info_.outputConnection.height)};module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawLeftDynamicConnection_=function(){this.positionOutputConnection_();this.outlinePath_+=this.info_.outputConnection.shape.pathUp(this.info_.outputConnection.height);this.outlinePath_+="z"};
1084
+ module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawFlatTop_=function(){var a=this.info_.topRow;this.positionPreviousConnection_();this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.moveBy)(a.xPos,this.info_.startY);this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",a.width)};
1085
+ module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawFlatBottom_=function(){var a=this.info_.bottomRow;this.positionNextConnection_();this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("V",a.baseline);this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",-a.width)};
1086
+ module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawInlineInput_=function(a){this.positionInlineInputConnection_(a);var b=a.input.name;if(!a.connectedBlock&&!this.info_.isInsertionMarker){var c=a.width-2*a.connectionWidth;a=(0,module$exports$Blockly$utils$svgPaths.moveTo)(a.xPos+a.connectionWidth,a.centerline-a.height/2)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",c)+a.shape.pathRightDown(a.height)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",-c)+a.shape.pathUp(a.height)+
1087
+ "z";this.block_.pathObject.setOutlinePath(b,a)}};
1088
+ module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawStatementInput_=function(a){var b=a.getLastInput(),c=b.xPos+b.notchOffset+b.shape.width,d=b.shape.pathRight+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",-(b.notchOffset-this.constants_.INSIDE_CORNERS.width))+this.constants_.INSIDE_CORNERS.pathTop,e=a.height-2*this.constants_.INSIDE_CORNERS.height;b=this.constants_.INSIDE_CORNERS.pathBottom+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",b.notchOffset-this.constants_.INSIDE_CORNERS.width)+
1089
+ (b.connectedBottomNextConnection?"":b.shape.pathLeft);this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("H",c)+d+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("v",e)+b+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("H",a.xPos+a.width);this.positionStatementInputConnection_(a)};var module$exports$Blockly$utils$aria={},module$contents$Blockly$utils$aria_ARIA_PREFIX="aria-",module$contents$Blockly$utils$aria_ROLE_ATTRIBUTE="role";module$exports$Blockly$utils$aria.Role={GRID:"grid",GRIDCELL:"gridcell",GROUP:"group",LISTBOX:"listbox",MENU:"menu",MENUITEM:"menuitem",MENUITEMCHECKBOX:"menuitemcheckbox",OPTION:"option",PRESENTATION:"presentation",ROW:"row",TREE:"tree",TREEITEM:"treeitem"};
1074
1090
  module$exports$Blockly$utils$aria.State={ACTIVEDESCENDANT:"activedescendant",COLCOUNT:"colcount",DISABLED:"disabled",EXPANDED:"expanded",INVALID:"invalid",LABEL:"label",LABELLEDBY:"labelledby",LEVEL:"level",ORIENTATION:"orientation",POSINSET:"posinset",ROWCOUNT:"rowcount",SELECTED:"selected",SETSIZE:"setsize",VALUEMAX:"valuemax",VALUEMIN:"valuemin"};module$exports$Blockly$utils$aria.setRole=function(a,b){a.setAttribute(module$contents$Blockly$utils$aria_ROLE_ATTRIBUTE,b)};
1075
- module$exports$Blockly$utils$aria.setState=function(a,b,c){Array.isArray(c)&&(c=c.join(" "));a.setAttribute(module$contents$Blockly$utils$aria_ARIA_PREFIX+b,c)};$.module$exports$Blockly$FieldTextInput={FieldTextInput:function(a,b,c){this.spellcheck_=!0;$.module$exports$Blockly$FieldTextInput.FieldTextInput.superClass_.constructor.call(this,a,b,c);this.onKeyInputWrapper_=this.onKeyDownWrapper_=this.htmlInput_=null;this.fullBlockClickTarget_=!1;this.workspace_=null}};(0,module$exports$Blockly$utils$object.inherits)($.module$exports$Blockly$FieldTextInput.FieldTextInput,module$exports$Blockly$Field.Field);
1091
+ module$exports$Blockly$utils$aria.setState=function(a,b,c){Array.isArray(c)&&(c=c.join(" "));a.setAttribute(module$contents$Blockly$utils$aria_ARIA_PREFIX+b,c)};$.module$exports$Blockly$FieldTextInput={FieldTextInput:function(a,b,c){this.spellcheck_=!0;$.module$exports$Blockly$FieldTextInput.FieldTextInput.superClass_.constructor.call(this,a,b,c);this.onKeyInputWrapper_=this.onKeyDownWrapper_=this.htmlInput_=null;this.fullBlockClickTarget_=!1;this.workspace_=null}};(0,$.module$exports$Blockly$utils$object.inherits)($.module$exports$Blockly$FieldTextInput.FieldTextInput,module$exports$Blockly$Field.Field);
1076
1092
  $.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.DEFAULT_VALUE="";$.module$exports$Blockly$FieldTextInput.FieldTextInput.fromJson=function(a){return new this((0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.text),void 0,a)};$.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.SERIALIZABLE=!0;$.module$exports$Blockly$FieldTextInput.FieldTextInput.BORDERRADIUS=4;$.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.CURSOR="text";
1077
1093
  $.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.configure_=function(a){$.module$exports$Blockly$FieldTextInput.FieldTextInput.superClass_.configure_.call(this,a);"boolean"===typeof a.spellcheck&&(this.spellcheck_=a.spellcheck)};
1078
1094
  $.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.initView=function(){if(this.getConstants().FULL_BLOCK_FIELDS){for(var a=0,b=0,c=0,d;d=this.sourceBlock_.inputList[c];c++){for(var e=0;d.fieldRow[e];e++)a++;d.connection&&b++}this.fullBlockClickTarget_=1>=a&&this.sourceBlock_.outputConnection&&!b}else this.fullBlockClickTarget_=!1;this.fullBlockClickTarget_?this.clickTarget_=this.sourceBlock_.getSvgRoot():this.createBorderRect_();this.createTextElement_()};
@@ -1094,25 +1110,9 @@ $.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.onHtmlInputKeyD
1094
1110
  a.keyCode===module$exports$Blockly$utils$KeyCodes.KeyCodes.TAB&&((0,module$exports$Blockly$WidgetDiv.hide)(),module$exports$Blockly$DropDownDiv.DropDownDiv.hideWithoutAnimation(),this.sourceBlock_.tab(this,!a.shiftKey),a.preventDefault())};$.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.onHtmlInputChange_=function(a){a=this.htmlInput_.value;a!==this.htmlInput_.oldValue_&&(this.htmlInput_.oldValue_=a,a=this.getValueFromEditorText_(a),this.setValue(a),this.forceRerender(),this.resizeEditor_())};
1095
1111
  $.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.setEditorValue_=function(a){this.isDirty_=!0;this.isBeingEdited_&&(this.htmlInput_.value=this.getEditorText_(a));this.setValue(a)};
1096
1112
  $.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.resizeEditor_=function(){var a=(0,module$exports$Blockly$WidgetDiv.getDiv)(),b=this.getScaledBBox();a.style.width=b.right-b.left+"px";a.style.height=b.bottom-b.top+"px";b=new module$exports$Blockly$utils$Coordinate.Coordinate(this.sourceBlock_.RTL?b.right-a.offsetWidth:b.left,b.top);a.style.left=b.x+"px";a.style.top=b.y+"px"};$.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.isTabNavigable=function(){return!0};
1097
- $.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.getText_=function(){return this.isBeingEdited_&&this.htmlInput_?this.htmlInput_.value:null};$.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.getEditorText_=function(a){return String(a)};$.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.getValueFromEditorText_=function(a){return a};(0,module$exports$Blockly$fieldRegistry.register)("field_input",$.module$exports$Blockly$FieldTextInput.FieldTextInput);var module$exports$Blockly$zelos$MarkerSvg={MarkerSvg:function(a,b,c){module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.superClass_.constructor.call(this,a,b,c)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$MarkerSvg.MarkerSvg,module$exports$Blockly$blockRendering$MarkerSvg.MarkerSvg);
1098
- module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.showWithInputOutput_=function(a){var b=a.getSourceBlock();a=a.getLocation().getOffsetInBlock();this.positionCircle_(a.x,a.y);this.setParent_(b);this.showCurrent_()};module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.showWithOutput_=function(a){this.showWithInputOutput_(a)};module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.showWithInput_=function(a){this.showWithInputOutput_(a)};
1099
- module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.showWithBlock_=function(a){a=a.getLocation();var b=a.getHeightWidth();this.positionRect_(0,0,b.width,b.height);this.setParent_(a);this.showCurrent_()};module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.positionCircle_=function(a,b){this.markerCircle_.setAttribute("cx",a);this.markerCircle_.setAttribute("cy",b);this.currentMarkerSvg=this.markerCircle_};
1100
- module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.hide=function(){module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.superClass_.hide.call(this);this.markerCircle_.style.display="none"};
1101
- module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.createDomInternal_=function(){module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.superClass_.createDomInternal_.call(this);this.markerCircle_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.CIRCLE,{r:this.constants_.CURSOR_RADIUS,style:"display: none","stroke-width":this.constants_.CURSOR_STROKE_WIDTH},this.markerSvg_);if(this.isCursor()){var a=this.getBlinkProperties_();(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.ANIMATE,
1102
- a,this.markerCircle_)}return this.markerSvg_};module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.prototype.applyColour_=function(a){module$exports$Blockly$zelos$MarkerSvg.MarkerSvg.superClass_.applyColour_.call(this,a);this.markerCircle_.setAttribute("fill",this.colour_);this.markerCircle_.setAttribute("stroke",this.colour_);this.isCursor()&&this.markerCircle_.firstChild.setAttribute("values",this.colour_+";transparent;transparent;")};var module$exports$Blockly$zelos$Drawer={Drawer:function(a,b){module$exports$Blockly$zelos$Drawer.Drawer.superClass_.constructor.call(this,a,b)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$Drawer.Drawer,module$exports$Blockly$blockRendering$Drawer.Drawer);
1103
- module$exports$Blockly$zelos$Drawer.Drawer.prototype.draw=function(){var a=this.block_.pathObject;a.beginDrawing();this.hideHiddenIcons_();this.drawOutline_();this.drawInternals_();a.setPath(this.outlinePath_+"\n"+this.inlinePath_);this.info_.RTL&&a.flipRTL();(0,module$exports$Blockly$blockRendering$debug.isDebuggerEnabled)()&&this.block_.renderingDebugger.drawDebug(this.block_,this.info_);this.recordSizeOnBlock_();this.info_.outputConnection&&(a.outputShapeType=this.info_.outputConnection.shape.type);
1104
- a.endDrawing()};module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawOutline_=function(){this.info_.outputConnection&&this.info_.outputConnection.isDynamicShape&&!this.info_.hasStatementInput&&!this.info_.bottomRow.hasNextConnection?(this.drawFlatTop_(),this.drawRightDynamicConnection_(),this.drawFlatBottom_(),this.drawLeftDynamicConnection_()):module$exports$Blockly$zelos$Drawer.Drawer.superClass_.drawOutline_.call(this)};
1105
- module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawLeft_=function(){this.info_.outputConnection&&this.info_.outputConnection.isDynamicShape?this.drawLeftDynamicConnection_():module$exports$Blockly$zelos$Drawer.Drawer.superClass_.drawLeft_.call(this)};
1106
- module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawRightSideRow_=function(a){if(!(0>=a.height))if(a.precedesStatement||a.followsStatement){var b=this.constants_.INSIDE_CORNERS.rightHeight;b=a.height-(a.precedesStatement?b:0);this.outlinePath_+=(a.followsStatement?this.constants_.INSIDE_CORNERS.pathBottomRight:"")+(0<b?(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("V",a.yPos+b):"")+(a.precedesStatement?this.constants_.INSIDE_CORNERS.pathTopRight:"")}else this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("V",
1107
- a.yPos+a.height)};module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawRightDynamicConnection_=function(){this.outlinePath_+=this.info_.outputConnection.shape.pathRightDown(this.info_.outputConnection.height)};module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawLeftDynamicConnection_=function(){this.positionOutputConnection_();this.outlinePath_+=this.info_.outputConnection.shape.pathUp(this.info_.outputConnection.height);this.outlinePath_+="z"};
1108
- module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawFlatTop_=function(){var a=this.info_.topRow;this.positionPreviousConnection_();this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.moveBy)(a.xPos,this.info_.startY);this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",a.width)};
1109
- module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawFlatBottom_=function(){var a=this.info_.bottomRow;this.positionNextConnection_();this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("V",a.baseline);this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",-a.width)};
1110
- module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawInlineInput_=function(a){this.positionInlineInputConnection_(a);var b=a.input.name;if(!a.connectedBlock&&!this.info_.isInsertionMarker){var c=a.width-2*a.connectionWidth;a=(0,module$exports$Blockly$utils$svgPaths.moveTo)(a.xPos+a.connectionWidth,a.centerline-a.height/2)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",c)+a.shape.pathRightDown(a.height)+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",-c)+a.shape.pathUp(a.height)+
1111
- "z";this.block_.pathObject.setOutlinePath(b,a)}};
1112
- module$exports$Blockly$zelos$Drawer.Drawer.prototype.drawStatementInput_=function(a){var b=a.getLastInput(),c=b.xPos+b.notchOffset+b.shape.width,d=b.shape.pathRight+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",-(b.notchOffset-this.constants_.INSIDE_CORNERS.width))+this.constants_.INSIDE_CORNERS.pathTop,e=a.height-2*this.constants_.INSIDE_CORNERS.height;b=this.constants_.INSIDE_CORNERS.pathBottom+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("h",b.notchOffset-this.constants_.INSIDE_CORNERS.width)+
1113
- (b.connectedBottomNextConnection?"":b.shape.pathLeft);this.outlinePath_+=(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("H",c)+d+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("v",e)+b+(0,module$exports$Blockly$utils$svgPaths.lineOnAxis)("H",a.xPos+a.width);this.positionStatementInputConnection_(a)};var module$exports$Blockly$zelos$RightConnectionShape={RightConnectionShape:function(a){module$exports$Blockly$zelos$RightConnectionShape.RightConnectionShape.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.getType("RIGHT_CONNECTION");this.width=this.height=0}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$RightConnectionShape.RightConnectionShape,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$zelos$StatementInput={StatementInput:function(a,b){module$exports$Blockly$zelos$StatementInput.StatementInput.superClass_.constructor.call(this,a,b);if(this.connectedBlock){for(a=this.connectedBlock;b=a.getNextBlock();)a=b;a.nextConnection||(this.height=this.connectedBlockHeight,this.connectedBottomNextConnection=!0)}}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$StatementInput.StatementInput,module$exports$Blockly$blockRendering$StatementInput.StatementInput);var module$exports$Blockly$zelos$TopRow={TopRow:function(a){module$exports$Blockly$zelos$TopRow.TopRow.superClass_.constructor.call(this,a)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$TopRow.TopRow,module$exports$Blockly$blockRendering$TopRow.TopRow);module$exports$Blockly$zelos$TopRow.TopRow.prototype.endsWithElemSpacer=function(){return!1};
1113
+ $.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.getText_=function(){return this.isBeingEdited_&&this.htmlInput_?this.htmlInput_.value:null};$.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.getEditorText_=function(a){return String(a)};$.module$exports$Blockly$FieldTextInput.FieldTextInput.prototype.getValueFromEditorText_=function(a){return a};(0,module$exports$Blockly$fieldRegistry.register)("field_input",$.module$exports$Blockly$FieldTextInput.FieldTextInput);var module$exports$Blockly$zelos$RightConnectionShape={RightConnectionShape:function(a){module$exports$Blockly$zelos$RightConnectionShape.RightConnectionShape.superClass_.constructor.call(this,a);this.type|=module$exports$Blockly$blockRendering$Types.Types.getType("RIGHT_CONNECTION");this.width=this.height=0}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$RightConnectionShape.RightConnectionShape,module$exports$Blockly$blockRendering$Measurable.Measurable);var module$exports$Blockly$zelos$StatementInput={StatementInput:function(a,b){module$exports$Blockly$zelos$StatementInput.StatementInput.superClass_.constructor.call(this,a,b);if(this.connectedBlock){for(a=this.connectedBlock;b=a.getNextBlock();)a=b;a.nextConnection||(this.height=this.connectedBlockHeight,this.connectedBottomNextConnection=!0)}}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$StatementInput.StatementInput,module$exports$Blockly$blockRendering$StatementInput.StatementInput);var module$exports$Blockly$zelos$TopRow={TopRow:function(a){module$exports$Blockly$zelos$TopRow.TopRow.superClass_.constructor.call(this,a)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$TopRow.TopRow,module$exports$Blockly$blockRendering$TopRow.TopRow);module$exports$Blockly$zelos$TopRow.TopRow.prototype.endsWithElemSpacer=function(){return!1};
1114
1114
  module$exports$Blockly$zelos$TopRow.TopRow.prototype.hasLeftSquareCorner=function(a){var b=(a.hat?"cap"===a.hat:this.constants_.ADD_START_HATS)&&!a.outputConnection&&!a.previousConnection;return!!a.outputConnection||b};module$exports$Blockly$zelos$TopRow.TopRow.prototype.hasRightSquareCorner=function(a){return!!a.outputConnection&&!a.statementInputCount&&!a.nextConnection};var module$exports$Blockly$zelos$RenderInfo={RenderInfo:function(a,b){module$exports$Blockly$zelos$RenderInfo.RenderInfo.superClass_.constructor.call(this,a,b);this.topRow=new module$exports$Blockly$zelos$TopRow.TopRow(this.constants_);this.bottomRow=new module$exports$Blockly$zelos$BottomRow.BottomRow(this.constants_);this.isInline=!0;this.isMultiRow=!b.getInputsInline()||b.isCollapsed();this.hasStatementInput=0<b.statementInputCount;this.rightSide=this.outputConnection?new module$exports$Blockly$zelos$RightConnectionShape.RightConnectionShape(this.constants_):
1115
- null}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$RenderInfo.RenderInfo,module$exports$Blockly$blockRendering$RenderInfo.RenderInfo);module$exports$Blockly$zelos$RenderInfo.RenderInfo.prototype.getRenderer=function(){return this.renderer_};module$exports$Blockly$zelos$RenderInfo.RenderInfo.prototype.measure=function(){this.createRows_();this.addElemSpacing_();this.addRowSpacing_();this.adjustXPosition_();this.computeBounds_();this.alignRowElements_();this.finalize_()};
1115
+ null}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$RenderInfo.RenderInfo,module$exports$Blockly$blockRendering$RenderInfo.RenderInfo);module$exports$Blockly$zelos$RenderInfo.RenderInfo.prototype.getRenderer=function(){return this.renderer_};module$exports$Blockly$zelos$RenderInfo.RenderInfo.prototype.measure=function(){this.createRows_();this.addElemSpacing_();this.addRowSpacing_();this.adjustXPosition_();this.computeBounds_();this.alignRowElements_();this.finalize_()};
1116
1116
  module$exports$Blockly$zelos$RenderInfo.RenderInfo.prototype.shouldStartNewRow_=function(a,b){return b?a.type===$.module$exports$Blockly$inputTypes.inputTypes.STATEMENT||b.type===$.module$exports$Blockly$inputTypes.inputTypes.STATEMENT?!0:a.type===$.module$exports$Blockly$inputTypes.inputTypes.VALUE||a.type===$.module$exports$Blockly$inputTypes.inputTypes.DUMMY?!this.isInline||this.isMultiRow:!1:!1};
1117
1117
  module$exports$Blockly$zelos$RenderInfo.RenderInfo.prototype.getDesiredRowWidth_=function(a){return a.hasStatement?this.width-this.startX-(this.constants_.INSIDE_CORNERS.rightWidth||0):module$exports$Blockly$zelos$RenderInfo.RenderInfo.superClass_.getDesiredRowWidth_.call(this,a)};
1118
1118
  module$exports$Blockly$zelos$RenderInfo.RenderInfo.prototype.getInRowSpacing_=function(a,b){return a&&b||!this.outputConnection||!this.outputConnection.isDynamicShape||this.hasStatementInput||this.bottomRow.hasNextConnection?!a&&b&&module$exports$Blockly$blockRendering$Types.Types.isStatementInput(b)?this.constants_.STATEMENT_INPUT_PADDING_LEFT:a&&module$exports$Blockly$blockRendering$Types.Types.isLeftRoundedCorner(a)&&b&&(module$exports$Blockly$blockRendering$Types.Types.isPreviousConnection(b)||
@@ -1139,7 +1139,7 @@ a=e?e.pathObject.outputShapeType:a.shape.type;return e&&e.outputConnection&&(e.s
1139
1139
  0};
1140
1140
  module$exports$Blockly$zelos$RenderInfo.RenderInfo.prototype.finalizeVerticalAlignment_=function(){if(!this.outputConnection)for(var a=2;a<this.rows.length-1;a+=2){var b=this.rows[a-1],c=this.rows[a],d=this.rows[a+1],e=2===a,f=a+2>=this.rows.length-1?!!this.bottomRow.hasNextConnection:!!d.precedesStatement;if(e?this.topRow.hasPreviousConnection:b.followsStatement){var g=3===c.elements.length&&(c.elements[1].field instanceof $.module$exports$Blockly$FieldLabel.FieldLabel||c.elements[1].field instanceof module$exports$Blockly$FieldImage.FieldImage);
1141
1141
  if(!e&&g)b.height-=this.constants_.SMALL_PADDING,d.height-=this.constants_.SMALL_PADDING,c.height-=this.constants_.MEDIUM_PADDING;else if(!e&&!f)b.height+=this.constants_.SMALL_PADDING;else if(f){e=!1;for(f=0;f<c.elements.length;f++)if(g=c.elements[f],module$exports$Blockly$blockRendering$Types.Types.isInlineInput(g)&&g.connectedBlock&&!g.connectedBlock.isShadow()&&40<=g.connectedBlock.getHeightWidth().height){e=!0;break}e&&(b.height-=this.constants_.SMALL_PADDING,d.height-=this.constants_.SMALL_PADDING)}}}};
1142
- module$exports$Blockly$zelos$RenderInfo.RenderInfo.prototype.finalize_=function(){this.finalizeOutputConnection_();this.finalizeHorizontalAlignment_();this.finalizeVerticalAlignment_();module$exports$Blockly$zelos$RenderInfo.RenderInfo.superClass_.finalize_.call(this);this.rightSide&&(this.widthWithChildren+=this.rightSide.width)};var module$exports$Blockly$zelos$Renderer={Renderer:function(a){module$exports$Blockly$zelos$Renderer.Renderer.superClass_.constructor.call(this,a)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$Renderer.Renderer,module$exports$Blockly$blockRendering$Renderer.Renderer);module$exports$Blockly$zelos$Renderer.Renderer.prototype.makeConstants_=function(){return new module$exports$Blockly$zelos$ConstantProvider.ConstantProvider};
1142
+ module$exports$Blockly$zelos$RenderInfo.RenderInfo.prototype.finalize_=function(){this.finalizeOutputConnection_();this.finalizeHorizontalAlignment_();this.finalizeVerticalAlignment_();module$exports$Blockly$zelos$RenderInfo.RenderInfo.superClass_.finalize_.call(this);this.rightSide&&(this.widthWithChildren+=this.rightSide.width)};var module$exports$Blockly$zelos$Renderer={Renderer:function(a){module$exports$Blockly$zelos$Renderer.Renderer.superClass_.constructor.call(this,a)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$zelos$Renderer.Renderer,module$exports$Blockly$blockRendering$Renderer.Renderer);module$exports$Blockly$zelos$Renderer.Renderer.prototype.makeConstants_=function(){return new module$exports$Blockly$zelos$ConstantProvider.ConstantProvider};
1143
1143
  module$exports$Blockly$zelos$Renderer.Renderer.prototype.makeRenderInfo_=function(a){return new module$exports$Blockly$zelos$RenderInfo.RenderInfo(this,a)};module$exports$Blockly$zelos$Renderer.Renderer.prototype.makeDrawer_=function(a,b){return new module$exports$Blockly$zelos$Drawer.Drawer(a,b)};module$exports$Blockly$zelos$Renderer.Renderer.prototype.makeMarkerDrawer=function(a,b){return new module$exports$Blockly$zelos$MarkerSvg.MarkerSvg(a,this.getConstants(),b)};
1144
1144
  module$exports$Blockly$zelos$Renderer.Renderer.prototype.makePathObject=function(a,b){return new module$exports$Blockly$zelos$PathObject.PathObject(a,b,this.getConstants())};module$exports$Blockly$zelos$Renderer.Renderer.prototype.shouldHighlightConnection=function(a){return a.type!==$.module$exports$Blockly$ConnectionType.ConnectionType.INPUT_VALUE&&a.type!==$.module$exports$Blockly$ConnectionType.ConnectionType.OUTPUT_VALUE};
1145
1145
  module$exports$Blockly$zelos$Renderer.Renderer.prototype.getConnectionPreviewMethod=function(a,b,c){return b.type===$.module$exports$Blockly$ConnectionType.ConnectionType.OUTPUT_VALUE?a.isConnected()?module$exports$Blockly$InsertionMarkerManager.InsertionMarkerManager.PREVIEW_TYPE.REPLACEMENT_FADE:module$exports$Blockly$InsertionMarkerManager.InsertionMarkerManager.PREVIEW_TYPE.INPUT_OUTLINE:module$exports$Blockly$zelos$Renderer.Renderer.superClass_.getConnectionPreviewMethod(a,b,c)};
@@ -1147,8 +1147,8 @@ module$exports$Blockly$zelos$Renderer.Renderer.prototype.getConnectionPreviewMet
1147
1147
  module$exports$Blockly$zelos.RenderInfo=module$exports$Blockly$zelos$RenderInfo.RenderInfo;module$exports$Blockly$zelos.Renderer=module$exports$Blockly$zelos$Renderer.Renderer;module$exports$Blockly$zelos.RightConnectionShape=module$exports$Blockly$zelos$RightConnectionShape.RightConnectionShape;module$exports$Blockly$zelos.StatementInput=module$exports$Blockly$zelos$StatementInput.StatementInput;module$exports$Blockly$zelos.TopRow=module$exports$Blockly$zelos$TopRow.TopRow;var module$exports$Blockly$IToolboxItem={IToolboxItem:function(){}};var module$exports$Blockly$ISelectableToolboxItem={ISelectableToolboxItem:function(){}};var module$exports$Blockly$ICollapsibleToolboxItem={ICollapsibleToolboxItem:function(){}};var module$exports$Blockly$Css={},module$contents$Blockly$Css_injected=!1;module$exports$Blockly$Css.register=function(a){if(module$contents$Blockly$Css_injected)throw Error("CSS already injected");Array.isArray(a)?((0,module$exports$Blockly$utils$deprecation.warn)("Registering CSS by passing an array of strings","September 2021","September 2022","css.register passing a multiline string"),module$exports$Blockly$Css.content+="\n"+a.join("\n")):module$exports$Blockly$Css.content+="\n"+a};
1148
1148
  module$exports$Blockly$Css.inject=function(a,b){module$contents$Blockly$Css_injected||(module$contents$Blockly$Css_injected=!0,a&&(a=b.replace(/[\\/]$/,""),b=module$exports$Blockly$Css.content.replace(/<<<PATH>>>/g,a),module$exports$Blockly$Css.content="",a=document.createElement("style"),a.id="blockly-common-style",b=document.createTextNode(b),a.appendChild(b),document.head.insertBefore(a,document.head.firstChild)))};module$exports$Blockly$Css.content='\n .blocklySvg {\n background-color: #fff;\n outline: none;\n overflow: hidden; /* IE overflows by default. */\n position: absolute;\n display: block;\n }\n\n .blocklyWidgetDiv {\n display: none;\n position: absolute;\n z-index: 99999; /* big value for bootstrap3 compatibility */\n }\n\n .injectionDiv {\n height: 100%;\n position: relative;\n overflow: hidden; /* So blocks in drag surface disappear at edges */\n touch-action: none;\n }\n\n .blocklyNonSelectable {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n }\n\n .blocklyWsDragSurface {\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n }\n\n /* Added as a separate rule with multiple classes to make it more specific\n than a bootstrap rule that selects svg:root. See issue #1275 for context.\n */\n .blocklyWsDragSurface.blocklyOverflowVisible {\n overflow: visible;\n }\n\n .blocklyBlockDragSurface {\n display: none;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: visible !important;\n z-index: 50; /* Display below toolbox, but above everything else. */\n }\n\n .blocklyBlockCanvas.blocklyCanvasTransitioning,\n .blocklyBubbleCanvas.blocklyCanvasTransitioning {\n transition: transform .5s;\n }\n\n .blocklyTooltipDiv {\n background-color: #ffffc7;\n border: 1px solid #ddc;\n box-shadow: 4px 4px 20px 1px rgba(0,0,0,.15);\n color: #000;\n display: none;\n font: 9pt sans-serif;\n opacity: .9;\n padding: 2px;\n position: absolute;\n z-index: 100000; /* big value for bootstrap3 compatibility */\n }\n\n .blocklyDropDownDiv {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1000;\n display: none;\n border: 1px solid;\n border-color: #dadce0;\n background-color: #fff;\n border-radius: 2px;\n padding: 4px;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n }\n\n .blocklyDropDownDiv.blocklyFocused {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n }\n\n .blocklyDropDownContent {\n max-height: 300px; // @todo: spec for maximum height.\n overflow: auto;\n overflow-x: hidden;\n position: relative;\n }\n\n .blocklyDropDownArrow {\n position: absolute;\n left: 0;\n top: 0;\n width: 16px;\n height: 16px;\n z-index: -1;\n background-color: inherit;\n border-color: inherit;\n }\n\n .blocklyDropDownButton {\n display: inline-block;\n float: left;\n padding: 0;\n margin: 4px;\n border-radius: 4px;\n outline: none;\n border: 1px solid;\n transition: box-shadow .1s;\n cursor: pointer;\n }\n\n .blocklyArrowTop {\n border-top: 1px solid;\n border-left: 1px solid;\n border-top-left-radius: 4px;\n border-color: inherit;\n }\n\n .blocklyArrowBottom {\n border-bottom: 1px solid;\n border-right: 1px solid;\n border-bottom-right-radius: 4px;\n border-color: inherit;\n }\n\n .blocklyResizeSE {\n cursor: se-resize;\n fill: #aaa;\n }\n\n .blocklyResizeSW {\n cursor: sw-resize;\n fill: #aaa;\n }\n\n .blocklyResizeLine {\n stroke: #515A5A;\n stroke-width: 1;\n }\n\n .blocklyHighlightedConnectionPath {\n fill: none;\n stroke: #fc3;\n stroke-width: 4px;\n }\n\n .blocklyPathLight {\n fill: none;\n stroke-linecap: round;\n stroke-width: 1;\n }\n\n .blocklySelected>.blocklyPathLight {\n display: none;\n }\n\n .blocklyDraggable {\n /* backup for browsers (e.g. IE11) that don\'t support grab */\n cursor: url("<<<PATH>>>/handopen.cur"), auto;\n cursor: grab;\n cursor: -webkit-grab;\n }\n\n /* backup for browsers (e.g. IE11) that don\'t support grabbing */\n .blocklyDragging {\n /* backup for browsers (e.g. IE11) that don\'t support grabbing */\n cursor: url("<<<PATH>>>/handclosed.cur"), auto;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n /* Changes cursor on mouse down. Not effective in Firefox because of\n https://bugzilla.mozilla.org/show_bug.cgi?id=771241 */\n .blocklyDraggable:active {\n /* backup for browsers (e.g. IE11) that don\'t support grabbing */\n cursor: url("<<<PATH>>>/handclosed.cur"), auto;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n /* Change the cursor on the whole drag surface in case the mouse gets\n ahead of block during a drag. This way the cursor is still a closed hand.\n */\n .blocklyBlockDragSurface .blocklyDraggable {\n /* backup for browsers (e.g. IE11) that don\'t support grabbing */\n cursor: url("<<<PATH>>>/handclosed.cur"), auto;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n .blocklyDragging.blocklyDraggingDelete {\n cursor: url("<<<PATH>>>/handdelete.cur"), auto;\n }\n\n .blocklyDragging>.blocklyPath,\n .blocklyDragging>.blocklyPathLight {\n fill-opacity: .8;\n stroke-opacity: .8;\n }\n\n .blocklyDragging>.blocklyPathDark {\n display: none;\n }\n\n .blocklyDisabled>.blocklyPath {\n fill-opacity: .5;\n stroke-opacity: .5;\n }\n\n .blocklyDisabled>.blocklyPathLight,\n .blocklyDisabled>.blocklyPathDark {\n display: none;\n }\n\n .blocklyInsertionMarker>.blocklyPath,\n .blocklyInsertionMarker>.blocklyPathLight,\n .blocklyInsertionMarker>.blocklyPathDark {\n fill-opacity: .2;\n stroke: none;\n }\n\n .blocklyMultilineText {\n font-family: monospace;\n }\n\n .blocklyNonEditableText>text {\n pointer-events: none;\n }\n\n .blocklyFlyout {\n position: absolute;\n z-index: 20;\n }\n\n .blocklyText text {\n cursor: default;\n }\n\n /*\n Don\'t allow users to select text. It gets annoying when trying to\n drag a block and selected text moves instead.\n */\n .blocklySvg text,\n .blocklyBlockDragSurface text {\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n cursor: inherit;\n }\n\n .blocklyHidden {\n display: none;\n }\n\n .blocklyFieldDropdown:not(.blocklyHidden) {\n display: block;\n }\n\n .blocklyIconGroup {\n cursor: default;\n }\n\n .blocklyIconGroup:not(:hover),\n .blocklyIconGroupReadonly {\n opacity: .6;\n }\n\n .blocklyIconShape {\n fill: #00f;\n stroke: #fff;\n stroke-width: 1px;\n }\n\n .blocklyIconSymbol {\n fill: #fff;\n }\n\n .blocklyMinimalBody {\n margin: 0;\n padding: 0;\n }\n\n .blocklyHtmlInput {\n border: none;\n border-radius: 4px;\n height: 100%;\n margin: 0;\n outline: none;\n padding: 0;\n width: 100%;\n text-align: center;\n display: block;\n box-sizing: border-box;\n }\n\n /* Edge and IE introduce a close icon when the input value is longer than a\n certain length. This affects our sizing calculations of the text input.\n Hiding the close icon to avoid that. */\n .blocklyHtmlInput::-ms-clear {\n display: none;\n }\n\n .blocklyMainBackground {\n stroke-width: 1;\n stroke: #c6c6c6; /* Equates to #ddd due to border being off-pixel. */\n }\n\n .blocklyMutatorBackground {\n fill: #fff;\n stroke: #ddd;\n stroke-width: 1;\n }\n\n .blocklyFlyoutBackground {\n fill: #ddd;\n fill-opacity: .8;\n }\n\n .blocklyMainWorkspaceScrollbar {\n z-index: 20;\n }\n\n .blocklyFlyoutScrollbar {\n z-index: 30;\n }\n\n .blocklyScrollbarHorizontal,\n .blocklyScrollbarVertical {\n position: absolute;\n outline: none;\n }\n\n .blocklyScrollbarBackground {\n opacity: 0;\n }\n\n .blocklyScrollbarHandle {\n fill: #ccc;\n }\n\n .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n .blocklyScrollbarHandle:hover {\n fill: #bbb;\n }\n\n /* Darken flyout scrollbars due to being on a grey background. */\n /* By contrast, workspace scrollbars are on a white background. */\n .blocklyFlyout .blocklyScrollbarHandle {\n fill: #bbb;\n }\n\n .blocklyFlyout .blocklyScrollbarBackground:hover+.blocklyScrollbarHandle,\n .blocklyFlyout .blocklyScrollbarHandle:hover {\n fill: #aaa;\n }\n\n .blocklyInvalidInput {\n background: #faa;\n }\n\n .blocklyVerticalMarker {\n stroke-width: 3px;\n fill: rgba(255,255,255,.5);\n pointer-events: none;\n }\n\n .blocklyComputeCanvas {\n position: absolute;\n width: 0;\n height: 0;\n }\n\n .blocklyNoPointerEvents {\n pointer-events: none;\n }\n\n .blocklyContextMenu {\n border-radius: 4px;\n max-height: 100%;\n }\n\n .blocklyDropdownMenu {\n border-radius: 2px;\n padding: 0 !important;\n }\n\n .blocklyDropdownMenu .blocklyMenuItem {\n /* 28px on the left for icon or checkbox. */\n padding-left: 28px;\n }\n\n /* BiDi override for the resting state. */\n .blocklyDropdownMenu .blocklyMenuItemRtl {\n /* Flip left/right padding for BiDi. */\n padding-left: 5px;\n padding-right: 28px;\n }\n\n .blocklyWidgetDiv .blocklyMenu {\n background: #fff;\n border: 1px solid transparent;\n box-shadow: 0 0 3px 1px rgba(0,0,0,.3);\n font: normal 13px Arial, sans-serif;\n margin: 0;\n outline: none;\n padding: 4px 0;\n position: absolute;\n overflow-y: auto;\n overflow-x: hidden;\n max-height: 100%;\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n }\n\n .blocklyWidgetDiv .blocklyMenu.blocklyFocused {\n box-shadow: 0 0 6px 1px rgba(0,0,0,.3);\n }\n\n .blocklyDropDownDiv .blocklyMenu {\n background: inherit; /* Compatibility with gapi, reset from goog-menu */\n border: inherit; /* Compatibility with gapi, reset from goog-menu */\n font: normal 13px "Helvetica Neue", Helvetica, sans-serif;\n outline: none;\n position: relative; /* Compatibility with gapi, reset from goog-menu */\n z-index: 20000; /* Arbitrary, but some apps depend on it... */\n }\n\n /* State: resting. */\n .blocklyMenuItem {\n border: none;\n color: #000;\n cursor: pointer;\n list-style: none;\n margin: 0;\n /* 7em on the right for shortcut. */\n min-width: 7em;\n padding: 6px 15px;\n white-space: nowrap;\n }\n\n /* State: disabled. */\n .blocklyMenuItemDisabled {\n color: #ccc;\n cursor: inherit;\n }\n\n /* State: hover. */\n .blocklyMenuItemHighlight {\n background-color: rgba(0,0,0,.1);\n }\n\n /* State: selected/checked. */\n .blocklyMenuItemCheckbox {\n height: 16px;\n position: absolute;\n width: 16px;\n }\n\n .blocklyMenuItemSelected .blocklyMenuItemCheckbox {\n background: url(<<<PATH>>>/sprites.png) no-repeat -48px -16px;\n float: left;\n margin-left: -24px;\n position: static; /* Scroll with the menu. */\n }\n\n .blocklyMenuItemRtl .blocklyMenuItemCheckbox {\n float: right;\n margin-right: -24px;\n }\n';var module$exports$Blockly$ToolboxItem={ToolboxItem:function(a,b,c){this.id_=a.toolboxitemid||(0,module$exports$Blockly$utils$idGenerator.getNextUniqueId)();this.level_=(this.parent_=c||null)?this.parent_.getLevel()+1:0;this.toolboxItemDef_=a;this.parentToolbox_=b;this.workspace_=this.parentToolbox_.getWorkspace()}};module$exports$Blockly$ToolboxItem.ToolboxItem.prototype.init=function(){};module$exports$Blockly$ToolboxItem.ToolboxItem.prototype.getDiv=function(){return null};
1149
1149
  module$exports$Blockly$ToolboxItem.ToolboxItem.prototype.getId=function(){return this.id_};module$exports$Blockly$ToolboxItem.ToolboxItem.prototype.getParent=function(){return null};module$exports$Blockly$ToolboxItem.ToolboxItem.prototype.getLevel=function(){return this.level_};module$exports$Blockly$ToolboxItem.ToolboxItem.prototype.isSelectable=function(){return!1};module$exports$Blockly$ToolboxItem.ToolboxItem.prototype.isCollapsible=function(){return!1};
1150
- module$exports$Blockly$ToolboxItem.ToolboxItem.prototype.dispose=function(){};var module$exports$Blockly$ToolboxCategory={ToolboxCategory:function(a,b,c){module$exports$Blockly$ToolboxCategory.ToolboxCategory.superClass_.constructor.call(this,a,b,c);this.name_=(0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.name);this.colour_=this.getColour_(a);this.labelDom_=this.iconDom_=this.rowContents_=this.rowDiv_=this.htmlDiv_=null;this.cssConfig_=this.makeDefaultCssConfig_();(0,module$exports$Blockly$utils$object.mixin)(this.cssConfig_,a.cssconfig||a.cssConfig);
1151
- this.isDisabled_=this.isHidden_=!1;this.flyoutItems_=[];this.parseContents_(a)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$ToolboxCategory.ToolboxCategory,module$exports$Blockly$ToolboxItem.ToolboxItem);module$exports$Blockly$ToolboxCategory.ToolboxCategory.registrationName="category";module$exports$Blockly$ToolboxCategory.ToolboxCategory.nestedPadding=19;module$exports$Blockly$ToolboxCategory.ToolboxCategory.borderWidth=8;
1150
+ module$exports$Blockly$ToolboxItem.ToolboxItem.prototype.dispose=function(){};var module$exports$Blockly$ToolboxCategory={ToolboxCategory:function(a,b,c){module$exports$Blockly$ToolboxCategory.ToolboxCategory.superClass_.constructor.call(this,a,b,c);this.name_=(0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.name);this.colour_=this.getColour_(a);this.labelDom_=this.iconDom_=this.rowContents_=this.rowDiv_=this.htmlDiv_=null;this.cssConfig_=this.makeDefaultCssConfig_();(0,$.module$exports$Blockly$utils$object.mixin)(this.cssConfig_,a.cssconfig||a.cssConfig);
1151
+ this.isDisabled_=this.isHidden_=!1;this.flyoutItems_=[];this.parseContents_(a)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$ToolboxCategory.ToolboxCategory,module$exports$Blockly$ToolboxItem.ToolboxItem);module$exports$Blockly$ToolboxCategory.ToolboxCategory.registrationName="category";module$exports$Blockly$ToolboxCategory.ToolboxCategory.nestedPadding=19;module$exports$Blockly$ToolboxCategory.ToolboxCategory.borderWidth=8;
1152
1152
  module$exports$Blockly$ToolboxCategory.ToolboxCategory.defaultBackgroundColour="#57e";module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.makeDefaultCssConfig_=function(){return{container:"blocklyToolboxCategory",row:"blocklyTreeRow",rowcontentcontainer:"blocklyTreeRowContentContainer",icon:"blocklyTreeIcon",label:"blocklyTreeLabel",contents:"blocklyToolboxContents",selected:"blocklyTreeSelected",openicon:"blocklyTreeIconOpen",closedicon:"blocklyTreeIconClosed"}};
1153
1153
  module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.parseContents_=function(a){var b=a.contents;if(a.custom)this.flyoutItems_=a.custom;else if(b)for(a=0;a<b.length;a++)this.flyoutItems_.push(b[a])};module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.init=function(){this.createDom_();"true"===this.toolboxItemDef_.hidden&&this.hide()};
1154
1154
  module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.createDom_=function(){this.htmlDiv_=this.createContainer_();(0,module$exports$Blockly$utils$aria.setRole)(this.htmlDiv_,module$exports$Blockly$utils$aria.Role.TREEITEM);(0,module$exports$Blockly$utils$aria.setState)(this.htmlDiv_,module$exports$Blockly$utils$aria.State.SELECTED,!1);(0,module$exports$Blockly$utils$aria.setState)(this.htmlDiv_,module$exports$Blockly$utils$aria.State.LEVEL,this.level_);this.rowDiv_=this.createRowContainer_();
@@ -1169,10 +1169,10 @@ module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.setSelected=fun
1169
1169
  module$exports$Blockly$utils$aria.State.SELECTED,a)};module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.setDisabled=function(a){this.isDisabled_=a;this.getDiv().setAttribute("disabled",a);a?this.getDiv().setAttribute("disabled","true"):this.getDiv().removeAttribute("disabled")};module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.getName=function(){return this.name_};module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.getParent=function(){return this.parent_};
1170
1170
  module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.getDiv=function(){return this.htmlDiv_};module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.getContents=function(){return this.flyoutItems_};
1171
1171
  module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.updateFlyoutContents=function(a){this.flyoutItems_=[];"string"===typeof a?this.toolboxItemDef_.custom=a:(delete this.toolboxItemDef_.custom,this.toolboxItemDef_.contents=(0,module$exports$Blockly$utils$toolbox.convertFlyoutDefToJsonArray)(a));this.parseContents_(this.toolboxItemDef_)};module$exports$Blockly$ToolboxCategory.ToolboxCategory.prototype.dispose=function(){(0,module$exports$Blockly$utils$dom.removeNode)(this.htmlDiv_)};(0,module$exports$Blockly$Css.register)('\n .blocklyTreeRow:not(.blocklyTreeSelected):hover {\n background-color: rgba(255, 255, 255, 0.2);\n }\n\n .blocklyToolboxDiv[layout="h"] .blocklyToolboxCategory {\n margin: 1px 5px 1px 0;\n }\n\n .blocklyToolboxDiv[dir="RTL"][layout="h"] .blocklyToolboxCategory {\n margin: 1px 0 1px 5px;\n }\n\n .blocklyTreeRow {\n height: 22px;\n line-height: 22px;\n margin-bottom: 3px;\n padding-right: 8px;\n white-space: nowrap;\n }\n\n .blocklyToolboxDiv[dir="RTL"] .blocklyTreeRow {\n margin-left: 8px;\n padding-right: 0;\n }\n\n .blocklyTreeIcon {\n background-image: url(<<<PATH>>>/sprites.png);\n height: 16px;\n vertical-align: middle;\n visibility: hidden;\n width: 16px;\n }\n\n .blocklyTreeIconClosed {\n background-position: -32px -1px;\n }\n\n .blocklyToolboxDiv[dir="RTL"] .blocklyTreeIconClosed {\n background-position: 0 -1px;\n }\n\n .blocklyTreeSelected>.blocklyTreeIconClosed {\n background-position: -32px -17px;\n }\n\n .blocklyToolboxDiv[dir="RTL"] .blocklyTreeSelected>.blocklyTreeIconClosed {\n background-position: 0 -17px;\n }\n\n .blocklyTreeIconOpen {\n background-position: -16px -1px;\n }\n\n .blocklyTreeSelected>.blocklyTreeIconOpen {\n background-position: -16px -17px;\n }\n\n .blocklyTreeLabel {\n cursor: default;\n font: 16px sans-serif;\n padding: 0 3px;\n vertical-align: middle;\n }\n\n .blocklyToolboxDelete .blocklyTreeLabel {\n cursor: url("<<<PATH>>>/handdelete.cur"), auto;\n }\n\n .blocklyTreeSelected .blocklyTreeLabel {\n color: #fff;\n }\n');
1172
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.TOOLBOX_ITEM,module$exports$Blockly$ToolboxCategory.ToolboxCategory.registrationName,module$exports$Blockly$ToolboxCategory.ToolboxCategory);var module$exports$Blockly$ToolboxSeparator={ToolboxSeparator:function(a,b){module$exports$Blockly$ToolboxSeparator.ToolboxSeparator.superClass_.constructor.call(this,a,b);this.cssConfig_={container:"blocklyTreeSeparator"};(0,module$exports$Blockly$utils$object.mixin)(this.cssConfig_,a.cssconfig||a.cssConfig)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$ToolboxSeparator.ToolboxSeparator,module$exports$Blockly$ToolboxItem.ToolboxItem);
1172
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.TOOLBOX_ITEM,module$exports$Blockly$ToolboxCategory.ToolboxCategory.registrationName,module$exports$Blockly$ToolboxCategory.ToolboxCategory);var module$exports$Blockly$ToolboxSeparator={ToolboxSeparator:function(a,b){module$exports$Blockly$ToolboxSeparator.ToolboxSeparator.superClass_.constructor.call(this,a,b);this.cssConfig_={container:"blocklyTreeSeparator"};(0,$.module$exports$Blockly$utils$object.mixin)(this.cssConfig_,a.cssconfig||a.cssConfig)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$ToolboxSeparator.ToolboxSeparator,module$exports$Blockly$ToolboxItem.ToolboxItem);
1173
1173
  module$exports$Blockly$ToolboxSeparator.ToolboxSeparator.registrationName="sep";module$exports$Blockly$ToolboxSeparator.ToolboxSeparator.prototype.init=function(){this.createDom_()};module$exports$Blockly$ToolboxSeparator.ToolboxSeparator.prototype.createDom_=function(){var a=document.createElement("div");(0,module$exports$Blockly$utils$dom.addClass)(a,this.cssConfig_.container);return this.htmlDiv_=a};module$exports$Blockly$ToolboxSeparator.ToolboxSeparator.prototype.getDiv=function(){return this.htmlDiv_};
1174
1174
  module$exports$Blockly$ToolboxSeparator.ToolboxSeparator.prototype.dispose=function(){(0,module$exports$Blockly$utils$dom.removeNode)(this.htmlDiv_)};(0,module$exports$Blockly$Css.register)('\n .blocklyTreeSeparator {\n border-bottom: solid #e5e5e5 1px;\n height: 0;\n margin: 5px 0;\n }\n\n .blocklyToolboxDiv[layout="h"] .blocklyTreeSeparator {\n border-right: solid #e5e5e5 1px;\n border-bottom: none;\n height: auto;\n margin: 0 5px 0 5px;\n padding: 5px 0;\n width: 0;\n }\n');
1175
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.TOOLBOX_ITEM,module$exports$Blockly$ToolboxSeparator.ToolboxSeparator.registrationName,module$exports$Blockly$ToolboxSeparator.ToolboxSeparator);var module$exports$Blockly$CollapsibleToolboxCategory={CollapsibleToolboxCategory:function(a,b,c){this.subcategoriesDiv_=null;this.expanded_=!1;this.toolboxItems_=[];module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.superClass_.constructor.call(this,a,b,c)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory,module$exports$Blockly$ToolboxCategory.ToolboxCategory);
1175
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.TOOLBOX_ITEM,module$exports$Blockly$ToolboxSeparator.ToolboxSeparator.registrationName,module$exports$Blockly$ToolboxSeparator.ToolboxSeparator);var module$exports$Blockly$CollapsibleToolboxCategory={CollapsibleToolboxCategory:function(a,b,c){this.subcategoriesDiv_=null;this.expanded_=!1;this.toolboxItems_=[];module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.superClass_.constructor.call(this,a,b,c)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory,module$exports$Blockly$ToolboxCategory.ToolboxCategory);
1176
1176
  module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.registrationName="collapsibleCategory";module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.prototype.makeDefaultCssConfig_=function(){var a=module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.superClass_.makeDefaultCssConfig_.call(this);a.contents="blocklyToolboxContents";return a};
1177
1177
  module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.prototype.parseContents_=function(a){var b=a.contents,c=!0;if(a.custom)this.flyoutItems_=a.custom;else if(b)for(a=0;a<b.length;a++){var d=b[a];!(0,module$exports$Blockly$registry.hasItem)(module$exports$Blockly$registry.Type.TOOLBOX_ITEM,d.kind)||d.kind.toLowerCase()===module$exports$Blockly$ToolboxSeparator.ToolboxSeparator.registrationName&&c?(this.flyoutItems_.push(d),c=!0):(this.createToolboxItem_(d),c=!1)}};
1178
1178
  module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.prototype.createToolboxItem_=function(a){var b=a.kind;"CATEGORY"==b.toUpperCase()&&(0,module$exports$Blockly$utils$toolbox.isCategoryCollapsible)(a)&&(b=module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.registrationName);a=new ((0,module$exports$Blockly$registry.getClass)(module$exports$Blockly$registry.Type.TOOLBOX_ITEM,b))(a,this.parentToolbox_,this);this.toolboxItems_.push(a)};
@@ -1184,7 +1184,7 @@ module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.pro
1184
1184
  module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.prototype.setVisible_=function(a){this.htmlDiv_.style.display=a?"block":"none";for(var b=this.getChildToolboxItems(),c=0;c<b.length;c++)b[c].setVisible_(a);this.isHidden_=!a;this.parentToolbox_.getSelectedItem()===this&&this.parentToolbox_.clearSelection()};module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.prototype.isExpanded=function(){return this.expanded_};
1185
1185
  module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.prototype.isCollapsible=function(){return!0};module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.prototype.onClick=function(a){this.toggleExpanded()};module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.prototype.toggleExpanded=function(){this.setExpanded(!this.expanded_)};module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.prototype.getDiv=function(){return this.htmlDiv_};
1186
1186
  module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.prototype.getChildToolboxItems=function(){return this.toolboxItems_};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.TOOLBOX_ITEM,module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory.registrationName,module$exports$Blockly$CollapsibleToolboxCategory.CollapsibleToolboxCategory);var module$exports$Blockly$FieldAngle={FieldAngle:function(a,b,c){this.clockwise_=module$exports$Blockly$FieldAngle.FieldAngle.CLOCKWISE;this.offset_=module$exports$Blockly$FieldAngle.FieldAngle.OFFSET;this.wrap_=module$exports$Blockly$FieldAngle.FieldAngle.WRAP;this.round_=module$exports$Blockly$FieldAngle.FieldAngle.ROUND;module$exports$Blockly$FieldAngle.FieldAngle.superClass_.constructor.call(this,a,b,c);this.moveSurfaceWrapper_=this.clickSurfaceWrapper_=this.clickWrapper_=this.line_=this.gauge_=
1187
- this.editor_=null}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldAngle.FieldAngle,$.module$exports$Blockly$FieldTextInput.FieldTextInput);module$exports$Blockly$FieldAngle.FieldAngle.prototype.DEFAULT_VALUE=0;module$exports$Blockly$FieldAngle.FieldAngle.fromJson=function(a){return new this(a.angle,void 0,a)};module$exports$Blockly$FieldAngle.FieldAngle.prototype.SERIALIZABLE=!0;module$exports$Blockly$FieldAngle.FieldAngle.ROUND=15;
1187
+ this.editor_=null}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldAngle.FieldAngle,$.module$exports$Blockly$FieldTextInput.FieldTextInput);module$exports$Blockly$FieldAngle.FieldAngle.prototype.DEFAULT_VALUE=0;module$exports$Blockly$FieldAngle.FieldAngle.fromJson=function(a){return new this(a.angle,void 0,a)};module$exports$Blockly$FieldAngle.FieldAngle.prototype.SERIALIZABLE=!0;module$exports$Blockly$FieldAngle.FieldAngle.ROUND=15;
1188
1188
  module$exports$Blockly$FieldAngle.FieldAngle.HALF=50;module$exports$Blockly$FieldAngle.FieldAngle.CLOCKWISE=!1;module$exports$Blockly$FieldAngle.FieldAngle.OFFSET=0;module$exports$Blockly$FieldAngle.FieldAngle.WRAP=360;module$exports$Blockly$FieldAngle.FieldAngle.RADIUS=module$exports$Blockly$FieldAngle.FieldAngle.HALF-1;
1189
1189
  module$exports$Blockly$FieldAngle.FieldAngle.prototype.configure_=function(a){module$exports$Blockly$FieldAngle.FieldAngle.superClass_.configure_.call(this,a);switch(a.mode){case "compass":this.clockwise_=!0;this.offset_=90;break;case "protractor":this.clockwise_=!1,this.offset_=0}var b=a.clockwise;"boolean"===typeof b&&(this.clockwise_=b);b=a.offset;null!==b&&(b=Number(b),isNaN(b)||(this.offset_=b));b=a.wrap;null!==b&&(b=Number(b),isNaN(b)||(this.wrap_=b));a=a.round;null!==a&&(a=Number(a),isNaN(a)||
1190
1190
  (this.round_=a))};module$exports$Blockly$FieldAngle.FieldAngle.prototype.initView=function(){module$exports$Blockly$FieldAngle.FieldAngle.superClass_.initView.call(this);this.symbol_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.TSPAN,{},null);this.symbol_.appendChild(document.createTextNode("\u00b0"));this.textElement_.appendChild(this.symbol_)};
@@ -1205,13 +1205,7 @@ g=Math.cos(f)*module$exports$Blockly$FieldAngle.FieldAngle.RADIUS,h=Math.sin(f)*
1205
1205
  a.join(""));this.line_.setAttribute("x2",c);this.line_.setAttribute("y2",d)}};
1206
1206
  module$exports$Blockly$FieldAngle.FieldAngle.prototype.onHtmlInputKeyDown_=function(a){module$exports$Blockly$FieldAngle.FieldAngle.superClass_.onHtmlInputKeyDown_.call(this,a);var b;a.keyCode===module$exports$Blockly$utils$KeyCodes.KeyCodes.LEFT?b=this.sourceBlock_.RTL?1:-1:a.keyCode===module$exports$Blockly$utils$KeyCodes.KeyCodes.RIGHT?b=this.sourceBlock_.RTL?-1:1:a.keyCode===module$exports$Blockly$utils$KeyCodes.KeyCodes.DOWN?b=-1:a.keyCode===module$exports$Blockly$utils$KeyCodes.KeyCodes.UP&&
1207
1207
  (b=1);if(b){var c=this.getValue();this.displayMouseOrKeyboardValue_(c+b*this.round_);a.preventDefault();a.stopPropagation()}};module$exports$Blockly$FieldAngle.FieldAngle.prototype.doClassValidation_=function(a){a=Number(a);return isNaN(a)||!isFinite(a)?null:this.wrapValue_(a)};module$exports$Blockly$FieldAngle.FieldAngle.prototype.wrapValue_=function(a){a%=360;0>a&&(a+=360);a>this.wrap_&&(a-=360);return a};(0,module$exports$Blockly$Css.register)("\n .blocklyAngleCircle {\n stroke: #444;\n stroke-width: 1;\n fill: #ddd;\n fill-opacity: .8;\n }\n\n .blocklyAngleMarks {\n stroke: #444;\n stroke-width: 1;\n }\n\n .blocklyAngleGauge {\n fill: #f88;\n fill-opacity: .8;\n pointer-events: none;\n }\n\n .blocklyAngleLine {\n stroke: #f00;\n stroke-width: 2;\n stroke-linecap: round;\n pointer-events: none;\n }\n");
1208
- (0,module$exports$Blockly$fieldRegistry.register)("field_angle",module$exports$Blockly$FieldAngle.FieldAngle);$.module$exports$Blockly$FieldCheckbox={FieldCheckbox:function(a,b,c){this.checkChar_=null;$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.superClass_.constructor.call(this,a,b,c)}};(0,module$exports$Blockly$utils$object.inherits)($.module$exports$Blockly$FieldCheckbox.FieldCheckbox,module$exports$Blockly$Field.Field);$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.DEFAULT_VALUE=!1;
1209
- $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.fromJson=function(a){return new this(a.checked,void 0,a)};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.CHECK_CHAR="\u2713";$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.SERIALIZABLE=!0;$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.CURSOR="default";
1210
- $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.configure_=function(a){$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.superClass_.configure_.call(this,a);a.checkCharacter&&(this.checkChar_=a.checkCharacter)};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.saveState=function(){var a=this.saveLegacyState($.module$exports$Blockly$FieldCheckbox.FieldCheckbox);return null!==a?a:this.getValueBoolean()};
1211
- $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.initView=function(){$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.superClass_.initView.call(this);(0,module$exports$Blockly$utils$dom.addClass)(this.textElement_,"blocklyCheckbox");this.textElement_.style.display=this.value_?"block":"none"};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.render_=function(){this.textContent_&&(this.textContent_.nodeValue=this.getDisplayText_());this.updateSize_(this.getConstants().FIELD_CHECKBOX_X_OFFSET)};
1212
- $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.getDisplayText_=function(){return this.checkChar_||$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.CHECK_CHAR};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.setCheckCharacter=function(a){this.checkChar_=a;this.forceRerender()};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.showEditor_=function(){this.setValue(!this.value_)};
1213
- $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.doClassValidation_=function(a){return!0===a||"TRUE"===a?"TRUE":!1===a||"FALSE"===a?"FALSE":null};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.doValueUpdate_=function(a){this.value_=this.convertValueToBool_(a);this.textElement_&&(this.textElement_.style.display=this.value_?"block":"none")};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.getValue=function(){return this.value_?"TRUE":"FALSE"};
1214
- $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.getValueBoolean=function(){return this.value_};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.getText=function(){return String(this.convertValueToBool_(this.value_))};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.convertValueToBool_=function(a){return"string"===typeof a?"TRUE"===a:!!a};(0,module$exports$Blockly$fieldRegistry.register)("field_checkbox",$.module$exports$Blockly$FieldCheckbox.FieldCheckbox);var module$exports$Blockly$FieldColour={FieldColour:function(a,b,c){module$exports$Blockly$FieldColour.FieldColour.superClass_.constructor.call(this,a,b,c);this.onKeyDownWrapper_=this.onMouseLeaveWrapper_=this.onMouseEnterWrapper_=this.onMouseMoveWrapper_=this.onClickWrapper_=this.highlightedIndex_=this.picker_=null}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldColour.FieldColour,module$exports$Blockly$Field.Field);
1208
+ (0,module$exports$Blockly$fieldRegistry.register)("field_angle",module$exports$Blockly$FieldAngle.FieldAngle);var module$exports$Blockly$FieldColour={FieldColour:function(a,b,c){module$exports$Blockly$FieldColour.FieldColour.superClass_.constructor.call(this,a,b,c);this.onKeyDownWrapper_=this.onMouseLeaveWrapper_=this.onMouseEnterWrapper_=this.onMouseMoveWrapper_=this.onClickWrapper_=this.highlightedIndex_=this.picker_=null}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldColour.FieldColour,module$exports$Blockly$Field.Field);
1215
1209
  module$exports$Blockly$FieldColour.FieldColour.fromJson=function(a){return new this(a.colour,void 0,a)};module$exports$Blockly$FieldColour.FieldColour.prototype.SERIALIZABLE=!0;module$exports$Blockly$FieldColour.FieldColour.prototype.CURSOR="default";module$exports$Blockly$FieldColour.FieldColour.prototype.isDirty_=!1;module$exports$Blockly$FieldColour.FieldColour.prototype.colours_=null;module$exports$Blockly$FieldColour.FieldColour.prototype.titles_=null;
1216
1210
  module$exports$Blockly$FieldColour.FieldColour.prototype.columns_=0;module$exports$Blockly$FieldColour.FieldColour.prototype.configure_=function(a){module$exports$Blockly$FieldColour.FieldColour.superClass_.configure_.call(this,a);a.colourOptions&&(this.colours_=a.colourOptions,this.titles_=a.colourTitles);a.columns&&(this.columns_=a.columns)};
1217
1211
  module$exports$Blockly$FieldColour.FieldColour.prototype.initView=function(){this.size_=new module$exports$Blockly$utils$Size.Size(this.getConstants().FIELD_COLOUR_DEFAULT_WIDTH,this.getConstants().FIELD_COLOUR_DEFAULT_HEIGHT);this.getConstants().FIELD_COLOUR_FULL_BLOCK?this.clickTarget_=this.sourceBlock_.getSvgRoot():(this.createBorderRect_(),this.borderRect_.style.fillOpacity="1")};
@@ -1233,8 +1227,8 @@ b[g];b[g]===d&&(h.className="blocklyColourSelected",this.highlightedIndex_=g)}th
1233
1227
  "mouseleave",this,this.onMouseLeave_,!0);this.onKeyDownWrapper_=(0,module$exports$Blockly$browserEvents.conditionalBind)(e,"keydown",this,this.onKeyDown_);this.picker_=e};
1234
1228
  module$exports$Blockly$FieldColour.FieldColour.prototype.dropdownDispose_=function(){this.onClickWrapper_&&((0,module$exports$Blockly$browserEvents.unbind)(this.onClickWrapper_),this.onClickWrapper_=null);this.onMouseMoveWrapper_&&((0,module$exports$Blockly$browserEvents.unbind)(this.onMouseMoveWrapper_),this.onMouseMoveWrapper_=null);this.onMouseEnterWrapper_&&((0,module$exports$Blockly$browserEvents.unbind)(this.onMouseEnterWrapper_),this.onMouseEnterWrapper_=null);this.onMouseLeaveWrapper_&&((0,module$exports$Blockly$browserEvents.unbind)(this.onMouseLeaveWrapper_),
1235
1229
  this.onMouseLeaveWrapper_=null);this.onKeyDownWrapper_&&((0,module$exports$Blockly$browserEvents.unbind)(this.onKeyDownWrapper_),this.onKeyDownWrapper_=null);this.highlightedIndex_=this.picker_=null};(0,module$exports$Blockly$Css.register)("\n .blocklyColourTable {\n border-collapse: collapse;\n display: block;\n outline: none;\n padding: 1px;\n }\n\n .blocklyColourTable>tr>td {\n border: .5px solid #888;\n box-sizing: border-box;\n cursor: pointer;\n display: inline-block;\n height: 20px;\n padding: 0;\n width: 20px;\n }\n\n .blocklyColourTable>tr>td.blocklyColourHighlighted {\n border-color: #eee;\n box-shadow: 2px 2px 7px 2px rgba(0,0,0,.3);\n position: relative;\n }\n\n .blocklyColourSelected, .blocklyColourSelected:hover {\n border-color: #eee !important;\n outline: 1px solid #333;\n position: relative;\n }\n");
1236
- (0,module$exports$Blockly$fieldRegistry.register)("field_colour",module$exports$Blockly$FieldColour.FieldColour);var module$exports$Blockly$FieldLabelSerializable={FieldLabelSerializable:function(a,b,c){module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable.superClass_.constructor.call(this,a,b,c)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable,$.module$exports$Blockly$FieldLabel.FieldLabel);
1237
- module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable.fromJson=function(a){return new this((0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.text),void 0,a)};module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable.prototype.EDITABLE=!1;module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable.prototype.SERIALIZABLE=!0;(0,module$exports$Blockly$fieldRegistry.register)("field_label_serializable",module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable);var module$exports$Blockly$FieldMultilineInput={FieldMultilineInput:function(a,b,c){module$exports$Blockly$FieldMultilineInput.FieldMultilineInput.superClass_.constructor.call(this,a,b,c);this.textGroup_=null;this.maxLines_=Infinity;this.isOverflowedY_=!1}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldMultilineInput.FieldMultilineInput,$.module$exports$Blockly$FieldTextInput.FieldTextInput);
1230
+ (0,module$exports$Blockly$fieldRegistry.register)("field_colour",module$exports$Blockly$FieldColour.FieldColour);var module$exports$Blockly$FieldLabelSerializable={FieldLabelSerializable:function(a,b,c){module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable.superClass_.constructor.call(this,a,b,c)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable,$.module$exports$Blockly$FieldLabel.FieldLabel);
1231
+ module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable.fromJson=function(a){return new this((0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.text),void 0,a)};module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable.prototype.EDITABLE=!1;module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable.prototype.SERIALIZABLE=!0;(0,module$exports$Blockly$fieldRegistry.register)("field_label_serializable",module$exports$Blockly$FieldLabelSerializable.FieldLabelSerializable);var module$exports$Blockly$FieldMultilineInput={FieldMultilineInput:function(a,b,c){module$exports$Blockly$FieldMultilineInput.FieldMultilineInput.superClass_.constructor.call(this,a,b,c);this.textGroup_=null;this.maxLines_=Infinity;this.isOverflowedY_=!1}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldMultilineInput.FieldMultilineInput,$.module$exports$Blockly$FieldTextInput.FieldTextInput);
1238
1232
  module$exports$Blockly$FieldMultilineInput.FieldMultilineInput.prototype.configure_=function(a){module$exports$Blockly$FieldMultilineInput.FieldMultilineInput.superClass_.configure_.call(this,a);a.maxLines&&this.setMaxLines(a.maxLines)};module$exports$Blockly$FieldMultilineInput.FieldMultilineInput.fromJson=function(a){return new this((0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.text),void 0,a)};
1239
1233
  module$exports$Blockly$FieldMultilineInput.FieldMultilineInput.prototype.toXml=function(a){a.textContent=this.getValue().replace(/\n/g,"&#10;");return a};module$exports$Blockly$FieldMultilineInput.FieldMultilineInput.prototype.fromXml=function(a){this.setValue(a.textContent.replace(/&#10;/g,"\n"))};
1240
1234
  module$exports$Blockly$FieldMultilineInput.FieldMultilineInput.prototype.saveState=function(){var a=this.saveLegacyState(module$exports$Blockly$FieldMultilineInput.FieldMultilineInput);return null!==a?a:this.getValue()};module$exports$Blockly$FieldMultilineInput.FieldMultilineInput.prototype.loadState=function(a){this.loadLegacyState(module$exports$Blockly$Field.Field,a)||this.setValue(a)};
@@ -1262,7 +1256,7 @@ module$exports$Blockly$MetricsManager.MetricsManager.prototype.getPaddedContent_
1262
1256
  module$exports$Blockly$MetricsManager.MetricsManager.prototype.getScrollMetrics=function(a,b,c){a=a?this.workspace_.scale:1;b=b||this.getViewMetrics(!1);var d=c||this.getContentMetrics();c=this.getComputedFixedEdges_(b);b=this.getPaddedContent_(b,d);d=void 0!==c.top?c.top:b.top;var e=void 0!==c.left?c.left:b.left;return{top:d/a,left:e/a,width:((void 0!==c.right?c.right:b.right)-e)/a,height:((void 0!==c.bottom?c.bottom:b.bottom)-d)/a}};
1263
1257
  module$exports$Blockly$MetricsManager.MetricsManager.prototype.getUiMetrics=function(){return{viewMetrics:this.getViewMetrics(),absoluteMetrics:this.getAbsoluteMetrics(),toolboxMetrics:this.getToolboxMetrics()}};
1264
1258
  module$exports$Blockly$MetricsManager.MetricsManager.prototype.getMetrics=function(){var a=this.getToolboxMetrics(),b=this.getFlyoutMetrics(!0),c=this.getSvgMetrics(),d=this.getAbsoluteMetrics(),e=this.getViewMetrics(),f=this.getContentMetrics(),g=this.getScrollMetrics(!1,e,f);return{contentHeight:f.height,contentWidth:f.width,contentTop:f.top,contentLeft:f.left,scrollHeight:g.height,scrollWidth:g.width,scrollTop:g.top,scrollLeft:g.left,viewHeight:e.height,viewWidth:e.width,viewTop:e.top,viewLeft:e.left,
1265
- absoluteTop:d.top,absoluteLeft:d.left,svgHeight:c.height,svgWidth:c.width,toolboxWidth:a.width,toolboxHeight:a.height,toolboxPosition:a.position,flyoutWidth:b.width,flyoutHeight:b.height}};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.METRICS_MANAGER,module$exports$Blockly$registry.DEFAULT,module$exports$Blockly$MetricsManager.MetricsManager);var module$exports$Blockly$FlyoutMetricsManager={FlyoutMetricsManager:function(a,b){this.flyout_=b;module$exports$Blockly$FlyoutMetricsManager.FlyoutMetricsManager.superClass_.constructor.call(this,a)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FlyoutMetricsManager.FlyoutMetricsManager,module$exports$Blockly$MetricsManager.MetricsManager);
1259
+ absoluteTop:d.top,absoluteLeft:d.left,svgHeight:c.height,svgWidth:c.width,toolboxWidth:a.width,toolboxHeight:a.height,toolboxPosition:a.position,flyoutWidth:b.width,flyoutHeight:b.height}};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.METRICS_MANAGER,module$exports$Blockly$registry.DEFAULT,module$exports$Blockly$MetricsManager.MetricsManager);var module$exports$Blockly$FlyoutMetricsManager={FlyoutMetricsManager:function(a,b){this.flyout_=b;module$exports$Blockly$FlyoutMetricsManager.FlyoutMetricsManager.superClass_.constructor.call(this,a)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FlyoutMetricsManager.FlyoutMetricsManager,module$exports$Blockly$MetricsManager.MetricsManager);
1266
1260
  module$exports$Blockly$FlyoutMetricsManager.FlyoutMetricsManager.prototype.getBoundingBox_=function(){try{var a=this.workspace_.getCanvas().getBBox()}catch(b){a={height:0,y:0,width:0,x:0}}return a};module$exports$Blockly$FlyoutMetricsManager.FlyoutMetricsManager.prototype.getContentMetrics=function(a){var b=this.getBoundingBox_();a=a?1:this.workspace_.scale;return{height:b.height*a,width:b.width*a,top:b.y*a,left:b.x*a}};
1267
1261
  module$exports$Blockly$FlyoutMetricsManager.FlyoutMetricsManager.prototype.getScrollMetrics=function(a,b,c){b=c||this.getContentMetrics();c=this.flyout_.MARGIN*this.workspace_.scale;a=a?this.workspace_.scale:1;return{height:(b.height+2*c)/a,width:(b.width+b.left+c)/a,top:0,left:0}};var module$exports$Blockly$MenuItem={MenuItem:function(a,b){this.content_=a;this.value_=b;this.enabled_=!0;this.element_=null;this.rightToLeft_=!1;this.roleName_=null;this.highlight_=this.checked_=this.checkable_=!1;this.actionHandler_=null}};
1268
1262
  module$exports$Blockly$MenuItem.MenuItem.prototype.createDom=function(){var a=document.createElement("div");a.id=(0,module$exports$Blockly$utils$idGenerator.getNextUniqueId)();this.element_=a;a.className="blocklyMenuItem goog-menuitem "+(this.enabled_?"":"blocklyMenuItemDisabled goog-menuitem-disabled ")+(this.checked_?"blocklyMenuItemSelected goog-option-selected ":"")+(this.highlight_?"blocklyMenuItemHighlight goog-menuitem-highlight ":"")+(this.rightToLeft_?"blocklyMenuItemRtl goog-menuitem-rtl ":
@@ -1312,7 +1306,7 @@ var module$contents$Blockly$Extensions_checkDropdownOptionsInTable=function(a,b,
1312
1306
  $.module$exports$Blockly$Extensions.buildTooltipWithFieldText=function(a,b){"object"===typeof document&&(0,$.module$exports$Blockly$Extensions.runAfterPageLoad)(function(){(0,module$exports$Blockly$utils$parsing.checkMessageReferences)(a)});return function(){this.setTooltip(function(){var c=this.getField(b);return(0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a).replace("%1",c?c.getText():"")}.bind(this))}};
1313
1307
  var module$contents$Blockly$Extensions_extensionParentTooltip=function(){this.tooltipWhenNotConnected=this.tooltip;this.setTooltip(function(){var a=this.getParent();return a&&a.getInputsInline()&&a.tooltip||this.tooltipWhenNotConnected}.bind(this))};(0,$.module$exports$Blockly$Extensions.register)("parent_tooltip_when_inline",module$contents$Blockly$Extensions_extensionParentTooltip);var module$exports$Blockly$Block={Block:function(a,b,c){var d=$.module$exports$Blockly$Generator.Generator;if(d&&"undefined"!==typeof d.prototype[b])throw Error('Block prototypeName "'+b+'" conflicts with Blockly.Generator members.');this.id=c&&!a.getBlockById(c)?c:(0,module$exports$Blockly$utils$idGenerator.genUid)();a.setBlockById(this.id,this);this.previousConnection=this.nextConnection=this.outputConnection=null;this.inputList=[];this.inputsInline=void 0;this.disabled=!1;this.tooltip="";this.contextMenu=
1314
1308
  !0;this.parentBlock_=null;this.childBlocks_=[];this.editable_=this.movable_=this.deletable_=!0;this.collapsed_=this.isShadow_=!1;this.comment=this.outputShape_=null;this.commentModel={text:null,pinned:!1,size:new module$exports$Blockly$utils$Size.Size(160,80)};this.xy_=new module$exports$Blockly$utils$Coordinate.Coordinate(0,0);this.workspace=a;this.isInFlyout=a.isFlyout;this.isInMutator=a.isMutator;this.RTL=a.RTL;this.isInsertionMarker_=!1;this.hat=void 0;this.rendered=null;this.statementInputCount=
1315
- 0;if(b){this.type=b;c=$.module$exports$Blockly$blocks.Blocks[b];if(!c||"object"!==typeof c)throw TypeError("Unknown block type: "+b);(0,module$exports$Blockly$utils$object.mixin)(this,c)}a.addTopBlock(this);a.addTypedBlock(this);(a=(0,module$exports$Blockly$Events$utils.getGroup)())||(0,module$exports$Blockly$Events$utils.setGroup)(!0);b=(0,module$exports$Blockly$Events$utils.getRecordUndo)();try{"function"===typeof this.init&&((0,module$exports$Blockly$Events$utils.setRecordUndo)(!1),this.init(),
1309
+ 0;if(b){this.type=b;c=$.module$exports$Blockly$blocks.Blocks[b];if(!c||"object"!==typeof c)throw TypeError("Unknown block type: "+b);(0,$.module$exports$Blockly$utils$object.mixin)(this,c)}a.addTopBlock(this);a.addTypedBlock(this);(a=(0,module$exports$Blockly$Events$utils.getGroup)())||(0,module$exports$Blockly$Events$utils.setGroup)(!0);b=(0,module$exports$Blockly$Events$utils.getRecordUndo)();try{"function"===typeof this.init&&((0,module$exports$Blockly$Events$utils.setRecordUndo)(!1),this.init(),
1316
1310
  (0,module$exports$Blockly$Events$utils.setRecordUndo)(b)),(0,module$exports$Blockly$Events$utils.isEnabled)()&&(0,module$exports$Blockly$Events$utils.fire)(new ((0,module$exports$Blockly$Events$utils.get)(module$exports$Blockly$Events$utils.CREATE))(this))}finally{a||(0,module$exports$Blockly$Events$utils.setGroup)(!1),(0,module$exports$Blockly$Events$utils.setRecordUndo)(b)}this.inputsInlineDefault=this.inputsInline;"function"===typeof this.onchange&&this.setOnChange(this.onchange)}};
1317
1311
  module$exports$Blockly$Block.Block.COLLAPSED_INPUT_NAME=module$exports$Blockly$constants.COLLAPSED_INPUT_NAME;module$exports$Blockly$Block.Block.COLLAPSED_FIELD_NAME=module$exports$Blockly$constants.COLLAPSED_FIELD_NAME;module$exports$Blockly$Block.Block.prototype.data=null;module$exports$Blockly$Block.Block.prototype.disposed=!1;module$exports$Blockly$Block.Block.prototype.hue_=null;module$exports$Blockly$Block.Block.prototype.colour_="#000000";
1318
1312
  module$exports$Blockly$Block.Block.prototype.styleName_="";
@@ -1356,7 +1350,7 @@ module$exports$Blockly$Block.Block.prototype.jsonInit=function(a){var b=a.type?'
1356
1350
  c],b),c++;void 0!==a.inputsInline&&this.setInputsInline(a.inputsInline);void 0!==a.output&&this.setOutput(!0,a.output);void 0!==a.outputShape&&this.setOutputShape(a.outputShape);void 0!==a.previousStatement&&this.setPreviousStatement(!0,a.previousStatement);void 0!==a.nextStatement&&this.setNextStatement(!0,a.nextStatement);void 0!==a.tooltip&&(c=(0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.tooltip),this.setTooltip(c));void 0!==a.enableContextMenu&&(this.contextMenu=!!a.enableContextMenu);
1357
1351
  void 0!==a.suppressPrefixSuffix&&(this.suppressPrefixSuffix=!!a.suppressPrefixSuffix);void 0!==a.helpUrl&&(c=(0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.helpUrl),this.setHelpUrl(c));"string"===typeof a.extensions&&(console.warn(b+"JSON attribute 'extensions' should be an array of strings. Found raw string in JSON for '"+a.type+"' block."),a.extensions=[a.extensions]);void 0!==a.mutator&&(0,$.module$exports$Blockly$Extensions.apply)(a.mutator,this,!0);a=a.extensions;if(Array.isArray(a))for(b=
1358
1352
  0;b<a.length;b++)(0,$.module$exports$Blockly$Extensions.apply)(a[b],this,!1)};module$exports$Blockly$Block.Block.prototype.jsonInitColour_=function(a,b){if("colour"in a)if(void 0===a.colour)console.warn(b+"Undefined colour value.");else{a=a.colour;try{this.setColour(a)}catch(c){console.warn(b+"Illegal colour value: ",a)}}};module$exports$Blockly$Block.Block.prototype.jsonInitStyle_=function(a,b){a=a.style;try{this.setStyle(a)}catch(c){console.warn(b+"Style does not exist: ",a)}};
1359
- module$exports$Blockly$Block.Block.prototype.mixin=function(a,b){if(void 0!==b&&"boolean"!==typeof b)throw Error("opt_disableCheck must be a boolean if provided");if(!b){b=[];for(var c in a)void 0!==this[c]&&b.push(c);if(b.length)throw Error("Mixin will overwrite block members: "+JSON.stringify(b));}(0,module$exports$Blockly$utils$object.mixin)(this,a)};
1353
+ module$exports$Blockly$Block.Block.prototype.mixin=function(a,b){if(void 0!==b&&"boolean"!==typeof b)throw Error("opt_disableCheck must be a boolean if provided");if(!b){b=[];for(var c in a)void 0!==this[c]&&b.push(c);if(b.length)throw Error("Mixin will overwrite block members: "+JSON.stringify(b));}(0,$.module$exports$Blockly$utils$object.mixin)(this,a)};
1360
1354
  module$exports$Blockly$Block.Block.prototype.interpolate_=function(a,b,c,d){a=(0,module$exports$Blockly$utils$parsing.tokenizeInterpolation)(a);this.validateTokens_(a,b.length);b=this.interpolateArguments_(a,b,c);c=[];a=0;for(var e;e=b[a];a++)if(this.isInputKeyword_(e.type)){if(e=this.inputFromJson_(e,d)){for(var f=0,g;g=c[f];f++)e.appendField(g[0],g[1]);c.length=0}}else(f=this.fieldFromJson_(e))&&c.push([f,e.name])};
1361
1355
  module$exports$Blockly$Block.Block.prototype.validateTokens_=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];if("number"===typeof f){if(1>f||f>b)throw Error('Block "'+this.type+'": Message index %'+f+" out of range.");if(c[f])throw Error('Block "'+this.type+'": Message index %'+f+" duplicated.");c[f]=!0;d++}}if(d!==b)throw Error('Block "'+this.type+'": Message does not reference all '+b+" arg(s).");};
1362
1356
  module$exports$Blockly$Block.Block.prototype.interpolateArguments_=function(a,b,c){for(var d=[],e=0;e<a.length;e++){var f=a[e];"number"===typeof f&&(f=b[f-1]);if("string"===typeof f&&(f=this.stringToFieldJson_(f),!f))continue;d.push(f)}(a=d.length)&&!this.isInputKeyword_(d[a-1].type)&&(a={type:"input_dummy"},c&&(a.align=c),d.push(a));return d};
@@ -1372,7 +1366,7 @@ module$exports$Blockly$Block.Block.prototype.setCommentText=function(a){this.com
1372
1366
  module$exports$Blockly$Block.Block.prototype.getRelativeToSurfaceXY=function(){return this.xy_};module$exports$Blockly$Block.Block.prototype.moveBy=function(a,b){if(this.parentBlock_)throw Error("Block has parent.");var c=new ((0,module$exports$Blockly$Events$utils.get)(module$exports$Blockly$Events$utils.MOVE))(this);this.xy_.translate(a,b);c.recordNew();(0,module$exports$Blockly$Events$utils.fire)(c)};
1373
1367
  module$exports$Blockly$Block.Block.prototype.makeConnection_=function(a){return new module$exports$Blockly$Connection.Connection(this,a)};module$exports$Blockly$Block.Block.prototype.allInputsFilled=function(a){void 0===a&&(a=!0);if(!a&&this.isShadow())return!1;for(var b=0,c;c=this.inputList[b];b++)if(c.connection&&(c=c.connection.targetBlock(),!c||!c.allInputsFilled(a)))return!1;return(b=this.getNextBlock())?b.allInputsFilled(a):!0};
1374
1368
  module$exports$Blockly$Block.Block.prototype.toDevString=function(){var a=this.type?'"'+this.type+'" block':"Block";this.id&&(a+=' (id="'+this.id+'")');return a};var module$exports$Blockly$IBoundedElement={IBoundedElement:function(){}};var module$exports$Blockly$IMovable={IMovable:function(){}};var module$exports$Blockly$ISelectable={ISelectable:function(){}};var module$exports$Blockly$ICopyable={ICopyable:function(){}};var module$exports$Blockly$RenderedConnection={RenderedConnection:function(a,b){module$exports$Blockly$RenderedConnection.RenderedConnection.superClass_.constructor.call(this,a,b);this.db_=a.workspace.connectionDBList[b];this.dbOpposite_=a.workspace.connectionDBList[$.module$exports$Blockly$internalConstants.OPPOSITE_TYPE[b]];this.offsetInBlock_=new module$exports$Blockly$utils$Coordinate.Coordinate(0,0);this.trackedState_=module$exports$Blockly$RenderedConnection.RenderedConnection.TrackedState.WILL_TRACK;
1375
- this.targetConnection=null}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$RenderedConnection.RenderedConnection,module$exports$Blockly$Connection.Connection);module$exports$Blockly$RenderedConnection.RenderedConnection.TrackedState={WILL_TRACK:-1,UNTRACKED:0,TRACKED:1};
1369
+ this.targetConnection=null}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$RenderedConnection.RenderedConnection,module$exports$Blockly$Connection.Connection);module$exports$Blockly$RenderedConnection.RenderedConnection.TrackedState={WILL_TRACK:-1,UNTRACKED:0,TRACKED:1};
1376
1370
  module$exports$Blockly$RenderedConnection.RenderedConnection.prototype.dispose=function(){module$exports$Blockly$RenderedConnection.RenderedConnection.superClass_.dispose.call(this);this.trackedState_===module$exports$Blockly$RenderedConnection.RenderedConnection.TrackedState.TRACKED&&this.db_.removeConnection(this,this.y)};module$exports$Blockly$RenderedConnection.RenderedConnection.prototype.getSourceBlock=function(){return module$exports$Blockly$RenderedConnection.RenderedConnection.superClass_.getSourceBlock.call(this)};
1377
1371
  module$exports$Blockly$RenderedConnection.RenderedConnection.prototype.targetBlock=function(){return module$exports$Blockly$RenderedConnection.RenderedConnection.superClass_.targetBlock.call(this)};module$exports$Blockly$RenderedConnection.RenderedConnection.prototype.distanceFrom=function(a){var b=this.x-a.x;a=this.y-a.y;return Math.sqrt(b*b+a*a)};
1378
1372
  module$exports$Blockly$RenderedConnection.RenderedConnection.prototype.bumpAwayFrom=function(a){if(!this.sourceBlock_.workspace.isDragging()){var b=this.sourceBlock_.getRootBlock();if(!b.isInFlyout){var c=!1;if(!b.isMovable()){b=a.getSourceBlock().getRootBlock();if(!b.isMovable())return;a=this;c=!0}var d=(0,$.module$exports$Blockly$common.getSelected)()==b;d||b.addSelect();var e=a.x+$.module$exports$Blockly$internalConstants.SNAP_RADIUS+Math.floor(Math.random()*$.module$exports$Blockly$internalConstants.BUMP_RANDOMNESS)-
@@ -1396,18 +1390,18 @@ module$exports$Blockly$RenderedConnection.RenderedConnection.prototype.disconnec
1396
1390
  module$exports$Blockly$RenderedConnection.RenderedConnection.prototype.respawnShadow_=function(){module$exports$Blockly$RenderedConnection.RenderedConnection.superClass_.respawnShadow_.call(this);var a=this.targetBlock();a&&(a.initSvg(),a.render(!1),a=this.getSourceBlock(),a.rendered&&a.render())};module$exports$Blockly$RenderedConnection.RenderedConnection.prototype.neighbours=function(a){return this.dbOpposite_.getNeighbours(this,a)};
1397
1391
  module$exports$Blockly$RenderedConnection.RenderedConnection.prototype.connect_=function(a){module$exports$Blockly$RenderedConnection.RenderedConnection.superClass_.connect_.call(this,a);var b=this.getSourceBlock();a=a.getSourceBlock();var c=b.rendered,d=a.rendered;c&&b.updateDisabled();d&&a.updateDisabled();c&&d&&(this.type===$.module$exports$Blockly$ConnectionType.ConnectionType.NEXT_STATEMENT||this.type===$.module$exports$Blockly$ConnectionType.ConnectionType.PREVIOUS_STATEMENT?a.render():b.render());
1398
1392
  if(b=b.getInputWithBlock(a))b=b.isVisible(),a.getSvgRoot().style.display=b?"block":"none"};module$exports$Blockly$RenderedConnection.RenderedConnection.prototype.onCheckChanged_=function(){!this.isConnected()||this.targetConnection&&this.getConnectionChecker().canConnect(this,this.targetConnection,!1)||((this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug(),this.sourceBlock_.bumpNeighbours())};var module$exports$Blockly$Marker={Marker:function(){this.drawer_=this.curNode_=this.colour=null;this.type="marker"}};module$exports$Blockly$Marker.Marker.prototype.setDrawer=function(a){this.drawer_=a};module$exports$Blockly$Marker.Marker.prototype.getDrawer=function(){return this.drawer_};module$exports$Blockly$Marker.Marker.prototype.getCurNode=function(){return this.curNode_};
1399
- module$exports$Blockly$Marker.Marker.prototype.setCurNode=function(a){var b=this.curNode_;this.curNode_=a;this.drawer_&&this.drawer_.draw(b,this.curNode_)};module$exports$Blockly$Marker.Marker.prototype.draw=function(){this.drawer_&&this.drawer_.draw(this.curNode_,this.curNode_)};module$exports$Blockly$Marker.Marker.prototype.hide=function(){this.drawer_&&this.drawer_.hide()};module$exports$Blockly$Marker.Marker.prototype.dispose=function(){this.getDrawer()&&this.getDrawer().dispose()};var module$exports$Blockly$Cursor={Cursor:function(){module$exports$Blockly$Cursor.Cursor.superClass_.constructor.call(this);this.type="cursor"}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Cursor.Cursor,module$exports$Blockly$Marker.Marker);
1393
+ module$exports$Blockly$Marker.Marker.prototype.setCurNode=function(a){var b=this.curNode_;this.curNode_=a;this.drawer_&&this.drawer_.draw(b,this.curNode_)};module$exports$Blockly$Marker.Marker.prototype.draw=function(){this.drawer_&&this.drawer_.draw(this.curNode_,this.curNode_)};module$exports$Blockly$Marker.Marker.prototype.hide=function(){this.drawer_&&this.drawer_.hide()};module$exports$Blockly$Marker.Marker.prototype.dispose=function(){this.getDrawer()&&this.getDrawer().dispose()};var module$exports$Blockly$Cursor={Cursor:function(){module$exports$Blockly$Cursor.Cursor.superClass_.constructor.call(this);this.type="cursor"}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Cursor.Cursor,module$exports$Blockly$Marker.Marker);
1400
1394
  module$exports$Blockly$Cursor.Cursor.prototype.next=function(){var a=this.getCurNode();if(!a)return null;for(a=a.next();a&&a.next()&&(a.getType()===module$exports$Blockly$ASTNode.ASTNode.types.NEXT||a.getType()===module$exports$Blockly$ASTNode.ASTNode.types.BLOCK);)a=a.next();a&&this.setCurNode(a);return a};
1401
1395
  module$exports$Blockly$Cursor.Cursor.prototype.in=function(){var a=this.getCurNode();if(!a)return null;if(a.getType()===module$exports$Blockly$ASTNode.ASTNode.types.PREVIOUS||a.getType()===module$exports$Blockly$ASTNode.ASTNode.types.OUTPUT)a=a.next();(a=a.in())&&this.setCurNode(a);return a};
1402
1396
  module$exports$Blockly$Cursor.Cursor.prototype.prev=function(){var a=this.getCurNode();if(!a)return null;for(a=a.prev();a&&a.prev()&&(a.getType()===module$exports$Blockly$ASTNode.ASTNode.types.NEXT||a.getType()===module$exports$Blockly$ASTNode.ASTNode.types.BLOCK);)a=a.prev();a&&this.setCurNode(a);return a};
1403
- module$exports$Blockly$Cursor.Cursor.prototype.out=function(){var a=this.getCurNode();if(!a)return null;(a=a.out())&&a.getType()===module$exports$Blockly$ASTNode.ASTNode.types.BLOCK&&(a=a.prev()||a);a&&this.setCurNode(a);return a};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.CURSOR,module$exports$Blockly$registry.DEFAULT,module$exports$Blockly$Cursor.Cursor);var module$exports$Blockly$BasicCursor={BasicCursor:function(){module$exports$Blockly$BasicCursor.BasicCursor.superClass_.constructor.call(this)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$BasicCursor.BasicCursor,module$exports$Blockly$Cursor.Cursor);module$exports$Blockly$BasicCursor.BasicCursor.registrationName="basicCursor";
1397
+ module$exports$Blockly$Cursor.Cursor.prototype.out=function(){var a=this.getCurNode();if(!a)return null;(a=a.out())&&a.getType()===module$exports$Blockly$ASTNode.ASTNode.types.BLOCK&&(a=a.prev()||a);a&&this.setCurNode(a);return a};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.CURSOR,module$exports$Blockly$registry.DEFAULT,module$exports$Blockly$Cursor.Cursor);var module$exports$Blockly$BasicCursor={BasicCursor:function(){module$exports$Blockly$BasicCursor.BasicCursor.superClass_.constructor.call(this)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$BasicCursor.BasicCursor,module$exports$Blockly$Cursor.Cursor);module$exports$Blockly$BasicCursor.BasicCursor.registrationName="basicCursor";
1404
1398
  module$exports$Blockly$BasicCursor.BasicCursor.prototype.next=function(){var a=this.getCurNode();if(!a)return null;(a=this.getNextNode_(a,this.validNode_))&&this.setCurNode(a);return a};module$exports$Blockly$BasicCursor.BasicCursor.prototype.in=function(){return this.next()};module$exports$Blockly$BasicCursor.BasicCursor.prototype.prev=function(){var a=this.getCurNode();if(!a)return null;(a=this.getPreviousNode_(a,this.validNode_))&&this.setCurNode(a);return a};
1405
1399
  module$exports$Blockly$BasicCursor.BasicCursor.prototype.out=function(){return this.prev()};module$exports$Blockly$BasicCursor.BasicCursor.prototype.getNextNode_=function(a,b){if(!a)return null;var c=a.in()||a.next();if(b(c))return c;if(c)return this.getNextNode_(c,b);a=this.findSiblingOrParent_(a.out());return b(a)?a:a?this.getNextNode_(a,b):null};
1406
1400
  module$exports$Blockly$BasicCursor.BasicCursor.prototype.getPreviousNode_=function(a,b){if(!a)return null;var c=a.prev();c=c?this.getRightMostChild_(c):a.out();return b(c)?c:c?this.getPreviousNode_(c,b):null};
1407
1401
  module$exports$Blockly$BasicCursor.BasicCursor.prototype.validNode_=function(a){var b=!1;a=a&&a.getType();if(a===module$exports$Blockly$ASTNode.ASTNode.types.OUTPUT||a===module$exports$Blockly$ASTNode.ASTNode.types.INPUT||a===module$exports$Blockly$ASTNode.ASTNode.types.FIELD||a===module$exports$Blockly$ASTNode.ASTNode.types.NEXT||a===module$exports$Blockly$ASTNode.ASTNode.types.PREVIOUS||a===module$exports$Blockly$ASTNode.ASTNode.types.WORKSPACE)b=!0;return b};
1408
- module$exports$Blockly$BasicCursor.BasicCursor.prototype.findSiblingOrParent_=function(a){if(!a)return null;var b=a.next();return b?b:this.findSiblingOrParent_(a.out())};module$exports$Blockly$BasicCursor.BasicCursor.prototype.getRightMostChild_=function(a){if(!a.in())return a;for(a=a.in();a.next();)a=a.next();return this.getRightMostChild_(a)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.CURSOR,module$exports$Blockly$BasicCursor.BasicCursor.registrationName,module$exports$Blockly$BasicCursor.BasicCursor);var module$exports$Blockly$TabNavigateCursor={TabNavigateCursor:function(){module$exports$Blockly$TabNavigateCursor.TabNavigateCursor.superClass_.constructor.call(this)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$TabNavigateCursor.TabNavigateCursor,module$exports$Blockly$BasicCursor.BasicCursor);
1402
+ module$exports$Blockly$BasicCursor.BasicCursor.prototype.findSiblingOrParent_=function(a){if(!a)return null;var b=a.next();return b?b:this.findSiblingOrParent_(a.out())};module$exports$Blockly$BasicCursor.BasicCursor.prototype.getRightMostChild_=function(a){if(!a.in())return a;for(a=a.in();a.next();)a=a.next();return this.getRightMostChild_(a)};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.CURSOR,module$exports$Blockly$BasicCursor.BasicCursor.registrationName,module$exports$Blockly$BasicCursor.BasicCursor);var module$exports$Blockly$TabNavigateCursor={TabNavigateCursor:function(){module$exports$Blockly$TabNavigateCursor.TabNavigateCursor.superClass_.constructor.call(this)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$TabNavigateCursor.TabNavigateCursor,module$exports$Blockly$BasicCursor.BasicCursor);
1409
1403
  module$exports$Blockly$TabNavigateCursor.TabNavigateCursor.prototype.validNode_=function(a){var b=!1,c=a&&a.getType();a&&(a=a.getLocation(),c===module$exports$Blockly$ASTNode.ASTNode.types.FIELD&&a&&a.isTabNavigable()&&a.isClickable()&&(b=!0));return b};var module$exports$Blockly$BlockSvg={BlockSvg:function(a,b,c){this.svgGroup_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.G,{},null);this.svgGroup_.translate_="";this.style=a.getRenderer().getConstants().getBlockStyle(null);this.pathObject=a.getRenderer().makePathObject(this.svgGroup_,this.style);this.renderIsInProgress_=this.rendered=!1;this.workspace=a;this.previousConnection=this.nextConnection=this.outputConnection=null;this.useDragSurface_=(0,module$exports$Blockly$utils$svgMath.is3dSupported)()&&
1410
- !!a.getBlockDragSurface();var d=this.pathObject.svgPath;d.tooltip=this;(0,module$exports$Blockly$Tooltip.bindMouseEvents)(d);module$exports$Blockly$BlockSvg.BlockSvg.superClass_.constructor.call(this,a,b,c);this.svgGroup_.dataset?this.svgGroup_.dataset.id=this.id:module$exports$Blockly$utils$userAgent.IE&&this.svgGroup_.setAttribute("data-id",this.id)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$BlockSvg.BlockSvg,module$exports$Blockly$Block.Block);
1404
+ !!a.getBlockDragSurface();var d=this.pathObject.svgPath;d.tooltip=this;(0,module$exports$Blockly$Tooltip.bindMouseEvents)(d);module$exports$Blockly$BlockSvg.BlockSvg.superClass_.constructor.call(this,a,b,c);this.svgGroup_.dataset?this.svgGroup_.dataset.id=this.id:module$exports$Blockly$utils$userAgent.IE&&this.svgGroup_.setAttribute("data-id",this.id)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$BlockSvg.BlockSvg,module$exports$Blockly$Block.Block);
1411
1405
  module$exports$Blockly$BlockSvg.BlockSvg.prototype.height=0;module$exports$Blockly$BlockSvg.BlockSvg.prototype.width=0;module$exports$Blockly$BlockSvg.BlockSvg.prototype.warningTextDb_=null;module$exports$Blockly$BlockSvg.BlockSvg.INLINE=-1;module$exports$Blockly$BlockSvg.BlockSvg.COLLAPSED_WARNING_ID="TEMP_COLLAPSED_WARNING_";
1412
1406
  module$exports$Blockly$BlockSvg.BlockSvg.prototype.initSvg=function(){if(!this.workspace.rendered)throw TypeError("Workspace is headless.");for(var a=0,b;b=this.inputList[a];a++)b.init();a=this.getIcons();for(b=0;b<a.length;b++)a[b].createIcon();this.applyColour();this.pathObject.updateMovable(this.isMovable());a=this.getSvgRoot();this.workspace.options.readOnly||this.eventsInit_||!a||(0,module$exports$Blockly$browserEvents.conditionalBind)(a,"mousedown",this,this.onMouseDown_);this.eventsInit_=!0;
1413
1407
  a.parentNode||this.workspace.getCanvas().appendChild(a)};module$exports$Blockly$BlockSvg.BlockSvg.prototype.getColourSecondary=function(){return this.style.colourSecondary};module$exports$Blockly$BlockSvg.BlockSvg.prototype.getColourTertiary=function(){return this.style.colourTertiary};
@@ -1464,7 +1458,7 @@ module$exports$Blockly$BlockSvg.BlockSvg.prototype.render=function(a){if(!this.r
1464
1458
  !1}}};module$exports$Blockly$BlockSvg.BlockSvg.prototype.updateMarkers_=function(){this.workspace.keyboardAccessibilityMode&&this.pathObject.cursorSvg&&this.workspace.getCursor().draw();this.workspace.keyboardAccessibilityMode&&this.pathObject.markerSvg&&this.workspace.getMarker(module$exports$Blockly$MarkerManager.MarkerManager.LOCAL_MARKER).draw()};
1465
1459
  module$exports$Blockly$BlockSvg.BlockSvg.prototype.updateConnectionLocations_=function(){var a=this.getRelativeToSurfaceXY();this.previousConnection&&this.previousConnection.moveToOffset(a);this.outputConnection&&this.outputConnection.moveToOffset(a);for(var b=0;b<this.inputList.length;b++){var c=this.inputList[b].connection;c&&(c.moveToOffset(a),c.isConnected()&&c.tighten())}this.nextConnection&&(this.nextConnection.moveToOffset(a),this.nextConnection.isConnected()&&this.nextConnection.tighten())};
1466
1460
  module$exports$Blockly$BlockSvg.BlockSvg.prototype.setCursorSvg=function(a){this.pathObject.setCursorSvg(a)};module$exports$Blockly$BlockSvg.BlockSvg.prototype.setMarkerSvg=function(a){this.pathObject.setMarkerSvg(a)};module$exports$Blockly$BlockSvg.BlockSvg.prototype.getHeightWidth=function(){var a=this.height,b=this.width,c=this.getNextBlock();if(c){c=c.getHeightWidth();var d=this.workspace.getRenderer().getConstants().NOTCH_HEIGHT;a+=c.height-d;b=Math.max(b,c.width)}return{height:a,width:b}};
1467
- module$exports$Blockly$BlockSvg.BlockSvg.prototype.fadeForReplacement=function(a){this.pathObject.updateReplacementFade(a)};module$exports$Blockly$BlockSvg.BlockSvg.prototype.highlightShapeForInput=function(a,b){this.pathObject.updateShapeForInputHighlight(a,b)};var module$exports$Blockly$IComponent={IComponent:function(){}};var module$exports$Blockly$IDragTarget={IDragTarget:function(){}};var module$exports$Blockly$DragTarget={DragTarget:function(){}};module$exports$Blockly$DragTarget.DragTarget.prototype.onDragEnter=function(a){};module$exports$Blockly$DragTarget.DragTarget.prototype.onDragOver=function(a){};module$exports$Blockly$DragTarget.DragTarget.prototype.onDragExit=function(a){};module$exports$Blockly$DragTarget.DragTarget.prototype.onDrop=function(a){};module$exports$Blockly$DragTarget.DragTarget.prototype.shouldPreventMove=function(a){return!1};var module$exports$Blockly$IDeleteArea={IDeleteArea:function(){}};var module$exports$Blockly$DeleteArea={DeleteArea:function(){module$exports$Blockly$DeleteArea.DeleteArea.superClass_.constructor.call(this);this.wouldDelete_=!1}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$DeleteArea.DeleteArea,module$exports$Blockly$DragTarget.DragTarget);
1461
+ module$exports$Blockly$BlockSvg.BlockSvg.prototype.fadeForReplacement=function(a){this.pathObject.updateReplacementFade(a)};module$exports$Blockly$BlockSvg.BlockSvg.prototype.highlightShapeForInput=function(a,b){this.pathObject.updateShapeForInputHighlight(a,b)};var module$exports$Blockly$IComponent={IComponent:function(){}};var module$exports$Blockly$IDragTarget={IDragTarget:function(){}};var module$exports$Blockly$DragTarget={DragTarget:function(){}};module$exports$Blockly$DragTarget.DragTarget.prototype.onDragEnter=function(a){};module$exports$Blockly$DragTarget.DragTarget.prototype.onDragOver=function(a){};module$exports$Blockly$DragTarget.DragTarget.prototype.onDragExit=function(a){};module$exports$Blockly$DragTarget.DragTarget.prototype.onDrop=function(a){};module$exports$Blockly$DragTarget.DragTarget.prototype.shouldPreventMove=function(a){return!1};var module$exports$Blockly$IDeleteArea={IDeleteArea:function(){}};var module$exports$Blockly$DeleteArea={DeleteArea:function(){module$exports$Blockly$DeleteArea.DeleteArea.superClass_.constructor.call(this);this.wouldDelete_=!1}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$DeleteArea.DeleteArea,module$exports$Blockly$DragTarget.DragTarget);
1468
1462
  module$exports$Blockly$DeleteArea.DeleteArea.prototype.wouldDelete=function(a,b){a instanceof module$exports$Blockly$BlockSvg.BlockSvg?(a=!a.getParent()&&a.isDeletable(),this.updateWouldDelete_(a&&!b)):this.updateWouldDelete_(a.isDeletable());return this.wouldDelete_};module$exports$Blockly$DeleteArea.DeleteArea.prototype.updateWouldDelete_=function(a){this.wouldDelete_=a};var module$exports$Blockly$IFlyout={IFlyout:function(){}};var module$exports$Blockly$ScrollbarPair={ScrollbarPair:function(a,b,c,d,e){this.workspace_=a;b=void 0===b?!0:b;c=void 0===c?!0:c;var f=b&&c;b&&(this.hScroll=new module$exports$Blockly$Scrollbar.Scrollbar(a,!0,f,d,e));c&&(this.vScroll=new module$exports$Blockly$Scrollbar.Scrollbar(a,!1,f,d,e));f&&(this.corner_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.RECT,{height:module$exports$Blockly$Scrollbar.Scrollbar.scrollbarThickness,width:module$exports$Blockly$Scrollbar.Scrollbar.scrollbarThickness,
1469
1463
  "class":"blocklyScrollbarBackground"},null),(0,module$exports$Blockly$utils$dom.insertAfter)(this.corner_,a.getBubbleCanvas()));this.oldHostMetrics_=null}};module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.dispose=function(){(0,module$exports$Blockly$utils$dom.removeNode)(this.corner_);this.oldHostMetrics_=this.workspace_=this.corner_=null;this.hScroll&&(this.hScroll.dispose(),this.hScroll=null);this.vScroll&&(this.vScroll.dispose(),this.vScroll=null)};
1470
1464
  module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.resize=function(){var a=this.workspace_.getMetrics();if(a){var b=!1,c=!1;this.oldHostMetrics_&&this.oldHostMetrics_.viewWidth===a.viewWidth&&this.oldHostMetrics_.viewHeight===a.viewHeight&&this.oldHostMetrics_.absoluteTop===a.absoluteTop&&this.oldHostMetrics_.absoluteLeft===a.absoluteLeft?(this.oldHostMetrics_&&this.oldHostMetrics_.scrollWidth===a.scrollWidth&&this.oldHostMetrics_.viewLeft===a.viewLeft&&this.oldHostMetrics_.scrollLeft===
@@ -1473,8 +1467,8 @@ a.viewWidth&&this.oldHostMetrics_.absoluteLeft===a.absoluteLeft||this.corner_.se
1473
1467
  module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.canScrollVertically=function(){return!!this.vScroll};module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.setOrigin=function(a,b){this.hScroll&&this.hScroll.setOrigin(a,b);this.vScroll&&this.vScroll.setOrigin(a,b)};
1474
1468
  module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.set=function(a,b,c){this.hScroll&&this.hScroll.set(a,!1);this.vScroll&&this.vScroll.set(b,!1);if(c||void 0===c)a={},this.hScroll&&(a.x=this.hScroll.getRatio_()),this.vScroll&&(a.y=this.vScroll.getRatio_()),this.workspace_.setMetrics(a)};module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.setX=function(a){this.hScroll&&this.hScroll.set(a,!0)};
1475
1469
  module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.setY=function(a){this.vScroll&&this.vScroll.set(a,!0)};module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.setContainerVisible=function(a){this.hScroll&&this.hScroll.setContainerVisible(a);this.vScroll&&this.vScroll.setContainerVisible(a)};module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.isVisible=function(){var a=!1;this.hScroll&&(a=this.hScroll.isVisible());this.vScroll&&(a=a||this.vScroll.isVisible());return a};
1476
- module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.resizeContent=function(a){this.hScroll&&this.hScroll.resizeContentHorizontal(a);this.vScroll&&this.vScroll.resizeContentVertical(a)};module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.resizeView=function(a){this.hScroll&&this.hScroll.resizeViewHorizontal(a);this.vScroll&&this.vScroll.resizeViewVertical(a)};var module$exports$Blockly$utils$Metrics={Metrics:function(){}};var module$exports$Blockly$utils={aria:module$exports$Blockly$utils$aria,colour:module$exports$Blockly$utils$colour};module$exports$Blockly$utils.Coordinate=module$exports$Blockly$utils$Coordinate.Coordinate;module$exports$Blockly$utils.deprecation=module$exports$Blockly$utils$deprecation;module$exports$Blockly$utils.dom=module$exports$Blockly$utils$dom;module$exports$Blockly$utils.global=module$exports$Blockly$utils$global.globalThis;module$exports$Blockly$utils.idGenerator=module$exports$Blockly$utils$idGenerator;
1477
- module$exports$Blockly$utils.KeyCodes=module$exports$Blockly$utils$KeyCodes.KeyCodes;module$exports$Blockly$utils.math=module$exports$Blockly$utils$math;module$exports$Blockly$utils.Metrics=module$exports$Blockly$utils$Metrics.Metrics;module$exports$Blockly$utils.object=module$exports$Blockly$utils$object;module$exports$Blockly$utils.parsing=module$exports$Blockly$utils$parsing;module$exports$Blockly$utils.Rect=module$exports$Blockly$utils$Rect.Rect;module$exports$Blockly$utils.Size=module$exports$Blockly$utils$Size.Size;
1470
+ module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.resizeContent=function(a){this.hScroll&&this.hScroll.resizeContentHorizontal(a);this.vScroll&&this.vScroll.resizeContentVertical(a)};module$exports$Blockly$ScrollbarPair.ScrollbarPair.prototype.resizeView=function(a){this.hScroll&&this.hScroll.resizeViewHorizontal(a);this.vScroll&&this.vScroll.resizeViewVertical(a)};var module$exports$Blockly$utils$Metrics={Metrics:function(){}};var module$exports$Blockly$utils={aria:module$exports$Blockly$utils$aria,colour:module$exports$Blockly$utils$colour};module$exports$Blockly$utils.Coordinate=module$exports$Blockly$utils$Coordinate.Coordinate;module$exports$Blockly$utils.deprecation=module$exports$Blockly$utils$deprecation;module$exports$Blockly$utils.dom=module$exports$Blockly$utils$dom;module$exports$Blockly$utils.global=$.module$exports$Blockly$utils$global.globalThis;module$exports$Blockly$utils.idGenerator=module$exports$Blockly$utils$idGenerator;
1471
+ module$exports$Blockly$utils.KeyCodes=module$exports$Blockly$utils$KeyCodes.KeyCodes;module$exports$Blockly$utils.math=module$exports$Blockly$utils$math;module$exports$Blockly$utils.Metrics=module$exports$Blockly$utils$Metrics.Metrics;module$exports$Blockly$utils.object=$.module$exports$Blockly$utils$object;module$exports$Blockly$utils.parsing=module$exports$Blockly$utils$parsing;module$exports$Blockly$utils.Rect=module$exports$Blockly$utils$Rect.Rect;module$exports$Blockly$utils.Size=module$exports$Blockly$utils$Size.Size;
1478
1472
  module$exports$Blockly$utils.string=$.module$exports$Blockly$utils$string;module$exports$Blockly$utils.style=module$exports$Blockly$utils$style;module$exports$Blockly$utils.Svg=module$exports$Blockly$utils$Svg.Svg;module$exports$Blockly$utils.svgPaths=module$exports$Blockly$utils$svgPaths;module$exports$Blockly$utils.svgMath=module$exports$Blockly$utils$svgMath;module$exports$Blockly$utils.toolbox=module$exports$Blockly$utils$toolbox;module$exports$Blockly$utils.userAgent=module$exports$Blockly$utils$userAgent;
1479
1473
  module$exports$Blockly$utils.xml=$.module$exports$Blockly$utils$xml;module$exports$Blockly$utils.noEvent=function(a){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.utils.noEvent","September 2021","September 2022");a.preventDefault();a.stopPropagation()};module$exports$Blockly$utils.isTargetInput=function(a){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.utils.isTargetInput","September 2021","September 2022","Blockly.browserEvents.isTargetInput");return(0,module$exports$Blockly$browserEvents.isTargetInput)(a)};
1480
1474
  module$exports$Blockly$utils.getRelativeXY=function(a){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.utils.getRelativeXY","December 2021","December 2022","Blockly.svgMath.getRelativeXY");return(0,module$exports$Blockly$utils$svgMath.getRelativeXY)(a)};module$exports$Blockly$utils.getInjectionDivXY_=function(a){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.utils.getInjectionDivXY_","December 2021","December 2022","Blockly.svgMath.getInjectionDivXY");return(0,module$exports$Blockly$utils$svgMath.getInjectionDivXY)(a)};
@@ -1505,7 +1499,7 @@ module$exports$Blockly$ThemeManager.ThemeManager.prototype.setTheme=function(a){
1505
1499
  this.theme_&&this.theme_.getComponentStyle(c);f.style[e]=g||""}b=$jscomp.makeIterator(this.subscribedWorkspaces_);for(a=b.next();!a.done;a=b.next())a.value.hideChaff()};module$exports$Blockly$ThemeManager.ThemeManager.prototype.subscribeWorkspace=function(a){this.subscribedWorkspaces_.push(a)};
1506
1500
  module$exports$Blockly$ThemeManager.ThemeManager.prototype.unsubscribeWorkspace=function(a){if(!(0,module$exports$Blockly$utils$array.removeElem)(this.subscribedWorkspaces_,a))throw Error("Cannot unsubscribe a workspace that hasn't been subscribed.");};
1507
1501
  module$exports$Blockly$ThemeManager.ThemeManager.prototype.subscribe=function(a,b,c){this.componentDB_[b]||(this.componentDB_[b]=[]);this.componentDB_[b].push({element:a,propertyName:c});b=this.theme_&&this.theme_.getComponentStyle(b);a.style[c]=b||""};
1508
- module$exports$Blockly$ThemeManager.ThemeManager.prototype.unsubscribe=function(a){if(a)for(var b=Object.keys(this.componentDB_),c=0,d;d=b[c];c++){for(var e=this.componentDB_[d],f=e.length-1;0<=f;f--)e[f].element===a&&e.splice(f,1);this.componentDB_[d].length||delete this.componentDB_[d]}};module$exports$Blockly$ThemeManager.ThemeManager.prototype.dispose=function(){this.componentDB_=this.subscribedWorkspaces_=this.theme_=this.owner_=null};var module$exports$Blockly$TouchGesture={TouchGesture:function(a,b){module$exports$Blockly$TouchGesture.TouchGesture.superClass_.constructor.call(this,a,b);this.isMultiTouch_=!1;this.cachedPoints_=Object.create(null);this.startDistance_=this.previousScale_=0;this.isPinchZoomEnabled_=this.onStartWrapper_=null}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$TouchGesture.TouchGesture,module$exports$Blockly$Gesture.Gesture);
1502
+ module$exports$Blockly$ThemeManager.ThemeManager.prototype.unsubscribe=function(a){if(a)for(var b=Object.keys(this.componentDB_),c=0,d;d=b[c];c++){for(var e=this.componentDB_[d],f=e.length-1;0<=f;f--)e[f].element===a&&e.splice(f,1);this.componentDB_[d].length||delete this.componentDB_[d]}};module$exports$Blockly$ThemeManager.ThemeManager.prototype.dispose=function(){this.componentDB_=this.subscribedWorkspaces_=this.theme_=this.owner_=null};var module$exports$Blockly$TouchGesture={TouchGesture:function(a,b){module$exports$Blockly$TouchGesture.TouchGesture.superClass_.constructor.call(this,a,b);this.isMultiTouch_=!1;this.cachedPoints_=Object.create(null);this.startDistance_=this.previousScale_=0;this.isPinchZoomEnabled_=this.onStartWrapper_=null}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$TouchGesture.TouchGesture,module$exports$Blockly$Gesture.Gesture);
1509
1503
  module$exports$Blockly$TouchGesture.TouchGesture.ZOOM_IN_MULTIPLIER=5;module$exports$Blockly$TouchGesture.TouchGesture.ZOOM_OUT_MULTIPLIER=6;module$exports$Blockly$TouchGesture.TouchGesture.prototype.doStart=function(a){this.isPinchZoomEnabled_=this.startWorkspace_.options.zoomOptions&&this.startWorkspace_.options.zoomOptions.pinch;module$exports$Blockly$TouchGesture.TouchGesture.superClass_.doStart.call(this,a);!this.isEnding_&&(0,module$exports$Blockly$Touch.isTouchEvent)(a)&&this.handleTouchStart(a)};
1510
1504
  module$exports$Blockly$TouchGesture.TouchGesture.prototype.bindMouseEvents=function(a){this.onStartWrapper_=(0,module$exports$Blockly$browserEvents.conditionalBind)(document,"mousedown",null,this.handleStart.bind(this),!0);this.onMoveWrapper_=(0,module$exports$Blockly$browserEvents.conditionalBind)(document,"mousemove",null,this.handleMove.bind(this),!0);this.onUpWrapper_=(0,module$exports$Blockly$browserEvents.conditionalBind)(document,"mouseup",null,this.handleUp.bind(this),!0);a.preventDefault();
1511
1505
  a.stopPropagation()};module$exports$Blockly$TouchGesture.TouchGesture.prototype.handleStart=function(a){!this.isDragging()&&(0,module$exports$Blockly$Touch.isTouchEvent)(a)&&(this.handleTouchStart(a),this.isMultiTouch()&&(0,module$exports$Blockly$Touch.longStop)())};
@@ -1517,13 +1511,13 @@ module$exports$Blockly$TouchGesture.TouchGesture.prototype.handleTouchMove=funct
1517
1511
  module$exports$Blockly$TouchGesture.TouchGesture.prototype.handlePinch_=function(a){var b=Object.keys(this.cachedPoints_);b=module$exports$Blockly$utils$Coordinate.Coordinate.distance(this.cachedPoints_[b[0]],this.cachedPoints_[b[1]])/this.startDistance_;if(0<this.previousScale_&&Infinity>this.previousScale_){var c=b-this.previousScale_;c=0<c?c*module$exports$Blockly$TouchGesture.TouchGesture.ZOOM_IN_MULTIPLIER:c*module$exports$Blockly$TouchGesture.TouchGesture.ZOOM_OUT_MULTIPLIER;var d=this.startWorkspace_,
1518
1512
  e=(0,module$exports$Blockly$browserEvents.mouseToSvg)(a,d.getParentSvg(),d.getInverseScreenCTM());d.zoom(e.x,e.y,c)}this.previousScale_=b;a.preventDefault()};module$exports$Blockly$TouchGesture.TouchGesture.prototype.handleTouchEnd=function(a){a=(0,module$exports$Blockly$Touch.getTouchIdentifierFromEvent)(a);this.cachedPoints_[a]&&delete this.cachedPoints_[a];2>Object.keys(this.cachedPoints_).length&&(this.cachedPoints_=Object.create(null),this.previousScale_=0)};
1519
1513
  module$exports$Blockly$TouchGesture.TouchGesture.prototype.getTouchPoint=function(a){return this.startWorkspace_?new module$exports$Blockly$utils$Coordinate.Coordinate(a.changedTouches?a.changedTouches[0].pageX:a.pageX,a.changedTouches?a.changedTouches[0].pageY:a.pageY):null};var module$exports$Blockly$WorkspaceAudio={WorkspaceAudio:function(a){this.parentWorkspace_=a;this.SOUNDS_=Object.create(null)}};module$exports$Blockly$WorkspaceAudio.WorkspaceAudio.prototype.lastSound_=null;module$exports$Blockly$WorkspaceAudio.WorkspaceAudio.prototype.dispose=function(){this.SOUNDS_=this.parentWorkspace_=null};
1520
- module$exports$Blockly$WorkspaceAudio.WorkspaceAudio.prototype.load=function(a,b){if(a.length){try{var c=new module$exports$Blockly$utils$global.globalThis.Audio}catch(h){return}for(var d,e=0;e<a.length;e++){var f=a[e],g=f.match(/\.(\w+)$/);if(g&&c.canPlayType("audio/"+g[1])){d=new module$exports$Blockly$utils$global.globalThis.Audio(f);break}}d&&d.play&&(this.SOUNDS_[b]=d)}};
1514
+ module$exports$Blockly$WorkspaceAudio.WorkspaceAudio.prototype.load=function(a,b){if(a.length){try{var c=new $.module$exports$Blockly$utils$global.globalThis.Audio}catch(h){return}for(var d,e=0;e<a.length;e++){var f=a[e],g=f.match(/\.(\w+)$/);if(g&&c.canPlayType("audio/"+g[1])){d=new $.module$exports$Blockly$utils$global.globalThis.Audio(f);break}}d&&d.play&&(this.SOUNDS_[b]=d)}};
1521
1515
  module$exports$Blockly$WorkspaceAudio.WorkspaceAudio.prototype.preload=function(){for(var a in this.SOUNDS_){var b=this.SOUNDS_[a];b.volume=.01;var c=b.play();void 0!==c?c.then(b.pause).catch(function(){}):b.pause();if(module$exports$Blockly$utils$userAgent.IPAD||module$exports$Blockly$utils$userAgent.IPHONE)break}};
1522
1516
  module$exports$Blockly$WorkspaceAudio.WorkspaceAudio.prototype.play=function(a,b){var c=this.SOUNDS_[a];c?(a=new Date,null!==this.lastSound_&&a-this.lastSound_<$.module$exports$Blockly$internalConstants.SOUND_LIMIT||(this.lastSound_=a,c=module$exports$Blockly$utils$userAgent.IPAD||module$exports$Blockly$utils$userAgent.ANDROID?c:c.cloneNode(),c.volume=void 0===b?1:b,c.play())):this.parentWorkspace_&&this.parentWorkspace_.getAudioManager().play(a,b)};var module$exports$Blockly$WorkspaceSvg={WorkspaceSvg:function(a,b,c){module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.superClass_.constructor.call(this,a);this.metricsManager_=new ((0,module$exports$Blockly$registry.getClassFromOptions)(module$exports$Blockly$registry.Type.METRICS_MANAGER,a,!0))(this);this.getMetrics=a.getMetrics||this.metricsManager_.getMetrics.bind(this.metricsManager_);this.setMetrics=a.setMetrics||module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.setTopLevelWorkspaceMetrics_;
1523
1517
  this.componentManager_=new module$exports$Blockly$ComponentManager.ComponentManager;this.connectionDBList=module$exports$Blockly$ConnectionDB.ConnectionDB.init(this.connectionChecker);b&&(this.blockDragSurface_=b);c&&(this.workspaceDragSurface_=c);this.useWorkspaceDragSurface_=!!this.workspaceDragSurface_&&(0,module$exports$Blockly$utils$svgMath.is3dSupported)();this.highlightedBlocks_=[];this.audioManager_=new module$exports$Blockly$WorkspaceAudio.WorkspaceAudio(a.parentWorkspace);this.grid_=this.options.gridPattern?
1524
1518
  new module$exports$Blockly$Grid.Grid(this.options.gridPattern,a.gridOptions):null;this.markerManager_=new module$exports$Blockly$MarkerManager.MarkerManager(this);this.toolboxCategoryCallbacks_=Object.create(null);this.flyoutButtonCallbacks_=Object.create(null);(a=$.module$exports$Blockly$Variables)&&a.flyoutCategory&&this.registerToolboxCategoryCallback(a.CATEGORY_NAME,a.flyoutCategory);(a=module$exports$Blockly$VariablesDynamic)&&a.flyoutCategory&&this.registerToolboxCategoryCallback(a.CATEGORY_NAME,
1525
1519
  a.flyoutCategory);(a=$.module$exports$Blockly$Procedures)&&a.flyoutCategory&&(this.registerToolboxCategoryCallback(a.CATEGORY_NAME,a.flyoutCategory),this.addChangeListener(a.mutatorOpenListener));this.themeManager_=this.options.parentWorkspace?this.options.parentWorkspace.getThemeManager():new module$exports$Blockly$ThemeManager.ThemeManager(this,this.options.theme||module$exports$Blockly$Themes$Classic.Classic);this.themeManager_.subscribeWorkspace(this);this.renderer_=(0,module$exports$Blockly$blockRendering.init)(this.options.renderer||
1526
- "geras",this.getTheme(),this.options.rendererOverrides);this.cachedParentSvg_=null;this.keyboardAccessibilityMode=!1;this.topBoundedElements_=[];this.dragTargetAreas_=[];this.cachedParentSvgSize_=new module$exports$Blockly$utils$Size.Size(0,0)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$WorkspaceSvg.WorkspaceSvg,module$exports$Blockly$Workspace.Workspace);module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.resizeHandlerWrapper_=null;
1520
+ "geras",this.getTheme(),this.options.rendererOverrides);this.cachedParentSvg_=null;this.keyboardAccessibilityMode=!1;this.topBoundedElements_=[];this.dragTargetAreas_=[];this.cachedParentSvgSize_=new module$exports$Blockly$utils$Size.Size(0,0)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$WorkspaceSvg.WorkspaceSvg,module$exports$Blockly$Workspace.Workspace);module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.resizeHandlerWrapper_=null;
1527
1521
  module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.rendered=!0;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.isVisible_=!0;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.isFlyout=!1;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.isMutator=!1;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.resizesEnabled_=!0;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.scrollX=0;
1528
1522
  module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.scrollY=0;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.startScrollX=0;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.startScrollY=0;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.dragDeltaXY_=null;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.scale=1;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.oldScale_=1;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.oldTop_=0;
1529
1523
  module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.oldLeft_=0;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.trashcan=null;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.scrollbar=null;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.flyout_=null;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.toolbox_=null;module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.currentGesture_=null;
@@ -1606,7 +1600,7 @@ module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.getToolboxCategoryCal
1606
1600
  module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.getGesture=function(a){var b="mousedown"===a.type||"touchstart"===a.type||"pointerdown"===a.type,c=this.currentGesture_;return c?b&&c.hasStarted()?(console.warn("Tried to start the same gesture twice."),c.cancel(),null):c:b?this.currentGesture_=new module$exports$Blockly$TouchGesture.TouchGesture(a,this):null};module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.clearGesture=function(){this.currentGesture_=null};
1607
1601
  module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.cancelCurrentGesture=function(){this.currentGesture_&&this.currentGesture_.cancel()};module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.getAudioManager=function(){return this.audioManager_};module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.getGrid=function(){return this.grid_};
1608
1602
  module$exports$Blockly$WorkspaceSvg.WorkspaceSvg.prototype.hideChaff=function(a){(0,module$exports$Blockly$Tooltip.hide)();(0,module$exports$Blockly$WidgetDiv.hide)();module$exports$Blockly$DropDownDiv.DropDownDiv.hideWithoutAnimation();var b=!!a;this.getComponentManager().getComponents(module$exports$Blockly$ComponentManager.ComponentManager.Capability.AUTOHIDEABLE,!0).forEach(function(c){return c.autoHide(b)})};module$exports$Blockly$WorkspaceSvg.resizeSvgContents=function(a){a.resizeContents()};var module$exports$Blockly$Flyout={Flyout:function(a){module$exports$Blockly$Flyout.Flyout.superClass_.constructor.call(this);a.setMetrics=this.setMetrics_.bind(this);this.workspace_=new module$exports$Blockly$WorkspaceSvg.WorkspaceSvg(a);this.workspace_.setMetricsManager(new module$exports$Blockly$FlyoutMetricsManager.FlyoutMetricsManager(this.workspace_,this));this.workspace_.isFlyout=!0;this.workspace_.setVisible(this.isVisible_);this.id=(0,module$exports$Blockly$utils$idGenerator.genUid)();this.RTL=
1609
- !!a.RTL;this.horizontalLayout=!1;this.toolboxPosition_=a.toolboxPosition;this.eventWrappers_=[];this.mats_=[];this.buttons_=[];this.listeners_=[];this.permanentlyDisabled_=[];this.tabWidth_=this.workspace_.getRenderer().getConstants().TAB_WIDTH;this.targetWorkspace=null;this.recycledBlocks_=[]}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Flyout.Flyout,module$exports$Blockly$DeleteArea.DeleteArea);module$exports$Blockly$Flyout.Flyout.prototype.autoClose=!0;
1603
+ !!a.RTL;this.horizontalLayout=!1;this.toolboxPosition_=a.toolboxPosition;this.eventWrappers_=[];this.mats_=[];this.buttons_=[];this.listeners_=[];this.permanentlyDisabled_=[];this.tabWidth_=this.workspace_.getRenderer().getConstants().TAB_WIDTH;this.targetWorkspace=null;this.recycledBlocks_=[]}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Flyout.Flyout,module$exports$Blockly$DeleteArea.DeleteArea);module$exports$Blockly$Flyout.Flyout.prototype.autoClose=!0;
1610
1604
  module$exports$Blockly$Flyout.Flyout.prototype.isVisible_=!1;module$exports$Blockly$Flyout.Flyout.prototype.containerVisible_=!0;module$exports$Blockly$Flyout.Flyout.prototype.CORNER_RADIUS=8;module$exports$Blockly$Flyout.Flyout.prototype.MARGIN=module$exports$Blockly$Flyout.Flyout.prototype.CORNER_RADIUS;module$exports$Blockly$Flyout.Flyout.prototype.GAP_X=3*module$exports$Blockly$Flyout.Flyout.prototype.MARGIN;module$exports$Blockly$Flyout.Flyout.prototype.GAP_Y=3*module$exports$Blockly$Flyout.Flyout.prototype.MARGIN;
1611
1605
  module$exports$Blockly$Flyout.Flyout.prototype.SCROLLBAR_MARGIN=2.5;module$exports$Blockly$Flyout.Flyout.prototype.width_=0;module$exports$Blockly$Flyout.Flyout.prototype.height_=0;module$exports$Blockly$Flyout.Flyout.prototype.dragAngleRange_=70;
1612
1606
  module$exports$Blockly$Flyout.Flyout.prototype.createDom=function(a){this.svgGroup_=(0,module$exports$Blockly$utils$dom.createSvgElement)(a,{"class":"blocklyFlyout",style:"display: none"},null);this.svgBackground_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.PATH,{"class":"blocklyFlyoutBackground"},this.svgGroup_);this.svgGroup_.appendChild(this.workspace_.createDom());this.workspace_.getThemeManager().subscribe(this.svgBackground_,"flyoutBackgroundColour",
@@ -1655,7 +1649,7 @@ $.module$exports$Blockly$Generator.Generator.prototype.addLoopTrap=function(a,b)
1655
1649
  $.module$exports$Blockly$Generator.Generator.prototype.injectId=function(a,b){b=b.id.replace(/\$/g,"$$$$");return a.replace(/%1/g,"'"+b+"'")};$.module$exports$Blockly$Generator.Generator.prototype.RESERVED_WORDS_="";$.module$exports$Blockly$Generator.Generator.prototype.addReservedWords=function(a){this.RESERVED_WORDS_+=a+","};$.module$exports$Blockly$Generator.Generator.prototype.FUNCTION_NAME_PLACEHOLDER_="{leCUI8hutHZI4480Dc}";
1656
1650
  Object.defineProperties($.module$exports$Blockly$Generator.Generator.prototype,{variableDB_:{get:function(){(0,module$exports$Blockly$utils$deprecation.warn)("variableDB_","May 2021","May 2026","nameDB_");return this.nameDB_},set:function(a){(0,module$exports$Blockly$utils$deprecation.warn)("variableDB_","May 2021","May 2026","nameDB_");this.nameDB_=a}}});
1657
1651
  $.module$exports$Blockly$Generator.Generator.prototype.provideFunction_=function(a,b){if(!this.definitions_[a]){var c=this.nameDB_.getDistinctName(a,$.module$exports$Blockly$Names.NameType.PROCEDURE);this.functionNames_[a]=c;b=b.join("\n").replace(this.FUNCTION_NAME_PLACEHOLDER_REGEXP_,c);for(var d;d!==b;)d=b,b=b.replace(/^(( {2})*) {2}/gm,"$1\x00");b=b.replace(/\0/g,this.INDENT);this.definitions_[a]=b}return this.functionNames_[a]};
1658
- $.module$exports$Blockly$Generator.Generator.prototype.init=function(a){this.definitions_=Object.create(null);this.functionNames_=Object.create(null)};$.module$exports$Blockly$Generator.Generator.prototype.scrub_=function(a,b,c){return b};$.module$exports$Blockly$Generator.Generator.prototype.finish=function(a){delete this.definitions_;delete this.functionNames_;return a};$.module$exports$Blockly$Generator.Generator.prototype.scrubNakedValue=function(a){return a};var module$exports$Blockly$HorizontalFlyout={HorizontalFlyout:function(a){module$exports$Blockly$HorizontalFlyout.HorizontalFlyout.superClass_.constructor.call(this,a);this.horizontalLayout=!0}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$HorizontalFlyout.HorizontalFlyout,module$exports$Blockly$Flyout.Flyout);
1652
+ $.module$exports$Blockly$Generator.Generator.prototype.init=function(a){this.definitions_=Object.create(null);this.functionNames_=Object.create(null)};$.module$exports$Blockly$Generator.Generator.prototype.scrub_=function(a,b,c){return b};$.module$exports$Blockly$Generator.Generator.prototype.finish=function(a){delete this.definitions_;delete this.functionNames_;return a};$.module$exports$Blockly$Generator.Generator.prototype.scrubNakedValue=function(a){return a};var module$exports$Blockly$HorizontalFlyout={HorizontalFlyout:function(a){module$exports$Blockly$HorizontalFlyout.HorizontalFlyout.superClass_.constructor.call(this,a);this.horizontalLayout=!0}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$HorizontalFlyout.HorizontalFlyout,module$exports$Blockly$Flyout.Flyout);
1659
1653
  module$exports$Blockly$HorizontalFlyout.HorizontalFlyout.prototype.setMetrics_=function(a){if(this.isVisible()){var b=this.workspace_.getMetricsManager(),c=b.getScrollMetrics(),d=b.getViewMetrics();b=b.getAbsoluteMetrics();"number"===typeof a.x&&(this.workspace_.scrollX=-(c.left+(c.width-d.width)*a.x));this.workspace_.translate(this.workspace_.scrollX+b.left,this.workspace_.scrollY+b.top)}};module$exports$Blockly$HorizontalFlyout.HorizontalFlyout.prototype.getX=function(){return 0};
1660
1654
  module$exports$Blockly$HorizontalFlyout.HorizontalFlyout.prototype.getY=function(){if(!this.isVisible())return 0;var a=this.targetWorkspace.getMetricsManager(),b=a.getAbsoluteMetrics(),c=a.getViewMetrics();a=a.getToolboxMetrics();var d=this.toolboxPosition_===module$exports$Blockly$utils$toolbox.Position.TOP;return this.targetWorkspace.toolboxPosition===this.toolboxPosition_?this.targetWorkspace.getToolbox()?d?a.height:c.height-this.height_:d?0:c.height:d?0:c.height+b.top-this.height_};
1661
1655
  module$exports$Blockly$HorizontalFlyout.HorizontalFlyout.prototype.position=function(){if(this.isVisible()&&this.targetWorkspace.isVisible()){var a=this.targetWorkspace.getMetricsManager().getViewMetrics();this.width_=a.width;this.setBackgroundPath_(a.width-2*this.CORNER_RADIUS,this.height_-this.CORNER_RADIUS);a=this.getX();var b=this.getY();this.positionAt_(this.width_,this.height_,a,b)}};
@@ -1667,7 +1661,7 @@ f,k)}else"button"===f.type&&(this.initFlyoutButton_(f.button,d,c),d+=f.button.wi
1667
1661
  module$exports$Blockly$HorizontalFlyout.HorizontalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_||this.autoClose||!this.isVisible())return null;var a=this.svgGroup_.getBoundingClientRect(),b=a.top;return this.toolboxPosition_===module$exports$Blockly$utils$toolbox.Position.TOP?new module$exports$Blockly$utils$Rect.Rect(-1E9,b+a.height,-1E9,1E9):new module$exports$Blockly$utils$Rect.Rect(b,1E9,-1E9,1E9)};
1668
1662
  module$exports$Blockly$HorizontalFlyout.HorizontalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.getFlyoutScale();for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++)a=Math.max(a,d.getHeightWidth().height);c=this.buttons_;d=0;for(var e;e=c[d];d++)a=Math.max(a,e.height);a+=1.5*this.MARGIN;a*=this.workspace_.scale;a+=module$exports$Blockly$Scrollbar.Scrollbar.scrollbarThickness;if(this.height_!==a){for(c=0;d=b[c];c++)d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,
1669
1663
  d);this.targetWorkspace.toolboxPosition!==this.toolboxPosition_||this.toolboxPosition_!==module$exports$Blockly$utils$toolbox.Position.TOP||this.targetWorkspace.getToolbox()||this.targetWorkspace.translate(this.targetWorkspace.scrollX,this.targetWorkspace.scrollY+a);this.height_=a;this.position();this.targetWorkspace.recordDragTargets()}};(0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.FLYOUTS_HORIZONTAL_TOOLBOX,module$exports$Blockly$registry.DEFAULT,module$exports$Blockly$HorizontalFlyout.HorizontalFlyout);var module$exports$Blockly$IStyleable={IStyleable:function(){}};var module$exports$Blockly$IAutoHideable={IAutoHideable:function(){}};var module$exports$Blockly$IToolbox={IToolbox:function(){}};var module$exports$Blockly$Toolbox={Toolbox:function(a){module$exports$Blockly$Toolbox.Toolbox.superClass_.constructor.call(this);this.workspace_=a;this.id="toolbox";this.toolboxDef_=a.options.languageTree||{contents:[]};this.horizontalLayout_=a.options.horizontalLayout;this.contentsDiv_=this.HtmlDiv=null;this.isVisible_=!1;this.contents_=[];this.height_=this.width_=0;this.RTL=a.options.RTL;this.flyout_=null;this.contentMap_=Object.create(null);this.toolboxPosition=a.options.toolboxPosition;this.previouslySelectedItem_=
1670
- this.selectedItem_=null;this.boundEvents_=[]}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Toolbox.Toolbox,module$exports$Blockly$DeleteArea.DeleteArea);module$exports$Blockly$Toolbox.Toolbox.prototype.onShortcut=function(a){return!1};
1664
+ this.selectedItem_=null;this.boundEvents_=[]}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Toolbox.Toolbox,module$exports$Blockly$DeleteArea.DeleteArea);module$exports$Blockly$Toolbox.Toolbox.prototype.onShortcut=function(a){return!1};
1671
1665
  module$exports$Blockly$Toolbox.Toolbox.prototype.init=function(){var a=this.workspace_,b=a.getParentSvg();this.flyout_=this.createFlyout_();this.HtmlDiv=this.createDom_(this.workspace_);(0,module$exports$Blockly$utils$dom.insertAfter)(this.flyout_.createDom("svg"),b);this.setVisible(!0);this.flyout_.init(a);this.render(this.toolboxDef_);a=a.getThemeManager();a.subscribe(this.HtmlDiv,"toolboxBackgroundColour","background-color");a.subscribe(this.HtmlDiv,"toolboxForegroundColour","color");this.workspace_.getComponentManager().addComponent({component:this,
1672
1666
  weight:1,capabilities:[module$exports$Blockly$ComponentManager.ComponentManager.Capability.AUTOHIDEABLE,module$exports$Blockly$ComponentManager.ComponentManager.Capability.DELETE_AREA,module$exports$Blockly$ComponentManager.ComponentManager.Capability.DRAG_TARGET]})};
1673
1667
  module$exports$Blockly$Toolbox.Toolbox.prototype.createDom_=function(a){a=a.getParentSvg();var b=this.createContainer_();this.contentsDiv_=this.createContentsContainer_();this.contentsDiv_.tabIndex=0;(0,module$exports$Blockly$utils$aria.setRole)(this.contentsDiv_,module$exports$Blockly$utils$aria.Role.TREE);b.appendChild(this.contentsDiv_);a.parentNode.insertBefore(b,a);this.attachEvents_(b,this.contentsDiv_);return b};
@@ -1701,7 +1695,7 @@ module$exports$Blockly$Toolbox.Toolbox.prototype.selectChild_=function(){if(!thi
1701
1695
  module$exports$Blockly$Toolbox.Toolbox.prototype.selectNext_=function(){if(!this.selectedItem_)return!1;var a=this.contents_.indexOf(this.selectedItem_)+1;if(-1<a&&a<this.contents_.length){for(var b=this.contents_[a];b&&!b.isSelectable();)b=this.contents_[++a];if(b&&b.isSelectable())return this.setSelectedItem(b),!0}return!1};
1702
1696
  module$exports$Blockly$Toolbox.Toolbox.prototype.selectPrevious_=function(){if(!this.selectedItem_)return!1;var a=this.contents_.indexOf(this.selectedItem_)-1;if(-1<a&&a<this.contents_.length){for(var b=this.contents_[a];b&&!b.isSelectable();)b=this.contents_[--a];if(b&&b.isSelectable())return this.setSelectedItem(b),!0}return!1};
1703
1697
  module$exports$Blockly$Toolbox.Toolbox.prototype.dispose=function(){this.workspace_.getComponentManager().removeComponent("toolbox");this.flyout_.dispose();for(var a=0;a<this.contents_.length;a++)this.contents_[a].dispose();for(a=0;a<this.boundEvents_.length;a++)(0,module$exports$Blockly$browserEvents.unbind)(this.boundEvents_[a]);this.boundEvents_=[];this.contents_=[];this.workspace_.getThemeManager().unsubscribe(this.HtmlDiv);(0,module$exports$Blockly$utils$dom.removeNode)(this.HtmlDiv)};(0,module$exports$Blockly$Css.register)('\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 .blocklyToolboxDiv {\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 .blocklyToolboxContents {\n display: flex;\n flex-wrap: wrap;\n flex-direction: column;\n }\n\n .blocklyToolboxContents:focus {\n outline: none;\n }\n');
1704
- (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.TOOLBOX,module$exports$Blockly$registry.DEFAULT,module$exports$Blockly$Toolbox.Toolbox);var module$exports$Blockly$VerticalFlyout={VerticalFlyout:function(a){module$exports$Blockly$VerticalFlyout.VerticalFlyout.superClass_.constructor.call(this,a)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$VerticalFlyout.VerticalFlyout,module$exports$Blockly$Flyout.Flyout);module$exports$Blockly$VerticalFlyout.VerticalFlyout.registryName="verticalFlyout";
1698
+ (0,module$exports$Blockly$registry.register)(module$exports$Blockly$registry.Type.TOOLBOX,module$exports$Blockly$registry.DEFAULT,module$exports$Blockly$Toolbox.Toolbox);var module$exports$Blockly$VerticalFlyout={VerticalFlyout:function(a){module$exports$Blockly$VerticalFlyout.VerticalFlyout.superClass_.constructor.call(this,a)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$VerticalFlyout.VerticalFlyout,module$exports$Blockly$Flyout.Flyout);module$exports$Blockly$VerticalFlyout.VerticalFlyout.registryName="verticalFlyout";
1705
1699
  module$exports$Blockly$VerticalFlyout.VerticalFlyout.prototype.setMetrics_=function(a){if(this.isVisible()){var b=this.workspace_.getMetricsManager(),c=b.getScrollMetrics(),d=b.getViewMetrics();b=b.getAbsoluteMetrics();"number"===typeof a.y&&(this.workspace_.scrollY=-(c.top+(c.height-d.height)*a.y));this.workspace_.translate(this.workspace_.scrollX+b.left,this.workspace_.scrollY+b.top)}};
1706
1700
  module$exports$Blockly$VerticalFlyout.VerticalFlyout.prototype.getX=function(){if(!this.isVisible())return 0;var a=this.targetWorkspace.getMetricsManager(),b=a.getAbsoluteMetrics(),c=a.getViewMetrics();a=a.getToolboxMetrics();return this.targetWorkspace.toolboxPosition===this.toolboxPosition_?this.targetWorkspace.getToolbox()?this.toolboxPosition_===module$exports$Blockly$utils$toolbox.Position.LEFT?a.width:c.width-this.width_:this.toolboxPosition_===module$exports$Blockly$utils$toolbox.Position.LEFT?
1707
1701
  0:c.width:this.toolboxPosition_===module$exports$Blockly$utils$toolbox.Position.LEFT?0:c.width+b.left-this.width_};module$exports$Blockly$VerticalFlyout.VerticalFlyout.prototype.getY=function(){return 0};
@@ -1765,11 +1759,11 @@ module$exports$Blockly$Icon.Icon.prototype.createIcon=function(){this.iconGroup_
1765
1759
  this,this.iconClick_),this.updateEditable())};module$exports$Blockly$Icon.Icon.prototype.dispose=function(){(0,module$exports$Blockly$utils$dom.removeNode)(this.iconGroup_);this.iconGroup_=null;this.setVisible(!1);this.block_=null};module$exports$Blockly$Icon.Icon.prototype.updateEditable=function(){};module$exports$Blockly$Icon.Icon.prototype.isVisible=function(){return!!this.bubble_};
1766
1760
  module$exports$Blockly$Icon.Icon.prototype.iconClick_=function(a){this.block_.workspace.isDragging()||this.block_.isInFlyout||(0,module$exports$Blockly$browserEvents.isRightButton)(a)||this.setVisible(!this.isVisible())};module$exports$Blockly$Icon.Icon.prototype.applyColour=function(){this.isVisible()&&this.bubble_.setColour(this.block_.style.colourPrimary)};module$exports$Blockly$Icon.Icon.prototype.setIconLocation=function(a){this.iconXY_=a;this.isVisible()&&this.bubble_.setAnchorLocation(a)};
1767
1761
  module$exports$Blockly$Icon.Icon.prototype.computeIconLocation=function(){var a=this.block_.getRelativeToSurfaceXY(),b=(0,module$exports$Blockly$utils$svgMath.getRelativeXY)(this.iconGroup_);a=new module$exports$Blockly$utils$Coordinate.Coordinate(a.x+b.x+this.SIZE/2,a.y+b.y+this.SIZE/2);module$exports$Blockly$utils$Coordinate.Coordinate.equals(this.getIconLocation(),a)||this.setIconLocation(a)};module$exports$Blockly$Icon.Icon.prototype.getIconLocation=function(){return this.iconXY_};
1768
- module$exports$Blockly$Icon.Icon.prototype.getCorrectedSize=function(){return new module$exports$Blockly$utils$Size.Size(module$exports$Blockly$Icon.Icon.prototype.SIZE,module$exports$Blockly$Icon.Icon.prototype.SIZE-2)};var module$exports$Blockly$Warning={Warning:function(a){module$exports$Blockly$Warning.Warning.superClass_.constructor.call(this,a);this.createIcon();this.text_=Object.create(null)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Warning.Warning,module$exports$Blockly$Icon.Icon);module$exports$Blockly$Warning.Warning.prototype.collapseHidden=!1;
1762
+ module$exports$Blockly$Icon.Icon.prototype.getCorrectedSize=function(){return new module$exports$Blockly$utils$Size.Size(module$exports$Blockly$Icon.Icon.prototype.SIZE,module$exports$Blockly$Icon.Icon.prototype.SIZE-2)};var module$exports$Blockly$Warning={Warning:function(a){module$exports$Blockly$Warning.Warning.superClass_.constructor.call(this,a);this.createIcon();this.text_=Object.create(null)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Warning.Warning,module$exports$Blockly$Icon.Icon);module$exports$Blockly$Warning.Warning.prototype.collapseHidden=!1;
1769
1763
  module$exports$Blockly$Warning.Warning.prototype.drawIcon_=function(a){(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.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"},a);(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.PATH,{"class":"blocklyIconSymbol",d:"m7,4.8v3.16l0.27,2.27h1.46l0.27,-2.27v-3.16z"},a);(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.RECT,
1770
1764
  {"class":"blocklyIconSymbol",x:"7",y:"11",height:"2",width:"2"},a)};module$exports$Blockly$Warning.Warning.prototype.setVisible=function(a){a!==this.isVisible()&&((0,module$exports$Blockly$Events$utils.fire)(new ((0,module$exports$Blockly$Events$utils.get)(module$exports$Blockly$Events$utils.BUBBLE_OPEN))(this.block_,a,"warning")),a?this.createBubble_():this.disposeBubble_())};
1771
1765
  module$exports$Blockly$Warning.Warning.prototype.createBubble_=function(){this.paragraphElement_=module$exports$Blockly$Bubble.Bubble.textToDom(this.getText());this.bubble_=module$exports$Blockly$Bubble.Bubble.createNonEditableBubble(this.paragraphElement_,this.block_,this.iconXY_);this.applyColour()};module$exports$Blockly$Warning.Warning.prototype.disposeBubble_=function(){this.bubble_.dispose();this.paragraphElement_=this.bubble_=null};
1772
- module$exports$Blockly$Warning.Warning.prototype.setText=function(a,b){this.text_[b]!==a&&(a?this.text_[b]=a:delete this.text_[b],this.isVisible()&&(this.setVisible(!1),this.setVisible(!0)))};module$exports$Blockly$Warning.Warning.prototype.getText=function(){var a=[],b;for(b in this.text_)a.push(this.text_[b]);return a.join("\n")};module$exports$Blockly$Warning.Warning.prototype.dispose=function(){this.block_.warning=null;module$exports$Blockly$Icon.Icon.prototype.dispose.call(this)};var module$exports$Blockly$Comment={Comment:function(a){module$exports$Blockly$Comment.Comment.superClass_.constructor.call(this,a);this.model_=a.commentModel;this.model_.text=this.model_.text||"";this.cachedText_="";this.onInputWrapper_=this.onChangeWrapper_=this.onWheelWrapper_=this.onMouseUpWrapper_=null;this.createIcon()}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Comment.Comment,module$exports$Blockly$Icon.Icon);
1766
+ module$exports$Blockly$Warning.Warning.prototype.setText=function(a,b){this.text_[b]!==a&&(a?this.text_[b]=a:delete this.text_[b],this.isVisible()&&(this.setVisible(!1),this.setVisible(!0)))};module$exports$Blockly$Warning.Warning.prototype.getText=function(){var a=[],b;for(b in this.text_)a.push(this.text_[b]);return a.join("\n")};module$exports$Blockly$Warning.Warning.prototype.dispose=function(){this.block_.warning=null;module$exports$Blockly$Icon.Icon.prototype.dispose.call(this)};var module$exports$Blockly$Comment={Comment:function(a){module$exports$Blockly$Comment.Comment.superClass_.constructor.call(this,a);this.model_=a.commentModel;this.model_.text=this.model_.text||"";this.cachedText_="";this.onInputWrapper_=this.onChangeWrapper_=this.onWheelWrapper_=this.onMouseUpWrapper_=null;this.createIcon()}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Comment.Comment,module$exports$Blockly$Icon.Icon);
1773
1767
  module$exports$Blockly$Comment.Comment.prototype.drawIcon_=function(a){(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.CIRCLE,{"class":"blocklyIconShape",r:"8",cx:"8",cy:"8"},a);(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.PATH,{"class":"blocklyIconSymbol",d:"m6.8,10h2c0.003,-0.617 0.271,-0.962 0.633,-1.266 2.875,-2.4050.607,-5.534 -3.765,-3.874v1.7c3.12,-1.657 3.698,0.118 2.336,1.25-1.201,0.998 -1.201,1.528 -1.204,2.19z"},
1774
1768
  a);(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.RECT,{"class":"blocklyIconSymbol",x:"6.8",y:"10.78",height:"2",width:"2"},a)};
1775
1769
  module$exports$Blockly$Comment.Comment.prototype.createEditor_=function(){this.foreignObject_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.FOREIGNOBJECT,{x:module$exports$Blockly$Bubble.Bubble.BORDER_WIDTH,y:module$exports$Blockly$Bubble.Bubble.BORDER_WIDTH},null);var a=document.createElementNS(module$exports$Blockly$utils$dom.HTML_NS,"body");a.setAttribute("xmlns",module$exports$Blockly$utils$dom.HTML_NS);a.className="blocklyMinimalBody";var b=this.textarea_=
@@ -1784,8 +1778,14 @@ module$exports$Blockly$Comment.Comment.prototype.createNonEditableBubble_=functi
1784
1778
  module$exports$Blockly$Comment.Comment.prototype.disposeBubble_=function(){this.onMouseUpWrapper_&&((0,module$exports$Blockly$browserEvents.unbind)(this.onMouseUpWrapper_),this.onMouseUpWrapper_=null);this.onWheelWrapper_&&((0,module$exports$Blockly$browserEvents.unbind)(this.onWheelWrapper_),this.onWheelWrapper_=null);this.onChangeWrapper_&&((0,module$exports$Blockly$browserEvents.unbind)(this.onChangeWrapper_),this.onChangeWrapper_=null);this.onInputWrapper_&&((0,module$exports$Blockly$browserEvents.unbind)(this.onInputWrapper_),
1785
1779
  this.onInputWrapper_=null);this.bubble_.dispose();this.paragraphElement_=this.foreignObject_=this.textarea_=this.bubble_=null};module$exports$Blockly$Comment.Comment.prototype.startEdit_=function(a){this.bubble_.promote()&&this.textarea_.focus();this.cachedText_=this.model_.text};module$exports$Blockly$Comment.Comment.prototype.getBubbleSize=function(){return this.model_.size};
1786
1780
  module$exports$Blockly$Comment.Comment.prototype.setBubbleSize=function(a,b){this.bubble_?this.bubble_.setBubbleSize(a,b):(this.model_.size.width=a,this.model_.size.height=b)};module$exports$Blockly$Comment.Comment.prototype.updateText=function(){this.textarea_?this.textarea_.value=this.model_.text:this.paragraphElement_&&(this.paragraphElement_.firstChild.textContent=this.model_.text)};module$exports$Blockly$Comment.Comment.prototype.dispose=function(){this.block_.comment=null;module$exports$Blockly$Icon.Icon.prototype.dispose.call(this)};
1787
- (0,module$exports$Blockly$Css.register)("\n .blocklyCommentTextarea {\n background-color: #fef49c;\n border: 0;\n display: block;\n margin: 0;\n outline: 0;\n padding: 3px;\n resize: none;\n text-overflow: hidden;\n }\n");$.module$exports$Blockly$FieldDropdown={FieldDropdown:function(a,b,c){"function"!==typeof a&&module$contents$Blockly$FieldDropdown_validateOptions(a);this.menuGenerator_=a;this.suffixField=this.prefixField=this.generatedOptions_=null;this.trimOptions_();this.selectedOption_=this.getOptions(!1)[0];$.module$exports$Blockly$FieldDropdown.FieldDropdown.superClass_.constructor.call(this,this.selectedOption_[1],b,c);this.svgArrow_=this.arrow_=this.imageElement_=this.menu_=this.selectedMenuItem_=null}};
1788
- (0,module$exports$Blockly$utils$object.inherits)($.module$exports$Blockly$FieldDropdown.FieldDropdown,module$exports$Blockly$Field.Field);$.module$exports$Blockly$FieldDropdown.FieldDropdown.fromJson=function(a){return new this(a.options,void 0,a)};$.module$exports$Blockly$FieldDropdown.FieldDropdown.prototype.fromXml=function(a){this.isOptionListDynamic()&&this.getOptions(!1);this.setValue(a.textContent)};
1781
+ (0,module$exports$Blockly$Css.register)("\n .blocklyCommentTextarea {\n background-color: #fef49c;\n border: 0;\n display: block;\n margin: 0;\n outline: 0;\n padding: 3px;\n resize: none;\n text-overflow: hidden;\n }\n");$.module$exports$Blockly$FieldCheckbox={FieldCheckbox:function(a,b,c){this.checkChar_=null;$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.superClass_.constructor.call(this,a,b,c)}};(0,$.module$exports$Blockly$utils$object.inherits)($.module$exports$Blockly$FieldCheckbox.FieldCheckbox,module$exports$Blockly$Field.Field);$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.DEFAULT_VALUE=!1;
1782
+ $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.fromJson=function(a){return new this(a.checked,void 0,a)};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.CHECK_CHAR="\u2713";$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.SERIALIZABLE=!0;$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.CURSOR="default";
1783
+ $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.configure_=function(a){$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.superClass_.configure_.call(this,a);a.checkCharacter&&(this.checkChar_=a.checkCharacter)};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.saveState=function(){var a=this.saveLegacyState($.module$exports$Blockly$FieldCheckbox.FieldCheckbox);return null!==a?a:this.getValueBoolean()};
1784
+ $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.initView=function(){$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.superClass_.initView.call(this);(0,module$exports$Blockly$utils$dom.addClass)(this.textElement_,"blocklyCheckbox");this.textElement_.style.display=this.value_?"block":"none"};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.render_=function(){this.textContent_&&(this.textContent_.nodeValue=this.getDisplayText_());this.updateSize_(this.getConstants().FIELD_CHECKBOX_X_OFFSET)};
1785
+ $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.getDisplayText_=function(){return this.checkChar_||$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.CHECK_CHAR};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.setCheckCharacter=function(a){this.checkChar_=a;this.forceRerender()};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.showEditor_=function(){this.setValue(!this.value_)};
1786
+ $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.doClassValidation_=function(a){return!0===a||"TRUE"===a?"TRUE":!1===a||"FALSE"===a?"FALSE":null};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.doValueUpdate_=function(a){this.value_=this.convertValueToBool_(a);this.textElement_&&(this.textElement_.style.display=this.value_?"block":"none")};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.getValue=function(){return this.value_?"TRUE":"FALSE"};
1787
+ $.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.getValueBoolean=function(){return this.value_};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.getText=function(){return String(this.convertValueToBool_(this.value_))};$.module$exports$Blockly$FieldCheckbox.FieldCheckbox.prototype.convertValueToBool_=function(a){return"string"===typeof a?"TRUE"===a:!!a};(0,module$exports$Blockly$fieldRegistry.register)("field_checkbox",$.module$exports$Blockly$FieldCheckbox.FieldCheckbox);$.module$exports$Blockly$FieldDropdown={FieldDropdown:function(a,b,c){"function"!==typeof a&&module$contents$Blockly$FieldDropdown_validateOptions(a);this.menuGenerator_=a;this.suffixField=this.prefixField=this.generatedOptions_=null;this.trimOptions_();this.selectedOption_=this.getOptions(!1)[0];$.module$exports$Blockly$FieldDropdown.FieldDropdown.superClass_.constructor.call(this,this.selectedOption_[1],b,c);this.svgArrow_=this.arrow_=this.imageElement_=this.menu_=this.selectedMenuItem_=null}};
1788
+ (0,$.module$exports$Blockly$utils$object.inherits)($.module$exports$Blockly$FieldDropdown.FieldDropdown,module$exports$Blockly$Field.Field);$.module$exports$Blockly$FieldDropdown.FieldDropdown.fromJson=function(a){return new this(a.options,void 0,a)};$.module$exports$Blockly$FieldDropdown.FieldDropdown.prototype.fromXml=function(a){this.isOptionListDynamic()&&this.getOptions(!1);this.setValue(a.textContent)};
1789
1789
  $.module$exports$Blockly$FieldDropdown.FieldDropdown.prototype.loadState=function(a){this.loadLegacyState($.module$exports$Blockly$FieldDropdown.FieldDropdown,a)||(this.isOptionListDynamic()&&this.getOptions(!1),this.setValue(a))};$.module$exports$Blockly$FieldDropdown.FieldDropdown.prototype.SERIALIZABLE=!0;$.module$exports$Blockly$FieldDropdown.FieldDropdown.CHECKMARK_OVERHANG=25;$.module$exports$Blockly$FieldDropdown.FieldDropdown.MAX_MENU_HEIGHT_VH=.45;
1790
1790
  var module$contents$Blockly$FieldDropdown_IMAGE_Y_OFFSET=5,module$contents$Blockly$FieldDropdown_IMAGE_Y_PADDING=2*module$contents$Blockly$FieldDropdown_IMAGE_Y_OFFSET;$.module$exports$Blockly$FieldDropdown.FieldDropdown.ARROW_CHAR=module$exports$Blockly$utils$userAgent.ANDROID?"\u25bc":"\u25be";$.module$exports$Blockly$FieldDropdown.FieldDropdown.prototype.CURSOR="default";
1791
1791
  $.module$exports$Blockly$FieldDropdown.FieldDropdown.prototype.initView=function(){this.shouldAddBorderRect_()?this.createBorderRect_():this.clickTarget_=this.sourceBlock_.getSvgRoot();this.createTextElement_();this.imageElement_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.IMAGE,{},this.fieldGroup_);this.getConstants().FIELD_DROPDOWN_SVG_ARROW?this.createSVGArrow_():this.createTextArrow_();this.borderRect_&&(0,module$exports$Blockly$utils$dom.addClass)(this.borderRect_,
@@ -1813,15 +1813,15 @@ this.getConstants().FIELD_TEXT_FONTWEIGHT,this.getConstants().FIELD_TEXT_FONTFAM
1813
1813
  $.module$exports$Blockly$FieldDropdown.FieldDropdown.prototype.positionSVGArrow_=function(a,b){if(!this.svgArrow_)return 0;var c=this.borderRect_?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0,d=this.getConstants().FIELD_DROPDOWN_SVG_ARROW_PADDING,e=this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE;this.svgArrow_.setAttribute("transform","translate("+(this.sourceBlock_.RTL?c:a+d)+","+b+")");return e+d};
1814
1814
  $.module$exports$Blockly$FieldDropdown.FieldDropdown.prototype.getText_=function(){if(!this.selectedOption_)return null;var a=this.selectedOption_[0];return"object"===typeof a?a.alt:a};
1815
1815
  var module$contents$Blockly$FieldDropdown_validateOptions=function(a){if(!Array.isArray(a))throw TypeError("FieldDropdown options must be an array.");if(!a.length)throw TypeError("FieldDropdown options must not be an empty array.");for(var b=!1,c=0;c<a.length;c++){var d=a[c];Array.isArray(d)?"string"!==typeof d[1]?(b=!0,console.error("Invalid option["+c+"]: Each FieldDropdown option id must be a string. Found "+d[1]+" in: ",d)):d[0]&&"string"!==typeof d[0]&&"string"!==typeof d[0].src&&(b=!0,console.error("Invalid option["+
1816
- c+"]: Each FieldDropdown option must have a string label or image description. Found"+d[0]+" in: ",d)):(b=!0,console.error("Invalid option["+c+"]: Each FieldDropdown option must be an array. Found: ",d))}if(b)throw TypeError("Found invalid FieldDropdown options.");};(0,module$exports$Blockly$fieldRegistry.register)("field_dropdown",$.module$exports$Blockly$FieldDropdown.FieldDropdown);var module$exports$Blockly$FieldNumber={FieldNumber:function(a,b,c,d,e,f){this.min_=-Infinity;this.max_=Infinity;this.precision_=0;this.decimalPlaces_=null;module$exports$Blockly$FieldNumber.FieldNumber.superClass_.constructor.call(this,a,e,f);f||this.setConstraints(b,c,d)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldNumber.FieldNumber,$.module$exports$Blockly$FieldTextInput.FieldTextInput);module$exports$Blockly$FieldNumber.FieldNumber.prototype.DEFAULT_VALUE=0;
1817
- module$exports$Blockly$FieldNumber.FieldNumber.fromJson=function(a){return new this(a.value,void 0,void 0,void 0,void 0,a)};module$exports$Blockly$FieldNumber.FieldNumber.prototype.SERIALIZABLE=!0;module$exports$Blockly$FieldNumber.FieldNumber.prototype.configure_=function(a){module$exports$Blockly$FieldNumber.FieldNumber.superClass_.configure_.call(this,a);this.setMinInternal_(a.min);this.setMaxInternal_(a.max);this.setPrecisionInternal_(a.precision)};
1816
+ c+"]: Each FieldDropdown option must have a string label or image description. Found"+d[0]+" in: ",d)):(b=!0,console.error("Invalid option["+c+"]: Each FieldDropdown option must be an array. Found: ",d))}if(b)throw TypeError("Found invalid FieldDropdown options.");};(0,module$exports$Blockly$fieldRegistry.register)("field_dropdown",$.module$exports$Blockly$FieldDropdown.FieldDropdown);var module$exports$Blockly$FieldNumber={FieldNumber:function(a,b,c,d,e,f){this.min_=-Infinity;this.max_=Infinity;this.precision_=0;this.decimalPlaces_=null;module$exports$Blockly$FieldNumber.FieldNumber.superClass_.constructor.call(this,a,e,f);f||this.setConstraints(b,c,d)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldNumber.FieldNumber,$.module$exports$Blockly$FieldTextInput.FieldTextInput);
1817
+ module$exports$Blockly$FieldNumber.FieldNumber.prototype.DEFAULT_VALUE=0;module$exports$Blockly$FieldNumber.FieldNumber.fromJson=function(a){return new this(a.value,void 0,void 0,void 0,void 0,a)};module$exports$Blockly$FieldNumber.FieldNumber.prototype.SERIALIZABLE=!0;module$exports$Blockly$FieldNumber.FieldNumber.prototype.configure_=function(a){module$exports$Blockly$FieldNumber.FieldNumber.superClass_.configure_.call(this,a);this.setMinInternal_(a.min);this.setMaxInternal_(a.max);this.setPrecisionInternal_(a.precision)};
1818
1818
  module$exports$Blockly$FieldNumber.FieldNumber.prototype.setConstraints=function(a,b,c){this.setMinInternal_(a);this.setMaxInternal_(b);this.setPrecisionInternal_(c);this.setValue(this.getValue())};module$exports$Blockly$FieldNumber.FieldNumber.prototype.setMin=function(a){this.setMinInternal_(a);this.setValue(this.getValue())};module$exports$Blockly$FieldNumber.FieldNumber.prototype.setMinInternal_=function(a){null==a?this.min_=-Infinity:(a=Number(a),isNaN(a)||(this.min_=a))};
1819
1819
  module$exports$Blockly$FieldNumber.FieldNumber.prototype.getMin=function(){return this.min_};module$exports$Blockly$FieldNumber.FieldNumber.prototype.setMax=function(a){this.setMaxInternal_(a);this.setValue(this.getValue())};module$exports$Blockly$FieldNumber.FieldNumber.prototype.setMaxInternal_=function(a){null==a?this.max_=Infinity:(a=Number(a),isNaN(a)||(this.max_=a))};module$exports$Blockly$FieldNumber.FieldNumber.prototype.getMax=function(){return this.max_};
1820
1820
  module$exports$Blockly$FieldNumber.FieldNumber.prototype.setPrecision=function(a){this.setPrecisionInternal_(a);this.setValue(this.getValue())};module$exports$Blockly$FieldNumber.FieldNumber.prototype.setPrecisionInternal_=function(a){this.precision_=Number(a)||0;var b=String(this.precision_);-1!==b.indexOf("e")&&(b=this.precision_.toLocaleString("en-US",{maximumFractionDigits:20}));var c=b.indexOf(".");this.decimalPlaces_=-1===c?a?0:null:b.length-c-1};
1821
1821
  module$exports$Blockly$FieldNumber.FieldNumber.prototype.getPrecision=function(){return this.precision_};
1822
1822
  module$exports$Blockly$FieldNumber.FieldNumber.prototype.doClassValidation_=function(a){if(null===a)return null;a=String(a);a=a.replace(/O/ig,"0");a=a.replace(/,/g,"");a=a.replace(/infinity/i,"Infinity");a=Number(a||0);if(isNaN(a))return null;a=Math.min(Math.max(a,this.min_),this.max_);this.precision_&&isFinite(a)&&(a=Math.round(a/this.precision_)*this.precision_);null!==this.decimalPlaces_&&(a=Number(a.toFixed(this.decimalPlaces_)));return a};
1823
1823
  module$exports$Blockly$FieldNumber.FieldNumber.prototype.widgetCreate_=function(){var a=module$exports$Blockly$FieldNumber.FieldNumber.superClass_.widgetCreate_.call(this);-Infinity<this.min_&&(0,module$exports$Blockly$utils$aria.setState)(a,module$exports$Blockly$utils$aria.State.VALUEMIN,this.min_);Infinity>this.max_&&(0,module$exports$Blockly$utils$aria.setState)(a,module$exports$Blockly$utils$aria.State.VALUEMAX,this.max_);return a};
1824
- (0,module$exports$Blockly$fieldRegistry.register)("field_number",module$exports$Blockly$FieldNumber.FieldNumber);var module$exports$Blockly$FieldVariable={FieldVariable:function(a,b,c,d,e){this.menuGenerator_=module$exports$Blockly$FieldVariable.FieldVariable.dropdownCreate;this.defaultVariableName="string"===typeof a?a:"";this.size_=new module$exports$Blockly$utils$Size.Size(0,0);e&&this.configure_(e);b&&this.setValidator(b);e||this.setTypes_(c,d)}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldVariable.FieldVariable,$.module$exports$Blockly$FieldDropdown.FieldDropdown);
1824
+ (0,module$exports$Blockly$fieldRegistry.register)("field_number",module$exports$Blockly$FieldNumber.FieldNumber);var module$exports$Blockly$FieldVariable={FieldVariable:function(a,b,c,d,e){this.menuGenerator_=module$exports$Blockly$FieldVariable.FieldVariable.dropdownCreate;this.defaultVariableName="string"===typeof a?a:"";this.size_=new module$exports$Blockly$utils$Size.Size(0,0);e&&this.configure_(e);b&&this.setValidator(b);e||this.setTypes_(c,d)}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$FieldVariable.FieldVariable,$.module$exports$Blockly$FieldDropdown.FieldDropdown);
1825
1825
  module$exports$Blockly$FieldVariable.FieldVariable.fromJson=function(a){return new this((0,module$exports$Blockly$utils$parsing.replaceMessageReferences)(a.variable),void 0,void 0,void 0,a)};module$exports$Blockly$FieldVariable.FieldVariable.prototype.SERIALIZABLE=!0;module$exports$Blockly$FieldVariable.FieldVariable.prototype.configure_=function(a){module$exports$Blockly$FieldVariable.FieldVariable.superClass_.configure_.call(this,a);this.setTypes_(a.variableTypes,a.defaultType)};
1826
1826
  module$exports$Blockly$FieldVariable.FieldVariable.prototype.initModel=function(){if(!this.variable_){var a=(0,$.module$exports$Blockly$Variables.getOrCreateVariablePackage)(this.sourceBlock_.workspace,null,this.defaultVariableName,this.defaultType_);this.doValueUpdate_(a.getId())}};
1827
1827
  module$exports$Blockly$FieldVariable.FieldVariable.prototype.shouldAddBorderRect_=function(){return module$exports$Blockly$FieldVariable.FieldVariable.superClass_.shouldAddBorderRect_.call(this)&&(!this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW||"variables_get"!==this.sourceBlock_.type)};
@@ -1847,7 +1847,7 @@ e,f,g);this.height=d.height;this.isLabel_||(this.width+=2*module$exports$Blockly
1847
1847
  "mouseup",this,this.onMouseUp_);return this.svgGroup_};module$exports$Blockly$FlyoutButton.FlyoutButton.prototype.show=function(){this.updateTransform_();this.svgGroup_.setAttribute("display","block")};module$exports$Blockly$FlyoutButton.FlyoutButton.prototype.updateTransform_=function(){this.svgGroup_.setAttribute("transform","translate("+this.position_.x+","+this.position_.y+")")};
1848
1848
  module$exports$Blockly$FlyoutButton.FlyoutButton.prototype.moveTo=function(a,b){this.position_.x=a;this.position_.y=b;this.updateTransform_()};module$exports$Blockly$FlyoutButton.FlyoutButton.prototype.isLabel=function(){return this.isLabel_};module$exports$Blockly$FlyoutButton.FlyoutButton.prototype.getPosition=function(){return this.position_};module$exports$Blockly$FlyoutButton.FlyoutButton.prototype.getButtonText=function(){return this.text_};
1849
1849
  module$exports$Blockly$FlyoutButton.FlyoutButton.prototype.getTargetWorkspace=function(){return this.targetWorkspace_};module$exports$Blockly$FlyoutButton.FlyoutButton.prototype.dispose=function(){this.onMouseUpWrapper_&&(0,module$exports$Blockly$browserEvents.unbind)(this.onMouseUpWrapper_);this.svgGroup_&&(0,module$exports$Blockly$utils$dom.removeNode)(this.svgGroup_);this.svgText_&&this.workspace_.getThemeManager().unsubscribe(this.svgText_)};
1850
- module$exports$Blockly$FlyoutButton.FlyoutButton.prototype.onMouseUp_=function(a){(a=this.targetWorkspace_.getGesture(a))&&a.cancel();this.isLabel_&&this.callbackKey_?console.warn("Labels should not have callbacks. Label text: "+this.text_):this.isLabel_||this.callbackKey_&&this.targetWorkspace_.getButtonCallback(this.callbackKey_)?this.isLabel_||this.targetWorkspace_.getButtonCallback(this.callbackKey_)(this):console.warn("Buttons should have callbacks. Button text: "+this.text_)};(0,module$exports$Blockly$Css.register)("\n .blocklyFlyoutButton {\n fill: #888;\n cursor: default;\n }\n\n .blocklyFlyoutButtonShadow {\n fill: #666;\n }\n\n .blocklyFlyoutButton:hover {\n fill: #aaa;\n }\n\n .blocklyFlyoutLabel {\n cursor: default;\n }\n\n .blocklyFlyoutLabelBackground {\n opacity: 0;\n }\n");var module$exports$Blockly$IPositionable={IPositionable:function(){}};var module$exports$Blockly$IRegistrableField={IRegistrableField:{}};$.module$exports$Blockly$Mutator={Mutator:function(a){$.module$exports$Blockly$Mutator.Mutator.superClass_.constructor.call(this,null);this.quarkNames_=a}};(0,module$exports$Blockly$utils$object.inherits)($.module$exports$Blockly$Mutator.Mutator,module$exports$Blockly$Icon.Icon);$.module$exports$Blockly$Mutator.Mutator.prototype.workspace_=null;$.module$exports$Blockly$Mutator.Mutator.prototype.workspaceWidth_=0;$.module$exports$Blockly$Mutator.Mutator.prototype.workspaceHeight_=0;
1850
+ module$exports$Blockly$FlyoutButton.FlyoutButton.prototype.onMouseUp_=function(a){(a=this.targetWorkspace_.getGesture(a))&&a.cancel();this.isLabel_&&this.callbackKey_?console.warn("Labels should not have callbacks. Label text: "+this.text_):this.isLabel_||this.callbackKey_&&this.targetWorkspace_.getButtonCallback(this.callbackKey_)?this.isLabel_||this.targetWorkspace_.getButtonCallback(this.callbackKey_)(this):console.warn("Buttons should have callbacks. Button text: "+this.text_)};(0,module$exports$Blockly$Css.register)("\n .blocklyFlyoutButton {\n fill: #888;\n cursor: default;\n }\n\n .blocklyFlyoutButtonShadow {\n fill: #666;\n }\n\n .blocklyFlyoutButton:hover {\n fill: #aaa;\n }\n\n .blocklyFlyoutLabel {\n cursor: default;\n }\n\n .blocklyFlyoutLabelBackground {\n opacity: 0;\n }\n");var module$exports$Blockly$IPositionable={IPositionable:function(){}};var module$exports$Blockly$IRegistrableField={IRegistrableField:{}};$.module$exports$Blockly$Mutator={Mutator:function(a){$.module$exports$Blockly$Mutator.Mutator.superClass_.constructor.call(this,null);this.quarkNames_=a}};(0,$.module$exports$Blockly$utils$object.inherits)($.module$exports$Blockly$Mutator.Mutator,module$exports$Blockly$Icon.Icon);$.module$exports$Blockly$Mutator.Mutator.prototype.workspace_=null;$.module$exports$Blockly$Mutator.Mutator.prototype.workspaceWidth_=0;$.module$exports$Blockly$Mutator.Mutator.prototype.workspaceHeight_=0;
1851
1851
  $.module$exports$Blockly$Mutator.Mutator.prototype.setBlock=function(a){this.block_=a};$.module$exports$Blockly$Mutator.Mutator.prototype.getWorkspace=function(){return this.workspace_};
1852
1852
  $.module$exports$Blockly$Mutator.Mutator.prototype.drawIcon_=function(a){(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.RECT,{"class":"blocklyIconShape",rx:"4",ry:"4",height:"16",width:"16"},a);(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.PATH,{"class":"blocklyIconSymbol",d:"m4.203,7.296 0,1.368 -0.92,0.677 -0.11,0.41 0.9,1.559 0.41,0.11 1.043,-0.457 1.187,0.683 0.127,1.134 0.3,0.3 1.8,0 0.3,-0.299 0.127,-1.138 1.185,-0.682 1.046,0.458 0.409,-0.11 0.9,-1.559 -0.11,-0.41 -0.92,-0.677 0,-1.366 0.92,-0.677 0.11,-0.41 -0.9,-1.559 -0.409,-0.109 -1.046,0.458 -1.185,-0.682 -0.127,-1.138 -0.3,-0.299 -1.8,0 -0.3,0.3 -0.126,1.135 -1.187,0.682 -1.043,-0.457 -0.41,0.11 -0.899,1.559 0.108,0.409z"},
1853
1853
  a);(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.CIRCLE,{"class":"blocklyIconShape",r:"2.7",cx:"8",cy:"8"},a)};$.module$exports$Blockly$Mutator.Mutator.prototype.iconClick_=function(a){this.block_.isEditable()&&module$exports$Blockly$Icon.Icon.prototype.iconClick_.call(this,a)};
@@ -1867,7 +1867,7 @@ b=g.rendered;g.rendered=!1;g.compose(this.rootBlock_);g.rendered=b;g.initSvg();g
1867
1867
  $.module$exports$Blockly$Mutator.Mutator.prototype.updateBlockStyle=function(){var a=this.workspace_;if(a&&a.getAllBlocks(!1)){for(var b=a.getAllBlocks(!1),c=0,d;d=b[c];c++)d.setStyle(d.getStyleName());if(a=a.getFlyout())for(a=a.workspace_.getAllBlocks(!1),b=0;c=a[b];b++)c.setStyle(c.getStyleName())}};
1868
1868
  $.module$exports$Blockly$Mutator.Mutator.reconnect=function(a,b,c){if(!a||!a.getSourceBlock().workspace)return!1;c=b.getInput(c).connection;var d=a.targetBlock();return d&&d!==b||c.targetConnection===a?!1:(c.isConnected()&&c.disconnect(),c.connect(a),!0)};$.module$exports$Blockly$Mutator.Mutator.findParentWs=function(a){var b=null;if(a&&a.options){var c=a.options.parentWorkspace;a.isFlyout?c&&c.options&&(b=c.options.parentWorkspace):c&&(b=c)}return b};var module$exports$Blockly$Trashcan={Trashcan:function(a){module$exports$Blockly$Trashcan.Trashcan.superClass_.constructor.call(this);this.workspace_=a;this.id="trashcan";this.contents_=[];this.flyout=null;0>=this.workspace_.options.maxTrashcanContents||(a=new module$exports$Blockly$Options.Options({scrollbars:!0,parentWorkspace:this.workspace_,rtl:this.workspace_.RTL,oneBasedIndex:this.workspace_.options.oneBasedIndex,renderer:this.workspace_.options.renderer,rendererOverrides:this.workspace_.options.rendererOverrides,
1869
1869
  move:{scrollbars:!0}}),this.workspace_.horizontalLayout?(a.toolboxPosition=this.workspace_.toolboxPosition===module$exports$Blockly$utils$toolbox.Position.TOP?module$exports$Blockly$utils$toolbox.Position.BOTTOM:module$exports$Blockly$utils$toolbox.Position.TOP,this.flyout=new ((0,module$exports$Blockly$registry.getClassFromOptions)(module$exports$Blockly$registry.Type.FLYOUTS_HORIZONTAL_TOOLBOX,this.workspace_.options,!0))(a)):(a.toolboxPosition=this.workspace_.toolboxPosition===module$exports$Blockly$utils$toolbox.Position.RIGHT?
1870
- module$exports$Blockly$utils$toolbox.Position.LEFT:module$exports$Blockly$utils$toolbox.Position.RIGHT,this.flyout=new ((0,module$exports$Blockly$registry.getClassFromOptions)(module$exports$Blockly$registry.Type.FLYOUTS_VERTICAL_TOOLBOX,this.workspace_.options,!0))(a)),this.workspace_.addChangeListener(this.onDelete_.bind(this)))}};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Trashcan.Trashcan,module$exports$Blockly$DeleteArea.DeleteArea);
1870
+ module$exports$Blockly$utils$toolbox.Position.LEFT:module$exports$Blockly$utils$toolbox.Position.RIGHT,this.flyout=new ((0,module$exports$Blockly$registry.getClassFromOptions)(module$exports$Blockly$registry.Type.FLYOUTS_VERTICAL_TOOLBOX,this.workspace_.options,!0))(a)),this.workspace_.addChangeListener(this.onDelete_.bind(this)))}};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$Trashcan.Trashcan,module$exports$Blockly$DeleteArea.DeleteArea);
1871
1871
  var module$contents$Blockly$Trashcan_WIDTH=47,module$contents$Blockly$Trashcan_BODY_HEIGHT=44,module$contents$Blockly$Trashcan_LID_HEIGHT=16,module$contents$Blockly$Trashcan_MARGIN_VERTICAL=20,module$contents$Blockly$Trashcan_MARGIN_HORIZONTAL=20,module$contents$Blockly$Trashcan_MARGIN_HOTSPOT=10,module$contents$Blockly$Trashcan_SPRITE_LEFT=0,module$contents$Blockly$Trashcan_SPRITE_TOP=32,module$contents$Blockly$Trashcan_HAS_BLOCKS_LID_ANGLE=.1,module$contents$Blockly$Trashcan_ANIMATION_LENGTH=80,
1872
1872
  module$contents$Blockly$Trashcan_ANIMATION_FRAMES=4,module$contents$Blockly$Trashcan_OPACITY_MIN=.4,module$contents$Blockly$Trashcan_OPACITY_MAX=.8,module$contents$Blockly$Trashcan_MAX_LID_ANGLE=45;module$exports$Blockly$Trashcan.Trashcan.prototype.isLidOpen=!1;module$exports$Blockly$Trashcan.Trashcan.prototype.minOpenness_=0;module$exports$Blockly$Trashcan.Trashcan.prototype.svgGroup_=null;module$exports$Blockly$Trashcan.Trashcan.prototype.svgLid_=null;
1873
1873
  module$exports$Blockly$Trashcan.Trashcan.prototype.lidTask_=0;module$exports$Blockly$Trashcan.Trashcan.prototype.lidOpen_=0;module$exports$Blockly$Trashcan.Trashcan.prototype.left_=0;module$exports$Blockly$Trashcan.Trashcan.prototype.top_=0;module$exports$Blockly$Trashcan.Trashcan.prototype.initialized_=!1;
@@ -1905,7 +1905,7 @@ module$exports$Blockly$WorkspaceComment.WorkspaceComment.fireCreateEvent=functio
1905
1905
  module$exports$Blockly$WorkspaceComment.WorkspaceComment.fromXml=function(a,b){var c=module$exports$Blockly$WorkspaceComment.WorkspaceComment.parseAttributes(a);b=new module$exports$Blockly$WorkspaceComment.WorkspaceComment(b,c.content,c.h,c.w,c.id);c=parseInt(a.getAttribute("x"),10);a=parseInt(a.getAttribute("y"),10);isNaN(c)||isNaN(a)||b.moveBy(c,a);module$exports$Blockly$WorkspaceComment.WorkspaceComment.fireCreateEvent(b);return b};
1906
1906
  module$exports$Blockly$WorkspaceComment.WorkspaceComment.parseAttributes=function(a){var b=a.getAttribute("h"),c=a.getAttribute("w");return{id:a.getAttribute("id"),h:b?parseInt(b,10):100,w:c?parseInt(c,10):100,x:parseInt(a.getAttribute("x"),10),y:parseInt(a.getAttribute("y"),10),content:a.textContent}};var module$exports$Blockly$WorkspaceCommentSvg={},module$contents$Blockly$WorkspaceCommentSvg_RESIZE_SIZE=8,module$contents$Blockly$WorkspaceCommentSvg_BORDER_RADIUS=3,module$contents$Blockly$WorkspaceCommentSvg_TEXTAREA_OFFSET=2;
1907
1907
  module$exports$Blockly$WorkspaceCommentSvg.WorkspaceCommentSvg=function(a,b,c,d,e){this.onMouseMoveWrapper_=this.onMouseUpWrapper_=null;this.svgGroup_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.G,{"class":"blocklyComment"},null);this.svgGroup_.translate_="";this.svgRect_=(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.RECT,{"class":"blocklyCommentRect",x:0,y:0,rx:module$contents$Blockly$WorkspaceCommentSvg_BORDER_RADIUS,
1908
- ry:module$contents$Blockly$WorkspaceCommentSvg_BORDER_RADIUS});this.svgGroup_.appendChild(this.svgRect_);this.rendered_=!1;this.useDragSurface_=(0,module$exports$Blockly$utils$svgMath.is3dSupported)()&&!!a.getBlockDragSurface();module$exports$Blockly$WorkspaceCommentSvg.WorkspaceCommentSvg.superClass_.constructor.call(this,a,b,c,d,e);this.render()};(0,module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$WorkspaceCommentSvg.WorkspaceCommentSvg,module$exports$Blockly$WorkspaceComment.WorkspaceComment);
1908
+ ry:module$contents$Blockly$WorkspaceCommentSvg_BORDER_RADIUS});this.svgGroup_.appendChild(this.svgRect_);this.rendered_=!1;this.useDragSurface_=(0,module$exports$Blockly$utils$svgMath.is3dSupported)()&&!!a.getBlockDragSurface();module$exports$Blockly$WorkspaceCommentSvg.WorkspaceCommentSvg.superClass_.constructor.call(this,a,b,c,d,e);this.render()};(0,$.module$exports$Blockly$utils$object.inherits)(module$exports$Blockly$WorkspaceCommentSvg.WorkspaceCommentSvg,module$exports$Blockly$WorkspaceComment.WorkspaceComment);
1909
1909
  module$exports$Blockly$WorkspaceCommentSvg.WorkspaceCommentSvg.DEFAULT_SIZE=100;module$exports$Blockly$WorkspaceCommentSvg.WorkspaceCommentSvg.TOP_OFFSET=10;
1910
1910
  module$exports$Blockly$WorkspaceCommentSvg.WorkspaceCommentSvg.prototype.dispose=function(){this.disposed_||((0,$.module$exports$Blockly$common.getSelected)()===this&&(this.unselect(),this.workspace.cancelCurrentGesture()),(0,module$exports$Blockly$Events$utils.isEnabled)()&&(0,module$exports$Blockly$Events$utils.fire)(new ((0,module$exports$Blockly$Events$utils.get)(module$exports$Blockly$Events$utils.COMMENT_DELETE))(this)),(0,module$exports$Blockly$utils$dom.removeNode)(this.svgGroup_),this.disposeInternal_(),
1911
1911
  (0,module$exports$Blockly$Events$utils.disable)(),module$exports$Blockly$WorkspaceCommentSvg.WorkspaceCommentSvg.superClass_.dispose.call(this),(0,module$exports$Blockly$Events$utils.enable)())};
@@ -1971,7 +1971,7 @@ module$exports$Blockly$ZoomControls.ZoomControls.prototype.createZoomResetSvg_=f
1971
1971
  {width:32,height:32},b);(0,module$exports$Blockly$utils$dom.createSvgElement)(module$exports$Blockly$utils$Svg.Svg.IMAGE,{width:$.module$exports$Blockly$internalConstants.SPRITE.width,height:$.module$exports$Blockly$internalConstants.SPRITE.height,y:-92,"clip-path":"url(#blocklyZoomresetClipPath"+a+")"},this.zoomResetGroup_).setAttributeNS(module$exports$Blockly$utils$dom.XLINK_NS,"xlink:href",this.workspace_.options.pathToMedia+$.module$exports$Blockly$internalConstants.SPRITE.url);this.onZoomResetWrapper_=
1972
1972
  (0,module$exports$Blockly$browserEvents.conditionalBind)(this.zoomResetGroup_,"mousedown",null,this.resetZoom_.bind(this))};
1973
1973
  module$exports$Blockly$ZoomControls.ZoomControls.prototype.resetZoom_=function(a){this.workspace_.markFocused();var b=Math.log(this.workspace_.options.zoomOptions.startScale/this.workspace_.scale)/Math.log(this.workspace_.options.zoomOptions.scaleSpeed);this.workspace_.beginCanvasTransition();this.workspace_.zoomCenter(b);this.workspace_.scrollCenter();setTimeout(this.workspace_.endCanvasTransition.bind(this.workspace_),500);this.fireZoomEvent_();(0,module$exports$Blockly$Touch.clearTouchIdentifier)();
1974
- a.stopPropagation();a.preventDefault()};module$exports$Blockly$ZoomControls.ZoomControls.prototype.fireZoomEvent_=function(){var a=new ((0,module$exports$Blockly$Events$utils.get)(module$exports$Blockly$Events$utils.CLICK))(null,this.workspace_.id,"zoom_controls");(0,module$exports$Blockly$Events$utils.fire)(a)};(0,module$exports$Blockly$Css.register)("\n .blocklyZoom>image, .blocklyZoom>svg>image {\n opacity: .4;\n }\n\n .blocklyZoom>image:hover, .blocklyZoom>svg>image:hover {\n opacity: .6;\n }\n\n .blocklyZoom>image:active, .blocklyZoom>svg>image:active {\n opacity: .8;\n }\n");$.Blockly.VERSION="7.20211209.0-beta.2";var module$contents$Blockly_COMPILED=!1;
1974
+ a.stopPropagation();a.preventDefault()};module$exports$Blockly$ZoomControls.ZoomControls.prototype.fireZoomEvent_=function(){var a=new ((0,module$exports$Blockly$Events$utils.get)(module$exports$Blockly$Events$utils.CLICK))(null,this.workspace_.id,"zoom_controls");(0,module$exports$Blockly$Events$utils.fire)(a)};(0,module$exports$Blockly$Css.register)("\n .blocklyZoom>image, .blocklyZoom>svg>image {\n opacity: .4;\n }\n\n .blocklyZoom>image:hover, .blocklyZoom>svg>image:hover {\n opacity: .6;\n }\n\n .blocklyZoom>image:active, .blocklyZoom>svg>image:active {\n opacity: .8;\n }\n");$.Blockly.VERSION="7.20211209.0-beta.3";var module$contents$Blockly_COMPILED=!1;
1975
1975
  Object.defineProperties($.Blockly,{alert:{set:function(a){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.alert","September 2021","September 2022");(0,module$exports$Blockly$dialog.setAlert)(a)},get:function(){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.alert","September 2021","September 2022","Blockly.dialog.alert()");return module$exports$Blockly$dialog.alert}},confirm:{set:function(a){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.confirm","September 2021",
1976
1976
  "September 2022");(0,module$exports$Blockly$dialog.setConfirm)(a)},get:function(){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.confirm","September 2021","September 2022","Blockly.dialog.confirm()");return module$exports$Blockly$dialog.confirm}},mainWorkspace:{set:function(a){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.mainWorkspace","September 2021","September 2022");(0,$.module$exports$Blockly$common.setMainWorkspace)(a)},get:function(){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.mainWorkspace",
1977
1977
  "September 2021","September 2022","Blockly.getMainWorkspace()");return(0,$.module$exports$Blockly$common.getMainWorkspace)()}},prompt:{set:function(a){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.prompt","September 2021","September 2022");(0,module$exports$Blockly$dialog.setPrompt)(a)},get:function(){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.prompt","September 2021","September 2022","Blockly.dialog.prompt()");return module$exports$Blockly$dialog.prompt}},selected:{get:function(){(0,module$exports$Blockly$utils$deprecation.warn)("Blockly.selected",
@@ -2004,7 +2004,7 @@ $.Blockly.Variables=$.module$exports$Blockly$Variables;$.Blockly.VariablesDynami
2004
2004
  $.Blockly.WorkspaceCommentSvg=module$exports$Blockly$WorkspaceCommentSvg.WorkspaceCommentSvg;$.Blockly.WorkspaceDragSurfaceSvg=module$exports$Blockly$WorkspaceDragSurfaceSvg.WorkspaceDragSurfaceSvg;$.Blockly.WorkspaceDragger=module$exports$Blockly$WorkspaceDragger.WorkspaceDragger;$.Blockly.WorkspaceSvg=module$exports$Blockly$WorkspaceSvg.WorkspaceSvg;$.Blockly.Xml=$.module$exports$Blockly$Xml;$.Blockly.ZoomControls=module$exports$Blockly$ZoomControls.ZoomControls;$.Blockly.blockAnimations=module$exports$Blockly$blockAnimations;
2005
2005
  $.Blockly.blockRendering=module$exports$Blockly$blockRendering;$.Blockly.browserEvents=module$exports$Blockly$browserEvents;$.Blockly.bumpObjects=module$exports$Blockly$bumpObjects;$.Blockly.clipboard=module$exports$Blockly$clipboard;$.Blockly.common=$.module$exports$Blockly$common;$.Blockly.connectionTypes=$.module$exports$Blockly$ConnectionType.ConnectionType;$.Blockly.constants=module$exports$Blockly$constants;$.Blockly.dialog=module$exports$Blockly$dialog;$.Blockly.fieldRegistry=module$exports$Blockly$fieldRegistry;
2006
2006
  $.Blockly.geras=module$exports$Blockly$geras;$.Blockly.inject=module$exports$Blockly$inject.inject;$.Blockly.inputTypes=$.module$exports$Blockly$inputTypes.inputTypes;$.Blockly.minimalist=module$exports$Blockly$minimalist;$.Blockly.registry=module$exports$Blockly$registry;$.Blockly.thrasos=module$exports$Blockly$thrasos;$.Blockly.uiPosition=module$exports$Blockly$uiPosition;$.Blockly.utils=module$exports$Blockly$utils;$.Blockly.zelos=module$exports$Blockly$zelos;
2007
- if(!module$contents$Blockly_COMPILED&&"object"===typeof module$exports$Blockly$utils$global.globalThis.Blockly&&module$exports$Blockly$utils$global.globalThis.Blockly!==$.Blockly){var descriptors=Object.getOwnPropertyDescriptors($.Blockly),accessors={},key;for(key in descriptors)if(descriptors[key].get||descriptors[key].set)accessors[key]=descriptors[key];Object.defineProperties(module$exports$Blockly$utils$global.globalThis.Blockly,accessors)};$.Blockly.requires={};
2007
+ if(!module$contents$Blockly_COMPILED&&"object"===typeof $.module$exports$Blockly$utils$global.globalThis.Blockly&&$.module$exports$Blockly$utils$global.globalThis.Blockly!==$.Blockly){var descriptors=Object.getOwnPropertyDescriptors($.Blockly),accessors={},key;for(key in descriptors)if(descriptors[key].get||descriptors[key].set)accessors[key]=descriptors[key];Object.defineProperties($.module$exports$Blockly$utils$global.globalThis.Blockly,accessors)};$.Blockly.requires={};
2008
2008
  $.Blockly.internal_=$;
2009
2009
  return $.Blockly;
2010
2010
  }));
@@ -2533,25 +2533,26 @@ $.module$exports$Blockly$blocks.Blocks.procedures_callreturn=Object.assign({},mo
2533
2533
  $.module$exports$Blockly$blocks.Blocks.procedures_ifreturn={init:function(){this.appendValueInput("CONDITION").setCheck("Boolean").appendField($.Blockly.Msg.CONTROLS_IF_MSG_IF);this.appendValueInput("VALUE").appendField($.Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);this.setInputsInline(!0);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setStyle("procedure_blocks");this.setTooltip($.Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP);this.setHelpUrl($.Blockly.Msg.PROCEDURES_IFRETURN_HELPURL);this.hasReturnValue_=
2534
2534
  !0},mutationToDom:function(){var a=(0,$.module$exports$Blockly$utils$xml.createElement)("mutation");a.setAttribute("value",Number(this.hasReturnValue_));return a},domToMutation:function(a){this.hasReturnValue_="1"===a.getAttribute("value");this.hasReturnValue_||(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField($.Blockly.Msg.PROCEDURES_DEFRETURN_RETURN))},onchange:function(a){if(!this.workspace.isDragging||!this.workspace.isDragging()){a=!1;var b=this;do{if(-1!==this.FUNCTION_TYPES.indexOf(b.type)){a=
2535
2535
  !0;break}b=b.getSurroundParent()}while(b);a?("procedures_defnoreturn"===b.type&&this.hasReturnValue_?(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField($.Blockly.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!1):"procedures_defreturn"!==b.type||this.hasReturnValue_||(this.removeInput("VALUE"),this.appendValueInput("VALUE").appendField($.Blockly.Msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null),this.isInFlyout||this.setEnabled(!0)):(this.setWarningText($.Blockly.Msg.PROCEDURES_IFRETURN_WARNING),
2536
- this.isInFlyout||this.getInheritedDisabled()||this.setEnabled(!1))}},FUNCTION_TYPES:["procedures_defnoreturn","procedures_defreturn"]};$.Blockly.blocks.math={};$.Blockly.Constants.Math={};$.Blockly.Constants.Math.HUE=230;
2537
- $.Blockly.defineBlocksWithJsonArray([{type:"math_number",message0:"%1",args0:[{type:"field_number",name:"NUM",value:0}],output:"Number",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",style:"math_blocks",tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"math_arithmetic",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Number"},{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ADDITION_SYMBOL}","ADD"],["%{BKY_MATH_SUBTRACTION_SYMBOL}","MINUS"],["%{BKY_MATH_MULTIPLICATION_SYMBOL}",
2538
- "MULTIPLY"],["%{BKY_MATH_DIVISION_SYMBOL}","DIVIDE"],["%{BKY_MATH_POWER_SYMBOL}","POWER"]]},{type:"input_value",name:"B",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ARITHMETIC_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_single",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_SINGLE_OP_ROOT}","ROOT"],["%{BKY_MATH_SINGLE_OP_ABSOLUTE}","ABS"],["-","NEG"],["ln","LN"],["log10","LOG10"],["e^","EXP"],["10^","POW10"]]},
2539
- {type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_SINGLE_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_trig",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_TRIG_SIN}","SIN"],["%{BKY_MATH_TRIG_COS}","COS"],["%{BKY_MATH_TRIG_TAN}","TAN"],["%{BKY_MATH_TRIG_ASIN}","ASIN"],["%{BKY_MATH_TRIG_ACOS}","ACOS"],["%{BKY_MATH_TRIG_ATAN}","ATAN"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",
2540
- helpUrl:"%{BKY_MATH_TRIG_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_constant",message0:"%1",args0:[{type:"field_dropdown",name:"CONSTANT",options:[["\u03c0","PI"],["e","E"],["\u03c6","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(\u00bd)","SQRT1_2"],["\u221e","INFINITY"]]}],output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTANT_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTANT_HELPURL}"},{type:"math_number_property",message0:"%1 %2",args0:[{type:"input_value",name:"NUMBER_TO_CHECK",check:"Number"},
2541
- {type:"field_dropdown",name:"PROPERTY",options:[["%{BKY_MATH_IS_EVEN}","EVEN"],["%{BKY_MATH_IS_ODD}","ODD"],["%{BKY_MATH_IS_PRIME}","PRIME"],["%{BKY_MATH_IS_WHOLE}","WHOLE"],["%{BKY_MATH_IS_POSITIVE}","POSITIVE"],["%{BKY_MATH_IS_NEGATIVE}","NEGATIVE"],["%{BKY_MATH_IS_DIVISIBLE_BY}","DIVISIBLE_BY"]]}],inputsInline:!0,output:"Boolean",style:"math_blocks",tooltip:"%{BKY_MATH_IS_TOOLTIP}",mutator:"math_is_divisibleby_mutator"},{type:"math_change",message0:"%{BKY_MATH_CHANGE_TITLE}",args0:[{type:"field_variable",
2542
- name:"VAR",variable:"%{BKY_MATH_CHANGE_TITLE_ITEM}"},{type:"input_value",name:"DELTA",check:"Number"}],previousStatement:null,nextStatement:null,style:"variable_blocks",helpUrl:"%{BKY_MATH_CHANGE_HELPURL}",extensions:["math_change_tooltip"]},{type:"math_round",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ROUND_OPERATOR_ROUND}","ROUND"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDUP}","ROUNDUP"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDDOWN}","ROUNDDOWN"]]},{type:"input_value",name:"NUM",
2543
- check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ROUND_HELPURL}",tooltip:"%{BKY_MATH_ROUND_TOOLTIP}"},{type:"math_on_list",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ONLIST_OPERATOR_SUM}","SUM"],["%{BKY_MATH_ONLIST_OPERATOR_MIN}","MIN"],["%{BKY_MATH_ONLIST_OPERATOR_MAX}","MAX"],["%{BKY_MATH_ONLIST_OPERATOR_AVERAGE}","AVERAGE"],["%{BKY_MATH_ONLIST_OPERATOR_MEDIAN}","MEDIAN"],["%{BKY_MATH_ONLIST_OPERATOR_MODE}","MODE"],["%{BKY_MATH_ONLIST_OPERATOR_STD_DEV}",
2544
- "STD_DEV"],["%{BKY_MATH_ONLIST_OPERATOR_RANDOM}","RANDOM"]]},{type:"input_value",name:"LIST",check:"Array"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ONLIST_HELPURL}",mutator:"math_modes_of_list_mutator",extensions:["math_op_tooltip"]},{type:"math_modulo",message0:"%{BKY_MATH_MODULO_TITLE}",args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_MODULO_TOOLTIP}",
2545
- helpUrl:"%{BKY_MATH_MODULO_HELPURL}"},{type:"math_constrain",message0:"%{BKY_MATH_CONSTRAIN_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTRAIN_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTRAIN_HELPURL}"},{type:"math_random_int",message0:"%{BKY_MATH_RANDOM_INT_TITLE}",args0:[{type:"input_value",name:"FROM",check:"Number"},
2546
- {type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_INT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_INT_HELPURL}"},{type:"math_random_float",message0:"%{BKY_MATH_RANDOM_FLOAT_TITLE_RANDOM}",output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_FLOAT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_FLOAT_HELPURL}"},{type:"math_atan2",message0:"%{BKY_MATH_ATAN2_TITLE}",args0:[{type:"input_value",name:"X",check:"Number"},{type:"input_value",
2547
- name:"Y",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_ATAN2_TOOLTIP}",helpUrl:"%{BKY_MATH_ATAN2_HELPURL}"}]);
2548
- $.Blockly.Constants.Math.TOOLTIPS_BY_OP={ADD:"%{BKY_MATH_ARITHMETIC_TOOLTIP_ADD}",MINUS:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MINUS}",MULTIPLY:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MULTIPLY}",DIVIDE:"%{BKY_MATH_ARITHMETIC_TOOLTIP_DIVIDE}",POWER:"%{BKY_MATH_ARITHMETIC_TOOLTIP_POWER}",ROOT:"%{BKY_MATH_SINGLE_TOOLTIP_ROOT}",ABS:"%{BKY_MATH_SINGLE_TOOLTIP_ABS}",NEG:"%{BKY_MATH_SINGLE_TOOLTIP_NEG}",LN:"%{BKY_MATH_SINGLE_TOOLTIP_LN}",LOG10:"%{BKY_MATH_SINGLE_TOOLTIP_LOG10}",EXP:"%{BKY_MATH_SINGLE_TOOLTIP_EXP}",POW10:"%{BKY_MATH_SINGLE_TOOLTIP_POW10}",
2549
- SIN:"%{BKY_MATH_TRIG_TOOLTIP_SIN}",COS:"%{BKY_MATH_TRIG_TOOLTIP_COS}",TAN:"%{BKY_MATH_TRIG_TOOLTIP_TAN}",ASIN:"%{BKY_MATH_TRIG_TOOLTIP_ASIN}",ACOS:"%{BKY_MATH_TRIG_TOOLTIP_ACOS}",ATAN:"%{BKY_MATH_TRIG_TOOLTIP_ATAN}",SUM:"%{BKY_MATH_ONLIST_TOOLTIP_SUM}",MIN:"%{BKY_MATH_ONLIST_TOOLTIP_MIN}",MAX:"%{BKY_MATH_ONLIST_TOOLTIP_MAX}",AVERAGE:"%{BKY_MATH_ONLIST_TOOLTIP_AVERAGE}",MEDIAN:"%{BKY_MATH_ONLIST_TOOLTIP_MEDIAN}",MODE:"%{BKY_MATH_ONLIST_TOOLTIP_MODE}",STD_DEV:"%{BKY_MATH_ONLIST_TOOLTIP_STD_DEV}",RANDOM:"%{BKY_MATH_ONLIST_TOOLTIP_RANDOM}"};
2550
- $.Blockly.Extensions.register("math_op_tooltip",$.Blockly.Extensions.buildTooltipForDropdown("OP",$.Blockly.Constants.Math.TOOLTIPS_BY_OP));
2551
- $.Blockly.Constants.Math.IS_DIVISIBLEBY_MUTATOR_MIXIN={mutationToDom:function(){var a=$.Blockly.utils.xml.createElement("mutation"),b="DIVISIBLE_BY"===this.getFieldValue("PROPERTY");a.setAttribute("divisor_input",b);return a},domToMutation:function(a){a="true"===a.getAttribute("divisor_input");this.updateShape_(a)},updateShape_:function(a){var b=this.getInput("DIVISOR");a?b||this.appendValueInput("DIVISOR").setCheck("Number"):b&&this.removeInput("DIVISOR")}};
2552
- $.Blockly.Constants.Math.IS_DIVISIBLE_MUTATOR_EXTENSION=function(){this.getField("PROPERTY").setValidator(function(a){a="DIVISIBLE_BY"===a;this.getSourceBlock().updateShape_(a)})};$.Blockly.Extensions.registerMutator("math_is_divisibleby_mutator",$.Blockly.Constants.Math.IS_DIVISIBLEBY_MUTATOR_MIXIN,$.Blockly.Constants.Math.IS_DIVISIBLE_MUTATOR_EXTENSION);$.Blockly.Extensions.register("math_change_tooltip",$.Blockly.Extensions.buildTooltipWithFieldText("%{BKY_MATH_CHANGE_TOOLTIP}","VAR"));
2553
- $.Blockly.Constants.Math.LIST_MODES_MUTATOR_MIXIN={updateType_:function(a){"MODE"===a?this.outputConnection.setCheck("Array"):this.outputConnection.setCheck("Number")},mutationToDom:function(){var a=$.Blockly.utils.xml.createElement("mutation");a.setAttribute("op",this.getFieldValue("OP"));return a},domToMutation:function(a){this.updateType_(a.getAttribute("op"))}};$.Blockly.Constants.Math.LIST_MODES_MUTATOR_EXTENSION=function(){this.getField("OP").setValidator(function(a){this.updateType_(a)}.bind(this))};
2554
- $.Blockly.Extensions.registerMutator("math_modes_of_list_mutator",$.Blockly.Constants.Math.LIST_MODES_MUTATOR_MIXIN,$.Blockly.Constants.Math.LIST_MODES_MUTATOR_EXTENSION);var module$exports$Blockly$blocks$loops={};
2536
+ this.isInFlyout||this.getInheritedDisabled()||this.setEnabled(!1))}},FUNCTION_TYPES:["procedures_defnoreturn","procedures_defreturn"]};var module$exports$Blockly$blocks$math={};
2537
+ (0,$.module$exports$Blockly$common.defineBlocksWithJsonArray)([{type:"math_number",message0:"%1",args0:[{type:"field_number",name:"NUM",value:0}],output:"Number",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",style:"math_blocks",tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"math_arithmetic",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Number"},{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ADDITION_SYMBOL}","ADD"],["%{BKY_MATH_SUBTRACTION_SYMBOL}",
2538
+ "MINUS"],["%{BKY_MATH_MULTIPLICATION_SYMBOL}","MULTIPLY"],["%{BKY_MATH_DIVISION_SYMBOL}","DIVIDE"],["%{BKY_MATH_POWER_SYMBOL}","POWER"]]},{type:"input_value",name:"B",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ARITHMETIC_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_single",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_SINGLE_OP_ROOT}","ROOT"],["%{BKY_MATH_SINGLE_OP_ABSOLUTE}","ABS"],["-","NEG"],["ln","LN"],["log10",
2539
+ "LOG10"],["e^","EXP"],["10^","POW10"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_SINGLE_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_trig",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_TRIG_SIN}","SIN"],["%{BKY_MATH_TRIG_COS}","COS"],["%{BKY_MATH_TRIG_TAN}","TAN"],["%{BKY_MATH_TRIG_ASIN}","ASIN"],["%{BKY_MATH_TRIG_ACOS}","ACOS"],["%{BKY_MATH_TRIG_ATAN}","ATAN"]]},{type:"input_value",name:"NUM",
2540
+ check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_TRIG_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_constant",message0:"%1",args0:[{type:"field_dropdown",name:"CONSTANT",options:[["\u03c0","PI"],["e","E"],["\u03c6","GOLDEN_RATIO"],["sqrt(2)","SQRT2"],["sqrt(\u00bd)","SQRT1_2"],["\u221e","INFINITY"]]}],output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTANT_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTANT_HELPURL}"},{type:"math_number_property",message0:"%1 %2",args0:[{type:"input_value",
2541
+ name:"NUMBER_TO_CHECK",check:"Number"},{type:"field_dropdown",name:"PROPERTY",options:[["%{BKY_MATH_IS_EVEN}","EVEN"],["%{BKY_MATH_IS_ODD}","ODD"],["%{BKY_MATH_IS_PRIME}","PRIME"],["%{BKY_MATH_IS_WHOLE}","WHOLE"],["%{BKY_MATH_IS_POSITIVE}","POSITIVE"],["%{BKY_MATH_IS_NEGATIVE}","NEGATIVE"],["%{BKY_MATH_IS_DIVISIBLE_BY}","DIVISIBLE_BY"]]}],inputsInline:!0,output:"Boolean",style:"math_blocks",tooltip:"%{BKY_MATH_IS_TOOLTIP}",mutator:"math_is_divisibleby_mutator"},{type:"math_change",message0:"%{BKY_MATH_CHANGE_TITLE}",
2542
+ args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_MATH_CHANGE_TITLE_ITEM}"},{type:"input_value",name:"DELTA",check:"Number"}],previousStatement:null,nextStatement:null,style:"variable_blocks",helpUrl:"%{BKY_MATH_CHANGE_HELPURL}",extensions:["math_change_tooltip"]},{type:"math_round",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ROUND_OPERATOR_ROUND}","ROUND"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDUP}","ROUNDUP"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDDOWN}","ROUNDDOWN"]]},
2543
+ {type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ROUND_HELPURL}",tooltip:"%{BKY_MATH_ROUND_TOOLTIP}"},{type:"math_on_list",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ONLIST_OPERATOR_SUM}","SUM"],["%{BKY_MATH_ONLIST_OPERATOR_MIN}","MIN"],["%{BKY_MATH_ONLIST_OPERATOR_MAX}","MAX"],["%{BKY_MATH_ONLIST_OPERATOR_AVERAGE}","AVERAGE"],["%{BKY_MATH_ONLIST_OPERATOR_MEDIAN}","MEDIAN"],["%{BKY_MATH_ONLIST_OPERATOR_MODE}",
2544
+ "MODE"],["%{BKY_MATH_ONLIST_OPERATOR_STD_DEV}","STD_DEV"],["%{BKY_MATH_ONLIST_OPERATOR_RANDOM}","RANDOM"]]},{type:"input_value",name:"LIST",check:"Array"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ONLIST_HELPURL}",mutator:"math_modes_of_list_mutator",extensions:["math_op_tooltip"]},{type:"math_modulo",message0:"%{BKY_MATH_MODULO_TITLE}",args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",
2545
+ tooltip:"%{BKY_MATH_MODULO_TOOLTIP}",helpUrl:"%{BKY_MATH_MODULO_HELPURL}"},{type:"math_constrain",message0:"%{BKY_MATH_CONSTRAIN_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTRAIN_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTRAIN_HELPURL}"},{type:"math_random_int",message0:"%{BKY_MATH_RANDOM_INT_TITLE}",args0:[{type:"input_value",
2546
+ name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_INT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_INT_HELPURL}"},{type:"math_random_float",message0:"%{BKY_MATH_RANDOM_FLOAT_TITLE_RANDOM}",output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_FLOAT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_FLOAT_HELPURL}"},{type:"math_atan2",message0:"%{BKY_MATH_ATAN2_TITLE}",args0:[{type:"input_value",name:"X",check:"Number"},
2547
+ {type:"input_value",name:"Y",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_ATAN2_TOOLTIP}",helpUrl:"%{BKY_MATH_ATAN2_HELPURL}"}]);
2548
+ var module$contents$Blockly$blocks$math_TOOLTIPS_BY_OP={ADD:"%{BKY_MATH_ARITHMETIC_TOOLTIP_ADD}",MINUS:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MINUS}",MULTIPLY:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MULTIPLY}",DIVIDE:"%{BKY_MATH_ARITHMETIC_TOOLTIP_DIVIDE}",POWER:"%{BKY_MATH_ARITHMETIC_TOOLTIP_POWER}",ROOT:"%{BKY_MATH_SINGLE_TOOLTIP_ROOT}",ABS:"%{BKY_MATH_SINGLE_TOOLTIP_ABS}",NEG:"%{BKY_MATH_SINGLE_TOOLTIP_NEG}",LN:"%{BKY_MATH_SINGLE_TOOLTIP_LN}",LOG10:"%{BKY_MATH_SINGLE_TOOLTIP_LOG10}",EXP:"%{BKY_MATH_SINGLE_TOOLTIP_EXP}",
2549
+ POW10:"%{BKY_MATH_SINGLE_TOOLTIP_POW10}",SIN:"%{BKY_MATH_TRIG_TOOLTIP_SIN}",COS:"%{BKY_MATH_TRIG_TOOLTIP_COS}",TAN:"%{BKY_MATH_TRIG_TOOLTIP_TAN}",ASIN:"%{BKY_MATH_TRIG_TOOLTIP_ASIN}",ACOS:"%{BKY_MATH_TRIG_TOOLTIP_ACOS}",ATAN:"%{BKY_MATH_TRIG_TOOLTIP_ATAN}",SUM:"%{BKY_MATH_ONLIST_TOOLTIP_SUM}",MIN:"%{BKY_MATH_ONLIST_TOOLTIP_MIN}",MAX:"%{BKY_MATH_ONLIST_TOOLTIP_MAX}",AVERAGE:"%{BKY_MATH_ONLIST_TOOLTIP_AVERAGE}",MEDIAN:"%{BKY_MATH_ONLIST_TOOLTIP_MEDIAN}",MODE:"%{BKY_MATH_ONLIST_TOOLTIP_MODE}",STD_DEV:"%{BKY_MATH_ONLIST_TOOLTIP_STD_DEV}",
2550
+ RANDOM:"%{BKY_MATH_ONLIST_TOOLTIP_RANDOM}"};(0,$.module$exports$Blockly$Extensions.register)("math_op_tooltip",(0,$.module$exports$Blockly$Extensions.buildTooltipForDropdown)("OP",module$contents$Blockly$blocks$math_TOOLTIPS_BY_OP));
2551
+ var module$contents$Blockly$blocks$math_IS_DIVISIBLEBY_MUTATOR_MIXIN={mutationToDom:function(){var a=(0,$.module$exports$Blockly$utils$xml.createElement)("mutation"),b="DIVISIBLE_BY"===this.getFieldValue("PROPERTY");a.setAttribute("divisor_input",b);return a},domToMutation:function(a){a="true"===a.getAttribute("divisor_input");this.updateShape_(a)},updateShape_:function(a){var b=this.getInput("DIVISOR");a?b||this.appendValueInput("DIVISOR").setCheck("Number"):b&&this.removeInput("DIVISOR")}},module$contents$Blockly$blocks$math_IS_DIVISIBLE_MUTATOR_EXTENSION=
2552
+ function(){this.getField("PROPERTY").setValidator(function(a){a="DIVISIBLE_BY"===a;this.getSourceBlock().updateShape_(a)})};(0,$.module$exports$Blockly$Extensions.registerMutator)("math_is_divisibleby_mutator",module$contents$Blockly$blocks$math_IS_DIVISIBLEBY_MUTATOR_MIXIN,module$contents$Blockly$blocks$math_IS_DIVISIBLE_MUTATOR_EXTENSION);
2553
+ (0,$.module$exports$Blockly$Extensions.register)("math_change_tooltip",(0,$.module$exports$Blockly$Extensions.buildTooltipWithFieldText)("%{BKY_MATH_CHANGE_TOOLTIP}","VAR"));
2554
+ var module$contents$Blockly$blocks$math_LIST_MODES_MUTATOR_MIXIN={updateType_:function(a){"MODE"===a?this.outputConnection.setCheck("Array"):this.outputConnection.setCheck("Number")},mutationToDom:function(){var a=(0,$.module$exports$Blockly$utils$xml.createElement)("mutation");a.setAttribute("op",this.getFieldValue("OP"));return a},domToMutation:function(a){this.updateType_(a.getAttribute("op"))}},module$contents$Blockly$blocks$math_LIST_MODES_MUTATOR_EXTENSION=function(){this.getField("OP").setValidator(function(a){this.updateType_(a)}.bind(this))};
2555
+ (0,$.module$exports$Blockly$Extensions.registerMutator)("math_modes_of_list_mutator",module$contents$Blockly$blocks$math_LIST_MODES_MUTATOR_MIXIN,module$contents$Blockly$blocks$math_LIST_MODES_MUTATOR_EXTENSION);var module$exports$Blockly$blocks$loops={};
2555
2556
  (0,$.module$exports$Blockly$common.defineBlocksWithJsonArray)([{type:"controls_repeat_ext",message0:"%{BKY_CONTROLS_REPEAT_TITLE}",args0:[{type:"input_value",name:"TIMES",check:"Number"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",tooltip:"%{BKY_CONTROLS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_CONTROLS_REPEAT_HELPURL}"},{type:"controls_repeat",message0:"%{BKY_CONTROLS_REPEAT_TITLE}",args0:[{type:"field_number",
2556
2557
  name:"TIMES",value:10,min:0,precision:1}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",tooltip:"%{BKY_CONTROLS_REPEAT_TOOLTIP}",helpUrl:"%{BKY_CONTROLS_REPEAT_HELPURL}"},{type:"controls_whileUntil",message0:"%1 %2",args0:[{type:"field_dropdown",name:"MODE",options:[["%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_WHILE}","WHILE"],["%{BKY_CONTROLS_WHILEUNTIL_OPERATOR_UNTIL}","UNTIL"]]},{type:"input_value",
2557
2558
  name:"BOOL",check:"Boolean"}],message1:"%{BKY_CONTROLS_REPEAT_INPUT_DO} %1",args1:[{type:"input_statement",name:"DO"}],previousStatement:null,nextStatement:null,style:"loop_blocks",helpUrl:"%{BKY_CONTROLS_WHILEUNTIL_HELPURL}",extensions:["controls_whileUntil_tooltip"]},{type:"controls_for",message0:"%{BKY_CONTROLS_FOR_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:null},{type:"input_value",name:"FROM",check:"Number",align:"RIGHT"},{type:"input_value",name:"TO",check:"Number",align:"RIGHT"},
@@ -2645,18 +2646,23 @@ return $.Blockly.blocks;
2645
2646
  }
2646
2647
  }(this, function(Blockly) {
2647
2648
  const $=Blockly.internal_;
2648
- $.Blockly.JavaScript=new $.Blockly.Generator("JavaScript");$.Blockly.JavaScript.addReservedWords("break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,in,instanceof,new,return,super,switch,this,throw,try,typeof,var,void,while,with,yield,enum,implements,interface,let,package,private,protected,public,static,await,null,true,false,arguments,"+Object.getOwnPropertyNames($.Blockly.utils.global.globalThis).join(","));
2649
- $.Blockly.JavaScript.ORDER_ATOMIC=0;$.Blockly.JavaScript.ORDER_NEW=1.1;$.Blockly.JavaScript.ORDER_MEMBER=1.2;$.Blockly.JavaScript.ORDER_FUNCTION_CALL=2;$.Blockly.JavaScript.ORDER_INCREMENT=3;$.Blockly.JavaScript.ORDER_DECREMENT=3;$.Blockly.JavaScript.ORDER_BITWISE_NOT=4.1;$.Blockly.JavaScript.ORDER_UNARY_PLUS=4.2;$.Blockly.JavaScript.ORDER_UNARY_NEGATION=4.3;$.Blockly.JavaScript.ORDER_LOGICAL_NOT=4.4;$.Blockly.JavaScript.ORDER_TYPEOF=4.5;$.Blockly.JavaScript.ORDER_VOID=4.6;
2650
- $.Blockly.JavaScript.ORDER_DELETE=4.7;$.Blockly.JavaScript.ORDER_AWAIT=4.8;$.Blockly.JavaScript.ORDER_EXPONENTIATION=5;$.Blockly.JavaScript.ORDER_MULTIPLICATION=5.1;$.Blockly.JavaScript.ORDER_DIVISION=5.2;$.Blockly.JavaScript.ORDER_MODULUS=5.3;$.Blockly.JavaScript.ORDER_SUBTRACTION=6.1;$.Blockly.JavaScript.ORDER_ADDITION=6.2;$.Blockly.JavaScript.ORDER_BITWISE_SHIFT=7;$.Blockly.JavaScript.ORDER_RELATIONAL=8;$.Blockly.JavaScript.ORDER_IN=8;$.Blockly.JavaScript.ORDER_INSTANCEOF=8;
2651
- $.Blockly.JavaScript.ORDER_EQUALITY=9;$.Blockly.JavaScript.ORDER_BITWISE_AND=10;$.Blockly.JavaScript.ORDER_BITWISE_XOR=11;$.Blockly.JavaScript.ORDER_BITWISE_OR=12;$.Blockly.JavaScript.ORDER_LOGICAL_AND=13;$.Blockly.JavaScript.ORDER_LOGICAL_OR=14;$.Blockly.JavaScript.ORDER_CONDITIONAL=15;$.Blockly.JavaScript.ORDER_ASSIGNMENT=16;$.Blockly.JavaScript.ORDER_YIELD=17;$.Blockly.JavaScript.ORDER_COMMA=18;$.Blockly.JavaScript.ORDER_NONE=99;
2652
- $.Blockly.JavaScript.ORDER_OVERRIDES=[[$.Blockly.JavaScript.ORDER_FUNCTION_CALL,$.Blockly.JavaScript.ORDER_MEMBER],[$.Blockly.JavaScript.ORDER_FUNCTION_CALL,$.Blockly.JavaScript.ORDER_FUNCTION_CALL],[$.Blockly.JavaScript.ORDER_MEMBER,$.Blockly.JavaScript.ORDER_MEMBER],[$.Blockly.JavaScript.ORDER_MEMBER,$.Blockly.JavaScript.ORDER_FUNCTION_CALL],[$.Blockly.JavaScript.ORDER_LOGICAL_NOT,$.Blockly.JavaScript.ORDER_LOGICAL_NOT],[$.Blockly.JavaScript.ORDER_MULTIPLICATION,$.Blockly.JavaScript.ORDER_MULTIPLICATION],
2653
- [$.Blockly.JavaScript.ORDER_ADDITION,$.Blockly.JavaScript.ORDER_ADDITION],[$.Blockly.JavaScript.ORDER_LOGICAL_AND,$.Blockly.JavaScript.ORDER_LOGICAL_AND],[$.Blockly.JavaScript.ORDER_LOGICAL_OR,$.Blockly.JavaScript.ORDER_LOGICAL_OR]];$.Blockly.JavaScript.isInitialized=!1;
2654
- $.Blockly.JavaScript.init=function(a){Object.getPrototypeOf(this).init.call(this);this.nameDB_?this.nameDB_.reset():this.nameDB_=new $.Blockly.Names(this.RESERVED_WORDS_);this.nameDB_.setVariableMap(a.getVariableMap());this.nameDB_.populateVariables(a);this.nameDB_.populateProcedures(a);for(var b=[],c=$.Blockly.Variables.allDeveloperVariables(a),d=0;d<c.length;d++)b.push(this.nameDB_.getName(c[d],$.Blockly.Names.DEVELOPER_VARIABLE_TYPE));a=$.Blockly.Variables.allUsedVarModels(a);for(c=0;c<a.length;c++)b.push(this.nameDB_.getName(a[c].getId(),
2655
- $.Blockly.VARIABLE_CATEGORY_NAME));b.length&&(this.definitions_.variables="var "+b.join(", ")+";");this.isInitialized=!0};$.Blockly.JavaScript.finish=function(a){var b=$.Blockly.utils.object.values(this.definitions_);a=Object.getPrototypeOf(this).finish.call(this,a);this.isInitialized=!1;this.nameDB_.reset();return b.join("\n\n")+"\n\n\n"+a};$.Blockly.JavaScript.scrubNakedValue=function(a){return a+";\n"};
2656
- $.Blockly.JavaScript.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,"\\'");return"'"+a+"'"};$.Blockly.JavaScript.multiline_quote_=function(a){return a.split(/\n/g).map(this.quote_).join(" + '\\n' +\n")};
2657
- $.Blockly.JavaScript.scrub_=function(a,b,c){var d="";if(!a.outputConnection||!a.outputConnection.targetConnection){var e=a.getCommentText();e&&(e=$.Blockly.utils.string.wrap(e,this.COMMENT_WRAP-3),d+=this.prefixLines(e+"\n","// "));for(var f=0;f<a.inputList.length;f++)a.inputList[f].type===$.Blockly.inputTypes.VALUE&&(e=a.inputList[f].connection.targetBlock())&&(e=this.allNestedComments(e))&&(d+=this.prefixLines(e,"// "))}a=a.nextConnection&&a.nextConnection.targetBlock();c=c?"":this.blockToCode(a);
2658
- return d+b+c};
2659
- $.Blockly.JavaScript.getAdjusted=function(a,b,c,d,e){c=c||0;e=e||this.ORDER_NONE;a.workspace.options.oneBasedIndex&&c--;var f=a.workspace.options.oneBasedIndex?"1":"0",g=e;if(0<c)var h=g=this.ORDER_ADDITION;else 0>c?h=g=this.ORDER_SUBTRACTION:d&&(h=g=this.ORDER_UNARY_NEGATION);a=this.valueToCode(a,b,g)||f;$.Blockly.utils.string.isNumber(a)?(a=Number(a)+c,d&&(a=-a)):(0<c?a=a+" + "+c:0>c&&(a=a+" - "+-c),d&&(a=c?"-("+a+")":"-"+a),h=Math.floor(h),e=Math.floor(e),h&&e>=h&&(a="("+a+")"));return a};var module$exports$Blockly$JavaScript$variables={};$.Blockly.JavaScript.variables_get=function(a){return[$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("VAR"),$.module$exports$Blockly$Names.NameType.VARIABLE),$.Blockly.JavaScript.ORDER_ATOMIC]};
2649
+ var module$contents$Blockly$JavaScript_JavaScript=new $.module$exports$Blockly$Generator.Generator("JavaScript");module$contents$Blockly$JavaScript_JavaScript.addReservedWords("break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,in,instanceof,new,return,super,switch,this,throw,try,typeof,var,void,while,with,yield,enum,implements,interface,let,package,private,protected,public,static,await,null,true,false,arguments,"+Object.getOwnPropertyNames($.module$exports$Blockly$utils$global.globalThis).join(","));
2650
+ module$contents$Blockly$JavaScript_JavaScript.ORDER_ATOMIC=0;module$contents$Blockly$JavaScript_JavaScript.ORDER_NEW=1.1;module$contents$Blockly$JavaScript_JavaScript.ORDER_MEMBER=1.2;module$contents$Blockly$JavaScript_JavaScript.ORDER_FUNCTION_CALL=2;module$contents$Blockly$JavaScript_JavaScript.ORDER_INCREMENT=3;module$contents$Blockly$JavaScript_JavaScript.ORDER_DECREMENT=3;module$contents$Blockly$JavaScript_JavaScript.ORDER_BITWISE_NOT=4.1;
2651
+ module$contents$Blockly$JavaScript_JavaScript.ORDER_UNARY_PLUS=4.2;module$contents$Blockly$JavaScript_JavaScript.ORDER_UNARY_NEGATION=4.3;module$contents$Blockly$JavaScript_JavaScript.ORDER_LOGICAL_NOT=4.4;module$contents$Blockly$JavaScript_JavaScript.ORDER_TYPEOF=4.5;module$contents$Blockly$JavaScript_JavaScript.ORDER_VOID=4.6;module$contents$Blockly$JavaScript_JavaScript.ORDER_DELETE=4.7;module$contents$Blockly$JavaScript_JavaScript.ORDER_AWAIT=4.8;
2652
+ module$contents$Blockly$JavaScript_JavaScript.ORDER_EXPONENTIATION=5;module$contents$Blockly$JavaScript_JavaScript.ORDER_MULTIPLICATION=5.1;module$contents$Blockly$JavaScript_JavaScript.ORDER_DIVISION=5.2;module$contents$Blockly$JavaScript_JavaScript.ORDER_MODULUS=5.3;module$contents$Blockly$JavaScript_JavaScript.ORDER_SUBTRACTION=6.1;module$contents$Blockly$JavaScript_JavaScript.ORDER_ADDITION=6.2;module$contents$Blockly$JavaScript_JavaScript.ORDER_BITWISE_SHIFT=7;
2653
+ module$contents$Blockly$JavaScript_JavaScript.ORDER_RELATIONAL=8;module$contents$Blockly$JavaScript_JavaScript.ORDER_IN=8;module$contents$Blockly$JavaScript_JavaScript.ORDER_INSTANCEOF=8;module$contents$Blockly$JavaScript_JavaScript.ORDER_EQUALITY=9;module$contents$Blockly$JavaScript_JavaScript.ORDER_BITWISE_AND=10;module$contents$Blockly$JavaScript_JavaScript.ORDER_BITWISE_XOR=11;module$contents$Blockly$JavaScript_JavaScript.ORDER_BITWISE_OR=12;
2654
+ module$contents$Blockly$JavaScript_JavaScript.ORDER_LOGICAL_AND=13;module$contents$Blockly$JavaScript_JavaScript.ORDER_LOGICAL_OR=14;module$contents$Blockly$JavaScript_JavaScript.ORDER_CONDITIONAL=15;module$contents$Blockly$JavaScript_JavaScript.ORDER_ASSIGNMENT=16;module$contents$Blockly$JavaScript_JavaScript.ORDER_YIELD=17;module$contents$Blockly$JavaScript_JavaScript.ORDER_COMMA=18;module$contents$Blockly$JavaScript_JavaScript.ORDER_NONE=99;
2655
+ module$contents$Blockly$JavaScript_JavaScript.ORDER_OVERRIDES=[[module$contents$Blockly$JavaScript_JavaScript.ORDER_FUNCTION_CALL,module$contents$Blockly$JavaScript_JavaScript.ORDER_MEMBER],[module$contents$Blockly$JavaScript_JavaScript.ORDER_FUNCTION_CALL,module$contents$Blockly$JavaScript_JavaScript.ORDER_FUNCTION_CALL],[module$contents$Blockly$JavaScript_JavaScript.ORDER_MEMBER,module$contents$Blockly$JavaScript_JavaScript.ORDER_MEMBER],[module$contents$Blockly$JavaScript_JavaScript.ORDER_MEMBER,
2656
+ module$contents$Blockly$JavaScript_JavaScript.ORDER_FUNCTION_CALL],[module$contents$Blockly$JavaScript_JavaScript.ORDER_LOGICAL_NOT,module$contents$Blockly$JavaScript_JavaScript.ORDER_LOGICAL_NOT],[module$contents$Blockly$JavaScript_JavaScript.ORDER_MULTIPLICATION,module$contents$Blockly$JavaScript_JavaScript.ORDER_MULTIPLICATION],[module$contents$Blockly$JavaScript_JavaScript.ORDER_ADDITION,module$contents$Blockly$JavaScript_JavaScript.ORDER_ADDITION],[module$contents$Blockly$JavaScript_JavaScript.ORDER_LOGICAL_AND,
2657
+ module$contents$Blockly$JavaScript_JavaScript.ORDER_LOGICAL_AND],[module$contents$Blockly$JavaScript_JavaScript.ORDER_LOGICAL_OR,module$contents$Blockly$JavaScript_JavaScript.ORDER_LOGICAL_OR]];module$contents$Blockly$JavaScript_JavaScript.isInitialized=!1;
2658
+ module$contents$Blockly$JavaScript_JavaScript.init=function(a){Object.getPrototypeOf(this).init.call(this);this.nameDB_?this.nameDB_.reset():this.nameDB_=new $.module$exports$Blockly$Names.Names(this.RESERVED_WORDS_);this.nameDB_.setVariableMap(a.getVariableMap());this.nameDB_.populateVariables(a);this.nameDB_.populateProcedures(a);for(var b=[],c=(0,$.module$exports$Blockly$Variables.allDeveloperVariables)(a),d=0;d<c.length;d++)b.push(this.nameDB_.getName(c[d],$.module$exports$Blockly$Names.NameType.DEVELOPER_VARIABLE));
2659
+ a=(0,$.module$exports$Blockly$Variables.allUsedVarModels)(a);for(c=0;c<a.length;c++)b.push(this.nameDB_.getName(a[c].getId(),$.module$exports$Blockly$Names.NameType.VARIABLE));b.length&&(this.definitions_.variables="var "+b.join(", ")+";");this.isInitialized=!0};
2660
+ module$contents$Blockly$JavaScript_JavaScript.finish=function(a){var b=(0,$.module$exports$Blockly$utils$object.values)(this.definitions_);a=Object.getPrototypeOf(this).finish.call(this,a);this.isInitialized=!1;this.nameDB_.reset();return b.join("\n\n")+"\n\n\n"+a};module$contents$Blockly$JavaScript_JavaScript.scrubNakedValue=function(a){return a+";\n"};
2661
+ module$contents$Blockly$JavaScript_JavaScript.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,"\\'");return"'"+a+"'"};module$contents$Blockly$JavaScript_JavaScript.multiline_quote_=function(a){return a.split(/\n/g).map(this.quote_).join(" + '\\n' +\n")};
2662
+ module$contents$Blockly$JavaScript_JavaScript.scrub_=function(a,b,c){var d="";if(!a.outputConnection||!a.outputConnection.targetConnection){var e=a.getCommentText();e&&(e=(0,$.module$exports$Blockly$utils$string.wrap)(e,this.COMMENT_WRAP-3),d+=this.prefixLines(e+"\n","// "));for(var f=0;f<a.inputList.length;f++)a.inputList[f].type===$.module$exports$Blockly$inputTypes.inputTypes.VALUE&&(e=a.inputList[f].connection.targetBlock())&&(e=this.allNestedComments(e))&&(d+=this.prefixLines(e,"// "))}a=a.nextConnection&&
2663
+ a.nextConnection.targetBlock();c=c?"":this.blockToCode(a);return d+b+c};
2664
+ module$contents$Blockly$JavaScript_JavaScript.getAdjusted=function(a,b,c,d,e){c=c||0;e=e||this.ORDER_NONE;a.workspace.options.oneBasedIndex&&c--;var f=a.workspace.options.oneBasedIndex?"1":"0",g=e;if(0<c)var h=g=this.ORDER_ADDITION;else 0>c?h=g=this.ORDER_SUBTRACTION:d&&(h=g=this.ORDER_UNARY_NEGATION);a=this.valueToCode(a,b,g)||f;(0,$.module$exports$Blockly$utils$string.isNumber)(a)?(a=Number(a)+c,d&&(a=-a)):(0<c?a=a+" + "+c:0>c&&(a=a+" - "+-c),d&&(a=c?"-("+a+")":"-"+a),h=Math.floor(h),e=Math.floor(e),
2665
+ h&&e>=h&&(a="("+a+")"));return a};$.Blockly.JavaScript=module$contents$Blockly$JavaScript_JavaScript;var module$exports$Blockly$JavaScript$variables={};$.Blockly.JavaScript.variables_get=function(a){return[$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("VAR"),$.module$exports$Blockly$Names.NameType.VARIABLE),$.Blockly.JavaScript.ORDER_ATOMIC]};
2660
2666
  $.Blockly.JavaScript.variables_set=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"VALUE",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"0";return $.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("VAR"),$.module$exports$Blockly$Names.NameType.VARIABLE)+" = "+b+";\n"};var module$exports$Blockly$JavaScript$variablesDynamic={};$.Blockly.JavaScript.variables_get_dynamic=$.Blockly.JavaScript.variables_get;$.Blockly.JavaScript.variables_set_dynamic=$.Blockly.JavaScript.variables_set;var module$exports$Blockly$JavaScript$texts={},module$contents$Blockly$JavaScript$texts_strRegExp=/^\s*'([^']|\\')*'\s*$/,module$contents$Blockly$JavaScript$texts_forceString=function(a){return module$contents$Blockly$JavaScript$texts_strRegExp.test(a)?[a,$.Blockly.JavaScript.ORDER_ATOMIC]:["String("+a+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]},module$contents$Blockly$JavaScript$texts_getSubstringIndex=function(a,b,c){return"FIRST"===b?"0":"FROM_END"===b?a+".length - 1 - "+c:"LAST"===b?a+".length - 1":
2661
2667
  c};$.Blockly.JavaScript.text=function(a){return[$.Blockly.JavaScript.quote_(a.getFieldValue("TEXT")),$.Blockly.JavaScript.ORDER_ATOMIC]};$.Blockly.JavaScript.text_multiline=function(a){a=$.Blockly.JavaScript.multiline_quote_(a.getFieldValue("TEXT"));var b=-1!==a.indexOf("+")?$.Blockly.JavaScript.ORDER_ADDITION:$.Blockly.JavaScript.ORDER_ATOMIC;return[a,b]};
2662
2668
  $.Blockly.JavaScript.text_join=function(a){switch(a.itemCount_){case 0:return["''",$.Blockly.JavaScript.ORDER_ATOMIC];case 1:return a=$.Blockly.JavaScript.valueToCode(a,"ADD0",$.Blockly.JavaScript.ORDER_NONE)||"''",module$contents$Blockly$JavaScript$texts_forceString(a);case 2:var b=$.Blockly.JavaScript.valueToCode(a,"ADD0",$.Blockly.JavaScript.ORDER_NONE)||"''";a=$.Blockly.JavaScript.valueToCode(a,"ADD1",$.Blockly.JavaScript.ORDER_NONE)||"''";return[module$contents$Blockly$JavaScript$texts_forceString(b)[0]+
@@ -2677,13 +2683,13 @@ $.Blockly.JavaScript.text_prompt=$.Blockly.JavaScript.text_prompt_ext;
2677
2683
  $.Blockly.JavaScript.text_count=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"TEXT",$.Blockly.JavaScript.ORDER_NONE)||"''";a=$.Blockly.JavaScript.valueToCode(a,"SUB",$.Blockly.JavaScript.ORDER_NONE)||"''";return[$.Blockly.JavaScript.provideFunction_("textCount",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(haystack, needle) {"," if (needle.length === 0) {"," return haystack.length + 1;"," } else {"," return haystack.split(needle).length - 1;"," }","}"])+"("+b+", "+
2678
2684
  a+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2679
2685
  $.Blockly.JavaScript.text_replace=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"TEXT",$.Blockly.JavaScript.ORDER_NONE)||"''",c=$.Blockly.JavaScript.valueToCode(a,"FROM",$.Blockly.JavaScript.ORDER_NONE)||"''";a=$.Blockly.JavaScript.valueToCode(a,"TO",$.Blockly.JavaScript.ORDER_NONE)||"''";return[$.Blockly.JavaScript.provideFunction_("textReplace",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(haystack, needle, replacement) {",' needle = needle.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g,"\\\\$1")',
2680
- ' .replace(/\\x08/g,"\\\\x08");'," return haystack.replace(new RegExp(needle, 'g'), replacement);","}"])+"("+b+", "+c+", "+a+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.text_reverse=function(a){return[($.Blockly.JavaScript.valueToCode(a,"TEXT",$.Blockly.JavaScript.ORDER_MEMBER)||"''")+".split('').reverse().join('')",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.procedures={};
2681
- $.Blockly.JavaScript.procedures_defreturn=function(a){var b=$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("NAME"),$.Blockly.PROCEDURE_CATEGORY_NAME),c="";$.Blockly.JavaScript.STATEMENT_PREFIX&&(c+=$.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_PREFIX,a));$.Blockly.JavaScript.STATEMENT_SUFFIX&&(c+=$.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_SUFFIX,a));c&&(c=$.Blockly.JavaScript.prefixLines(c,$.Blockly.JavaScript.INDENT));var d="";$.Blockly.JavaScript.INFINITE_LOOP_TRAP&&
2682
- (d=$.Blockly.JavaScript.prefixLines($.Blockly.JavaScript.injectId($.Blockly.JavaScript.INFINITE_LOOP_TRAP,a),$.Blockly.JavaScript.INDENT));var e=$.Blockly.JavaScript.statementToCode(a,"STACK"),f=$.Blockly.JavaScript.valueToCode(a,"RETURN",$.Blockly.JavaScript.ORDER_NONE)||"",g="";e&&f&&(g=c);f&&(f=$.Blockly.JavaScript.INDENT+"return "+f+";\n");for(var h=[],k=a.getVars(),l=0;l<k.length;l++)h[l]=$.Blockly.JavaScript.nameDB_.getName(k[l],$.Blockly.VARIABLE_CATEGORY_NAME);c="function "+b+"("+h.join(", ")+
2683
- ") {\n"+c+d+e+g+f+"}";c=$.Blockly.JavaScript.scrub_(a,c);$.Blockly.JavaScript.definitions_["%"+b]=c;return null};$.Blockly.JavaScript.procedures_defnoreturn=$.Blockly.JavaScript.procedures_defreturn;
2684
- $.Blockly.JavaScript.procedures_callreturn=function(a){for(var b=$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("NAME"),$.Blockly.PROCEDURE_CATEGORY_NAME),c=[],d=a.getVars(),e=0;e<d.length;e++)c[e]=$.Blockly.JavaScript.valueToCode(a,"ARG"+e,$.Blockly.JavaScript.ORDER_NONE)||"null";return[b+"("+c.join(", ")+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.procedures_callnoreturn=function(a){return $.Blockly.JavaScript.procedures_callreturn(a)[0]+";\n"};
2686
+ ' .replace(/\\x08/g,"\\\\x08");'," return haystack.replace(new RegExp(needle, 'g'), replacement);","}"])+"("+b+", "+c+", "+a+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.text_reverse=function(a){return[($.Blockly.JavaScript.valueToCode(a,"TEXT",$.Blockly.JavaScript.ORDER_MEMBER)||"''")+".split('').reverse().join('')",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};var module$exports$Blockly$JavaScript$procedures={};
2687
+ $.Blockly.JavaScript.procedures_defreturn=function(a){var b=$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("NAME"),$.module$exports$Blockly$Names.NameType.PROCEDURE),c="";$.Blockly.JavaScript.STATEMENT_PREFIX&&(c+=$.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_PREFIX,a));$.Blockly.JavaScript.STATEMENT_SUFFIX&&(c+=$.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_SUFFIX,a));c&&(c=$.Blockly.JavaScript.prefixLines(c,$.Blockly.JavaScript.INDENT));var d="";$.Blockly.JavaScript.INFINITE_LOOP_TRAP&&
2688
+ (d=$.Blockly.JavaScript.prefixLines($.Blockly.JavaScript.injectId($.Blockly.JavaScript.INFINITE_LOOP_TRAP,a),$.Blockly.JavaScript.INDENT));var e=$.Blockly.JavaScript.statementToCode(a,"STACK"),f=$.Blockly.JavaScript.valueToCode(a,"RETURN",$.Blockly.JavaScript.ORDER_NONE)||"",g="";e&&f&&(g=c);f&&(f=$.Blockly.JavaScript.INDENT+"return "+f+";\n");for(var h=[],k=a.getVars(),l=0;l<k.length;l++)h[l]=$.Blockly.JavaScript.nameDB_.getName(k[l],$.module$exports$Blockly$Names.NameType.VARIABLE);c="function "+
2689
+ b+"("+h.join(", ")+") {\n"+c+d+e+g+f+"}";c=$.Blockly.JavaScript.scrub_(a,c);$.Blockly.JavaScript.definitions_["%"+b]=c;return null};$.Blockly.JavaScript.procedures_defnoreturn=$.Blockly.JavaScript.procedures_defreturn;
2690
+ $.Blockly.JavaScript.procedures_callreturn=function(a){for(var b=$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("NAME"),$.module$exports$Blockly$Names.NameType.PROCEDURE),c=[],d=a.getVars(),e=0;e<d.length;e++)c[e]=$.Blockly.JavaScript.valueToCode(a,"ARG"+e,$.Blockly.JavaScript.ORDER_NONE)||"null";return[b+"("+c.join(", ")+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.procedures_callnoreturn=function(a){return $.Blockly.JavaScript.procedures_callreturn(a)[0]+";\n"};
2685
2691
  $.Blockly.JavaScript.procedures_ifreturn=function(a){var b="if ("+($.Blockly.JavaScript.valueToCode(a,"CONDITION",$.Blockly.JavaScript.ORDER_NONE)||"false")+") {\n";$.Blockly.JavaScript.STATEMENT_SUFFIX&&(b+=$.Blockly.JavaScript.prefixLines($.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_SUFFIX,a),$.Blockly.JavaScript.INDENT));a.hasReturnValue_?(a=$.Blockly.JavaScript.valueToCode(a,"VALUE",$.Blockly.JavaScript.ORDER_NONE)||"null",b+=$.Blockly.JavaScript.INDENT+"return "+a+";\n"):b+=$.Blockly.JavaScript.INDENT+
2686
- "return;\n";return b+"}\n"};$.Blockly.JavaScript.math={};$.Blockly.JavaScript.math_number=function(a){a=Number(a.getFieldValue("NUM"));return[a,0<=a?$.Blockly.JavaScript.ORDER_ATOMIC:$.Blockly.JavaScript.ORDER_UNARY_NEGATION]};
2692
+ "return;\n";return b+"}\n"};var module$exports$Blockly$JavaScript$math={};$.Blockly.JavaScript.math_number=function(a){a=Number(a.getFieldValue("NUM"));return[a,0<=a?$.Blockly.JavaScript.ORDER_ATOMIC:$.Blockly.JavaScript.ORDER_UNARY_NEGATION]};
2687
2693
  $.Blockly.JavaScript.math_arithmetic=function(a){var b={ADD:[" + ",$.Blockly.JavaScript.ORDER_ADDITION],MINUS:[" - ",$.Blockly.JavaScript.ORDER_SUBTRACTION],MULTIPLY:[" * ",$.Blockly.JavaScript.ORDER_MULTIPLICATION],DIVIDE:[" / ",$.Blockly.JavaScript.ORDER_DIVISION],POWER:[null,$.Blockly.JavaScript.ORDER_NONE]}[a.getFieldValue("OP")],c=b[0];b=b[1];var d=$.Blockly.JavaScript.valueToCode(a,"A",b)||"0";a=$.Blockly.JavaScript.valueToCode(a,"B",b)||"0";return c?[d+c+a,b]:["Math.pow("+d+", "+a+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2688
2694
  $.Blockly.JavaScript.math_single=function(a){var b=a.getFieldValue("OP");if("NEG"===b)return a=$.Blockly.JavaScript.valueToCode(a,"NUM",$.Blockly.JavaScript.ORDER_UNARY_NEGATION)||"0","-"===a[0]&&(a=" "+a),["-"+a,$.Blockly.JavaScript.ORDER_UNARY_NEGATION];a="SIN"===b||"COS"===b||"TAN"===b?$.Blockly.JavaScript.valueToCode(a,"NUM",$.Blockly.JavaScript.ORDER_DIVISION)||"0":$.Blockly.JavaScript.valueToCode(a,"NUM",$.Blockly.JavaScript.ORDER_NONE)||"0";switch(b){case "ABS":var c="Math.abs("+a+")";break;
2689
2695
  case "ROOT":c="Math.sqrt("+a+")";break;case "LN":c="Math.log("+a+")";break;case "EXP":c="Math.exp("+a+")";break;case "POW10":c="Math.pow(10,"+a+")";break;case "ROUND":c="Math.round("+a+")";break;case "ROUNDUP":c="Math.ceil("+a+")";break;case "ROUNDDOWN":c="Math.floor("+a+")";break;case "SIN":c="Math.sin("+a+" / 180 * Math.PI)";break;case "COS":c="Math.cos("+a+" / 180 * Math.PI)";break;case "TAN":c="Math.tan("+a+" / 180 * Math.PI)"}if(c)return[c,$.Blockly.JavaScript.ORDER_FUNCTION_CALL];switch(b){case "LOG10":c=
@@ -2692,7 +2698,7 @@ $.Blockly.JavaScript.math_constant=function(a){return{PI:["Math.PI",$.Blockly.Ja
2692
2698
  $.Blockly.JavaScript.math_number_property=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"NUMBER_TO_CHECK",$.Blockly.JavaScript.ORDER_MODULUS)||"0",c=a.getFieldValue("PROPERTY");if("PRIME"===c)return[$.Blockly.JavaScript.provideFunction_("mathIsPrime",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(n) {"," // https://en.wikipedia.org/wiki/Primality_test#Naive_methods"," if (n == 2 || n == 3) {"," return true;"," }"," // False if n is NaN, negative, is 1, or not whole.",
2693
2699
  " // And false if n is divisible by 2 or 3."," if (isNaN(n) || n <= 1 || n % 1 !== 0 || n % 2 === 0 || n % 3 === 0) {"," return false;"," }"," // Check all the numbers of form 6k +/- 1, up to sqrt(n)."," for (var x = 6; x <= Math.sqrt(n) + 1; x += 6) {"," if (n % (x - 1) === 0 || n % (x + 1) === 0) {"," return false;"," }"," }"," return true;","}"])+"("+b+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL];switch(c){case "EVEN":var d=b+" % 2 === 0";break;case "ODD":d=b+" % 2 === 1";
2694
2700
  break;case "WHOLE":d=b+" % 1 === 0";break;case "POSITIVE":d=b+" > 0";break;case "NEGATIVE":d=b+" < 0";break;case "DIVISIBLE_BY":a=$.Blockly.JavaScript.valueToCode(a,"DIVISOR",$.Blockly.JavaScript.ORDER_MODULUS)||"0",d=b+" % "+a+" === 0"}return[d,$.Blockly.JavaScript.ORDER_EQUALITY]};
2695
- $.Blockly.JavaScript.math_change=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"DELTA",$.Blockly.JavaScript.ORDER_ADDITION)||"0";a=$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("VAR"),$.Blockly.VARIABLE_CATEGORY_NAME);return a+" = (typeof "+a+" === 'number' ? "+a+" : 0) + "+b+";\n"};$.Blockly.JavaScript.math_round=$.Blockly.JavaScript.math_single;$.Blockly.JavaScript.math_trig=$.Blockly.JavaScript.math_single;
2701
+ $.Blockly.JavaScript.math_change=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"DELTA",$.Blockly.JavaScript.ORDER_ADDITION)||"0";a=$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("VAR"),$.module$exports$Blockly$Names.NameType.VARIABLE);return a+" = (typeof "+a+" === 'number' ? "+a+" : 0) + "+b+";\n"};$.Blockly.JavaScript.math_round=$.Blockly.JavaScript.math_single;$.Blockly.JavaScript.math_trig=$.Blockly.JavaScript.math_single;
2696
2702
  $.Blockly.JavaScript.math_on_list=function(a){var b=a.getFieldValue("OP");switch(b){case "SUM":a=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_MEMBER)||"[]";a+=".reduce(function(x, y) {return x + y;})";break;case "MIN":a=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_NONE)||"[]";a="Math.min.apply(null, "+a+")";break;case "MAX":a=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_NONE)||"[]";a="Math.max.apply(null, "+a+")";break;case "AVERAGE":b=
2697
2703
  $.Blockly.JavaScript.provideFunction_("mathMean",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(myList) {"," return myList.reduce(function(x, y) {return x + y;}) / myList.length;","}"]);a=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_NONE)||"[]";a=b+"("+a+")";break;case "MEDIAN":b=$.Blockly.JavaScript.provideFunction_("mathMedian",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(myList) {"," var localList = myList.filter(function (x) {return typeof x === 'number';});",
2698
2704
  " if (!localList.length) return null;"," localList.sort(function(a, b) {return b - a;});"," if (localList.length % 2 === 0) {"," return (localList[localList.length / 2 - 1] + localList[localList.length / 2]) / 2;"," } else {"," return localList[(localList.length - 1) / 2];"," }","}"]);a=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_NONE)||"[]";a=b+"("+a+")";break;case "MODE":b=$.Blockly.JavaScript.provideFunction_("mathModes",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+
@@ -2702,23 +2708,24 @@ $.Blockly.JavaScript.provideFunction_("mathMean",["function "+$.Blockly.JavaScri
2702
2708
  a=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_NONE)||"[]";a=b+"("+a+")";break;default:throw Error("Unknown operator: "+b);}return[a,$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.math_modulo=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"DIVIDEND",$.Blockly.JavaScript.ORDER_MODULUS)||"0";a=$.Blockly.JavaScript.valueToCode(a,"DIVISOR",$.Blockly.JavaScript.ORDER_MODULUS)||"0";return[b+" % "+a,$.Blockly.JavaScript.ORDER_MODULUS]};
2703
2709
  $.Blockly.JavaScript.math_constrain=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"VALUE",$.Blockly.JavaScript.ORDER_NONE)||"0",c=$.Blockly.JavaScript.valueToCode(a,"LOW",$.Blockly.JavaScript.ORDER_NONE)||"0";a=$.Blockly.JavaScript.valueToCode(a,"HIGH",$.Blockly.JavaScript.ORDER_NONE)||"Infinity";return["Math.min(Math.max("+b+", "+c+"), "+a+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2704
2710
  $.Blockly.JavaScript.math_random_int=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"FROM",$.Blockly.JavaScript.ORDER_NONE)||"0";a=$.Blockly.JavaScript.valueToCode(a,"TO",$.Blockly.JavaScript.ORDER_NONE)||"0";return[$.Blockly.JavaScript.provideFunction_("mathRandomInt",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(a, b) {"," if (a > b) {"," // Swap a and b to ensure a is smaller."," var c = a;"," a = b;"," b = c;"," }"," return Math.floor(Math.random() * (b - a + 1) + a);",
2705
- "}"])+"("+b+", "+a+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.math_random_float=function(a){return["Math.random()",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.math_atan2=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"X",$.Blockly.JavaScript.ORDER_NONE)||"0";return["Math.atan2("+($.Blockly.JavaScript.valueToCode(a,"Y",$.Blockly.JavaScript.ORDER_NONE)||"0")+", "+b+") / Math.PI * 180",$.Blockly.JavaScript.ORDER_DIVISION]};$.Blockly.JavaScript.loops={};
2706
- $.Blockly.JavaScript.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):$.Blockly.JavaScript.valueToCode(a,"TIMES",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"0";var c=$.Blockly.JavaScript.statementToCode(a,"DO");c=$.Blockly.JavaScript.addLoopTrap(c,a);a="";var d=$.Blockly.JavaScript.nameDB_.getDistinctName("count",$.Blockly.VARIABLE_CATEGORY_NAME),e=b;b.match(/^\w+$/)||$.Blockly.utils.string.isNumber(b)||(e=$.Blockly.JavaScript.nameDB_.getDistinctName("repeat_end",$.Blockly.VARIABLE_CATEGORY_NAME),
2707
- a+="var "+e+" = "+b+";\n");return a+("for (var "+d+" = 0; "+d+" < "+e+"; "+d+"++) {\n"+c+"}\n")};$.Blockly.JavaScript.controls_repeat=$.Blockly.JavaScript.controls_repeat_ext;
2711
+ "}"])+"("+b+", "+a+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.math_random_float=function(a){return["Math.random()",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.math_atan2=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"X",$.Blockly.JavaScript.ORDER_NONE)||"0";return["Math.atan2("+($.Blockly.JavaScript.valueToCode(a,"Y",$.Blockly.JavaScript.ORDER_NONE)||"0")+", "+b+") / Math.PI * 180",$.Blockly.JavaScript.ORDER_DIVISION]};var module$exports$Blockly$JavaScript$loops={};
2712
+ $.Blockly.JavaScript.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):$.Blockly.JavaScript.valueToCode(a,"TIMES",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"0";var c=$.Blockly.JavaScript.statementToCode(a,"DO");c=$.Blockly.JavaScript.addLoopTrap(c,a);a="";var d=$.Blockly.JavaScript.nameDB_.getDistinctName("count",$.module$exports$Blockly$Names.NameType.VARIABLE),e=b;b.match(/^\w+$/)||(0,$.module$exports$Blockly$utils$string.isNumber)(b)||(e=$.Blockly.JavaScript.nameDB_.getDistinctName("repeat_end",
2713
+ $.module$exports$Blockly$Names.NameType.VARIABLE),a+="var "+e+" = "+b+";\n");return a+("for (var "+d+" = 0; "+d+" < "+e+"; "+d+"++) {\n"+c+"}\n")};$.Blockly.JavaScript.controls_repeat=$.Blockly.JavaScript.controls_repeat_ext;
2708
2714
  $.Blockly.JavaScript.controls_whileUntil=function(a){var b="UNTIL"===a.getFieldValue("MODE"),c=$.Blockly.JavaScript.valueToCode(a,"BOOL",b?$.Blockly.JavaScript.ORDER_LOGICAL_NOT:$.Blockly.JavaScript.ORDER_NONE)||"false",d=$.Blockly.JavaScript.statementToCode(a,"DO");d=$.Blockly.JavaScript.addLoopTrap(d,a);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"};
2709
- $.Blockly.JavaScript.controls_for=function(a){var b=$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("VAR"),$.Blockly.VARIABLE_CATEGORY_NAME),c=$.Blockly.JavaScript.valueToCode(a,"FROM",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",d=$.Blockly.JavaScript.valueToCode(a,"TO",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",e=$.Blockly.JavaScript.valueToCode(a,"BY",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"1",f=$.Blockly.JavaScript.statementToCode(a,"DO");f=$.Blockly.JavaScript.addLoopTrap(f,a);if($.Blockly.utils.string.isNumber(c)&&
2710
- $.Blockly.utils.string.isNumber(d)&&$.Blockly.utils.string.isNumber(e)){var g=Number(c)<=Number(d);a="for ("+b+" = "+c+"; "+b+(g?" <= ":" >= ")+d+"; "+b;b=Math.abs(Number(e));a=(1===b?a+(g?"++":"--"):a+((g?" += ":" -= ")+b))+(") {\n"+f+"}\n")}else a="",g=c,c.match(/^\w+$/)||$.Blockly.utils.string.isNumber(c)||(g=$.Blockly.JavaScript.nameDB_.getDistinctName(b+"_start",$.Blockly.VARIABLE_CATEGORY_NAME),a+="var "+g+" = "+c+";\n"),c=d,d.match(/^\w+$/)||$.Blockly.utils.string.isNumber(d)||(c=$.Blockly.JavaScript.nameDB_.getDistinctName(b+
2711
- "_end",$.Blockly.VARIABLE_CATEGORY_NAME),a+="var "+c+" = "+d+";\n"),d=$.Blockly.JavaScript.nameDB_.getDistinctName(b+"_inc",$.Blockly.VARIABLE_CATEGORY_NAME),a+="var "+d+" = ",a=$.Blockly.utils.string.isNumber(e)?a+(Math.abs(e)+";\n"):a+("Math.abs("+e+");\n"),a=a+("if ("+g+" > "+c+") {\n")+($.Blockly.JavaScript.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+g+"; "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+"; "+b+" += "+d+") {\n"+f+"}\n";return a};
2712
- $.Blockly.JavaScript.controls_forEach=function(a){var b=$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("VAR"),$.Blockly.VARIABLE_CATEGORY_NAME),c=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"[]",d=$.Blockly.JavaScript.statementToCode(a,"DO");d=$.Blockly.JavaScript.addLoopTrap(d,a);a="";var e=c;c.match(/^\w+$/)||(e=$.Blockly.JavaScript.nameDB_.getDistinctName(b+"_list",$.Blockly.VARIABLE_CATEGORY_NAME),a+="var "+e+" = "+c+";\n");c=$.Blockly.JavaScript.nameDB_.getDistinctName(b+
2713
- "_index",$.Blockly.VARIABLE_CATEGORY_NAME);d=$.Blockly.JavaScript.INDENT+b+" = "+e+"["+c+"];\n"+d;return a+("for (var "+c+" in "+e+") {\n"+d+"}\n")};
2715
+ $.Blockly.JavaScript.controls_for=function(a){var b=$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("VAR"),$.module$exports$Blockly$Names.NameType.VARIABLE),c=$.Blockly.JavaScript.valueToCode(a,"FROM",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",d=$.Blockly.JavaScript.valueToCode(a,"TO",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",e=$.Blockly.JavaScript.valueToCode(a,"BY",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"1",f=$.Blockly.JavaScript.statementToCode(a,"DO");f=$.Blockly.JavaScript.addLoopTrap(f,
2716
+ a);if((0,$.module$exports$Blockly$utils$string.isNumber)(c)&&(0,$.module$exports$Blockly$utils$string.isNumber)(d)&&(0,$.module$exports$Blockly$utils$string.isNumber)(e)){var g=Number(c)<=Number(d);a="for ("+b+" = "+c+"; "+b+(g?" <= ":" >= ")+d+"; "+b;b=Math.abs(Number(e));a=(1===b?a+(g?"++":"--"):a+((g?" += ":" -= ")+b))+(") {\n"+f+"}\n")}else a="",g=c,c.match(/^\w+$/)||(0,$.module$exports$Blockly$utils$string.isNumber)(c)||(g=$.Blockly.JavaScript.nameDB_.getDistinctName(b+"_start",$.module$exports$Blockly$Names.NameType.VARIABLE),
2717
+ a+="var "+g+" = "+c+";\n"),c=d,d.match(/^\w+$/)||(0,$.module$exports$Blockly$utils$string.isNumber)(d)||(c=$.Blockly.JavaScript.nameDB_.getDistinctName(b+"_end",$.module$exports$Blockly$Names.NameType.VARIABLE),a+="var "+c+" = "+d+";\n"),d=$.Blockly.JavaScript.nameDB_.getDistinctName(b+"_inc",$.module$exports$Blockly$Names.NameType.VARIABLE),a+="var "+d+" = ",a=(0,$.module$exports$Blockly$utils$string.isNumber)(e)?a+(Math.abs(e)+";\n"):a+("Math.abs("+e+");\n"),a=a+("if ("+g+" > "+c+") {\n")+($.Blockly.JavaScript.INDENT+
2718
+ d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+g+"; "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+"; "+b+" += "+d+") {\n"+f+"}\n";return a};
2719
+ $.Blockly.JavaScript.controls_forEach=function(a){var b=$.Blockly.JavaScript.nameDB_.getName(a.getFieldValue("VAR"),$.module$exports$Blockly$Names.NameType.VARIABLE),c=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"[]",d=$.Blockly.JavaScript.statementToCode(a,"DO");d=$.Blockly.JavaScript.addLoopTrap(d,a);a="";var e=c;c.match(/^\w+$/)||(e=$.Blockly.JavaScript.nameDB_.getDistinctName(b+"_list",$.module$exports$Blockly$Names.NameType.VARIABLE),a+="var "+e+" = "+c+
2720
+ ";\n");c=$.Blockly.JavaScript.nameDB_.getDistinctName(b+"_index",$.module$exports$Blockly$Names.NameType.VARIABLE);d=$.Blockly.JavaScript.INDENT+b+" = "+e+"["+c+"];\n"+d;return a+("for (var "+c+" in "+e+") {\n"+d+"}\n")};
2714
2721
  $.Blockly.JavaScript.controls_flow_statements=function(a){var b="";$.Blockly.JavaScript.STATEMENT_PREFIX&&(b+=$.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_PREFIX,a));$.Blockly.JavaScript.STATEMENT_SUFFIX&&(b+=$.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_SUFFIX,a));if($.Blockly.JavaScript.STATEMENT_PREFIX){var c=a.getSurroundLoop();c&&!c.suppressPrefixSuffix&&(b+=$.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_PREFIX,c))}switch(a.getFieldValue("FLOW")){case "BREAK":return b+
2715
- "break;\n";case "CONTINUE":return b+"continue;\n"}throw Error("Unknown flow statement.");};$.Blockly.JavaScript.logic={};
2722
+ "break;\n";case "CONTINUE":return b+"continue;\n"}throw Error("Unknown flow statement.");};var module$exports$Blockly$JavaScript$logic={};
2716
2723
  $.Blockly.JavaScript.controls_if=function(a){var b=0,c="";$.Blockly.JavaScript.STATEMENT_PREFIX&&(c+=$.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_PREFIX,a));do{var d=$.Blockly.JavaScript.valueToCode(a,"IF"+b,$.Blockly.JavaScript.ORDER_NONE)||"false",e=$.Blockly.JavaScript.statementToCode(a,"DO"+b);$.Blockly.JavaScript.STATEMENT_SUFFIX&&(e=$.Blockly.JavaScript.prefixLines($.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_SUFFIX,a),$.Blockly.JavaScript.INDENT)+e);c+=(0<b?
2717
2724
  " else ":"")+"if ("+d+") {\n"+e+"}";b++}while(a.getInput("IF"+b));if(a.getInput("ELSE")||$.Blockly.JavaScript.STATEMENT_SUFFIX)b=$.Blockly.JavaScript.statementToCode(a,"ELSE"),$.Blockly.JavaScript.STATEMENT_SUFFIX&&(b=$.Blockly.JavaScript.prefixLines($.Blockly.JavaScript.injectId($.Blockly.JavaScript.STATEMENT_SUFFIX,a),$.Blockly.JavaScript.INDENT)+b),c+=" else {\n"+b+"}";return c+"\n"};$.Blockly.JavaScript.controls_ifelse=$.Blockly.JavaScript.controls_if;
2718
2725
  $.Blockly.JavaScript.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE:"<=",GT:">",GTE:">="}[a.getFieldValue("OP")],c="=="===b||"!="===b?$.Blockly.JavaScript.ORDER_EQUALITY:$.Blockly.JavaScript.ORDER_RELATIONAL,d=$.Blockly.JavaScript.valueToCode(a,"A",c)||"0";a=$.Blockly.JavaScript.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]};
2719
2726
  $.Blockly.JavaScript.logic_operation=function(a){var b="AND"===a.getFieldValue("OP")?"&&":"||",c="&&"===b?$.Blockly.JavaScript.ORDER_LOGICAL_AND:$.Blockly.JavaScript.ORDER_LOGICAL_OR,d=$.Blockly.JavaScript.valueToCode(a,"A",c);a=$.Blockly.JavaScript.valueToCode(a,"B",c);if(d||a){var e="&&"===b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+" "+b+" "+a,c]};
2720
2727
  $.Blockly.JavaScript.logic_negate=function(a){var b=$.Blockly.JavaScript.ORDER_LOGICAL_NOT;return["!"+($.Blockly.JavaScript.valueToCode(a,"BOOL",b)||"true"),b]};$.Blockly.JavaScript.logic_boolean=function(a){return["TRUE"===a.getFieldValue("BOOL")?"true":"false",$.Blockly.JavaScript.ORDER_ATOMIC]};$.Blockly.JavaScript.logic_null=function(a){return["null",$.Blockly.JavaScript.ORDER_ATOMIC]};
2721
- $.Blockly.JavaScript.logic_ternary=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"IF",$.Blockly.JavaScript.ORDER_CONDITIONAL)||"false",c=$.Blockly.JavaScript.valueToCode(a,"THEN",$.Blockly.JavaScript.ORDER_CONDITIONAL)||"null";a=$.Blockly.JavaScript.valueToCode(a,"ELSE",$.Blockly.JavaScript.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,$.Blockly.JavaScript.ORDER_CONDITIONAL]};$.Blockly.JavaScript.lists={};$.Blockly.JavaScript.lists_create_empty=function(a){return["[]",$.Blockly.JavaScript.ORDER_ATOMIC]};$.Blockly.JavaScript.lists_create_with=function(a){for(var b=Array(a.itemCount_),c=0;c<a.itemCount_;c++)b[c]=$.Blockly.JavaScript.valueToCode(a,"ADD"+c,$.Blockly.JavaScript.ORDER_NONE)||"null";return["["+b.join(", ")+"]",$.Blockly.JavaScript.ORDER_ATOMIC]};
2728
+ $.Blockly.JavaScript.logic_ternary=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"IF",$.Blockly.JavaScript.ORDER_CONDITIONAL)||"false",c=$.Blockly.JavaScript.valueToCode(a,"THEN",$.Blockly.JavaScript.ORDER_CONDITIONAL)||"null";a=$.Blockly.JavaScript.valueToCode(a,"ELSE",$.Blockly.JavaScript.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,$.Blockly.JavaScript.ORDER_CONDITIONAL]};var module$exports$Blockly$JavaScript$lists={};$.Blockly.JavaScript.lists_create_empty=function(a){return["[]",$.Blockly.JavaScript.ORDER_ATOMIC]};$.Blockly.JavaScript.lists_create_with=function(a){for(var b=Array(a.itemCount_),c=0;c<a.itemCount_;c++)b[c]=$.Blockly.JavaScript.valueToCode(a,"ADD"+c,$.Blockly.JavaScript.ORDER_NONE)||"null";return["["+b.join(", ")+"]",$.Blockly.JavaScript.ORDER_ATOMIC]};
2722
2729
  $.Blockly.JavaScript.lists_repeat=function(a){var b=$.Blockly.JavaScript.provideFunction_("listsRepeat",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(value, n) {"," var array = [];"," for (var i = 0; i < n; i++) {"," array[i] = value;"," }"," return array;","}"]),c=$.Blockly.JavaScript.valueToCode(a,"ITEM",$.Blockly.JavaScript.ORDER_NONE)||"null";a=$.Blockly.JavaScript.valueToCode(a,"NUM",$.Blockly.JavaScript.ORDER_NONE)||"0";return[b+"("+c+", "+a+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2723
2730
  $.Blockly.JavaScript.lists_length=function(a){return[($.Blockly.JavaScript.valueToCode(a,"VALUE",$.Blockly.JavaScript.ORDER_MEMBER)||"[]")+".length",$.Blockly.JavaScript.ORDER_MEMBER]};$.Blockly.JavaScript.lists_isEmpty=function(a){return["!"+($.Blockly.JavaScript.valueToCode(a,"VALUE",$.Blockly.JavaScript.ORDER_MEMBER)||"[]")+".length",$.Blockly.JavaScript.ORDER_LOGICAL_NOT]};
2724
2731
  $.Blockly.JavaScript.lists_indexOf=function(a){var b="FIRST"===a.getFieldValue("END")?"indexOf":"lastIndexOf",c=$.Blockly.JavaScript.valueToCode(a,"FIND",$.Blockly.JavaScript.ORDER_NONE)||"''";b=($.Blockly.JavaScript.valueToCode(a,"VALUE",$.Blockly.JavaScript.ORDER_MEMBER)||"[]")+"."+b+"("+c+")";return a.workspace.options.oneBasedIndex?[b+" + 1",$.Blockly.JavaScript.ORDER_ADDITION]:[b,$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
@@ -2726,18 +2733,18 @@ $.Blockly.JavaScript.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"
2726
2733
  $.Blockly.JavaScript.ORDER_MEMBER];if("GET_REMOVE"===b)return[d+".pop()",$.Blockly.JavaScript.ORDER_MEMBER];if("REMOVE"===b)return d+".pop();\n";break;case "FROM_START":a=$.Blockly.JavaScript.getAdjusted(a,"AT");if("GET"===b)return[d+"["+a+"]",$.Blockly.JavaScript.ORDER_MEMBER];if("GET_REMOVE"===b)return[d+".splice("+a+", 1)[0]",$.Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"===b)return d+".splice("+a+", 1);\n";break;case "FROM_END":a=$.Blockly.JavaScript.getAdjusted(a,"AT",1,!0);if("GET"===
2727
2734
  b)return[d+".slice("+a+")[0]",$.Blockly.JavaScript.ORDER_FUNCTION_CALL];if("GET_REMOVE"===b)return[d+".splice("+a+", 1)[0]",$.Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"===b)return d+".splice("+a+", 1);";break;case "RANDOM":d=$.Blockly.JavaScript.provideFunction_("listsGetRandomItem",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(list, remove) {"," var x = Math.floor(Math.random() * list.length);"," if (remove) {"," return list.splice(x, 1)[0];"," } else {"," return list[x];",
2728
2735
  " }","}"])+"("+d+", "+("GET"!==b)+")";if("GET"===b||"GET_REMOVE"===b)return[d,$.Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"===b)return d+";\n"}throw Error("Unhandled combination (lists_getIndex).");};
2729
- $.Blockly.JavaScript.lists_setIndex=function(a){function b(){if(c.match(/^\w+$/))return"";var g=$.Blockly.JavaScript.nameDB_.getDistinctName("tmpList",$.Blockly.VARIABLE_CATEGORY_NAME),h="var "+g+" = "+c+";\n";c=g;return h}var c=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_MEMBER)||"[]",d=a.getFieldValue("MODE")||"GET",e=a.getFieldValue("WHERE")||"FROM_START",f=$.Blockly.JavaScript.valueToCode(a,"TO",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"null";switch(e){case "FIRST":if("SET"===
2736
+ $.Blockly.JavaScript.lists_setIndex=function(a){function b(){if(c.match(/^\w+$/))return"";var g=$.Blockly.JavaScript.nameDB_.getDistinctName("tmpList",$.module$exports$Blockly$Names.NameType.VARIABLE),h="var "+g+" = "+c+";\n";c=g;return h}var c=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_MEMBER)||"[]",d=a.getFieldValue("MODE")||"GET",e=a.getFieldValue("WHERE")||"FROM_START",f=$.Blockly.JavaScript.valueToCode(a,"TO",$.Blockly.JavaScript.ORDER_ASSIGNMENT)||"null";switch(e){case "FIRST":if("SET"===
2730
2737
  d)return c+"[0] = "+f+";\n";if("INSERT"===d)return c+".unshift("+f+");\n";break;case "LAST":if("SET"===d)return b()+(c+"["+c+".length - 1] = "+f+";\n");if("INSERT"===d)return c+".push("+f+");\n";break;case "FROM_START":a=$.Blockly.JavaScript.getAdjusted(a,"AT");if("SET"===d)return c+"["+a+"] = "+f+";\n";if("INSERT"===d)return c+".splice("+a+", 0, "+f+");\n";break;case "FROM_END":a=$.Blockly.JavaScript.getAdjusted(a,"AT",1,!1,$.Blockly.JavaScript.ORDER_SUBTRACTION);e=b();if("SET"===d)return e+(c+"["+
2731
- c+".length - "+a+"] = "+f+";\n");if("INSERT"===d)return e+(c+".splice("+c+".length - "+a+", 0, "+f+");\n");break;case "RANDOM":a=b();e=$.Blockly.JavaScript.nameDB_.getDistinctName("tmpX",$.Blockly.VARIABLE_CATEGORY_NAME);a+="var "+e+" = Math.floor(Math.random() * "+c+".length);\n";if("SET"===d)return a+(c+"["+e+"] = "+f+";\n");if("INSERT"===d)return a+(c+".splice("+e+", 0, "+f+");\n")}throw Error("Unhandled combination (lists_setIndex).");};
2732
- $.Blockly.JavaScript.lists.getIndex_=function(a,b,c){return"FIRST"===b?"0":"FROM_END"===b?a+".length - 1 - "+c:"LAST"===b?a+".length - 1":c};
2738
+ c+".length - "+a+"] = "+f+";\n");if("INSERT"===d)return e+(c+".splice("+c+".length - "+a+", 0, "+f+");\n");break;case "RANDOM":a=b();e=$.Blockly.JavaScript.nameDB_.getDistinctName("tmpX",$.module$exports$Blockly$Names.NameType.VARIABLE);a+="var "+e+" = Math.floor(Math.random() * "+c+".length);\n";if("SET"===d)return a+(c+"["+e+"] = "+f+";\n");if("INSERT"===d)return a+(c+".splice("+e+", 0, "+f+");\n")}throw Error("Unhandled combination (lists_setIndex).");};
2739
+ var module$contents$Blockly$JavaScript$lists_getSubstringIndex=function(a,b,c){return"FIRST"===b?"0":"FROM_END"===b?a+".length - 1 - "+c:"LAST"===b?a+".length - 1":c};
2733
2740
  $.Blockly.JavaScript.lists_getSublist=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"===c&&"LAST"===d)b+=".slice(0)";else if(b.match(/^\w+$/)||"FROM_END"!==c&&"FROM_START"===d){switch(c){case "FROM_START":c=$.Blockly.JavaScript.getAdjusted(a,"AT1");break;case "FROM_END":c=$.Blockly.JavaScript.getAdjusted(a,"AT1",1,!1,$.Blockly.JavaScript.ORDER_SUBTRACTION);c=b+".length - "+c;break;
2734
2741
  case "FIRST":c="0";break;default:throw Error("Unhandled option (lists_getSublist).");}switch(d){case "FROM_START":d=$.Blockly.JavaScript.getAdjusted(a,"AT2",1);break;case "FROM_END":d=$.Blockly.JavaScript.getAdjusted(a,"AT2",0,!1,$.Blockly.JavaScript.ORDER_SUBTRACTION);d=b+".length - "+d;break;case "LAST":d=b+".length";break;default:throw Error("Unhandled option (lists_getSublist).");}b=b+".slice("+c+", "+d+")"}else{var e=$.Blockly.JavaScript.getAdjusted(a,"AT1");a=$.Blockly.JavaScript.getAdjusted(a,
2735
- "AT2");var f=$.Blockly.JavaScript.lists.getIndex_,g={FIRST:"First",LAST:"Last",FROM_START:"FromStart",FROM_END:"FromEnd"};b=$.Blockly.JavaScript.provideFunction_("subsequence"+g[c]+g[d],["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(sequence"+("FROM_END"===c||"FROM_START"===c?", at1":"")+("FROM_END"===d||"FROM_START"===d?", at2":"")+") {"," var start = "+f("sequence",c,"at1")+";"," var end = "+f("sequence",d,"at2")+" + 1;"," return sequence.slice(start, end);","}"])+"("+b+("FROM_END"===
2736
- c||"FROM_START"===c?", "+e:"")+("FROM_END"===d||"FROM_START"===d?", "+a:"")+")"}return[b,$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2742
+ "AT2");var f={FIRST:"First",LAST:"Last",FROM_START:"FromStart",FROM_END:"FromEnd"};b=$.Blockly.JavaScript.provideFunction_("subsequence"+f[c]+f[d],["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(sequence"+("FROM_END"===c||"FROM_START"===c?", at1":"")+("FROM_END"===d||"FROM_START"===d?", at2":"")+") {",module$contents$Blockly$JavaScript$lists_getSubstringIndex("sequence",c,"at1")+";"," var end = "+module$contents$Blockly$JavaScript$lists_getSubstringIndex("sequence",d,"at2")+" + 1;",
2743
+ " return sequence.slice(start, end);","}"])+"("+b+("FROM_END"===c||"FROM_START"===c?", "+e:"")+("FROM_END"===d||"FROM_START"===d?", "+a:"")+")"}return[b,$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2737
2744
  $.Blockly.JavaScript.lists_sort=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_FUNCTION_CALL)||"[]",c="1"===a.getFieldValue("DIRECTION")?1:-1;a=a.getFieldValue("TYPE");var d=$.Blockly.JavaScript.provideFunction_("listsGetSortCompare",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(type, direction) {"," var compareFuncs = {",' "NUMERIC": function(a, b) {'," return Number(a) - Number(b); },",' "TEXT": function(a, b) {'," return a.toString() > b.toString() ? 1 : -1; },",
2738
2745
  ' "IGNORE_CASE": function(a, b) {'," return a.toString().toLowerCase() > b.toString().toLowerCase() ? 1 : -1; },"," };"," var compare = compareFuncs[type];"," return function(a, b) { return compare(a, b) * direction; }","}"]);return[b+".slice().sort("+d+'("'+a+'", '+c+"))",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2739
2746
  $.Blockly.JavaScript.lists_split=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"INPUT",$.Blockly.JavaScript.ORDER_MEMBER),c=$.Blockly.JavaScript.valueToCode(a,"DELIM",$.Blockly.JavaScript.ORDER_NONE)||"''";a=a.getFieldValue("MODE");if("SPLIT"===a)b||(b="''"),a="split";else if("JOIN"===a)b||(b="[]"),a="join";else throw Error("Unknown mode: "+a);return[b+"."+a+"("+c+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2740
- $.Blockly.JavaScript.lists_reverse=function(a){return[($.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_FUNCTION_CALL)||"[]")+".slice().reverse()",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};$.Blockly.JavaScript.colour={};$.Blockly.JavaScript.colour_picker=function(a){return[$.Blockly.JavaScript.quote_(a.getFieldValue("COLOUR")),$.Blockly.JavaScript.ORDER_ATOMIC]};$.Blockly.JavaScript.colour_random=function(a){return[$.Blockly.JavaScript.provideFunction_("colourRandom",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"() {"," var num = Math.floor(Math.random() * Math.pow(2, 24));"," return '#' + ('00000' + num.toString(16)).substr(-6);","}"])+"()",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2747
+ $.Blockly.JavaScript.lists_reverse=function(a){return[($.Blockly.JavaScript.valueToCode(a,"LIST",$.Blockly.JavaScript.ORDER_FUNCTION_CALL)||"[]")+".slice().reverse()",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};var module$exports$Blockly$JavaScript$colour={};$.Blockly.JavaScript.colour_picker=function(a){return[$.Blockly.JavaScript.quote_(a.getFieldValue("COLOUR")),$.Blockly.JavaScript.ORDER_ATOMIC]};$.Blockly.JavaScript.colour_random=function(a){return[$.Blockly.JavaScript.provideFunction_("colourRandom",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"() {"," var num = Math.floor(Math.random() * Math.pow(2, 24));"," return '#' + ('00000' + num.toString(16)).substr(-6);","}"])+"()",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2741
2748
  $.Blockly.JavaScript.colour_rgb=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"RED",$.Blockly.JavaScript.ORDER_NONE)||0,c=$.Blockly.JavaScript.valueToCode(a,"GREEN",$.Blockly.JavaScript.ORDER_NONE)||0;a=$.Blockly.JavaScript.valueToCode(a,"BLUE",$.Blockly.JavaScript.ORDER_NONE)||0;return[$.Blockly.JavaScript.provideFunction_("colourRgb",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(r, g, b) {"," r = Math.max(Math.min(Number(r), 100), 0) * 2.55;"," g = Math.max(Math.min(Number(g), 100), 0) * 2.55;",
2742
2749
  " b = Math.max(Math.min(Number(b), 100), 0) * 2.55;"," r = ('0' + (Math.round(r) || 0).toString(16)).slice(-2);"," g = ('0' + (Math.round(g) || 0).toString(16)).slice(-2);"," b = ('0' + (Math.round(b) || 0).toString(16)).slice(-2);"," return '#' + r + g + b;","}"])+"("+b+", "+c+", "+a+")",$.Blockly.JavaScript.ORDER_FUNCTION_CALL]};
2743
2750
  $.Blockly.JavaScript.colour_blend=function(a){var b=$.Blockly.JavaScript.valueToCode(a,"COLOUR1",$.Blockly.JavaScript.ORDER_NONE)||"'#000000'",c=$.Blockly.JavaScript.valueToCode(a,"COLOUR2",$.Blockly.JavaScript.ORDER_NONE)||"'#000000'";a=$.Blockly.JavaScript.valueToCode(a,"RATIO",$.Blockly.JavaScript.ORDER_NONE)||.5;return[$.Blockly.JavaScript.provideFunction_("colourBlend",["function "+$.Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(c1, c2, ratio) {"," ratio = Math.max(Math.min(Number(ratio), 1), 0);",