Merge pull request #2288 from rachel-fenichel/rebuild_02_11_19

Rebuild 02 11 19
This commit is contained in:
Rachel Fenichel
2019-02-11 16:01:40 -08:00
committed by GitHub
13 changed files with 699 additions and 231 deletions
+51 -45
View File
@@ -42,7 +42,7 @@ goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototyp
goog.tagUnsealableClass=function(a){!COMPILED&&goog.defineClass.SEAL_CLASS_INSTANCES&&(a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]=!0)};goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable";
!COMPILED&&goog.DEPENDENCIES_ENABLED&&(goog.inHtmlDocument_=function(){var a=goog.global.document;return null!=a&&"write"in a},goog.isDocumentLoading_=function(){var a=goog.global.document;return a.attachEvent?"complete"!=a.readyState:"loading"==a.readyState},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH)&&goog.isString(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_()){var a=goog.global.document,b=a.currentScript;
a=b?[b]:a.getElementsByTagName("SCRIPT");for(b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?");d=-1==d?c.length:d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}}},goog.findBasePath_(),goog.Transpiler=function(){this.requiresTranspilation_=null;this.transpilationTarget_=goog.TRANSPILE_TO_LANGUAGE},goog.Transpiler.prototype.createRequiresTranspilation_=function(){function a(a,b){e?d[a]=!0:b()?(c=a,d[a]=!1):e=d[a]=!0}function b(a){try{return!!eval(a)}catch(h){return!1}}
var c="es3",d={es3:!1},e=!1,f=goog.global.navigator&&goog.global.navigator.userAgent?goog.global.navigator.userAgent:"";a("es5",function(){return b("[1,].length==1")});a("es6",function(){var a=f.match(/Edge\/(\d+)(\.\d)*/i);return a&&15>Number(a[1])?!1:b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')});
var c="es3",d={es3:!1},e=!1,f=goog.global.navigator&&goog.global.navigator.userAgent?goog.global.navigator.userAgent:"";a("es5",function(){return b("[1,].length==1")});a("es6",function(){return f.match(/Edge\/(\d+)(\.\d)*/i)?!1:b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')});
a("es6-impl",function(){return!0});a("es7",function(){return b("2 ** 2 == 4")});a("es8",function(){return b("async () => 1, true")});a("es9",function(){return b("({...rest} = {}), true")});a("es_next",function(){return!1});return{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(a,b){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var c=this.createRequiresTranspilation_();this.requiresTranspilation_=c.map;this.transpilationTarget_=
this.transpilationTarget_||c.target}if(a in this.requiresTranspilation_)return this.requiresTranspilation_[a]?!0:!goog.inHtmlDocument_()||"es6"!=b||"noModule"in goog.global.document.createElement("script")?!1:!0;throw Error("Unknown language mode: "+a);},goog.Transpiler.prototype.transpile=function(a,b){return goog.transpile_(a,b,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(a){return a.replace(/<\/(SCRIPT)/ig,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_=
{};this.idToPath_={};this.written_={};this.loadingDeps_=[];this.depsToLoad_=[];this.paused_=!1;this.factory_=new goog.DependencyFactory(goog.transpiler_);this.deferredCallbacks_={};this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(a,b){function c(){d&&(goog.global.setTimeout(d,0),d=null)}var d=b;if(a.length){b=[];for(var e=0;e<a.length;e++){var f=this.getPathFromDeps_(a[e]);if(!f)throw Error("Unregonized namespace: "+a[e]);b.push(this.dependencies_[f])}f=goog.require;var g=0;
@@ -386,7 +386,7 @@ goog.dom.safe.setLinkHrefAndRel=function(a,b,c){goog.dom.asserts.assertIsHTMLLin
goog.dom.safe.setObjectData=function(a,b){goog.dom.asserts.assertIsHTMLObjectElement(a);a.data=goog.html.TrustedResourceUrl.unwrap(b)};goog.dom.safe.setScriptSrc=function(a,b){goog.dom.asserts.assertIsHTMLScriptElement(a);a.src=goog.html.TrustedResourceUrl.unwrap(b);(b=goog.getScriptNonce())&&a.setAttribute("nonce",b)};goog.dom.safe.setScriptContent=function(a,b){goog.dom.asserts.assertIsHTMLScriptElement(a);a.text=goog.html.SafeScript.unwrap(b);(b=goog.getScriptNonce())&&a.setAttribute("nonce",b)};
goog.dom.safe.setLocationHref=function(a,b){goog.dom.asserts.assertIsLocation(a);b=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);a.href=goog.html.SafeUrl.unwrap(b)};goog.dom.safe.assignLocation=function(a,b){goog.dom.asserts.assertIsLocation(a);b=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);a.assign(goog.html.SafeUrl.unwrap(b))};
goog.dom.safe.replaceLocation=function(a,b){goog.dom.asserts.assertIsLocation(a);b=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);a.replace(goog.html.SafeUrl.unwrap(b))};goog.dom.safe.openInWindow=function(a,b,c,d,e){a=a instanceof goog.html.SafeUrl?a:goog.html.SafeUrl.sanitizeAssertUnchanged(a);return(b||window).open(goog.html.SafeUrl.unwrap(a),c?goog.string.Const.unwrap(c):"",d,e)};
goog.dom.safe.createImageFromBlob=function(a){if(!/^image\/.*/g.test(a.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var b=window.URL.createObjectURL(a);a=new Image;a.onload=function(){window.URL.revokeObjectURL(b)};a.src=b;return a};goog.html.uncheckedconversions={};goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(a,b,c){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(b,c||null)};
goog.dom.safe.parseFromStringHtml=function(a,b){return a.parseFromString(goog.html.SafeHtml.unwrap(b),"text/html")};goog.dom.safe.createImageFromBlob=function(a){if(!/^image\/.*/g.test(a.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var b=window.URL.createObjectURL(a);a=new Image;a.onload=function(){window.URL.revokeObjectURL(b)};a.src=b;return a};goog.html.uncheckedconversions={};goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(a,b,c){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(b,c||null)};
goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(b)};
goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b)};
goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)};
@@ -906,7 +906,7 @@ Blockly.Touch.shouldHandleEvent=function(a){return!Blockly.Touch.isMouseOrTouchE
Blockly.Touch.checkTouchIdentifier=function(a){var b=Blockly.Touch.getTouchIdentifierFromEvent(a);return void 0!==Blockly.Touch.touchIdentifier_&&null!==Blockly.Touch.touchIdentifier_?Blockly.Touch.touchIdentifier_==b:"mousedown"==a.type||"touchstart"==a.type||"pointerdown"==a.type?(Blockly.Touch.touchIdentifier_=b,!0):!1};Blockly.Touch.setClientFromTouch=function(a){if(Blockly.utils.startsWith(a.type,"touch")){var b=a.changedTouches[0];a.clientX=b.clientX;a.clientY=b.clientY}};
Blockly.Touch.isMouseOrTouchEvent=function(a){return Blockly.utils.startsWith(a.type,"touch")||Blockly.utils.startsWith(a.type,"mouse")||Blockly.utils.startsWith(a.type,"pointer")};Blockly.Touch.isTouchEvent=function(a){return Blockly.utils.startsWith(a.type,"touch")||Blockly.utils.startsWith(a.type,"pointer")};
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};Blockly.Events={};Blockly.Events.group_="";Blockly.Events.recordUndo=!0;Blockly.Events.disabled_=0;Blockly.Events.CREATE="create";Blockly.Events.BLOCK_CREATE=Blockly.Events.CREATE;Blockly.Events.DELETE="delete";Blockly.Events.BLOCK_DELETE=Blockly.Events.DELETE;Blockly.Events.CHANGE="change";Blockly.Events.BLOCK_CHANGE=Blockly.Events.CHANGE;Blockly.Events.MOVE="move";Blockly.Events.BLOCK_MOVE=Blockly.Events.MOVE;Blockly.Events.VAR_CREATE="var_create";Blockly.Events.VAR_DELETE="var_delete";
Blockly.Events.VAR_RENAME="var_rename";Blockly.Events.UI="ui";Blockly.Events.COMMENT_CREATE="comment_create";Blockly.Events.COMMENT_DELETE="comment_delete";Blockly.Events.COMMENT_CHANGE="comment_change";Blockly.Events.COMMENT_MOVE="comment_move";Blockly.Events.FIRE_QUEUE_=[];Blockly.Events.fire=function(a){Blockly.Events.isEnabled()&&(Blockly.Events.FIRE_QUEUE_.length||setTimeout(Blockly.Events.fireNow_,0),Blockly.Events.FIRE_QUEUE_.push(a))};
Blockly.Events.VAR_RENAME="var_rename";Blockly.Events.UI="ui";Blockly.Events.COMMENT_CREATE="comment_create";Blockly.Events.COMMENT_DELETE="comment_delete";Blockly.Events.COMMENT_CHANGE="comment_change";Blockly.Events.COMMENT_MOVE="comment_move";Blockly.Events.FINISHED_LOADING="finished_loading";Blockly.Events.FIRE_QUEUE_=[];Blockly.Events.fire=function(a){Blockly.Events.isEnabled()&&(Blockly.Events.FIRE_QUEUE_.length||setTimeout(Blockly.Events.fireNow_,0),Blockly.Events.FIRE_QUEUE_.push(a))};
Blockly.Events.fireNow_=function(){for(var a=Blockly.Events.filter(Blockly.Events.FIRE_QUEUE_,!0),b=Blockly.Events.FIRE_QUEUE_.length=0,c;c=a[b];b++){var d=Blockly.Workspace.getById(c.workspaceId);d&&d.fireChangeListener(c)}};
Blockly.Events.filter=function(a,b){a=a.slice();b||a.reverse();for(var c=[],d=Object.create(null),e=0,f;f=a[e];e++)if(!f.isNull()){var g=[f.type,f.blockId,f.workspaceId].join(" "),h=d[g],k=h?h.event:null;h?f.type==Blockly.Events.MOVE&&h.index==e-1?(k.newParentId=f.newParentId,k.newInputName=f.newInputName,k.newCoordinate=f.newCoordinate,h.index=e):f.type==Blockly.Events.CHANGE&&f.element==k.element&&f.name==k.name?k.newValue=f.newValue:f.type!=Blockly.Events.UI||"click"!=f.element||"commentOpen"!=
k.element&&"mutatorOpen"!=k.element&&"warningOpen"!=k.element?(d[g]={event:f,index:1},c.push(f)):k.newValue=f.newValue:(d[g]={event:f,index:e},c.push(f))}a=c.filter(function(a){return!a.isNull()});b||a.reverse();for(e=1;f=a[e];e++)f.type==Blockly.Events.CHANGE&&"mutation"==f.element&&a.unshift(a.splice(e,1)[0]);return a};Blockly.Events.clearPendingUndo=function(){for(var a=0,b;b=Blockly.Events.FIRE_QUEUE_[a];a++)b.recordUndo=!1};Blockly.Events.disable=function(){Blockly.Events.disabled_++};
@@ -946,7 +946,9 @@ Blockly.Events.Move.prototype.toJson=function(){var a=Blockly.Events.Move.superC
Blockly.Events.Move.prototype.fromJson=function(a){Blockly.Events.Move.superClass_.fromJson.call(this,a);this.newParentId=a.newParentId;this.newInputName=a.newInputName;a.newCoordinate&&(a=a.newCoordinate.split(","),this.newCoordinate=new goog.math.Coordinate(parseFloat(a[0]),parseFloat(a[1])))};Blockly.Events.Move.prototype.recordNew=function(){var a=this.currentLocation_();this.newParentId=a.parentId;this.newInputName=a.inputName;this.newCoordinate=a.coordinate};
Blockly.Events.Move.prototype.currentLocation_=function(){var a=Blockly.Workspace.getById(this.workspaceId).getBlockById(this.blockId),b={},c=a.getParent();if(c){if(b.parentId=c.id,a=c.getInputWithBlock(a))b.inputName=a.name}else b.coordinate=a.getRelativeToSurfaceXY();return b};Blockly.Events.Move.prototype.isNull=function(){return this.oldParentId==this.newParentId&&this.oldInputName==this.newInputName&&goog.math.Coordinate.equals(this.oldCoordinate,this.newCoordinate)};
Blockly.Events.Move.prototype.run=function(a){var b=this.getEventWorkspace_(),c=b.getBlockById(this.blockId);if(c){var d=a?this.newParentId:this.oldParentId,e=a?this.newInputName:this.oldInputName;a=a?this.newCoordinate:this.oldCoordinate;var f=null;if(d&&(f=b.getBlockById(d),!f)){console.warn("Can't connect to non-existent block: "+d);return}c.getParent()&&c.unplug();if(a)e=c.getRelativeToSurfaceXY(),c.moveBy(a.x-e.x,a.y-e.y);else{c=c.outputConnection||c.previousConnection;if(e){if(b=f.getInput(e))var g=
b.connection}else c.type==Blockly.PREVIOUS_STATEMENT&&(g=f.nextConnection);g?c.connect(g):console.warn("Can't connect to non-existent input: "+e)}}else console.warn("Can't move non-existent block: "+this.blockId)};Blockly.Xml.workspaceToDom=function(a,b){var c=Blockly.Xml.utils.createElement("xml"),d=Blockly.Xml.variablesToDom(Blockly.Variables.allUsedVarModels(a));d.hasChildNodes()&&c.appendChild(d);var e=a.getTopComments(!0);d=0;for(var f;f=e[d];d++)c.appendChild(f.toXmlWithXY(b));a=a.getTopBlocks(!0);for(d=0;e=a[d];d++)c.appendChild(Blockly.Xml.blockToDomWithXY(e,b));return c};
b.connection}else c.type==Blockly.PREVIOUS_STATEMENT&&(g=f.nextConnection);g?c.connect(g):console.warn("Can't connect to non-existent input: "+e)}}else console.warn("Can't move non-existent block: "+this.blockId)};
Blockly.Events.FinishedLoading=function(a){this.workspaceId=a.id;this.group=Blockly.Events.group_;this.recordUndo=!1};goog.inherits(Blockly.Events.FinishedLoading,Blockly.Events.Abstract);Blockly.Events.FinishedLoading.prototype.type=Blockly.Events.FINISHED_LOADING;Blockly.Events.FinishedLoading.prototype.toJson=function(){var a={type:this.type};this.group&&(a.group=this.group);this.workspaceId&&(a.workspaceId=this.workspaceId);return a};
Blockly.Events.FinishedLoading.prototype.fromJson=function(a){this.workspaceId=a.workspaceId;this.group=a.group};Blockly.Xml.workspaceToDom=function(a,b){var c=Blockly.Xml.utils.createElement("xml"),d=Blockly.Xml.variablesToDom(Blockly.Variables.allUsedVarModels(a));d.hasChildNodes()&&c.appendChild(d);var e=a.getTopComments(!0);d=0;for(var f;f=e[d];d++)c.appendChild(f.toXmlWithXY(b));a=a.getTopBlocks(!0);for(d=0;e=a[d];d++)c.appendChild(Blockly.Xml.blockToDomWithXY(e,b));return c};
Blockly.Xml.variablesToDom=function(a){for(var b=Blockly.Xml.utils.createElement("variables"),c=0,d;d=a[c];c++){var e=Blockly.Xml.utils.createElement("variable");e.appendChild(Blockly.Xml.utils.createTextNode(d.name));e.setAttribute("type",d.type);e.setAttribute("id",d.getId());b.appendChild(e)}return b};
Blockly.Xml.blockToDomWithXY=function(a,b){var c;a.workspace.RTL&&(c=a.workspace.getWidth());b=Blockly.Xml.blockToDom(a,b);var d=a.getRelativeToSurfaceXY();b.setAttribute("x",Math.round(a.workspace.RTL?c-d.x:d.x));b.setAttribute("y",Math.round(d.y));return b};
Blockly.Xml.fieldToDomVariable_=function(a){null==a.getValue()&&(a.initModel(),a.getValue());var b=a.getVariable();if(!b)throw Error("Tried to serialize a variable field with no variable.");var c=Blockly.Xml.utils.createElement("field");c.appendChild(Blockly.Xml.utils.createTextNode(b.name));c.setAttribute("name",a.name);c.setAttribute("id",b.getId());c.setAttribute("variabletype",b.type);return c};
@@ -960,7 +962,7 @@ Blockly.Xml.domToPrettyText=function(a){a=Blockly.Xml.domToText(a).split("<");fo
Blockly.Xml.textToDom=function(a){a=Blockly.Xml.utils.textToDomDocument(a);if(!a||!a.documentElement||"xml"!=a.documentElement.nodeName.toLowerCase())throw TypeError("Blockly.Xml.textToDom expected an <xml> document.");return a.documentElement};Blockly.Xml.clearWorkspaceAndLoadFromXml=function(a,b){b.setResizesEnabled(!1);b.clear();a=Blockly.Xml.domToWorkspace(a,b);b.setResizesEnabled(!0);return a};
Blockly.Xml.domToWorkspace=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToWorkspace, swap the arguments.")}var d;b.RTL&&(d=b.getWidth());c=[];Blockly.Field.startCache();var e=a.childNodes.length,f=Blockly.Events.getGroup();f||Blockly.Events.setGroup(!0);b.setResizesEnabled&&b.setResizesEnabled(!1);var g=!0;try{for(var h=0;h<e;h++){var k=a.childNodes[h],l=k.nodeName.toLowerCase();if("block"==l||"shadow"==l&&!Blockly.Events.recordUndo){var n=
Blockly.Xml.domToBlock(k,b);c.push(n.id);var m=k.hasAttribute("x")?parseInt(k.getAttribute("x"),10):10,p=k.hasAttribute("y")?parseInt(k.getAttribute("y"),10):10;isNaN(m)||isNaN(p)||n.moveBy(b.RTL?d-m:m,p);g=!1}else{if("shadow"==l)throw TypeError("Shadow block cannot be a top-level block.");if("comment"==l)b.rendered?Blockly.WorkspaceCommentSvg.fromXml(k,b,d):Blockly.WorkspaceComment.fromXml(k,b);else if("variables"==l){if(g)Blockly.Xml.domToVariables(k,b);else throw Error("'variables' tag must exist once before block and shadow tag elements in the workspace XML, but it was found in another location.");
g=!1}}}}finally{f||Blockly.Events.setGroup(!1),Blockly.Field.stopCache()}b.setResizesEnabled&&b.setResizesEnabled(!0);return c};
g=!1}}}}finally{f||Blockly.Events.setGroup(!1),Blockly.Field.stopCache()}b.setResizesEnabled&&b.setResizesEnabled(!0);Blockly.Events.fire(new Blockly.Events.FinishedLoading(b));return c};
Blockly.Xml.appendDomToWorkspace=function(a,b){if(b.hasOwnProperty("scale")){var c=Blockly.BlockSvg.TAB_WIDTH;try{Blockly.BlockSvg.TAB_WIDTH=0;var d=b.getBlocksBoundingBox()}finally{Blockly.BlockSvg.TAB_WIDTH=c}}a=Blockly.Xml.domToWorkspace(a,b);if(d&&d.height){c=d.y+d.height;var e=d.x;var f=Infinity,g=Infinity;for(d=0;d<a.length;d++){var h=b.getBlockById(a[d]).getRelativeToSurfaceXY();h.y<g&&(g=h.y);h.x<f&&(f=h.x)}c=c-g+Blockly.BlockSvg.SEP_SPACE_Y;e-=f;var k;b.RTL&&(k=b.getWidth());for(d=0;d<a.length;d++)b.getBlockById(a[d]).moveBy(b.RTL?
k-e:e,c)}return a};
Blockly.Xml.domToBlock=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToBlock, swap the arguments.")}Blockly.Events.disable();c=b.getAllVariables();try{var d=Blockly.Xml.domToBlockHeadless_(a,b),e=d.getDescendants(!1);if(b.rendered){d.setConnectionsHidden(!0);for(var f=e.length-1;0<=f;f--)e[f].initSvg();for(f=e.length-1;0<=f;f--)e[f].render(!1);setTimeout(function(){d.workspace&&d.setConnectionsHidden(!1)},1);d.updateDisabled();b.resizeContents()}else for(f=
@@ -998,7 +1000,7 @@ Blockly.Workspace.prototype.removeTypedBlock=function(a){this.typedBlocksDB_[a.t
Blockly.Workspace.prototype.getBlocksByType=function(a,b){if(!this.typedBlocksDB_[a])return[];a=this.typedBlocksDB_[a].slice(0);b&&1<a.length&&(this.sortObjects_.offset=Math.sign(Blockly.utils.toRadians(Blockly.Workspace.SCAN_ANGLE)),this.RTL&&(this.sortObjects_.offset*=-1),a.sort(this.sortObjects_));return a};
Blockly.Workspace.prototype.addTopComment=function(a){this.topComments_.push(a);this.commentDB_[a.id]&&console.warn('Overriding an existing comment on this workspace, with id "'+a.id+'"');this.commentDB_[a.id]=a};Blockly.Workspace.prototype.removeTopComment=function(a){if(!Blockly.utils.arrayRemove(this.topComments_,a))throw Error("Comment not present in workspace's list of top-most comments.");delete this.commentDB_[a.id]};
Blockly.Workspace.prototype.getTopComments=function(a){var b=[].concat(this.topComments_);a&&1<b.length&&(this.sortObjects_.offset=Math.sin(Blockly.utils.toRadians(Blockly.Workspace.SCAN_ANGLE)),this.RTL&&(this.sortObjects_.offset*=-1),b.sort(this.sortObjects_));return b};
Blockly.Workspace.prototype.getAllBlocks=function(a){if(a){a=this.getTopBlocks(!0);for(var b=[],c=0;c<a.length;c++)b.push.apply(b,a[c].getDescendants(!0))}else for(b=this.getTopBlocks(!1),c=0;c<b.length;c++)b.push.apply(b,b[c].getChildren(!1));return b};
Blockly.Workspace.prototype.getAllBlocks=function(a){if(a){a=this.getTopBlocks(!0);for(var b=[],c=0;c<a.length;c++)b.push.apply(b,a[c].getDescendants(!0))}else for(b=this.getTopBlocks(!1),c=0;c<b.length;c++)b.push.apply(b,b[c].getChildren(!1));return b.filter(function(a){return!a.isInsertionMarker()})};
Blockly.Workspace.prototype.clear=function(){this.isClearing=!0;try{var a=Blockly.Events.getGroup();for(a||Blockly.Events.setGroup(!0);this.topBlocks_.length;)this.topBlocks_[0].dispose();for(;this.topComments_.length;)this.topComments_[this.topComments_.length-1].dispose();a||Blockly.Events.setGroup(!1);this.variableMap_.clear();this.potentialVariableMap_&&this.potentialVariableMap_.clear()}finally{this.isClearing=!1}};
Blockly.Workspace.prototype.renameVariableById=function(a,b){this.variableMap_.renameVariableById(a,b)};Blockly.Workspace.prototype.createVariable=function(a,b,c){return this.variableMap_.createVariable(a,b,c)};Blockly.Workspace.prototype.getVariableUsesById=function(a){return this.variableMap_.getVariableUsesById(a)};Blockly.Workspace.prototype.deleteVariableById=function(a){this.variableMap_.deleteVariableById(a)};
Blockly.Workspace.prototype.deleteVariableInternal_=function(a,b){this.variableMap_.deleteVariableInternal_(a,b)};Blockly.Workspace.prototype.variableIndexOf=function(a){console.warn("Deprecated call to Blockly.Workspace.prototype.variableIndexOf");return-1};Blockly.Workspace.prototype.getVariable=function(a,b){return this.variableMap_.getVariable(a,b)};Blockly.Workspace.prototype.getVariableById=function(a){return this.variableMap_.getVariableById(a)};
@@ -1066,12 +1068,13 @@ Blockly.Connection.prototype.respawnShadow_=function(){var a=this.getSourceBlock
Blockly.Connection.prototype.targetBlock=function(){return this.isConnected()?this.targetConnection.getSourceBlock():null};Blockly.Connection.prototype.checkType_=function(a){if(!this.check_||!a.check_)return!0;for(var b=0;b<this.check_.length;b++)if(-1!=a.check_.indexOf(this.check_[b]))return!0;return!1};Blockly.Connection.prototype.onCheckChanged_=function(){this.isConnected()&&!this.checkType_(this.targetConnection)&&(this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug()};
Blockly.Connection.prototype.setCheck=function(a){a?(Array.isArray(a)||(a=[a]),this.check_=a,this.onCheckChanged_()):this.check_=null;return this};Blockly.Connection.prototype.getCheck=function(){return this.check_};Blockly.Connection.prototype.setShadowDom=function(a){this.shadowDom_=a};Blockly.Connection.prototype.getShadowDom=function(){return this.shadowDom_};Blockly.Connection.prototype.neighbours_=function(){return[]};
Blockly.Connection.prototype.toString=function(){var a=this.sourceBlock_;if(a)if(a.outputConnection==this)var b="Output Connection of ";else if(a.previousConnection==this)b="Previous Connection of ";else if(a.nextConnection==this)b="Next Connection of ";else{b=null;for(var c=0,d;d=a.inputList[c];c++)if(d.connection==this){b=d;break}if(b)b='Input "'+b.name+'" connection on ';else return console.warn("Connection not actually connected to sourceBlock_"),"Orphan Connection"}else return"Orphan Connection";
return b+a.toDevString()};Blockly.ConnectionDB=function(){};Blockly.ConnectionDB.prototype=[];Blockly.ConnectionDB.constructor=Blockly.ConnectionDB;Blockly.ConnectionDB.prototype.addConnection=function(a){if(a.inDB_)throw Error("Connection already in database.");if(!a.getSourceBlock().isInFlyout){var b=this.findPositionForConnection_(a);this.splice(b,0,a);a.inDB_=!0}};
Blockly.ConnectionDB.prototype.findConnection=function(a){if(!this.length)return-1;var b=this.findPositionForConnection_(a);if(b>=this.length)return-1;for(var c=a.y_,d=b;0<=d&&this[d].y_==c;){if(this[d]==a)return d;d--}for(;b<this.length&&this[b].y_==c;){if(this[b]==a)return b;b++}return-1};
Blockly.ConnectionDB.prototype.findPositionForConnection_=function(a){if(!this.length)return 0;for(var b=0,c=this.length;b<c;){var d=Math.floor((b+c)/2);if(this[d].y_<a.y_)b=d+1;else if(this[d].y_>a.y_)c=d;else{b=d;break}}return b};Blockly.ConnectionDB.prototype.removeConnection_=function(a){if(!a.inDB_)throw Error("Connection not in database.");var b=this.findConnection(a);if(-1==b)throw Error("Unable to find connection in connectionDB.");a.inDB_=!1;this.splice(b,1)};
Blockly.ConnectionDB.prototype.getNeighbours=function(a,b){function c(a){var c=e-d[a].x_,g=f-d[a].y_;Math.sqrt(c*c+g*g)<=b&&k.push(d[a]);return g<b}var d=this,e=a.x_,f=a.y_;a=0;for(var g=d.length-2,h=g;a<h;)d[h].y_<f?a=h:g=h,h=Math.floor((a+g)/2);var k=[];g=a=h;if(d.length){for(;0<=a&&c(a);)a--;do g++;while(g<d.length&&c(g))}return k};Blockly.ConnectionDB.prototype.isInYRange_=function(a,b,c){return Math.abs(this[a].y_-b)<=c};
Blockly.ConnectionDB.prototype.searchForClosest=function(a,b,c){if(!this.length)return{connection:null,radius:b};var d=a.y_,e=a.x_;a.x_=e+c.x;a.y_=d+c.y;var f=this.findPositionForConnection_(a);c=null;for(var g=b,h,k=f-1;0<=k&&this.isInYRange_(k,a.y_,b);)h=this[k],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),k--;for(;f<this.length&&this.isInYRange_(f,a.y_,b);)h=this[f],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),f++;a.x_=e;a.y_=d;return{connection:c,radius:g}};
Blockly.ConnectionDB.init=function(a){var b=[];b[Blockly.INPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.OUTPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.NEXT_STATEMENT]=new Blockly.ConnectionDB;b[Blockly.PREVIOUS_STATEMENT]=new Blockly.ConnectionDB;a.connectionDBList=b};Blockly.constants={};Blockly.DRAG_RADIUS=5;Blockly.FLYOUT_DRAG_RADIUS=10;Blockly.SNAP_RADIUS=28;Blockly.CONNECTING_SNAP_RADIUS=Blockly.SNAP_RADIUS;Blockly.CURRENT_CONNECTION_PREFERENCE=8;Blockly.INSERTION_MARKER_COLOUR="#000000";Blockly.BUMP_DELAY=250;Blockly.BUMP_RANDOMNESS=10;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.SOUND_LIMIT=100;Blockly.DRAG_STACK=!0;Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.SVG_NS="http://www.w3.org/2000/svg";
return b+a.toDevString()};Blockly.ConnectionDB=function(){this.connections_=[]};Blockly.ConnectionDB.prototype.addConnection=function(a){if(a.inDB_)throw Error("Connection already in database.");if(!a.getSourceBlock().isInFlyout){var b=this.findPositionForConnection_(a);this.connections_.splice(b,0,a);a.inDB_=!0}};
Blockly.ConnectionDB.prototype.findConnection=function(a){if(!this.connections_.length)return-1;var b=this.findPositionForConnection_(a);if(b>=this.connections_.length)return-1;for(var c=a.y_,d=b;0<=d&&this.connections_[d].y_==c;){if(this.connections_[d]==a)return d;d--}for(;b<this.connections_.length&&this.connections_[b].y_==c;){if(this.connections_[b]==a)return b;b++}return-1};
Blockly.ConnectionDB.prototype.findPositionForConnection_=function(a){if(!this.connections_.length)return 0;for(var b=0,c=this.connections_.length;b<c;){var d=Math.floor((b+c)/2);if(this.connections_[d].y_<a.y_)b=d+1;else if(this.connections_[d].y_>a.y_)c=d;else{b=d;break}}return b};
Blockly.ConnectionDB.prototype.removeConnection_=function(a){if(!a.inDB_)throw Error("Connection not in database.");var b=this.findConnection(a);if(-1==b)throw Error("Unable to find connection in connectionDB.");a.inDB_=!1;this.connections_.splice(b,1)};
Blockly.ConnectionDB.prototype.getNeighbours=function(a,b){function c(a){var c=e-d[a].x_,g=f-d[a].y_;Math.sqrt(c*c+g*g)<=b&&k.push(d[a]);return g<b}var d=this.connections_,e=a.x_,f=a.y_;a=0;for(var g=d.length-2,h=g;a<h;)d[h].y_<f?a=h:g=h,h=Math.floor((a+g)/2);var k=[];g=a=h;if(d.length){for(;0<=a&&c(a);)a--;do g++;while(g<d.length&&c(g))}return k};Blockly.ConnectionDB.prototype.isInYRange_=function(a,b,c){return Math.abs(this.connections_[a].y_-b)<=c};
Blockly.ConnectionDB.prototype.searchForClosest=function(a,b,c){if(!this.connections_.length)return{connection:null,radius:b};var d=a.y_,e=a.x_;a.x_=e+c.x;a.y_=d+c.y;var f=this.findPositionForConnection_(a);c=null;for(var g=b,h,k=f-1;0<=k&&this.isInYRange_(k,a.y_,b);)h=this.connections_[k],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),k--;for(;f<this.connections_.length&&this.isInYRange_(f,a.y_,b);)h=this.connections_[f],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),f++;a.x_=e;a.y_=
d;return{connection:c,radius:g}};Blockly.ConnectionDB.init=function(a){var b=[];b[Blockly.INPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.OUTPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.NEXT_STATEMENT]=new Blockly.ConnectionDB;b[Blockly.PREVIOUS_STATEMENT]=new Blockly.ConnectionDB;a.connectionDBList=b};Blockly.constants={};Blockly.DRAG_RADIUS=5;Blockly.FLYOUT_DRAG_RADIUS=10;Blockly.SNAP_RADIUS=28;Blockly.CONNECTING_SNAP_RADIUS=Blockly.SNAP_RADIUS;Blockly.CURRENT_CONNECTION_PREFERENCE=8;Blockly.INSERTION_MARKER_COLOUR="#000000";Blockly.BUMP_DELAY=250;Blockly.BUMP_RANDOMNESS=10;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.SOUND_LIMIT=100;Blockly.DRAG_STACK=!0;Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.SVG_NS="http://www.w3.org/2000/svg";
Blockly.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;Blockly.ALIGN_CENTRE=0;Blockly.ALIGN_RIGHT=1;Blockly.DRAG_NONE=0;Blockly.DRAG_STICKY=1;Blockly.DRAG_BEGIN=1;Blockly.DRAG_FREE=2;Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE;
Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.TOOLBOX_AT_TOP=0;Blockly.TOOLBOX_AT_BOTTOM=1;Blockly.TOOLBOX_AT_LEFT=2;Blockly.TOOLBOX_AT_RIGHT=3;Blockly.DELETE_AREA_NONE=null;Blockly.DELETE_AREA_TRASH=1;Blockly.DELETE_AREA_TOOLBOX=2;Blockly.VARIABLE_CATEGORY_NAME="VARIABLE";Blockly.VARIABLE_DYNAMIC_CATEGORY_NAME="VARIABLE_DYNAMIC";Blockly.PROCEDURE_CATEGORY_NAME="PROCEDURE";
Blockly.RENAME_VARIABLE_ID="RENAME_VARIABLE_ID";Blockly.DELETE_VARIABLE_ID="DELETE_VARIABLE_ID";Blockly.BlockAnimations={};Blockly.BlockAnimations.disconnectPid_=0;Blockly.BlockAnimations.disconnectGroup_=null;Blockly.BlockAnimations.disposeUiEffect=function(a){var b=a.workspace,c=a.getSvgRoot();b.getAudioManager().play("delete");a=b.getSvgXY(c);c=c.cloneNode(!0);c.translateX_=a.x;c.translateY_=a.y;c.setAttribute("transform","translate("+a.x+","+a.y+")");b.getParentSvg().appendChild(c);c.bBox_=c.getBBox();Blockly.BlockAnimations.disposeUiStep_(c,b.RTL,new Date,b.scale)};
@@ -1112,7 +1115,8 @@ Blockly.InsertionMarkerManager.prototype.highlightBlock_=function(){var a=this.c
Blockly.InsertionMarkerManager.prototype.unhighlightBlock_=function(){var a=this.closestConnection_;a.type!=Blockly.INPUT_VALUE||a.isConnected()?this.highlightedBlock_.highlightForReplacement(!1):this.highlightedBlock_.highlightShapeForInput(a,!1);this.highlightedBlock_=null;this.highlightingBlock_=!1};
Blockly.InsertionMarkerManager.prototype.disconnectMarker_=function(){if(this.markerConnection_){var a=this.markerConnection_,b=a.sourceBlock_,c=b.nextConnection,d=b.previousConnection,e=b.outputConnection;e=a.type==Blockly.INPUT_VALUE&&!(e&&e.targetConnection);!(a!=c||d&&d.targetConnection)||e?a.targetBlock().unplug(!1):a.type==Blockly.NEXT_STATEMENT&&a!=c?(c=a.targetConnection,c.sourceBlock_.unplug(!1),d=d?d.targetConnection:null,b.unplug(!0),d&&d.connect(c)):b.unplug(!0);if(a.targetConnection)throw"markerConnection_ still connected at the end of disconnectInsertionMarker";
this.markerConnection_=null;b.getSvgRoot().setAttribute("visibility","hidden")}else console.log("No insertion marker connection to disconnect")};
Blockly.InsertionMarkerManager.prototype.connectMarker_=function(){var a=this.localConnection_,b=this.closestConnection_,c=this.lastOnStack_&&a==this.lastOnStack_?this.lastMarker_:this.firstMarker_;a=c.getMatchingConnection(a.sourceBlock_,a);goog.asserts.assert(a!=this.markerConnection_,"Made it to connectMarker_ even though the marker isn't changing");c.render();c.rendered=!0;c.getSvgRoot().setAttribute("visibility","visible");c.positionNewBlock(c,a,b);a.connect(b);this.markerConnection_=a};Blockly.BlockDragger=function(a,b){this.draggingBlock_=a;this.workspace_=b;this.draggedConnectionManager_=new Blockly.InsertionMarkerManager(this.draggingBlock_);this.deleteArea_=null;this.wouldDeleteBlock_=!1;this.startXY_=this.draggingBlock_.getRelativeToSurfaceXY();this.dragIconData_=Blockly.BlockDragger.initIconData_(a)};
Blockly.InsertionMarkerManager.prototype.connectMarker_=function(){var a=this.localConnection_,b=this.closestConnection_,c=this.lastOnStack_&&a==this.lastOnStack_?this.lastMarker_:this.firstMarker_;a=c.getMatchingConnection(a.sourceBlock_,a);goog.asserts.assert(a!=this.markerConnection_,"Made it to connectMarker_ even though the marker isn't changing");c.render();c.rendered=!0;c.getSvgRoot().setAttribute("visibility","visible");c.positionNewBlock(c,a,b);a.connect(b);this.markerConnection_=a};
Blockly.InsertionMarkerManager.prototype.getInsertionMarkers=function(){var a=[];this.firstMarker_&&a.push(this.firstMarker_);this.lastMarker_&&a.push(this.lastMarker_);return a};Blockly.BlockDragger=function(a,b){this.draggingBlock_=a;this.workspace_=b;this.draggedConnectionManager_=new Blockly.InsertionMarkerManager(this.draggingBlock_);this.deleteArea_=null;this.wouldDeleteBlock_=!1;this.startXY_=this.draggingBlock_.getRelativeToSurfaceXY();this.dragIconData_=Blockly.BlockDragger.initIconData_(a)};
Blockly.BlockDragger.prototype.dispose=function(){this.startWorkspace_=this.workspace_=this.draggingBlock_=null;this.dragIconData_.length=0;this.draggedConnectionManager_&&(this.draggedConnectionManager_.dispose(),this.draggedConnectionManager_=null)};Blockly.BlockDragger.initIconData_=function(a){var b=[];a=a.getDescendants(!1);for(var c=0,d;d=a[c];c++){d=d.getIcons();for(var e=0;e<d.length;e++){var f={location:d[e].getIconLocation(),icon:d[e]};b.push(f)}}return b};
Blockly.BlockDragger.prototype.startBlockDrag=function(a,b){Blockly.Events.getGroup()||Blockly.Events.setGroup(!0);this.workspace_.isMutator&&this.draggingBlock_.bringToFront();Blockly.Field.startCache();this.workspace_.setResizesEnabled(!1);Blockly.BlockAnimations.disconnectUiStop();if(this.draggingBlock_.getParent()||b&&this.draggingBlock_.nextConnection&&this.draggingBlock_.nextConnection.targetBlock())this.draggingBlock_.unplug(b),a=this.pixelsToWorkspaceUnits_(a),a=goog.math.Coordinate.sum(this.startXY_,
a),this.draggingBlock_.translate(a.x,a.y),Blockly.BlockAnimations.disconnectUiEffect(this.draggingBlock_);this.draggingBlock_.setDragging(!0);this.draggingBlock_.moveToDragSurface_();if(a=this.workspace_.getToolbox())b=this.draggingBlock_.isDeletable()?"blocklyToolboxDelete":"blocklyToolboxGrab",a.addStyle(b)};
@@ -1121,7 +1125,8 @@ Blockly.BlockDragger.prototype.endBlockDrag=function(a,b){this.dragBlock(a,b);th
this.draggingBlock_.render(),this.draggingBlock_.scheduleSnapAndBump());this.workspace_.setResizesEnabled(!0);if(a=this.workspace_.getToolbox())b=this.draggingBlock_.isDeletable()?"blocklyToolboxDelete":"blocklyToolboxGrab",a.removeStyle(b);Blockly.Events.setGroup(!1)};Blockly.BlockDragger.prototype.fireMoveEvent_=function(){var a=new Blockly.Events.BlockMove(this.draggingBlock_);a.oldCoordinate=this.startXY_;a.recordNew();Blockly.Events.fire(a)};
Blockly.BlockDragger.prototype.maybeDeleteBlock_=function(){var a=this.workspace_.trashcan;this.wouldDeleteBlock_?(a&&setTimeout(a.close.bind(a),100),this.fireMoveEvent_(),this.draggingBlock_.dispose(!1,!0)):a&&a.close();return this.wouldDeleteBlock_};
Blockly.BlockDragger.prototype.updateCursorDuringBlockDrag_=function(){this.wouldDeleteBlock_=this.draggedConnectionManager_.wouldDeleteBlock();var a=this.workspace_.trashcan;this.wouldDeleteBlock_?(this.draggingBlock_.setDeleteStyle(!0),this.deleteArea_==Blockly.DELETE_AREA_TRASH&&a&&a.setOpen_(!0)):(this.draggingBlock_.setDeleteStyle(!1),a&&a.setOpen_(!1))};
Blockly.BlockDragger.prototype.pixelsToWorkspaceUnits_=function(a){a=new goog.math.Coordinate(a.x/this.workspace_.scale,a.y/this.workspace_.scale);this.workspace_.isMutator&&(a=a.scale(1/this.workspace_.options.parentWorkspace.scale));return a};Blockly.BlockDragger.prototype.dragIcons_=function(a){for(var b=0;b<this.dragIconData_.length;b++){var c=this.dragIconData_[b];c.icon.setIconLocation(goog.math.Coordinate.sum(c.location,a))}};Blockly.WorkspaceCommentSvg=function(a,b,c,d,e){this.svgGroup_=Blockly.utils.createSvgElement("g",{"class":"blocklyComment"},null);this.svgGroup_.translate_="";this.svgRect_=Blockly.utils.createSvgElement("rect",{"class":"blocklyCommentRect",x:0,y:0,rx:Blockly.WorkspaceCommentSvg.BORDER_RADIUS,ry:Blockly.WorkspaceCommentSvg.BORDER_RADIUS});this.svgGroup_.appendChild(this.svgRect_);this.rendered_=!1;this.useDragSurface_=Blockly.utils.is3dSupported()&&!!a.blockDragSurface_;Blockly.WorkspaceCommentSvg.superClass_.constructor.call(this,
Blockly.BlockDragger.prototype.pixelsToWorkspaceUnits_=function(a){a=new goog.math.Coordinate(a.x/this.workspace_.scale,a.y/this.workspace_.scale);this.workspace_.isMutator&&(a=a.scale(1/this.workspace_.options.parentWorkspace.scale));return a};Blockly.BlockDragger.prototype.dragIcons_=function(a){for(var b=0;b<this.dragIconData_.length;b++){var c=this.dragIconData_[b];c.icon.setIconLocation(goog.math.Coordinate.sum(c.location,a))}};
Blockly.BlockDragger.prototype.getInsertionMarkers=function(){return this.draggedConnectionManager_&&this.draggedConnectionManager_.getInsertionMarkers?this.draggedConnectionManager_.getInsertionMarkers():[]};Blockly.WorkspaceCommentSvg=function(a,b,c,d,e){this.svgGroup_=Blockly.utils.createSvgElement("g",{"class":"blocklyComment"},null);this.svgGroup_.translate_="";this.svgRect_=Blockly.utils.createSvgElement("rect",{"class":"blocklyCommentRect",x:0,y:0,rx:Blockly.WorkspaceCommentSvg.BORDER_RADIUS,ry:Blockly.WorkspaceCommentSvg.BORDER_RADIUS});this.svgGroup_.appendChild(this.svgRect_);this.rendered_=!1;this.useDragSurface_=Blockly.utils.is3dSupported()&&!!a.blockDragSurface_;Blockly.WorkspaceCommentSvg.superClass_.constructor.call(this,
a,b,c,d,e);this.render()};goog.inherits(Blockly.WorkspaceCommentSvg,Blockly.WorkspaceComment);Blockly.WorkspaceCommentSvg.DEFAULT_SIZE=100;
Blockly.WorkspaceCommentSvg.prototype.dispose=function(){this.workspace&&(Blockly.selected==this&&(this.unselect(),this.workspace.cancelCurrentGesture()),Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.CommentDelete(this)),Blockly.utils.removeNode(this.svgGroup_),this.svgRect_=this.svgGroup_=null,this.disposeInternal_(),Blockly.Events.disable(),Blockly.WorkspaceCommentSvg.superClass_.dispose.call(this),Blockly.Events.enable())};
Blockly.WorkspaceCommentSvg.prototype.initSvg=function(){if(!this.workspace.rendered)throw TypeError("Workspace is headless.");this.workspace.options.readOnly||this.eventsInit_||(Blockly.bindEventWithChecks_(this.svgRectTarget_,"mousedown",this,this.pathMouseDown_),Blockly.bindEventWithChecks_(this.svgHandleTarget_,"mousedown",this,this.pathMouseDown_));this.eventsInit_=!0;this.updateMovable();this.getSvgRoot().parentNode||this.workspace.getBubbleCanvas().appendChild(this.getSvgRoot())};
@@ -1159,7 +1164,7 @@ this.healStack_=!Blockly.DRAG_STACK};
Blockly.Gesture.prototype.dispose=function(){Blockly.Touch.clearTouchIdentifier();Blockly.Tooltip.unblock();this.creatorWorkspace_.clearGesture();this.onMoveWrapper_&&Blockly.unbindEvent_(this.onMoveWrapper_);this.onUpWrapper_&&Blockly.unbindEvent_(this.onUpWrapper_);this.flyout_=this.startWorkspace_=this.targetBlock_=this.startBlock_=this.startField_=null;this.blockDragger_&&(this.blockDragger_.dispose(),this.blockDragger_=null);this.workspaceDragger_&&(this.workspaceDragger_.dispose(),this.workspaceDragger_=
null);this.bubbleDragger_&&(this.bubbleDragger_.dispose(),this.bubbleDragger_=null)};Blockly.Gesture.prototype.updateFromEvent_=function(a){var b=new goog.math.Coordinate(a.clientX,a.clientY);this.updateDragDelta_(b)&&(this.updateIsDragging_(),Blockly.longStop_());this.mostRecentEvent_=a};
Blockly.Gesture.prototype.updateDragDelta_=function(a){this.currentDragDeltaXY_=goog.math.Coordinate.difference(a,this.mouseDownXY_);return this.hasExceededDragRadius_?!1:this.hasExceededDragRadius_=goog.math.Coordinate.magnitude(this.currentDragDeltaXY_)>(this.flyout_?Blockly.FLYOUT_DRAG_RADIUS:Blockly.DRAG_RADIUS)};
Blockly.Gesture.prototype.updateIsDraggingFromFlyout_=function(){return this.targetBlock_.disabled?!1:!this.flyout_.isScrollable()||this.flyout_.isDragTowardWorkspace(this.currentDragDeltaXY_)?(this.startWorkspace_=this.flyout_.targetWorkspace_,this.startWorkspace_.updateScreenCalculationsIfScrolled(),Blockly.Events.getGroup()||Blockly.Events.setGroup(!0),this.startBlock_=null,this.targetBlock_=this.flyout_.createBlock(this.targetBlock_),this.targetBlock_.select(),!0):!1};
Blockly.Gesture.prototype.updateIsDraggingFromFlyout_=function(){return this.flyout_.isBlockCreatable_(this.targetBlock_)?!this.flyout_.isScrollable()||this.flyout_.isDragTowardWorkspace(this.currentDragDeltaXY_)?(this.startWorkspace_=this.flyout_.targetWorkspace_,this.startWorkspace_.updateScreenCalculationsIfScrolled(),Blockly.Events.getGroup()||Blockly.Events.setGroup(!0),this.startBlock_=null,this.targetBlock_=this.flyout_.createBlock(this.targetBlock_),this.targetBlock_.select(),!0):!1:!1};
Blockly.Gesture.prototype.updateIsDraggingBubble_=function(){if(!this.startBubble_)return!1;this.isDraggingBubble_=!0;this.startDraggingBubble_();return!0};Blockly.Gesture.prototype.updateIsDraggingBlock_=function(){if(!this.targetBlock_)return!1;this.flyout_?this.isDraggingBlock_=this.updateIsDraggingFromFlyout_():this.targetBlock_.isMovable()&&(this.isDraggingBlock_=!0);return this.isDraggingBlock_?(this.startDraggingBlock_(),!0):!1};
Blockly.Gesture.prototype.updateIsDraggingWorkspace_=function(){if(this.flyout_?this.flyout_.isScrollable():this.startWorkspace_&&this.startWorkspace_.isDraggable())this.workspaceDragger_=this.flyout_?new Blockly.FlyoutDragger(this.flyout_):new Blockly.WorkspaceDragger(this.startWorkspace_),this.isDraggingWorkspace_=!0,this.workspaceDragger_.startDrag()};
Blockly.Gesture.prototype.updateIsDragging_=function(){if(this.calledUpdateIsDragging_)throw Error("updateIsDragging_ should only be called once per gesture.");this.calledUpdateIsDragging_=!0;this.updateIsDraggingBubble_()||this.updateIsDraggingBlock_()||this.updateIsDraggingWorkspace_()};
@@ -1180,12 +1185,12 @@ Blockly.Gesture.prototype.doBlockClick_=function(){this.flyout_&&this.flyout_.au
Blockly.Gesture.prototype.bringBlockToFront_=function(){this.targetBlock_&&!this.flyout_&&this.targetBlock_.bringToFront()};Blockly.Gesture.prototype.setStartField=function(a){if(this.hasStarted_)throw Error("Tried to call gesture.setStartField, but the gesture had already been started.");this.startField_||(this.startField_=a)};Blockly.Gesture.prototype.setStartBubble=function(a){this.startBubble_||(this.startBubble_=a)};
Blockly.Gesture.prototype.setStartBlock=function(a){this.startBlock_||this.startBubble_||(this.startBlock_=a,a.isInFlyout&&a!=a.getRootBlock()?this.setTargetBlock_(a.getRootBlock()):this.setTargetBlock_(a))};Blockly.Gesture.prototype.setTargetBlock_=function(a){a.isShadow()?this.setTargetBlock_(a.getParent()):this.targetBlock_=a};Blockly.Gesture.prototype.setStartWorkspace_=function(a){this.startWorkspace_||(this.startWorkspace_=a)};
Blockly.Gesture.prototype.setStartFlyout_=function(a){this.flyout_||(this.flyout_=a)};Blockly.Gesture.prototype.isBubbleClick_=function(){return!!this.startBubble_&&!this.hasExceededDragRadius_};Blockly.Gesture.prototype.isBlockClick_=function(){return!!this.startBlock_&&!this.hasExceededDragRadius_&&!this.isFieldClick_()};Blockly.Gesture.prototype.isFieldClick_=function(){return(this.startField_?this.startField_.isCurrentlyEditable():!1)&&!this.hasExceededDragRadius_&&(!this.flyout_||!this.flyout_.autoClose)};
Blockly.Gesture.prototype.isWorkspaceClick_=function(){return!this.startBlock_&&!this.startBubble_&&!this.startField_&&!this.hasExceededDragRadius_};Blockly.Gesture.prototype.isDragging=function(){return this.isDraggingWorkspace_||this.isDraggingBlock_||this.isDraggingBubble_};Blockly.Gesture.prototype.hasStarted=function(){return this.hasStarted_};Blockly.Grid=function(a,b){this.gridPattern_=a;this.spacing_=b.spacing;this.length_=b.length;this.line2_=(this.line1_=a.firstChild)&&this.line1_.nextSibling;this.snapToGrid_=b.snap};Blockly.Grid.prototype.scale_=1;Blockly.Grid.prototype.dispose=function(){this.gridPattern_=null};Blockly.Grid.prototype.shouldSnap=function(){return this.snapToGrid_};Blockly.Grid.prototype.getSpacing=function(){return this.spacing_};Blockly.Grid.prototype.getPatternId=function(){return this.gridPattern_.id};
Blockly.Gesture.prototype.isWorkspaceClick_=function(){return!this.startBlock_&&!this.startBubble_&&!this.startField_&&!this.hasExceededDragRadius_};Blockly.Gesture.prototype.isDragging=function(){return this.isDraggingWorkspace_||this.isDraggingBlock_||this.isDraggingBubble_};Blockly.Gesture.prototype.hasStarted=function(){return this.hasStarted_};Blockly.Gesture.prototype.getInsertionMarkers=function(){return this.blockDragger_?this.blockDragger_.getInsertionMarkers():[]};Blockly.Grid=function(a,b){this.gridPattern_=a;this.spacing_=b.spacing;this.length_=b.length;this.line2_=(this.line1_=a.firstChild)&&this.line1_.nextSibling;this.snapToGrid_=b.snap};Blockly.Grid.prototype.scale_=1;Blockly.Grid.prototype.dispose=function(){this.gridPattern_=null};Blockly.Grid.prototype.shouldSnap=function(){return this.snapToGrid_};Blockly.Grid.prototype.getSpacing=function(){return this.spacing_};Blockly.Grid.prototype.getPatternId=function(){return this.gridPattern_.id};
Blockly.Grid.prototype.update=function(a){this.scale_=a;var b=this.spacing_*a||100;this.gridPattern_.setAttribute("width",b);this.gridPattern_.setAttribute("height",b);b=Math.floor(this.spacing_/2)+.5;var c=b-this.length_/2,d=b+this.length_/2;b*=a;c*=a;d*=a;this.setLineAttributes_(this.line1_,a,c,d,b,b);this.setLineAttributes_(this.line2_,a,b,b,c,d)};
Blockly.Grid.prototype.setLineAttributes_=function(a,b,c,d,e,f){a&&(a.setAttribute("stroke-width",b),a.setAttribute("x1",c),a.setAttribute("y1",e),a.setAttribute("x2",d),a.setAttribute("y2",f))};Blockly.Grid.prototype.moveTo=function(a,b){this.gridPattern_.setAttribute("x",a);this.gridPattern_.setAttribute("y",b);(goog.userAgent.IE||goog.userAgent.EDGE)&&this.update(this.scale_)};
Blockly.Grid.createDom=function(a,b,c){a=Blockly.utils.createSvgElement("pattern",{id:"blocklyGridPattern"+a,patternUnits:"userSpaceOnUse"},c);0<b.length&&0<b.spacing?(Blockly.utils.createSvgElement("line",{stroke:b.colour},a),1<b.length&&Blockly.utils.createSvgElement("line",{stroke:b.colour},a)):Blockly.utils.createSvgElement("line",{},a);return a};Blockly.Theme=function(a,b){this.blockStyles_=a;this.categoryStyles_=b};Blockly.Theme.prototype.setAllBlockStyles=function(a){for(var b in a)this.setBlockStyle(b,a[b])};Blockly.Theme.prototype.getAllBlockStyles=function(){return this.blockStyles_};Blockly.Theme.prototype.getBlockStyle=function(a){return this.blockStyles_[a]};Blockly.Theme.prototype.setBlockStyle=function(a,b){this.blockStyles_[a]=b};Blockly.Theme.prototype.getCategoryStyle=function(a){return this.categoryStyles_[a]};
Blockly.Theme.prototype.setCategoryStyle=function(a,b){this.categoryStyles_[a]=b};Blockly.Themes={};
var defaultBlockStyles={colour_blocks:{primaryColour:"20"},list_blocks:{primaryColour:"260"},logic_blocks:{primaryColour:"210"},loop_blocks:{primaryColour:"120"},math_blocks:{primaryColour:"230"},procedure_blocks:{primaryColour:"290"},text_blocks:{primaryColour:"160"},variable_blocks:{primaryColour:"330"},variable_dynamic_blocks:{primaryColour:"310"},hat_blocks:{primaryColour:"330",hat:"cap"}},categoryStyles={colour_category:{colour:"20"},list_category:{colour:"260"},logic_category:{colour:"210"},loop_category:{colour:"120"},
var 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"}},categoryStyles={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"}};Blockly.Themes.Classic=new Blockly.Theme(defaultBlockStyles,categoryStyles);Blockly.Options=function(a){var b=!!a.readOnly;if(b)var c=null,d=!1,e=!1,f=!1,g=!1,h=!1,k=!1;else{c=Blockly.Options.parseToolboxTree(a.toolbox);d=!(!c||!c.getElementsByTagName("category").length);e=a.trashcan;void 0===e&&(e=d);var l=a.maxTrashcanContents;e?void 0===l&&(l=32):l=0;f=a.collapse;void 0===f&&(f=d);g=a.comments;void 0===g&&(g=d);h=a.disable;void 0===h&&(h=d);k=a.sounds;void 0===k&&(k=!0)}var n=!!a.rtl,m=a.horizontalLayout;void 0===m&&(m=!1);var p=a.toolboxPosition;p="end"===p?!1:!0;p=m?
p?Blockly.TOOLBOX_AT_TOP:Blockly.TOOLBOX_AT_BOTTOM:p==n?Blockly.TOOLBOX_AT_RIGHT:Blockly.TOOLBOX_AT_LEFT;var q=a.scrollbars;void 0===q&&(q=d);var t=a.css;void 0===t&&(t=!0);var r="https://blockly-demo.appspot.com/static/media/";a.media?r=a.media:a.path&&(r=a.path+"media/");var u=void 0===a.oneBasedIndex?!0:!!a.oneBasedIndex,v=a.theme;void 0===v&&(v=Blockly.Themes.Classic);this.RTL=n;this.oneBasedIndex=u;this.collapse=f;this.comments=g;this.disable=h;this.readOnly=b;this.maxBlocks=a.maxBlocks||Infinity;
this.maxInstances=a.maxInstances;this.pathToMedia=r;this.hasCategories=d;this.hasScrollbars=q;this.hasTrashcan=e;this.maxTrashcanContents=l;this.hasSounds=k;this.hasCss=t;this.horizontalLayout=m;this.languageTree=c;this.gridOptions=Blockly.Options.parseGridOptions_(a);this.zoomOptions=Blockly.Options.parseZoomOptions_(a);this.toolboxPosition=p;this.theme=v};Blockly.Options.prototype.parentWorkspace=null;Blockly.Options.prototype.setMetrics=null;Blockly.Options.prototype.getMetrics=null;
@@ -1223,19 +1228,19 @@ Blockly.TouchGesture.prototype.dispose=function(){Blockly.TouchGesture.superClas
Blockly.TouchGesture.prototype.handleTouchMove=function(a){var b=Blockly.Touch.getTouchIdentifierFromEvent(a);this.cachedPoints_[b]=this.getTouchPoint(a);b=Object.keys(this.cachedPoints_);if(2==b.length){b=this.touchScale_=goog.math.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*Blockly.TouchGesture.ZOOM_IN_MULTIPLIER:c*Blockly.TouchGesture.ZOOM_OUT_MULTIPLIER;var d=
this.startWorkspace_,e=Blockly.utils.mouseToSvg(a,d.getParentSvg(),d.getInverseScreenCTM());d.zoom(e.x,e.y,c)}this.previousScale_=b;a.preventDefault()}};Blockly.TouchGesture.prototype.handleTouchEnd=function(a){a=Blockly.Touch.getTouchIdentifierFromEvent(a);this.cachedPoints_[a]&&delete this.cachedPoints_[a];2>Object.keys(this.cachedPoints_).length&&(this.cachedPoints_={},this.previousScale_=0)};
Blockly.TouchGesture.prototype.getTouchPoint=function(a){return this.startWorkspace_?new goog.math.Coordinate(a.pageX?a.pageX:a.changedTouches[0].pageX,a.pageY?a.pageY:a.changedTouches[0].pageY):null};Blockly.Trashcan=function(a){this.workspace_=a;0>=this.workspace_.options.maxTrashcanContents||(a={scrollbars:!0,disabledPatternId:this.workspace_.options.disabledPatternId,parentWorkspace:this.workspace_,RTL:this.workspace_.RTL,oneBasedIndex:this.workspace_.options.oneBasedIndex},this.workspace_.horizontalLayout?(a.toolboxPosition=this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_TOP?Blockly.TOOLBOX_AT_BOTTOM:Blockly.TOOLBOX_AT_TOP,this.flyout_=new Blockly.HorizontalFlyout(a)):(a.toolboxPosition=
this.workspace_.RTL?Blockly.TOOLBOX_AT_LEFT:Blockly.TOOLBOX_AT_RIGHT,this.flyout_=new Blockly.VerticalFlyout(a)),this.workspace_.addChangeListener(this.onDelete_()))};Blockly.Trashcan.prototype.WIDTH_=47;Blockly.Trashcan.prototype.BODY_HEIGHT_=44;Blockly.Trashcan.prototype.LID_HEIGHT_=16;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=20;Blockly.Trashcan.prototype.MARGIN_SIDE_=20;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=10;Blockly.Trashcan.prototype.SPRITE_LEFT_=0;
Blockly.Trashcan.prototype.SPRITE_TOP_=32;Blockly.Trashcan.prototype.HAS_BLOCKS_LID_ANGLE=.1;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.minOpenness_=0;Blockly.Trashcan.prototype.hasBlocks_=!1;Blockly.Trashcan.prototype.contents_=[];Blockly.Trashcan.prototype.svgGroup_=null;Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0;Blockly.Trashcan.prototype.left_=0;Blockly.Trashcan.prototype.top_=0;
this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT?Blockly.TOOLBOX_AT_LEFT:Blockly.TOOLBOX_AT_RIGHT,this.flyout_=new Blockly.VerticalFlyout(a)),this.workspace_.addChangeListener(this.onDelete_()))};Blockly.Trashcan.prototype.WIDTH_=47;Blockly.Trashcan.prototype.BODY_HEIGHT_=44;Blockly.Trashcan.prototype.LID_HEIGHT_=16;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=20;Blockly.Trashcan.prototype.MARGIN_SIDE_=20;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=10;
Blockly.Trashcan.prototype.SPRITE_LEFT_=0;Blockly.Trashcan.prototype.SPRITE_TOP_=32;Blockly.Trashcan.prototype.HAS_BLOCKS_LID_ANGLE=.1;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.minOpenness_=0;Blockly.Trashcan.prototype.hasBlocks_=!1;Blockly.Trashcan.prototype.contents_=[];Blockly.Trashcan.prototype.svgGroup_=null;Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0;Blockly.Trashcan.prototype.left_=0;
Blockly.Trashcan.prototype.top_=0;
Blockly.Trashcan.prototype.createDom=function(){this.svgGroup_=Blockly.utils.createSvgElement("g",{"class":"blocklyTrash"},null);var a=String(Math.random()).substring(2);var b=Blockly.utils.createSvgElement("clipPath",{id:"blocklyTrashBodyClipPath"+a},this.svgGroup_);Blockly.utils.createSvgElement("rect",{width:this.WIDTH_,height:this.BODY_HEIGHT_,y:this.LID_HEIGHT_},b);var c=Blockly.utils.createSvgElement("image",{width:Blockly.SPRITE.width,x:-this.SPRITE_LEFT_,height:Blockly.SPRITE.height,y:-this.SPRITE_TOP_,
"clip-path":"url(#blocklyTrashBodyClipPath"+a+")"},this.svgGroup_);c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url);b=Blockly.utils.createSvgElement("clipPath",{id:"blocklyTrashLidClipPath"+a},this.svgGroup_);Blockly.utils.createSvgElement("rect",{width:this.WIDTH_,height:this.LID_HEIGHT_},b);this.svgLid_=Blockly.utils.createSvgElement("image",{width:Blockly.SPRITE.width,x:-this.SPRITE_LEFT_,height:Blockly.SPRITE.height,y:-this.SPRITE_TOP_,
"clip-path":"url(#blocklyTrashLidClipPath"+a+")"},this.svgGroup_);this.svgLid_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEventWithChecks_(this.svgGroup_,"mouseup",this,this.click);Blockly.bindEvent_(c,"mouseover",this,this.mouseOver_);Blockly.bindEvent_(c,"mouseout",this,this.mouseOut_);this.animateLid_();return this.svgGroup_};
Blockly.Trashcan.prototype.init=function(a){0<this.workspace_.options.maxTrashcanContents&&(Blockly.utils.insertAfter(this.flyout_.createDom("svg"),this.workspace_.getParentSvg()),this.flyout_.init(this.workspace_));this.verticalSpacing_=this.MARGIN_BOTTOM_+a;this.setOpen_(!1);return this.verticalSpacing_+this.BODY_HEIGHT_+this.LID_HEIGHT_};
Blockly.Trashcan.prototype.init=function(a){0<this.workspace_.options.maxTrashcanContents&&(Blockly.utils.insertAfter(this.flyout_.createDom("svg"),this.workspace_.getParentSvg()),this.flyout_.init(this.workspace_),this.flyout_.isBlockCreatable_=function(){return!0});this.verticalSpacing_=this.MARGIN_BOTTOM_+a;this.setOpen_(!1);return this.verticalSpacing_+this.BODY_HEIGHT_+this.LID_HEIGHT_};
Blockly.Trashcan.prototype.dispose=function(){this.svgGroup_&&(Blockly.utils.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=this.svgLid_=null;clearTimeout(this.lidTask_)};
Blockly.Trashcan.prototype.position=function(){if(this.verticalSpacing_){var a=this.workspace_.getMetrics();a&&(this.workspace_.RTL?(this.left_=this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_LEFT&&(this.left_+=a.flyoutWidth,this.workspace_.toolbox_&&(this.left_+=a.absoluteLeft))):(this.left_=a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT&&(this.left_-=a.flyoutWidth)),
this.top_=a.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM?this.verticalSpacing_:a.viewHeight+a.absoluteTop-(this.BODY_HEIGHT_+this.LID_HEIGHT_)-this.verticalSpacing_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}};
Blockly.Trashcan.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect();return new goog.math.Rect(a.left+this.SPRITE_LEFT_-this.MARGIN_HOTSPOT_,a.top+this.SPRITE_TOP_-this.MARGIN_HOTSPOT_,this.WIDTH_+2*this.MARGIN_HOTSPOT_,this.LID_HEIGHT_+this.BODY_HEIGHT_+2*this.MARGIN_HOTSPOT_)};Blockly.Trashcan.prototype.setOpen_=function(a){this.isOpen!=a&&(clearTimeout(this.lidTask_),this.isOpen=a,this.animateLid_())};
Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2:-.2;this.lidOpen_=Math.min(Math.max(this.lidOpen_,this.minOpenness_),1);this.setLidAngle_(45*this.lidOpen_);this.svgGroup_.style.opacity=.4+.4*this.lidOpen_;this.lidOpen_>this.minOpenness_&&1>this.lidOpen_&&(this.lidTask_=setTimeout(this.animateLid_.bind(this),20))};
Blockly.Trashcan.prototype.setLidAngle_=function(a){this.svgLid_.setAttribute("transform","rotate("+(this.workspace_.RTL?-a:a)+","+(this.workspace_.RTL?4:this.WIDTH_-4)+","+(this.LID_HEIGHT_-2)+")")};Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)};Blockly.Trashcan.prototype.click=function(){if(this.hasBlocks_){for(var a=[],b=0,c;c=this.contents_[b];b++)a[b]=Blockly.Xml.textToDom(c).firstChild;this.flyout_.show(a)}};Blockly.Trashcan.prototype.mouseOver_=function(){this.hasBlocks_&&this.setOpen_(!0)};
Blockly.Trashcan.prototype.mouseOut_=function(){this.setOpen_(!1)};
Blockly.Trashcan.prototype.position=function(){if(this.verticalSpacing_){var a=this.workspace_.getMetrics();a&&(this.left_=a.toolboxPosition==Blockly.TOOLBOX_AT_LEFT||this.workspace_.horizontalLayout&&!this.workspace_.RTL?a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness:this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,this.top_=a.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM?this.verticalSpacing_:a.viewHeight+a.absoluteTop-(this.BODY_HEIGHT_+this.LID_HEIGHT_)-
this.verticalSpacing_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}};Blockly.Trashcan.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect();return new goog.math.Rect(a.left+this.SPRITE_LEFT_-this.MARGIN_HOTSPOT_,a.top+this.SPRITE_TOP_-this.MARGIN_HOTSPOT_,this.WIDTH_+2*this.MARGIN_HOTSPOT_,this.LID_HEIGHT_+this.BODY_HEIGHT_+2*this.MARGIN_HOTSPOT_)};
Blockly.Trashcan.prototype.setOpen_=function(a){this.isOpen!=a&&(clearTimeout(this.lidTask_),this.isOpen=a,this.animateLid_())};Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2:-.2;this.lidOpen_=Math.min(Math.max(this.lidOpen_,this.minOpenness_),1);this.setLidAngle_(45*this.lidOpen_);this.svgGroup_.style.opacity=.4+.4*this.lidOpen_;this.lidOpen_>this.minOpenness_&&1>this.lidOpen_&&(this.lidTask_=setTimeout(this.animateLid_.bind(this),20))};
Blockly.Trashcan.prototype.setLidAngle_=function(a){var b=this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT||this.workspace_.horizontalLayout&&this.workspace_.RTL;this.svgLid_.setAttribute("transform","rotate("+(b?-a:a)+","+(b?4:this.WIDTH_-4)+","+(this.LID_HEIGHT_-2)+")")};Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)};Blockly.Trashcan.prototype.click=function(){if(this.hasBlocks_){for(var a=[],b=0,c;c=this.contents_[b];b++)a[b]=Blockly.Xml.textToDom(c).firstChild;this.flyout_.show(a)}};
Blockly.Trashcan.prototype.mouseOver_=function(){this.hasBlocks_&&this.setOpen_(!0)};Blockly.Trashcan.prototype.mouseOut_=function(){this.setOpen_(!1)};
Blockly.Trashcan.prototype.onDelete_=function(){var a=this;return function(b){0>=a.workspace_.options.maxTrashcanContents||b.type!=Blockly.Events.BLOCK_DELETE||(b=a.cleanBlockXML_(b.oldXml),-1==a.contents_.indexOf(b)&&(a.contents_.unshift(b),a.contents_.length>a.workspace_.options.maxTrashcanContents&&a.contents_.splice(a.workspace_.options.maxTrashcanContents,a.contents_.length-a.workspace_.options.maxTrashcanContents),a.hasBlocks_=!0,a.minOpenness_=a.HAS_BLOCKS_LID_ANGLE,a.setLidAngle_(45*a.minOpenness_)))}};
Blockly.Trashcan.prototype.cleanBlockXML_=function(a){for(var b=a=a.cloneNode(!0);b;){b.removeAttribute&&(b.removeAttribute("x"),b.removeAttribute("y"),b.removeAttribute("id"));var c=b.firstChild||b.nextSibling;if(!c)for(c=b.parentNode;c;){if(c.nextSibling){c=c.nextSibling;break}c=c.parentNode}b=c}return"<xml>"+Blockly.Xml.domToText(a)+"</xml>"};Blockly.VariableModel=function(a,b,c,d){this.workspace=a;this.name=b;this.type=c||"";this.id_=d||Blockly.utils.genUid();Blockly.Events.fire(new Blockly.Events.VarCreate(this))};Blockly.VariableModel.prototype.getId=function(){return this.id_};Blockly.VariableModel.compareByName=function(a,b){a=a.name.toLowerCase();b=b.name.toLowerCase();return a<b?-1:a==b?0:1};Blockly.Variables={};Blockly.Variables.NAME_TYPE=Blockly.VARIABLE_CATEGORY_NAME;Blockly.Variables.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];f.getId()&&(a[f.getId()]=f)}}b=[];for(var g in a)b.push(a[g]);return b};Blockly.Variables.allUsedVariables=function(){console.warn("Deprecated call to Blockly.Variables.allUsedVariables. Use Blockly.Variables.allUsedVarModels instead.\nIf this is a major issue please file a bug on GitHub.")};
Blockly.Variables.ALL_DEVELOPER_VARS_WARNINGS_BY_BLOCK_TYPE_={};
@@ -1284,8 +1289,8 @@ Blockly.WorkspaceDragSurfaceSvg.prototype.setContentsAndShow=function(a,b,c,d,e,
Blockly.ZoomControls=function(a){this.workspace_=a};Blockly.ZoomControls.prototype.WIDTH_=32;Blockly.ZoomControls.prototype.HEIGHT_=110;Blockly.ZoomControls.prototype.MARGIN_BOTTOM_=20;Blockly.ZoomControls.prototype.MARGIN_SIDE_=20;Blockly.ZoomControls.prototype.svgGroup_=null;Blockly.ZoomControls.prototype.left_=0;Blockly.ZoomControls.prototype.top_=0;
Blockly.ZoomControls.prototype.createDom=function(){this.svgGroup_=Blockly.utils.createSvgElement("g",{},null);var a=String(Math.random()).substring(2);this.createZoomOutSvg_(a);this.createZoomInSvg_(a);this.createZoomResetSvg_(a);return this.svgGroup_};Blockly.ZoomControls.prototype.init=function(a){this.verticalSpacing_=this.MARGIN_BOTTOM_+a;return this.verticalSpacing_+this.HEIGHT_};
Blockly.ZoomControls.prototype.dispose=function(){this.svgGroup_&&(Blockly.utils.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=null};
Blockly.ZoomControls.prototype.position=function(){if(this.verticalSpacing_){var a=this.workspace_.getMetrics();a&&(this.workspace_.RTL?(this.left_=this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_LEFT&&(this.left_+=a.flyoutWidth,this.workspace_.toolbox_&&(this.left_+=a.absoluteLeft))):(this.left_=a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT&&(this.left_-=a.flyoutWidth)),
a.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM?(this.top_=this.verticalSpacing_,this.zoomInGroup_.setAttribute("transform","translate(0, 34)"),this.zoomResetGroup_.setAttribute("transform","translate(0, 77)")):(this.top_=a.viewHeight+a.absoluteTop-this.HEIGHT_-this.verticalSpacing_,this.zoomInGroup_.setAttribute("transform","translate(0, 43)"),this.zoomOutGroup_.setAttribute("transform","translate(0, 77)")),this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}};
Blockly.ZoomControls.prototype.position=function(){if(this.verticalSpacing_){var a=this.workspace_.getMetrics();a&&(this.left_=a.toolboxPosition==Blockly.TOOLBOX_AT_LEFT||this.workspace_.horizontalLayout&&!this.workspace_.RTL?a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness:this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM?(this.top_=this.verticalSpacing_,this.zoomInGroup_.setAttribute("transform","translate(0, 34)"),
this.zoomResetGroup_.setAttribute("transform","translate(0, 77)")):(this.top_=a.viewHeight+a.absoluteTop-this.HEIGHT_-this.verticalSpacing_,this.zoomInGroup_.setAttribute("transform","translate(0, 43)"),this.zoomOutGroup_.setAttribute("transform","translate(0, 77)")),this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}};
Blockly.ZoomControls.prototype.createZoomOutSvg_=function(a){var b=this.workspace_;this.zoomOutGroup_=Blockly.utils.createSvgElement("g",{"class":"blocklyZoom"},this.svgGroup_);var c=Blockly.utils.createSvgElement("clipPath",{id:"blocklyZoomoutClipPath"+a},this.zoomOutGroup_);Blockly.utils.createSvgElement("rect",{width:32,height:32},c);a=Blockly.utils.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-64,y:-92,"clip-path":"url(#blocklyZoomoutClipPath"+a+")"},this.zoomOutGroup_);
a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",b.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEventWithChecks_(a,"mousedown",null,function(a){b.markFocused();b.zoomCenter(-1);Blockly.Touch.clearTouchIdentifier();a.stopPropagation();a.preventDefault()})};
Blockly.ZoomControls.prototype.createZoomInSvg_=function(a){var b=this.workspace_;this.zoomInGroup_=Blockly.utils.createSvgElement("g",{"class":"blocklyZoom"},this.svgGroup_);var c=Blockly.utils.createSvgElement("clipPath",{id:"blocklyZoominClipPath"+a},this.zoomInGroup_);Blockly.utils.createSvgElement("rect",{width:32,height:32},c);a=Blockly.utils.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-32,y:-92,"clip-path":"url(#blocklyZoominClipPath"+a+")"},this.zoomInGroup_);
@@ -1313,8 +1318,9 @@ Blockly.WorkspaceSvg.prototype.translate=function(a,b){if(this.useWorkspaceDragS
Blockly.WorkspaceSvg.prototype.resetDragSurface=function(){if(this.useWorkspaceDragSurface_){this.isDragSurfaceActive_=!1;var a=this.workspaceDragSurface_.getSurfaceTranslation();this.workspaceDragSurface_.clearAndHide(this.svgGroup_);a="translate("+a.x+","+a.y+") scale("+this.scale+")";this.svgBlockCanvas_.setAttribute("transform",a);this.svgBubbleCanvas_.setAttribute("transform",a)}};
Blockly.WorkspaceSvg.prototype.setupDragSurface=function(){if(this.useWorkspaceDragSurface_&&!this.isDragSurfaceActive_){this.isDragSurfaceActive_=!0;var a=this.svgBlockCanvas_.previousSibling,b=parseInt(this.getParentSvg().getAttribute("width"),10),c=parseInt(this.getParentSvg().getAttribute("height"),10),d=Blockly.utils.getRelativeXY(this.svgBlockCanvas_);this.workspaceDragSurface_.setContentsAndShow(this.svgBlockCanvas_,this.svgBubbleCanvas_,a,b,c,this.scale);this.workspaceDragSurface_.translateSurface(d.x,
d.y)}};Blockly.WorkspaceSvg.prototype.getBlockDragSurface=function(){return this.blockDragSurface_};Blockly.WorkspaceSvg.prototype.getWidth=function(){var a=this.getMetrics();return a?a.viewWidth/this.scale:0};
Blockly.WorkspaceSvg.prototype.setVisible=function(a){this.scrollbar&&this.scrollbar.setContainerVisible(a);this.getFlyout_()&&this.getFlyout_().setContainerVisible(a);this.getParentSvg().style.display=a?"block":"none";this.toolbox_&&(this.toolbox_.HtmlDiv.style.display=a?"block":"none");a?(this.render(),this.toolbox_&&this.toolbox_.position()):Blockly.hideChaff(!0);this.isVisible_=a};Blockly.WorkspaceSvg.prototype.render=function(){for(var a=this.getAllBlocks(!1),b=a.length-1;0<=b;b--)a[b].render(!1)};
Blockly.WorkspaceSvg.prototype.traceOn=function(){console.warn("Deprecated call to traceOn, delete this.")};Blockly.WorkspaceSvg.prototype.highlightBlock=function(a,b){if(void 0===b){for(var c=0,d;d=this.highlightedBlocks_[c];c++)d.setHighlighted(!1);this.highlightedBlocks_.length=0}if(d=a?this.getBlockById(a):null)(a=void 0===b||b)?-1==this.highlightedBlocks_.indexOf(d)&&this.highlightedBlocks_.push(d):Blockly.utils.arrayRemove(this.highlightedBlocks_,d),d.setHighlighted(a)};
Blockly.WorkspaceSvg.prototype.setVisible=function(a){this.scrollbar&&this.scrollbar.setContainerVisible(a);this.getFlyout_()&&this.getFlyout_().setContainerVisible(a);this.getParentSvg().style.display=a?"block":"none";this.toolbox_&&(this.toolbox_.HtmlDiv.style.display=a?"block":"none");a?(this.render(),this.toolbox_&&this.toolbox_.position()):Blockly.hideChaff(!0);this.isVisible_=a};
Blockly.WorkspaceSvg.prototype.render=function(){for(var a=this.getAllBlocks(!1),b=a.length-1;0<=b;b--)a[b].render(!1);if(this.currentGesture_)for(a=this.currentGesture_.getInsertionMarkers(),b=0;b<a.length;b++)a[b].render(!1)};Blockly.WorkspaceSvg.prototype.traceOn=function(){console.warn("Deprecated call to traceOn, delete this.")};
Blockly.WorkspaceSvg.prototype.highlightBlock=function(a,b){if(void 0===b){for(var c=0,d;d=this.highlightedBlocks_[c];c++)d.setHighlighted(!1);this.highlightedBlocks_.length=0}if(d=a?this.getBlockById(a):null)(a=void 0===b||b)?-1==this.highlightedBlocks_.indexOf(d)&&this.highlightedBlocks_.push(d):Blockly.utils.arrayRemove(this.highlightedBlocks_,d),d.setHighlighted(a)};
Blockly.WorkspaceSvg.prototype.paste=function(a){!this.rendered||a.getElementsByTagName("block").length>=this.remainingCapacity()||(this.currentGesture_&&this.currentGesture_.cancel(),"comment"==a.tagName.toLowerCase()?this.pasteWorkspaceComment_(a):this.pasteBlock_(a))};
Blockly.WorkspaceSvg.prototype.pasteBlock_=function(a){Blockly.Events.disable();try{var b=Blockly.Xml.domToBlock(a,this),c=parseInt(a.getAttribute("x"),10),d=parseInt(a.getAttribute("y"),10);if(!isNaN(c)&&!isNaN(d)){this.RTL&&(c=-c);do{a=!1;for(var e=this.getAllBlocks(!1),f=0,g;g=e[f];f++){var h=g.getRelativeToSurfaceXY();if(1>=Math.abs(c-h.x)&&1>=Math.abs(d-h.y)){a=!0;break}}if(!a){var k=b.getConnections_(!1);f=0;for(var l;l=k[f];f++)if(l.closest(Blockly.SNAP_RADIUS,new goog.math.Coordinate(c,d)).connection){a=
!0;break}}a&&(c=this.RTL?c-Blockly.SNAP_RADIUS:c+Blockly.SNAP_RADIUS,d+=2*Blockly.SNAP_RADIUS)}while(a);b.moveBy(c,d)}}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&!b.isShadow()&&Blockly.Events.fire(new Blockly.Events.BlockCreate(b));b.select()};
@@ -1377,7 +1383,7 @@ Blockly.Extensions.buildTooltipWithFieldText=function(a,b){"object"==typeof docu
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))};Blockly.Extensions.register("parent_tooltip_when_inline",Blockly.Extensions.extensionParentTooltip_);Blockly.Field=function(a,b){this.size_=new goog.math.Size(0,Blockly.BlockSvg.MIN_BLOCK_Y);this.setValue(a);this.setValidator(b)};Blockly.Field.TYPE_MAP_={};Blockly.Field.register=function(a,b){if("string"!=typeof a||""==a.trim())throw Error('Invalid field type "'+a+'"');if(!b||"function"!=typeof b.fromJson)throw Error('Field "'+b+'" must have a fromJson function');Blockly.Field.TYPE_MAP_[a]=b};Blockly.Field.fromJson=function(a){var b=Blockly.Field.TYPE_MAP_[a.type];return b?b.fromJson(a):null};
Blockly.Field.cacheWidths_=null;Blockly.Field.cacheReference_=0;Blockly.Field.prototype.name=void 0;Blockly.Field.prototype.maxDisplayLength=50;Blockly.Field.prototype.text_="";Blockly.Field.prototype.sourceBlock_=null;Blockly.Field.prototype.visible_=!0;Blockly.Field.prototype.validator_=null;Blockly.Field.NBSP="\u00a0";Blockly.Field.prototype.EDITABLE=!0;Blockly.Field.prototype.setSourceBlock=function(a){if(this.sourceBlock_)throw Error("Field already bound to a block.");this.sourceBlock_=a};
Blockly.Field.prototype.init=function(){this.fieldGroup_||(this.fieldGroup_=Blockly.utils.createSvgElement("g",{},null),this.visible_||(this.fieldGroup_.style.display="none"),this.borderRect_=Blockly.utils.createSvgElement("rect",{rx:4,ry:4,x:-Blockly.BlockSvg.SEP_SPACE_X/2,y:0,height:16},this.fieldGroup_),this.textElement_=Blockly.utils.createSvgElement("text",{"class":"blocklyText",y:this.size_.height-12.5},this.fieldGroup_),this.updateEditable(),this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_),
this.mouseDownWrapper_=Blockly.bindEventWithChecks_(this.fieldGroup_,"mousedown",this,this.onMouseDown_),this.render_())};Blockly.Field.prototype.initModel=function(){};Blockly.Field.prototype.dispose=function(){this.mouseDownWrapper_&&(Blockly.unbindEvent_(this.mouseDownWrapper_),this.mouseDownWrapper_=null);this.sourceBlock_=null;this.fieldGroup_&&(Blockly.utils.removeNode(this.fieldGroup_),this.fieldGroup_=null);this.validator_=this.borderRect_=this.textElement_=null};
this.mouseDownWrapper_=Blockly.bindEventWithChecks_(this.fieldGroup_,"mousedown",this,this.onMouseDown_))};Blockly.Field.prototype.initModel=function(){};Blockly.Field.prototype.dispose=function(){this.mouseDownWrapper_&&(Blockly.unbindEvent_(this.mouseDownWrapper_),this.mouseDownWrapper_=null);this.sourceBlock_=null;this.fieldGroup_&&(Blockly.utils.removeNode(this.fieldGroup_),this.fieldGroup_=null);this.validator_=this.borderRect_=this.textElement_=null};
Blockly.Field.prototype.updateEditable=function(){var a=this.fieldGroup_;this.EDITABLE&&a&&(this.sourceBlock_.isEditable()?(Blockly.utils.addClass(a,"blocklyEditableText"),Blockly.utils.removeClass(a,"blocklyNonEditableText"),this.fieldGroup_.style.cursor=this.CURSOR):(Blockly.utils.addClass(a,"blocklyNonEditableText"),Blockly.utils.removeClass(a,"blocklyEditableText"),this.fieldGroup_.style.cursor=""))};
Blockly.Field.prototype.isCurrentlyEditable=function(){return this.EDITABLE&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()};Blockly.Field.prototype.isVisible=function(){return this.visible_};Blockly.Field.prototype.setVisible=function(a){if(this.visible_!=a){this.visible_=a;var b=this.getSvgRoot();b&&(b.style.display=a?"block":"none",this.render_())}};Blockly.Field.prototype.setValidator=function(a){this.validator_=a};Blockly.Field.prototype.getValidator=function(){return this.validator_};
Blockly.Field.prototype.classValidator=function(a){return a};Blockly.Field.prototype.callValidator=function(a){var b=this.classValidator(a);if(null===b)return null;void 0!==b&&(a=b);if(b=this.getValidator()){b=b.call(this,a);if(null===b)return null;void 0!==b&&(a=b)}return a};Blockly.Field.prototype.getSvgRoot=function(){return this.fieldGroup_};Blockly.Field.prototype.render_=function(){this.visible_?(this.textElement_.textContent=this.getDisplayText_(),this.updateWidth()):this.size_.width=0};
@@ -1400,12 +1406,12 @@ a=this.bubble_.getBubbleSize();this.bubble_.setBubbleSize(a.width,a.height)}else
Blockly.Warning.prototype.dispose=function(){this.block_.warning=null;Blockly.Icon.prototype.dispose.call(this)};Blockly.Block=function(a,b,c){if("undefined"!==typeof Blockly.Generator.prototype[b])throw Error('Block prototypeName "'+b+'" conflicts with Blockly.Generator members.');this.id=c&&!a.getBlockById(c)?c:Blockly.utils.genUid();a.blockDB_[this.id]=this;this.previousConnection=this.nextConnection=this.outputConnection=null;this.inputList=[];this.inputsInline=void 0;this.disabled=!1;this.tooltip="";this.contextMenu=!0;this.parentBlock_=null;this.childBlocks_=[];this.editable_=this.movable_=this.deletable_=
!0;this.collapsed_=this.isShadow_=!1;this.comment=null;this.xy_=new goog.math.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;if(b){this.type=b;c=Blockly.Blocks[b];if(!c||"object"!=typeof c)throw TypeError("Unknown block type: "+b);goog.mixin(this,c)}a.addTopBlock(this);a.addTypedBlock(this);"function"==typeof this.init&&this.init();this.inputsInlineDefault=this.inputsInline;if(Blockly.Events.isEnabled()){(a=
Blockly.Events.getGroup())||Blockly.Events.setGroup(!0);try{Blockly.Events.fire(new Blockly.Events.BlockCreate(this))}finally{a||Blockly.Events.setGroup(!1)}}"function"==typeof this.onchange&&this.setOnChange(this.onchange)};Blockly.Block.obtain=function(a,b){console.warn("Deprecated call to Blockly.Block.obtain, use workspace.newBlock instead.");return a.newBlock(b)};Blockly.Block.prototype.data=null;Blockly.Block.prototype.hue_=null;Blockly.Block.prototype.colour_="#000000";
Blockly.Block.prototype.secondaryColour_=null;Blockly.Block.prototype.tertiaryColour_=null;Blockly.Block.prototype.styleName_=null;
Blockly.Block.prototype.colourSecondary_=null;Blockly.Block.prototype.colourTertiary_=null;Blockly.Block.prototype.styleName_=null;
Blockly.Block.prototype.dispose=function(a){if(this.workspace){this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_);this.unplug(a);Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.BlockDelete(this));Blockly.Events.disable();try{this.workspace&&(this.workspace.removeTopBlock(this),this.workspace.removeTypedBlock(this),delete this.workspace.blockDB_[this.id],this.workspace=null);Blockly.selected==this&&(Blockly.selected=null);for(var b=this.childBlocks_.length-
1;0<=b;b--)this.childBlocks_[b].dispose(!1);b=0;for(var c;c=this.inputList[b];b++)c.dispose();this.inputList.length=0;var d=this.getConnections_(!0);for(b=0;b<d.length;b++){var e=d[b];e.isConnected()&&e.disconnect();d[b].dispose()}}finally{Blockly.Events.enable()}}};Blockly.Block.prototype.initModel=function(){for(var a=0,b;b=this.inputList[a];a++)for(var c=0,d;d=b.fieldRow[c];c++)d.initModel&&d.initModel()};
Blockly.Block.prototype.unplug=function(a){this.outputConnection?this.unplugFromRow_(a):this.previousConnection&&this.unplugFromStack_(a)};Blockly.Block.prototype.unplugFromRow_=function(a){var b=null;this.outputConnection.isConnected()&&(b=this.outputConnection.targetConnection,this.outputConnection.disconnect());b&&a&&(a=this.getOnlyValueConnection_())&&a.isConnected()&&(a=a.targetConnection,a.checkType_(b)&&(a.disconnect(),b.connect(a)))};
Blockly.Block.prototype.unplug=function(a){this.outputConnection?this.unplugFromRow_(a):this.previousConnection&&this.unplugFromStack_(a)};Blockly.Block.prototype.unplugFromRow_=function(a){var b=null;this.outputConnection.isConnected()&&(b=this.outputConnection.targetConnection,this.outputConnection.disconnect());b&&a&&(a=this.getOnlyValueConnection_())&&a.isConnected()&&!a.targetBlock().isShadow()&&(a=a.targetConnection,a.checkType_(b)&&(a.disconnect(),b.connect(a)))};
Blockly.Block.prototype.getOnlyValueConnection_=function(){for(var a=null,b=0;b<this.inputList.length;b++){var c=this.inputList[b].connection;if(c&&c.type==Blockly.INPUT_VALUE){if(a)return null;a=c}}return a};
Blockly.Block.prototype.unplugFromStack_=function(a){var b=null;this.previousConnection.isConnected()&&(b=this.previousConnection.targetConnection,this.previousConnection.disconnect());var c=this.getNextBlock();a&&c&&(a=this.nextConnection.targetConnection,a.disconnect(),b&&b.checkType_(a)&&b.connect(a))};
Blockly.Block.prototype.unplugFromStack_=function(a){var b=null;this.previousConnection.isConnected()&&(b=this.previousConnection.targetConnection,this.previousConnection.disconnect());var c=this.getNextBlock();a&&c&&!c.isShadow()&&(a=this.nextConnection.targetConnection,a.disconnect(),b&&b.checkType_(a)&&b.connect(a))};
Blockly.Block.prototype.getConnections_=function(a){a=[];this.outputConnection&&a.push(this.outputConnection);this.previousConnection&&a.push(this.previousConnection);this.nextConnection&&a.push(this.nextConnection);for(var b=0,c;c=this.inputList[b];b++)c.connection&&a.push(c.connection);return a};Blockly.Block.prototype.lastConnectionInStack=function(){for(var a=this.nextConnection;a;){var b=a.targetBlock();if(!b)return a;a=b.nextConnection}return null};Blockly.Block.prototype.bumpNeighbours_=function(){console.warn("Not expected to reach this bumpNeighbours_ function. The BlockSvg function for bumpNeighbours_ was expected to be called instead.")};
Blockly.Block.prototype.getParent=function(){return this.parentBlock_};Blockly.Block.prototype.getInputWithBlock=function(a){for(var b=0,c;c=this.inputList[b];b++)if(c.connection&&c.connection.targetBlock()==a)return c;return null};Blockly.Block.prototype.getSurroundParent=function(){var a=this;do{var b=a;a=a.getParent();if(!a)return null}while(a.getNextBlock()==b);return a};Blockly.Block.prototype.getNextBlock=function(){return this.nextConnection&&this.nextConnection.targetBlock()};
Blockly.Block.prototype.getPreviousBlock=function(){return this.previousConnection&&this.previousConnection.targetBlock()};Blockly.Block.prototype.getFirstStatementConnection=function(){for(var a=0,b;b=this.inputList[a];a++)if(b.connection&&b.connection.type==Blockly.NEXT_STATEMENT)return b.connection;return null};Blockly.Block.prototype.getRootBlock=function(){var a=this;do{var b=a;a=b.parentBlock_}while(a);return b};
@@ -1415,10 +1421,10 @@ Blockly.Block.prototype.getDescendants=function(a){for(var b=[this],c=this.getCh
Blockly.Block.prototype.setMovable=function(a){this.movable_=a};Blockly.Block.prototype.isDuplicatable=function(){return this.workspace.hasBlockLimits()?this.workspace.isCapacityAvailable(Blockly.utils.getBlockTypeCounts(this,!0)):!0};Blockly.Block.prototype.isShadow=function(){return this.isShadow_};Blockly.Block.prototype.setShadow=function(a){this.isShadow_=a};Blockly.Block.prototype.isInsertionMarker=function(){return this.isInsertionMarker_};
Blockly.Block.prototype.setInsertionMarker=function(a){this.isInsertionMarker_=a};Blockly.Block.prototype.isEditable=function(){return this.editable_&&!(this.workspace&&this.workspace.options.readOnly)};Blockly.Block.prototype.setEditable=function(a){this.editable_=a;a=0;for(var b;b=this.inputList[a];a++)for(var c=0,d;d=b.fieldRow[c];c++)d.updateEditable()};
Blockly.Block.prototype.setConnectionsHidden=function(a){if(!a&&this.isCollapsed()){if(this.outputConnection&&this.outputConnection.setHidden(a),this.previousConnection&&this.previousConnection.setHidden(a),this.nextConnection){this.nextConnection.setHidden(a);var b=this.nextConnection.targetBlock();b&&b.setConnectionsHidden(a)}}else for(var c=this.getConnections_(!0),d=0;b=c[d];d++)b.setHidden(a),b.isSuperior()&&(b=b.targetBlock())&&b.setConnectionsHidden(a)};
Blockly.Block.prototype.getMatchingConnection=function(a,b){var c=this.getConnections_(!0);a=a.getConnections_(!0);if(c.length!=a.length)throw Error("Connection lists did not match in length.");for(var d=0;d<a.length;d++)if(a[d]==b)return c[d];return null};Blockly.Block.prototype.setHelpUrl=function(a){this.helpUrl=a};Blockly.Block.prototype.setTooltip=function(a){this.tooltip=a};Blockly.Block.prototype.getColour=function(){return this.colour_};Blockly.Block.prototype.getSecondaryColour=function(){return this.secondaryColour_};
Blockly.Block.prototype.getTertiaryColour=function(){return this.tertiaryColour_};Blockly.Block.prototype.getStyleName=function(){return this.styleName_};Blockly.Block.prototype.getHue=function(){return this.hue_};
Blockly.Block.prototype.getMatchingConnection=function(a,b){var c=this.getConnections_(!0);a=a.getConnections_(!0);if(c.length!=a.length)throw Error("Connection lists did not match in length.");for(var d=0;d<a.length;d++)if(a[d]==b)return c[d];return null};Blockly.Block.prototype.setHelpUrl=function(a){this.helpUrl=a};Blockly.Block.prototype.setTooltip=function(a){this.tooltip=a};Blockly.Block.prototype.getColour=function(){return this.colour_};Blockly.Block.prototype.getColourSecondary=function(){return this.colourSecondary_};
Blockly.Block.prototype.getColourTertiary=function(){return this.colourTertiary_};Blockly.Block.prototype.getStyleName=function(){return this.styleName_};Blockly.Block.prototype.getHue=function(){return this.hue_};
Blockly.Block.prototype.setColour=function(a){var b="string"==typeof a?Blockly.utils.replaceMessageReferences(a):a,c=Number(b);if(!isNaN(c)&&0<=c&&360>=c)this.hue_=c,this.colour_=Blockly.hueToRgb(c);else if("string"==typeof b&&/^#[0-9a-fA-F]{6}$/.test(b))this.colour_=b,this.hue_=null;else throw c='Invalid colour: "'+b+'"',a!=b&&(c+=' (from "'+a+'")'),c;};
Blockly.Block.prototype.setStyle=function(a){var b=Blockly.getTheme();if(!b)throw Error("Trying to set block style to "+a+" before theme was defined via Blockly.setTheme().");b=b.getBlockStyle(a);this.styleName_=a;if(b)this.secondaryColour_=b.secondaryColour,this.tertiaryColour_=b.tertiaryColour,this.hat=b.hat,this.setColour(b.primaryColour);else throw Error("Invalid style name: "+a);};
Blockly.Block.prototype.setStyle=function(a){var b=Blockly.getTheme();if(!b)throw Error("Trying to set block style to "+a+" before theme was defined via Blockly.setTheme().");b=b.getBlockStyle(a);this.styleName_=a;if(b)this.colourSecondary_=b.colourSecondary,this.colourTertiary_=b.colourTertiary,this.hat=b.hat,this.setColour(b.colourPrimary);else throw Error("Invalid style name: "+a);};
Blockly.Block.prototype.setOnChange=function(a){if(a&&"function"!=typeof a)throw Error("onchange must be a function.");this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_);if(this.onchange=a)this.onchangeWrapper_=a.bind(this),this.workspace.addChangeListener(this.onchangeWrapper_)};Blockly.Block.prototype.getField=function(a){for(var b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)if(e.name===a)return e;return null};
Blockly.Block.prototype.getVars=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&a.push(e.getValue());return a};Blockly.Block.prototype.getVarModels=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&(e=this.workspace.getVariableById(e.getValue()))&&a.push(e);return a};
Blockly.Block.prototype.updateVarName=function(a){for(var b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&a.getId()==e.getValue()&&e.setText(a.name)};Blockly.Block.prototype.renameVarById=function(a,b){for(var c=0,d;d=this.inputList[c];c++)for(var e=0,f;f=d.fieldRow[e];e++)f.referencesVariables()&&a==f.getValue()&&f.setValue(b)};Blockly.Block.prototype.getFieldValue=function(a){return(a=this.getField(a))?a.getValue():null};
@@ -1481,7 +1487,7 @@ Blockly.BlockSvg.prototype.updateMovable=function(){this.isMovable()?Blockly.uti
Blockly.BlockSvg.prototype.setShadow=function(a){Blockly.BlockSvg.superClass_.setShadow.call(this,a);this.updateColour()};Blockly.BlockSvg.prototype.setInsertionMarker=function(a){this.isInsertionMarker_!=a&&(this.isInsertionMarker_=a)&&(this.setColour(Blockly.INSERTION_MARKER_COLOUR),Blockly.utils.addClass(this.svgGroup_,"blocklyInsertionMarker"))};Blockly.BlockSvg.prototype.getSvgRoot=function(){return this.svgGroup_};
Blockly.BlockSvg.prototype.dispose=function(a,b){if(this.workspace){Blockly.Tooltip.hide();Blockly.Field.startCache();var c=this.workspace;Blockly.selected==this&&(this.unselect(),this.workspace.cancelCurrentGesture());Blockly.ContextMenu.currentBlock==this&&Blockly.ContextMenu.hide();b&&this.rendered&&(this.unplug(a),Blockly.BlockAnimations.disposeUiEffect(this));this.rendered=!1;if(this.warningTextDb_){for(var d in this.warningTextDb_)clearTimeout(this.warningTextDb_[d]);this.warningTextDb_=null}this.unplug(a);
var e;Blockly.Events.isEnabled()&&(e=new Blockly.Events.BlockDelete(this));Blockly.Events.disable();try{var f=this.getIcons();for(b=0;b<f.length;b++)f[b].dispose();Blockly.BlockSvg.superClass_.dispose.call(this,a)}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&e&&Blockly.Events.fire(e);Blockly.utils.removeNode(this.svgGroup_);c.resizeContents();this.svgPathDark_=this.svgPathLight_=this.svgPath_=this.svgGroup_=null;Blockly.Field.stopCache()}};
Blockly.BlockSvg.prototype.updateColour=function(){if(!this.disabled){var a=this.getColour(),b=this.getSecondaryColour(),c=this.getTertiaryColour(),d=goog.color.hexToRgb(a);this.isShadow()?a=this.setShadowColour_(d,b):this.setBorderColour_(d,c);this.svgPath_.setAttribute("fill",a);a=this.getIcons();for(b=0;b<a.length;b++)a[b].updateColour();for(a=0;b=this.inputList[a];a++)for(c=0;d=b.fieldRow[c];c++)d.forceRerender()}};
Blockly.BlockSvg.prototype.updateColour=function(){if(!this.disabled){var a=this.getColour(),b=this.getColourSecondary(),c=this.getColourTertiary(),d=goog.color.hexToRgb(a);this.isShadow()?a=this.setShadowColour_(d,b):this.setBorderColour_(d,c);this.svgPath_.setAttribute("fill",a);a=this.getIcons();for(b=0;b<a.length;b++)a[b].updateColour();for(a=0;b=this.inputList[a];a++)for(c=0;d=b.fieldRow[c];c++)d.forceRerender()}};
Blockly.BlockSvg.prototype.setBorderColour_=function(a,b){b?(this.svgPathLight_.setAttribute("stroke","none"),this.svgPathDark_.setAttribute("fill","none"),this.svgPath_.setAttribute("stroke",b)):(this.svgPathLight_.style.display="",b=goog.color.rgbArrayToHex(goog.color.lighten(a,.3)),a=goog.color.rgbArrayToHex(goog.color.darken(a,.2)),this.svgPathLight_.setAttribute("stroke",b),this.svgPathDark_.setAttribute("fill",a),this.svgPath_.setAttribute("stroke","none"))};
Blockly.BlockSvg.prototype.setShadowColour_=function(a,b){b?(this.svgPathLight_.style.display="none",this.svgPathDark_.style.display="none",this.svgPath_.setAttribute("fill",b),a=b):(a=goog.color.lighten(a,.6),a=goog.color.rgbArrayToHex(a),this.svgPathLight_.style.display="none",this.svgPathDark_.setAttribute("fill",a));return a};
Blockly.BlockSvg.prototype.updateDisabled=function(){this.disabled||this.getInheritedDisabled()?Blockly.utils.addClass(this.svgGroup_,"blocklyDisabled")&&this.svgPath_.setAttribute("fill","url(#"+this.workspace.options.disabledPatternId+")"):Blockly.utils.removeClass(this.svgGroup_,"blocklyDisabled")&&this.updateColour();for(var a=this.getChildren(!1),b=0,c;c=a[b];b++)c.updateDisabled()};
@@ -1638,24 +1644,24 @@ Blockly.bindEventWithChecks_(this.svgBackground_,"mousedown",this,this.onMouseDo
Blockly.Flyout.prototype.dispose=function(){this.hide();Blockly.unbindEvent_(this.eventWrappers_);this.filterWrapper_&&(this.targetWorkspace_.removeChangeListener(this.filterWrapper_),this.filterWrapper_=null);this.scrollbar_&&(this.scrollbar_.dispose(),this.scrollbar_=null);this.workspace_&&(this.workspace_.targetWorkspace=null,this.workspace_.dispose(),this.workspace_=null);this.svgGroup_&&(Blockly.utils.removeNode(this.svgGroup_),this.svgGroup_=null);this.targetWorkspace_=this.svgBackground_=null};
Blockly.Flyout.prototype.getWidth=function(){return this.width_};Blockly.Flyout.prototype.getHeight=function(){return this.height_};Blockly.Flyout.prototype.getWorkspace=function(){return this.workspace_};Blockly.Flyout.prototype.isVisible=function(){return this.isVisible_};Blockly.Flyout.prototype.setVisible=function(a){var b=a!=this.isVisible();this.isVisible_=a;b&&this.updateDisplay_()};
Blockly.Flyout.prototype.setContainerVisible=function(a){var b=a!=this.containerVisible_;this.containerVisible_=a;b&&this.updateDisplay_()};Blockly.Flyout.prototype.updateDisplay_=function(){var a=this.containerVisible_?this.isVisible():!1;this.svgGroup_.style.display=a?"block":"none";this.scrollbar_.setContainerVisible(a)};
Blockly.Flyout.prototype.positionAt_=function(a,b,c,d){this.svgGroup_.setAttribute("width",a);this.svgGroup_.setAttribute("height",b);"svg"==this.svgGroup_.tagName?Blockly.utils.setCssTransform(this.svgGroup_,"translate("+c+"px,"+d+"px)"):this.svgGroup_.setAttribute("transform","translate("+c+","+d+")");this.scrollbar_&&(this.scrollbar_.setOrigin(c,d),this.scrollbar_.resize())};
Blockly.Flyout.prototype.positionAt_=function(a,b,c,d){this.svgGroup_.setAttribute("width",a);this.svgGroup_.setAttribute("height",b);"svg"==this.svgGroup_.tagName?Blockly.utils.setCssTransform(this.svgGroup_,"translate("+c+"px,"+d+"px)"):this.svgGroup_.setAttribute("transform","translate("+c+","+d+")");this.scrollbar_&&(this.scrollbar_.setOrigin(c,d),this.scrollbar_.resize(),this.scrollbar_.setPosition_(this.scrollbar_.position_.x,this.scrollbar_.position_.y))};
Blockly.Flyout.prototype.hide=function(){if(this.isVisible()){this.setVisible(!1);for(var a=0,b;b=this.listeners_[a];a++)Blockly.unbindEvent_(b);this.listeners_.length=0;this.reflowWrapper_&&(this.workspace_.removeChangeListener(this.reflowWrapper_),this.reflowWrapper_=null)}};
Blockly.Flyout.prototype.show=function(a){this.workspace_.setResizesEnabled(!1);this.hide();this.clearOldBlocks_();if("string"==typeof a){a=this.workspace_.targetWorkspace.getToolboxCategoryCallback(a);if("function"!=typeof a)throw TypeError("Couldn't find a callback function when opening a toolbox category.");a=a(this.workspace_.targetWorkspace);if(!Array.isArray(a))throw TypeError("Result of toolbox category callback must be an array.");}this.setVisible(!0);for(var b=[],c=[],d=this.permanentlyDisabled_.length=
0,e;e=a[d];d++)if(e.tagName){var f=e.tagName.toUpperCase(),g=this.horizontalLayout_?this.GAP_X:this.GAP_Y;if("BLOCK"==f)f=Blockly.Xml.domToBlock(e,this.workspace_),f.disabled&&this.permanentlyDisabled_.push(f),b.push({type:"block",block:f}),e=parseInt(e.getAttribute("gap"),10),c.push(isNaN(e)?g:e);else if("SEP"==e.tagName.toUpperCase())e=parseInt(e.getAttribute("gap"),10),!isNaN(e)&&0<c.length?c[c.length-1]=e:c.push(g);else if("BUTTON"==f||"LABEL"==f)e=new Blockly.FlyoutButton(this.workspace_,this.targetWorkspace_,
e,"LABEL"==f),b.push({type:"button",button:e}),c.push(g)}this.layout_(b,c);this.listeners_.push(Blockly.bindEventWithChecks_(this.svgBackground_,"mouseover",this,function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)c.removeSelect()}));this.horizontalLayout_?this.height_=0:this.width_=0;this.workspace_.setResizesEnabled(!0);this.reflow();this.filterForCapacity_();this.position();this.reflowWrapper_=this.reflow.bind(this);this.workspace_.addChangeListener(this.reflowWrapper_)};
Blockly.Flyout.prototype.clearOldBlocks_=function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)c.workspace==this.workspace_&&c.dispose(!1,!1);for(b=0;b<this.mats_.length;b++)(a=this.mats_[b])&&Blockly.utils.removeNode(a);for(b=this.mats_.length=0;a=this.buttons_[b];b++)a.dispose();this.buttons_.length=0;this.workspace_.getPotentialVariableMap().clear()};
Blockly.Flyout.prototype.addBlockListeners_=function(a,b,c){this.listeners_.push(Blockly.bindEventWithChecks_(a,"mousedown",null,this.blockMouseDown_(b)));this.listeners_.push(Blockly.bindEventWithChecks_(c,"mousedown",null,this.blockMouseDown_(b)));this.listeners_.push(Blockly.bindEvent_(a,"mouseover",b,b.addSelect));this.listeners_.push(Blockly.bindEvent_(a,"mouseout",b,b.removeSelect));this.listeners_.push(Blockly.bindEvent_(c,"mouseover",b,b.addSelect));this.listeners_.push(Blockly.bindEvent_(c,
"mouseout",b,b.removeSelect))};Blockly.Flyout.prototype.blockMouseDown_=function(a){var b=this;return function(c){var d=b.targetWorkspace_.getGesture(c);d&&(d.setStartBlock(a),d.handleFlyoutStart(c,b))}};Blockly.Flyout.prototype.onMouseDown_=function(a){var b=this.targetWorkspace_.getGesture(a);b&&b.handleFlyoutStart(a,this)};
"mouseout",b,b.removeSelect))};Blockly.Flyout.prototype.blockMouseDown_=function(a){var b=this;return function(c){var d=b.targetWorkspace_.getGesture(c);d&&(d.setStartBlock(a),d.handleFlyoutStart(c,b))}};Blockly.Flyout.prototype.onMouseDown_=function(a){var b=this.targetWorkspace_.getGesture(a);b&&b.handleFlyoutStart(a,this)};Blockly.Flyout.prototype.isBlockCreatable_=function(a){return!a.disabled};
Blockly.Flyout.prototype.createBlock=function(a){var b=null;Blockly.Events.disable();var c=this.targetWorkspace_.getAllVariables();this.targetWorkspace_.setResizesEnabled(!1);try{b=this.placeNewBlock_(a),Blockly.hideChaff()}finally{Blockly.Events.enable()}a=Blockly.Variables.getAddedVariables(this.targetWorkspace_,c);if(Blockly.Events.isEnabled())for(Blockly.Events.setGroup(!0),Blockly.Events.fire(new Blockly.Events.Create(b)),c=0;c<a.length;c++)Blockly.Events.fire(new Blockly.Events.VarCreate(a[c]));
this.autoClose?this.hide():this.filterForCapacity_();return b};Blockly.Flyout.prototype.initFlyoutButton_=function(a,b,c){var d=a.createDom();a.moveTo(b,c);a.show();this.listeners_.push(Blockly.bindEventWithChecks_(d,"mousedown",this,this.onMouseDown_));this.buttons_.push(a)};
Blockly.Flyout.prototype.createRect_=function(a,b,c,d,e){b=Blockly.utils.createSvgElement("rect",{"fill-opacity":0,x:b,y:c,height:d.height,width:d.width},null);b.tooltip=a;Blockly.Tooltip.bindMouseEvents(b);this.workspace_.getCanvas().insertBefore(b,a.getSvgRoot());a.flyoutRect_=b;return this.mats_[e]=b};
Blockly.Flyout.prototype.moveRectToBlock_=function(a,b){var c=b.getHeightWidth();a.setAttribute("width",c.width);a.setAttribute("height",c.height);var d=b.startHat_?Blockly.BlockSvg.START_HAT_HEIGHT:0;d&&b.moveBy(0,d);d=b.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0;b=b.getRelativeToSurfaceXY();a.setAttribute("y",b.y);a.setAttribute("x",this.RTL?b.x-c.width+d:b.x-d)};
Blockly.Flyout.prototype.filterForCapacity_=function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)-1==this.permanentlyDisabled_.indexOf(c)&&c.setDisabled(!this.targetWorkspace_.isCapacityAvailable(Blockly.utils.getBlockTypeCounts(c)))};Blockly.Flyout.prototype.reflow=function(){this.reflowWrapper_&&this.workspace_.removeChangeListener(this.reflowWrapper_);this.reflowInternal_();this.reflowWrapper_&&this.workspace_.addChangeListener(this.reflowWrapper_)};
Blockly.Flyout.prototype.filterForCapacity_=function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)if(-1==this.permanentlyDisabled_.indexOf(c))for(var d=!this.targetWorkspace_.isCapacityAvailable(Blockly.utils.getBlockTypeCounts(c));c;)c.setDisabled(d),c=c.getNextBlock()};Blockly.Flyout.prototype.reflow=function(){this.reflowWrapper_&&this.workspace_.removeChangeListener(this.reflowWrapper_);this.reflowInternal_();this.reflowWrapper_&&this.workspace_.addChangeListener(this.reflowWrapper_)};
Blockly.Flyout.prototype.isScrollable=function(){return this.scrollbar_?this.scrollbar_.isVisible():!1};
Blockly.Flyout.prototype.placeNewBlock_=function(a){var b=this.targetWorkspace_;if(!a.getSvgRoot())throw Error("oldBlock is not rendered.");var c=Blockly.Xml.blockToDom(a);b.setResizesEnabled(!1);c=Blockly.Xml.domToBlock(c,b);if(!c.getSvgRoot())throw Error("block is not rendered.");var d=b.getOriginOffsetInPixels(),e=this.workspace_.getOriginOffsetInPixels();a=a.getRelativeToSurfaceXY().scale(this.workspace_.scale);a=goog.math.Coordinate.sum(e,a);b=goog.math.Coordinate.difference(a,d).scale(1/b.scale);
c.moveBy(b.x,b.y);return c};Blockly.HorizontalFlyout=function(a){a.getMetrics=this.getMetrics_.bind(this);a.setMetrics=this.setMetrics_.bind(this);Blockly.HorizontalFlyout.superClass_.constructor.call(this,a);this.horizontalLayout_=!0};goog.inherits(Blockly.HorizontalFlyout,Blockly.Flyout);
Blockly.HorizontalFlyout.prototype.getMetrics_=function(){if(!this.isVisible())return null;try{var a=this.workspace_.getCanvas().getBBox()}catch(e){a={height:0,y:0,width:0,x:0}}var b=this.SCROLLBAR_PADDING,c=this.SCROLLBAR_PADDING;this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM&&(b=0);var d=this.height_;this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP&&(d-=this.SCROLLBAR_PADDING);return{viewHeight:d,viewWidth:this.width_-2*this.SCROLLBAR_PADDING,contentHeight:(a.height+2*this.MARGIN)*this.workspace_.scale,
contentWidth:(a.width+2*this.MARGIN)*this.workspace_.scale,viewTop:-this.workspace_.scrollY,viewLeft:-this.workspace_.scrollX,contentTop:a.y,contentLeft:a.x,absoluteTop:b,absoluteLeft:c}};Blockly.HorizontalFlyout.prototype.setMetrics_=function(a){var b=this.getMetrics_();b&&("number"==typeof a.x&&(this.workspace_.scrollX=-b.contentWidth*a.x),this.workspace_.translate(this.workspace_.scrollX+b.absoluteLeft,this.workspace_.scrollY+b.absoluteTop))};
contentWidth:(a.width+2*this.MARGIN)*this.workspace_.scale,viewTop:-this.workspace_.scrollY,viewLeft:-this.workspace_.scrollX,contentTop:0,contentLeft:0,absoluteTop:b,absoluteLeft:c}};Blockly.HorizontalFlyout.prototype.setMetrics_=function(a){var b=this.getMetrics_();b&&("number"==typeof a.x&&(this.workspace_.scrollX=-b.contentWidth*a.x),this.workspace_.translate(this.workspace_.scrollX+b.absoluteLeft,this.workspace_.scrollY+b.absoluteTop))};
Blockly.HorizontalFlyout.prototype.position=function(){if(this.isVisible()){var a=this.targetWorkspace_.getMetrics();if(a){this.width_=a.viewWidth;this.setBackgroundPath_(a.viewWidth-2*this.CORNER_RADIUS,this.height_-this.CORNER_RADIUS);var b=a.absoluteLeft,c=a.absoluteTop;this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM&&(c+=a.viewHeight-this.height_);this.positionAt_(this.width_,this.height_,b,c)}}};
Blockly.HorizontalFlyout.prototype.setBackgroundPath_=function(a,b){var c=this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP,d=["M 0,"+(c?0:this.CORNER_RADIUS)];c?(d.push("h",a+2*this.CORNER_RADIUS),d.push("v",b),d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,-this.CORNER_RADIUS,this.CORNER_RADIUS),d.push("h",-1*a),d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,-this.CORNER_RADIUS,-this.CORNER_RADIUS)):(d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,this.CORNER_RADIUS,-this.CORNER_RADIUS),
d.push("h",a),d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,this.CORNER_RADIUS,this.CORNER_RADIUS),d.push("v",b),d.push("h",-a-2*this.CORNER_RADIUS));d.push("z");this.svgBackground_.setAttribute("d",d.join(" "))};Blockly.HorizontalFlyout.prototype.scrollToStart=function(){this.scrollbar_.set(this.RTL?Infinity:0)};
@@ -1663,7 +1669,7 @@ Blockly.HorizontalFlyout.prototype.wheel_=function(a){var b=a.deltaX||a.deltaY;i
Blockly.HorizontalFlyout.prototype.layout_=function(a,b){this.workspace_.scale=this.targetWorkspace_.scale;var c=this.MARGIN,d=this.RTL?c:c+Blockly.BlockSvg.TAB_WIDTH;this.RTL&&(a=a.reverse());for(var e=0,f;f=a[e];e++)if("block"==f.type){f=f.block;for(var g=f.getDescendants(!1),h=0,k;k=g[h];h++)k.isInFlyout=!0;f.render();g=f.getSvgRoot();h=f.getHeightWidth();k=f.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0;k=this.RTL?d+h.width:d+k;f.moveBy(k,c);k=this.createRect_(f,k,c,h,e);d+=h.width+b[e];this.addBlockListeners_(g,
f,k)}else"button"==f.type&&(this.initFlyoutButton_(f.button,d,c),d+=f.button.width+b[e])};Blockly.HorizontalFlyout.prototype.isDragTowardWorkspace=function(a){a=Math.atan2(a.y,a.x)/Math.PI*180;var b=this.dragAngleRange_;return a<90+b&&a>90-b||a>-90-b&&a<-90+b?!0:!1};
Blockly.HorizontalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect(),b=a.top;a=a.height;if(this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP)return new goog.math.Rect(-1E9,b-1E9,2E9,1E9+a);if(this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM)return new goog.math.Rect(-1E9,b,2E9,1E9+a)};
Blockly.HorizontalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++)a=Math.max(a,d.getHeightWidth().height);a+=1.5*this.MARGIN;a*=this.workspace_.scale;a+=Blockly.Scrollbar.scrollbarThickness;if(this.height_!=a){for(c=0;d=b[c];c++)d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d);this.height_=a;this.targetWorkspace_.resize()}};Blockly.VerticalFlyout=function(a){a.getMetrics=this.getMetrics_.bind(this);a.setMetrics=this.setMetrics_.bind(this);Blockly.VerticalFlyout.superClass_.constructor.call(this,a);this.horizontalLayout_=!1};goog.inherits(Blockly.VerticalFlyout,Blockly.Flyout);
Blockly.HorizontalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++)a=Math.max(a,d.getHeightWidth().height);a+=1.5*this.MARGIN;a*=this.workspace_.scale;a+=Blockly.Scrollbar.scrollbarThickness;if(this.height_!=a){for(c=0;d=b[c];c++)d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d);this.height_=a;this.position()}};Blockly.VerticalFlyout=function(a){a.getMetrics=this.getMetrics_.bind(this);a.setMetrics=this.setMetrics_.bind(this);Blockly.VerticalFlyout.superClass_.constructor.call(this,a);this.horizontalLayout_=!1};goog.inherits(Blockly.VerticalFlyout,Blockly.Flyout);
Blockly.VerticalFlyout.prototype.getMetrics_=function(){if(!this.isVisible())return null;try{var a=this.workspace_.getCanvas().getBBox()}catch(e){a={height:0,y:0,width:0,x:0}}var b=this.SCROLLBAR_PADDING,c=this.height_-2*this.SCROLLBAR_PADDING,d=this.width_;this.RTL||(d-=this.SCROLLBAR_PADDING);return{viewHeight:c,viewWidth:d,contentHeight:a.height*this.workspace_.scale+2*this.MARGIN,contentWidth:a.width*this.workspace_.scale+2*this.MARGIN,viewTop:-this.workspace_.scrollY+a.y,viewLeft:-this.workspace_.scrollX,
contentTop:a.y,contentLeft:a.x,absoluteTop:b,absoluteLeft:0}};Blockly.VerticalFlyout.prototype.setMetrics_=function(a){var b=this.getMetrics_();b&&("number"==typeof a.y&&(this.workspace_.scrollY=-b.contentHeight*a.y),this.workspace_.translate(this.workspace_.scrollX+b.absoluteLeft,this.workspace_.scrollY+b.absoluteTop))};
Blockly.VerticalFlyout.prototype.position=function(){if(this.isVisible()){var a=this.targetWorkspace_.getMetrics();if(a){this.height_=a.viewHeight;this.setBackgroundPath_(this.width_-this.CORNER_RADIUS,a.viewHeight-2*this.CORNER_RADIUS);var b=a.absoluteTop,c=a.absoluteLeft;this.toolboxPosition_==Blockly.TOOLBOX_AT_RIGHT&&(this.leftEdge_=c+=a.viewWidth-this.width_);this.positionAt_(this.width_,this.height_,c,b)}}};
@@ -1674,7 +1680,7 @@ f.button.height+b[e])};Blockly.VerticalFlyout.prototype.isDragTowardWorkspace=fu
Blockly.VerticalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect(),b=a.left;a=a.width;if(this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT)return new goog.math.Rect(b-1E9,-1E9,1E9+a,2E9);if(goog.userAgent.GECKO&&this.targetWorkspace_&&this.targetWorkspace_.isMutator){var c=this.targetWorkspace_.svgGroup_.getBoundingClientRect().x;10>Math.abs(c-b)&&(b+=this.leftEdge_*this.targetWorkspace_.options.parentWorkspace.scale)}return new goog.math.Rect(b,
-1E9,1E9+a,2E9)};
Blockly.VerticalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++){var e=d.getHeightWidth().width;d.outputConnection&&(e-=Blockly.BlockSvg.TAB_WIDTH);a=Math.max(a,e)}for(c=0;d=this.buttons_[c];c++)a=Math.max(a,d.width);a+=1.5*this.MARGIN+Blockly.BlockSvg.TAB_WIDTH;a*=this.workspace_.scale;a+=Blockly.Scrollbar.scrollbarThickness;if(this.width_!=a){for(c=0;d=b[c];c++)this.RTL&&(e=d.getRelativeToSurfaceXY().x,
d.moveBy(a/this.workspace_.scale-this.MARGIN-Blockly.BlockSvg.TAB_WIDTH-e,0)),d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d);if(this.RTL)for(c=0;d=this.buttons_[c];c++)b=d.getPosition().y,d.moveTo(a/this.workspace_.scale-d.width-this.MARGIN-Blockly.BlockSvg.TAB_WIDTH,b);this.width_=a;this.targetWorkspace_.resize()}};Blockly.Toolbox=function(a){this.workspace_=a;this.RTL=a.options.RTL;this.horizontalLayout_=a.options.horizontalLayout;this.toolboxPosition=a.options.toolboxPosition;this.config_={indentWidth:19,cssRoot:"blocklyTreeRoot",cssHideRoot:"blocklyHidden",cssItem:"",cssTreeRow:"blocklyTreeRow",cssItemLabel:"blocklyTreeLabel",cssTreeIcon:"blocklyTreeIcon",cssExpandedFolderIcon:"blocklyTreeIconOpen",cssFileIcon:"blocklyTreeIconNone",cssSelectedRow:"blocklyTreeSelected"};this.treeSeparatorConfig_={cssTreeRow:"blocklyTreeSeparator"};
d.moveBy(a/this.workspace_.scale-this.MARGIN-Blockly.BlockSvg.TAB_WIDTH-e,0)),d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d);if(this.RTL)for(c=0;d=this.buttons_[c];c++)b=d.getPosition().y,d.moveTo(a/this.workspace_.scale-d.width-this.MARGIN-Blockly.BlockSvg.TAB_WIDTH,b);this.width_=a;this.position()}};Blockly.Toolbox=function(a){this.workspace_=a;this.RTL=a.options.RTL;this.horizontalLayout_=a.options.horizontalLayout;this.toolboxPosition=a.options.toolboxPosition;this.config_={indentWidth:19,cssRoot:"blocklyTreeRoot",cssHideRoot:"blocklyHidden",cssItem:"",cssTreeRow:"blocklyTreeRow",cssItemLabel:"blocklyTreeLabel",cssTreeIcon:"blocklyTreeIcon",cssExpandedFolderIcon:"blocklyTreeIconOpen",cssFileIcon:"blocklyTreeIconNone",cssSelectedRow:"blocklyTreeSelected"};this.treeSeparatorConfig_={cssTreeRow:"blocklyTreeSeparator"};
this.horizontalLayout_&&(this.config_.cssTreeRow+=a.RTL?" blocklyHorizontalTreeRtl":" blocklyHorizontalTree",this.treeSeparatorConfig_.cssTreeRow="blocklyTreeSeparatorHorizontal "+(a.RTL?"blocklyHorizontalTreeRtl":"blocklyHorizontalTree"),this.config_.cssTreeIcon="")};Blockly.Toolbox.prototype.width=0;Blockly.Toolbox.prototype.height=0;Blockly.Toolbox.prototype.selectedOption_=null;Blockly.Toolbox.prototype.lastCategory_=null;
Blockly.Toolbox.prototype.init=function(){var a=this.workspace_,b=this.workspace_.getParentSvg();this.HtmlDiv=document.createElement("div");this.HtmlDiv.className="blocklyToolboxDiv";this.HtmlDiv.setAttribute("dir",a.RTL?"RTL":"LTR");b.parentNode.insertBefore(this.HtmlDiv,b);Blockly.bindEventWithChecks_(this.HtmlDiv,"mousedown",this,function(a){Blockly.utils.isRightButton(a)||a.target==this.HtmlDiv?Blockly.hideChaff(!1):Blockly.hideChaff(!0);Blockly.Touch.clearTouchIdentifier()},!1,!0);b={disabledPatternId:a.options.disabledPatternId,
parentWorkspace:a,RTL:a.RTL,oneBasedIndex:a.options.oneBasedIndex,horizontalLayout:a.horizontalLayout,toolboxPosition:a.options.toolboxPosition};this.flyout_=null;this.flyout_=a.horizontalLayout?new Blockly.HorizontalFlyout(b):new Blockly.VerticalFlyout(b);Blockly.utils.insertAfter(this.flyout_.createDom("svg"),this.workspace_.getParentSvg());this.flyout_.init(a);this.config_.cleardotPath=a.options.pathToMedia+"1x1.gif";this.config_.cssCollapsedFolderIcon="blocklyTreeIconClosed"+(a.RTL?"Rtl":"Ltr");
@@ -1762,7 +1768,7 @@ Blockly.checkBlockColourConstants=function(){Blockly.checkBlockColourConstant_("
"HUE"],230);Blockly.checkBlockColourConstant_("TEXTS_HUE",["Blocks","texts","HUE"],void 0);Blockly.checkBlockColourConstant_("TEXTS_HUE",["Constants","Text","HUE"],160);Blockly.checkBlockColourConstant_("LISTS_HUE",["Blocks","lists","HUE"],void 0);Blockly.checkBlockColourConstant_("LISTS_HUE",["Constants","Lists","HUE"],260);Blockly.checkBlockColourConstant_("COLOUR_HUE",["Blocks","colour","HUE"],void 0);Blockly.checkBlockColourConstant_("COLOUR_HUE",["Constants","Colour","HUE"],20);Blockly.checkBlockColourConstant_("VARIABLES_HUE",
["Blocks","variables","HUE"],void 0);Blockly.checkBlockColourConstant_("VARIABLES_HUE",["Constants","Variables","HUE"],330);Blockly.checkBlockColourConstant_("VARIABLES_DYNAMIC_HUE",["Constants","VariablesDynamic","HUE"],310);Blockly.checkBlockColourConstant_("PROCEDURES_HUE",["Blocks","procedures","HUE"],void 0)};
Blockly.checkBlockColourConstant_=function(a,b,c){for(var d="Blockly",e=Blockly,f=0;f<b.length;++f)d+="."+b[f],e&&(e=e[b[f]]);e&&e!==c&&(a=(void 0===c?'%1 has been removed. Use Blockly.Msg["%2"].':'%1 is deprecated and unused. Override Blockly.Msg["%2"].').replace("%1",d).replace("%2",a),console.warn(a))};
Blockly.setTheme=function(a){this.theme_=a;a=Blockly.getMainWorkspace();this.updateBlockStyles_(a.getAllBlocks().filter(function(a){return void 0!==a.getStyleName()}));!a.toolbox_&&a.flyout_&&a.flyout_.workspace_?this.updateBlockStyles_(a.flyout_.workspace_.getAllBlocks()):a.refreshToolboxSelection();a.toolbox_&&a.toolbox_.updateColourFromTheme();var b=new Blockly.Events.Ui(null,"themeChanged");b.workspaceId=a.id;Blockly.Events.fire(b)};
Blockly.setTheme=function(a){this.theme_=a;a=Blockly.getMainWorkspace();this.updateBlockStyles_(a.getAllBlocks().filter(function(a){return void 0!==a.getStyleName()}));!a.toolbox_&&a.flyout_&&a.flyout_.workspace_?this.updateBlockStyles_(a.flyout_.workspace_.getAllBlocks()):a.refreshToolboxSelection();a.toolbox_&&a.toolbox_.updateColourFromTheme();var b=new Blockly.Events.Ui(null,"theme");b.workspaceId=a.id;Blockly.Events.fire(b)};
Blockly.updateBlockStyles_=function(a){for(var b=0;b<a.length;b++){var c=a[b],d=c.getStyleName();c.setStyle(d);c.mutator&&c.mutator.updateBlockStyle(d)}};Blockly.getTheme=function(){return this.theme_};goog.global.console||(goog.global.console={log:function(){},warn:function(){}});goog.global.Blockly||(goog.global.Blockly={});goog.global.Blockly.getMainWorkspace=Blockly.getMainWorkspace;goog.global.Blockly.addChangeListener=Blockly.addChangeListener;var blocklyApp={};
blocklyApp.NotificationsService=ng.core.Class({constructor:[function(){this.currentMessage="";this.timeouts=[]}],setDisplayedMessage_:function(a){this.currentMessage=a},getDisplayedMessage:function(){return this.currentMessage},speak:function(a){this.timeouts.forEach(function(a){clearTimeout(a)});this.timeouts.length=0;this.setDisplayedMessage_("");var b=this;this.timeouts.push(setTimeout(function(){b.setDisplayedMessage_(a)},20));this.timeouts.push(setTimeout(function(){b.setDisplayedMessage_("")},5E3))}});blocklyApp.AudioService=ng.core.Class({constructor:[blocklyApp.NotificationsService,function(a){this.notificationsService=a;this.canPlayAudio=!1;ACCESSIBLE_GLOBALS.hasOwnProperty("mediaPathPrefix")&&(this.canPlayAudio=!0,a=ACCESSIBLE_GLOBALS.mediaPathPrefix,this.AUDIO_PATHS_={connect:a+"click.mp3","delete":a+"delete.mp3",oops:a+"oops.mp3"});this.cachedAudioFiles_={};this.onEndedCallbacks_={connect:[],"delete":[],oops:[]}}],play_:function(a,b){if(this.canPlayAudio){this.cachedAudioFiles_.hasOwnProperty(a)||
(this.cachedAudioFiles_[a]=new Audio(this.AUDIO_PATHS_[a]));if(b)this.onEndedCallbacks_[a].push(b),this.cachedAudioFiles_[a].addEventListener("ended",b);else{var c=this;this.onEndedCallbacks_[a].forEach(function(b){c.cachedAudioFiles_[a].removeEventListener("ended",b)});this.onEndedCallbacks_[a].length=0}this.cachedAudioFiles_[a].play()}},playConnectSound:function(){this.play_("connect")},playDeleteSound:function(){this.play_("delete")},playOopsSound:function(a){if(a){var b=this;this.play_("oops",
File diff suppressed because one or more lines are too long
+52 -45
View File
@@ -42,7 +42,7 @@ goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototyp
goog.tagUnsealableClass=function(a){!COMPILED&&goog.defineClass.SEAL_CLASS_INSTANCES&&(a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]=!0)};goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable";
!COMPILED&&goog.DEPENDENCIES_ENABLED&&(goog.inHtmlDocument_=function(){var a=goog.global.document;return null!=a&&"write"in a},goog.isDocumentLoading_=function(){var a=goog.global.document;return a.attachEvent?"complete"!=a.readyState:"loading"==a.readyState},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH)&&goog.isString(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_()){var a=goog.global.document,b=a.currentScript;
a=b?[b]:a.getElementsByTagName("SCRIPT");for(b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?");d=-1==d?c.length:d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}}},goog.findBasePath_(),goog.Transpiler=function(){this.requiresTranspilation_=null;this.transpilationTarget_=goog.TRANSPILE_TO_LANGUAGE},goog.Transpiler.prototype.createRequiresTranspilation_=function(){function a(a,b){e?d[a]=!0:b()?(c=a,d[a]=!1):e=d[a]=!0}function b(a){try{return!!eval(a)}catch(h){return!1}}
var c="es3",d={es3:!1},e=!1,f=goog.global.navigator&&goog.global.navigator.userAgent?goog.global.navigator.userAgent:"";a("es5",function(){return b("[1,].length==1")});a("es6",function(){var a=f.match(/Edge\/(\d+)(\.\d)*/i);return a&&15>Number(a[1])?!1:b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')});
var c="es3",d={es3:!1},e=!1,f=goog.global.navigator&&goog.global.navigator.userAgent?goog.global.navigator.userAgent:"";a("es5",function(){return b("[1,].length==1")});a("es6",function(){return f.match(/Edge\/(\d+)(\.\d)*/i)?!1:b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')});
a("es6-impl",function(){return!0});a("es7",function(){return b("2 ** 2 == 4")});a("es8",function(){return b("async () => 1, true")});a("es9",function(){return b("({...rest} = {}), true")});a("es_next",function(){return!1});return{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(a,b){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var c=this.createRequiresTranspilation_();this.requiresTranspilation_=c.map;this.transpilationTarget_=
this.transpilationTarget_||c.target}if(a in this.requiresTranspilation_)return this.requiresTranspilation_[a]?!0:!goog.inHtmlDocument_()||"es6"!=b||"noModule"in goog.global.document.createElement("script")?!1:!0;throw Error("Unknown language mode: "+a);},goog.Transpiler.prototype.transpile=function(a,b){return goog.transpile_(a,b,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(a){return a.replace(/<\/(SCRIPT)/ig,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_=
{};this.idToPath_={};this.written_={};this.loadingDeps_=[];this.depsToLoad_=[];this.paused_=!1;this.factory_=new goog.DependencyFactory(goog.transpiler_);this.deferredCallbacks_={};this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(a,b){function c(){d&&(goog.global.setTimeout(d,0),d=null)}var d=b;if(a.length){for(var e=[],f=0;f<a.length;f++){var g=this.getPathFromDeps_(a[f]);if(!g)throw Error("Unregonized namespace: "+a[f]);e.push(this.dependencies_[g])}g=goog.require;var h=0;
@@ -386,7 +386,8 @@ goog.dom.safe.setLinkHrefAndRel=function(a,b,c){goog.dom.asserts.assertIsHTMLLin
goog.dom.safe.setObjectData=function(a,b){goog.dom.asserts.assertIsHTMLObjectElement(a);a.data=goog.html.TrustedResourceUrl.unwrap(b)};goog.dom.safe.setScriptSrc=function(a,b){goog.dom.asserts.assertIsHTMLScriptElement(a);a.src=goog.html.TrustedResourceUrl.unwrap(b);var c=goog.getScriptNonce();c&&a.setAttribute("nonce",c)};
goog.dom.safe.setScriptContent=function(a,b){goog.dom.asserts.assertIsHTMLScriptElement(a);a.text=goog.html.SafeScript.unwrap(b);var c=goog.getScriptNonce();c&&a.setAttribute("nonce",c)};goog.dom.safe.setLocationHref=function(a,b){goog.dom.asserts.assertIsLocation(a);var c=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);a.href=goog.html.SafeUrl.unwrap(c)};
goog.dom.safe.assignLocation=function(a,b){goog.dom.asserts.assertIsLocation(a);var c=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);a.assign(goog.html.SafeUrl.unwrap(c))};goog.dom.safe.replaceLocation=function(a,b){goog.dom.asserts.assertIsLocation(a);var c=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitizeAssertUnchanged(b);a.replace(goog.html.SafeUrl.unwrap(c))};
goog.dom.safe.openInWindow=function(a,b,c,d,e){a=a instanceof goog.html.SafeUrl?a:goog.html.SafeUrl.sanitizeAssertUnchanged(a);return(b||window).open(goog.html.SafeUrl.unwrap(a),c?goog.string.Const.unwrap(c):"",d,e)};goog.dom.safe.createImageFromBlob=function(a){if(!/^image\/.*/g.test(a.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var b=window.URL.createObjectURL(a);a=new Image;a.onload=function(){window.URL.revokeObjectURL(b)};a.src=b;return a};goog.html.uncheckedconversions={};goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(a,b,c){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(b,c||null)};
goog.dom.safe.openInWindow=function(a,b,c,d,e){a=a instanceof goog.html.SafeUrl?a:goog.html.SafeUrl.sanitizeAssertUnchanged(a);return(b||window).open(goog.html.SafeUrl.unwrap(a),c?goog.string.Const.unwrap(c):"",d,e)};goog.dom.safe.parseFromStringHtml=function(a,b){return a.parseFromString(goog.html.SafeHtml.unwrap(b),"text/html")};
goog.dom.safe.createImageFromBlob=function(a){if(!/^image\/.*/g.test(a.type))throw Error("goog.dom.safe.createImageFromBlob only accepts MIME type image/.*.");var b=window.URL.createObjectURL(a);a=new Image;a.onload=function(){window.URL.revokeObjectURL(b)};a.src=b;return a};goog.html.uncheckedconversions={};goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract=function(a,b,c){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(b,c||null)};
goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(b)};
goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b)};
goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract=function(a,b){goog.asserts.assertString(goog.string.Const.unwrap(a),"must provide justification");goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)),"must provide non-empty justification");return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b)};
@@ -909,7 +910,7 @@ Blockly.Touch.shouldHandleEvent=function(a){return!Blockly.Touch.isMouseOrTouchE
Blockly.Touch.checkTouchIdentifier=function(a){var b=Blockly.Touch.getTouchIdentifierFromEvent(a);return void 0!==Blockly.Touch.touchIdentifier_&&null!==Blockly.Touch.touchIdentifier_?Blockly.Touch.touchIdentifier_==b:"mousedown"==a.type||"touchstart"==a.type||"pointerdown"==a.type?(Blockly.Touch.touchIdentifier_=b,!0):!1};Blockly.Touch.setClientFromTouch=function(a){if(Blockly.utils.startsWith(a.type,"touch")){var b=a.changedTouches[0];a.clientX=b.clientX;a.clientY=b.clientY}};
Blockly.Touch.isMouseOrTouchEvent=function(a){return Blockly.utils.startsWith(a.type,"touch")||Blockly.utils.startsWith(a.type,"mouse")||Blockly.utils.startsWith(a.type,"pointer")};Blockly.Touch.isTouchEvent=function(a){return Blockly.utils.startsWith(a.type,"touch")||Blockly.utils.startsWith(a.type,"pointer")};
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};Blockly.Events={};Blockly.Events.group_="";Blockly.Events.recordUndo=!0;Blockly.Events.disabled_=0;Blockly.Events.CREATE="create";Blockly.Events.BLOCK_CREATE=Blockly.Events.CREATE;Blockly.Events.DELETE="delete";Blockly.Events.BLOCK_DELETE=Blockly.Events.DELETE;Blockly.Events.CHANGE="change";Blockly.Events.BLOCK_CHANGE=Blockly.Events.CHANGE;Blockly.Events.MOVE="move";Blockly.Events.BLOCK_MOVE=Blockly.Events.MOVE;Blockly.Events.VAR_CREATE="var_create";Blockly.Events.VAR_DELETE="var_delete";
Blockly.Events.VAR_RENAME="var_rename";Blockly.Events.UI="ui";Blockly.Events.COMMENT_CREATE="comment_create";Blockly.Events.COMMENT_DELETE="comment_delete";Blockly.Events.COMMENT_CHANGE="comment_change";Blockly.Events.COMMENT_MOVE="comment_move";Blockly.Events.FIRE_QUEUE_=[];Blockly.Events.fire=function(a){Blockly.Events.isEnabled()&&(Blockly.Events.FIRE_QUEUE_.length||setTimeout(Blockly.Events.fireNow_,0),Blockly.Events.FIRE_QUEUE_.push(a))};
Blockly.Events.VAR_RENAME="var_rename";Blockly.Events.UI="ui";Blockly.Events.COMMENT_CREATE="comment_create";Blockly.Events.COMMENT_DELETE="comment_delete";Blockly.Events.COMMENT_CHANGE="comment_change";Blockly.Events.COMMENT_MOVE="comment_move";Blockly.Events.FINISHED_LOADING="finished_loading";Blockly.Events.FIRE_QUEUE_=[];Blockly.Events.fire=function(a){Blockly.Events.isEnabled()&&(Blockly.Events.FIRE_QUEUE_.length||setTimeout(Blockly.Events.fireNow_,0),Blockly.Events.FIRE_QUEUE_.push(a))};
Blockly.Events.fireNow_=function(){for(var a=Blockly.Events.filter(Blockly.Events.FIRE_QUEUE_,!0),b=Blockly.Events.FIRE_QUEUE_.length=0,c;c=a[b];b++){var d=Blockly.Workspace.getById(c.workspaceId);d&&d.fireChangeListener(c)}};
Blockly.Events.filter=function(a,b){var c=a.slice();b||c.reverse();for(var d=[],e=Object.create(null),f=0,g;g=c[f];f++)if(!g.isNull()){var h=[g.type,g.blockId,g.workspaceId].join(" "),k=e[h],l=k?k.event:null;k?g.type==Blockly.Events.MOVE&&k.index==f-1?(l.newParentId=g.newParentId,l.newInputName=g.newInputName,l.newCoordinate=g.newCoordinate,k.index=f):g.type==Blockly.Events.CHANGE&&g.element==l.element&&g.name==l.name?l.newValue=g.newValue:g.type!=Blockly.Events.UI||"click"!=g.element||"commentOpen"!=
l.element&&"mutatorOpen"!=l.element&&"warningOpen"!=l.element?(e[h]={event:g,index:1},d.push(g)):l.newValue=g.newValue:(e[h]={event:g,index:f},d.push(g))}c=d.filter(function(a){return!a.isNull()});b||c.reverse();for(f=1;g=c[f];f++)g.type==Blockly.Events.CHANGE&&"mutation"==g.element&&c.unshift(c.splice(f,1)[0]);return c};Blockly.Events.clearPendingUndo=function(){for(var a=0,b;b=Blockly.Events.FIRE_QUEUE_[a];a++)b.recordUndo=!1};Blockly.Events.disable=function(){Blockly.Events.disabled_++};
@@ -949,7 +950,9 @@ Blockly.Events.Move.prototype.toJson=function(){var a=Blockly.Events.Move.superC
Blockly.Events.Move.prototype.fromJson=function(a){Blockly.Events.Move.superClass_.fromJson.call(this,a);this.newParentId=a.newParentId;this.newInputName=a.newInputName;a.newCoordinate&&(a=a.newCoordinate.split(","),this.newCoordinate=new goog.math.Coordinate(parseFloat(a[0]),parseFloat(a[1])))};Blockly.Events.Move.prototype.recordNew=function(){var a=this.currentLocation_();this.newParentId=a.parentId;this.newInputName=a.inputName;this.newCoordinate=a.coordinate};
Blockly.Events.Move.prototype.currentLocation_=function(){var a=Blockly.Workspace.getById(this.workspaceId).getBlockById(this.blockId),b={},c=a.getParent();if(c){if(b.parentId=c.id,a=c.getInputWithBlock(a))b.inputName=a.name}else b.coordinate=a.getRelativeToSurfaceXY();return b};Blockly.Events.Move.prototype.isNull=function(){return this.oldParentId==this.newParentId&&this.oldInputName==this.newInputName&&goog.math.Coordinate.equals(this.oldCoordinate,this.newCoordinate)};
Blockly.Events.Move.prototype.run=function(a){var b=this.getEventWorkspace_(),c=b.getBlockById(this.blockId);if(c){var d=a?this.newParentId:this.oldParentId,e=a?this.newInputName:this.oldInputName;a=a?this.newCoordinate:this.oldCoordinate;var f=null;if(d&&(f=b.getBlockById(d),!f)){console.warn("Can't connect to non-existent block: "+d);return}c.getParent()&&c.unplug();if(a)e=c.getRelativeToSurfaceXY(),c.moveBy(a.x-e.x,a.y-e.y);else{c=c.outputConnection||c.previousConnection;if(e){if(b=f.getInput(e))var g=
b.connection}else c.type==Blockly.PREVIOUS_STATEMENT&&(g=f.nextConnection);g?c.connect(g):console.warn("Can't connect to non-existent input: "+e)}}else console.warn("Can't move non-existent block: "+this.blockId)};Blockly.Xml.workspaceToDom=function(a,b){var c=Blockly.Xml.utils.createElement("xml"),d=Blockly.Xml.variablesToDom(Blockly.Variables.allUsedVarModels(a));d.hasChildNodes()&&c.appendChild(d);var e=a.getTopComments(!0);d=0;for(var f;f=e[d];d++)c.appendChild(f.toXmlWithXY(b));e=a.getTopBlocks(!0);for(d=0;f=e[d];d++)c.appendChild(Blockly.Xml.blockToDomWithXY(f,b));return c};
b.connection}else c.type==Blockly.PREVIOUS_STATEMENT&&(g=f.nextConnection);g?c.connect(g):console.warn("Can't connect to non-existent input: "+e)}}else console.warn("Can't move non-existent block: "+this.blockId)};
Blockly.Events.FinishedLoading=function(a){this.workspaceId=a.id;this.group=Blockly.Events.group_;this.recordUndo=!1};goog.inherits(Blockly.Events.FinishedLoading,Blockly.Events.Abstract);Blockly.Events.FinishedLoading.prototype.type=Blockly.Events.FINISHED_LOADING;Blockly.Events.FinishedLoading.prototype.toJson=function(){var a={type:this.type};this.group&&(a.group=this.group);this.workspaceId&&(a.workspaceId=this.workspaceId);return a};
Blockly.Events.FinishedLoading.prototype.fromJson=function(a){this.workspaceId=a.workspaceId;this.group=a.group};Blockly.Xml.workspaceToDom=function(a,b){var c=Blockly.Xml.utils.createElement("xml"),d=Blockly.Xml.variablesToDom(Blockly.Variables.allUsedVarModels(a));d.hasChildNodes()&&c.appendChild(d);var e=a.getTopComments(!0);d=0;for(var f;f=e[d];d++)c.appendChild(f.toXmlWithXY(b));e=a.getTopBlocks(!0);for(d=0;f=e[d];d++)c.appendChild(Blockly.Xml.blockToDomWithXY(f,b));return c};
Blockly.Xml.variablesToDom=function(a){for(var b=Blockly.Xml.utils.createElement("variables"),c=0,d;d=a[c];c++){var e=Blockly.Xml.utils.createElement("variable");e.appendChild(Blockly.Xml.utils.createTextNode(d.name));e.setAttribute("type",d.type);e.setAttribute("id",d.getId());b.appendChild(e)}return b};
Blockly.Xml.blockToDomWithXY=function(a,b){var c;a.workspace.RTL&&(c=a.workspace.getWidth());var d=Blockly.Xml.blockToDom(a,b),e=a.getRelativeToSurfaceXY();d.setAttribute("x",Math.round(a.workspace.RTL?c-e.x:e.x));d.setAttribute("y",Math.round(e.y));return d};
Blockly.Xml.fieldToDomVariable_=function(a){null==a.getValue()&&(a.initModel(),a.getValue());var b=a.getVariable();if(!b)throw Error("Tried to serialize a variable field with no variable.");var c=Blockly.Xml.utils.createElement("field");c.appendChild(Blockly.Xml.utils.createTextNode(b.name));c.setAttribute("name",a.name);c.setAttribute("id",b.getId());c.setAttribute("variabletype",b.type);return c};
@@ -963,7 +966,7 @@ Blockly.Xml.domToPrettyText=function(a){a=Blockly.Xml.domToText(a).split("<");fo
Blockly.Xml.textToDom=function(a){a=Blockly.Xml.utils.textToDomDocument(a);if(!a||!a.documentElement||"xml"!=a.documentElement.nodeName.toLowerCase())throw TypeError("Blockly.Xml.textToDom expected an <xml> document.");return a.documentElement};Blockly.Xml.clearWorkspaceAndLoadFromXml=function(a,b){b.setResizesEnabled(!1);b.clear();var c=Blockly.Xml.domToWorkspace(a,b);b.setResizesEnabled(!0);return c};
Blockly.Xml.domToWorkspace=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToWorkspace, swap the arguments.")}var d;b.RTL&&(d=b.getWidth());c=[];Blockly.Field.startCache();var e=a.childNodes.length,f=Blockly.Events.getGroup();f||Blockly.Events.setGroup(!0);b.setResizesEnabled&&b.setResizesEnabled(!1);var g=!0;try{for(var h=0;h<e;h++){var k=a.childNodes[h],l=k.nodeName.toLowerCase();if("block"==l||"shadow"==l&&!Blockly.Events.recordUndo){var n=
Blockly.Xml.domToBlock(k,b);c.push(n.id);var m=k.hasAttribute("x")?parseInt(k.getAttribute("x"),10):10,p=k.hasAttribute("y")?parseInt(k.getAttribute("y"),10):10;isNaN(m)||isNaN(p)||n.moveBy(b.RTL?d-m:m,p);g=!1}else{if("shadow"==l)throw TypeError("Shadow block cannot be a top-level block.");if("comment"==l)b.rendered?Blockly.WorkspaceCommentSvg.fromXml(k,b,d):Blockly.WorkspaceComment.fromXml(k,b);else if("variables"==l){if(g)Blockly.Xml.domToVariables(k,b);else throw Error("'variables' tag must exist once before block and shadow tag elements in the workspace XML, but it was found in another location.");
g=!1}}}}finally{f||Blockly.Events.setGroup(!1),Blockly.Field.stopCache()}b.setResizesEnabled&&b.setResizesEnabled(!0);return c};
g=!1}}}}finally{f||Blockly.Events.setGroup(!1),Blockly.Field.stopCache()}b.setResizesEnabled&&b.setResizesEnabled(!0);Blockly.Events.fire(new Blockly.Events.FinishedLoading(b));return c};
Blockly.Xml.appendDomToWorkspace=function(a,b){if(b.hasOwnProperty("scale")){var c=Blockly.BlockSvg.TAB_WIDTH;try{Blockly.BlockSvg.TAB_WIDTH=0;var d=b.getBlocksBoundingBox()}finally{Blockly.BlockSvg.TAB_WIDTH=c}}c=Blockly.Xml.domToWorkspace(a,b);if(d&&d.height){var e=d.y+d.height;var f=d.x;var g=Infinity,h=Infinity;for(d=0;d<c.length;d++){var k=b.getBlockById(c[d]).getRelativeToSurfaceXY();k.y<h&&(h=k.y);k.x<g&&(g=k.x)}e=e-h+Blockly.BlockSvg.SEP_SPACE_Y;f-=g;var l;b.RTL&&(l=b.getWidth());for(d=0;d<
c.length;d++)b.getBlockById(c[d]).moveBy(b.RTL?l-f:f,e)}return c};
Blockly.Xml.domToBlock=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToBlock, swap the arguments.")}Blockly.Events.disable();c=b.getAllVariables();try{var d=Blockly.Xml.domToBlockHeadless_(a,b),e=d.getDescendants(!1);if(b.rendered){d.setConnectionsHidden(!0);for(var f=e.length-1;0<=f;f--)e[f].initSvg();for(f=e.length-1;0<=f;f--)e[f].render(!1);setTimeout(function(){d.workspace&&d.setConnectionsHidden(!1)},1);d.updateDisabled();b.resizeContents()}else for(f=
@@ -1001,7 +1004,7 @@ Blockly.Workspace.prototype.removeTypedBlock=function(a){this.typedBlocksDB_[a.t
Blockly.Workspace.prototype.getBlocksByType=function(a,b){if(!this.typedBlocksDB_[a])return[];var c=this.typedBlocksDB_[a].slice(0);b&&1<c.length&&(this.sortObjects_.offset=Math.sign(Blockly.utils.toRadians(Blockly.Workspace.SCAN_ANGLE)),this.RTL&&(this.sortObjects_.offset*=-1),c.sort(this.sortObjects_));return c};
Blockly.Workspace.prototype.addTopComment=function(a){this.topComments_.push(a);this.commentDB_[a.id]&&console.warn('Overriding an existing comment on this workspace, with id "'+a.id+'"');this.commentDB_[a.id]=a};Blockly.Workspace.prototype.removeTopComment=function(a){if(!Blockly.utils.arrayRemove(this.topComments_,a))throw Error("Comment not present in workspace's list of top-most comments.");delete this.commentDB_[a.id]};
Blockly.Workspace.prototype.getTopComments=function(a){var b=[].concat(this.topComments_);a&&1<b.length&&(this.sortObjects_.offset=Math.sin(Blockly.utils.toRadians(Blockly.Workspace.SCAN_ANGLE)),this.RTL&&(this.sortObjects_.offset*=-1),b.sort(this.sortObjects_));return b};
Blockly.Workspace.prototype.getAllBlocks=function(a){if(a){a=this.getTopBlocks(!0);for(var b=[],c=0;c<a.length;c++)b.push.apply(b,a[c].getDescendants(!0))}else for(b=this.getTopBlocks(!1),c=0;c<b.length;c++)b.push.apply(b,b[c].getChildren(!1));return b};
Blockly.Workspace.prototype.getAllBlocks=function(a){if(a){a=this.getTopBlocks(!0);for(var b=[],c=0;c<a.length;c++)b.push.apply(b,a[c].getDescendants(!0))}else for(b=this.getTopBlocks(!1),c=0;c<b.length;c++)b.push.apply(b,b[c].getChildren(!1));return b.filter(function(a){return!a.isInsertionMarker()})};
Blockly.Workspace.prototype.clear=function(){this.isClearing=!0;try{var a=Blockly.Events.getGroup();for(a||Blockly.Events.setGroup(!0);this.topBlocks_.length;)this.topBlocks_[0].dispose();for(;this.topComments_.length;)this.topComments_[this.topComments_.length-1].dispose();a||Blockly.Events.setGroup(!1);this.variableMap_.clear();this.potentialVariableMap_&&this.potentialVariableMap_.clear()}finally{this.isClearing=!1}};
Blockly.Workspace.prototype.renameVariableById=function(a,b){this.variableMap_.renameVariableById(a,b)};Blockly.Workspace.prototype.createVariable=function(a,b,c){return this.variableMap_.createVariable(a,b,c)};Blockly.Workspace.prototype.getVariableUsesById=function(a){return this.variableMap_.getVariableUsesById(a)};Blockly.Workspace.prototype.deleteVariableById=function(a){this.variableMap_.deleteVariableById(a)};
Blockly.Workspace.prototype.deleteVariableInternal_=function(a,b){this.variableMap_.deleteVariableInternal_(a,b)};Blockly.Workspace.prototype.variableIndexOf=function(a){console.warn("Deprecated call to Blockly.Workspace.prototype.variableIndexOf");return-1};Blockly.Workspace.prototype.getVariable=function(a,b){return this.variableMap_.getVariable(a,b)};Blockly.Workspace.prototype.getVariableById=function(a){return this.variableMap_.getVariableById(a)};
@@ -1069,12 +1072,13 @@ Blockly.Connection.prototype.respawnShadow_=function(){var a=this.getSourceBlock
Blockly.Connection.prototype.targetBlock=function(){return this.isConnected()?this.targetConnection.getSourceBlock():null};Blockly.Connection.prototype.checkType_=function(a){if(!this.check_||!a.check_)return!0;for(var b=0;b<this.check_.length;b++)if(-1!=a.check_.indexOf(this.check_[b]))return!0;return!1};Blockly.Connection.prototype.onCheckChanged_=function(){this.isConnected()&&!this.checkType_(this.targetConnection)&&(this.isSuperior()?this.targetBlock():this.sourceBlock_).unplug()};
Blockly.Connection.prototype.setCheck=function(a){a?(Array.isArray(a)||(a=[a]),this.check_=a,this.onCheckChanged_()):this.check_=null;return this};Blockly.Connection.prototype.getCheck=function(){return this.check_};Blockly.Connection.prototype.setShadowDom=function(a){this.shadowDom_=a};Blockly.Connection.prototype.getShadowDom=function(){return this.shadowDom_};Blockly.Connection.prototype.neighbours_=function(){return[]};
Blockly.Connection.prototype.toString=function(){var a=this.sourceBlock_;if(a)if(a.outputConnection==this)var b="Output Connection of ";else if(a.previousConnection==this)b="Previous Connection of ";else if(a.nextConnection==this)b="Next Connection of ";else{b=null;for(var c=0,d;d=a.inputList[c];c++)if(d.connection==this){b=d;break}if(b)b='Input "'+b.name+'" connection on ';else return console.warn("Connection not actually connected to sourceBlock_"),"Orphan Connection"}else return"Orphan Connection";
return b+a.toDevString()};Blockly.ConnectionDB=function(){};Blockly.ConnectionDB.prototype=[];Blockly.ConnectionDB.constructor=Blockly.ConnectionDB;Blockly.ConnectionDB.prototype.addConnection=function(a){if(a.inDB_)throw Error("Connection already in database.");if(!a.getSourceBlock().isInFlyout){var b=this.findPositionForConnection_(a);this.splice(b,0,a);a.inDB_=!0}};
Blockly.ConnectionDB.prototype.findConnection=function(a){if(!this.length)return-1;var b=this.findPositionForConnection_(a);if(b>=this.length)return-1;for(var c=a.y_,d=b;0<=d&&this[d].y_==c;){if(this[d]==a)return d;d--}for(;b<this.length&&this[b].y_==c;){if(this[b]==a)return b;b++}return-1};
Blockly.ConnectionDB.prototype.findPositionForConnection_=function(a){if(!this.length)return 0;for(var b=0,c=this.length;b<c;){var d=Math.floor((b+c)/2);if(this[d].y_<a.y_)b=d+1;else if(this[d].y_>a.y_)c=d;else{b=d;break}}return b};Blockly.ConnectionDB.prototype.removeConnection_=function(a){if(!a.inDB_)throw Error("Connection not in database.");var b=this.findConnection(a);if(-1==b)throw Error("Unable to find connection in connectionDB.");a.inDB_=!1;this.splice(b,1)};
Blockly.ConnectionDB.prototype.getNeighbours=function(a,b){function c(a){var c=e-d[a].x_,g=f-d[a].y_;Math.sqrt(c*c+g*g)<=b&&l.push(d[a]);return g<b}for(var d=this,e=a.x_,f=a.y_,g=0,h=d.length-2,k=h;g<k;)d[k].y_<f?g=k:h=k,k=Math.floor((g+h)/2);var l=[];h=g=k;if(d.length){for(;0<=g&&c(g);)g--;do h++;while(h<d.length&&c(h))}return l};Blockly.ConnectionDB.prototype.isInYRange_=function(a,b,c){return Math.abs(this[a].y_-b)<=c};
Blockly.ConnectionDB.prototype.searchForClosest=function(a,b,c){if(!this.length)return{connection:null,radius:b};var d=a.y_,e=a.x_;a.x_=e+c.x;a.y_=d+c.y;var f=this.findPositionForConnection_(a);c=null;for(var g=b,h,k=f-1;0<=k&&this.isInYRange_(k,a.y_,b);)h=this[k],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),k--;for(;f<this.length&&this.isInYRange_(f,a.y_,b);)h=this[f],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),f++;a.x_=e;a.y_=d;return{connection:c,radius:g}};
Blockly.ConnectionDB.init=function(a){var b=[];b[Blockly.INPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.OUTPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.NEXT_STATEMENT]=new Blockly.ConnectionDB;b[Blockly.PREVIOUS_STATEMENT]=new Blockly.ConnectionDB;a.connectionDBList=b};Blockly.constants={};Blockly.DRAG_RADIUS=5;Blockly.FLYOUT_DRAG_RADIUS=10;Blockly.SNAP_RADIUS=28;Blockly.CONNECTING_SNAP_RADIUS=Blockly.SNAP_RADIUS;Blockly.CURRENT_CONNECTION_PREFERENCE=8;Blockly.INSERTION_MARKER_COLOUR="#000000";Blockly.BUMP_DELAY=250;Blockly.BUMP_RANDOMNESS=10;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.SOUND_LIMIT=100;Blockly.DRAG_STACK=!0;Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.SVG_NS="http://www.w3.org/2000/svg";
return b+a.toDevString()};Blockly.ConnectionDB=function(){this.connections_=[]};Blockly.ConnectionDB.prototype.addConnection=function(a){if(a.inDB_)throw Error("Connection already in database.");if(!a.getSourceBlock().isInFlyout){var b=this.findPositionForConnection_(a);this.connections_.splice(b,0,a);a.inDB_=!0}};
Blockly.ConnectionDB.prototype.findConnection=function(a){if(!this.connections_.length)return-1;var b=this.findPositionForConnection_(a);if(b>=this.connections_.length)return-1;for(var c=a.y_,d=b;0<=d&&this.connections_[d].y_==c;){if(this.connections_[d]==a)return d;d--}for(;b<this.connections_.length&&this.connections_[b].y_==c;){if(this.connections_[b]==a)return b;b++}return-1};
Blockly.ConnectionDB.prototype.findPositionForConnection_=function(a){if(!this.connections_.length)return 0;for(var b=0,c=this.connections_.length;b<c;){var d=Math.floor((b+c)/2);if(this.connections_[d].y_<a.y_)b=d+1;else if(this.connections_[d].y_>a.y_)c=d;else{b=d;break}}return b};
Blockly.ConnectionDB.prototype.removeConnection_=function(a){if(!a.inDB_)throw Error("Connection not in database.");var b=this.findConnection(a);if(-1==b)throw Error("Unable to find connection in connectionDB.");a.inDB_=!1;this.connections_.splice(b,1)};
Blockly.ConnectionDB.prototype.getNeighbours=function(a,b){function c(a){var c=e-d[a].x_,g=f-d[a].y_;Math.sqrt(c*c+g*g)<=b&&l.push(d[a]);return g<b}for(var d=this.connections_,e=a.x_,f=a.y_,g=0,h=d.length-2,k=h;g<k;)d[k].y_<f?g=k:h=k,k=Math.floor((g+h)/2);var l=[];h=g=k;if(d.length){for(;0<=g&&c(g);)g--;do h++;while(h<d.length&&c(h))}return l};Blockly.ConnectionDB.prototype.isInYRange_=function(a,b,c){return Math.abs(this.connections_[a].y_-b)<=c};
Blockly.ConnectionDB.prototype.searchForClosest=function(a,b,c){if(!this.connections_.length)return{connection:null,radius:b};var d=a.y_,e=a.x_;a.x_=e+c.x;a.y_=d+c.y;var f=this.findPositionForConnection_(a);c=null;for(var g=b,h,k=f-1;0<=k&&this.isInYRange_(k,a.y_,b);)h=this.connections_[k],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),k--;for(;f<this.connections_.length&&this.isInYRange_(f,a.y_,b);)h=this.connections_[f],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),f++;a.x_=e;a.y_=
d;return{connection:c,radius:g}};Blockly.ConnectionDB.init=function(a){var b=[];b[Blockly.INPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.OUTPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.NEXT_STATEMENT]=new Blockly.ConnectionDB;b[Blockly.PREVIOUS_STATEMENT]=new Blockly.ConnectionDB;a.connectionDBList=b};Blockly.constants={};Blockly.DRAG_RADIUS=5;Blockly.FLYOUT_DRAG_RADIUS=10;Blockly.SNAP_RADIUS=28;Blockly.CONNECTING_SNAP_RADIUS=Blockly.SNAP_RADIUS;Blockly.CURRENT_CONNECTION_PREFERENCE=8;Blockly.INSERTION_MARKER_COLOUR="#000000";Blockly.BUMP_DELAY=250;Blockly.BUMP_RANDOMNESS=10;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.SOUND_LIMIT=100;Blockly.DRAG_STACK=!0;Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.SVG_NS="http://www.w3.org/2000/svg";
Blockly.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;Blockly.ALIGN_CENTRE=0;Blockly.ALIGN_RIGHT=1;Blockly.DRAG_NONE=0;Blockly.DRAG_STICKY=1;Blockly.DRAG_BEGIN=1;Blockly.DRAG_FREE=2;Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE;
Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.TOOLBOX_AT_TOP=0;Blockly.TOOLBOX_AT_BOTTOM=1;Blockly.TOOLBOX_AT_LEFT=2;Blockly.TOOLBOX_AT_RIGHT=3;Blockly.DELETE_AREA_NONE=null;Blockly.DELETE_AREA_TRASH=1;Blockly.DELETE_AREA_TOOLBOX=2;Blockly.VARIABLE_CATEGORY_NAME="VARIABLE";Blockly.VARIABLE_DYNAMIC_CATEGORY_NAME="VARIABLE_DYNAMIC";Blockly.PROCEDURE_CATEGORY_NAME="PROCEDURE";
Blockly.RENAME_VARIABLE_ID="RENAME_VARIABLE_ID";Blockly.DELETE_VARIABLE_ID="DELETE_VARIABLE_ID";Blockly.BlockAnimations={};Blockly.BlockAnimations.disconnectPid_=0;Blockly.BlockAnimations.disconnectGroup_=null;Blockly.BlockAnimations.disposeUiEffect=function(a){var b=a.workspace,c=a.getSvgRoot();b.getAudioManager().play("delete");a=b.getSvgXY(c);c=c.cloneNode(!0);c.translateX_=a.x;c.translateY_=a.y;c.setAttribute("transform","translate("+a.x+","+a.y+")");b.getParentSvg().appendChild(c);c.bBox_=c.getBBox();Blockly.BlockAnimations.disposeUiStep_(c,b.RTL,new Date,b.scale)};
@@ -1115,7 +1119,8 @@ Blockly.InsertionMarkerManager.prototype.highlightBlock_=function(){var a=this.c
Blockly.InsertionMarkerManager.prototype.unhighlightBlock_=function(){var a=this.closestConnection_;a.type!=Blockly.INPUT_VALUE||a.isConnected()?this.highlightedBlock_.highlightForReplacement(!1):this.highlightedBlock_.highlightShapeForInput(a,!1);this.highlightedBlock_=null;this.highlightingBlock_=!1};
Blockly.InsertionMarkerManager.prototype.disconnectMarker_=function(){if(this.markerConnection_){var a=this.markerConnection_,b=a.sourceBlock_,c=b.nextConnection,d=b.previousConnection,e=b.outputConnection;e=a.type==Blockly.INPUT_VALUE&&!(e&&e.targetConnection);!(a!=c||d&&d.targetConnection)||e?a.targetBlock().unplug(!1):a.type==Blockly.NEXT_STATEMENT&&a!=c?(c=a.targetConnection,c.sourceBlock_.unplug(!1),d=d?d.targetConnection:null,b.unplug(!0),d&&d.connect(c)):b.unplug(!0);if(a.targetConnection)throw"markerConnection_ still connected at the end of disconnectInsertionMarker";
this.markerConnection_=null;b.getSvgRoot().setAttribute("visibility","hidden")}else console.log("No insertion marker connection to disconnect")};
Blockly.InsertionMarkerManager.prototype.connectMarker_=function(){var a=this.localConnection_,b=this.closestConnection_,c=this.lastOnStack_&&a==this.lastOnStack_?this.lastMarker_:this.firstMarker_;a=c.getMatchingConnection(a.sourceBlock_,a);goog.asserts.assert(a!=this.markerConnection_,"Made it to connectMarker_ even though the marker isn't changing");c.render();c.rendered=!0;c.getSvgRoot().setAttribute("visibility","visible");c.positionNewBlock(c,a,b);a.connect(b);this.markerConnection_=a};Blockly.BlockDragger=function(a,b){this.draggingBlock_=a;this.workspace_=b;this.draggedConnectionManager_=new Blockly.InsertionMarkerManager(this.draggingBlock_);this.deleteArea_=null;this.wouldDeleteBlock_=!1;this.startXY_=this.draggingBlock_.getRelativeToSurfaceXY();this.dragIconData_=Blockly.BlockDragger.initIconData_(a)};
Blockly.InsertionMarkerManager.prototype.connectMarker_=function(){var a=this.localConnection_,b=this.closestConnection_,c=this.lastOnStack_&&a==this.lastOnStack_?this.lastMarker_:this.firstMarker_;a=c.getMatchingConnection(a.sourceBlock_,a);goog.asserts.assert(a!=this.markerConnection_,"Made it to connectMarker_ even though the marker isn't changing");c.render();c.rendered=!0;c.getSvgRoot().setAttribute("visibility","visible");c.positionNewBlock(c,a,b);a.connect(b);this.markerConnection_=a};
Blockly.InsertionMarkerManager.prototype.getInsertionMarkers=function(){var a=[];this.firstMarker_&&a.push(this.firstMarker_);this.lastMarker_&&a.push(this.lastMarker_);return a};Blockly.BlockDragger=function(a,b){this.draggingBlock_=a;this.workspace_=b;this.draggedConnectionManager_=new Blockly.InsertionMarkerManager(this.draggingBlock_);this.deleteArea_=null;this.wouldDeleteBlock_=!1;this.startXY_=this.draggingBlock_.getRelativeToSurfaceXY();this.dragIconData_=Blockly.BlockDragger.initIconData_(a)};
Blockly.BlockDragger.prototype.dispose=function(){this.startWorkspace_=this.workspace_=this.draggingBlock_=null;this.dragIconData_.length=0;this.draggedConnectionManager_&&(this.draggedConnectionManager_.dispose(),this.draggedConnectionManager_=null)};Blockly.BlockDragger.initIconData_=function(a){var b=[];a=a.getDescendants(!1);for(var c=0,d;d=a[c];c++){d=d.getIcons();for(var e=0;e<d.length;e++){var f={location:d[e].getIconLocation(),icon:d[e]};b.push(f)}}return b};
Blockly.BlockDragger.prototype.startBlockDrag=function(a,b){Blockly.Events.getGroup()||Blockly.Events.setGroup(!0);this.workspace_.isMutator&&this.draggingBlock_.bringToFront();Blockly.Field.startCache();this.workspace_.setResizesEnabled(!1);Blockly.BlockAnimations.disconnectUiStop();if(this.draggingBlock_.getParent()||b&&this.draggingBlock_.nextConnection&&this.draggingBlock_.nextConnection.targetBlock()){this.draggingBlock_.unplug(b);var c=this.pixelsToWorkspaceUnits_(a);c=goog.math.Coordinate.sum(this.startXY_,
c);this.draggingBlock_.translate(c.x,c.y);Blockly.BlockAnimations.disconnectUiEffect(this.draggingBlock_)}this.draggingBlock_.setDragging(!0);this.draggingBlock_.moveToDragSurface_();if(c=this.workspace_.getToolbox()){var d=this.draggingBlock_.isDeletable()?"blocklyToolboxDelete":"blocklyToolboxGrab";c.addStyle(d)}};
@@ -1124,7 +1129,8 @@ Blockly.BlockDragger.prototype.endBlockDrag=function(a,b){this.dragBlock(a,b);th
this.draggingBlock_.render(),this.draggingBlock_.scheduleSnapAndBump());this.workspace_.setResizesEnabled(!0);if(c=this.workspace_.getToolbox())d=this.draggingBlock_.isDeletable()?"blocklyToolboxDelete":"blocklyToolboxGrab",c.removeStyle(d);Blockly.Events.setGroup(!1)};Blockly.BlockDragger.prototype.fireMoveEvent_=function(){var a=new Blockly.Events.BlockMove(this.draggingBlock_);a.oldCoordinate=this.startXY_;a.recordNew();Blockly.Events.fire(a)};
Blockly.BlockDragger.prototype.maybeDeleteBlock_=function(){var a=this.workspace_.trashcan;this.wouldDeleteBlock_?(a&&setTimeout(a.close.bind(a),100),this.fireMoveEvent_(),this.draggingBlock_.dispose(!1,!0)):a&&a.close();return this.wouldDeleteBlock_};
Blockly.BlockDragger.prototype.updateCursorDuringBlockDrag_=function(){this.wouldDeleteBlock_=this.draggedConnectionManager_.wouldDeleteBlock();var a=this.workspace_.trashcan;this.wouldDeleteBlock_?(this.draggingBlock_.setDeleteStyle(!0),this.deleteArea_==Blockly.DELETE_AREA_TRASH&&a&&a.setOpen_(!0)):(this.draggingBlock_.setDeleteStyle(!1),a&&a.setOpen_(!1))};
Blockly.BlockDragger.prototype.pixelsToWorkspaceUnits_=function(a){a=new goog.math.Coordinate(a.x/this.workspace_.scale,a.y/this.workspace_.scale);this.workspace_.isMutator&&(a=a.scale(1/this.workspace_.options.parentWorkspace.scale));return a};Blockly.BlockDragger.prototype.dragIcons_=function(a){for(var b=0;b<this.dragIconData_.length;b++){var c=this.dragIconData_[b];c.icon.setIconLocation(goog.math.Coordinate.sum(c.location,a))}};Blockly.WorkspaceCommentSvg=function(a,b,c,d,e){this.svgGroup_=Blockly.utils.createSvgElement("g",{"class":"blocklyComment"},null);this.svgGroup_.translate_="";this.svgRect_=Blockly.utils.createSvgElement("rect",{"class":"blocklyCommentRect",x:0,y:0,rx:Blockly.WorkspaceCommentSvg.BORDER_RADIUS,ry:Blockly.WorkspaceCommentSvg.BORDER_RADIUS});this.svgGroup_.appendChild(this.svgRect_);this.rendered_=!1;this.useDragSurface_=Blockly.utils.is3dSupported()&&!!a.blockDragSurface_;Blockly.WorkspaceCommentSvg.superClass_.constructor.call(this,
Blockly.BlockDragger.prototype.pixelsToWorkspaceUnits_=function(a){a=new goog.math.Coordinate(a.x/this.workspace_.scale,a.y/this.workspace_.scale);this.workspace_.isMutator&&(a=a.scale(1/this.workspace_.options.parentWorkspace.scale));return a};Blockly.BlockDragger.prototype.dragIcons_=function(a){for(var b=0;b<this.dragIconData_.length;b++){var c=this.dragIconData_[b];c.icon.setIconLocation(goog.math.Coordinate.sum(c.location,a))}};
Blockly.BlockDragger.prototype.getInsertionMarkers=function(){return this.draggedConnectionManager_&&this.draggedConnectionManager_.getInsertionMarkers?this.draggedConnectionManager_.getInsertionMarkers():[]};Blockly.WorkspaceCommentSvg=function(a,b,c,d,e){this.svgGroup_=Blockly.utils.createSvgElement("g",{"class":"blocklyComment"},null);this.svgGroup_.translate_="";this.svgRect_=Blockly.utils.createSvgElement("rect",{"class":"blocklyCommentRect",x:0,y:0,rx:Blockly.WorkspaceCommentSvg.BORDER_RADIUS,ry:Blockly.WorkspaceCommentSvg.BORDER_RADIUS});this.svgGroup_.appendChild(this.svgRect_);this.rendered_=!1;this.useDragSurface_=Blockly.utils.is3dSupported()&&!!a.blockDragSurface_;Blockly.WorkspaceCommentSvg.superClass_.constructor.call(this,
a,b,c,d,e);this.render()};goog.inherits(Blockly.WorkspaceCommentSvg,Blockly.WorkspaceComment);Blockly.WorkspaceCommentSvg.DEFAULT_SIZE=100;
Blockly.WorkspaceCommentSvg.prototype.dispose=function(){this.workspace&&(Blockly.selected==this&&(this.unselect(),this.workspace.cancelCurrentGesture()),Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.CommentDelete(this)),Blockly.utils.removeNode(this.svgGroup_),this.svgRect_=this.svgGroup_=null,this.disposeInternal_(),Blockly.Events.disable(),Blockly.WorkspaceCommentSvg.superClass_.dispose.call(this),Blockly.Events.enable())};
Blockly.WorkspaceCommentSvg.prototype.initSvg=function(){if(!this.workspace.rendered)throw TypeError("Workspace is headless.");this.workspace.options.readOnly||this.eventsInit_||(Blockly.bindEventWithChecks_(this.svgRectTarget_,"mousedown",this,this.pathMouseDown_),Blockly.bindEventWithChecks_(this.svgHandleTarget_,"mousedown",this,this.pathMouseDown_));this.eventsInit_=!0;this.updateMovable();this.getSvgRoot().parentNode||this.workspace.getBubbleCanvas().appendChild(this.getSvgRoot())};
@@ -1162,7 +1168,7 @@ this.healStack_=!Blockly.DRAG_STACK};
Blockly.Gesture.prototype.dispose=function(){Blockly.Touch.clearTouchIdentifier();Blockly.Tooltip.unblock();this.creatorWorkspace_.clearGesture();this.onMoveWrapper_&&Blockly.unbindEvent_(this.onMoveWrapper_);this.onUpWrapper_&&Blockly.unbindEvent_(this.onUpWrapper_);this.flyout_=this.startWorkspace_=this.targetBlock_=this.startBlock_=this.startField_=null;this.blockDragger_&&(this.blockDragger_.dispose(),this.blockDragger_=null);this.workspaceDragger_&&(this.workspaceDragger_.dispose(),this.workspaceDragger_=
null);this.bubbleDragger_&&(this.bubbleDragger_.dispose(),this.bubbleDragger_=null)};Blockly.Gesture.prototype.updateFromEvent_=function(a){var b=new goog.math.Coordinate(a.clientX,a.clientY);this.updateDragDelta_(b)&&(this.updateIsDragging_(),Blockly.longStop_());this.mostRecentEvent_=a};
Blockly.Gesture.prototype.updateDragDelta_=function(a){this.currentDragDeltaXY_=goog.math.Coordinate.difference(a,this.mouseDownXY_);return this.hasExceededDragRadius_?!1:this.hasExceededDragRadius_=goog.math.Coordinate.magnitude(this.currentDragDeltaXY_)>(this.flyout_?Blockly.FLYOUT_DRAG_RADIUS:Blockly.DRAG_RADIUS)};
Blockly.Gesture.prototype.updateIsDraggingFromFlyout_=function(){return this.targetBlock_.disabled?!1:!this.flyout_.isScrollable()||this.flyout_.isDragTowardWorkspace(this.currentDragDeltaXY_)?(this.startWorkspace_=this.flyout_.targetWorkspace_,this.startWorkspace_.updateScreenCalculationsIfScrolled(),Blockly.Events.getGroup()||Blockly.Events.setGroup(!0),this.startBlock_=null,this.targetBlock_=this.flyout_.createBlock(this.targetBlock_),this.targetBlock_.select(),!0):!1};
Blockly.Gesture.prototype.updateIsDraggingFromFlyout_=function(){return this.flyout_.isBlockCreatable_(this.targetBlock_)?!this.flyout_.isScrollable()||this.flyout_.isDragTowardWorkspace(this.currentDragDeltaXY_)?(this.startWorkspace_=this.flyout_.targetWorkspace_,this.startWorkspace_.updateScreenCalculationsIfScrolled(),Blockly.Events.getGroup()||Blockly.Events.setGroup(!0),this.startBlock_=null,this.targetBlock_=this.flyout_.createBlock(this.targetBlock_),this.targetBlock_.select(),!0):!1:!1};
Blockly.Gesture.prototype.updateIsDraggingBubble_=function(){if(!this.startBubble_)return!1;this.isDraggingBubble_=!0;this.startDraggingBubble_();return!0};Blockly.Gesture.prototype.updateIsDraggingBlock_=function(){if(!this.targetBlock_)return!1;this.flyout_?this.isDraggingBlock_=this.updateIsDraggingFromFlyout_():this.targetBlock_.isMovable()&&(this.isDraggingBlock_=!0);return this.isDraggingBlock_?(this.startDraggingBlock_(),!0):!1};
Blockly.Gesture.prototype.updateIsDraggingWorkspace_=function(){if(this.flyout_?this.flyout_.isScrollable():this.startWorkspace_&&this.startWorkspace_.isDraggable())this.workspaceDragger_=this.flyout_?new Blockly.FlyoutDragger(this.flyout_):new Blockly.WorkspaceDragger(this.startWorkspace_),this.isDraggingWorkspace_=!0,this.workspaceDragger_.startDrag()};
Blockly.Gesture.prototype.updateIsDragging_=function(){if(this.calledUpdateIsDragging_)throw Error("updateIsDragging_ should only be called once per gesture.");this.calledUpdateIsDragging_=!0;this.updateIsDraggingBubble_()||this.updateIsDraggingBlock_()||this.updateIsDraggingWorkspace_()};
@@ -1183,12 +1189,12 @@ Blockly.Gesture.prototype.doBlockClick_=function(){this.flyout_&&this.flyout_.au
Blockly.Gesture.prototype.bringBlockToFront_=function(){this.targetBlock_&&!this.flyout_&&this.targetBlock_.bringToFront()};Blockly.Gesture.prototype.setStartField=function(a){if(this.hasStarted_)throw Error("Tried to call gesture.setStartField, but the gesture had already been started.");this.startField_||(this.startField_=a)};Blockly.Gesture.prototype.setStartBubble=function(a){this.startBubble_||(this.startBubble_=a)};
Blockly.Gesture.prototype.setStartBlock=function(a){this.startBlock_||this.startBubble_||(this.startBlock_=a,a.isInFlyout&&a!=a.getRootBlock()?this.setTargetBlock_(a.getRootBlock()):this.setTargetBlock_(a))};Blockly.Gesture.prototype.setTargetBlock_=function(a){a.isShadow()?this.setTargetBlock_(a.getParent()):this.targetBlock_=a};Blockly.Gesture.prototype.setStartWorkspace_=function(a){this.startWorkspace_||(this.startWorkspace_=a)};
Blockly.Gesture.prototype.setStartFlyout_=function(a){this.flyout_||(this.flyout_=a)};Blockly.Gesture.prototype.isBubbleClick_=function(){return!!this.startBubble_&&!this.hasExceededDragRadius_};Blockly.Gesture.prototype.isBlockClick_=function(){return!!this.startBlock_&&!this.hasExceededDragRadius_&&!this.isFieldClick_()};Blockly.Gesture.prototype.isFieldClick_=function(){return(this.startField_?this.startField_.isCurrentlyEditable():!1)&&!this.hasExceededDragRadius_&&(!this.flyout_||!this.flyout_.autoClose)};
Blockly.Gesture.prototype.isWorkspaceClick_=function(){return!this.startBlock_&&!this.startBubble_&&!this.startField_&&!this.hasExceededDragRadius_};Blockly.Gesture.prototype.isDragging=function(){return this.isDraggingWorkspace_||this.isDraggingBlock_||this.isDraggingBubble_};Blockly.Gesture.prototype.hasStarted=function(){return this.hasStarted_};Blockly.Grid=function(a,b){this.gridPattern_=a;this.spacing_=b.spacing;this.length_=b.length;this.line2_=(this.line1_=a.firstChild)&&this.line1_.nextSibling;this.snapToGrid_=b.snap};Blockly.Grid.prototype.scale_=1;Blockly.Grid.prototype.dispose=function(){this.gridPattern_=null};Blockly.Grid.prototype.shouldSnap=function(){return this.snapToGrid_};Blockly.Grid.prototype.getSpacing=function(){return this.spacing_};Blockly.Grid.prototype.getPatternId=function(){return this.gridPattern_.id};
Blockly.Gesture.prototype.isWorkspaceClick_=function(){return!this.startBlock_&&!this.startBubble_&&!this.startField_&&!this.hasExceededDragRadius_};Blockly.Gesture.prototype.isDragging=function(){return this.isDraggingWorkspace_||this.isDraggingBlock_||this.isDraggingBubble_};Blockly.Gesture.prototype.hasStarted=function(){return this.hasStarted_};Blockly.Gesture.prototype.getInsertionMarkers=function(){return this.blockDragger_?this.blockDragger_.getInsertionMarkers():[]};Blockly.Grid=function(a,b){this.gridPattern_=a;this.spacing_=b.spacing;this.length_=b.length;this.line2_=(this.line1_=a.firstChild)&&this.line1_.nextSibling;this.snapToGrid_=b.snap};Blockly.Grid.prototype.scale_=1;Blockly.Grid.prototype.dispose=function(){this.gridPattern_=null};Blockly.Grid.prototype.shouldSnap=function(){return this.snapToGrid_};Blockly.Grid.prototype.getSpacing=function(){return this.spacing_};Blockly.Grid.prototype.getPatternId=function(){return this.gridPattern_.id};
Blockly.Grid.prototype.update=function(a){this.scale_=a;var b=this.spacing_*a||100;this.gridPattern_.setAttribute("width",b);this.gridPattern_.setAttribute("height",b);b=Math.floor(this.spacing_/2)+.5;var c=b-this.length_/2,d=b+this.length_/2;b*=a;c*=a;d*=a;this.setLineAttributes_(this.line1_,a,c,d,b,b);this.setLineAttributes_(this.line2_,a,b,b,c,d)};
Blockly.Grid.prototype.setLineAttributes_=function(a,b,c,d,e,f){a&&(a.setAttribute("stroke-width",b),a.setAttribute("x1",c),a.setAttribute("y1",e),a.setAttribute("x2",d),a.setAttribute("y2",f))};Blockly.Grid.prototype.moveTo=function(a,b){this.gridPattern_.setAttribute("x",a);this.gridPattern_.setAttribute("y",b);(goog.userAgent.IE||goog.userAgent.EDGE)&&this.update(this.scale_)};
Blockly.Grid.createDom=function(a,b,c){a=Blockly.utils.createSvgElement("pattern",{id:"blocklyGridPattern"+a,patternUnits:"userSpaceOnUse"},c);0<b.length&&0<b.spacing?(Blockly.utils.createSvgElement("line",{stroke:b.colour},a),1<b.length&&Blockly.utils.createSvgElement("line",{stroke:b.colour},a)):Blockly.utils.createSvgElement("line",{},a);return a};Blockly.Theme=function(a,b){this.blockStyles_=a;this.categoryStyles_=b};Blockly.Theme.prototype.setAllBlockStyles=function(a){for(var b in a)this.setBlockStyle(b,a[b])};Blockly.Theme.prototype.getAllBlockStyles=function(){return this.blockStyles_};Blockly.Theme.prototype.getBlockStyle=function(a){return this.blockStyles_[a]};Blockly.Theme.prototype.setBlockStyle=function(a,b){this.blockStyles_[a]=b};Blockly.Theme.prototype.getCategoryStyle=function(a){return this.categoryStyles_[a]};
Blockly.Theme.prototype.setCategoryStyle=function(a,b){this.categoryStyles_[a]=b};Blockly.Themes={};
var defaultBlockStyles={colour_blocks:{primaryColour:"20"},list_blocks:{primaryColour:"260"},logic_blocks:{primaryColour:"210"},loop_blocks:{primaryColour:"120"},math_blocks:{primaryColour:"230"},procedure_blocks:{primaryColour:"290"},text_blocks:{primaryColour:"160"},variable_blocks:{primaryColour:"330"},variable_dynamic_blocks:{primaryColour:"310"},hat_blocks:{primaryColour:"330",hat:"cap"}},categoryStyles={colour_category:{colour:"20"},list_category:{colour:"260"},logic_category:{colour:"210"},loop_category:{colour:"120"},
var 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"}},categoryStyles={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"}};Blockly.Themes.Classic=new Blockly.Theme(defaultBlockStyles,categoryStyles);Blockly.Options=function(a){var b=!!a.readOnly;if(b)var c=null,d=!1,e=!1,f=!1,g=!1,h=!1,k=!1;else{c=Blockly.Options.parseToolboxTree(a.toolbox);d=!(!c||!c.getElementsByTagName("category").length);e=a.trashcan;void 0===e&&(e=d);var l=a.maxTrashcanContents;e?void 0===l&&(l=32):l=0;f=a.collapse;void 0===f&&(f=d);g=a.comments;void 0===g&&(g=d);h=a.disable;void 0===h&&(h=d);k=a.sounds;void 0===k&&(k=!0)}var n=!!a.rtl,m=a.horizontalLayout;void 0===m&&(m=!1);var p=a.toolboxPosition;p="end"===p?!1:!0;p=m?
p?Blockly.TOOLBOX_AT_TOP:Blockly.TOOLBOX_AT_BOTTOM:p==n?Blockly.TOOLBOX_AT_RIGHT:Blockly.TOOLBOX_AT_LEFT;var q=a.scrollbars;void 0===q&&(q=d);var t=a.css;void 0===t&&(t=!0);var r="https://blockly-demo.appspot.com/static/media/";a.media?r=a.media:a.path&&(r=a.path+"media/");var u=void 0===a.oneBasedIndex?!0:!!a.oneBasedIndex,v=a.theme;void 0===v&&(v=Blockly.Themes.Classic);this.RTL=n;this.oneBasedIndex=u;this.collapse=f;this.comments=g;this.disable=h;this.readOnly=b;this.maxBlocks=a.maxBlocks||Infinity;
this.maxInstances=a.maxInstances;this.pathToMedia=r;this.hasCategories=d;this.hasScrollbars=q;this.hasTrashcan=e;this.maxTrashcanContents=l;this.hasSounds=k;this.hasCss=t;this.horizontalLayout=m;this.languageTree=c;this.gridOptions=Blockly.Options.parseGridOptions_(a);this.zoomOptions=Blockly.Options.parseZoomOptions_(a);this.toolboxPosition=p;this.theme=v};Blockly.Options.prototype.parentWorkspace=null;Blockly.Options.prototype.setMetrics=null;Blockly.Options.prototype.getMetrics=null;
@@ -1226,19 +1232,19 @@ Blockly.TouchGesture.prototype.dispose=function(){Blockly.TouchGesture.superClas
Blockly.TouchGesture.prototype.handleTouchMove=function(a){var b=Blockly.Touch.getTouchIdentifierFromEvent(a);this.cachedPoints_[b]=this.getTouchPoint(a);b=Object.keys(this.cachedPoints_);if(2==b.length){b=this.touchScale_=goog.math.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*Blockly.TouchGesture.ZOOM_IN_MULTIPLIER:c*Blockly.TouchGesture.ZOOM_OUT_MULTIPLIER;var d=
this.startWorkspace_,e=Blockly.utils.mouseToSvg(a,d.getParentSvg(),d.getInverseScreenCTM());d.zoom(e.x,e.y,c)}this.previousScale_=b;a.preventDefault()}};Blockly.TouchGesture.prototype.handleTouchEnd=function(a){a=Blockly.Touch.getTouchIdentifierFromEvent(a);this.cachedPoints_[a]&&delete this.cachedPoints_[a];2>Object.keys(this.cachedPoints_).length&&(this.cachedPoints_={},this.previousScale_=0)};
Blockly.TouchGesture.prototype.getTouchPoint=function(a){return this.startWorkspace_?new goog.math.Coordinate(a.pageX?a.pageX:a.changedTouches[0].pageX,a.pageY?a.pageY:a.changedTouches[0].pageY):null};Blockly.Trashcan=function(a){this.workspace_=a;0>=this.workspace_.options.maxTrashcanContents||(a={scrollbars:!0,disabledPatternId:this.workspace_.options.disabledPatternId,parentWorkspace:this.workspace_,RTL:this.workspace_.RTL,oneBasedIndex:this.workspace_.options.oneBasedIndex},this.workspace_.horizontalLayout?(a.toolboxPosition=this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_TOP?Blockly.TOOLBOX_AT_BOTTOM:Blockly.TOOLBOX_AT_TOP,this.flyout_=new Blockly.HorizontalFlyout(a)):(a.toolboxPosition=
this.workspace_.RTL?Blockly.TOOLBOX_AT_LEFT:Blockly.TOOLBOX_AT_RIGHT,this.flyout_=new Blockly.VerticalFlyout(a)),this.workspace_.addChangeListener(this.onDelete_()))};Blockly.Trashcan.prototype.WIDTH_=47;Blockly.Trashcan.prototype.BODY_HEIGHT_=44;Blockly.Trashcan.prototype.LID_HEIGHT_=16;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=20;Blockly.Trashcan.prototype.MARGIN_SIDE_=20;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=10;Blockly.Trashcan.prototype.SPRITE_LEFT_=0;
Blockly.Trashcan.prototype.SPRITE_TOP_=32;Blockly.Trashcan.prototype.HAS_BLOCKS_LID_ANGLE=.1;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.minOpenness_=0;Blockly.Trashcan.prototype.hasBlocks_=!1;Blockly.Trashcan.prototype.contents_=[];Blockly.Trashcan.prototype.svgGroup_=null;Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0;Blockly.Trashcan.prototype.left_=0;Blockly.Trashcan.prototype.top_=0;
this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT?Blockly.TOOLBOX_AT_LEFT:Blockly.TOOLBOX_AT_RIGHT,this.flyout_=new Blockly.VerticalFlyout(a)),this.workspace_.addChangeListener(this.onDelete_()))};Blockly.Trashcan.prototype.WIDTH_=47;Blockly.Trashcan.prototype.BODY_HEIGHT_=44;Blockly.Trashcan.prototype.LID_HEIGHT_=16;Blockly.Trashcan.prototype.MARGIN_BOTTOM_=20;Blockly.Trashcan.prototype.MARGIN_SIDE_=20;Blockly.Trashcan.prototype.MARGIN_HOTSPOT_=10;
Blockly.Trashcan.prototype.SPRITE_LEFT_=0;Blockly.Trashcan.prototype.SPRITE_TOP_=32;Blockly.Trashcan.prototype.HAS_BLOCKS_LID_ANGLE=.1;Blockly.Trashcan.prototype.isOpen=!1;Blockly.Trashcan.prototype.minOpenness_=0;Blockly.Trashcan.prototype.hasBlocks_=!1;Blockly.Trashcan.prototype.contents_=[];Blockly.Trashcan.prototype.svgGroup_=null;Blockly.Trashcan.prototype.svgLid_=null;Blockly.Trashcan.prototype.lidTask_=0;Blockly.Trashcan.prototype.lidOpen_=0;Blockly.Trashcan.prototype.left_=0;
Blockly.Trashcan.prototype.top_=0;
Blockly.Trashcan.prototype.createDom=function(){this.svgGroup_=Blockly.utils.createSvgElement("g",{"class":"blocklyTrash"},null);var a=String(Math.random()).substring(2);var b=Blockly.utils.createSvgElement("clipPath",{id:"blocklyTrashBodyClipPath"+a},this.svgGroup_);Blockly.utils.createSvgElement("rect",{width:this.WIDTH_,height:this.BODY_HEIGHT_,y:this.LID_HEIGHT_},b);var c=Blockly.utils.createSvgElement("image",{width:Blockly.SPRITE.width,x:-this.SPRITE_LEFT_,height:Blockly.SPRITE.height,y:-this.SPRITE_TOP_,
"clip-path":"url(#blocklyTrashBodyClipPath"+a+")"},this.svgGroup_);c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url);b=Blockly.utils.createSvgElement("clipPath",{id:"blocklyTrashLidClipPath"+a},this.svgGroup_);Blockly.utils.createSvgElement("rect",{width:this.WIDTH_,height:this.LID_HEIGHT_},b);this.svgLid_=Blockly.utils.createSvgElement("image",{width:Blockly.SPRITE.width,x:-this.SPRITE_LEFT_,height:Blockly.SPRITE.height,y:-this.SPRITE_TOP_,
"clip-path":"url(#blocklyTrashLidClipPath"+a+")"},this.svgGroup_);this.svgLid_.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",this.workspace_.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEventWithChecks_(this.svgGroup_,"mouseup",this,this.click);Blockly.bindEvent_(c,"mouseover",this,this.mouseOver_);Blockly.bindEvent_(c,"mouseout",this,this.mouseOut_);this.animateLid_();return this.svgGroup_};
Blockly.Trashcan.prototype.init=function(a){0<this.workspace_.options.maxTrashcanContents&&(Blockly.utils.insertAfter(this.flyout_.createDom("svg"),this.workspace_.getParentSvg()),this.flyout_.init(this.workspace_));this.verticalSpacing_=this.MARGIN_BOTTOM_+a;this.setOpen_(!1);return this.verticalSpacing_+this.BODY_HEIGHT_+this.LID_HEIGHT_};
Blockly.Trashcan.prototype.init=function(a){0<this.workspace_.options.maxTrashcanContents&&(Blockly.utils.insertAfter(this.flyout_.createDom("svg"),this.workspace_.getParentSvg()),this.flyout_.init(this.workspace_),this.flyout_.isBlockCreatable_=function(){return!0});this.verticalSpacing_=this.MARGIN_BOTTOM_+a;this.setOpen_(!1);return this.verticalSpacing_+this.BODY_HEIGHT_+this.LID_HEIGHT_};
Blockly.Trashcan.prototype.dispose=function(){this.svgGroup_&&(Blockly.utils.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=this.svgLid_=null;clearTimeout(this.lidTask_)};
Blockly.Trashcan.prototype.position=function(){if(this.verticalSpacing_){var a=this.workspace_.getMetrics();a&&(this.workspace_.RTL?(this.left_=this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_LEFT&&(this.left_+=a.flyoutWidth,this.workspace_.toolbox_&&(this.left_+=a.absoluteLeft))):(this.left_=a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT&&(this.left_-=a.flyoutWidth)),
this.top_=a.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM?this.verticalSpacing_:a.viewHeight+a.absoluteTop-(this.BODY_HEIGHT_+this.LID_HEIGHT_)-this.verticalSpacing_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}};
Blockly.Trashcan.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect();return new goog.math.Rect(a.left+this.SPRITE_LEFT_-this.MARGIN_HOTSPOT_,a.top+this.SPRITE_TOP_-this.MARGIN_HOTSPOT_,this.WIDTH_+2*this.MARGIN_HOTSPOT_,this.LID_HEIGHT_+this.BODY_HEIGHT_+2*this.MARGIN_HOTSPOT_)};Blockly.Trashcan.prototype.setOpen_=function(a){this.isOpen!=a&&(clearTimeout(this.lidTask_),this.isOpen=a,this.animateLid_())};
Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2:-.2;this.lidOpen_=Math.min(Math.max(this.lidOpen_,this.minOpenness_),1);this.setLidAngle_(45*this.lidOpen_);this.svgGroup_.style.opacity=.4+.4*this.lidOpen_;this.lidOpen_>this.minOpenness_&&1>this.lidOpen_&&(this.lidTask_=setTimeout(this.animateLid_.bind(this),20))};
Blockly.Trashcan.prototype.setLidAngle_=function(a){this.svgLid_.setAttribute("transform","rotate("+(this.workspace_.RTL?-a:a)+","+(this.workspace_.RTL?4:this.WIDTH_-4)+","+(this.LID_HEIGHT_-2)+")")};Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)};Blockly.Trashcan.prototype.click=function(){if(this.hasBlocks_){for(var a=[],b=0,c;c=this.contents_[b];b++)a[b]=Blockly.Xml.textToDom(c).firstChild;this.flyout_.show(a)}};Blockly.Trashcan.prototype.mouseOver_=function(){this.hasBlocks_&&this.setOpen_(!0)};
Blockly.Trashcan.prototype.mouseOut_=function(){this.setOpen_(!1)};
Blockly.Trashcan.prototype.position=function(){if(this.verticalSpacing_){var a=this.workspace_.getMetrics();a&&(this.left_=a.toolboxPosition==Blockly.TOOLBOX_AT_LEFT||this.workspace_.horizontalLayout&&!this.workspace_.RTL?a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness:this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,this.top_=a.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM?this.verticalSpacing_:a.viewHeight+a.absoluteTop-(this.BODY_HEIGHT_+this.LID_HEIGHT_)-
this.verticalSpacing_,this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}};Blockly.Trashcan.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect();return new goog.math.Rect(a.left+this.SPRITE_LEFT_-this.MARGIN_HOTSPOT_,a.top+this.SPRITE_TOP_-this.MARGIN_HOTSPOT_,this.WIDTH_+2*this.MARGIN_HOTSPOT_,this.LID_HEIGHT_+this.BODY_HEIGHT_+2*this.MARGIN_HOTSPOT_)};
Blockly.Trashcan.prototype.setOpen_=function(a){this.isOpen!=a&&(clearTimeout(this.lidTask_),this.isOpen=a,this.animateLid_())};Blockly.Trashcan.prototype.animateLid_=function(){this.lidOpen_+=this.isOpen?.2:-.2;this.lidOpen_=Math.min(Math.max(this.lidOpen_,this.minOpenness_),1);this.setLidAngle_(45*this.lidOpen_);this.svgGroup_.style.opacity=.4+.4*this.lidOpen_;this.lidOpen_>this.minOpenness_&&1>this.lidOpen_&&(this.lidTask_=setTimeout(this.animateLid_.bind(this),20))};
Blockly.Trashcan.prototype.setLidAngle_=function(a){var b=this.workspace_.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT||this.workspace_.horizontalLayout&&this.workspace_.RTL;this.svgLid_.setAttribute("transform","rotate("+(b?-a:a)+","+(b?4:this.WIDTH_-4)+","+(this.LID_HEIGHT_-2)+")")};Blockly.Trashcan.prototype.close=function(){this.setOpen_(!1)};Blockly.Trashcan.prototype.click=function(){if(this.hasBlocks_){for(var a=[],b=0,c;c=this.contents_[b];b++)a[b]=Blockly.Xml.textToDom(c).firstChild;this.flyout_.show(a)}};
Blockly.Trashcan.prototype.mouseOver_=function(){this.hasBlocks_&&this.setOpen_(!0)};Blockly.Trashcan.prototype.mouseOut_=function(){this.setOpen_(!1)};
Blockly.Trashcan.prototype.onDelete_=function(){var a=this;return function(b){0>=a.workspace_.options.maxTrashcanContents||b.type!=Blockly.Events.BLOCK_DELETE||(b=a.cleanBlockXML_(b.oldXml),-1==a.contents_.indexOf(b)&&(a.contents_.unshift(b),a.contents_.length>a.workspace_.options.maxTrashcanContents&&a.contents_.splice(a.workspace_.options.maxTrashcanContents,a.contents_.length-a.workspace_.options.maxTrashcanContents),a.hasBlocks_=!0,a.minOpenness_=a.HAS_BLOCKS_LID_ANGLE,a.setLidAngle_(45*a.minOpenness_)))}};
Blockly.Trashcan.prototype.cleanBlockXML_=function(a){for(var b=a=a.cloneNode(!0);b;){b.removeAttribute&&(b.removeAttribute("x"),b.removeAttribute("y"),b.removeAttribute("id"));var c=b.firstChild||b.nextSibling;if(!c)for(c=b.parentNode;c;){if(c.nextSibling){c=c.nextSibling;break}c=c.parentNode}b=c}return"<xml>"+Blockly.Xml.domToText(a)+"</xml>"};Blockly.VariableModel=function(a,b,c,d){this.workspace=a;this.name=b;this.type=c||"";this.id_=d||Blockly.utils.genUid();Blockly.Events.fire(new Blockly.Events.VarCreate(this))};Blockly.VariableModel.prototype.getId=function(){return this.id_};Blockly.VariableModel.compareByName=function(a,b){var c=a.name.toLowerCase(),d=b.name.toLowerCase();return c<d?-1:c==d?0:1};Blockly.Variables={};Blockly.Variables.NAME_TYPE=Blockly.VARIABLE_CATEGORY_NAME;Blockly.Variables.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];f.getId()&&(a[f.getId()]=f)}}b=[];for(var g in a)b.push(a[g]);return b};Blockly.Variables.allUsedVariables=function(){console.warn("Deprecated call to Blockly.Variables.allUsedVariables. Use Blockly.Variables.allUsedVarModels instead.\nIf this is a major issue please file a bug on GitHub.")};
Blockly.Variables.ALL_DEVELOPER_VARS_WARNINGS_BY_BLOCK_TYPE_={};
@@ -1287,8 +1293,8 @@ Blockly.WorkspaceDragSurfaceSvg.prototype.setContentsAndShow=function(a,b,c,d,e,
Blockly.ZoomControls=function(a){this.workspace_=a};Blockly.ZoomControls.prototype.WIDTH_=32;Blockly.ZoomControls.prototype.HEIGHT_=110;Blockly.ZoomControls.prototype.MARGIN_BOTTOM_=20;Blockly.ZoomControls.prototype.MARGIN_SIDE_=20;Blockly.ZoomControls.prototype.svgGroup_=null;Blockly.ZoomControls.prototype.left_=0;Blockly.ZoomControls.prototype.top_=0;
Blockly.ZoomControls.prototype.createDom=function(){this.svgGroup_=Blockly.utils.createSvgElement("g",{},null);var a=String(Math.random()).substring(2);this.createZoomOutSvg_(a);this.createZoomInSvg_(a);this.createZoomResetSvg_(a);return this.svgGroup_};Blockly.ZoomControls.prototype.init=function(a){this.verticalSpacing_=this.MARGIN_BOTTOM_+a;return this.verticalSpacing_+this.HEIGHT_};
Blockly.ZoomControls.prototype.dispose=function(){this.svgGroup_&&(Blockly.utils.removeNode(this.svgGroup_),this.svgGroup_=null);this.workspace_=null};
Blockly.ZoomControls.prototype.position=function(){if(this.verticalSpacing_){var a=this.workspace_.getMetrics();a&&(this.workspace_.RTL?(this.left_=this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_LEFT&&(this.left_+=a.flyoutWidth,this.workspace_.toolbox_&&(this.left_+=a.absoluteLeft))):(this.left_=a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT&&(this.left_-=a.flyoutWidth)),
a.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM?(this.top_=this.verticalSpacing_,this.zoomInGroup_.setAttribute("transform","translate(0, 34)"),this.zoomResetGroup_.setAttribute("transform","translate(0, 77)")):(this.top_=a.viewHeight+a.absoluteTop-this.HEIGHT_-this.verticalSpacing_,this.zoomInGroup_.setAttribute("transform","translate(0, 43)"),this.zoomOutGroup_.setAttribute("transform","translate(0, 77)")),this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}};
Blockly.ZoomControls.prototype.position=function(){if(this.verticalSpacing_){var a=this.workspace_.getMetrics();a&&(this.left_=a.toolboxPosition==Blockly.TOOLBOX_AT_LEFT||this.workspace_.horizontalLayout&&!this.workspace_.RTL?a.viewWidth+a.absoluteLeft-this.WIDTH_-this.MARGIN_SIDE_-Blockly.Scrollbar.scrollbarThickness:this.MARGIN_SIDE_+Blockly.Scrollbar.scrollbarThickness,a.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM?(this.top_=this.verticalSpacing_,this.zoomInGroup_.setAttribute("transform","translate(0, 34)"),
this.zoomResetGroup_.setAttribute("transform","translate(0, 77)")):(this.top_=a.viewHeight+a.absoluteTop-this.HEIGHT_-this.verticalSpacing_,this.zoomInGroup_.setAttribute("transform","translate(0, 43)"),this.zoomOutGroup_.setAttribute("transform","translate(0, 77)")),this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))}};
Blockly.ZoomControls.prototype.createZoomOutSvg_=function(a){var b=this.workspace_;this.zoomOutGroup_=Blockly.utils.createSvgElement("g",{"class":"blocklyZoom"},this.svgGroup_);var c=Blockly.utils.createSvgElement("clipPath",{id:"blocklyZoomoutClipPath"+a},this.zoomOutGroup_);Blockly.utils.createSvgElement("rect",{width:32,height:32},c);a=Blockly.utils.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-64,y:-92,"clip-path":"url(#blocklyZoomoutClipPath"+a+")"},this.zoomOutGroup_);
a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",b.options.pathToMedia+Blockly.SPRITE.url);Blockly.bindEventWithChecks_(a,"mousedown",null,function(a){b.markFocused();b.zoomCenter(-1);Blockly.Touch.clearTouchIdentifier();a.stopPropagation();a.preventDefault()})};
Blockly.ZoomControls.prototype.createZoomInSvg_=function(a){var b=this.workspace_;this.zoomInGroup_=Blockly.utils.createSvgElement("g",{"class":"blocklyZoom"},this.svgGroup_);var c=Blockly.utils.createSvgElement("clipPath",{id:"blocklyZoominClipPath"+a},this.zoomInGroup_);Blockly.utils.createSvgElement("rect",{width:32,height:32},c);a=Blockly.utils.createSvgElement("image",{width:Blockly.SPRITE.width,height:Blockly.SPRITE.height,x:-32,y:-92,"clip-path":"url(#blocklyZoominClipPath"+a+")"},this.zoomInGroup_);
@@ -1316,8 +1322,9 @@ Blockly.WorkspaceSvg.prototype.translate=function(a,b){if(this.useWorkspaceDragS
Blockly.WorkspaceSvg.prototype.resetDragSurface=function(){if(this.useWorkspaceDragSurface_){this.isDragSurfaceActive_=!1;var a=this.workspaceDragSurface_.getSurfaceTranslation();this.workspaceDragSurface_.clearAndHide(this.svgGroup_);a="translate("+a.x+","+a.y+") scale("+this.scale+")";this.svgBlockCanvas_.setAttribute("transform",a);this.svgBubbleCanvas_.setAttribute("transform",a)}};
Blockly.WorkspaceSvg.prototype.setupDragSurface=function(){if(this.useWorkspaceDragSurface_&&!this.isDragSurfaceActive_){this.isDragSurfaceActive_=!0;var a=this.svgBlockCanvas_.previousSibling,b=parseInt(this.getParentSvg().getAttribute("width"),10),c=parseInt(this.getParentSvg().getAttribute("height"),10),d=Blockly.utils.getRelativeXY(this.svgBlockCanvas_);this.workspaceDragSurface_.setContentsAndShow(this.svgBlockCanvas_,this.svgBubbleCanvas_,a,b,c,this.scale);this.workspaceDragSurface_.translateSurface(d.x,
d.y)}};Blockly.WorkspaceSvg.prototype.getBlockDragSurface=function(){return this.blockDragSurface_};Blockly.WorkspaceSvg.prototype.getWidth=function(){var a=this.getMetrics();return a?a.viewWidth/this.scale:0};
Blockly.WorkspaceSvg.prototype.setVisible=function(a){this.scrollbar&&this.scrollbar.setContainerVisible(a);this.getFlyout_()&&this.getFlyout_().setContainerVisible(a);this.getParentSvg().style.display=a?"block":"none";this.toolbox_&&(this.toolbox_.HtmlDiv.style.display=a?"block":"none");a?(this.render(),this.toolbox_&&this.toolbox_.position()):Blockly.hideChaff(!0);this.isVisible_=a};Blockly.WorkspaceSvg.prototype.render=function(){for(var a=this.getAllBlocks(!1),b=a.length-1;0<=b;b--)a[b].render(!1)};
Blockly.WorkspaceSvg.prototype.traceOn=function(){console.warn("Deprecated call to traceOn, delete this.")};Blockly.WorkspaceSvg.prototype.highlightBlock=function(a,b){if(void 0===b){for(var c=0,d;d=this.highlightedBlocks_[c];c++)d.setHighlighted(!1);this.highlightedBlocks_.length=0}if(d=a?this.getBlockById(a):null)(c=void 0===b||b)?-1==this.highlightedBlocks_.indexOf(d)&&this.highlightedBlocks_.push(d):Blockly.utils.arrayRemove(this.highlightedBlocks_,d),d.setHighlighted(c)};
Blockly.WorkspaceSvg.prototype.setVisible=function(a){this.scrollbar&&this.scrollbar.setContainerVisible(a);this.getFlyout_()&&this.getFlyout_().setContainerVisible(a);this.getParentSvg().style.display=a?"block":"none";this.toolbox_&&(this.toolbox_.HtmlDiv.style.display=a?"block":"none");a?(this.render(),this.toolbox_&&this.toolbox_.position()):Blockly.hideChaff(!0);this.isVisible_=a};
Blockly.WorkspaceSvg.prototype.render=function(){for(var a=this.getAllBlocks(!1),b=a.length-1;0<=b;b--)a[b].render(!1);if(this.currentGesture_)for(a=this.currentGesture_.getInsertionMarkers(),b=0;b<a.length;b++)a[b].render(!1)};Blockly.WorkspaceSvg.prototype.traceOn=function(){console.warn("Deprecated call to traceOn, delete this.")};
Blockly.WorkspaceSvg.prototype.highlightBlock=function(a,b){if(void 0===b){for(var c=0,d;d=this.highlightedBlocks_[c];c++)d.setHighlighted(!1);this.highlightedBlocks_.length=0}if(d=a?this.getBlockById(a):null)(c=void 0===b||b)?-1==this.highlightedBlocks_.indexOf(d)&&this.highlightedBlocks_.push(d):Blockly.utils.arrayRemove(this.highlightedBlocks_,d),d.setHighlighted(c)};
Blockly.WorkspaceSvg.prototype.paste=function(a){!this.rendered||a.getElementsByTagName("block").length>=this.remainingCapacity()||(this.currentGesture_&&this.currentGesture_.cancel(),"comment"==a.tagName.toLowerCase()?this.pasteWorkspaceComment_(a):this.pasteBlock_(a))};
Blockly.WorkspaceSvg.prototype.pasteBlock_=function(a){Blockly.Events.disable();try{var b=Blockly.Xml.domToBlock(a,this),c=parseInt(a.getAttribute("x"),10),d=parseInt(a.getAttribute("y"),10);if(!isNaN(c)&&!isNaN(d)){this.RTL&&(c=-c);do{a=!1;for(var e=this.getAllBlocks(!1),f=0,g;g=e[f];f++){var h=g.getRelativeToSurfaceXY();if(1>=Math.abs(c-h.x)&&1>=Math.abs(d-h.y)){a=!0;break}}if(!a){var k=b.getConnections_(!1);f=0;for(var l;l=k[f];f++)if(l.closest(Blockly.SNAP_RADIUS,new goog.math.Coordinate(c,d)).connection){a=
!0;break}}a&&(c=this.RTL?c-Blockly.SNAP_RADIUS:c+Blockly.SNAP_RADIUS,d+=2*Blockly.SNAP_RADIUS)}while(a);b.moveBy(c,d)}}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&!b.isShadow()&&Blockly.Events.fire(new Blockly.Events.BlockCreate(b));b.select()};
@@ -1380,7 +1387,7 @@ Blockly.Extensions.buildTooltipWithFieldText=function(a,b){"object"==typeof docu
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))};Blockly.Extensions.register("parent_tooltip_when_inline",Blockly.Extensions.extensionParentTooltip_);Blockly.Field=function(a,b){this.size_=new goog.math.Size(0,Blockly.BlockSvg.MIN_BLOCK_Y);this.setValue(a);this.setValidator(b)};Blockly.Field.TYPE_MAP_={};Blockly.Field.register=function(a,b){if("string"!=typeof a||""==a.trim())throw Error('Invalid field type "'+a+'"');if(!b||"function"!=typeof b.fromJson)throw Error('Field "'+b+'" must have a fromJson function');Blockly.Field.TYPE_MAP_[a]=b};Blockly.Field.fromJson=function(a){var b=Blockly.Field.TYPE_MAP_[a.type];return b?b.fromJson(a):null};
Blockly.Field.cacheWidths_=null;Blockly.Field.cacheReference_=0;Blockly.Field.prototype.name=void 0;Blockly.Field.prototype.maxDisplayLength=50;Blockly.Field.prototype.text_="";Blockly.Field.prototype.sourceBlock_=null;Blockly.Field.prototype.visible_=!0;Blockly.Field.prototype.validator_=null;Blockly.Field.NBSP="\u00a0";Blockly.Field.prototype.EDITABLE=!0;Blockly.Field.prototype.setSourceBlock=function(a){if(this.sourceBlock_)throw Error("Field already bound to a block.");this.sourceBlock_=a};
Blockly.Field.prototype.init=function(){this.fieldGroup_||(this.fieldGroup_=Blockly.utils.createSvgElement("g",{},null),this.visible_||(this.fieldGroup_.style.display="none"),this.borderRect_=Blockly.utils.createSvgElement("rect",{rx:4,ry:4,x:-Blockly.BlockSvg.SEP_SPACE_X/2,y:0,height:16},this.fieldGroup_),this.textElement_=Blockly.utils.createSvgElement("text",{"class":"blocklyText",y:this.size_.height-12.5},this.fieldGroup_),this.updateEditable(),this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_),
this.mouseDownWrapper_=Blockly.bindEventWithChecks_(this.fieldGroup_,"mousedown",this,this.onMouseDown_),this.render_())};Blockly.Field.prototype.initModel=function(){};Blockly.Field.prototype.dispose=function(){this.mouseDownWrapper_&&(Blockly.unbindEvent_(this.mouseDownWrapper_),this.mouseDownWrapper_=null);this.sourceBlock_=null;this.fieldGroup_&&(Blockly.utils.removeNode(this.fieldGroup_),this.fieldGroup_=null);this.validator_=this.borderRect_=this.textElement_=null};
this.mouseDownWrapper_=Blockly.bindEventWithChecks_(this.fieldGroup_,"mousedown",this,this.onMouseDown_))};Blockly.Field.prototype.initModel=function(){};Blockly.Field.prototype.dispose=function(){this.mouseDownWrapper_&&(Blockly.unbindEvent_(this.mouseDownWrapper_),this.mouseDownWrapper_=null);this.sourceBlock_=null;this.fieldGroup_&&(Blockly.utils.removeNode(this.fieldGroup_),this.fieldGroup_=null);this.validator_=this.borderRect_=this.textElement_=null};
Blockly.Field.prototype.updateEditable=function(){var a=this.fieldGroup_;this.EDITABLE&&a&&(this.sourceBlock_.isEditable()?(Blockly.utils.addClass(a,"blocklyEditableText"),Blockly.utils.removeClass(a,"blocklyNonEditableText"),this.fieldGroup_.style.cursor=this.CURSOR):(Blockly.utils.addClass(a,"blocklyNonEditableText"),Blockly.utils.removeClass(a,"blocklyEditableText"),this.fieldGroup_.style.cursor=""))};
Blockly.Field.prototype.isCurrentlyEditable=function(){return this.EDITABLE&&!!this.sourceBlock_&&this.sourceBlock_.isEditable()};Blockly.Field.prototype.isVisible=function(){return this.visible_};Blockly.Field.prototype.setVisible=function(a){if(this.visible_!=a){this.visible_=a;var b=this.getSvgRoot();b&&(b.style.display=a?"block":"none",this.render_())}};Blockly.Field.prototype.setValidator=function(a){this.validator_=a};Blockly.Field.prototype.getValidator=function(){return this.validator_};
Blockly.Field.prototype.classValidator=function(a){return a};Blockly.Field.prototype.callValidator=function(a){var b=this.classValidator(a);if(null===b)return null;void 0!==b&&(a=b);if(b=this.getValidator()){b=b.call(this,a);if(null===b)return null;void 0!==b&&(a=b)}return a};Blockly.Field.prototype.getSvgRoot=function(){return this.fieldGroup_};Blockly.Field.prototype.render_=function(){this.visible_?(this.textElement_.textContent=this.getDisplayText_(),this.updateWidth()):this.size_.width=0};
@@ -1403,12 +1410,12 @@ a=this.bubble_.getBubbleSize();this.bubble_.setBubbleSize(a.width,a.height)}else
Blockly.Warning.prototype.dispose=function(){this.block_.warning=null;Blockly.Icon.prototype.dispose.call(this)};Blockly.Block=function(a,b,c){if("undefined"!==typeof Blockly.Generator.prototype[b])throw Error('Block prototypeName "'+b+'" conflicts with Blockly.Generator members.');this.id=c&&!a.getBlockById(c)?c:Blockly.utils.genUid();a.blockDB_[this.id]=this;this.previousConnection=this.nextConnection=this.outputConnection=null;this.inputList=[];this.inputsInline=void 0;this.disabled=!1;this.tooltip="";this.contextMenu=!0;this.parentBlock_=null;this.childBlocks_=[];this.editable_=this.movable_=this.deletable_=
!0;this.collapsed_=this.isShadow_=!1;this.comment=null;this.xy_=new goog.math.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;if(b){this.type=b;c=Blockly.Blocks[b];if(!c||"object"!=typeof c)throw TypeError("Unknown block type: "+b);goog.mixin(this,c)}a.addTopBlock(this);a.addTypedBlock(this);"function"==typeof this.init&&this.init();this.inputsInlineDefault=this.inputsInline;if(Blockly.Events.isEnabled()){(a=
Blockly.Events.getGroup())||Blockly.Events.setGroup(!0);try{Blockly.Events.fire(new Blockly.Events.BlockCreate(this))}finally{a||Blockly.Events.setGroup(!1)}}"function"==typeof this.onchange&&this.setOnChange(this.onchange)};Blockly.Block.obtain=function(a,b){console.warn("Deprecated call to Blockly.Block.obtain, use workspace.newBlock instead.");return a.newBlock(b)};Blockly.Block.prototype.data=null;Blockly.Block.prototype.hue_=null;Blockly.Block.prototype.colour_="#000000";
Blockly.Block.prototype.secondaryColour_=null;Blockly.Block.prototype.tertiaryColour_=null;Blockly.Block.prototype.styleName_=null;
Blockly.Block.prototype.colourSecondary_=null;Blockly.Block.prototype.colourTertiary_=null;Blockly.Block.prototype.styleName_=null;
Blockly.Block.prototype.dispose=function(a){if(this.workspace){this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_);this.unplug(a);Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.BlockDelete(this));Blockly.Events.disable();try{this.workspace&&(this.workspace.removeTopBlock(this),this.workspace.removeTypedBlock(this),delete this.workspace.blockDB_[this.id],this.workspace=null);Blockly.selected==this&&(Blockly.selected=null);for(var b=this.childBlocks_.length-
1;0<=b;b--)this.childBlocks_[b].dispose(!1);b=0;for(var c;c=this.inputList[b];b++)c.dispose();this.inputList.length=0;var d=this.getConnections_(!0);for(b=0;b<d.length;b++){var e=d[b];e.isConnected()&&e.disconnect();d[b].dispose()}}finally{Blockly.Events.enable()}}};Blockly.Block.prototype.initModel=function(){for(var a=0,b;b=this.inputList[a];a++)for(var c=0,d;d=b.fieldRow[c];c++)d.initModel&&d.initModel()};
Blockly.Block.prototype.unplug=function(a){this.outputConnection?this.unplugFromRow_(a):this.previousConnection&&this.unplugFromStack_(a)};Blockly.Block.prototype.unplugFromRow_=function(a){var b=null;this.outputConnection.isConnected()&&(b=this.outputConnection.targetConnection,this.outputConnection.disconnect());b&&a&&(a=this.getOnlyValueConnection_())&&a.isConnected()&&(a=a.targetConnection,a.checkType_(b)&&(a.disconnect(),b.connect(a)))};
Blockly.Block.prototype.unplug=function(a){this.outputConnection?this.unplugFromRow_(a):this.previousConnection&&this.unplugFromStack_(a)};Blockly.Block.prototype.unplugFromRow_=function(a){var b=null;this.outputConnection.isConnected()&&(b=this.outputConnection.targetConnection,this.outputConnection.disconnect());b&&a&&(a=this.getOnlyValueConnection_())&&a.isConnected()&&!a.targetBlock().isShadow()&&(a=a.targetConnection,a.checkType_(b)&&(a.disconnect(),b.connect(a)))};
Blockly.Block.prototype.getOnlyValueConnection_=function(){for(var a=null,b=0;b<this.inputList.length;b++){var c=this.inputList[b].connection;if(c&&c.type==Blockly.INPUT_VALUE){if(a)return null;a=c}}return a};
Blockly.Block.prototype.unplugFromStack_=function(a){var b=null;this.previousConnection.isConnected()&&(b=this.previousConnection.targetConnection,this.previousConnection.disconnect());var c=this.getNextBlock();a&&c&&(a=this.nextConnection.targetConnection,a.disconnect(),b&&b.checkType_(a)&&b.connect(a))};
Blockly.Block.prototype.unplugFromStack_=function(a){var b=null;this.previousConnection.isConnected()&&(b=this.previousConnection.targetConnection,this.previousConnection.disconnect());var c=this.getNextBlock();a&&c&&!c.isShadow()&&(a=this.nextConnection.targetConnection,a.disconnect(),b&&b.checkType_(a)&&b.connect(a))};
Blockly.Block.prototype.getConnections_=function(a){a=[];this.outputConnection&&a.push(this.outputConnection);this.previousConnection&&a.push(this.previousConnection);this.nextConnection&&a.push(this.nextConnection);for(var b=0,c;c=this.inputList[b];b++)c.connection&&a.push(c.connection);return a};Blockly.Block.prototype.lastConnectionInStack=function(){for(var a=this.nextConnection;a;){var b=a.targetBlock();if(!b)return a;a=b.nextConnection}return null};Blockly.Block.prototype.bumpNeighbours_=function(){console.warn("Not expected to reach this bumpNeighbours_ function. The BlockSvg function for bumpNeighbours_ was expected to be called instead.")};
Blockly.Block.prototype.getParent=function(){return this.parentBlock_};Blockly.Block.prototype.getInputWithBlock=function(a){for(var b=0,c;c=this.inputList[b];b++)if(c.connection&&c.connection.targetBlock()==a)return c;return null};Blockly.Block.prototype.getSurroundParent=function(){var a=this;do{var b=a;a=a.getParent();if(!a)return null}while(a.getNextBlock()==b);return a};Blockly.Block.prototype.getNextBlock=function(){return this.nextConnection&&this.nextConnection.targetBlock()};
Blockly.Block.prototype.getPreviousBlock=function(){return this.previousConnection&&this.previousConnection.targetBlock()};Blockly.Block.prototype.getFirstStatementConnection=function(){for(var a=0,b;b=this.inputList[a];a++)if(b.connection&&b.connection.type==Blockly.NEXT_STATEMENT)return b.connection;return null};Blockly.Block.prototype.getRootBlock=function(){var a=this;do{var b=a;a=b.parentBlock_}while(a);return b};
@@ -1418,10 +1425,10 @@ Blockly.Block.prototype.getDescendants=function(a){for(var b=[this],c=this.getCh
Blockly.Block.prototype.setMovable=function(a){this.movable_=a};Blockly.Block.prototype.isDuplicatable=function(){return this.workspace.hasBlockLimits()?this.workspace.isCapacityAvailable(Blockly.utils.getBlockTypeCounts(this,!0)):!0};Blockly.Block.prototype.isShadow=function(){return this.isShadow_};Blockly.Block.prototype.setShadow=function(a){this.isShadow_=a};Blockly.Block.prototype.isInsertionMarker=function(){return this.isInsertionMarker_};
Blockly.Block.prototype.setInsertionMarker=function(a){this.isInsertionMarker_=a};Blockly.Block.prototype.isEditable=function(){return this.editable_&&!(this.workspace&&this.workspace.options.readOnly)};Blockly.Block.prototype.setEditable=function(a){this.editable_=a;a=0;for(var b;b=this.inputList[a];a++)for(var c=0,d;d=b.fieldRow[c];c++)d.updateEditable()};
Blockly.Block.prototype.setConnectionsHidden=function(a){if(!a&&this.isCollapsed()){if(this.outputConnection&&this.outputConnection.setHidden(a),this.previousConnection&&this.previousConnection.setHidden(a),this.nextConnection){this.nextConnection.setHidden(a);var b=this.nextConnection.targetBlock();b&&b.setConnectionsHidden(a)}}else for(var c=this.getConnections_(!0),d=0;b=c[d];d++)b.setHidden(a),b.isSuperior()&&(b=b.targetBlock())&&b.setConnectionsHidden(a)};
Blockly.Block.prototype.getMatchingConnection=function(a,b){var c=this.getConnections_(!0),d=a.getConnections_(!0);if(c.length!=d.length)throw Error("Connection lists did not match in length.");for(var e=0;e<d.length;e++)if(d[e]==b)return c[e];return null};Blockly.Block.prototype.setHelpUrl=function(a){this.helpUrl=a};Blockly.Block.prototype.setTooltip=function(a){this.tooltip=a};Blockly.Block.prototype.getColour=function(){return this.colour_};Blockly.Block.prototype.getSecondaryColour=function(){return this.secondaryColour_};
Blockly.Block.prototype.getTertiaryColour=function(){return this.tertiaryColour_};Blockly.Block.prototype.getStyleName=function(){return this.styleName_};Blockly.Block.prototype.getHue=function(){return this.hue_};
Blockly.Block.prototype.getMatchingConnection=function(a,b){var c=this.getConnections_(!0),d=a.getConnections_(!0);if(c.length!=d.length)throw Error("Connection lists did not match in length.");for(var e=0;e<d.length;e++)if(d[e]==b)return c[e];return null};Blockly.Block.prototype.setHelpUrl=function(a){this.helpUrl=a};Blockly.Block.prototype.setTooltip=function(a){this.tooltip=a};Blockly.Block.prototype.getColour=function(){return this.colour_};Blockly.Block.prototype.getColourSecondary=function(){return this.colourSecondary_};
Blockly.Block.prototype.getColourTertiary=function(){return this.colourTertiary_};Blockly.Block.prototype.getStyleName=function(){return this.styleName_};Blockly.Block.prototype.getHue=function(){return this.hue_};
Blockly.Block.prototype.setColour=function(a){var b="string"==typeof a?Blockly.utils.replaceMessageReferences(a):a,c=Number(b);if(!isNaN(c)&&0<=c&&360>=c)this.hue_=c,this.colour_=Blockly.hueToRgb(c);else if("string"==typeof b&&/^#[0-9a-fA-F]{6}$/.test(b))this.colour_=b,this.hue_=null;else throw c='Invalid colour: "'+b+'"',a!=b&&(c+=' (from "'+a+'")'),c;};
Blockly.Block.prototype.setStyle=function(a){var b=Blockly.getTheme();if(!b)throw Error("Trying to set block style to "+a+" before theme was defined via Blockly.setTheme().");b=b.getBlockStyle(a);this.styleName_=a;if(b)this.secondaryColour_=b.secondaryColour,this.tertiaryColour_=b.tertiaryColour,this.hat=b.hat,this.setColour(b.primaryColour);else throw Error("Invalid style name: "+a);};
Blockly.Block.prototype.setStyle=function(a){var b=Blockly.getTheme();if(!b)throw Error("Trying to set block style to "+a+" before theme was defined via Blockly.setTheme().");b=b.getBlockStyle(a);this.styleName_=a;if(b)this.colourSecondary_=b.colourSecondary,this.colourTertiary_=b.colourTertiary,this.hat=b.hat,this.setColour(b.colourPrimary);else throw Error("Invalid style name: "+a);};
Blockly.Block.prototype.setOnChange=function(a){if(a&&"function"!=typeof a)throw Error("onchange must be a function.");this.onchangeWrapper_&&this.workspace.removeChangeListener(this.onchangeWrapper_);if(this.onchange=a)this.onchangeWrapper_=a.bind(this),this.workspace.addChangeListener(this.onchangeWrapper_)};Blockly.Block.prototype.getField=function(a){for(var b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)if(e.name===a)return e;return null};
Blockly.Block.prototype.getVars=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&a.push(e.getValue());return a};Blockly.Block.prototype.getVarModels=function(){for(var a=[],b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&(e=this.workspace.getVariableById(e.getValue()))&&a.push(e);return a};
Blockly.Block.prototype.updateVarName=function(a){for(var b=0,c;c=this.inputList[b];b++)for(var d=0,e;e=c.fieldRow[d];d++)e.referencesVariables()&&a.getId()==e.getValue()&&e.setText(a.name)};Blockly.Block.prototype.renameVarById=function(a,b){for(var c=0,d;d=this.inputList[c];c++)for(var e=0,f;f=d.fieldRow[e];e++)f.referencesVariables()&&a==f.getValue()&&f.setValue(b)};Blockly.Block.prototype.getFieldValue=function(a){return(a=this.getField(a))?a.getValue():null};
@@ -1489,7 +1496,7 @@ Blockly.BlockSvg.prototype.updateMovable=function(){this.isMovable()?Blockly.uti
Blockly.BlockSvg.prototype.setShadow=function(a){Blockly.BlockSvg.superClass_.setShadow.call(this,a);this.updateColour()};Blockly.BlockSvg.prototype.setInsertionMarker=function(a){this.isInsertionMarker_!=a&&(this.isInsertionMarker_=a)&&(this.setColour(Blockly.INSERTION_MARKER_COLOUR),Blockly.utils.addClass(this.svgGroup_,"blocklyInsertionMarker"))};Blockly.BlockSvg.prototype.getSvgRoot=function(){return this.svgGroup_};
Blockly.BlockSvg.prototype.dispose=function(a,b){if(this.workspace){Blockly.Tooltip.hide();Blockly.Field.startCache();var c=this.workspace;Blockly.selected==this&&(this.unselect(),this.workspace.cancelCurrentGesture());Blockly.ContextMenu.currentBlock==this&&Blockly.ContextMenu.hide();b&&this.rendered&&(this.unplug(a),Blockly.BlockAnimations.disposeUiEffect(this));this.rendered=!1;if(this.warningTextDb_){for(var d in this.warningTextDb_)clearTimeout(this.warningTextDb_[d]);this.warningTextDb_=null}this.unplug(a);
var e;Blockly.Events.isEnabled()&&(e=new Blockly.Events.BlockDelete(this));Blockly.Events.disable();try{var f=this.getIcons();for(d=0;d<f.length;d++)f[d].dispose();Blockly.BlockSvg.superClass_.dispose.call(this,a)}finally{Blockly.Events.enable()}Blockly.Events.isEnabled()&&e&&Blockly.Events.fire(e);Blockly.utils.removeNode(this.svgGroup_);c.resizeContents();this.svgPathDark_=this.svgPathLight_=this.svgPath_=this.svgGroup_=null;Blockly.Field.stopCache()}};
Blockly.BlockSvg.prototype.updateColour=function(){if(!this.disabled){var a=this.getColour(),b=this.getSecondaryColour(),c=this.getTertiaryColour(),d=goog.color.hexToRgb(a);this.isShadow()?a=this.setShadowColour_(d,b):this.setBorderColour_(d,c);this.svgPath_.setAttribute("fill",a);a=this.getIcons();for(b=0;b<a.length;b++)a[b].updateColour();for(a=0;b=this.inputList[a];a++)for(c=0;d=b.fieldRow[c];c++)d.forceRerender()}};
Blockly.BlockSvg.prototype.updateColour=function(){if(!this.disabled){var a=this.getColour(),b=this.getColourSecondary(),c=this.getColourTertiary(),d=goog.color.hexToRgb(a);this.isShadow()?a=this.setShadowColour_(d,b):this.setBorderColour_(d,c);this.svgPath_.setAttribute("fill",a);a=this.getIcons();for(b=0;b<a.length;b++)a[b].updateColour();for(a=0;b=this.inputList[a];a++)for(c=0;d=b.fieldRow[c];c++)d.forceRerender()}};
Blockly.BlockSvg.prototype.setBorderColour_=function(a,b){if(b)this.svgPathLight_.setAttribute("stroke","none"),this.svgPathDark_.setAttribute("fill","none"),this.svgPath_.setAttribute("stroke",b);else{this.svgPathLight_.style.display="";var c=goog.color.rgbArrayToHex(goog.color.lighten(a,.3)),d=goog.color.rgbArrayToHex(goog.color.darken(a,.2));this.svgPathLight_.setAttribute("stroke",c);this.svgPathDark_.setAttribute("fill",d);this.svgPath_.setAttribute("stroke","none")}};
Blockly.BlockSvg.prototype.setShadowColour_=function(a,b){if(b){this.svgPathLight_.style.display="none";this.svgPathDark_.style.display="none";this.svgPath_.setAttribute("fill",b);var c=b}else a=goog.color.lighten(a,.6),c=goog.color.rgbArrayToHex(a),this.svgPathLight_.style.display="none",this.svgPathDark_.setAttribute("fill",c);return c};
Blockly.BlockSvg.prototype.updateDisabled=function(){this.disabled||this.getInheritedDisabled()?Blockly.utils.addClass(this.svgGroup_,"blocklyDisabled")&&this.svgPath_.setAttribute("fill","url(#"+this.workspace.options.disabledPatternId+")"):Blockly.utils.removeClass(this.svgGroup_,"blocklyDisabled")&&this.updateColour();for(var a=this.getChildren(!1),b=0,c;c=a[b];b++)c.updateDisabled()};
@@ -1646,24 +1653,24 @@ Blockly.bindEventWithChecks_(this.svgBackground_,"mousedown",this,this.onMouseDo
Blockly.Flyout.prototype.dispose=function(){this.hide();Blockly.unbindEvent_(this.eventWrappers_);this.filterWrapper_&&(this.targetWorkspace_.removeChangeListener(this.filterWrapper_),this.filterWrapper_=null);this.scrollbar_&&(this.scrollbar_.dispose(),this.scrollbar_=null);this.workspace_&&(this.workspace_.targetWorkspace=null,this.workspace_.dispose(),this.workspace_=null);this.svgGroup_&&(Blockly.utils.removeNode(this.svgGroup_),this.svgGroup_=null);this.targetWorkspace_=this.svgBackground_=null};
Blockly.Flyout.prototype.getWidth=function(){return this.width_};Blockly.Flyout.prototype.getHeight=function(){return this.height_};Blockly.Flyout.prototype.getWorkspace=function(){return this.workspace_};Blockly.Flyout.prototype.isVisible=function(){return this.isVisible_};Blockly.Flyout.prototype.setVisible=function(a){var b=a!=this.isVisible();this.isVisible_=a;b&&this.updateDisplay_()};
Blockly.Flyout.prototype.setContainerVisible=function(a){var b=a!=this.containerVisible_;this.containerVisible_=a;b&&this.updateDisplay_()};Blockly.Flyout.prototype.updateDisplay_=function(){var a=this.containerVisible_?this.isVisible():!1;this.svgGroup_.style.display=a?"block":"none";this.scrollbar_.setContainerVisible(a)};
Blockly.Flyout.prototype.positionAt_=function(a,b,c,d){this.svgGroup_.setAttribute("width",a);this.svgGroup_.setAttribute("height",b);"svg"==this.svgGroup_.tagName?Blockly.utils.setCssTransform(this.svgGroup_,"translate("+c+"px,"+d+"px)"):this.svgGroup_.setAttribute("transform","translate("+c+","+d+")");this.scrollbar_&&(this.scrollbar_.setOrigin(c,d),this.scrollbar_.resize())};
Blockly.Flyout.prototype.positionAt_=function(a,b,c,d){this.svgGroup_.setAttribute("width",a);this.svgGroup_.setAttribute("height",b);"svg"==this.svgGroup_.tagName?Blockly.utils.setCssTransform(this.svgGroup_,"translate("+c+"px,"+d+"px)"):this.svgGroup_.setAttribute("transform","translate("+c+","+d+")");this.scrollbar_&&(this.scrollbar_.setOrigin(c,d),this.scrollbar_.resize(),this.scrollbar_.setPosition_(this.scrollbar_.position_.x,this.scrollbar_.position_.y))};
Blockly.Flyout.prototype.hide=function(){if(this.isVisible()){this.setVisible(!1);for(var a=0,b;b=this.listeners_[a];a++)Blockly.unbindEvent_(b);this.listeners_.length=0;this.reflowWrapper_&&(this.workspace_.removeChangeListener(this.reflowWrapper_),this.reflowWrapper_=null)}};
Blockly.Flyout.prototype.show=function(a){this.workspace_.setResizesEnabled(!1);this.hide();this.clearOldBlocks_();if("string"==typeof a){a=this.workspace_.targetWorkspace.getToolboxCategoryCallback(a);if("function"!=typeof a)throw TypeError("Couldn't find a callback function when opening a toolbox category.");a=a(this.workspace_.targetWorkspace);if(!Array.isArray(a))throw TypeError("Result of toolbox category callback must be an array.");}this.setVisible(!0);for(var b=[],c=[],d=this.permanentlyDisabled_.length=
0,e;e=a[d];d++)if(e.tagName){var f=e.tagName.toUpperCase(),g=this.horizontalLayout_?this.GAP_X:this.GAP_Y;if("BLOCK"==f)f=Blockly.Xml.domToBlock(e,this.workspace_),f.disabled&&this.permanentlyDisabled_.push(f),b.push({type:"block",block:f}),e=parseInt(e.getAttribute("gap"),10),c.push(isNaN(e)?g:e);else if("SEP"==e.tagName.toUpperCase())e=parseInt(e.getAttribute("gap"),10),!isNaN(e)&&0<c.length?c[c.length-1]=e:c.push(g);else if("BUTTON"==f||"LABEL"==f)e=new Blockly.FlyoutButton(this.workspace_,this.targetWorkspace_,
e,"LABEL"==f),b.push({type:"button",button:e}),c.push(g)}this.layout_(b,c);this.listeners_.push(Blockly.bindEventWithChecks_(this.svgBackground_,"mouseover",this,function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)c.removeSelect()}));this.horizontalLayout_?this.height_=0:this.width_=0;this.workspace_.setResizesEnabled(!0);this.reflow();this.filterForCapacity_();this.position();this.reflowWrapper_=this.reflow.bind(this);this.workspace_.addChangeListener(this.reflowWrapper_)};
Blockly.Flyout.prototype.clearOldBlocks_=function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)c.workspace==this.workspace_&&c.dispose(!1,!1);for(b=0;b<this.mats_.length;b++)(a=this.mats_[b])&&Blockly.utils.removeNode(a);for(b=this.mats_.length=0;a=this.buttons_[b];b++)a.dispose();this.buttons_.length=0;this.workspace_.getPotentialVariableMap().clear()};
Blockly.Flyout.prototype.addBlockListeners_=function(a,b,c){this.listeners_.push(Blockly.bindEventWithChecks_(a,"mousedown",null,this.blockMouseDown_(b)));this.listeners_.push(Blockly.bindEventWithChecks_(c,"mousedown",null,this.blockMouseDown_(b)));this.listeners_.push(Blockly.bindEvent_(a,"mouseover",b,b.addSelect));this.listeners_.push(Blockly.bindEvent_(a,"mouseout",b,b.removeSelect));this.listeners_.push(Blockly.bindEvent_(c,"mouseover",b,b.addSelect));this.listeners_.push(Blockly.bindEvent_(c,
"mouseout",b,b.removeSelect))};Blockly.Flyout.prototype.blockMouseDown_=function(a){var b=this;return function(c){var d=b.targetWorkspace_.getGesture(c);d&&(d.setStartBlock(a),d.handleFlyoutStart(c,b))}};Blockly.Flyout.prototype.onMouseDown_=function(a){var b=this.targetWorkspace_.getGesture(a);b&&b.handleFlyoutStart(a,this)};
"mouseout",b,b.removeSelect))};Blockly.Flyout.prototype.blockMouseDown_=function(a){var b=this;return function(c){var d=b.targetWorkspace_.getGesture(c);d&&(d.setStartBlock(a),d.handleFlyoutStart(c,b))}};Blockly.Flyout.prototype.onMouseDown_=function(a){var b=this.targetWorkspace_.getGesture(a);b&&b.handleFlyoutStart(a,this)};Blockly.Flyout.prototype.isBlockCreatable_=function(a){return!a.disabled};
Blockly.Flyout.prototype.createBlock=function(a){var b=null;Blockly.Events.disable();var c=this.targetWorkspace_.getAllVariables();this.targetWorkspace_.setResizesEnabled(!1);try{b=this.placeNewBlock_(a),Blockly.hideChaff()}finally{Blockly.Events.enable()}a=Blockly.Variables.getAddedVariables(this.targetWorkspace_,c);if(Blockly.Events.isEnabled())for(Blockly.Events.setGroup(!0),Blockly.Events.fire(new Blockly.Events.Create(b)),c=0;c<a.length;c++)Blockly.Events.fire(new Blockly.Events.VarCreate(a[c]));
this.autoClose?this.hide():this.filterForCapacity_();return b};Blockly.Flyout.prototype.initFlyoutButton_=function(a,b,c){var d=a.createDom();a.moveTo(b,c);a.show();this.listeners_.push(Blockly.bindEventWithChecks_(d,"mousedown",this,this.onMouseDown_));this.buttons_.push(a)};
Blockly.Flyout.prototype.createRect_=function(a,b,c,d,e){b=Blockly.utils.createSvgElement("rect",{"fill-opacity":0,x:b,y:c,height:d.height,width:d.width},null);b.tooltip=a;Blockly.Tooltip.bindMouseEvents(b);this.workspace_.getCanvas().insertBefore(b,a.getSvgRoot());a.flyoutRect_=b;return this.mats_[e]=b};
Blockly.Flyout.prototype.moveRectToBlock_=function(a,b){var c=b.getHeightWidth();a.setAttribute("width",c.width);a.setAttribute("height",c.height);var d=b.startHat_?Blockly.BlockSvg.START_HAT_HEIGHT:0;d&&b.moveBy(0,d);d=b.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0;var e=b.getRelativeToSurfaceXY();a.setAttribute("y",e.y);a.setAttribute("x",this.RTL?e.x-c.width+d:e.x-d)};
Blockly.Flyout.prototype.filterForCapacity_=function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)-1==this.permanentlyDisabled_.indexOf(c)&&c.setDisabled(!this.targetWorkspace_.isCapacityAvailable(Blockly.utils.getBlockTypeCounts(c)))};Blockly.Flyout.prototype.reflow=function(){this.reflowWrapper_&&this.workspace_.removeChangeListener(this.reflowWrapper_);this.reflowInternal_();this.reflowWrapper_&&this.workspace_.addChangeListener(this.reflowWrapper_)};
Blockly.Flyout.prototype.filterForCapacity_=function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)if(-1==this.permanentlyDisabled_.indexOf(c))for(var d=!this.targetWorkspace_.isCapacityAvailable(Blockly.utils.getBlockTypeCounts(c));c;)c.setDisabled(d),c=c.getNextBlock()};Blockly.Flyout.prototype.reflow=function(){this.reflowWrapper_&&this.workspace_.removeChangeListener(this.reflowWrapper_);this.reflowInternal_();this.reflowWrapper_&&this.workspace_.addChangeListener(this.reflowWrapper_)};
Blockly.Flyout.prototype.isScrollable=function(){return this.scrollbar_?this.scrollbar_.isVisible():!1};
Blockly.Flyout.prototype.placeNewBlock_=function(a){var b=this.targetWorkspace_;if(!a.getSvgRoot())throw Error("oldBlock is not rendered.");var c=Blockly.Xml.blockToDom(a);b.setResizesEnabled(!1);c=Blockly.Xml.domToBlock(c,b);if(!c.getSvgRoot())throw Error("block is not rendered.");var d=b.getOriginOffsetInPixels(),e=this.workspace_.getOriginOffsetInPixels();a=a.getRelativeToSurfaceXY().scale(this.workspace_.scale);a=goog.math.Coordinate.sum(e,a);b=goog.math.Coordinate.difference(a,d).scale(1/b.scale);
c.moveBy(b.x,b.y);return c};Blockly.HorizontalFlyout=function(a){a.getMetrics=this.getMetrics_.bind(this);a.setMetrics=this.setMetrics_.bind(this);Blockly.HorizontalFlyout.superClass_.constructor.call(this,a);this.horizontalLayout_=!0};goog.inherits(Blockly.HorizontalFlyout,Blockly.Flyout);
Blockly.HorizontalFlyout.prototype.getMetrics_=function(){if(!this.isVisible())return null;try{var a=this.workspace_.getCanvas().getBBox()}catch(e){a={height:0,y:0,width:0,x:0}}var b=this.SCROLLBAR_PADDING,c=this.SCROLLBAR_PADDING;this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM&&(b=0);var d=this.height_;this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP&&(d-=this.SCROLLBAR_PADDING);return{viewHeight:d,viewWidth:this.width_-2*this.SCROLLBAR_PADDING,contentHeight:(a.height+2*this.MARGIN)*this.workspace_.scale,
contentWidth:(a.width+2*this.MARGIN)*this.workspace_.scale,viewTop:-this.workspace_.scrollY,viewLeft:-this.workspace_.scrollX,contentTop:a.y,contentLeft:a.x,absoluteTop:b,absoluteLeft:c}};Blockly.HorizontalFlyout.prototype.setMetrics_=function(a){var b=this.getMetrics_();b&&("number"==typeof a.x&&(this.workspace_.scrollX=-b.contentWidth*a.x),this.workspace_.translate(this.workspace_.scrollX+b.absoluteLeft,this.workspace_.scrollY+b.absoluteTop))};
contentWidth:(a.width+2*this.MARGIN)*this.workspace_.scale,viewTop:-this.workspace_.scrollY,viewLeft:-this.workspace_.scrollX,contentTop:0,contentLeft:0,absoluteTop:b,absoluteLeft:c}};Blockly.HorizontalFlyout.prototype.setMetrics_=function(a){var b=this.getMetrics_();b&&("number"==typeof a.x&&(this.workspace_.scrollX=-b.contentWidth*a.x),this.workspace_.translate(this.workspace_.scrollX+b.absoluteLeft,this.workspace_.scrollY+b.absoluteTop))};
Blockly.HorizontalFlyout.prototype.position=function(){if(this.isVisible()){var a=this.targetWorkspace_.getMetrics();if(a){this.width_=a.viewWidth;this.setBackgroundPath_(a.viewWidth-2*this.CORNER_RADIUS,this.height_-this.CORNER_RADIUS);var b=a.absoluteLeft,c=a.absoluteTop;this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM&&(c+=a.viewHeight-this.height_);this.positionAt_(this.width_,this.height_,b,c)}}};
Blockly.HorizontalFlyout.prototype.setBackgroundPath_=function(a,b){var c=this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP,d=["M 0,"+(c?0:this.CORNER_RADIUS)];c?(d.push("h",a+2*this.CORNER_RADIUS),d.push("v",b),d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,-this.CORNER_RADIUS,this.CORNER_RADIUS),d.push("h",-1*a),d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,-this.CORNER_RADIUS,-this.CORNER_RADIUS)):(d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,this.CORNER_RADIUS,-this.CORNER_RADIUS),
d.push("h",a),d.push("a",this.CORNER_RADIUS,this.CORNER_RADIUS,0,0,1,this.CORNER_RADIUS,this.CORNER_RADIUS),d.push("v",b),d.push("h",-a-2*this.CORNER_RADIUS));d.push("z");this.svgBackground_.setAttribute("d",d.join(" "))};Blockly.HorizontalFlyout.prototype.scrollToStart=function(){this.scrollbar_.set(this.RTL?Infinity:0)};
@@ -1671,7 +1678,7 @@ Blockly.HorizontalFlyout.prototype.wheel_=function(a){var b=a.deltaX||a.deltaY;i
Blockly.HorizontalFlyout.prototype.layout_=function(a,b){this.workspace_.scale=this.targetWorkspace_.scale;var c=this.MARGIN,d=this.RTL?c:c+Blockly.BlockSvg.TAB_WIDTH;this.RTL&&(a=a.reverse());for(var e=0,f;f=a[e];e++)if("block"==f.type){f=f.block;for(var g=f.getDescendants(!1),h=0,k;k=g[h];h++)k.isInFlyout=!0;f.render();g=f.getSvgRoot();h=f.getHeightWidth();k=f.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0;k=this.RTL?d+h.width:d+k;f.moveBy(k,c);k=this.createRect_(f,k,c,h,e);d+=h.width+b[e];this.addBlockListeners_(g,
f,k)}else"button"==f.type&&(this.initFlyoutButton_(f.button,d,c),d+=f.button.width+b[e])};Blockly.HorizontalFlyout.prototype.isDragTowardWorkspace=function(a){a=Math.atan2(a.y,a.x)/Math.PI*180;var b=this.dragAngleRange_;return a<90+b&&a>90-b||a>-90-b&&a<-90+b?!0:!1};
Blockly.HorizontalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect(),b=a.top;a=a.height;if(this.toolboxPosition_==Blockly.TOOLBOX_AT_TOP)return new goog.math.Rect(-1E9,b-1E9,2E9,1E9+a);if(this.toolboxPosition_==Blockly.TOOLBOX_AT_BOTTOM)return new goog.math.Rect(-1E9,b,2E9,1E9+a)};
Blockly.HorizontalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++)a=Math.max(a,d.getHeightWidth().height);a+=1.5*this.MARGIN;a*=this.workspace_.scale;a+=Blockly.Scrollbar.scrollbarThickness;if(this.height_!=a){for(c=0;d=b[c];c++)d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d);this.height_=a;this.targetWorkspace_.resize()}};Blockly.VerticalFlyout=function(a){a.getMetrics=this.getMetrics_.bind(this);a.setMetrics=this.setMetrics_.bind(this);Blockly.VerticalFlyout.superClass_.constructor.call(this,a);this.horizontalLayout_=!1};goog.inherits(Blockly.VerticalFlyout,Blockly.Flyout);
Blockly.HorizontalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++)a=Math.max(a,d.getHeightWidth().height);a+=1.5*this.MARGIN;a*=this.workspace_.scale;a+=Blockly.Scrollbar.scrollbarThickness;if(this.height_!=a){for(c=0;d=b[c];c++)d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d);this.height_=a;this.position()}};Blockly.VerticalFlyout=function(a){a.getMetrics=this.getMetrics_.bind(this);a.setMetrics=this.setMetrics_.bind(this);Blockly.VerticalFlyout.superClass_.constructor.call(this,a);this.horizontalLayout_=!1};goog.inherits(Blockly.VerticalFlyout,Blockly.Flyout);
Blockly.VerticalFlyout.prototype.getMetrics_=function(){if(!this.isVisible())return null;try{var a=this.workspace_.getCanvas().getBBox()}catch(e){a={height:0,y:0,width:0,x:0}}var b=this.SCROLLBAR_PADDING,c=this.height_-2*this.SCROLLBAR_PADDING,d=this.width_;this.RTL||(d-=this.SCROLLBAR_PADDING);return{viewHeight:c,viewWidth:d,contentHeight:a.height*this.workspace_.scale+2*this.MARGIN,contentWidth:a.width*this.workspace_.scale+2*this.MARGIN,viewTop:-this.workspace_.scrollY+a.y,viewLeft:-this.workspace_.scrollX,
contentTop:a.y,contentLeft:a.x,absoluteTop:b,absoluteLeft:0}};Blockly.VerticalFlyout.prototype.setMetrics_=function(a){var b=this.getMetrics_();b&&("number"==typeof a.y&&(this.workspace_.scrollY=-b.contentHeight*a.y),this.workspace_.translate(this.workspace_.scrollX+b.absoluteLeft,this.workspace_.scrollY+b.absoluteTop))};
Blockly.VerticalFlyout.prototype.position=function(){if(this.isVisible()){var a=this.targetWorkspace_.getMetrics();if(a){this.height_=a.viewHeight;this.setBackgroundPath_(this.width_-this.CORNER_RADIUS,a.viewHeight-2*this.CORNER_RADIUS);var b=a.absoluteTop,c=a.absoluteLeft;this.toolboxPosition_==Blockly.TOOLBOX_AT_RIGHT&&(this.leftEdge_=c+=a.viewWidth-this.width_);this.positionAt_(this.width_,this.height_,c,b)}}};
@@ -1682,7 +1689,7 @@ f.button.height+b[e])};Blockly.VerticalFlyout.prototype.isDragTowardWorkspace=fu
Blockly.VerticalFlyout.prototype.getClientRect=function(){if(!this.svgGroup_)return null;var a=this.svgGroup_.getBoundingClientRect(),b=a.left;a=a.width;if(this.toolboxPosition_==Blockly.TOOLBOX_AT_LEFT)return new goog.math.Rect(b-1E9,-1E9,1E9+a,2E9);if(goog.userAgent.GECKO&&this.targetWorkspace_&&this.targetWorkspace_.isMutator){var c=this.targetWorkspace_.svgGroup_.getBoundingClientRect().x;10>Math.abs(c-b)&&(b+=this.leftEdge_*this.targetWorkspace_.options.parentWorkspace.scale)}return new goog.math.Rect(b,
-1E9,1E9+a,2E9)};
Blockly.VerticalFlyout.prototype.reflowInternal_=function(){this.workspace_.scale=this.targetWorkspace_.scale;for(var a=0,b=this.workspace_.getTopBlocks(!1),c=0,d;d=b[c];c++){var e=d.getHeightWidth().width;d.outputConnection&&(e-=Blockly.BlockSvg.TAB_WIDTH);a=Math.max(a,e)}for(c=0;d=this.buttons_[c];c++)a=Math.max(a,d.width);a+=1.5*this.MARGIN+Blockly.BlockSvg.TAB_WIDTH;a*=this.workspace_.scale;a+=Blockly.Scrollbar.scrollbarThickness;if(this.width_!=a){for(c=0;d=b[c];c++)this.RTL&&(e=d.getRelativeToSurfaceXY().x,
d.moveBy(a/this.workspace_.scale-this.MARGIN-Blockly.BlockSvg.TAB_WIDTH-e,0)),d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d);if(this.RTL)for(c=0;d=this.buttons_[c];c++)b=d.getPosition().y,d.moveTo(a/this.workspace_.scale-d.width-this.MARGIN-Blockly.BlockSvg.TAB_WIDTH,b);this.width_=a;this.targetWorkspace_.resize()}};Blockly.Toolbox=function(a){this.workspace_=a;this.RTL=a.options.RTL;this.horizontalLayout_=a.options.horizontalLayout;this.toolboxPosition=a.options.toolboxPosition;this.config_={indentWidth:19,cssRoot:"blocklyTreeRoot",cssHideRoot:"blocklyHidden",cssItem:"",cssTreeRow:"blocklyTreeRow",cssItemLabel:"blocklyTreeLabel",cssTreeIcon:"blocklyTreeIcon",cssExpandedFolderIcon:"blocklyTreeIconOpen",cssFileIcon:"blocklyTreeIconNone",cssSelectedRow:"blocklyTreeSelected"};this.treeSeparatorConfig_={cssTreeRow:"blocklyTreeSeparator"};
d.moveBy(a/this.workspace_.scale-this.MARGIN-Blockly.BlockSvg.TAB_WIDTH-e,0)),d.flyoutRect_&&this.moveRectToBlock_(d.flyoutRect_,d);if(this.RTL)for(c=0;d=this.buttons_[c];c++)b=d.getPosition().y,d.moveTo(a/this.workspace_.scale-d.width-this.MARGIN-Blockly.BlockSvg.TAB_WIDTH,b);this.width_=a;this.position()}};Blockly.Toolbox=function(a){this.workspace_=a;this.RTL=a.options.RTL;this.horizontalLayout_=a.options.horizontalLayout;this.toolboxPosition=a.options.toolboxPosition;this.config_={indentWidth:19,cssRoot:"blocklyTreeRoot",cssHideRoot:"blocklyHidden",cssItem:"",cssTreeRow:"blocklyTreeRow",cssItemLabel:"blocklyTreeLabel",cssTreeIcon:"blocklyTreeIcon",cssExpandedFolderIcon:"blocklyTreeIconOpen",cssFileIcon:"blocklyTreeIconNone",cssSelectedRow:"blocklyTreeSelected"};this.treeSeparatorConfig_={cssTreeRow:"blocklyTreeSeparator"};
this.horizontalLayout_&&(this.config_.cssTreeRow+=a.RTL?" blocklyHorizontalTreeRtl":" blocklyHorizontalTree",this.treeSeparatorConfig_.cssTreeRow="blocklyTreeSeparatorHorizontal "+(a.RTL?"blocklyHorizontalTreeRtl":"blocklyHorizontalTree"),this.config_.cssTreeIcon="")};Blockly.Toolbox.prototype.width=0;Blockly.Toolbox.prototype.height=0;Blockly.Toolbox.prototype.selectedOption_=null;Blockly.Toolbox.prototype.lastCategory_=null;
Blockly.Toolbox.prototype.init=function(){var a=this.workspace_,b=this.workspace_.getParentSvg();this.HtmlDiv=document.createElement("div");this.HtmlDiv.className="blocklyToolboxDiv";this.HtmlDiv.setAttribute("dir",a.RTL?"RTL":"LTR");b.parentNode.insertBefore(this.HtmlDiv,b);Blockly.bindEventWithChecks_(this.HtmlDiv,"mousedown",this,function(a){Blockly.utils.isRightButton(a)||a.target==this.HtmlDiv?Blockly.hideChaff(!1):Blockly.hideChaff(!0);Blockly.Touch.clearTouchIdentifier()},!1,!0);b={disabledPatternId:a.options.disabledPatternId,
parentWorkspace:a,RTL:a.RTL,oneBasedIndex:a.options.oneBasedIndex,horizontalLayout:a.horizontalLayout,toolboxPosition:a.options.toolboxPosition};this.flyout_=null;this.flyout_=a.horizontalLayout?new Blockly.HorizontalFlyout(b):new Blockly.VerticalFlyout(b);Blockly.utils.insertAfter(this.flyout_.createDom("svg"),this.workspace_.getParentSvg());this.flyout_.init(a);this.config_.cleardotPath=a.options.pathToMedia+"1x1.gif";this.config_.cssCollapsedFolderIcon="blocklyTreeIconClosed"+(a.RTL?"Rtl":"Ltr");
@@ -1765,5 +1772,5 @@ Blockly.checkBlockColourConstants=function(){Blockly.checkBlockColourConstant_("
"HUE"],230);Blockly.checkBlockColourConstant_("TEXTS_HUE",["Blocks","texts","HUE"],void 0);Blockly.checkBlockColourConstant_("TEXTS_HUE",["Constants","Text","HUE"],160);Blockly.checkBlockColourConstant_("LISTS_HUE",["Blocks","lists","HUE"],void 0);Blockly.checkBlockColourConstant_("LISTS_HUE",["Constants","Lists","HUE"],260);Blockly.checkBlockColourConstant_("COLOUR_HUE",["Blocks","colour","HUE"],void 0);Blockly.checkBlockColourConstant_("COLOUR_HUE",["Constants","Colour","HUE"],20);Blockly.checkBlockColourConstant_("VARIABLES_HUE",
["Blocks","variables","HUE"],void 0);Blockly.checkBlockColourConstant_("VARIABLES_HUE",["Constants","Variables","HUE"],330);Blockly.checkBlockColourConstant_("VARIABLES_DYNAMIC_HUE",["Constants","VariablesDynamic","HUE"],310);Blockly.checkBlockColourConstant_("PROCEDURES_HUE",["Blocks","procedures","HUE"],void 0)};
Blockly.checkBlockColourConstant_=function(a,b,c){for(var d="Blockly",e=Blockly,f=0;f<b.length;++f)d+="."+b[f],e&&(e=e[b[f]]);e&&e!==c&&(a=(void 0===c?'%1 has been removed. Use Blockly.Msg["%2"].':'%1 is deprecated and unused. Override Blockly.Msg["%2"].').replace("%1",d).replace("%2",a),console.warn(a))};
Blockly.setTheme=function(a){this.theme_=a;a=Blockly.getMainWorkspace();this.updateBlockStyles_(a.getAllBlocks().filter(function(a){return void 0!==a.getStyleName()}));!a.toolbox_&&a.flyout_&&a.flyout_.workspace_?this.updateBlockStyles_(a.flyout_.workspace_.getAllBlocks()):a.refreshToolboxSelection();a.toolbox_&&a.toolbox_.updateColourFromTheme();var b=new Blockly.Events.Ui(null,"themeChanged");b.workspaceId=a.id;Blockly.Events.fire(b)};
Blockly.setTheme=function(a){this.theme_=a;a=Blockly.getMainWorkspace();this.updateBlockStyles_(a.getAllBlocks().filter(function(a){return void 0!==a.getStyleName()}));!a.toolbox_&&a.flyout_&&a.flyout_.workspace_?this.updateBlockStyles_(a.flyout_.workspace_.getAllBlocks()):a.refreshToolboxSelection();a.toolbox_&&a.toolbox_.updateColourFromTheme();var b=new Blockly.Events.Ui(null,"theme");b.workspaceId=a.id;Blockly.Events.fire(b)};
Blockly.updateBlockStyles_=function(a){for(var b=0;b<a.length;b++){var c=a[b],d=c.getStyleName();c.setStyle(d);c.mutator&&c.mutator.updateBlockStyle(d)}};Blockly.getTheme=function(){return this.theme_};goog.global.console||(goog.global.console={log:function(){},warn:function(){}});goog.global.Blockly||(goog.global.Blockly={});goog.global.Blockly.getMainWorkspace=Blockly.getMainWorkspace;goog.global.Blockly.addChangeListener=Blockly.addChangeListener;
+29 -20
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -95,10 +95,10 @@ e.getId());a&&this.paramIds_&&d.setAttribute("paramId",this.paramIds_[c]);b.appe
console.log("Failed to create a variable with name "+d+", ignoring.")}this.updateParams_();Blockly.Procedures.mutateCallers(this);this.setStatements_("false"!==a.getAttribute("statements"))},decompose:function(a){var b=a.newBlock("procedures_mutatorcontainer");b.initSvg();this.getInput("RETURN")?b.setFieldValue(this.hasStatements_?"TRUE":"FALSE","STATEMENTS"):b.getInput("STATEMENT_INPUT").setVisible(!1);for(var c=b.getInput("STACK").connection,d=0;d<this.arguments_.length;d++){var e=a.newBlock("procedures_mutatorarg");
e.initSvg();e.setFieldValue(this.arguments_[d],"NAME");e.oldLocation=d;c.connect(e.previousConnection);c=e.nextConnection}Blockly.Procedures.mutateCallers(this);return b},compose:function(a){this.arguments_=[];this.paramIds_=[];this.argumentVarModels_=[];for(var b=a.getInputTargetBlock("STACK");b;){var c=b.getFieldValue("NAME");this.arguments_.push(c);var d=this.workspace.getVariable(c,"");null!=d?this.argumentVarModels_.push(d):console.log("Failed to get variable named "+c+", ignoring.");this.paramIds_.push(b.id);
b=b.nextConnection&&b.nextConnection.targetBlock()}this.updateParams_();Blockly.Procedures.mutateCallers(this);a=a.getFieldValue("STATEMENTS");if(null!==a&&(a="TRUE"==a,this.hasStatements_!=a))if(a)this.setStatements_(!0),Blockly.Mutator.reconnect(this.statementConnection_,this,"STACK"),this.statementConnection_=null;else{a=this.getInput("STACK").connection;if(this.statementConnection_=a.targetConnection)a=a.targetBlock(),a.unplug(),a.bumpNeighbours_();this.setStatements_(!1)}},getProcedureDef:function(){return[this.getFieldValue("NAME"),
this.arguments_,!1]},getVars:function(){return this.arguments_},getVarModels:function(){return this.argumentVarModels_},renameVarById:function(a,b){var c=this.workspace.getVariableById(a);if(""==c.type){c=c.name;for(var d=this.workspace.getVariableById(b),e=!1,f=0;f<this.argumentVarModels_.length;f++)this.argumentVarModels_[f].getId()==a&&(this.arguments_[f]=d.name,this.argumentVarModels_[f]=d,e=!0);e&&this.displayRenamedVar_(c,d.name)}},updateVarName:function(a){for(var b=a.name,c=!1,d=0;d<this.argumentVarModels_.length;d++)if(this.argumentVarModels_[d].getId()==
a.getId()){var e=this.arguments_[d];this.arguments_[d]=b;c=!0}c&&this.displayRenamedVar_(e,b)},displayRenamedVar_:function(a,b){this.updateParams_();if(this.mutator.isVisible())for(var c=this.mutator.workspace_.getAllBlocks(!1),d=0,e;e=c[d];d++)"procedures_mutatorarg"==e.type&&Blockly.Names.equals(a,e.getFieldValue("NAME"))&&e.setFieldValue(b,"NAME")},customContextMenu:function(a){if(!this.isInFlyout){var b={enabled:!0},c=this.getFieldValue("NAME");b.text=Blockly.Msg.PROCEDURES_CREATE_DO.replace("%1",
c);var d=document.createElement("mutation");d.setAttribute("name",c);for(var e=0;e<this.arguments_.length;e++)c=document.createElement("arg"),c.setAttribute("name",this.arguments_[e]),d.appendChild(c);c=document.createElement("block");c.setAttribute("type",this.callType_);c.appendChild(d);b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b);if(!this.isCollapsed())for(e=0;e<this.argumentVarModels_.length;e++)b={enabled:!0},d=this.argumentVarModels_[e],c=d.name,b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1",
c),d=Blockly.Variables.generateVariableFieldDom(d),c=document.createElement("block"),c.setAttribute("type","variables_get"),c.appendChild(d),b.callback=Blockly.ContextMenu.callbackFactory(this,c),a.push(b)}},callType_:"procedures_callnoreturn"};
this.arguments_,!1]},getVars:function(){return this.arguments_},getVarModels:function(){return this.argumentVarModels_},renameVarById:function(a,b){var c=this.workspace.getVariableById(a);if(""==c.type){c=c.name;for(var d=this.workspace.getVariableById(b),e=!1,f=0;f<this.argumentVarModels_.length;f++)this.argumentVarModels_[f].getId()==a&&(this.arguments_[f]=d.name,this.argumentVarModels_[f]=d,e=!0);e&&(this.displayRenamedVar_(c,d.name),Blockly.Procedures.mutateCallers(this))}},updateVarName:function(a){for(var b=
a.name,c=!1,d=0;d<this.argumentVarModels_.length;d++)if(this.argumentVarModels_[d].getId()==a.getId()){var e=this.arguments_[d];this.arguments_[d]=b;c=!0}c&&(this.displayRenamedVar_(e,b),Blockly.Procedures.mutateCallers(this))},displayRenamedVar_:function(a,b){this.updateParams_();if(this.mutator.isVisible())for(var c=this.mutator.workspace_.getAllBlocks(!1),d=0,e;e=c[d];d++)"procedures_mutatorarg"==e.type&&Blockly.Names.equals(a,e.getFieldValue("NAME"))&&e.setFieldValue(b,"NAME")},customContextMenu:function(a){if(!this.isInFlyout){var b=
{enabled:!0},c=this.getFieldValue("NAME");b.text=Blockly.Msg.PROCEDURES_CREATE_DO.replace("%1",c);var d=document.createElement("mutation");d.setAttribute("name",c);for(var e=0;e<this.arguments_.length;e++)c=document.createElement("arg"),c.setAttribute("name",this.arguments_[e]),d.appendChild(c);c=document.createElement("block");c.setAttribute("type",this.callType_);c.appendChild(d);b.callback=Blockly.ContextMenu.callbackFactory(this,c);a.push(b);if(!this.isCollapsed())for(e=0;e<this.argumentVarModels_.length;e++)b=
{enabled:!0},d=this.argumentVarModels_[e],c=d.name,b.text=Blockly.Msg.VARIABLES_SET_CREATE_GET.replace("%1",c),d=Blockly.Variables.generateVariableFieldDom(d),c=document.createElement("block"),c.setAttribute("type","variables_get"),c.appendChild(d),b.callback=Blockly.ContextMenu.callbackFactory(this,c),a.push(b)}},callType_:"procedures_callnoreturn"};
Blockly.Blocks.procedures_defreturn={init:function(){var a=new Blockly.FieldTextInput("",Blockly.Procedures.rename);a.setSpellcheck(!1);this.appendDummyInput().appendField(Blockly.Msg.PROCEDURES_DEFRETURN_TITLE).appendField(a,"NAME").appendField("","PARAMS");this.appendValueInput("RETURN").setAlign(Blockly.ALIGN_RIGHT).appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);this.setMutator(new Blockly.Mutator(["procedures_mutatorarg"]));(this.workspace.options.comments||this.workspace.options.parentWorkspace&&
this.workspace.options.parentWorkspace.options.comments)&&Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT&&this.setCommentText(Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT);this.setStyle("procedure_blocks");this.setTooltip(Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP);this.setHelpUrl(Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL);this.arguments_=[];this.argumentVarModels_=[];this.setStatements_(!0);this.statementConnection_=null},setStatements_:Blockly.Blocks.procedures_defnoreturn.setStatements_,updateParams_:Blockly.Blocks.procedures_defnoreturn.updateParams_,
mutationToDom:Blockly.Blocks.procedures_defnoreturn.mutationToDom,domToMutation:Blockly.Blocks.procedures_defnoreturn.domToMutation,decompose:Blockly.Blocks.procedures_defnoreturn.decompose,compose:Blockly.Blocks.procedures_defnoreturn.compose,getProcedureDef:function(){return[this.getFieldValue("NAME"),this.arguments_,!0]},getVars:Blockly.Blocks.procedures_defnoreturn.getVars,getVarModels:Blockly.Blocks.procedures_defnoreturn.getVarModels,renameVarById:Blockly.Blocks.procedures_defnoreturn.renameVarById,
+435
View File
@@ -0,0 +1,435 @@
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.ha');
goog.require('Blockly.Msg');
Blockly.Msg["ADD_COMMENT"] = "Daɗa Sharhi";
Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "An kasa goge siffa '%1' sabo da tana daga sashi na bayanin aikin '%2'";
Blockly.Msg["CHANGE_VALUE_TITLE"] = "Canza kima:";
Blockly.Msg["CLEAN_UP"] = "A share Bululluka";
Blockly.Msg["COLLAPSE_ALL"] = "Rusa Bululluka";
Blockly.Msg["COLLAPSE_BLOCK"] = "Rusa Bulo";
Blockly.Msg["COLOUR_BLEND_COLOUR1"] = "launi na 1";
Blockly.Msg["COLOUR_BLEND_COLOUR2"] = "launi na 2";
Blockly.Msg["COLOUR_BLEND_HELPURL"] = "http://meyerweb.com/eric/tools/color-blend/"; // untranslated
Blockly.Msg["COLOUR_BLEND_RATIO"] = "lissafi";
Blockly.Msg["COLOUR_BLEND_TITLE"] = "gauraya";
Blockly.Msg["COLOUR_BLEND_TOOLTIP"] = "Ana gauraya launuka biyu tare da wani lissafi da aka bayar (0.0 - 1.0).";
Blockly.Msg["COLOUR_PICKER_HELPURL"] = "https://en.wikipedia.org/wiki/Color";
Blockly.Msg["COLOUR_PICKER_TOOLTIP"] = "Zaɓi launi daga faifan launuka.";
Blockly.Msg["COLOUR_RANDOM_HELPURL"] = "http://randomcolour.com"; // untranslated
Blockly.Msg["COLOUR_RANDOM_TITLE"] = "launuka da aka hargitsa";
Blockly.Msg["COLOUR_RANDOM_TOOLTIP"] = "Zaɓi launi daga wanɗanda aka hargitsa.";
Blockly.Msg["COLOUR_RGB_BLUE"] = "shuɗi";
Blockly.Msg["COLOUR_RGB_GREEN"] = "kore";
Blockly.Msg["COLOUR_RGB_HELPURL"] = "http://www.december.com/html/spec/colorper.html"; // untranslated
Blockly.Msg["COLOUR_RGB_RED"] = "ja";
Blockly.Msg["COLOUR_RGB_TITLE"] = "launi tare da";
Blockly.Msg["COLOUR_RGB_TOOLTIP"] = "Ƙirƙiri launi tare da wani yawa da aka fayyace na ja, kore, da shuɗi. Duk kimomin dole su zamo tsakanin 0 da 100.";
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK"] = "ɓalle daga cikin kewaye";
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE"] = "fara da maimaitawa ta gaba ta kewaye";
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK"] = "ɓalle daga kewaye wanda ya ƙunsa.";
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE"] = "Tsallake sauran wannan kewaye, sannan kuma a ci gaba da maimaitawa ta gaba ta kewaye.";
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_WARNING"] = "Gargaɗi: Wannan bulon za a iya amfani da shi ne kawai a wajen kewaye.";
Blockly.Msg["CONTROLS_FOREACH_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
Blockly.Msg["CONTROLS_FOREACH_TITLE"] = "ga kowane abu %1 a cikin jeri %2";
Blockly.Msg["CONTROLS_FOREACH_TOOLTIP"] = "Ga kowane abu a jeri, saka siffar '%1' zuwa ga abin, sannan a maimaita wasu lambobin.";
Blockly.Msg["CONTROLS_FOR_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
Blockly.Msg["CONTROLS_FOR_TITLE"] = "Ƙirga da %1 daga %2 zuwa %3 ƙara %4";
Blockly.Msg["CONTROLS_FOR_TOOLTIP"] = "Sami siffar '%1' ta ɗauki kowa ce kima daga lambar da aka fara da ita zuwa lambar da aka ƙare da ita, ana ƙirgawa daga wata tazara da aka fayyace. Maimaita wannan lamba a kowane lokaci:";
Blockly.Msg["CONTROLS_IF_ELSEIF_TOOLTIP"] = "Daɗa sharaɗi zuwa idan bulo.";
Blockly.Msg["CONTROLS_IF_ELSE_TOOLTIP"] = "Daɗa na ƙarshe, sharaɗin kama-duk zuwa idan bulo.";
Blockly.Msg["CONTROLS_IF_HELPURL"] = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
Blockly.Msg["CONTROLS_IF_IF_TOOLTIP"] = "Daɗa, cire, ko sake tsarin ɓangarori domin sake fasalin wannan idan bulo.";
Blockly.Msg["CONTROLS_IF_MSG_ELSE"] = "wani";
Blockly.Msg["CONTROLS_IF_MSG_ELSEIF"] = "wani idan";
Blockly.Msg["CONTROLS_IF_MSG_IF"] = "idan";
Blockly.Msg["CONTROLS_IF_TOOLTIP_1"] = "Idan kima gaskiya ce, to a yi wasu maganganu.";
Blockly.Msg["CONTROLS_IF_TOOLTIP_2"] = "Idan kimar gaskiya ce, to a yi bulo na farko na maganganu. Idan ba haka ba, yi bulo na biyu na maganganu.";
Blockly.Msg["CONTROLS_IF_TOOLTIP_3"] = "Idan kimar farko gaskiya ce, to yi bulon farko na maganganun. In ba haka ba, idan kima ta biyu ce gaskiya, yi bolu na biyu na maganganun.";
Blockly.Msg["CONTROLS_IF_TOOLTIP_4"] = "Idan kimar farko gaskiya ce, to yi bulon farko na maganganun. In ba haka ba, idan kima ta biyu ce gaskiya, yi bolu na biyu na maganganun. Idan babu kimar da take gaskiya, yi bulo na ƙarshe na maganganun.";
Blockly.Msg["CONTROLS_REPEAT_HELPURL"] = "https://en.wikipedia.org/wiki/For_loop";
Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"] = "yi";
Blockly.Msg["CONTROLS_REPEAT_TITLE"] = "maimaita sau %1";
Blockly.Msg["CONTROLS_REPEAT_TOOLTIP"] = "Yi wasu bayanai sau da dama.";
Blockly.Msg["CONTROLS_WHILEUNTIL_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated
Blockly.Msg["CONTROLS_WHILEUNTIL_OPERATOR_UNTIL"] = "maimaita har sai";
Blockly.Msg["CONTROLS_WHILEUNTIL_OPERATOR_WHILE"] = "maimaita yayin da";
Blockly.Msg["CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL"] = "Yayin da wata kima ta zama ƙarya, maimaita wasu lambobi.";
Blockly.Msg["CONTROLS_WHILEUNTIL_TOOLTIP_WHILE"] = "Yayin da wata kima ta zama gaskiya, maimaita wasu lambobi.";
Blockly.Msg["DELETE_ALL_BLOCKS"] = "A goge duk bululluka %1?";
Blockly.Msg["DELETE_BLOCK"] = "Goge Bulo";
Blockly.Msg["DELETE_VARIABLE"] = "A goge siffar '%1'";
Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "A goge amfanunnukan %1 na siffar '%2'?";
Blockly.Msg["DELETE_X_BLOCKS"] = "Goge Bulo %1";
Blockly.Msg["DISABLE_BLOCK"] = "Kashe Bulo";
Blockly.Msg["DUPLICATE_BLOCK"] = "Yi kwafi";
Blockly.Msg["DUPLICATE_COMMENT"] = "Kwafi Sharhi";
Blockly.Msg["ENABLE_BLOCK"] = "Kunna Bulo";
Blockly.Msg["EXPAND_ALL"] = "Faɗaɗa Bulullaka";
Blockly.Msg["EXPAND_BLOCK"] = "Faɗaɗa Bulo";
Blockly.Msg["EXTERNAL_INPUTS"] = "Bayanan Waje";
Blockly.Msg["HELP"] = "Taimako";
Blockly.Msg["INLINE_INPUTS"] = "Bayanai na Cikin layi";
Blockly.Msg["IOS_CANCEL"] = "Soke";
Blockly.Msg["IOS_ERROR"] = "Kuskure";
Blockly.Msg["IOS_OK"] = "TO";
Blockly.Msg["IOS_PROCEDURES_ADD_INPUT"] = "+ Daɗa Bayani";
Blockly.Msg["IOS_PROCEDURES_ALLOW_STATEMENTS"] = "Bar lamba";
Blockly.Msg["IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR"] = "Wannan aikin yana da kwafin bayanai.";
Blockly.Msg["IOS_PROCEDURES_INPUTS"] = "BAYANAI";
Blockly.Msg["IOS_VARIABLES_ADD_BUTTON"] = "Daɗa";
Blockly.Msg["IOS_VARIABLES_ADD_VARIABLE"] = "+ Daɗa Siffa";
Blockly.Msg["IOS_VARIABLES_DELETE_BUTTON"] = "Goge";
Blockly.Msg["IOS_VARIABLES_EMPTY_NAME_ERROR"] = "Ba za ka iya amfani da sunann siffa wanda ba komai ba.";
Blockly.Msg["IOS_VARIABLES_RENAME_BUTTON"] = "Sake suna";
Blockly.Msg["IOS_VARIABLES_VARIABLE_NAME"] = "Sunan siffa";
Blockly.Msg["LISTS_CREATE_EMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
Blockly.Msg["LISTS_CREATE_EMPTY_TITLE"] = "ƙirƙiri jeri wanda babu komai";
Blockly.Msg["LISTS_CREATE_EMPTY_TOOLTIP"] = "Ya dawo da jeri, na tsawon 0, wanda bai ƙunshi ajiye bayanai ba";
Blockly.Msg["LISTS_CREATE_WITH_CONTAINER_TITLE_ADD"] = "jeri";
Blockly.Msg["LISTS_CREATE_WITH_CONTAINER_TOOLTIP"] = "Daɗa, cire, ko sake tsarin ɓangarori domin sake fasalin wannan bulo.";
Blockly.Msg["LISTS_CREATE_WITH_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
Blockly.Msg["LISTS_CREATE_WITH_INPUT_WITH"] = "ƙirƙiri jeri";
Blockly.Msg["LISTS_CREATE_WITH_ITEM_TOOLTIP"] = "Daɗa wani kaya zuwa jerin.";
Blockly.Msg["LISTS_CREATE_WITH_TOOLTIP"] = "Ƙiƙiri jeri tare da kowace lamba na kayayyaki.";
Blockly.Msg["LISTS_GET_INDEX_FIRST"] = "farko";
Blockly.Msg["LISTS_GET_INDEX_FROM_END"] = "# daga ƙarshe";
Blockly.Msg["LISTS_GET_INDEX_FROM_START"] = "#"; // untranslated
Blockly.Msg["LISTS_GET_INDEX_GET"] = "samowa";
Blockly.Msg["LISTS_GET_INDEX_GET_REMOVE"] = "samowa da cirewa";
Blockly.Msg["LISTS_GET_INDEX_LAST"] = "ƙarshe";
Blockly.Msg["LISTS_GET_INDEX_RANDOM"] = "bazuwa";
Blockly.Msg["LISTS_GET_INDEX_REMOVE"] = "cire";
Blockly.Msg["LISTS_GET_INDEX_TAIL"] = ""; // untranslated
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_FIRST"] = "Ya dawo da wani abu na farko a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_FROM"] = "Ya dawo da abin a wani gurbi da aka fayyace a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_LAST"] = "Ya dawo da wani abu na ƙarshe a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_RANDOM"] = "Ya dawo da wani abu a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST"] = "Ya cire kuma ya dawo da abin farko a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM"] = "Ya cire kuma ya dawo da abin a gurbin da aka fayyace a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST"] = "Ya cire kuma ya dawo da abin ƙarshe a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM"] = "Ya cire kuma ya dawo abu mai bazuwa a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST"] = "Ya cire abin farko a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM"] = "Ya cire wani abin a wani gurbi da aka fayyace a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST"] = "Ya cire abin ƙarshe a cikin jeri.";
Blockly.Msg["LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM"] = "Ya cire abu mai bazuwa a cikin jeri.";
Blockly.Msg["LISTS_GET_SUBLIST_END_FROM_END"] = "zuwa # daga ƙarshe";
Blockly.Msg["LISTS_GET_SUBLIST_END_FROM_START"] = "zuwa #";
Blockly.Msg["LISTS_GET_SUBLIST_END_LAST"] = "zuwa ƙarshe";
Blockly.Msg["LISTS_GET_SUBLIST_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_START_FIRST"] = "sami sashin jeri daga farko";
Blockly.Msg["LISTS_GET_SUBLIST_START_FROM_END"] = "sami sashin jeri daga # daga ƙarshe";
Blockly.Msg["LISTS_GET_SUBLIST_START_FROM_START"] = "sami sashin jeri daga #";
Blockly.Msg["LISTS_GET_SUBLIST_TAIL"] = ""; // untranslated
Blockly.Msg["LISTS_GET_SUBLIST_TOOLTIP"] = "Ƙirƙiri kwafi na ɓangaren da aka fayyace daga wani jeri.";
Blockly.Msg["LISTS_INDEX_FROM_END_TOOLTIP"] = "%1 shine wani abu na ƙarshe.";
Blockly.Msg["LISTS_INDEX_FROM_START_TOOLTIP"] = "%1 shine wani abu na farko.";
Blockly.Msg["LISTS_INDEX_OF_FIRST"] = "nemo afkuwar farko daga wani abu";
Blockly.Msg["LISTS_INDEX_OF_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated
Blockly.Msg["LISTS_INDEX_OF_LAST"] = "nemo afkuwar ƙarshe daga wani abu";
Blockly.Msg["LISTS_INDEX_OF_TOOLTIP"] = "Ya dawo da jeri na farkon/ƙarshen afkuwa na wani abu a cikin jerin. Ya dawo da %1 idan ba a sami wani abin ba.";
Blockly.Msg["LISTS_INLIST"] = "a jeri";
Blockly.Msg["LISTS_ISEMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated
Blockly.Msg["LISTS_ISEMPTY_TITLE"] = "%1 babu komai";
Blockly.Msg["LISTS_ISEMPTY_TOOLTIP"] = "Ya dawo gaskiya idan jerin babu komai.";
Blockly.Msg["LISTS_LENGTH_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated
Blockly.Msg["LISTS_LENGTH_TITLE"] = "tsawo na %1";
Blockly.Msg["LISTS_LENGTH_TOOLTIP"] = "Ya dawo da tsawon wani jeri.";
Blockly.Msg["LISTS_REPEAT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
Blockly.Msg["LISTS_REPEAT_TITLE"] = "ƙirƙiri jeri tare da wani abu %1 da aka maimaita sau %2";
Blockly.Msg["LISTS_REPEAT_TOOLTIP"] = "Ya ƙirƙiri jeri da ya ƙunshi wata kima da aka bayar da aka maimaita yawan lambar da aka fayyace.";
Blockly.Msg["LISTS_REVERSE_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
Blockly.Msg["LISTS_REVERSE_MESSAGE0"] = "juya %1";
Blockly.Msg["LISTS_REVERSE_TOOLTIP"] = "Sauya tsarin kwafi daga jeri.";
Blockly.Msg["LISTS_SET_INDEX_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
Blockly.Msg["LISTS_SET_INDEX_INPUT_TO"] = "a matsayin";
Blockly.Msg["LISTS_SET_INDEX_INSERT"] = "cusa a";
Blockly.Msg["LISTS_SET_INDEX_SET"] = "shirya";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST"] = "Ya cusa wani abin a farko na jeri.";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_FROM"] = "Ya cusa wani abin a wani gurbi da aka fayyace a cikin jeri.";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_LAST"] = "Ya maƙala wani abin a ƙarshe na jeri.";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM"] = "Cusa wani abu ta hanyar bazawa a cikin jeri.";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_FIRST"] = "Ya shirya abin farko a cikin jeri.";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_FROM"] = "Ya shirya wani abin a wani gurbi da aka fayyace a cikin jeri.";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_LAST"] = "Ya shirya abin ƙarshe a cikin jeri.";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_RANDOM"] = "Ya shirya abu mai bazuwa a cikin jeri.";
Blockly.Msg["LISTS_SORT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
Blockly.Msg["LISTS_SORT_ORDER_ASCENDING"] = "hawa";
Blockly.Msg["LISTS_SORT_ORDER_DESCENDING"] = "sauka";
Blockly.Msg["LISTS_SORT_TITLE"] = "ware %1 %2 %3";
Blockly.Msg["LISTS_SORT_TOOLTIP"] = "Ware kwafi na jeri.";
Blockly.Msg["LISTS_SORT_TYPE_IGNORECASE"] = "na haruffa, a=A";
Blockly.Msg["LISTS_SORT_TYPE_NUMERIC"] = "na lamba";
Blockly.Msg["LISTS_SORT_TYPE_TEXT"] = "na haruffa";
Blockly.Msg["LISTS_SPLIT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
Blockly.Msg["LISTS_SPLIT_LIST_FROM_TEXT"] = "yi jeri daga rubutu";
Blockly.Msg["LISTS_SPLIT_TEXT_FROM_LIST"] = "yi rubutu daga jeri";
Blockly.Msg["LISTS_SPLIT_TOOLTIP_JOIN"] = "Haɗa jerin rubututtuka zuwa rubutu guda ɗaya, a raba tare da mai raba rubutu.";
Blockly.Msg["LISTS_SPLIT_TOOLTIP_SPLIT"] = "Tsaga rubutu zuwa jerin rubututtuka, a karya a kowane mai raba kalmomi.";
Blockly.Msg["LISTS_SPLIT_WITH_DELIMITER"] = "tare da mai raba kalmomi";
Blockly.Msg["LOGIC_BOOLEAN_FALSE"] = "ƙarya";
Blockly.Msg["LOGIC_BOOLEAN_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
Blockly.Msg["LOGIC_BOOLEAN_TOOLTIP"] = "Ya koma kodai gaskiya ko ƙarya.";
Blockly.Msg["LOGIC_BOOLEAN_TRUE"] = "gaskiya";
Blockly.Msg["LOGIC_COMPARE_HELPURL"] = "https://en.wikipedia.org/wiki/Inequality_(mathematics)";
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_EQ"] = "Koma gaskiya idan duk bayanan sun yi dai dai da juna.";
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_GT"] = "Koma gaskiya idan bayanin farko ya fi bayani na biyu yawa.";
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_GTE"] = "Koma gaskiya idan bayanin farko ya fi ko ya yi dai dai da bayani na biyu.";
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_LT"] = "Koma gaskiya idan bayanin farko ya fi na biyu ƙanƙanta.";
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_LTE"] = "Koma gaskiya idan bayanin farko ya fi ƙanƙanta ko dai dai da bayani na biyu.";
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_NEQ"] = "Koma gaskiya idan duk bayanan ba su yi dai dai da juna ba.";
Blockly.Msg["LOGIC_NEGATE_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated
Blockly.Msg["LOGIC_NEGATE_TITLE"] = "ba %1";
Blockly.Msg["LOGIC_NEGATE_TOOLTIP"] = "Koma gaskiya idan bayanin ƙarya ne. Koma ƙarya idan bayanin gaskiya ne.";
Blockly.Msg["LOGIC_NULL"] = "maras amfani";
Blockly.Msg["LOGIC_NULL_HELPURL"] = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated
Blockly.Msg["LOGIC_NULL_TOOLTIP"] = "Ya koma maras amfani.";
Blockly.Msg["LOGIC_OPERATION_AND"] = "kuma";
Blockly.Msg["LOGIC_OPERATION_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated
Blockly.Msg["LOGIC_OPERATION_OR"] = "ko";
Blockly.Msg["LOGIC_OPERATION_TOOLTIP_AND"] = "Koma gaskiya idan duk bayanan gaskiya ne.";
Blockly.Msg["LOGIC_OPERATION_TOOLTIP_OR"] = "Koma gaskiya idan a ƙalla ɗayan bayanan gaskiya ne.";
Blockly.Msg["LOGIC_TERNARY_CONDITION"] = "gwaji";
Blockly.Msg["LOGIC_TERNARY_HELPURL"] = "https://en.wikipedia.org/wiki/%3F:"; // untranslated
Blockly.Msg["LOGIC_TERNARY_IF_FALSE"] = "idan ƙarya ne";
Blockly.Msg["LOGIC_TERNARY_IF_TRUE"] = "idan gaskiya ne";
Blockly.Msg["LOGIC_TERNARY_TOOLTIP"] = "Duba sharaɗin a cikin 'gwaji'. Idan sharaɗin gaskiya ne, mayar da kimar 'idan gaskiya ne'; idan ba haka ba mayar da kimar 'idan ƙarya ne'.";
Blockly.Msg["MATH_ADDITION_SYMBOL"] = "+"; // untranslated
Blockly.Msg["MATH_ARITHMETIC_HELPURL"] = "https://en.wikipedia.org/wiki/Arithmetic";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_ADD"] = "Dawo da jumlar lambobin guda biyu.";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_DIVIDE"] = "Dawo da sakamakon lambobin guda biyu bayan an raba su da juna.";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MINUS"] = "Dawo da bambancin lambobin guda biyu.";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MULTIPLY"] = "Dawo da ruɓin lambobin guda biyu.";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_POWER"] = "Dawo da lambar farko wadda aka ɗaga ta zuwa ƙarfin lamba ta biyu.";
Blockly.Msg["MATH_ATAN2_HELPURL"] = "https://en.wikipedia.org/wiki/Atan2";
Blockly.Msg["MATH_ATAN2_TITLE"] = "atan2 na X:%1 Y:%2";
Blockly.Msg["MATH_ATAN2_TOOLTIP"] = "Dawo da arctangent na tsinin (X, Y) a gwargwado daga -180 zuwa 180.";
Blockly.Msg["MATH_CHANGE_HELPURL"] = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
Blockly.Msg["MATH_CHANGE_TITLE"] = "canza %1 da %2";
Blockly.Msg["MATH_CHANGE_TOOLTIP"] = "Daɗa wata lamba zuwa siffa '%1'.";
Blockly.Msg["MATH_CONSTANT_HELPURL"] = "https://en.wikipedia.org/wiki/Mathematical_constant";
Blockly.Msg["MATH_CONSTANT_TOOLTIP"] = "Dawo da ɗaya daga cikin sanannen zaunannen lissafi: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), ko ∞ (maras iyaka).";
Blockly.Msg["MATH_CONSTRAIN_HELPURL"] = "https://en.wikipedia.org/wiki/Clamping_(graphics)"; // untranslated
Blockly.Msg["MATH_CONSTRAIN_TITLE"] = "ƙarfi %1 ƙasa %2 sama %3";
Blockly.Msg["MATH_CONSTRAIN_TOOLTIP"] = "Tsare lamba tsakanin lambobi da aka fayyace masu ƙarama da babbar kima (haɗawa).";
Blockly.Msg["MATH_DIVISION_SYMBOL"] = "÷"; // untranslated
Blockly.Msg["MATH_IS_DIVISIBLE_BY"] = "lamba ce da za a iya rabawa da";
Blockly.Msg["MATH_IS_EVEN"] = "lamba da za a iya rabawa da biyu";
Blockly.Msg["MATH_IS_NEGATIVE"] = "lamba ce da bata kai sufuli ba";
Blockly.Msg["MATH_IS_ODD"] = "lamba ce da ba za a iya rabawa da biyu ba";
Blockly.Msg["MATH_IS_POSITIVE"] = "lamba ce da tafi sufuli";
Blockly.Msg["MATH_IS_PRIME"] = "lamba ce da kawai za a iya rabawa da kanta";
Blockly.Msg["MATH_IS_TOOLTIP"] = "Duba idan lamba ce da za a iya rabawa da biyu, lamba wadda ba za a iya rabawa da biyu ba, lamba ce kawai da za a iya rabawa da kanta, lamba ce cikakkiya,lamba ce da tafi sufuli, lamba ce da bata kai sufuli ba, lamba ce da za a iya rabawa da wata lamba. Ta dawo da gaskiya ko ƙarya.";
Blockly.Msg["MATH_IS_WHOLE"] = "lamba ce cikakkiya";
Blockly.Msg["MATH_MODULO_HELPURL"] = "https://en.wikipedia.org/wiki/Modulo_operation";
Blockly.Msg["MATH_MODULO_TITLE"] = "saura daga raba %1 ÷ %2";
Blockly.Msg["MATH_MODULO_TOOLTIP"] = "Dawo da saura daga raba lambobin guda biyu.";
Blockly.Msg["MATH_MULTIPLICATION_SYMBOL"] = "×"; // untranslated
Blockly.Msg["MATH_NUMBER_HELPURL"] = "https://en.wikipedia.org/wiki/Number";
Blockly.Msg["MATH_NUMBER_TOOLTIP"] = "Lambda.";
Blockly.Msg["MATH_ONLIST_HELPURL"] = ""; // untranslated
Blockly.Msg["MATH_ONLIST_OPERATOR_AVERAGE"] = "Tsaka-tsaki na jeri";
Blockly.Msg["MATH_ONLIST_OPERATOR_MAX"] = "cikakke na jeri";
Blockly.Msg["MATH_ONLIST_OPERATOR_MEDIAN"] = "tsakiyar jeri";
Blockly.Msg["MATH_ONLIST_OPERATOR_MIN"] = "Taƙaicewa na jeri";
Blockly.Msg["MATH_ONLIST_OPERATOR_MODE"] = "mai yawan bayyana na jeri";
Blockly.Msg["MATH_ONLIST_OPERATOR_RANDOM"] = "bazuwar kaya na jeri";
Blockly.Msg["MATH_ONLIST_OPERATOR_STD_DEV"] = "matakan bambance-bambance na jeri";
Blockly.Msg["MATH_ONLIST_OPERATOR_SUM"] = "jumlar jeri";
Blockly.Msg["MATH_ONLIST_TOOLTIP_AVERAGE"] = "Dawo da tsaka-tsaki (matsakaicin lissafi) na kimar lambobi dake cikin jerin.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_MAX"] = "Dawo da babbar lamba dake cikin jerin.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_MEDIAN"] = "Dawo da lambar tsakiya ta cikin jeri.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_MIN"] = "Dawo da lambobi ƙanana a cikin jerin.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_MODE"] = "Dawo da jeri na abubuwan da suka fi bayyana a cikin jeri.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_RANDOM"] = "Dawo da bazuwar kaya daga jerin.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_STD_DEV"] = "Dawo da matakan bambance-bambance na jeri.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_SUM"] = "Dawo da jumlar duk lambobi na cikin jerin.";
Blockly.Msg["MATH_POWER_SYMBOL"] = "^"; // untranslated
Blockly.Msg["MATH_RANDOM_FLOAT_HELPURL"] = "https://en.wikipedia.org/wiki/Random_number_generation";
Blockly.Msg["MATH_RANDOM_FLOAT_TITLE_RANDOM"] = "ɓangare mai buzuwa";
Blockly.Msg["MATH_RANDOM_FLOAT_TOOLTIP"] = "Dawo da ɓangare mai bazuwa tsakanin 0.0 (haɗawa) da 1.0 (rabewa).";
Blockly.Msg["MATH_RANDOM_INT_HELPURL"] = "https://en.wikipedia.org/wiki/Random_number_generation";
Blockly.Msg["MATH_RANDOM_INT_TITLE"] = "bazuwar cikakkiyar lamba daga %1 zuwa %2";
Blockly.Msg["MATH_RANDOM_INT_TOOLTIP"] = "Dawo da bazuwar cikakkiyar lamba tsakanin wani gwargwado da aka fayyace, haɗawa.";
Blockly.Msg["MATH_ROUND_HELPURL"] = "https://en.wikipedia.org/wiki/Rounding";
Blockly.Msg["MATH_ROUND_OPERATOR_ROUND"] = "cika";
Blockly.Msg["MATH_ROUND_OPERATOR_ROUNDDOWN"] = "cika ƙasa";
Blockly.Msg["MATH_ROUND_OPERATOR_ROUNDUP"] = "cika sama";
Blockly.Msg["MATH_ROUND_TOOLTIP"] = "Cika lamba sama ko ƙasa.";
Blockly.Msg["MATH_SINGLE_HELPURL"] = "https://en.wikipedia.org/wiki/Square_root";
Blockly.Msg["MATH_SINGLE_OP_ABSOLUTE"] = "cikakkiya";
Blockly.Msg["MATH_SINGLE_OP_ROOT"] = "lamba da ta ruɓanya kanta";
Blockly.Msg["MATH_SINGLE_TOOLTIP_ABS"] = "Dawo da cikakkiyar kima na wata lamba.";
Blockly.Msg["MATH_SINGLE_TOOLTIP_EXP"] = "Dawo da e zuwa ƙarfin wata lamba.";
Blockly.Msg["MATH_SINGLE_TOOLTIP_LN"] = "Dawo da jerin lambobi da aka tara ko aka ɗebe.";
Blockly.Msg["MATH_SINGLE_TOOLTIP_LOG10"] = "Dawo da tushe 10 na jerin lambobi da aka tara ko aka ɗebe na wata lamba.";
Blockly.Msg["MATH_SINGLE_TOOLTIP_NEG"] = "Dawo da kishiya na wata lamba.";
Blockly.Msg["MATH_SINGLE_TOOLTIP_POW10"] = "Dawo da 10 zuwa ƙarfin wata lamba.";
Blockly.Msg["MATH_SINGLE_TOOLTIP_ROOT"] = "Dawo da wata lamba da ta ruɓanya kanta.";
Blockly.Msg["MATH_SUBTRACTION_SYMBOL"] = "-"; // untranslated
Blockly.Msg["MATH_TRIG_ACOS"] = "acos"; // untranslated
Blockly.Msg["MATH_TRIG_ASIN"] = "asin"; // untranslated
Blockly.Msg["MATH_TRIG_ATAN"] = "atan"; // untranslated
Blockly.Msg["MATH_TRIG_COS"] = "cos"; // untranslated
Blockly.Msg["MATH_TRIG_HELPURL"] = "https://en.wikipedia.org/wiki/Trigonometric_functions";
Blockly.Msg["MATH_TRIG_SIN"] = "sin"; // untranslated
Blockly.Msg["MATH_TRIG_TAN"] = "tan"; // untranslated
Blockly.Msg["MATH_TRIG_TOOLTIP_ACOS"] = "Dawo da arccosine na wata lamba.";
Blockly.Msg["MATH_TRIG_TOOLTIP_ASIN"] = "Dawo da arcsine na wata lamba.";
Blockly.Msg["MATH_TRIG_TOOLTIP_ATAN"] = "Dawo da arctangent na wata lamba.";
Blockly.Msg["MATH_TRIG_TOOLTIP_COS"] = "Dawo da cosine na wani gwargwado (banda layin kusurwar waje).";
Blockly.Msg["MATH_TRIG_TOOLTIP_SIN"] = "Dawo da sine na wani gwargwado (banda layin kusurwar waje).";
Blockly.Msg["MATH_TRIG_TOOLTIP_TAN"] = "Dawo da tangent na wani gwargwado (banda layin kusurwar waje).";
Blockly.Msg["NEW_COLOUR_VARIABLE"] = "Ƙirƙiri siffa ta launi...";
Blockly.Msg["NEW_NUMBER_VARIABLE"] = "Ƙirƙiri siffa ta lamba...";
Blockly.Msg["NEW_STRING_VARIABLE"] = "Ƙiriƙiri kalmar siffa...";
Blockly.Msg["NEW_VARIABLE"] = "Ƙirƙiri siffofi...";
Blockly.Msg["NEW_VARIABLE_TITLE"] = "Sunan sabuwar siffa:";
Blockly.Msg["NEW_VARIABLE_TYPE_TITLE"] = "Irin sabuwar siffa:";
Blockly.Msg["ORDINAL_NUMBER_SUFFIX"] = ""; // untranslated
Blockly.Msg["PROCEDURES_ALLOW_STATEMENTS"] = "ƙyale bayanai";
Blockly.Msg["PROCEDURES_BEFORE_PARAMS"] = "tare da:";
Blockly.Msg["PROCEDURES_CALLNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine";
Blockly.Msg["PROCEDURES_CALLNORETURN_TOOLTIP"] = "Gudanar da aiki '%1' wanda mai amfani ya ayyana.";
Blockly.Msg["PROCEDURES_CALLRETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine";
Blockly.Msg["PROCEDURES_CALLRETURN_TOOLTIP"] = "Gudanar da aiki '%1' kuma a yi amfani da sakamakon sa.";
Blockly.Msg["PROCEDURES_CALL_BEFORE_PARAMS"] = "tare da:";
Blockly.Msg["PROCEDURES_CREATE_DO"] = "Ƙirƙiri '%1'";
Blockly.Msg["PROCEDURES_DEFNORETURN_COMMENT"] = "Kwatanta wannan aiki...";
Blockly.Msg["PROCEDURES_DEFNORETURN_DO"] = ""; // untranslated
Blockly.Msg["PROCEDURES_DEFNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine"; // untranslated
Blockly.Msg["PROCEDURES_DEFNORETURN_PROCEDURE"] = "yi";
Blockly.Msg["PROCEDURES_DEFNORETURN_TITLE"] = "da";
Blockly.Msg["PROCEDURES_DEFNORETURN_TOOLTIP"] = "Ya ƙirƙiri wani aiki ba tare da sakamako ba.";
Blockly.Msg["PROCEDURES_DEFRETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine"; // untranslated
Blockly.Msg["PROCEDURES_DEFRETURN_RETURN"] = "mayar";
Blockly.Msg["PROCEDURES_DEFRETURN_TOOLTIP"] = "Ya ƙirƙiri wani aiki ba tare da wani sakamako ba.";
Blockly.Msg["PROCEDURES_DEF_DUPLICATE_WARNING"] = "Gardaɗi: Wannan aikin yana da ruɓi na gazawa.";
Blockly.Msg["PROCEDURES_HIGHLIGHT_DEF"] = "Bayar da haske na bayanin aiki";
Blockly.Msg["PROCEDURES_IFRETURN_HELPURL"] = "http://c2.com/cgi/wiki?GuardClause"; // untranslated
Blockly.Msg["PROCEDURES_IFRETURN_TOOLTIP"] = "Idan wata kima gaskiya ce, to dawo da kima ta biyu.";
Blockly.Msg["PROCEDURES_IFRETURN_WARNING"] = "Gargaɗi: Za a iya amfani da wannan bulo ne kawai a cikin bayani na wani aiki.";
Blockly.Msg["PROCEDURES_MUTATORARG_TITLE"] = "saka suna:";
Blockly.Msg["PROCEDURES_MUTATORARG_TOOLTIP"] = "Daɗa wani bayani ga aikin.";
Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TITLE"] = "bayani";
Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TOOLTIP"] = "Daɗa, cire, ko sake tsarin bayani na wannan aiki.";
Blockly.Msg["REDO"] = "Sake";
Blockly.Msg["REMOVE_COMMENT"] = "Cire Sharhi";
Blockly.Msg["RENAME_VARIABLE"] = "Sake sunan siffa...";
Blockly.Msg["RENAME_VARIABLE_TITLE"] = "Sake sunnan duk siffofi '%1' zuwa:";
Blockly.Msg["TEXT_APPEND_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
Blockly.Msg["TEXT_APPEND_TITLE"] = "zuwa %1 daɗa rubutu %2";
Blockly.Msg["TEXT_APPEND_TOOLTIP"] = "Daɗa wani rubutu zuwa siffa ta '%1'.";
Blockly.Msg["TEXT_CHANGECASE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated
Blockly.Msg["TEXT_CHANGECASE_OPERATOR_LOWERCASE"] = "zuwa ƙananan baƙaƙe";
Blockly.Msg["TEXT_CHANGECASE_OPERATOR_TITLECASE"] = "zuwa Baƙaƙe Dake nuna Suna";
Blockly.Msg["TEXT_CHANGECASE_OPERATOR_UPPERCASE"] = "zuwa MANYAN BAƘAƘE";
Blockly.Msg["TEXT_CHANGECASE_TOOLTIP"] = "Return a copy of the text in a different case.";
Blockly.Msg["TEXT_CHARAT_FIRST"] = "sami harafin farko";
Blockly.Msg["TEXT_CHARAT_FROM_END"] = "sami harafin # daga ƙarshe";
Blockly.Msg["TEXT_CHARAT_FROM_START"] = "sami harafin #";
Blockly.Msg["TEXT_CHARAT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated
Blockly.Msg["TEXT_CHARAT_LAST"] = "sami harafin ƙarshe";
Blockly.Msg["TEXT_CHARAT_RANDOM"] = "sami harafi mai bazuwa";
Blockly.Msg["TEXT_CHARAT_TAIL"] = ""; // untranslated
Blockly.Msg["TEXT_CHARAT_TITLE"] = "ta rubutu %1 %2";
Blockly.Msg["TEXT_CHARAT_TOOLTIP"] = "Ya dawo da harafi a gurbi da aka fayyace.";
Blockly.Msg["TEXT_COUNT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
Blockly.Msg["TEXT_COUNT_MESSAGE0"] = "ƙirga %1 a cikin %2";
Blockly.Msg["TEXT_COUNT_TOOLTIP"] = "Ƙirga sau nawa wani rubutu ya afku a cikin sauran wasu rubutu.";
Blockly.Msg["TEXT_CREATE_JOIN_ITEM_TOOLTIP"] = "Daɗa wani kaya zuwa ga rubutun.";
Blockly.Msg["TEXT_CREATE_JOIN_TITLE_JOIN"] = "haɗa";
Blockly.Msg["TEXT_CREATE_JOIN_TOOLTIP"] = "Daɗa, cire, ko sake tsarin ɓangarori domin sake fasalin wannan bulo na rubutu.";
Blockly.Msg["TEXT_GET_SUBSTRING_END_FROM_END"] = "zuwa harafin # daga ƙarshe";
Blockly.Msg["TEXT_GET_SUBSTRING_END_FROM_START"] = "zuwa harafin #";
Blockly.Msg["TEXT_GET_SUBSTRING_END_LAST"] = "zuwa harafi na ƙarshe";
Blockly.Msg["TEXT_GET_SUBSTRING_HELPURL"] = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_INPUT_IN_TEXT"] = "ta rubutu";
Blockly.Msg["TEXT_GET_SUBSTRING_START_FIRST"] = "sami sashin jumla daga harafin farko";
Blockly.Msg["TEXT_GET_SUBSTRING_START_FROM_END"] = "sami sashin jumla daga harafin # daga ƙarshe";
Blockly.Msg["TEXT_GET_SUBSTRING_START_FROM_START"] = "sami sashin jumla daga harafin #";
Blockly.Msg["TEXT_GET_SUBSTRING_TAIL"] = ""; // untranslated
Blockly.Msg["TEXT_GET_SUBSTRING_TOOLTIP"] = "Ya dawo da ɓangaren rubutu da aka fayyace.";
Blockly.Msg["TEXT_INDEXOF_HELPURL"] = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated
Blockly.Msg["TEXT_INDEXOF_OPERATOR_FIRST"] = "nemo afkuwar farko ta rubutu";
Blockly.Msg["TEXT_INDEXOF_OPERATOR_LAST"] = "nemo afkuwar ƙarshe ta rubutu";
Blockly.Msg["TEXT_INDEXOF_TITLE"] = "ta rubutu %1 %2 %3";
Blockly.Msg["TEXT_INDEXOF_TOOLTIP"] = "nemo a cikin rubutu. Returns %1 if text is not found.";
Blockly.Msg["TEXT_ISEMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated
Blockly.Msg["TEXT_ISEMPTY_TITLE"] = "%1 babu komai";
Blockly.Msg["TEXT_ISEMPTY_TOOLTIP"] = "Ya dawo gaskiya idan rubutun da aka bayar babu komai.";
Blockly.Msg["TEXT_JOIN_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
Blockly.Msg["TEXT_JOIN_TITLE_CREATEWITH"] = "ƙirƙiri rubutu da";
Blockly.Msg["TEXT_JOIN_TOOLTIP"] = "Ƙirƙiri guntun rubutu ta haɗa kowace lamba ta kayayyaki.";
Blockly.Msg["TEXT_LENGTH_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
Blockly.Msg["TEXT_LENGTH_TITLE"] = "tsawon %1";
Blockly.Msg["TEXT_LENGTH_TOOLTIP"] = "Ya dawo lamba ta haruffa (da ya haɗa da sarari) a cikin rubutun da aka bayar.";
Blockly.Msg["TEXT_PRINT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated
Blockly.Msg["TEXT_PRINT_TITLE"] = "buga %1";
Blockly.Msg["TEXT_PRINT_TOOLTIP"] = "Buga rubutun da aka fayyace, lamba ko wata kima.";
Blockly.Msg["TEXT_PROMPT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated
Blockly.Msg["TEXT_PROMPT_TOOLTIP_NUMBER"] = "Samo wani mai amfani domin wata lamba.";
Blockly.Msg["TEXT_PROMPT_TOOLTIP_TEXT"] = "Samo wani mai amfani domin wani rubutu.";
Blockly.Msg["TEXT_PROMPT_TYPE_NUMBER"] = "samo lamba tare da saƙo";
Blockly.Msg["TEXT_PROMPT_TYPE_TEXT"] = "samo rubutu tare da saƙo";
Blockly.Msg["TEXT_REPLACE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
Blockly.Msg["TEXT_REPLACE_MESSAGE0"] = "maye gurbin %1 da %2 a cikin %3";
Blockly.Msg["TEXT_REPLACE_TOOLTIP"] = "Maye gurbin duk afkuwa na wani rubutu a cikin wasu rubutu.";
Blockly.Msg["TEXT_REVERSE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
Blockly.Msg["TEXT_REVERSE_MESSAGE0"] = "juya %1";
Blockly.Msg["TEXT_REVERSE_TOOLTIP"] = "Ya juya tsari na haruffa a cikin rubutu.";
Blockly.Msg["TEXT_TEXT_HELPURL"] = "https://en.wikipedia.org/wiki/String_(computer_science)";
Blockly.Msg["TEXT_TEXT_TOOLTIP"] = "Harafi, kalma, ko layi na rubutu.";
Blockly.Msg["TEXT_TRIM_HELPURL"] = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
Blockly.Msg["TEXT_TRIM_OPERATOR_BOTH"] = "datse sarari daga ɓangarori guda biyu na";
Blockly.Msg["TEXT_TRIM_OPERATOR_LEFT"] = "datse sarari daga ɓangaren hagu na";
Blockly.Msg["TEXT_TRIM_OPERATOR_RIGHT"] = "datse sarari daga ɓangaren dama na";
Blockly.Msg["TEXT_TRIM_TOOLTIP"] = "Dawo da kwafin rubutu tare da sauran sarari da aka cire daga ƙarshe ɗaya ko biyu.";
Blockly.Msg["TODAY"] = "Yau";
Blockly.Msg["UNDO"] = "Fasa";
Blockly.Msg["VARIABLES_DEFAULT_NAME"] = "waniabu";
Blockly.Msg["VARIABLES_GET_CREATE_SET"] = "Ƙirƙiri 'set %1'";
Blockly.Msg["VARIABLES_GET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
Blockly.Msg["VARIABLES_GET_TOOLTIP"] = "Ya dawo da kima na wannan siffa.";
Blockly.Msg["VARIABLES_SET"] = "saita %1 zuwa %2";
Blockly.Msg["VARIABLES_SET_CREATE_GET"] = "Ƙirƙiri 'get %1'";
Blockly.Msg["VARIABLES_SET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
Blockly.Msg["VARIABLES_SET_TOOLTIP"] = "Ya saita wannan siffa ta zama dai dai da bayanin.";
Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "Tuni akwai sunnan siffa da aka kira '%1'.";
Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "Tuni akwai sunan siffa da aka kira '%1' domin wata iri ta: '%2'.";
Blockly.Msg["WORKSPACE_COMMENT_DEFAULT_TEXT"] = "Faɗi wani abu...";
Blockly.Msg["CONTROLS_FOREACH_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_FOR_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_IF_ELSEIF_TITLE_ELSEIF"] = Blockly.Msg["CONTROLS_IF_MSG_ELSEIF"];
Blockly.Msg["CONTROLS_IF_ELSE_TITLE_ELSE"] = Blockly.Msg["CONTROLS_IF_MSG_ELSE"];
Blockly.Msg["CONTROLS_IF_IF_TITLE_IF"] = Blockly.Msg["CONTROLS_IF_MSG_IF"];
Blockly.Msg["CONTROLS_IF_MSG_THEN"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_WHILEUNTIL_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["LISTS_CREATE_WITH_ITEM_TITLE"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"];
Blockly.Msg["LISTS_GET_INDEX_HELPURL"] = Blockly.Msg["LISTS_INDEX_OF_HELPURL"];
Blockly.Msg["LISTS_GET_INDEX_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"];
Blockly.Msg["LISTS_GET_SUBLIST_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"];
Blockly.Msg["LISTS_INDEX_OF_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"];
Blockly.Msg["LISTS_SET_INDEX_INPUT_IN_LIST"] = Blockly.Msg["LISTS_INLIST"];
Blockly.Msg["MATH_CHANGE_TITLE_ITEM"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"];
Blockly.Msg["PROCEDURES_DEFRETURN_COMMENT"] = Blockly.Msg["PROCEDURES_DEFNORETURN_COMMENT"];
Blockly.Msg["PROCEDURES_DEFRETURN_DO"] = Blockly.Msg["PROCEDURES_DEFNORETURN_DO"];
Blockly.Msg["PROCEDURES_DEFRETURN_PROCEDURE"] = Blockly.Msg["PROCEDURES_DEFNORETURN_PROCEDURE"];
Blockly.Msg["PROCEDURES_DEFRETURN_TITLE"] = Blockly.Msg["PROCEDURES_DEFNORETURN_TITLE"];
Blockly.Msg["TEXT_APPEND_VARIABLE"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"];
Blockly.Msg["TEXT_CREATE_JOIN_ITEM_TITLE_ITEM"] = Blockly.Msg["VARIABLES_DEFAULT_NAME"];
Blockly.Msg["MATH_HUE"] = "230";
Blockly.Msg["LOOPS_HUE"] = "120";
Blockly.Msg["LISTS_HUE"] = "260";
Blockly.Msg["LOGIC_HUE"] = "210";
Blockly.Msg["VARIABLES_HUE"] = "330";
Blockly.Msg["TEXTS_HUE"] = "160";
Blockly.Msg["PROCEDURES_HUE"] = "290";
Blockly.Msg["COLOUR_HUE"] = "20";
Blockly.Msg["VARIABLES_DYNAMIC_HUE"] = "310";
+15 -15
View File
@@ -45,7 +45,7 @@ Blockly.Msg["CONTROLS_IF_ELSEIF_TOOLTIP"] = "Ավելացնում է պայմա
Blockly.Msg["CONTROLS_IF_ELSE_TOOLTIP"] = "Ավելացնել վերջնական ենթաբլոկ (այն կաշխատի, եթե բոլոր պայմանները կեղծ են)";
Blockly.Msg["CONTROLS_IF_HELPURL"] = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
Blockly.Msg["CONTROLS_IF_IF_TOOLTIP"] = "Ավելացնել, հեռացնել կամ փոխել հերթականությունը այս \"եթե\" բլոկը վերակարգավորելու համար։";
Blockly.Msg["CONTROLS_IF_MSG_ELSE"] = "նաև";
Blockly.Msg["CONTROLS_IF_MSG_ELSE"] = "հակառակ դեպքում";
Blockly.Msg["CONTROLS_IF_MSG_ELSEIF"] = "հակառակ դեպքում, եթե";
Blockly.Msg["CONTROLS_IF_MSG_IF"] = "եթե";
Blockly.Msg["CONTROLS_IF_TOOLTIP_1"] = "Եթե պայմանը ճշմարիտ է, կատարում է որոշ հրահանգներ:";
@@ -138,7 +138,7 @@ Blockly.Msg["LISTS_ISEMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/L
Blockly.Msg["LISTS_ISEMPTY_TITLE"] = "%1 դատարկ է";
Blockly.Msg["LISTS_ISEMPTY_TOOLTIP"] = "Վերադարձնում է \"ճշմարիտ\" եթե ցանկը դատարկ է։";
Blockly.Msg["LISTS_LENGTH_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated
Blockly.Msg["LISTS_LENGTH_TITLE"] = "երկարությունը %1";
Blockly.Msg["LISTS_LENGTH_TITLE"] = "%1֊ի երկարությունը";
Blockly.Msg["LISTS_LENGTH_TOOLTIP"] = "Վերադարձնում է ցանկի երկարությունը:";
Blockly.Msg["LISTS_REPEAT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
Blockly.Msg["LISTS_REPEAT_TITLE"] = "ստեղծել ցանկ, %1 արժեքը կրկնելով %2 անգամ";
@@ -159,16 +159,16 @@ Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_FROM"] = "Տեղադրում է անդ
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_LAST"] = "Սահմանում է ցանկի վերջին տարրը:";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_RANDOM"] = "Սահմանում է ցանկից պատահական տարր:";
Blockly.Msg["LISTS_SORT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
Blockly.Msg["LISTS_SORT_ORDER_ASCENDING"] = "աճման";
Blockly.Msg["LISTS_SORT_ORDER_DESCENDING"] = "նվազման";
Blockly.Msg["LISTS_SORT_ORDER_ASCENDING"] = "աճման կարգ";
Blockly.Msg["LISTS_SORT_ORDER_DESCENDING"] = "նվազման կարգ";
Blockly.Msg["LISTS_SORT_TITLE"] = "դասավորել %1 %2 %3";
Blockly.Msg["LISTS_SORT_TOOLTIP"] = "Դասավորում է ցանկի պատճենը";
Blockly.Msg["LISTS_SORT_TYPE_IGNORECASE"] = "այբենական, անտեսել ռեգիստրը";
Blockly.Msg["LISTS_SORT_TYPE_NUMERIC"] = "թվային";
Blockly.Msg["LISTS_SORT_TYPE_TEXT"] = "այբբենական";
Blockly.Msg["LISTS_SORT_TYPE_NUMERIC"] = "թվային կարգ";
Blockly.Msg["LISTS_SORT_TYPE_TEXT"] = "այբբենական կարգ";
Blockly.Msg["LISTS_SPLIT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
Blockly.Msg["LISTS_SPLIT_LIST_FROM_TEXT"] = "պատրաստել ցանկ տեքստից";
Blockly.Msg["LISTS_SPLIT_TEXT_FROM_LIST"] = "պատրաստել տեքստ ցանկից";
Blockly.Msg["LISTS_SPLIT_LIST_FROM_TEXT"] = "ստեղծել ցանկ տեքստից";
Blockly.Msg["LISTS_SPLIT_TEXT_FROM_LIST"] = "ստեղծել տեքստ ցանկից";
Blockly.Msg["LISTS_SPLIT_TOOLTIP_JOIN"] = "Ցանկից ստեղծվում է միացյալ տեքստ, ցանկի անդամները միացվում են բաժանարարներով։";
Blockly.Msg["LISTS_SPLIT_TOOLTIP_SPLIT"] = "Տեքստը վեր է ածվում ցանկի, նշված բաժանարարով։";
Blockly.Msg["LISTS_SPLIT_WITH_DELIMITER"] = "բաժանարարով";
@@ -176,7 +176,7 @@ Blockly.Msg["LOGIC_BOOLEAN_FALSE"] = "կեղծ";
Blockly.Msg["LOGIC_BOOLEAN_HELPURL"] = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
Blockly.Msg["LOGIC_BOOLEAN_TOOLTIP"] = "Վերադարձնում է ճշմարիտ կամ կեղծ արժեք:";
Blockly.Msg["LOGIC_BOOLEAN_TRUE"] = "ճշմարիտ";
Blockly.Msg["LOGIC_COMPARE_HELPURL"] = "https://en.wikipedia.org/wiki/Անհավասարություն_(մաթեմատիկա)";
Blockly.Msg["LOGIC_COMPARE_HELPURL"] = "https://hy.wikipedia.org/wiki/Անհավասարություն";
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_EQ"] = "Վերադարձնում է ճշմարիտ արժեք, եթե երկու մուտքերն էլ հավասար են միմյանց:";
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_GT"] = "Վերադարձնում է ճշմարիտ արժեք, եթե առաջին մուտքը մեծ է երկրորդից:";
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_GTE"] = "Վերադարձնում է ճշմարիտ արժեք, եթե առաջին մուտքը մեծ կամ հավասար է երկրորդին:";
@@ -200,7 +200,7 @@ Blockly.Msg["LOGIC_TERNARY_IF_FALSE"] = "եթե կեղծ է";
Blockly.Msg["LOGIC_TERNARY_IF_TRUE"] = "եթե ճշմարիտ է";
Blockly.Msg["LOGIC_TERNARY_TOOLTIP"] = "Ստուգում է ընտրության պայմանը։ Եթե այն ճշմարիտ է, վերադարձնում է առաջին արժեքը, հակառակ դեպքում ՝ երկրորդը։";
Blockly.Msg["MATH_ADDITION_SYMBOL"] = "+"; // untranslated
Blockly.Msg["MATH_ARITHMETIC_HELPURL"] = "https://hy.wikipedia.org/wiki/%D4%B9%D5%BE%D5%A1%D5%A2%D5%A1%D5%B6%D5%B8%D6%82%D5%A9%D5%B5%D5%B8%D6%82%D5%B6";
Blockly.Msg["MATH_ARITHMETIC_HELPURL"] = "https://hy.wikipedia.org/wiki/Թվաբանություն";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_ADD"] = "Վերադարձնում է երկու թվերի գումարը:";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_DIVIDE"] = "Վերադարձնում է քանորդը";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MINUS"] = "Վերադարձնում է երկու թվերի տարբերությունը:";
@@ -212,8 +212,8 @@ Blockly.Msg["MATH_ATAN2_TOOLTIP"] = "Վերադարձնում է (X, Y) կետի
Blockly.Msg["MATH_CHANGE_HELPURL"] = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated
Blockly.Msg["MATH_CHANGE_TITLE"] = "փոխել %1-ի արժեքը %2֊ով";
Blockly.Msg["MATH_CHANGE_TOOLTIP"] = "Ավելացնում է թիվ %1 փոփոխականին:";
Blockly.Msg["MATH_CONSTANT_HELPURL"] = "https://en.wikipedia.org/wiki/Մաթեմատիկական_հաստատուն";
Blockly.Msg["MATH_CONSTANT_TOOLTIP"] = "Վերադարձնում է ընդհանուր հաստատուններից մեկը. π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), կամ ∞ (անվերջություն):";
Blockly.Msg["MATH_CONSTANT_HELPURL"] = "https://hy.wikipedia.org/wiki/Մաթեմատիկական_հաստատուն";
Blockly.Msg["MATH_CONSTANT_TOOLTIP"] = "Վերադարձնում է տարածված հաստատուններից մեկը՝ π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), կամ ∞ (անվերջություն):";
Blockly.Msg["MATH_CONSTRAIN_HELPURL"] = "https://en.wikipedia.org/wiki/Clamping_(graphics)"; // untranslated
Blockly.Msg["MATH_CONSTRAIN_TITLE"] = "սահմանափակել %1֊ը %2֊ի և %3֊ի միջև";
Blockly.Msg["MATH_CONSTRAIN_TOOLTIP"] = "Սահմանափակել թիվը երկու արժեքներով (ներառյալ)";
@@ -230,7 +230,7 @@ Blockly.Msg["MATH_MODULO_HELPURL"] = "https://en.wikipedia.org/wiki/Modulo_opera
Blockly.Msg["MATH_MODULO_TITLE"] = "%1֊ի և %2֊ի բաժանման մնացորդը";
Blockly.Msg["MATH_MODULO_TOOLTIP"] = "Վերադարձնում է երկու թվերի բաժանման մնացորդը:";
Blockly.Msg["MATH_MULTIPLICATION_SYMBOL"] = "×"; // untranslated
Blockly.Msg["MATH_NUMBER_HELPURL"] = "https://hy.wikipedia.org/wiki/%D4%B9%D5%AB%D5%BE";
Blockly.Msg["MATH_NUMBER_HELPURL"] = "https://hy.wikipedia.org/wiki/Թիվ";
Blockly.Msg["MATH_NUMBER_TOOLTIP"] = "Թիվ";
Blockly.Msg["MATH_ONLIST_HELPURL"] = ""; // untranslated
Blockly.Msg["MATH_ONLIST_OPERATOR_AVERAGE"] = "ցանկի միջինը";
@@ -261,7 +261,7 @@ Blockly.Msg["MATH_ROUND_OPERATOR_ROUND"] = "կլորացնել";
Blockly.Msg["MATH_ROUND_OPERATOR_ROUNDDOWN"] = "կլորացնել ցած";
Blockly.Msg["MATH_ROUND_OPERATOR_ROUNDUP"] = "կլորացնել վեր";
Blockly.Msg["MATH_ROUND_TOOLTIP"] = "Կլորացնում է թիվը վերև կամ ներքև:";
Blockly.Msg["MATH_SINGLE_HELPURL"] = "https://en.wikipedia.org/wiki/Քառակուսի_արմատ";
Blockly.Msg["MATH_SINGLE_HELPURL"] = "https://en.wikipedia.org/wiki/Square_root";
Blockly.Msg["MATH_SINGLE_OP_ABSOLUTE"] = "բացարձակ";
Blockly.Msg["MATH_SINGLE_OP_ROOT"] = "Քառակուսի արմատ";
Blockly.Msg["MATH_SINGLE_TOOLTIP_ABS"] = "Վերադարձնում է թվի բացարձակ արժեքը:";
@@ -276,7 +276,7 @@ Blockly.Msg["MATH_TRIG_ACOS"] = "acos"; // untranslated
Blockly.Msg["MATH_TRIG_ASIN"] = "asin"; // untranslated
Blockly.Msg["MATH_TRIG_ATAN"] = "atan"; // untranslated
Blockly.Msg["MATH_TRIG_COS"] = "cos"; // untranslated
Blockly.Msg["MATH_TRIG_HELPURL"] = "https://en.wikipedia.org/wiki/Եռանկյունաչափական_ֆունկցիաներ";
Blockly.Msg["MATH_TRIG_HELPURL"] = "https://hy.wikipedia.org/wiki/Եռանկյունաչափական_ֆունկցիաներ";
Blockly.Msg["MATH_TRIG_SIN"] = "sin"; // untranslated
Blockly.Msg["MATH_TRIG_TAN"] = "tan"; // untranslated
Blockly.Msg["MATH_TRIG_TOOLTIP_ACOS"] = "Վերադարձնում է թվի արկկոսինուսը:";
+2 -2
View File
@@ -68,7 +68,7 @@ Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "Delete %1 uses of the '%2' variab
Blockly.Msg["DELETE_X_BLOCKS"] = "Eyða %1 kubbum";
Blockly.Msg["DISABLE_BLOCK"] = "Óvirkja kubb";
Blockly.Msg["DUPLICATE_BLOCK"] = "Afrita";
Blockly.Msg["DUPLICATE_COMMENT"] = "Duplicate Comment"; // untranslated
Blockly.Msg["DUPLICATE_COMMENT"] = "Tvítaka athugasemd";
Blockly.Msg["ENABLE_BLOCK"] = "Virkja kubb";
Blockly.Msg["EXPAND_ALL"] = "Opna kubba";
Blockly.Msg["EXPAND_BLOCK"] = "Opna kubb";
@@ -402,7 +402,7 @@ Blockly.Msg["VARIABLES_SET_HELPURL"] = "https://github.com/google/blockly/wiki/V
Blockly.Msg["VARIABLES_SET_TOOLTIP"] = "Stillir þessa breytu á innihald inntaksins.";
Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "Breyta með heitinu '%1' er þegar til staðar.";
Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "A variable named '%1' already exists for another type: '%2'."; // untranslated
Blockly.Msg["WORKSPACE_COMMENT_DEFAULT_TEXT"] = "Say something..."; // untranslated
Blockly.Msg["WORKSPACE_COMMENT_DEFAULT_TEXT"] = "Segðu eitthvað...";
Blockly.Msg["CONTROLS_FOREACH_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_FOR_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_IF_ELSEIF_TITLE_ELSEIF"] = Blockly.Msg["CONTROLS_IF_MSG_ELSEIF"];
+2 -2
View File
@@ -207,8 +207,8 @@ Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MINUS"] = "Geeft het verschil van de twee g
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MULTIPLY"] = "Geeft het product terug van de twee getallen.";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_POWER"] = "Geeft het eerste getal tot de macht van het tweede getal.";
Blockly.Msg["MATH_ATAN2_HELPURL"] = "https://en.wikipedia.org/wiki/Atan2"; // untranslated
Blockly.Msg["MATH_ATAN2_TITLE"] = "atan2 of X:%1 Y:%2"; // untranslated
Blockly.Msg["MATH_ATAN2_TOOLTIP"] = "Return the arctangent of point (X, Y) in degrees from -180 to 180."; // untranslated
Blockly.Msg["MATH_ATAN2_TITLE"] = "atan2 van X:%1 Y:%2";
Blockly.Msg["MATH_ATAN2_TOOLTIP"] = "Geef de boogtangens van punt (X, Y) terug in graden tussen -180 naar 180.";
Blockly.Msg["MATH_CHANGE_HELPURL"] = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
Blockly.Msg["MATH_CHANGE_TITLE"] = "%1 wijzigen met %2";
Blockly.Msg["MATH_CHANGE_TOOLTIP"] = "Voegt een getal toe aan variabele \"%1\".";
+53 -53
View File
@@ -7,9 +7,9 @@ goog.provide('Blockly.Msg.ro');
goog.require('Blockly.Msg');
Blockly.Msg["ADD_COMMENT"] = "Adaugă un comentariu";
Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "Nu se poate șterge variabila '%1' deoarece face parte din definiția funcției '%2'";
Blockly.Msg["CHANGE_VALUE_TITLE"] = "Schimbaţi valoarea:";
Blockly.Msg["CLEAN_UP"] = "Clean up Blocks"; // untranslated
Blockly.Msg["CLEAN_UP"] = "Curăță blocări";
Blockly.Msg["COLLAPSE_ALL"] = "Restrange blocurile";
Blockly.Msg["COLLAPSE_BLOCK"] = "Restrange blocul";
Blockly.Msg["COLOUR_BLEND_COLOUR1"] = "culoare 1";
@@ -63,31 +63,31 @@ Blockly.Msg["CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL"] = "În timp ce o valoare este a
Blockly.Msg["CONTROLS_WHILEUNTIL_TOOLTIP_WHILE"] = "În timp ce o valoare este adevărat, atunci face unele declaraţii.";
Blockly.Msg["DELETE_ALL_BLOCKS"] = "Ștergi toate cele %1 (de) blocuri?";
Blockly.Msg["DELETE_BLOCK"] = "Șterge Bloc";
Blockly.Msg["DELETE_VARIABLE"] = "Delete the '%1' variable"; // untranslated
Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "Delete %1 uses of the '%2' variable?"; // untranslated
Blockly.Msg["DELETE_VARIABLE"] = "Ștergeți variabila '%1'";
Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "Șterge %1 utilizările variabilei '%2'?";
Blockly.Msg["DELETE_X_BLOCKS"] = "Ștergeți %1 Blocuri";
Blockly.Msg["DISABLE_BLOCK"] = "Dezactivaţi bloc";
Blockly.Msg["DUPLICATE_BLOCK"] = "Duplicati";
Blockly.Msg["DUPLICATE_COMMENT"] = "Duplicate Comment"; // untranslated
Blockly.Msg["DUPLICATE_BLOCK"] = "Duplicate";
Blockly.Msg["DUPLICATE_COMMENT"] = "Coment duplicat";
Blockly.Msg["ENABLE_BLOCK"] = "Permite bloc";
Blockly.Msg["EXPAND_ALL"] = "Extinde blocuri";
Blockly.Msg["EXPAND_BLOCK"] = "Extinde bloc";
Blockly.Msg["EXTERNAL_INPUTS"] = "Intrări externe";
Blockly.Msg["HELP"] = "Ajutor";
Blockly.Msg["INLINE_INPUTS"] = "Intrări în linie";
Blockly.Msg["IOS_CANCEL"] = "Cancel"; // untranslated
Blockly.Msg["IOS_ERROR"] = "Error"; // untranslated
Blockly.Msg["IOS_OK"] = "OK"; // untranslated
Blockly.Msg["IOS_PROCEDURES_ADD_INPUT"] = "+ Add Input"; // untranslated
Blockly.Msg["IOS_PROCEDURES_ALLOW_STATEMENTS"] = "Allow statements"; // untranslated
Blockly.Msg["IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR"] = "This function has duplicate inputs."; // untranslated
Blockly.Msg["IOS_PROCEDURES_INPUTS"] = "INPUTS"; // untranslated
Blockly.Msg["IOS_VARIABLES_ADD_BUTTON"] = "Add"; // untranslated
Blockly.Msg["IOS_VARIABLES_ADD_VARIABLE"] = "+ Add Variable"; // untranslated
Blockly.Msg["IOS_VARIABLES_DELETE_BUTTON"] = "Delete"; // untranslated
Blockly.Msg["IOS_VARIABLES_EMPTY_NAME_ERROR"] = "You can't use an empty variable name."; // untranslated
Blockly.Msg["IOS_VARIABLES_RENAME_BUTTON"] = "Rename"; // untranslated
Blockly.Msg["IOS_VARIABLES_VARIABLE_NAME"] = "Variable name"; // untranslated
Blockly.Msg["IOS_CANCEL"] = "Anulare";
Blockly.Msg["IOS_ERROR"] = "Eroare";
Blockly.Msg["IOS_OK"] = "OK";
Blockly.Msg["IOS_PROCEDURES_ADD_INPUT"] = "+ Adăugați intrare";
Blockly.Msg["IOS_PROCEDURES_ALLOW_STATEMENTS"] = "Permite declarațiile";
Blockly.Msg["IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR"] = "Această funcție are intrări duplicate.";
Blockly.Msg["IOS_PROCEDURES_INPUTS"] = "INTRĂRI";
Blockly.Msg["IOS_VARIABLES_ADD_BUTTON"] = "Adaugă";
Blockly.Msg["IOS_VARIABLES_ADD_VARIABLE"] = "+Adăugați variabilă";
Blockly.Msg["IOS_VARIABLES_DELETE_BUTTON"] = "Ştergeți";
Blockly.Msg["IOS_VARIABLES_EMPTY_NAME_ERROR"] = "Nu puteți utiliza un nume de variabilă gol.";
Blockly.Msg["IOS_VARIABLES_RENAME_BUTTON"] = "Redenumire";
Blockly.Msg["IOS_VARIABLES_VARIABLE_NAME"] = "Numele variabilei";
Blockly.Msg["LISTS_CREATE_EMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#create-empty-list";
Blockly.Msg["LISTS_CREATE_EMPTY_TITLE"] = "creează listă goală";
Blockly.Msg["LISTS_CREATE_EMPTY_TOOLTIP"] = "Returnează o listă, de lungime 0, care nu conţine înregistrări de date";
@@ -132,7 +132,7 @@ Blockly.Msg["LISTS_INDEX_FROM_START_TOOLTIP"] = "%1 este primul element.";
Blockly.Msg["LISTS_INDEX_OF_FIRST"] = "Găseşte prima apariţie a elementului";
Blockly.Msg["LISTS_INDEX_OF_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated
Blockly.Msg["LISTS_INDEX_OF_LAST"] = "găseşte ultima apariţie a elementului";
Blockly.Msg["LISTS_INDEX_OF_TOOLTIP"] = "Revine la indexul de la prima/ultima apariție a elementului din listă. Returnează %1 dacă elementul nu este găsit.";
Blockly.Msg["LISTS_INDEX_OF_TOOLTIP"] = "Returnează indexul primei/ultimei apariții a articolului din listă. Returnează %1 dacă elementul nu este găsit.";
Blockly.Msg["LISTS_INLIST"] = "în listă";
Blockly.Msg["LISTS_ISEMPTY_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated
Blockly.Msg["LISTS_ISEMPTY_TITLE"] = "%1 este gol";
@@ -144,8 +144,8 @@ Blockly.Msg["LISTS_REPEAT_HELPURL"] = "https://github.com/google/blockly/wiki/Li
Blockly.Msg["LISTS_REPEAT_TITLE"] = "creaza lista cu %1 elemente repetate de %2 ori";
Blockly.Msg["LISTS_REPEAT_TOOLTIP"] = "Creează o listă alcătuită dintr-o anumită valoare repetată de numărul specificat de ori.";
Blockly.Msg["LISTS_REVERSE_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
Blockly.Msg["LISTS_REVERSE_MESSAGE0"] = "reverse %1"; // untranslated
Blockly.Msg["LISTS_REVERSE_TOOLTIP"] = "Reverse a copy of a list."; // untranslated
Blockly.Msg["LISTS_REVERSE_MESSAGE0"] = "inversă %1";
Blockly.Msg["LISTS_REVERSE_TOOLTIP"] = "Inversați copia unei liste.";
Blockly.Msg["LISTS_SET_INDEX_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
Blockly.Msg["LISTS_SET_INDEX_INPUT_TO"] = "ca";
Blockly.Msg["LISTS_SET_INDEX_INSERT"] = "introduceţi la";
@@ -158,14 +158,14 @@ Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_FIRST"] = "Setează primul element înt
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_FROM"] = "Setează elementul la poziţia specificată într-o listă.";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_LAST"] = "Setează ultimul element într-o listă.";
Blockly.Msg["LISTS_SET_INDEX_TOOLTIP_SET_RANDOM"] = "Setează un element aleator într-o listă.";
Blockly.Msg["LISTS_SORT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
Blockly.Msg["LISTS_SORT_ORDER_ASCENDING"] = "ascending"; // untranslated
Blockly.Msg["LISTS_SORT_ORDER_DESCENDING"] = "descending"; // untranslated
Blockly.Msg["LISTS_SORT_TITLE"] = "sort %1 %2 %3"; // untranslated
Blockly.Msg["LISTS_SORT_TOOLTIP"] = "Sort a copy of a list."; // untranslated
Blockly.Msg["LISTS_SORT_TYPE_IGNORECASE"] = "alphabetic, ignore case"; // untranslated
Blockly.Msg["LISTS_SORT_TYPE_NUMERIC"] = "numeric"; // untranslated
Blockly.Msg["LISTS_SORT_TYPE_TEXT"] = "alphabetic"; // untranslated
Blockly.Msg["LISTS_SORT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
Blockly.Msg["LISTS_SORT_ORDER_ASCENDING"] = "crescător";
Blockly.Msg["LISTS_SORT_ORDER_DESCENDING"] = "descrescător";
Blockly.Msg["LISTS_SORT_TITLE"] = "sortați %1 %2 %3";
Blockly.Msg["LISTS_SORT_TOOLTIP"] = "Sortați o copie a unei liste.";
Blockly.Msg["LISTS_SORT_TYPE_IGNORECASE"] = "alfabetic, ignorați cazul";
Blockly.Msg["LISTS_SORT_TYPE_NUMERIC"] = "numeric";
Blockly.Msg["LISTS_SORT_TYPE_TEXT"] = "alfabetic";
Blockly.Msg["LISTS_SPLIT_HELPURL"] = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
Blockly.Msg["LISTS_SPLIT_LIST_FROM_TEXT"] = "convertește textul în listă";
Blockly.Msg["LISTS_SPLIT_TEXT_FROM_LIST"] = "convertește lista în text";
@@ -206,9 +206,9 @@ Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_DIVIDE"] = "Returnează câtul celor două
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MINUS"] = "Returneaza diferenţa dintre cele două numere.";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_MULTIPLY"] = "Returnează produsul celor două numere.";
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_POWER"] = "Returneaza numărul rezultat prin ridicarea primului număr la puterea celui de-al doilea.";
Blockly.Msg["MATH_ATAN2_HELPURL"] = "https://en.wikipedia.org/wiki/Atan2"; // untranslated
Blockly.Msg["MATH_ATAN2_TITLE"] = "atan2 of X:%1 Y:%2"; // untranslated
Blockly.Msg["MATH_ATAN2_TOOLTIP"] = "Return the arctangent of point (X, Y) in degrees from -180 to 180."; // untranslated
Blockly.Msg["MATH_ATAN2_HELPURL"] = "https://en.wikipedia.org/wiki/Atan2";
Blockly.Msg["MATH_ATAN2_TITLE"] = "atan2 of X:%1 Y:%2";
Blockly.Msg["MATH_ATAN2_TOOLTIP"] = "Întoarceți arctangentul punctului (X, Y) în grade de la -180 la 180.";
Blockly.Msg["MATH_CHANGE_HELPURL"] = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
Blockly.Msg["MATH_CHANGE_TITLE"] = "schimbă %1 de %2";
Blockly.Msg["MATH_CHANGE_TOOLTIP"] = "Adaugă un număr variabilei '%1'.";
@@ -285,22 +285,22 @@ Blockly.Msg["MATH_TRIG_TOOLTIP_ATAN"] = "Returnează arctangenta unui număr.";
Blockly.Msg["MATH_TRIG_TOOLTIP_COS"] = "Întoarce cosinusul unui grad (nu radianul).";
Blockly.Msg["MATH_TRIG_TOOLTIP_SIN"] = "Întoarce cosinusul unui grad (nu radianul).";
Blockly.Msg["MATH_TRIG_TOOLTIP_TAN"] = "Întoarce tangenta unui grad (nu radianul).";
Blockly.Msg["NEW_COLOUR_VARIABLE"] = "Create colour variable..."; // untranslated
Blockly.Msg["NEW_NUMBER_VARIABLE"] = "Create number variable..."; // untranslated
Blockly.Msg["NEW_STRING_VARIABLE"] = "Create string variable..."; // untranslated
Blockly.Msg["NEW_VARIABLE"] = "Variabilă nouă...";
Blockly.Msg["NEW_COLOUR_VARIABLE"] = "Crează o variabilă culoare";
Blockly.Msg["NEW_NUMBER_VARIABLE"] = "Crează o variabilă număr";
Blockly.Msg["NEW_STRING_VARIABLE"] = "Crează o variabilă string";
Blockly.Msg["NEW_VARIABLE"] = "Crează variabilă";
Blockly.Msg["NEW_VARIABLE_TITLE"] = "Noul nume de variabilă:";
Blockly.Msg["NEW_VARIABLE_TYPE_TITLE"] = "New variable type:"; // untranslated
Blockly.Msg["NEW_VARIABLE_TYPE_TITLE"] = "Tip nou de variabilă";
Blockly.Msg["ORDINAL_NUMBER_SUFFIX"] = ""; // untranslated
Blockly.Msg["PROCEDURES_ALLOW_STATEMENTS"] = "permite declarațiile";
Blockly.Msg["PROCEDURES_BEFORE_PARAMS"] = "cu:";
Blockly.Msg["PROCEDURES_CALLNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
Blockly.Msg["PROCEDURES_CALLNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine";
Blockly.Msg["PROCEDURES_CALLNORETURN_TOOLTIP"] = "Executați funcția '%1 'definită de utilizator.";
Blockly.Msg["PROCEDURES_CALLRETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
Blockly.Msg["PROCEDURES_CALLRETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Subroutine";
Blockly.Msg["PROCEDURES_CALLRETURN_TOOLTIP"] = "Executați funcția '%1 'definită de utilizator şi folosiţi producţia sa.";
Blockly.Msg["PROCEDURES_CALL_BEFORE_PARAMS"] = "cu:";
Blockly.Msg["PROCEDURES_CREATE_DO"] = "Creaţi '%1'";
Blockly.Msg["PROCEDURES_DEFNORETURN_COMMENT"] = "Describe this function..."; // untranslated
Blockly.Msg["PROCEDURES_DEFNORETURN_COMMENT"] = "Descrieți această funcție ...";
Blockly.Msg["PROCEDURES_DEFNORETURN_DO"] = ""; // untranslated
Blockly.Msg["PROCEDURES_DEFNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
Blockly.Msg["PROCEDURES_DEFNORETURN_PROCEDURE"] = "fă ceva";
@@ -318,7 +318,7 @@ Blockly.Msg["PROCEDURES_MUTATORARG_TITLE"] = "nume de intrare:";
Blockly.Msg["PROCEDURES_MUTATORARG_TOOLTIP"] = "Adaugă un parametru de intrare pentru funcție.";
Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TITLE"] = "intrări";
Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TOOLTIP"] = "Adăugă, șterge sau reordonează parametrii de intrare ai acestei funcții.";
Blockly.Msg["REDO"] = "Redo"; // untranslated
Blockly.Msg["REDO"] = "Re";
Blockly.Msg["REMOVE_COMMENT"] = "Elimină comentariu";
Blockly.Msg["RENAME_VARIABLE"] = "Redenumirea variabilei...";
Blockly.Msg["RENAME_VARIABLE_TITLE"] = "Redenumeşte toate variabilele '%1' în:";
@@ -337,11 +337,11 @@ Blockly.Msg["TEXT_CHARAT_HELPURL"] = "https://github.com/google/blockly/wiki/Tex
Blockly.Msg["TEXT_CHARAT_LAST"] = "obţine o litera oarecare";
Blockly.Msg["TEXT_CHARAT_RANDOM"] = "obtine o litera oarecare";
Blockly.Msg["TEXT_CHARAT_TAIL"] = ""; // untranslated
Blockly.Msg["TEXT_CHARAT_TITLE"] = "in text %1 %2"; // untranslated
Blockly.Msg["TEXT_CHARAT_TITLE"] = "în text %1 %2";
Blockly.Msg["TEXT_CHARAT_TOOLTIP"] = "Returnează litera la poziția specificată.";
Blockly.Msg["TEXT_COUNT_HELPURL"] = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
Blockly.Msg["TEXT_COUNT_MESSAGE0"] = "count %1 in %2"; // untranslated
Blockly.Msg["TEXT_COUNT_TOOLTIP"] = "Count how many times some text occurs within some other text."; // untranslated
Blockly.Msg["TEXT_COUNT_MESSAGE0"] = "numără %1 in %2";
Blockly.Msg["TEXT_COUNT_TOOLTIP"] = "Aflați de câte ori apare un text într-un alt text.";
Blockly.Msg["TEXT_CREATE_JOIN_ITEM_TOOLTIP"] = "Adaugă un element în text.";
Blockly.Msg["TEXT_CREATE_JOIN_TITLE_JOIN"] = "alăturaţi-vă";
Blockly.Msg["TEXT_CREATE_JOIN_TOOLTIP"] = "Adaugă, elimină sau reordonează secțiuni ca să reconfigureze blocul text.";
@@ -378,11 +378,11 @@ Blockly.Msg["TEXT_PROMPT_TOOLTIP_TEXT"] = "Solicită utilizatorul pentru text.";
Blockly.Msg["TEXT_PROMPT_TYPE_NUMBER"] = "solicită pentru număr cu mesaj";
Blockly.Msg["TEXT_PROMPT_TYPE_TEXT"] = "solicită pentru text cu mesaj";
Blockly.Msg["TEXT_REPLACE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
Blockly.Msg["TEXT_REPLACE_MESSAGE0"] = "replace %1 with %2 in %3"; // untranslated
Blockly.Msg["TEXT_REPLACE_TOOLTIP"] = "Replace all occurances of some text within some other text."; // untranslated
Blockly.Msg["TEXT_REPLACE_MESSAGE0"] = "înlocuiți %1 cu %2 în %3";
Blockly.Msg["TEXT_REPLACE_TOOLTIP"] = "Înlocuiți toate aparițiile anumitor texte într-un alt text.";
Blockly.Msg["TEXT_REVERSE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
Blockly.Msg["TEXT_REVERSE_MESSAGE0"] = "reverse %1"; // untranslated
Blockly.Msg["TEXT_REVERSE_TOOLTIP"] = "Reverses the order of the characters in the text."; // untranslated
Blockly.Msg["TEXT_REVERSE_MESSAGE0"] = "inversă %1";
Blockly.Msg["TEXT_REVERSE_TOOLTIP"] = "Inversează ordinea caracterelor din text.";
Blockly.Msg["TEXT_TEXT_HELPURL"] = "https://en.wikipedia.org/wiki/String_(computer_science)";
Blockly.Msg["TEXT_TEXT_TOOLTIP"] = "O literă, cuvânt sau linie de text.";
Blockly.Msg["TEXT_TRIM_HELPURL"] = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
@@ -391,7 +391,7 @@ Blockly.Msg["TEXT_TRIM_OPERATOR_LEFT"] = "tăiaţi spațiile din partea stângă
Blockly.Msg["TEXT_TRIM_OPERATOR_RIGHT"] = "taie spațiile din partea dreaptă a";
Blockly.Msg["TEXT_TRIM_TOOLTIP"] = "Returnează o copie a textului fără spațiile de la unul sau ambele capete.";
Blockly.Msg["TODAY"] = "Astăzi";
Blockly.Msg["UNDO"] = "Undo"; // untranslated
Blockly.Msg["UNDO"] = "Anulează";
Blockly.Msg["VARIABLES_DEFAULT_NAME"] = "element";
Blockly.Msg["VARIABLES_GET_CREATE_SET"] = "Crează 'set %1'";
Blockly.Msg["VARIABLES_GET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
@@ -400,9 +400,9 @@ Blockly.Msg["VARIABLES_SET"] = "seteaza %1 la %2";
Blockly.Msg["VARIABLES_SET_CREATE_GET"] = "Crează 'get %1'";
Blockly.Msg["VARIABLES_SET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
Blockly.Msg["VARIABLES_SET_TOOLTIP"] = "Setează această variabilă sa fie egală la intrare.";
Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "A variable named '%1' already exists."; // untranslated
Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "A variable named '%1' already exists for another type: '%2'."; // untranslated
Blockly.Msg["WORKSPACE_COMMENT_DEFAULT_TEXT"] = "Say something..."; // untranslated
Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "O variabilă cu numele '%1' există deja.";
Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "o variabilă numită '%1' există deja pentru alt tip: '%2'.";
Blockly.Msg["WORKSPACE_COMMENT_DEFAULT_TEXT"] = "Spune ceva...";
Blockly.Msg["CONTROLS_FOREACH_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_FOR_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_IF_ELSEIF_TITLE_ELSEIF"] = Blockly.Msg["CONTROLS_IF_MSG_ELSEIF"];
+12 -12
View File
@@ -211,7 +211,7 @@ Blockly.Msg["MATH_ATAN2_TITLE"] = "атан2 од X:%1 Y:%2";
Blockly.Msg["MATH_ATAN2_TOOLTIP"] = "Врати арктангенту тачке (X, Y) у степенима од -180 до 180.";
Blockly.Msg["MATH_CHANGE_HELPURL"] = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
Blockly.Msg["MATH_CHANGE_TITLE"] = "промени %1 за %2";
Blockly.Msg["MATH_CHANGE_TOOLTIP"] = "Додајте број променљивој „%1.";
Blockly.Msg["MATH_CHANGE_TOOLTIP"] = "Додаје број променљивој „%1.";
Blockly.Msg["MATH_CONSTANT_HELPURL"] = "https://sr.wikipedia.org/wiki/Математичка_константа";
Blockly.Msg["MATH_CONSTANT_TOOLTIP"] = "Враћа једну од заједничких константи: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), или ∞ (бесконачно).";
Blockly.Msg["MATH_CONSTRAIN_HELPURL"] = "https://en.wikipedia.org/wiki/Clamping_(graphics)"; // untranslated
@@ -241,11 +241,11 @@ Blockly.Msg["MATH_ONLIST_OPERATOR_MODE"] = "модус списка";
Blockly.Msg["MATH_ONLIST_OPERATOR_RANDOM"] = "случајна ставка списка";
Blockly.Msg["MATH_ONLIST_OPERATOR_STD_DEV"] = "стандардна девијација списка";
Blockly.Msg["MATH_ONLIST_OPERATOR_SUM"] = "збир списка";
Blockly.Msg["MATH_ONLIST_TOOLTIP_AVERAGE"] = "Враћа просек (аритметичка средина) бројчаних вредности са списка.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_AVERAGE"] = "Враћа просек (аритметичку средину) бројева са списка.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_MAX"] = "Враћа највећи број са списка.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_MEDIAN"] = "Враћа медијану са списка.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_MIN"] = "Враћа најмањи број са списка.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_MODE"] = "Враћа слисак најчешће(их) ставке(и) са списка.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_MODE"] = "Враћа списак најчешћих ставки на списку.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_RANDOM"] = "Враћа случајни елемент са списка.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_STD_DEV"] = "Враћа стандардну девијацију списка.";
Blockly.Msg["MATH_ONLIST_TOOLTIP_SUM"] = "Враћа збир свих бројева са списка.";
@@ -295,11 +295,11 @@ Blockly.Msg["ORDINAL_NUMBER_SUFFIX"] = "";
Blockly.Msg["PROCEDURES_ALLOW_STATEMENTS"] = "дозволи изјаве";
Blockly.Msg["PROCEDURES_BEFORE_PARAMS"] = "са:";
Blockly.Msg["PROCEDURES_CALLNORETURN_HELPURL"] = "https://sr.wikipedia.org/wiki/Потпрограм";
Blockly.Msg["PROCEDURES_CALLNORETURN_TOOLTIP"] = "Покрените кориснички дефинисану функцију „%1”.";
Blockly.Msg["PROCEDURES_CALLNORETURN_TOOLTIP"] = "Покреће кориснички дефинисану функцију „%1”.";
Blockly.Msg["PROCEDURES_CALLRETURN_HELPURL"] = "https://sr.wikipedia.org/wiki/Потпрограм";
Blockly.Msg["PROCEDURES_CALLRETURN_TOOLTIP"] = "Покрените кориснички дефинисану функцију „%1” и користите њен излаз.";
Blockly.Msg["PROCEDURES_CALLRETURN_TOOLTIP"] = "Покреће кориснички дефинисану функцију „%1” и користи њен излаз.";
Blockly.Msg["PROCEDURES_CALL_BEFORE_PARAMS"] = "са:";
Blockly.Msg["PROCEDURES_CREATE_DO"] = "Направи „%1";
Blockly.Msg["PROCEDURES_CREATE_DO"] = "Направи „%1";
Blockly.Msg["PROCEDURES_DEFNORETURN_COMMENT"] = "Опишите ову функцију…";
Blockly.Msg["PROCEDURES_DEFNORETURN_DO"] = "";
Blockly.Msg["PROCEDURES_DEFNORETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
@@ -309,12 +309,12 @@ Blockly.Msg["PROCEDURES_DEFNORETURN_TOOLTIP"] = "Прави функцију б
Blockly.Msg["PROCEDURES_DEFRETURN_HELPURL"] = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
Blockly.Msg["PROCEDURES_DEFRETURN_RETURN"] = "врати";
Blockly.Msg["PROCEDURES_DEFRETURN_TOOLTIP"] = "Прави функцију са излазом.";
Blockly.Msg["PROCEDURES_DEF_DUPLICATE_WARNING"] = "Упозорење: Ова функција има дуплиране параметаре.";
Blockly.Msg["PROCEDURES_DEF_DUPLICATE_WARNING"] = "Упозорење: Ова функција има дуплиране параметре.";
Blockly.Msg["PROCEDURES_HIGHLIGHT_DEF"] = "Истакни дефиницију функције";
Blockly.Msg["PROCEDURES_IFRETURN_HELPURL"] = "http://c2.com/cgi/wiki?GuardClause"; // untranslated
Blockly.Msg["PROCEDURES_IFRETURN_TOOLTIP"] = "Ако је вредност тачно“, онда врати другу вредност.";
Blockly.Msg["PROCEDURES_IFRETURN_TOOLTIP"] = "Ако је прва вредност тачна, враћа другу вредност.";
Blockly.Msg["PROCEDURES_IFRETURN_WARNING"] = "Упозорење: Овај блок се може користити једино унутар дефиниције функције.";
Blockly.Msg["PROCEDURES_MUTATORARG_TITLE"] = "име уноса:";
Blockly.Msg["PROCEDURES_MUTATORARG_TITLE"] = "име параметра:";
Blockly.Msg["PROCEDURES_MUTATORARG_TOOLTIP"] = "Додајте улазни параметар финкцији.";
Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TITLE"] = "улази";
Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TOOLTIP"] = "Додајте, уклоните или преуредите уносе за ову функцију.";
@@ -324,7 +324,7 @@ Blockly.Msg["RENAME_VARIABLE"] = "Преименуј променљиву…";
Blockly.Msg["RENAME_VARIABLE_TITLE"] = "Преименуј све ’%1’ променљиве у:";
Blockly.Msg["TEXT_APPEND_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
Blockly.Msg["TEXT_APPEND_TITLE"] = "на %1 додај текст %2";
Blockly.Msg["TEXT_APPEND_TOOLTIP"] = "Додаје текст на променљиву „%1.";
Blockly.Msg["TEXT_APPEND_TOOLTIP"] = "Додаје текст променљивој „%1.";
Blockly.Msg["TEXT_CHANGECASE_HELPURL"] = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated
Blockly.Msg["TEXT_CHANGECASE_OPERATOR_LOWERCASE"] = "малим словима";
Blockly.Msg["TEXT_CHANGECASE_OPERATOR_TITLECASE"] = "свака реч великим словом";
@@ -393,11 +393,11 @@ Blockly.Msg["TEXT_TRIM_TOOLTIP"] = "Враћа копију текста са у
Blockly.Msg["TODAY"] = "Данас";
Blockly.Msg["UNDO"] = "Опозови";
Blockly.Msg["VARIABLES_DEFAULT_NAME"] = "ставка";
Blockly.Msg["VARIABLES_GET_CREATE_SET"] = "Направи „постави %1";
Blockly.Msg["VARIABLES_GET_CREATE_SET"] = "Направи блок за доделу вредности %1";
Blockly.Msg["VARIABLES_GET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
Blockly.Msg["VARIABLES_GET_TOOLTIP"] = "Враћа вредност ове променљиве.";
Blockly.Msg["VARIABLES_SET"] = "постави %1 у %2";
Blockly.Msg["VARIABLES_SET_CREATE_GET"] = "Направи „преузми %1";
Blockly.Msg["VARIABLES_SET_CREATE_GET"] = "Направи блок за преузимање вредности из „%1";
Blockly.Msg["VARIABLES_SET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
Blockly.Msg["VARIABLES_SET_TOOLTIP"] = "Поставља променљиву тако да буде једнака улазу.";
Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "Променљива под именом ’%1’ већ постоји.";
+12 -12
View File
@@ -7,7 +7,7 @@ goog.provide('Blockly.Msg.ur');
goog.require('Blockly.Msg');
Blockly.Msg["ADD_COMMENT"] = "کمنٹ کریں";
Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "متغیر '٪ 1' کو حذف نہیں کر سکتا کیونکہ یہ فنکشن کی تعریف کا حصہ ہے '٪ 2'";
Blockly.Msg["CHANGE_VALUE_TITLE"] = "ویلیو تبدیل کریں:";
Blockly.Msg["CLEAN_UP"] = "بلاکس صاف کریں";
Blockly.Msg["COLLAPSE_ALL"] = "بند کرو بلاکس";
@@ -28,7 +28,7 @@ Blockly.Msg["COLOUR_RGB_GREEN"] = "سبز";
Blockly.Msg["COLOUR_RGB_HELPURL"] = "http://www.december.com/html/spec/colorper.html"; // untranslated
Blockly.Msg["COLOUR_RGB_RED"] = "سرخ";
Blockly.Msg["COLOUR_RGB_TITLE"] = "کے ساتھ رنگ";
Blockly.Msg["COLOUR_RGB_TOOLTIP"] = "Create a colour with the specified amount of red, green, and blue. All values must be between 0 and 100."; // untranslated
Blockly.Msg["COLOUR_RGB_TOOLTIP"] = "مخصوص، سرخ، سبز اور نیلے رنگ کے ساتھ ایک رنگ بنائیں. تمام اقدار 0 اور 100 کے درمیان ہونا ضروری ہے.";
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_HELPURL"] = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK"] = "لوپ سے باہر نکلنا";
Blockly.Msg["CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE"] = "continue with next iteration of loop"; // untranslated
@@ -63,12 +63,12 @@ Blockly.Msg["CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL"] = "اگر ایک ویلیو ص
Blockly.Msg["CONTROLS_WHILEUNTIL_TOOLTIP_WHILE"] = "اگر ایک ویلیو صحیح ہے، تو کچھ سٹیٹمنٹ کریں";
Blockly.Msg["DELETE_ALL_BLOCKS"] = "تمام%1 بلاکس کو حذف کریں؟";
Blockly.Msg["DELETE_BLOCK"] = "حذف بلاک";
Blockly.Msg["DELETE_VARIABLE"] = "Delete the '%1' variable"; // untranslated
Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "Delete %1 uses of the '%2' variable?"; // untranslated
Blockly.Msg["DELETE_VARIABLE"] = "'٪ 1' متغیر کو حذف کریں";
Blockly.Msg["DELETE_VARIABLE_CONFIRMATION"] = "'٪ 2' متغیر کے٪ 1 استعمال کو حذف کریں؟";
Blockly.Msg["DELETE_X_BLOCKS"] = "%1 بلاکوں کو حذف کریں";
Blockly.Msg["DISABLE_BLOCK"] = "بلاک کو غیرفعال کریں";
Blockly.Msg["DUPLICATE_BLOCK"] = "ڈپلیکیٹ";
Blockly.Msg["DUPLICATE_COMMENT"] = "Duplicate Comment"; // untranslated
Blockly.Msg["DUPLICATE_COMMENT"] = " ہو بہو تبصرہ";
Blockly.Msg["ENABLE_BLOCK"] = "بلاک کو فعال کریں";
Blockly.Msg["EXPAND_ALL"] = "بلاکوں میں توسیع کریں";
Blockly.Msg["EXPAND_BLOCK"] = "بلاک میں توسیع کریں";
@@ -285,12 +285,12 @@ Blockly.Msg["MATH_TRIG_TOOLTIP_ATAN"] = "Return the arctangent of a number."; /
Blockly.Msg["MATH_TRIG_TOOLTIP_COS"] = "Return the cosine of a degree (not radian)."; // untranslated
Blockly.Msg["MATH_TRIG_TOOLTIP_SIN"] = "Return the sine of a degree (not radian)."; // untranslated
Blockly.Msg["MATH_TRIG_TOOLTIP_TAN"] = "Return the tangent of a degree (not radian)."; // untranslated
Blockly.Msg["NEW_COLOUR_VARIABLE"] = "Create colour variable..."; // untranslated
Blockly.Msg["NEW_NUMBER_VARIABLE"] = "Create number variable..."; // untranslated
Blockly.Msg["NEW_STRING_VARIABLE"] = "Create string variable..."; // untranslated
Blockly.Msg["NEW_VARIABLE"] = "نیا ویریابل...";
Blockly.Msg["NEW_COLOUR_VARIABLE"] = "رنگ متغیر بنائیں";
Blockly.Msg["NEW_NUMBER_VARIABLE"] = "عدد متغیر بناییں";
Blockly.Msg["NEW_STRING_VARIABLE"] = "متغیر بنائیں String";
Blockly.Msg["NEW_VARIABLE"] = "متغیر بنائیں";
Blockly.Msg["NEW_VARIABLE_TITLE"] = "نیا ویریابل نام:";
Blockly.Msg["NEW_VARIABLE_TYPE_TITLE"] = "New variable type:"; // untranslated
Blockly.Msg["NEW_VARIABLE_TYPE_TITLE"] = " نئی متغیر قسم";
Blockly.Msg["ORDINAL_NUMBER_SUFFIX"] = ""; // untranslated
Blockly.Msg["PROCEDURES_ALLOW_STATEMENTS"] = "allow statements"; // untranslated
Blockly.Msg["PROCEDURES_BEFORE_PARAMS"] = "سمیت:";
@@ -400,8 +400,8 @@ Blockly.Msg["VARIABLES_SET"] = "set %1 to %2"; // untranslated
Blockly.Msg["VARIABLES_SET_CREATE_GET"] = "Create 'get %1'"; // untranslated
Blockly.Msg["VARIABLES_SET_HELPURL"] = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
Blockly.Msg["VARIABLES_SET_TOOLTIP"] = "Sets this variable to be equal to the input."; // untranslated
Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "A variable named '%1' already exists."; // untranslated
Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "A variable named '%1' already exists for another type: '%2'."; // untranslated
Blockly.Msg["VARIABLE_ALREADY_EXISTS"] = "ایک متغیر نام '٪ 1' پہلے سے ہی موجود ہے.";
Blockly.Msg["VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE"] = "ایک متغیر نام '٪ 1' کسی دوسرے قسم کے لئے پہلے ہی موجود ہے: '٪ 2'.";
Blockly.Msg["WORKSPACE_COMMENT_DEFAULT_TEXT"] = "Say something..."; // untranslated
Blockly.Msg["CONTROLS_FOREACH_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
Blockly.Msg["CONTROLS_FOR_INPUT_DO"] = Blockly.Msg["CONTROLS_REPEAT_INPUT_DO"];
+1 -1
View File
@@ -321,7 +321,7 @@ Blockly.Msg["PROCEDURES_MUTATORCONTAINER_TOOLTIP"] = "Thêm, xóa hoặc sắp x
Blockly.Msg["REDO"] = "Làm lại";
Blockly.Msg["REMOVE_COMMENT"] = "Xóa Chú Giải";
Blockly.Msg["RENAME_VARIABLE"] = "Thay tên biến...";
Blockly.Msg["RENAME_VARIABLE_TITLE"] = "Thay tên tất cả \"%1\" biến này thành:";
Blockly.Msg["RENAME_VARIABLE_TITLE"] = "Thay tên tất cả các biến \"%1\" thành:";
Blockly.Msg["TEXT_APPEND_HELPURL"] = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
Blockly.Msg["TEXT_APPEND_TITLE"] = "ở cuối %1 thêm văn bản %2";
Blockly.Msg["TEXT_APPEND_TOOLTIP"] = "Thêm một mảng văn bản vào biến \"%1\".";