text: /**
   * scratchblocks v3.5.2
   * https://scratchblocks.github.io/
   * Render scratchblocks code to SVG images.
   *
   * Copyright 2013–2021, Tim Radvan
   * @license MIT
   */
  var scratchblocks=function(){'use strict';var T=Math.min,R=Math.max;function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}function t(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function s(){return s=Object.assign||function(e){for(var t,s=1;s<arguments.length;s++)for(var o in t=arguments[s],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)}function o(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,o)}return s}function i(e){for(var s,a=1;a<arguments.length;a++)s=null==arguments[a]?{}:arguments[a],a%2?o(Object(s),!0).forEach(function(o){t(e,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):o(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))});return e}function a(e,t){if(e){if("string"==typeof e)return r(e,t);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?r(e,t):void 0}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,o=Array(t);s<t;s++)o[s]=e[s];return o}function c(e,t){var s;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(s=a(e))||t&&e&&"number"==typeof e.length){s&&(e=s);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,l=!0,p=!1;return{s:function(){s=e[Symbol.iterator]()},n:function(){var e=s.next();return l=e.done,e},e:function(t){p=!0,c=t},f:function(){try{l||null==s.return||s.return()}finally{if(p)throw c}}}}function l(e){return p(e.replace(F," _ "))}function p(e){return e.replace(/_/g," _ ").replace(/ +/g," ").replace(/[,%?:]/g,"").replace(/ß/g,"ss").replace(/ä/g,"a").replace(/ö/g,"o").replace(/ü/g,"u").replace(". . .","...").replace(/^…$/,"...").trim().toLowerCase()}function h(e,t){var s=t.blocksByHash={};Object.keys(t.commands).forEach(function(e){var o=t.commands[e],i=j[e],a=l(o);s[a]=i;var n=H.exec(e);if(n){var r=n[0],c=a.replace(l(r),_[r]);s[c]=i}}),t.nativeAliases={},Object.keys(t.aliases).forEach(function(e){var o=t.aliases[e],i=j[o];if(i===void 0)throw new Error("Invalid alias '"+o+"'");var a=l(e);s[a]=i,t.nativeAliases[o]=e}),Object.keys(t.renamedBlocks||{}).forEach(function(e){var s=t.renamedBlocks[e];if(!G[s])throw new Error("Unknown ID: "+s);var o=G[s],i=l(e);W.blocksByHash[i]=o}),t.nativeDropdowns={},Object.keys(t.dropdowns).forEach(function(e){var s=t.dropdowns[e];t.nativeDropdowns[s]=e}),t.code=e,K[e]=t}function d(e){Object.keys(e).forEach(function(t){h(t,e[t])})}function g(e,t){if(!G[e])throw new Error("Unknown ID: "+e);G[e].specialCase=t}function u(e,t,s){var o=function(o,i,a){return G[s(i,a)?e:t]};g(e,o),g(t,o)}function f(e,t){if(!e)throw"Assertion failed! "+(t||"")}function m(e){return e.split("\n").map(function(e){return"  "+e}).join("\n")}function y(e){return e&&e.constructor===Array}function b(e,t){if(!e)throw"Assertion failed! "+(t||"")}function k(e,t,s){var a=[];y(t[t.length-1])&&(a=t.pop());for(var n,r=[],l=0;l<t.length;l++)n=t[l],n.isLabel?r.push(n.value):n.isIcon?r.push("@"+n.name):r.push("_");var p=r.join(" "),h=e.hash=Ae(p),d=Se(h,e,t,s);if(d){var o=d.lang,g=d.type;e.language=o,e.isRTL=-1<Oe.indexOf(o.code),("ring"===g.shape?"reporter"===e.shape:"stack"===e.shape)&&(e.shape=g.shape),e.category=g.category,e.categoryIsDefault=!0,g.selector&&(e.selector=g.selector),g.id&&(e.id=g.id),e.hasLoopArrow=g.hasLoopArrow,". . ."===g.spec&&(t=[new pe(". . .")])}else{var u,f=c(s);try{for(f.s();!(u=f.n()).done;){var m=u.value;if(w(t,m)){e.shape="define-hat",e.category="custom";for(var b,A=t.splice(m.definePrefix.length,t.length-m.defineSuffix.length),S=0;S<A.length;S++){if(b=A[S],b.isInput&&b.isBoolean)b=k({shape:"boolean",argument:"boolean",category:"custom-arg"},[new pe("")],s);else if(b.isInput&&("string"===b.shape||"number"===b.shape)){var L=b.value.split(/ +/g).map(function(e){return new pe(e)});b=k({shape:"reporter",argument:"string"===b.shape?"string":"number",category:"custom-arg"},L,s)}else(b.isReporter||b.isBoolean)&&b.info.categoryIsDefault&&(b.info.category="custom-arg",b.info.argument=b.isBoolean?"boolean":"number");A[S]=b}var v=new ge({shape:"outline",category:"custom",categoryIsDefault:!0,hasLoopArrow:!1},A);t.splice(m.definePrefix.length,0,v);break}}}catch(e){f.e(e)}finally{f.f()}}ve(e,a),e.hasLoopArrow&&t.push(new he("loopArrow"));var O=new ge(e,t);return(g&&Ee.test(g.spec)&&O.translate(o,!0),"+"===e.diff)?new fe(O):(O.diff=e.diff,O)}function w(e,t){if(e.length<t.definePrefix.length)return!1;if(e.length<t.defineSuffix.length)return!1;for(var s=0;s<t.definePrefix.length;s++){var o=t.definePrefix[s],a=e[s];if(!a.isLabel||Ae(a.value)!==Ae(o))return!1}for(var s=1;s<=t.defineSuffix.length;s++){var n=t.defineSuffix[t.defineSuffix.length-s],r=e[e.length-s];if(!r.isLabel||Ae(r.value)!==Ae(n))return!1}return!0}function A(e,t){function o(){L=e[++v]}function a(){return e[v+1]}function n(){for(var t=v+1;t<e.length;t++)if(" "!==e[t])return e[t]}function r(e,s){var o=!!s.filter(function(e){return!e.isLabel}).length,i={shape:e,category:"reporter"!==e||o?"obsolete":"variables",categoryIsDefault:!0,hasLoopArrow:!1};return k(i,s,t)}function c(e,s){var o=ke(s,t)||s;return new de(e,s,o)}function l(e){for(var t,s=[];L&&"\n"!==L;){if("<"===L||">"===L&&">"===e){var i=s[s.length-1],r=n();if(i&&!i.isLabel&&("["===r||"("===r||"<"===r||"{"===r)){t=null,s.push(new pe(L)),o();continue}}if(L===e)break;if("/"===L&&"/"===a()&&!e)break;switch(L){case"[":t=null,s.push(p());break;case"(":t=null,s.push(d());break;case"<":t=null,s.push(g());break;case"{":t=null,s.push(u());break;case" ":case"\t":o(),t=null;break;case"\u25C2":case"\u25B8":s.push(f()),t=null;break;case"@":o();for(var c="";L&&/[a-zA-Z]/.test(L);)c+=L,o();"cloud"===c?s.push(new pe("\u2601")):s.push(he.icons.hasOwnProperty(c)?new he(c):new pe("@"+c)),t=null;break;case"\\":o();case":":if(":"===L&&":"===a())return s.push(m(e)),s;default:t||s.push(t=new pe("")),t.value+=L,o();}}return s}function p(){o();for(var e="",t=!1;L&&"]"!==L&&"\n"!==L;){if("\\"!==L)t=!1;else if(o(),"v"===L&&(t=!0),!L)break;e+=L,o()}return"]"===L&&o(),we.test(e)?new de("color",e):!t&&/ v$/.test(e)?c("dropdown",e.slice(0,e.length-2)):new de("string",e)}function h(e){var t=l(e);if(L&&"\n"===L&&(A=!0,o()),0!==t.length){if(1===t.length){var s=t[0];if(s.isBlock&&(s.isReporter||s.isBoolean||s.isRing))return s}return r("stack",t)}}function d(){if(o()," "===L&&(o(),"v"===L&&")"===a()))return o(),o(),new de("number-dropdown","");var e=l(")");if(L&&")"===L&&o(),0===e.length)return new de("number","");if(1===e.length&&e[0].isLabel){var t=e[0].value;if(/^[0-9e.-]*$/.test(t))return new de("number",t);if(we.test(t))return new de("color",t)}for(var s=0;s<e.length&&!!e[s].isLabel;s++);if(s===e.length){var n=e[s-1];if(1<s&&"v"===n.value){e.pop();var t=e.map(function(e){return e.value}).join(" ");return c("number-dropdown",t)}}var p=r("reporter",e);if(p.info&&"ring"===p.info.shape){var h=p.children[0];h&&h.isInput&&"number"===h.shape&&""===h.value?p.children[0]=new de("reporter"):(h&&h.isScript&&h.isEmpty||h&&h.isBlock&&!h.children.length)&&(p.children[0]=new de("stack"))}return p}function g(){o();var e=l(">");return L&&">"===L&&o(),0===e.length?new de("boolean"):r("boolean",e)}function u(){o(),A=!1;var e=function(){for(;L&&"}"!==L;){var e=h("}");if(e)return e}},t=S(e),s=[];return t.forEach(function(e){s=s.concat(e.blocks)}),"}"===L&&o(),A?new me(s):(b(1>=s.length),s.length?s[0]:r("stack",[]))}function f(){var e=L;return o(),"\u25B8"===e?new he("addInput"):"\u25C2"===e?new he("delInput"):void 0}function m(e){o(),o();for(var t=[],s="";L&&"\n"!==L&&L!==e;){if(" "===L)s&&(t.push(s),s="");else if("/"===L&&"/"===a())break;else s+=L;o()}return s&&t.push(s),t}function y(e){o(),o();for(var t="";L&&"\n"!==L&&L!==e;)t+=L,o();return L&&"\n"===L&&o(),new ue(t,!0)}function w(){var e;("+"===L||"-"===L)&&(e=L,o());var t=h();if("/"===L&&"/"===a()){var s=y();if(s.hasBlock=t&&t.children.length,!s.hasBlock)return s;t.comment=s}return t&&(t.diff=e),t}var A,L=e[0],v=0,O=[];return t.map(function(e){O=O.concat(e.define)}),function(){if(L){var e=w();return e||"NL"}}}function S(e){function t(){n=e()}function o(){for(;"NL"===n;)t();for(var e=[];n;){for(var o=[];n&&"NL"!==n;){var a=i(),r="+"===a.diff;if(r&&(a.diff=null),(a.isElse||a.isEnd)&&(a=new ge(s({},a.info,{shape:"stack"}),a.children)),r){var c=o[o.length-1],l=[];if(c&&c.isGlow){o.pop();var l=c.child.isScript?c.child.blocks:[c.child]}l.push(a),o.push(new fe(new me(l)))}else if(a.isHat)o.length&&e.push(new me(o)),o=[a];else if(a.isFinal){o.push(a);break}else if(a.isCommand)o.push(a);else{o.length&&e.push(new me(o)),e.push(new me([a])),o=[];break}}for(o.length&&e.push(new me(o));"NL"===n;)t()}return e}function i(){var e=n;if(t(),e.hasScript)for(;;){var s=a();if(e.children.push(new me(s)),n&&n.isElse){for(var o=0;o<n.children.length;o++)e.children.push(n.children[o]);t();continue}n&&n.isEnd&&t();break}return e}function a(){for(var e=[];n;){if("NL"===n){t();continue}if(!n.isCommand)return e;var s=i(),o="+"===s.diff;if(o&&(s.diff=null),o){var a=e[e.length-1],r=[];if(a&&a.isGlow){e.pop();var r=a.child.isScript?a.child.blocks:[a.child]}r.push(s),e.push(new fe(new me(r)))}else e.push(s)}return e}var n=e();return o()}function L(e,t){e.isScript?e.blocks=e.blocks.map(function(e){return L(e,t),t(e)||e}):e.isBlock?e.children=e.children.map(function(e){return L(e,t),t(e)||e}):e.isGlow&&L(e.child,t)}function v(e){var t=Object.create(null),s=Object.create(null),o=Object.create(null);e.forEach(function(e){var o=Object.create(null);L(e,function(e){if(e.isBlock)if("define-hat"===e.info.shape){var a=e.children.find(function(e){return e.isOutline});if(!a)return;for(var n,r=[],c=[],l=0;l<a.children.length;l++)if(n=a.children[l],n.isLabel)c.push(n.value);else if(n.isBlock){if(!n.info.argument)return;c.push({number:"%n",string:"%s",boolean:"%b"}[n.info.argument]);var p=Te(n);r.push(p),o[p]=!0}var h=c.join(" "),d=Le(h),g=t[d]={spec:h,names:r};e.info.id="PROCEDURES_DEFINITION",e.info.selector="procDef",e.info.call=g.spec,e.info.names=g.names,e.info.category="custom"}else if(e.info.categoryIsDefault&&(e.isReporter||e.isBoolean)){var p=Te(e);o[p]&&(e.info.category="custom-arg",e.info.categoryIsDefault=!1,e.info.selector="getParam")}else if(Re.hasOwnProperty(e.info.selector)){var u=Re[e.info.selector],f=e.children.filter(function(e){return!e.isLabel}),m=f[u];m&&m.isInput&&(s[m.value]=!0)}})}),e.forEach(function(e){L(e,function(e){if(e.info&&e.info.categoryIsDefault&&"obsolete"===e.info.category){var i=t[e.info.hash];return void(i&&(e.info.selector="call",e.info.call=i.spec,e.info.names=i.names,e.info.category="custom"))}var a,i;if(e.isReporter&&"variables"===e.info.category&&e.info.categoryIsDefault&&(e.info.selector="readVariable",a=Te(e),i=e.info),!!a)if(s[a])i.category="list",i.categoryIsDefault=!1,i.selector="contentsOfList:";else if(o[a])i.category="variables",i.categoryIsDefault=!1,i.selector="readVariable";else return})})}function O(e,t){var t=s({inline:!1,languages:["en"]},t);if(t.dialect)throw new Error("Option 'dialect' no longer supported");e=e.replace(/&lt;/g,"<"),e=e.replace(/&gt;/g,">"),t.inline&&(e=e.replace(/\n/g," "));var o=t.languages.map(function(e){var t=be[e];if(!t)throw new Error("Unknown language: '"+e+"'");return t}),i=A(e,o),a=S(i);return v(a),new ye(a)}function E(e,t){return s({},e,t)}var C={pen:"pen",video:"sensing",music:"sound"},I=i(i({},C),{},{tts:"tts",translate:"translate",microbit:"microbit",wedo:"wedo",makeymakey:"makeymakey",ev3:"ev3",boost:"boost",gdxfor:"gdxfor"}),N={extensions:I,movedExtensions:C,aliasExtensions:{wedo2:"wedo",text2speech:"tts"}},x=N.extensions,M=N.aliasExtensions,B=["motion","looks","sound","variables","list","events","control","sensing","operators","custom","custom-arg","extension","grey","obsolete"].concat(Object.keys(x)).concat(Object.keys(M)),D=["hat","cap","stack","boolean","reporter","ring","cat"],P=/(%[a-zA-Z0-9](?:\.[a-zA-Z0-9]+)?)/,F=new RegExp(P.source,"g"),H=/(@[a-zA-Z]+)/,z=new RegExp([P.source,"|",H.source,"| +"].join(""),"g"),V=/^#(?:[0-9a-fA-F]{3}){1,2}?$/,G={},j={},U=[{id:"MOTION_MOVESTEPS",selector:"forward:",spec:"move %1 steps",inputs:["%n"],shape:"stack",category:"motion"},{id:"MOTION_TURNRIGHT",selector:"turnRight:",spec:"turn @turnRight %1 degrees",inputs:["%n"],shape:"stack",category:"motion"},{id:"MOTION_TURNLEFT",selector:"turnLeft:",spec:"turn @turnLeft %1 degrees",inputs:["%n"],shape:"stack",category:"motion"},{id:"MOTION_POINTINDIRECTION",selector:"heading:",spec:"point in direction %1",inputs:["%d.direction"],shape:"stack",category:"motion"},{id:"MOTION_POINTTOWARDS",selector:"pointTowards:",spec:"point towards %1",inputs:["%m.spriteOrMouse"],shape:"stack",category:"motion"},{id:"MOTION_GOTOXY",selector:"gotoX:y:",spec:"go to x:%1 y:%2",inputs:["%n","%n"],shape:"stack",category:"motion"},{id:"MOTION_GOTO",selector:"gotoSpriteOrMouse:",spec:"go to %1",inputs:["%m.location"],shape:"stack",category:"motion"},{id:"MOTION_GLIDESECSTOXY",selector:"glideSecs:toX:y:elapsed:from:",spec:"glide %1 secs to x:%2 y:%3",inputs:["%n","%n","%n"],shape:"stack",category:"motion"},{id:"MOTION_GLIDETO",spec:"glide %1 secs to %2",inputs:["%n","%m.location"],shape:"stack",category:"motion"},{id:"MOTION_CHANGEXBY",selector:"changeXposBy:",spec:"change x by %1",inputs:["%n"],shape:"stack",category:"motion"},{id:"MOTION_SETX",selector:"xpos:",spec:"set x to %1",inputs:["%n"],shape:"stack",category:"motion"},{id:"MOTION_CHANGEYBY",selector:"changeYposBy:",spec:"change y by %1",inputs:["%n"],shape:"stack",category:"motion"},{id:"MOTION_SETY",selector:"ypos:",spec:"set y to %1",inputs:["%n"],shape:"stack",category:"motion"},{id:"MOTION_SETROTATIONSTYLE",selector:"setRotationStyle",spec:"set rotation style %1",inputs:["%m.rotationStyle"],shape:"stack",category:"motion"},{id:"LOOKS_SAYFORSECS",selector:"say:duration:elapsed:from:",spec:"say %1 for %2 seconds",inputs:["%s","%n"],shape:"stack",category:"looks"},{id:"LOOKS_SAY",selector:"say:",spec:"say %1",inputs:["%s"],shape:"stack",category:"looks"},{id:"LOOKS_THINKFORSECS",selector:"think:duration:elapsed:from:",spec:"think %1 for %2 seconds",inputs:["%s","%n"],shape:"stack",category:"looks"},{id:"LOOKS_THINK",selector:"think:",spec:"think %1",inputs:["%s"],shape:"stack",category:"looks"},{id:"LOOKS_SHOW",selector:"show",spec:"show",inputs:[],shape:"stack",category:"looks"},{id:"LOOKS_HIDE",selector:"hide",spec:"hide",inputs:[],shape:"stack",category:"looks"},{id:"LOOKS_SWITCHCOSTUMETO",selector:"lookLike:",spec:"switch costume to %1",inputs:["%m.costume"],shape:"stack",category:"looks"},{id:"LOOKS_NEXTCOSTUME",selector:"nextCostume",spec:"next costume",inputs:[],shape:"stack",category:"looks"},{id:"LOOKS_NEXTBACKDROP_BLOCK",selector:"nextScene",spec:"next backdrop",inputs:[],shape:"stack",category:"looks"},{id:"LOOKS_SWITCHBACKDROPTO",selector:"startScene",spec:"switch backdrop to %1",inputs:["%m.backdrop"],shape:"stack",category:"looks"},{id:"LOOKS_SWITCHBACKDROPTOANDWAIT",selector:"startSceneAndWait",spec:"switch backdrop to %1 and wait",inputs:["%m.backdrop"],shape:"stack",category:"looks"},{id:"LOOKS_CHANGEEFFECTBY",selector:"changeGraphicEffect:by:",spec:"change %1 effect by %2",inputs:["%m.effect","%n"],shape:"stack",category:"looks"},{id:"LOOKS_SETEFFECTTO",selector:"setGraphicEffect:to:",spec:"set %1 effect to %2",inputs:["%m.effect","%n"],shape:"stack",category:"looks"},{id:"LOOKS_CLEARGRAPHICEFFECTS",selector:"filterReset",spec:"clear graphic effects",inputs:[],shape:"stack",category:"looks"},{id:"LOOKS_CHANGESIZEBY",selector:"changeSizeBy:",spec:"change size by %1",inputs:["%n"],shape:"stack",category:"looks"},{id:"LOOKS_SETSIZETO",selector:"setSizeTo:",spec:"set size to %1%",inputs:["%n"],shape:"stack",category:"looks"},{selector:"comeToFront",spec:"go to front",inputs:[],shape:"stack",category:"looks"},{id:"LOOKS_GOTOFRONTBACK",spec:"go to %1 layer",inputs:["%m"],shape:"stack",category:"looks"},{selector:"goBackByLayers:",spec:"go back %1 layers",inputs:["%n"],shape:"stack",category:"looks"},{id:"LOOKS_GOFORWARDBACKWARDLAYERS",spec:"go %1 %2 layers",inputs:["%m","%n"],shape:"stack",category:"looks"},{id:"SOUND_PLAY",selector:"playSound:",spec:"start sound %1",inputs:["%m.sound"],shape:"stack",category:"sound"},{id:"SOUND_CHANGEEFFECTBY",spec:"change %1 effect by %2",inputs:["%m","%n"],shape:"stack",category:"sound"},{id:"SOUND_SETEFFECTO",spec:"set %1 effect to %2",inputs:["%m","%n"],shape:"stack",category:"sound"},{id:"SOUND_CLEAREFFECTS",spec:"clear sound effects",inputs:[],shape:"stack",category:"sound"},{id:"SOUND_PLAYUNTILDONE",selector:"doPlaySoundAndWait",spec:"play sound %1 until done",inputs:["%m.sound"],shape:"stack",category:"sound"},{id:"SOUND_STOPALLSOUNDS",selector:"stopAllSounds",spec:"stop all sounds",inputs:[],shape:"stack",category:"sound"},{id:"music.playDrumForBeats",selector:"playDrum",spec:"play drum %1 for %2 beats",inputs:["%d.drum","%n"],shape:"stack",category:"music"},{id:"music.restForBeats",selector:"rest:elapsed:from:",spec:"rest for %1 beats",inputs:["%n"],shape:"stack",category:"music"},{id:"music.playNoteForBeats",selector:"noteOn:duration:elapsed:from:",spec:"play note %1 for %2 beats",inputs:["%d.note","%n"],shape:"stack",category:"music"},{id:"music.setInstrument",selector:"instrument:",spec:"set instrument to %1",inputs:["%d.instrument"],shape:"stack",category:"music"},{id:"SOUND_CHANGEVOLUMEBY",selector:"changeVolumeBy:",spec:"change volume by %1",inputs:["%n"],shape:"stack",category:"sound"},{id:"SOUND_SETVOLUMETO",selector:"setVolumeTo:",spec:"set volume to %1%",inputs:["%n"],shape:"stack",category:"sound"},{id:"music.changeTempo",selector:"changeTempoBy:",spec:"change tempo by %1",inputs:["%n"],shape:"stack",category:"music"},{selector:"setTempoTo:",spec:"set tempo to %1 bpm",inputs:["%n"],shape:"stack",category:"sound"},{id:"music.setTempo",selector:"setTempoTo:",spec:"set tempo to %1",inputs:["%n"],shape:"stack",category:"music"},{id:"pen.clear",selector:"clearPenTrails",spec:"erase all",inputs:[],shape:"stack",category:"pen"},{id:"pen.stamp",selector:"stampCostume",spec:"stamp",inputs:[],shape:"stack",category:"pen"},{id:"pen.penDown",selector:"putPenDown",spec:"pen down",inputs:[],shape:"stack",category:"pen"},{id:"pen.penUp",selector:"putPenUp",spec:"pen up",inputs:[],shape:"stack",category:"pen"},{id:"pen.setColor",selector:"penColor:",spec:"set pen color to %1",inputs:["%c"],shape:"stack",category:"pen"},{id:"pen.changeHue",selector:"changePenHueBy:",spec:"change pen color by %1",inputs:["%n"],shape:"stack",category:"pen"},{id:"pen.setColorParam",spec:"set pen %1 to %2",inputs:["%m.color","%c"],shape:"stack",category:"pen"},{id:"pen.changeColorParam",spec:"change pen %1 by %2",inputs:["%m.color","%n"],shape:"stack",category:"pen"},{id:"pen.setHue",selector:"setPenHueTo:",spec:"set pen color to %1",inputs:["%n"],shape:"stack",category:"pen"},{id:"pen.changeShade",selector:"changePenShadeBy:",spec:"change pen shade by %1",inputs:["%n"],shape:"stack",category:"pen"},{id:"pen.setShade",selector:"setPenShadeTo:",spec:"set pen shade to %1",inputs:["%n"],shape:"stack",category:"pen"},{id:"pen.changeSize",selector:"changePenSizeBy:",spec:"change pen size by %1",inputs:["%n"],shape:"stack",category:"pen"},{id:"pen.setSize",selector:"penSize:",spec:"set pen size to %1",inputs:["%n"],shape:"stack",category:"pen"},{id:"EVENT_WHENFLAGCLICKED",selector:"whenGreenFlag",spec:"when @greenFlag clicked",inputs:[],shape:"hat",category:"events"},{id:"EVENT_WHENKEYPRESSED",selector:"whenKeyPressed",spec:"when %1 key pressed",inputs:["%m.key"],shape:"hat",category:"events"},{id:"EVENT_WHENTHISSPRITECLICKED",selector:"whenClicked",spec:"when this sprite clicked",inputs:[],shape:"hat",category:"events"},{id:"EVENT_WHENSTAGECLICKED",spec:"when stage clicked",inputs:[],shape:"hat",category:"events"},{id:"EVENT_WHENBACKDROPSWITCHESTO",selector:"whenSceneStarts",spec:"when backdrop switches to %1",inputs:["%m.backdrop"],shape:"hat",category:"events"},{id:"EVENT_WHENGREATERTHAN",selector:"whenSensorGreaterThan",spec:"when %1 > %2",inputs:["%m.triggerSensor","%n"],shape:"hat",category:"events"},{id:"EVENT_WHENBROADCASTRECEIVED",selector:"whenIReceive",spec:"when I receive %1",inputs:["%m.broadcast"],shape:"hat",category:"events"},{id:"EVENT_BROADCAST",selector:"broadcast:",spec:"broadcast %1",inputs:["%m.broadcast"],shape:"stack",category:"events"},{id:"EVENT_BROADCASTANDWAIT",selector:"doBroadcastAndWait",spec:"broadcast %1 and wait",inputs:["%m.broadcast"],shape:"stack",category:"events"},{id:"CONTROL_WAIT",selector:"wait:elapsed:from:",spec:"wait %1 seconds",inputs:["%n"],shape:"stack",category:"control"},{id:"CONTROL_REPEAT",selector:"doRepeat",spec:"repeat %1",inputs:["%n"],shape:"c-block",category:"control",hasLoopArrow:!0},{id:"CONTROL_FOREVER",selector:"doForever",spec:"forever",inputs:[],shape:"c-block cap",category:"control",hasLoopArrow:!0},{id:"CONTROL_IF",selector:"doIf",spec:"if %1 then",inputs:["%b"],shape:"c-block",category:"control"},{id:"CONTROL_WAITUNTIL",selector:"doWaitUntil",spec:"wait until %1",inputs:["%b"],shape:"stack",category:"control"},{id:"CONTROL_REPEATUNTIL",selector:"doUntil",spec:"repeat until %1",inputs:["%b"],shape:"c-block",category:"control",hasLoopArrow:!0},{id:"CONTROL_STOP",selector:"stopScripts",spec:"stop %1",inputs:["%m.stop"],shape:"cap",category:"control"},{id:"CONTROL_STARTASCLONE",selector:"whenCloned",spec:"when I start as a clone",inputs:[],shape:"hat",category:"control"},{id:"CONTROL_CREATECLONEOF",selector:"createCloneOf",spec:"create clone of %1",inputs:["%m.spriteOnly"],shape:"stack",category:"control"},{id:"CONTROL_DELETETHISCLONE",selector:"deleteClone",spec:"delete this clone",inputs:[],shape:"cap",category:"control"},{id:"SENSING_ASKANDWAIT",selector:"doAsk",spec:"ask %1 and wait",inputs:["%s"],shape:"stack",category:"sensing"},{id:"videoSensing.videoToggle",selector:"setVideoState",spec:"turn video %1",inputs:["%m.videoState"],shape:"stack",category:"video"},{id:"videoSensing.setVideoTransparency",selector:"setVideoTransparency",spec:"set video transparency to %1%",inputs:["%n"],shape:"stack",category:"video"},{id:"videoSensing.whenMotionGreaterThan",spec:"when video motion > %1",inputs:["%n"],shape:"hat",category:"video"},{id:"SENSING_RESETTIMER",selector:"timerReset",spec:"reset timer",inputs:[],shape:"stack",category:"sensing"},{id:"DATA_SETVARIABLETO",selector:"setVar:to:",spec:"set %1 to %2",inputs:["%m.var","%s"],shape:"stack",category:"variables"},{id:"DATA_CHANGEVARIABLEBY",selector:"changeVar:by:",spec:"change %1 by %2",inputs:["%m.var","%n"],shape:"stack",category:"variables"},{id:"DATA_SHOWVARIABLE",selector:"showVariable:",spec:"show variable %1",inputs:["%m.var"],shape:"stack",category:"variables"},{id:"DATA_HIDEVARIABLE",selector:"hideVariable:",spec:"hide variable %1",inputs:["%m.var"],shape:"stack",category:"variables"},{id:"DATA_ADDTOLIST",selector:"append:toList:",spec:"add %1 to %2",inputs:["%s","%m.list"],shape:"stack",category:"list"},{id:"DATA_DELETEOFLIST",selector:"deleteLine:ofList:",spec:"delete %1 of %2",inputs:["%d.listDeleteItem","%m.list"],shape:"stack",category:"list"},{id:"DATA_DELETEALLOFLIST",spec:"delete all of %1",inputs:["%m.list"],shape:"stack",category:"list"},{id:"MOTION_IFONEDGEBOUNCE",selector:"bounceOffEdge",spec:"if on edge, bounce",inputs:[],shape:"stack",category:"motion"},{id:"DATA_INSERTATLIST",selector:"insert:at:ofList:",spec:"insert %1 at %2 of %3",inputs:["%s","%d.listItem","%m.list"],shape:"stack",category:"list"},{id:"DATA_REPLACEITEMOFLIST",selector:"setLine:ofList:to:",spec:"replace item %1 of %2 with %3",inputs:["%d.listItem","%m.list","%s"],shape:"stack",category:"list"},{id:"DATA_SHOWLIST",selector:"showList:",spec:"show list %1",inputs:["%m.list"],shape:"stack",category:"list"},{id:"DATA_HIDELIST",selector:"hideList:",spec:"hide list %1",inputs:["%m.list"],shape:"stack",category:"list"},{id:"SENSING_OF_XPOSITION",selector:"xpos",spec:"x position",inputs:[],shape:"reporter",category:"motion"},{id:"SENSING_OF_YPOSITION",selector:"ypos",spec:"y position",inputs:[],shape:"reporter",category:"motion"},{id:"SENSING_OF_DIRECTION",selector:"heading",spec:"direction",inputs:[],shape:"reporter",category:"motion"},{id:"SENSING_OF_COSTUMENUMBER",selector:"costumeIndex",spec:"costume #",inputs:[],shape:"reporter",category:"looks"},{id:"LOOKS_COSTUMENUMBERNAME",selector:"LOOKS_COSTUMENUMBERNAME",spec:"costume %1",inputs:["%m"],shape:"reporter",category:"looks"},{id:"SENSING_OF_SIZE",selector:"scale",spec:"size",inputs:[],shape:"reporter",category:"looks"},{id:"SENSING_OF_BACKDROPNAME",selector:"sceneName",spec:"backdrop name",inputs:[],shape:"reporter",category:"looks"},{id:"LOOKS_BACKDROPNUMBERNAME",spec:"backdrop %1",inputs:["%m"],shape:"reporter",category:"looks"},{id:"SENSING_OF_BACKDROPNUMBER",selector:"backgroundIndex",spec:"backdrop #",inputs:[],shape:"reporter",category:"looks"},{id:"SOUND_VOLUME",selector:"volume",spec:"volume",inputs:[],shape:"reporter",category:"sound"},{id:"music.getTempo",selector:"tempo",spec:"tempo",inputs:[],shape:"reporter",category:"music"},{id:"SENSING_TOUCHINGOBJECT",selector:"touching:",spec:"touching %1?",inputs:["%m.touching"],shape:"boolean",category:"sensing"},{id:"SENSING_TOUCHINGCOLOR",selector:"touchingColor:",spec:"touching color %1?",inputs:["%c"],shape:"boolean",category:"sensing"},{id:"SENSING_COLORISTOUCHINGCOLOR",selector:"color:sees:",spec:"color %1 is touching %2?",inputs:["%c","%c"],shape:"boolean",category:"sensing"},{id:"SENSING_DISTANCETO",selector:"distanceTo:",spec:"distance to %1",inputs:["%m.spriteOrMouse"],shape:"reporter",category:"sensing"},{id:"SENSING_ANSWER",selector:"answer",spec:"answer",inputs:[],shape:"reporter",category:"sensing"},{id:"SENSING_KEYPRESSED",selector:"keyPressed:",spec:"key %1 pressed?",inputs:["%m.key"],shape:"boolean",category:"sensing"},{id:"SENSING_MOUSEDOWN",selector:"mousePressed",spec:"mouse down?",inputs:[],shape:"boolean",category:"sensing"},{id:"SENSING_MOUSEX",selector:"mouseX",spec:"mouse x",inputs:[],shape:"reporter",category:"sensing"},{id:"SENSING_MOUSEY",selector:"mouseY",spec:"mouse y",inputs:[],shape:"reporter",category:"sensing"},{id:"SENSING_SETDRAGMODE",spec:"set drag mode %1",inputs:["%m"],shape:"stack",category:"sensing"},{id:"SENSING_LOUDNESS",selector:"soundLevel",spec:"loudness",inputs:[],shape:"reporter",category:"sensing"},{id:"videoSensing.videoOn",selector:"senseVideoMotion",spec:"video %1 on %2",inputs:["%m.videoMotionType","%m.stageOrThis"],shape:"reporter",category:"video"},{id:"SENSING_TIMER",selector:"timer",spec:"timer",inputs:[],shape:"reporter",category:"sensing"},{id:"SENSING_OF",selector:"getAttribute:of:",spec:"%1 of %2",inputs:["%m.attribute","%m.spriteOrStage"],shape:"reporter",category:"sensing"},{id:"SENSING_CURRENT",selector:"timeAndDate",spec:"current %1",inputs:["%m.timeAndDate"],shape:"reporter",category:"sensing"},{id:"SENSING_DAYSSINCE2000",selector:"timestamp",spec:"days since 2000",inputs:[],shape:"reporter",category:"sensing"},{id:"SENSING_USERNAME",selector:"getUserName",spec:"username",inputs:[],shape:"reporter",category:"sensing"},{id:"OPERATORS_ADD",selector:"+",spec:"%1 + %2",inputs:["%n","%n"],shape:"reporter",category:"operators"},{id:"OPERATORS_SUBTRACT",selector:"-",spec:"%1 - %2",inputs:["%n","%n"],shape:"reporter",category:"operators"},{id:"OPERATORS_MULTIPLY",selector:"*",spec:"%1 * %2",inputs:["%n","%n"],shape:"reporter",category:"operators"},{id:"OPERATORS_DIVIDE",selector:"/",spec:"%1 / %2",inputs:["%n","%n"],shape:"reporter",category:"operators"},{id:"OPERATORS_RANDOM",selector:"randomFrom:to:",spec:"pick random %1 to %2",inputs:["%n","%n"],shape:"reporter",category:"operators"},{id:"OPERATORS_LT",selector:"<",spec:"%1 < %2",inputs:["%s","%s"],shape:"boolean",category:"operators"},{id:"OPERATORS_EQUALS",selector:"=",spec:"%1 = %2",inputs:["%s","%s"],shape:"boolean",category:"operators"},{id:"OPERATORS_GT",selector:">",spec:"%1 > %2",inputs:["%s","%s"],shape:"boolean",category:"operators"},{id:"OPERATORS_AND",selector:"&",spec:"%1 and %2",inputs:["%b","%b"],shape:"boolean",category:"operators"},{id:"OPERATORS_OR",selector:"|",spec:"%1 or %2",inputs:["%b","%b"],shape:"boolean",category:"operators"},{id:"OPERATORS_NOT",selector:"not",spec:"not %1",inputs:["%b"],shape:"boolean",category:"operators"},{id:"OPERATORS_JOIN",selector:"concatenate:with:",spec:"join %1 %2",inputs:["%s","%s"],shape:"reporter",category:"operators"},{id:"OPERATORS_LETTEROF",selector:"letter:of:",spec:"letter %1 of %2",inputs:["%n","%s"],shape:"reporter",category:"operators"},{id:"OPERATORS_LENGTH",selector:"stringLength:",spec:"length of %1",inputs:["%s"],shape:"reporter",category:"operators"},{id:"OPERATORS_MOD",selector:"%",spec:"%1 mod %2",inputs:["%n","%n"],shape:"reporter",category:"operators"},{id:"OPERATORS_ROUND",selector:"rounded",spec:"round %1",inputs:["%n"],shape:"reporter",category:"operators"},{id:"OPERATORS_MATHOP",selector:"computeFunction:of:",spec:"%1 of %2",inputs:["%m.mathOp","%n"],shape:"reporter",category:"operators"},{id:"OPERATORS_CONTAINS",spec:"%1 contains %2?",inputs:["%s","%s"],shape:"boolean",category:"operators"},{id:"DATA_ITEMOFLIST",selector:"getLine:ofList:",spec:"item %1 of %2",inputs:["%d.listItem","%m.list"],shape:"reporter",category:"list"},{id:"DATA_ITEMNUMOFLIST",spec:"item # of %1 in %2",inputs:["%s","%m.list"],shape:"reporter",category:"list"},{id:"DATA_LENGTHOFLIST",selector:"lineCountOfList:",spec:"length of %1",inputs:["%m.list"],shape:"reporter",category:"list"},{id:"DATA_LISTCONTAINSITEM",selector:"list:contains:",spec:"%1 contains %2?",inputs:["%m.list","%s"],shape:"boolean",category:"list"},{id:"wedo2.motorOn",spec:"turn %1 on",inputs:["%m.motor"],shape:"stack",category:"wedo"},{id:"wedo2.motorOff",spec:"turn %1 off",inputs:["%m.motor"],shape:"stack",category:"wedo"},{id:"wedo2.startMotorPower",spec:"set %1 power to %2",inputs:["%m.motor","%n"],shape:"stack",category:"wedo"},{id:"wedo2.setMotorDirection",spec:"set %1 direction to %2",inputs:["%m.motor2","%m.motorDirection"],shape:"stack",category:"wedo"},{id:"wedo2.whenDistance",spec:"when distance %1 %2",inputs:["%m.lessMore","%n"],shape:"hat",category:"wedo"},{id:"wedo2.getDistance",spec:"distance",inputs:[],shape:"reporter",category:"wedo"},{id:"wedo2.motorOnFor",spec:"turn %1 on for %2 seconds",inputs:["%m.motor","%n"],shape:"stack",category:"wedo"},{id:"wedo2.setLightHue",spec:"set light color to %1",inputs:["%n"],shape:"stack",category:"wedo"},{id:"wedo2.playNoteFor",spec:"play note %1 for %2 seconds",inputs:["%n","%n"],shape:"stack",category:"wedo"},{id:"wedo2.whenTilted",spec:"when tilted %1",inputs:["%m.xxx"],shape:"hat",category:"wedo"},{id:"wedo2.isTilted",spec:"tilted %1?",inputs:["%m"],shape:"boolean",category:"wedo"},{id:"wedo2.getTiltAngle",spec:"tilt angle %1",inputs:["%m.xxx"],shape:"reporter",category:"wedo"},{id:"CONTROL_ELSE",spec:"else",inputs:[],shape:"celse",category:"control"},{id:"scratchblocks:end",spec:"end",inputs:[],shape:"cend",category:"control"},{id:"scratchblocks:ellipsis",spec:". . .",inputs:[],shape:"stack",category:"grey"},{id:"scratchblocks:addInput",spec:"%1 @addInput",inputs:["%n"],shape:"ring",category:"grey"},{id:"SENSING_USERID",spec:"user id",inputs:[],shape:"reporter",category:"obsolete"},{selector:"doIf",spec:"if %1",inputs:["%b"],shape:"c-block",category:"obsolete"},{selector:"doForeverIf",spec:"forever if %1",inputs:["%b"],shape:"c-block cap",category:"obsolete"},{selector:"doReturn",spec:"stop script",inputs:[],shape:"cap",category:"obsolete"},{selector:"stopAll",spec:"stop all",inputs:[],shape:"cap",category:"obsolete"},{selector:"lookLike:",spec:"switch to costume %1",inputs:["%m.costume"],shape:"stack",category:"obsolete"},{selector:"nextScene",spec:"next background",inputs:[],shape:"stack",category:"obsolete"},{selector:"startScene",spec:"switch to background %1",inputs:["%m.backdrop"],shape:"stack",category:"obsolete"},{selector:"backgroundIndex",spec:"background #",inputs:[],shape:"reporter",category:"obsolete"},{id:"SENSING_LOUD",selector:"isLoud",spec:"loud?",inputs:[],shape:"boolean",category:"obsolete"},{id:"text2speech.speakAndWaitBlock",spec:"speak %1",inputs:["%s"],shape:"stack",category:"tts"},{id:"text2speech.setVoiceBlock",spec:"set voice to %1",inputs:["%m"],shape:"stack",category:"tts"},{id:"text2speech.setLanguageBlock",spec:"set language to %1",inputs:["%m"],shape:"stack",category:"tts"},{id:"translate.translateBlock",spec:"translate %1 to %2",inputs:["%s","%m"],shape:"reporter",category:"translate"},{id:"translate.viewerLanguage",spec:"language",shape:"reporter",category:"translate"},{id:"makeymakey.whenKeyPressed",spec:"when %1 key pressed",inputs:["%m"],shape:"hat",category:"makeymakey"},{id:"makeymakey.whenKeysPressedInOrder",spec:"when %1 pressed in order",inputs:["%m"],shape:"hat",category:"makeymakey"},{id:"boost.motorOnFor",spec:"turn motor %1 for %2 seconds",inputs:["%m","%n"],shape:"stack",category:"boost"},{id:"boost.motorOnForRotation",spec:"turn motor %1 for %2 rotations",inputs:["%m","%n"],shape:"stack",category:"boost"},{id:"boost.motorOn",spec:"turn motor %1 on",inputs:["%m"],shape:"stack",category:"boost"},{id:"boost.motorOff",spec:"turn motor %1 off",inputs:["%m"],shape:"stack",category:"boost"},{id:"boost.setMotorPower",spec:"set motor %1 speed to %2%",inputs:["%m","%n"],shape:"stack",category:"boost"},{id:"boost.setMotorDirection",spec:"set motor %1 direction %2",inputs:["%m","%m"],shape:"stack",category:"boost"},{id:"boost.getMotorPosition",spec:"motor %1 position",inputs:["%m"],shape:"reporter",category:"boost"},{id:"boost.whenColor",spec:"when %1 brick seen",inputs:["%m"],shape:"hat",category:"boost"},{id:"boost.seeingColor",spec:"seeing %1 brick?",inputs:["%m"],shape:"boolean",category:"boost"},{id:"boost.whenTilted",spec:"when tilted %1",inputs:["%m"],shape:"hat",category:"boost"},{id:"boost.getTiltAngle",spec:"tilt angle %1",inputs:["%m"],shape:"reporter",category:"boost"},{id:"boost.setLightHue",spec:"set light color to %1",inputs:["%n"],shape:"stack",category:"boost"},{id:"ev3.motorTurnClockwise",spec:"motor %1 turn this way for %2 seconds",inputs:["%m","%n"],shape:"stack",category:"ev3"},{id:"ev3.motorTurnCounterClockwise",spec:"motor %1 turn that way for %2 seconds",inputs:["%m","%n"],shape:"stack",category:"ev3"},{id:"ev3.motorSetPower",spec:"motor %1 set power %2%",inputs:["%m","%n"],shape:"stack",category:"ev3"},{id:"ev3.getMotorPosition",spec:"motor %1 position",inputs:["%m"],shape:"reporter",category:"ev3"},{id:"ev3.whenButtonPressed",spec:"when button %1 pressed",inputs:["%m"],shape:"hat",category:"ev3"},{id:"ev3.whenDistanceLessThan",spec:"when distance < %1",inputs:["%n"],shape:"hat",category:"ev3"},{id:"ev3.whenBrightnessLessThan",spec:"when brightness < %1",inputs:["%n"],shape:"hat",category:"ev3"},{id:"ev3.buttonPressed",spec:"button %1 pressed?",inputs:["%m"],shape:"boolean",category:"ev3"},{id:"ev3.getDistance",spec:"distance",shape:"reporter",category:"ev3"},{id:"ev3.getBrightness",spec:"brightness",shape:"reporter",category:"ev3"},{id:"ev3.beepNote",spec:"beep note %1 for %2 secs",inputs:["%d.note","%n"],shape:"stack",category:"ev3"},{id:"gdxfor.whenGesture",spec:"when %1",inputs:["%m"],shape:"hat",category:"gdxfor"},{id:"gdxfor.whenForcePushedOrPulled",spec:"when force sensor %1",inputs:["%m"],shape:"hat",category:"gdxfor"},{id:"gdxfor.getForce",spec:"force",shape:"reporter",category:"gdxfor"},{id:"gdxfor.whenTilted",spec:"when tilted %1",inputs:["%m"],shape:"hat",category:"gdxfor"},{id:"gdxfor.isTilted",spec:"tilted %1?",inputs:["%m"],shape:"boolean",category:"gdxfor"},{id:"gdxfor.getTilt",spec:"tilt angle %1",inputs:["%m"],shape:"reporter",category:"gdxfor"},{id:"gdxfor.isFreeFalling",spec:"falling?",shape:"boolean",category:"gdxfor"},{id:"gdxfor.getSpin",spec:"spin speed %1",inputs:["%m"],shape:"reporter",category:"gdxfor"},{id:"gdxfor.getAcceleration",spec:"acceleration %1",inputs:["%m"],shape:"reporter",category:"gdxfor"},{id:"microbit.whenButtonPressed",spec:"when %1 button pressed",inputs:["%m"],shape:"hat",category:"microbit"},{id:"microbit.isButtonPressed",spec:"%1 button pressed?",inputs:["%m"],shape:"boolean",category:"microbit"},{id:"microbit.whenGesture",spec:"when %1",inputs:["%m"],shape:"hat",category:"microbit"},{id:"microbit.displaySymbol",spec:"display %1",inputs:["%m"],shape:"stack",category:"microbit"},{id:"microbit.displayText",spec:"display text %1",inputs:["%s"],shape:"stack",category:"microbit"},{id:"microbit.clearDisplay",spec:"clear display",shape:"stack",category:"microbit"},{id:"microbit.whenTilted",spec:"when tilted %1",inputs:["%m"],shape:"hat",category:"microbit"},{id:"microbit.isTilted",spec:"tilted %1?",inputs:["%m"],shape:"boolean",category:"microbit"},{id:"microbit.tiltAngle",spec:"tilt angle %1",inputs:["%m"],shape:"reporter",category:"microbit"},{id:"microbit.whenPinConnected",spec:"when pin %1 connected",inputs:["%m"],shape:"hat",category:"microbit"}].map(function(e){var t=e.spec;if(!e.id){if(!e.selector)throw new Error("Missing ID: "+e.spec);e.id="sb2:"+e.selector}if(!e.spec)throw new Error("Missing spec: "+e.id);var s={id:e.id,spec:e.spec,parts:e.spec.split(z).filter(function(e){return!!e}),selector:e.selector||"sb3:"+e.id,inputs:null==e.inputs?[]:e.inputs,shape:e.shape,category:e.category,hasLoopArrow:!!e.hasLoopArrow};if(G[s.id])throw new Error("Duplicate ID: "+s.id);return G[s.id]=s,j[t]=s}),_={"@greenFlag":"\u2691","@turnRight":"\u21BB","@turnLeft":"\u21BA","@addInput":"\u25B8","@delInput":"\u25C2"},K={},W={aliases:{"turn left %1 degrees":"turn @turnLeft %1 degrees","turn ccw %1 degrees":"turn @turnLeft %1 degrees","turn right %1 degrees":"turn @turnRight %1 degrees","turn cw %1 degrees":"turn @turnRight %1 degrees","when gf clicked":"when @greenFlag clicked","when flag clicked":"when @greenFlag clicked","when green flag clicked":"when @greenFlag clicked"},renamedBlocks:{"say %1 for %2 secs":"LOOKS_SAYFORSECS","think %1 for %2 secs":"LOOKS_THINKFORSECS","play sound %1":"SOUND_PLAY","wait %1 secs":"CONTROL_WAIT",clear:"pen.clear"},definePrefix:["define"],defineSuffix:[],ignorelt:["when distance"],math:["abs","floor","ceiling","sqrt","sin","cos","tan","asin","acos","atan","ln","log","e ^","10 ^"],soundEffects:["pitch","pan left/right"],microbitWhen:["moved","shaken","jumped"],osis:["other scripts in sprite","other scripts in stage"],dropdowns:{},commands:{}};U.forEach(function(e){W.commands[e.spec]=e.spec}),d({en:W}),u("OPERATORS_MATHOP","SENSING_OF",function(e,t){var s=e[0];if(s.isInput){var o=s.value;return-1<t.math.indexOf(o)}}),u("SOUND_CHANGEEFFECTBY","LOOKS_CHANGEEFFECTBY",function(e,t){for(var s,o=0;o<e.length;o++)if(s=e[o],"dropdown"===s.shape){var a,n=s.value,r=c(t.soundEffects);try{for(r.s();!(a=r.n()).done;){var l=a.value;if(p(l)===p(n))return!0}}catch(e){r.e(e)}finally{r.f()}}return!1}),u("SOUND_SETEFFECTO","LOOKS_SETEFFECTTO",function(e,t){for(var s,o=0;o<e.length;o++)if(s=e[o],"dropdown"===s.shape){var a,n=s.value,r=c(t.soundEffects);try{for(r.s();!(a=r.n()).done;){var l=a.value;if(p(l)===p(n))return!0}}catch(e){r.e(e)}finally{r.f()}}return!1}),u("DATA_LENGTHOFLIST","OPERATORS_LENGTH",function(e){var t=e[e.length-1];return t.isInput?"dropdown"===t.shape:void 0}),u("DATA_LISTCONTAINSITEM","OPERATORS_CONTAINS",function(e){var t=e[0];return t.isInput?"dropdown"===t.shape:void 0}),u("pen.setColor","pen.setHue",function(e){var t=e[e.length-1];return t.isInput&&t.isColor||t.isBlock}),u("microbit.whenGesture","gdxfor.whenGesture",function(e,t){for(var s,o=0;o<e.length;o++)if(s=e[o],"dropdown"===s.shape){var a,n=s.value,r=c(t.microbitWhen);try{for(r.s();!(a=r.n()).done;){var l=a.value;if(p(l)===p(n))return!0}}catch(e){r.e(e)}finally{r.f()}}return!1}),u("ev3.buttonPressed","microbit.isButtonPressed",function(e){for(var t,s=0;s<e.length;s++)if(t=e[s],"dropdown"===t.shape)switch(p(t.value)){case"1":case"2":case"3":case"4":return!0;}return!1}),g("boost.whenTilted",function(){return G["microbit.whenTilted"]}),g("wedo2.whenTilted",function(){return G["microbit.whenTilted"]}),g("gdxfor.whenTilted",function(){return G["microbit.whenTilted"]}),g("wedo2.isTilted",function(){return G["microbit.isTilted"]}),g("gdxfor.isTilted",function(){return G["microbit.isTilted"]}),g("boost.getTiltAngle",function(){return G["microbit.tiltAngle"]}),g("wedo2.getTiltAngle",function(){return G["microbit.tiltAngle"]}),g("gdxfor.getTilt",function(){return G["microbit.tiltAngle"]}),g("makeymakey.whenKeyPressed",function(){return G.EVENT_WHENKEYPRESSED}),g("boost.getMotorPosition",function(){return G["ev3.getMotorPosition"]}),g("ev3.getDistance",function(){return G["wedo2.getDistance"]}),g("boost.setLightHue",function(){return G["wedo2.setLightHue"]}),g("CONTROL_STOP",function(e,t,o){var i=t[t.length-1];if(i.isInput){var a=i.value;if(-1<o.osis.indexOf(a))return s({},G.CONTROL_STOP,{shape:"stack"})}});var Z={loadLanguages:d,blockName:function(e){for(var t,s=[],o=0;o<e.children.length;o++){if(t=e.children[o],!t.isLabel)return;s.push(t.value)}return s.join(" ")},allLanguages:K,lookupDropdown:function(e,t){for(var s,o=0;o<t.length;o++)if(s=t[o],s.nativeDropdowns.hasOwnProperty(e)){var a=s.nativeDropdowns[e];return a}},hexColorPat:V,minifyHash:p,lookupHash:function(e,t,s,o){for(var a,n=0;n<o.length;n++)if(a=o[n],a.blocksByHash.hasOwnProperty(e)){var r=a.blocksByHash[e];if("reporter"===t.shape&&"reporter"!==r.shape&&"ring"!==r.shape)continue;if("boolean"===t.shape&&"boolean"!==r.shape)continue;return r.specialCase&&(r=r.specialCase(t,s,a)||r),{type:r,lang:a}}},applyOverrides:function(e,t){for(var s,o=0;o<t.length;o++)s=t[o],V.test(s)?(e.color=s,e.category="",e.categoryIsDefault=!1):-1<B.indexOf(s)?(e.category=s,e.categoryIsDefault=!1):-1<D.indexOf(s)?e.shape=s:"loop"===s?e.hasLoopArrow=!0:("+"===s||"-"===s)&&(e.diff=s)},rtlLanguages:["ar","ckb","fa","he"],iconPat:H,hashSpec:l,parseSpec:function(e){var t=e.split(z).filter(function(e){return!!e}),s=t.filter(function(e){return P.test(e)});return{spec:e,parts:t,inputs:s,hash:l(e)}},parseInputNumber:function(e){var t=/\%([0-9]+)/.exec(e);return t?+t[1]:0},inputPat:P,unicodeIcons:_,english:W,blocksById:G},X=Z.blocksById,Y=Z.parseSpec,Q=Z.inputPat,q=Z.parseInputNumber,J=Z.iconPat,$=Z.rtlLanguages,ee=Z.unicodeIcons,te=function(e,t){this.value=e,this.cls=t||"",this.el=null,this.height=12,this.metrics=null,this.x=0};te.prototype.isLabel=!0,te.prototype.stringify=function(){return"<"===this.value||">"===this.value?this.value:this.value.replace(/([<>[\](){}])/g,"\\$1")};var se=function e(t){this.name=t,this.isArrow="loopArrow"===t,f(e.icons[t],"no info for icon "+t)};se.prototype.isIcon=!0,se.icons={greenFlag:!0,turnLeft:!0,turnRight:!0,loopArrow:!0,addInput:!0,delInput:!0},se.prototype.stringify=function(){return ee["@"+this.name]||""};var oe=function(e,t,s){this.shape=e,this.value=t,this.menu=s||null,this.isRound="number"===e||"number-dropdown"===e,this.isBoolean="boolean"===e,this.isStack="stack"===e,this.isInset="boolean"===e||"stack"===e||"reporter"===e,this.isColor="color"===e,this.hasArrow="dropdown"===e||"number-dropdown"===e,this.isDarker="boolean"===e||"stack"===e||"dropdown"===e,this.isSquare="string"===e||"color"===e||"dropdown"===e,this.hasLabel=!(this.isColor||this.isInset),this.label=this.hasLabel?new te(t,"literal-"+this.shape):null,this.x=0};oe.prototype.isInput=!0,oe.prototype.stringify=function(){if(this.isColor)return f("#"===this.value[0]),"["+this.value+"]";var e=(this.value?""+this.value:"").replace(/ v$/," \\v").replace(/([\]\\])/g,"\\$1");return this.hasArrow&&(e+=" v"),this.isRound?"("+e+")":this.isSquare?"["+e+"]":this.isBoolean?"<>":this.isStack?"{}":e},oe.prototype.translate=function(){if(this.hasArrow){var e=this.menu||this.value;this.value=e,this.label=new te(this.value,"literal-"+this.shape)}};var ie=function(e,t,o){f(e),this.info=s({},e),this.children=t,this.comment=o||null,this.diff=null;var i=this.info.shape;this.isHat="hat"===i||"cat"===i||"define-hat"===i,this.hasPuzzle="stack"===i||"hat"===i||"cat"===i,this.isFinal=/cap/.test(i),this.isCommand="stack"===i||"cap"===i||/block/.test(i),this.isOutline="outline"===i,this.isReporter="reporter"===i,this.isBoolean="boolean"===i,this.isRing="ring"===i,this.hasScript=/block/.test(i),this.isElse="celse"===i,this.isEnd="cend"===i};ie.prototype.isBlock=!0,ie.prototype.stringify=function(e){var t=null,s=!1,o=this.children.map(function(e){return e.isIcon&&(s=!0),t||e.isLabel||e.isIcon||(t=e),e.isScript?"\n"+m(e.stringify())+"\n":e.stringify().trim()+" "}).join("").trim(),i=this.info.language;if(s&&i&&this.info.selector){var a=X[this.info.id],n=a.spec,r=i.nativeAliases[a.spec];if(r)return Q.test(r)&&t&&(r=r.replace(Q,t.stringify())),r}var c=e||"";return(!1===this.info.categoryIsDefault||"custom-arg"===this.info.category&&(this.isReporter||this.isBoolean)||"custom"===this.info.category&&"stack"===this.info.shape)&&(c&&(c+=" "),c+=this.info.category),c&&(o+=" :: "+c),this.hasScript?o+"\nend":"reporter"===this.info.shape?"("+o+")":"boolean"===this.info.shape?"<"+o+">":o},ie.prototype.translate=function(e,t){var s=this;if(!e)throw new Error("Missing language");var o=this.info.id;if(o){if("PROCEDURES_DEFINITION"===o){var i=this.children.find(function(e){return e.isOutline});this.children=[];var a,n=c(e.definePrefix);try{for(n.s();!(a=n.n()).done;){var r=a.value;this.children.push(new te(r))}}catch(e){n.e(e)}finally{n.f()}this.children.push(i);var l,p=c(e.defineSuffix);try{for(p.s();!(l=p.n()).done;){var h=l.value;this.children.push(new te(h))}}catch(e){p.e(e)}finally{p.f()}return}var d=X[o],g=this.info.language.commands[d.spec],u=e.commands[d.spec];if(u){var f=Y(u),m=this.children.filter(function(e){return!e.isLabel&&!e.isIcon});t||m.forEach(function(t){t.translate(e)});var y=Y(g).parts,b=y.map(function(e){return q(e)}).filter(function(e){return!!e}),k=0,w=b.map(function(e){return k=R(k,e),m[e-1]}),A=m.slice(k);this.children=f.parts.map(function(e){var e=e.trim();if(e){var t=q(e);return t?w[t-1]:J.test(e)?new se(e.slice(1)):new te(e)}}).filter(function(e){return!!e}),A.forEach(function(t,o){1===o&&"CONTROL_IF"===s.info.id&&s.children.push(new te(e.commands["else"])),s.children.push(t)}),this.info.language=e,this.info.isRTL=-1<$.indexOf(e.code),this.info.categoryIsDefault=!0}}};var ae=function(e,t){this.label=new te(e,"comment-label"),this.width=null,this.hasBlock=t};ae.prototype.isComment=!0,ae.prototype.stringify=function(){return"// "+this.label.value};var ne=function(e){f(e),this.child=e,e.isBlock?(this.shape=e.info.shape,this.info=e.info):this.shape="stack"};ne.prototype.isGlow=!0,ne.prototype.stringify=function(){if(this.child.isBlock)return this.child.stringify("+");var e=this.child.stringify().split("\n");return e.map(function(e){return"+ "+e}).join("\n")},ne.prototype.translate=function(e){this.child.translate(e)};var re=function(e){this.blocks=e,this.isEmpty=!e.length,this.isFinal=!this.isEmpty&&e[e.length-1].isFinal};re.prototype.isScript=!0,re.prototype.stringify=function(){return this.blocks.map(function(e){var t=e.stringify();return e.comment&&(t+=" "+e.comment.stringify()),t}).join("\n")},re.prototype.translate=function(e){this.blocks.forEach(function(t){t.translate(e)})};var ce=function(e){this.scripts=e};ce.prototype.stringify=function(){return this.scripts.map(function(e){return e.stringify()}).join("\n\n")},ce.prototype.translate=function(e){this.scripts.forEach(function(t){t.translate(e)})};var le={Label:te,Icon:se,Input:oe,Block:ie,Comment:ae,Glow:ne,Script:re,Document:ce},pe=le.Label,he=le.Icon,de=le.Input,ge=le.Block,ue=le.Comment,fe=le.Glow,me=le.Script,ye=le.Document,be=Z.allLanguages,ke=Z.lookupDropdown,we=Z.hexColorPat,Ae=Z.minifyHash,Se=Z.lookupHash,Le=Z.hashSpec,ve=Z.applyOverrides,Oe=Z.rtlLanguages,Ee=Z.iconPat,Te=Z.blockName,Re={"append:toList:":1,"deleteLine:ofList:":1,"insert:at:ofList:":2,"setLine:ofList:to:":1,"showList:":0,"hideList:":0},Ce={parse:O}.parse,Ie=le.Label,Ne=le.Icon,xe=le.Input,Me=le.Block,Be=le.Comment,De=le.Glow,Pe=le.Script,Fe=le.Document,He=Z.allLanguages,ze=Z.loadLanguages,Ve=N.extensions,Ge=N.movedExtensions,je=N.aliasExtensions,Ue={allLanguages:He,loadLanguages:ze,parse:Ce,Label:Ie,Icon:Ne,Input:xe,Block:Me,Comment:Be,Glow:De,Script:Pe,Document:Fe,extensions:Ve,movedExtensions:Ge,aliasExtensions:je},_e=e(function(e){function t(e,t){return s({},e,t)}function o(e,t){if(!e)throw"Assertion failed! "+(t||"")}var i,a,n={textContent:!0},c=e.exports={init:function(e){i=e.document;var t=e.DOMParser;a=new t().parseFromString("<xml></xml>","application/xml"),c.XMLSerializer=e.XMLSerializer},makeCanvas:function(){return i.createElement("canvas")},cdata:function(e){return a.createCDATASection(e)},el:function e(t,s){var e=i.createElementNS("http://www.w3.org/2000/svg",t);return c.setProps(e,s)},setProps:function(e,t){for(var s in t){var o=""+t[s];n[s]?e[s]=o:null!==t[s]&&t.hasOwnProperty(s)&&e.setAttributeNS(null,s,o)}return e},withChildren:function(e,t){for(var s=0;s<t.length;s++)e.appendChild(t[s]);return e},group:function(e){return c.withChildren(c.el("g"),e)},newSVG:function(e,t){return c.el("svg",{version:"1.1",width:e,height:t,viewBox:"0 0 ".concat(e," ").concat(t)})},polygon:function(e){return c.el("polygon",t(e,{points:e.points.join(" ")}))},path:function(e){return c.el("path",t(e,{path:null,d:e.path.join(" ")}))},text:function e(s,o,i,a){var e=c.el("text",t(a,{x:s,y:o,textContent:i}));return e},symbol:function(e){return c.el("use",{href:e})},move:function(e,t,s){return c.setProps(s,{transform:["translate(",e," ",t,")"].join("")}),s},translatePath:function(e,t,s){for(var a,n=!0,r=s.split(" "),c=[],l=0;l<r.length;l++){if(a=r[l],"A"===a){var p=l+5;for(c.push("A");l<p;)c.push(r[++l]);continue}else /[A-Za-z]/.test(a)?o(n):(a=+a,a+=n?e:t,n=!n);c.push(a)}return c.join(" ")},rect:function(e,s,o){return c.el("rect",t(o,{x:0,y:0,width:e,height:s}))},ellipse:function(e,s,o){return c.el("ellipse",t(o,{cx:e/2,cy:s/2,rx:e/2,ry:s/2}))},arc:function(e,t,s,o,i,a){return["L",e,t,"A",i,a,0,0,1,s,o].join(" ")},arcw:function(e,t,s,o,i,a){return["L",e,t,"A",i,a,0,0,0,s,o].join(" ")},roundedPath:function(e,t){var s=t/2;return["M",s,0,c.arc(e-s,0,e-s,t,s,s),c.arc(s,t,s,0,s,s),"Z"]},roundedRect:function(e,s,o){return c.path(t(o,{path:c.roundedPath(e,s)}))},pointedPath:function(e,t){var s=t/2;return["M",s,0,"L",e-s,0,e,s,"L",e,s,e-s,t,"L",s,t,0,s,"L",0,s,s,0,"Z"]},pointedRect:function(e,s,o){return c.path(t(o,{path:c.pointedPath(e,s)}))},getTop:function(e){return["M",0,3,"L",3,0,"L",13,0,"L",16,3,"L",24,3,"L",27,0,"L",e-3,0,"L",e,3].join(" ")},getRingTop:function(e){return["M",0,3,"L",3,0,"L",7,0,"L",10,3,"L",16,3,"L",19,0,"L",e-3,0,"L",e,3].join(" ")},getRightAndBottom:function(e,t,s,o){"undefined"==typeof o&&(o=0);var i=["L",e,t-3,"L",e-3,t];return s&&(i=i.concat(["L",o+27,t,"L",o+24,t+3,"L",o+16,t+3,"L",o+13,t])),i=0<o?i.concat(["L",o+2,t,"L",o,t+2]):i.concat(["L",o+3,t,"L",0,t-3]),i.join(" ")},getArm:function(e,t){return["L",15,t-2,"L",17,t,"L",e-3,t,"L",e,t+3].join(" ")},stackRect:function(e,s,o){return c.path(t(o,{path:[c.getTop(e),c.getRightAndBottom(e,s,!0,0),"Z"]}))},capPath:function(e,t){return[c.getTop(e),c.getRightAndBottom(e,t,!1,0),"Z"]},capRect:function(e,s,o){return c.path(t(o,{path:c.capPath(e,s)}))},hatRect:function(e,s,o){return c.path(t(o,{path:["M",0,12,c.arc(0,12,80,10,80,80),"L",e-3,10,"L",e,13,c.getRightAndBottom(e,s,!0),"Z"]}))},curve:function(e,t,s,o,i){var a=Math.round,i=i||.42,n=a((e+s)/2+i*(o-t)),r=a((t+o)/2-i*(s-e));return[n,r,s,o].join(" ")},procHatBase:function(e,s,o,i){var o=T(.2,35/e);return c.path(t(i,{path:["M",0,15,"Q",c.curve(0,15,e,15,o),c.getRightAndBottom(e,s,!0),"M",-1,13,"Q",c.curve(-1,13,e+1,13,o),"Q",c.curve(e+1,13,e,16,.6),"Q",c.curve(e,16,0,16,-o),"Q",c.curve(0,16,-1,13,.6),"Z"]}))},procHatCap:function(e,t,s){return c.path({path:["M",-1,13,"Q",c.curve(-1,13,e+1,13,s),"Q",c.curve(e+1,13,e,16,.6),"Q",c.curve(e,16,0,16,-s),"Q",c.curve(0,16,-1,13,.6),"Z"],class:"sb-define-hat-cap"})},procHatRect:function(e,t,s){var o=T(.2,35/e);return c.move(0,t-52,c.group([c.procHatBase(e,52,o,s),c.procHatCap(e,52,o)]))},mouthRect:function(e,s,o,a,n){for(var r,l=a[0].height,h=[c.getTop(e),c.getRightAndBottom(e,l,!0,15)],p=1;p<a.length;p+=2){r=p+2===a.length,l+=a[p].height-3,h.push(c.getArm(e,l));var d=!(r&&o),g=r?0:15;l+=a[p+1].height+3,h.push(c.getRightAndBottom(e,l,d,g))}return c.path(t(n,{path:h}))},ringRect:function(e,s,o,i,a,n,r){var l="reporter"===n?c.roundedPath:"boolean"===n?c.pointedPath:c.capPath;return c.path(t(r,{path:["M",8,0,c.arcw(8,0,0,8,8,8),c.arcw(0,s-8,8,s,8,8),c.arcw(e-8,s,e,s-8,8,8),c.arcw(e,8,e-8,0,8,8),"Z",c.translatePath(4,o||4,l(i,a).join(" "))],"fill-rule":"even-odd"}))},commentRect:function(e,s,o){return c.path(t(o,{class:"sb-comment",path:["M",6,0,c.arc(e-6,0,e,6,6,6),c.arc(e,s-6,e-6,s,6,6),c.arc(6,s,0,s-6,6,6),c.arc(0,6,6,0,6,6),"Z"]}))},commentLine:function(e,s){return c.move(-e,9,c.rect(e,2,t(s,{class:"sb-comment-line"})))},strikethroughLine:function(e,s){return c.path(t(s,{path:["M",0,0,"L",e,0],class:"sb-diff sb-diff-del"}))}}}),Ke=_e.init,We=_e.makeCanvas,Ze=_e.cdata,Xe=_e.el,Ye=_e.setProps,Qe=_e.withChildren,qe=_e.group,Je=_e.newSVG,$e=_e.polygon,et=_e.path,tt=_e.text,st=_e.symbol,ot=_e.move,it=_e.translatePath,at=_e.rect,nt=_e.ellipse,rt=_e.arc,ct=_e.arcw,lt=_e.roundedPath,pt=_e.roundedRect,ht=_e.pointedPath,dt=_e.pointedRect,gt=_e.getTop,ut=_e.getRingTop,ft=_e.getRightAndBottom,mt=_e.getArm,yt=_e.stackRect,bt=_e.capPath,kt=_e.capRect,wt=_e.hatRect,At=_e.curve,St=_e.procHatBase,Lt=_e.procHatCap,vt=_e.procHatRect,Ot=_e.mouthRect,Et=_e.ringRect,Tt=_e.commentRect,Rt=_e.commentLine,Ct=_e.strikethroughLine,It=function(e,t){this.el=_e.el("filter",E(t,{id:e,x0:"-50%",y0:"-50%",width:"200%",height:"200%"})),this.highestId=0};It.prototype.fe=function(e,t,s){var o=e.toLowerCase().replace(/gaussian|osite/,""),i=[o,"-",++this.highestId].join("");return this.el.appendChild(_e.withChildren(_e.el("fe"+e,E(t,{result:i})),s||[])),i},It.prototype.comp=function(e,t,s,o){return this.fe("Composite",E(o,{operator:e,in:t,in2:s}))},It.prototype.subtract=function(e,t){return this.comp("arithmetic",e,t,{k2:1,k3:-1})},It.prototype.offset=function(e,t,s){return this.fe("Offset",{in:s,dx:e,dy:t})},It.prototype.flood=function(e,t,s){return this.fe("Flood",{in:s,"flood-color":e,"flood-opacity":t})},It.prototype.blur=function(e,t){return this.fe("GaussianBlur",{in:t,stdDeviation:[e,e].join(" ")})},It.prototype.colorMatrix=function(e,t){return this.fe("ColorMatrix",{in:e,type:"matrix",values:t.join(" ")})},It.prototype.merge=function(e){this.fe("Merge",{},e.map(function(e){return _e.el("feMergeNode",{in:e})}))};var Nt=It,xt=e(function(e){var t=e.exports={cssContent:"\n    .sb-label {\n      font-family: Lucida Grande, Verdana, Arial, DejaVu Sans, sans-serif;\n      font-weight: bold;\n      fill: #fff;\n      font-size: 10px;\n      word-spacing: +1px;\n    }\n\n    .sb-obsolete { fill: #d42828; }\n    .sb-motion { fill: #4a6cd4; }\n    .sb-looks { fill: #8a55d7; }\n    .sb-sound { fill: #bb42c3; }\n    .sb-pen { fill: #0e9a6c;  }\n    .sb-events { fill: #c88330; }\n    .sb-control { fill: #e1a91a; }\n    .sb-sensing { fill: #2ca5e2; }\n    .sb-operators { fill: #5cb712; }\n    .sb-variables { fill: #ee7d16; }\n    .sb-list { fill: #cc5b22 }\n    .sb-custom { fill: #632d99; }\n    .sb-custom-arg { fill: #5947b1; }\n    .sb-extension { fill: #4b4a60; }\n    .sb-grey { fill: #969696; }\n\n    .sb-bevel {\n      filter: url(#bevelFilter);\n    }\n\n    .sb-input {\n      filter: url(#inputBevelFilter);\n    }\n    .sb-input-number,\n    .sb-input-string,\n    .sb-input-number-dropdown {\n      fill: #fff;\n    }\n    .sb-literal-number,\n    .sb-literal-string,\n    .sb-literal-number-dropdown,\n    .sb-literal-dropdown {\n      font-weight: normal;\n      font-size: 9px;\n      word-spacing: 0;\n    }\n    .sb-literal-number,\n    .sb-literal-string,\n    .sb-literal-number-dropdown {\n      fill: #000;\n    }\n\n    .sb-darker {\n      filter: url(#inputDarkFilter);\n    }\n\n    .sb-outline {\n      stroke: #fff;\n      stroke-opacity: 0.2;\n      stroke-width: 2;\n      fill: none;\n    }\n\n    .sb-define-hat-cap {\n      stroke: #632d99;\n      stroke-width: 1;\n      fill: #8e2ec2;\n    }\n\n    .sb-comment {\n      fill: #ffffa5;\n      stroke: #d0d1d2;\n      stroke-width: 1;\n    }\n    .sb-comment-line {\n      fill: #ffff80;\n    }\n    .sb-comment-label {\n      font-family: Helevetica, Arial, DejaVu Sans, sans-serif;\n      font-weight: bold;\n      fill: #5c5d5f;\n      word-spacing: 0;\n      font-size: 12px;\n    }\n\n    .sb-diff {\n      fill: none;\n      stroke: #000;\n    }\n    .sb-diff-ins {\n      stroke-width: 2px;\n    }\n    .sb-diff-del {\n      stroke-width: 3px;\n    }\n  ".replace(/[ \n]+/," "),makeIcons:function(){return[_e.el("path",{d:"M1.504 21L0 19.493 4.567 0h1.948l-.5 2.418s1.002-.502 3.006 0c2.006.503 3.008 2.01 6.517 2.01 3.508 0 4.463-.545 4.463-.545l-.823 9.892s-2.137 1.005-5.144.696c-3.007-.307-3.007-2.007-6.014-2.51-3.008-.502-4.512.503-4.512.503L1.504 21z",fill:"#3f8d15",id:"greenFlag"}),_e.el("path",{d:"M6.724 0C3.01 0 0 2.91 0 6.5c0 2.316 1.253 4.35 3.14 5.5H5.17v-1.256C3.364 10.126 2.07 8.46 2.07 6.5 2.07 4.015 4.152 2 6.723 2c1.14 0 2.184.396 2.993 1.053L8.31 4.13c-.45.344-.398.826.11 1.08L15 8.5 13.858.992c-.083-.547-.514-.714-.963-.37l-1.532 1.172A6.825 6.825 0 0 0 6.723 0z",fill:"#fff",id:"turnRight"}),_e.el("path",{d:"M3.637 1.794A6.825 6.825 0 0 1 8.277 0C11.99 0 15 2.91 15 6.5c0 2.316-1.253 4.35-3.14 5.5H9.83v-1.256c1.808-.618 3.103-2.285 3.103-4.244 0-2.485-2.083-4.5-4.654-4.5-1.14 0-2.184.396-2.993 1.053L6.69 4.13c.45.344.398.826-.11 1.08L0 8.5 1.142.992c.083-.547.514-.714.963-.37l1.532 1.172z",fill:"#fff",id:"turnLeft"}),_e.el("path",{d:"M0 0L4 4L0 8Z",fill:"#111",id:"addInput"}),_e.el("path",{d:"M4 0L4 8L0 4Z",fill:"#111",id:"delInput"}),_e.setProps(_e.group([_e.el("path",{d:"M8 0l2 -2l0 -3l3 0l-4 -5l-4 5l3 0l0 3l-8 0l0 2",fill:"#000",opacity:"0.3"}),_e.move(-1,-1,_e.el("path",{d:"M8 0l2 -2l0 -3l3 0l-4 -5l-4 5l3 0l0 3l-8 0l0 2",fill:"#fff",opacity:"0.9"}))]),{id:"loopArrow"})]},makeStyle:function(){var e=_e.el("style");return e.appendChild(_e.cdata(t.cssContent)),e},bevelFilter:function(e,t){var o=new Nt(e),i="SourceAlpha",a=t?-1:1,s=o.blur(1,i);return o.merge(["SourceGraphic",o.comp("in",o.flood("#fff",.15),o.subtract(i,o.offset(+a,+a,s))),o.comp("in",o.flood("#000",.7),o.subtract(i,o.offset(-a,-a,s)))]),o.el},darkFilter:function(e){var t=new Nt(e);return t.merge(["SourceGraphic",t.comp("in",t.flood("#000",.2),"SourceAlpha")]),t.el},darkRect:function(e,t,s,o){return _e.setProps(_e.group([_e.setProps(o,{class:["sb-"+s,"sb-darker"].join(" ")})]),{width:e,height:t})},defaultFontFamily:"Lucida Grande, Verdana, Arial, DejaVu Sans, sans-serif"}}),Mt=xt.cssContent,Bt=xt.makeIcons,Dt=xt.makeStyle,Pt=xt.bevelFilter,Ft=xt.darkFilter,Ht=xt.darkRect,zt=xt.defaultFontFamily,Vt=Ue.Label,Gt=Ue.Icon,jt=Ue.Input,Ut=Ue.Block,_t=Ue.Comment,Kt=Ue.Glow,Wt=Ue.Script,Zt=Ue.Document,Xt=Ue.extensions,Yt=Ue.movedExtensions,Qt=Ue.aliasExtensions,qt=xt.defaultFontFamily,Jt=xt.makeStyle,$t=xt.makeIcons,es=xt.darkRect,ts=xt.bevelFilter,ss=xt.darkFilter,os=function(e){s(this,e),this.el=null,this.height=12,this.metrics=null,this.x=0};os.prototype.isLabel=!0,os.prototype.draw=function(){return this.el},Object.defineProperty(os.prototype,"width",{get:function(){return this.metrics.width}}),os.metricsCache={},os.toMeasure=[],os.prototype.measure=function(){var e=this.value,t="sb-"+this.cls;this.el=_e.text(0,10,e,{class:"sb-label "+t});var s=os.metricsCache[t];if(s||(s=os.metricsCache[t]=Object.create(null)),Object.hasOwnProperty.call(s,e))this.metrics=s[e];else{var o=/comment-label/.test(this.cls)?"bold 12px Helevetica, Arial, DejaVu Sans, sans-serif":/literal/.test(this.cls)?"normal 9px "+qt:"bold 10px "+qt;this.metrics=s[e]=os.measure(e,o)}},os.measure=function(e,t){var s=os.measuring;s.font=t;var o=s.measureText(e),i=0|o.width+.5;return{width:i}};var is=function e(t){s(this,t);var o=e.icons[this.name];if(!o)throw new Error("no info for icon: "+this.name);s(this,o)};is.prototype.isIcon=!0,is.prototype.draw=function(){return _e.symbol("#"+this.name,{width:this.width,height:this.height})},is.icons={greenFlag:{width:20,height:21,dy:-2},turnLeft:{width:15,height:12,dy:1},turnRight:{width:15,height:12,dy:1},loopArrow:{width:14,height:11},addInput:{width:4,height:8},delInput:{width:4,height:8}};var as=function(e){s(this,e),e.label&&(this.label=ds(e.label)),this.x=0};as.prototype.measure=function(){this.hasLabel&&this.label.measure()},as.shapes={string:_e.rect,number:_e.roundedRect,"number-dropdown":_e.roundedRect,color:_e.rect,dropdown:_e.rect,boolean:_e.pointedRect,stack:_e.stackRect,reporter:_e.roundedRect},as.prototype.draw=function(e){if(this.hasLabel)var t=this.label.draw(),s=R(14,this.label.width+("string"===this.shape||"number-dropdown"===this.shape?6:9));else var s=this.isInset?30:this.isColor?13:null;this.hasArrow&&(s+=10),this.width=s;var o=this.height=this.isRound||this.isColor?13:14,i=as.shapes[this.shape](s,o);this.isColor?_e.setProps(i,{fill:this.value}):this.isDarker&&(i=es(s,o,e.info.category,i),e.info.color&&_e.setProps(i,{fill:e.info.color}));var a=_e.group([_e.setProps(i,{class:["sb-input","sb-input-"+this.shape].join(" ")})]);if(this.hasLabel){var n=this.isRound?5:4;a.appendChild(_e.move(n,0,t))}if(this.hasArrow){var r="dropdown"===this.shape?5:4;a.appendChild(_e.move(s-10,r,_e.polygon({points:[7,0,3.5,4,0,0],fill:"#000",opacity:"0.6"})))}return a};var ns=function(e){s(this,e),this.children=e.children.map(ds),this.comment=this.comment?ds(this.comment):null,Qt.hasOwnProperty(this.info.category)&&(this.info.category=Qt[this.info.category]),Yt.hasOwnProperty(this.info.category)?this.info.category=Yt[this.info.category]:Xt.hasOwnProperty(this.info.category)&&(this.info.category="extension"),this.x=0,this.width=null,this.height=null,this.firstLine=null,this.innerWidth=null};ns.prototype.isBlock=!0,ns.prototype.measure=function(){for(var e,t=0;t<this.children.length;t++)e=this.children[t],e.measure&&e.measure();this.comment&&this.comment.measure()},ns.shapes={stack:_e.stackRect,"c-block":_e.stackRect,"if-block":_e.stackRect,celse:_e.stackRect,cend:_e.stackRect,cap:_e.capRect,reporter:_e.roundedRect,boolean:_e.pointedRect,hat:_e.hatRect,cat:_e.hatRect,"define-hat":_e.procHatRect,ring:_e.roundedRect},ns.prototype.drawSelf=function(e,t,s){if(1<s.length)return _e.mouthRect(e,t,this.isFinal,s,{class:["sb-"+this.info.category,"sb-bevel"].join(" ")});if("outline"===this.info.shape)return _e.setProps(_e.stackRect(e,t),{class:"sb-outline"});if(this.isRing){var o=this.children[0];if(o&&(o.isStack||o.isBlock||o.isScript)){var i=o.isScript?"stack":o.isStack?o.shape:o.info.shape;return _e.ringRect(e,t,o.y,o.width,o.height,i,{class:["sb-"+this.info.category,"sb-bevel"].join(" ")})}}var a=ns.shapes[this.info.shape];if(!a)throw new Error("no shape func: "+this.info.shape);return a(e,t,{class:["sb-"+this.info.category,"sb-bevel"].join(" ")})},ns.prototype.minDistance=function(e){return this.isBoolean?e.isReporter?0|4+e.height/4:e.isLabel?0|5+e.height/2:e.isBoolean||"boolean"===e.shape?5:0|2+e.height/2:this.isReporter?e.isInput&&e.isRound||(e.isReporter||e.isBoolean)&&!e.hasScript?0:e.isLabel?0|2+e.height/2:0|-2+e.height/2:0},ns.padding={hat:[15,6,2],cat:[15,6,2],"define-hat":[21,8,9],reporter:[3,4,1],boolean:[3,4,2],cap:[6,6,2],"c-block":[3,6,2],"if-block":[3,6,2],ring:[4,4,2],null:[4,6,2]},ns.prototype.draw=function(){function e(e){0===w.length?u.height+=a+r:(u.height+=e?0:2,u.y-=1),c+=u.height,w.push(u)}var t="define-hat"===this.info.shape,s=this.children,o=ns.padding[this.info.shape]||ns.padding[null],a=o[0],n=o[1],r=o[2],c=0,l=function(e){this.y=e,this.width=0,this.height=e?13:16,this.children=[]},d=0,g=0,u=new l(c);if(this.info.isRTL){for(var f=0,m=function(){s=s.slice(0,f).concat(s.slice(f,b).reverse()).concat(s.slice(b))}.bind(this),b=0;b<s.length;b++)s[b].isScript&&(m(),f=b+1);f<b&&m()}for(var k,w=[],b=0;b<s.length;b++)if(k=s[b],k.el=k.draw(this),k.isScript&&this.isCommand)this.hasScript=!0,e(),k.y=c,w.push(k),g=R(g,R(1,k.width)),k.height=R(12,k.height)+3,c+=k.height,u=new l(c);else if(k.isArrow)u.children.push(k);else{var A=0<b?30:0,S=this.isCommand?0:this.minDistance(k),L=this.isCommand?k.isBlock||k.isInput?A:0:S;L&&!w.length&&u.width<L-n&&(u.width=L-n),k.x=u.width,u.width+=k.width,d=R(d,u.width+R(0,S-n)),u.width+=4,k.isLabel||(u.height=R(u.height,k.height)),u.children.push(k)}if(e(!0),d=R(d+2*n,this.isHat||this.hasScript?83:this.isCommand||this.isOutline||this.isRing?39:20),this.height=c,this.width=g?R(d,15+g):d,t){var v=T(26,0|3.5+.13*d)-18;this.height+=v,a+=2*v}this.firstLine=w[0],this.innerWidth=d;for(var u,p=[],b=0;b<w.length;b++){if(u=w[b],u.isScript){p.push(_e.move(15,u.y,u.el));continue}for(var k,O=u.height,h=0;h<u.children.length;h++){if(k=u.children[h],k.isArrow){p.push(_e.move(d-15,this.height-3,k.el));continue}var c=a+(O-k.height-a-r)/2-1;if((t&&k.isLabel?c+=3:k.isIcon&&(c+=0|k.dy),!(this.isRing&&(k.y=0|u.y+c,k.isInset)))&&(p.push(_e.move(n+k.x,0|u.y+c,k.el)),"+"===k.diff)){var E=_e.insEllipse(k.width,k.height);p.push(_e.move(n+k.x,0|u.y+c,E))}}}var C=this.drawSelf(d,this.height,w);return p.splice(0,0,C),this.info.color&&_e.setProps(C,{fill:this.info.color}),_e.group(p)};var rs=function(e){s(this,e),this.label=ds(e.label),this.width=null};rs.prototype.isComment=!0,rs.lineLength=12,rs.prototype.height=20,rs.prototype.measure=function(){this.label.measure()},rs.prototype.draw=function(){var e=this.label.draw();return this.width=this.label.width+16,_e.group([_e.commentLine(this.hasBlock?rs.lineLength:0,6),_e.commentRect(this.width,this.height,{class:"sb-comment"}),_e.move(8,4,e)])};var cs=function(e){s(this,e),this.child=ds(e.child),this.width=null,this.height=null,this.y=0};cs.prototype.isGlow=!0,cs.prototype.measure=function(){this.child.measure()},cs.prototype.drawSelf=function(){var e,t=this.child,s=this.width,o=this.height-1;if(t.isScript)e=!t.isEmpty&&t.blocks[0].isHat?_e.hatRect(s,o):t.isFinal?_e.capRect(s,o):_e.stackRect(s,o);else var e=t.drawSelf(s,o,[]);return _e.setProps(e,{class:"sb-diff sb-diff-ins"})},cs.prototype.draw=function(){var e=this.child,t=e.isScript?e.draw(!0):e.draw();return this.width=e.width,this.height=e.isBlock&&e.firstLine.height||e.height,_e.group([t,this.drawSelf()])};var ls=function(e){s(this,e),this.blocks=e.blocks.map(ds),this.y=0};ls.prototype.isScript=!0,ls.prototype.measure=function(){for(var e=0;e<this.blocks.length;e++)this.blocks[e].measure()},ls.prototype.draw=function(e){var t=[],s=0;this.width=0;for(var o=0;o<this.blocks.length;o++){var a=this.blocks[o],n=e?0:2,r=a.draw();t.push(_e.move(n,s,r)),this.width=R(this.width,a.width);var c=a.diff;if("-"===c){var l=a.width,p=a.firstLine.height||a.height;t.push(_e.move(n,s+p/2+1,_e.strikethroughLine(l))),this.width=R(this.width,a.width)}s+=a.height;var h=a.comment;if(h){var d=a.firstLine,g=a.innerWidth+2+rs.lineLength,u=s-a.height+d.height/2,f=h.draw();t.push(_e.move(g,u-h.height/2,f)),this.width=R(this.width,g+h.width)}}return this.height=s,e||this.isFinal||(this.height+=3),!e&&a.isGlow&&(this.height+=2),_e.group(t)};var ps=function(e){s(this,e),this.scripts=e.scripts.map(ds),this.width=null,this.height=null,this.el=null,this.defs=null};ps.prototype.measure=function(){this.scripts.forEach(function(e){e.measure()})},ps.prototype.render=function(){if("function"==typeof ocbptions)throw new Error("render() no longer takes a callback");this.measure();for(var e,t=0,s=0,o=[],a=0;a<this.scripts.length;a++)e=this.scripts[a],s&&(s+=10),e.y=s,o.push(_e.move(0,s,e.draw())),s+=e.height,t=R(t,e.width+4);this.width=t,this.height=s;var n=_e.newSVG(t,s);return n.appendChild(this.defs=_e.withChildren(_e.el("defs"),[ts("bevelFilter",!1),ts("inputBevelFilter",!0),ss("inputDarkFilter")].concat($t()))),n.appendChild(_e.group(o)),this.el=n,n},ps.prototype.exportSVGString=function(){if(null==this.el)throw new Error("call draw() first");var e=Jt();this.defs.appendChild(e);var t=new _e.XMLSerializer().serializeToString(this.el);return this.defs.removeChild(e),t},ps.prototype.exportSVG=function(){var e=this.exportSVGString();return"data:image/svg+xml;utf8,"+e.replace(/[#]/g,encodeURIComponent)},ps.prototype.toCanvas=function(e,t){t=t||1;var s=_e.makeCanvas();s.width=this.width*t,s.height=this.height*t;var o=s.getContext("2d"),i=new Image;i.src=this.exportSVG(),i.onload=function(){o.save(),o.scale(t,t),o.drawImage(i,0,0),o.restore(),e(s)}},ps.prototype.exportPNG=function(e,t){this.toCanvas(function(t){if(URL&&URL.createObjectURL&&Blob&&t.toBlob)t.toBlob(function(t){e(URL.createObjectURL(t))},"image/png");else e(t.toDataURL("image/png"))},t)};var hs=function(e){switch(e.constructor){case Vt:return os;case Gt:return is;case jt:return as;case Ut:return ns;case _t:return rs;case Kt:return cs;case Wt:return ls;case Zt:return ps;default:throw new Error("no view for "+e.constructor.name);}},ds=function(e){return new(hs(e))(e)},gs={newView:ds,LabelView:os},us={init:function(e){_e.init(e),gs.LabelView.measuring=function(){var e=_e.makeCanvas();return e.getContext("2d")}()},newView:gs.newView,makeStyle:xt.makeStyle},fs=e(function(e){function t(e,t){return s({},e,t)}var o,i,a={textContent:!0},n=e.exports={init:function(e){o=e.document;var t=e.DOMParser;i=new t().parseFromString("<xml></xml>","application/xml"),n.XMLSerializer=e.XMLSerializer},makeCanvas:function(){return o.createElement("canvas")},cdata:function(e){return i.createCDATASection(e)},el:function e(t,s){var e=o.createElementNS("http://www.w3.org/2000/svg",t);return n.setProps(e,s)},setProps:function(e,t){for(var s in t){var o=""+t[s];a[s]?e[s]=o:null!==t[s]&&t.hasOwnProperty(s)&&e.setAttributeNS(null,s,o)}return e},withChildren:function(e,t){for(var s=0;s<t.length;s++)e.appendChild(t[s]);return e},group:function(e){return n.withChildren(n.el("g"),e)},newSVG:function(e,t){return n.el("svg",{version:"1.1",width:e,height:t,viewBox:"0 0 ".concat(e," ").concat(t)})},polygon:function(e){return n.el("polygon",t(e,{points:e.points.join(" ")}))},path:function(e){return n.el("path",t(e,{path:null,d:e.path.join(" ")}))},text:function e(s,o,i,a){var e=n.el("text",t(a,{x:s,y:o,textContent:i}));return e},symbol:function(e){return n.el("use",{href:e})},move:function(e,t,s){return n.setProps(s,{transform:["translate(",e," ",t,")"].join("")}),s},rect:function(e,s,o){return n.el("rect",t(o,{x:0,y:0,width:e,height:s}))},roundRect:function(e,s,o){return n.rect(e,s,t(o,{rx:4,ry:4}))},pillRect:function(e,s,o){var i=s/2;return n.rect(e,s,t(o,{rx:i,ry:i}))},pointedPath:function(e,t){var s=t/2;return[["M",s,0].join(" "),["L",e-s,0,e,s].join(" "),["L",e,s,e-s,t].join(" "),["L",s,t,0,s].join(" "),["L",0,s,s,0].join(" "),"Z"]},pointedRect:function(e,s,o){return n.path(t(o,{path:n.pointedPath(e,s)}))},topNotch:function(e,t){return["c 2 0 3 1 4 2","l 4 4","c 1 1 2 2 4 2","h 12","c 2 0 3 -1 4 -2","l 4 -4","c 1 -1 2 -2 4 -2",["L",e-4,t].join(" "),"a 4 4 0 0 1 4 4"].join(" ")},getTop:function(e){return["M 0 4","A 4 4 0 0 1 4 0","H 12",n.topNotch(e,0)].join(" ")},getRingTop:function(e){return["M",0,3,"L",3,0,"L",7,0,"L",10,3,"L",16,3,"L",19,0,"L",e-3,0,"L",e,3].join(" ")},getRightAndBottom:function(e,t,s,o){"undefined"==typeof o&&(o=0);var i=[["L",e,t-4].join(" "),"a 4 4 0 0 1 -4 4"];return s&&(i=i.concat([["L",o+48,t].join(" "),"c -2 0 -3 1 -4 2","l -4 4","c -1 1 -2 2 -4 2","h -12","c -2 0 -3 -1 -4 -2","l -4 -4","c -1 -1 -2 -2 -4 -2"])),0===o?(i.push("L",o+4,t),i.push("a 4 4 0 0 1 -4 -4")):(i.push("L",o+4,t),i.push("a 4 4 0 0 0 -4 4")),i.join(" ")},getArm:function(e,t){return[["L",16,t-4].join(" "),"a 4 4 0 0 0 4 4",["L",28,t].join(" "),n.topNotch(e,t)].join(" ")},getArmNoNotch:function(e,t){return[["L",16,t-4].join(" "),"a 4 4 0 0 0 4 4",["L",28,t].join(" "),["L",e-4,t].join(" "),"a 4 4 0 0 1 4 4"].join(" ")},stackRect:function(e,s,o){return n.path(t(o,{path:[n.getTop(e),n.getRightAndBottom(e,s,!0,0),"Z"]}))},capPath:function(e,t){return[n.getTop(e),n.getRightAndBottom(e,t,!1,0),"Z"]},capRect:function(e,s,o){return n.path(t(o,{path:n.capPath(e,s)}))},getHatTop:function(e){return["M 0 16","c 25,-22 71,-22 96,0",["L",e-4,16].join(" "),"a 4 4 0 0 1 4 4"].join(" ")},getCatTop:function(e){return["M 0 32","c2.6,-2.3 5.5,-4.3 8.5,-6.2c-1,-12.5 5.3,-23.3 8.4,-24.8c3.7,-1.8 16.5,13.1 18.4,15.4c8.4,-1.3 17,-1.3 25.4,0c1.9,-2.3 14.7,-17.2 18.4,-15.4c3.1,1.5 9.4,12.3 8.4,24.8c3,1.8 5.9,3.9 8.5,6.1",["L",e-4,32].join(" "),"a 4 4 0 0 1 4 4"].join(" ")},hatRect:function(e,s,o){return n.path(t(o,{path:[n.getHatTop(e),n.getRightAndBottom(e,s,!0,0),"Z"]}))},catHat:function(e,s,o){return n.group([n.path(t(o,{path:[n.getCatTop(e),n.getRightAndBottom(e,s,!0,0),"Z"]})),n.move(0,32,n.setProps(n.group([n.el("circle",{cx:29.1,cy:-3.3,r:3.4}),n.el("circle",{cx:59.2,cy:-3.3,r:3.4}),n.el("path",{d:"M45.6,0.1c-0.9,0-1.7-0.3-2.3-0.9c-0.6,0.6-1.3,0.9-2.2,0.9c-0.9,0-1.8-0.3-2.3-0.9c-1-1.1-1.1-2.6-1.1-2.8c0-0.5,0.5-1,1-1l0,0c0.6,0,1,0.5,1,1c0,0.4,0.1,1.7,1.4,1.7c0.5,0,0.7-0.2,0.8-0.3c0.3-0.3,0.4-1,0.4-1.3c0-0.1,0-0.1,0-0.2c0-0.5,0.5-1,1-1l0,0c0.5,0,1,0.4,1,1c0,0,0,0.1,0,0.2c0,0.3,0.1,0.9,0.4,1.2C44.8-2.2,45-2,45.5-2s0.7-0.2,0.8-0.3c0.3-0.4,0.4-1.1,0.3-1.3c0-0.5,0.4-1,0.9-1.1c0.5,0,1,0.4,1.1,0.9c0,0.2,0.1,1.8-0.8,2.8C47.5-0.4,46.8,0.1,45.6,0.1z"})]),{fill:"#000","fill-opacity":.6})),n.move(0,32,n.el("path",{d:"M73.1-15.6c1.7-4.2,4.5-9.1,5.8-8.5c1.6,0.8,5.4,7.9,5,15.4c0,0.6-0.7,0.7-1.1,0.5c-3-1.6-6.4-2.8-8.6-3.6C72.8-12.3,72.4-13.7,73.1-15.6z",fill:"#FFD5E6",transform:"translate(0, 32)"})),n.move(0,32,n.el("path",{d:"M22.4-15.6c-1.7-4.2-4.5-9.1-5.8-8.5c-1.6,0.8-5.4,7.9-5,15.4c0,0.6,0.7,0.7,1.1,0.5c3-1.6,6.4-2.8,8.6-3.6C22.8-12.3,23.2-13.7,22.4-15.6z",fill:"#FFD5E6",transform:"translate(0, 32)"}))])},getProcHatTop:function(e){return["M 0 20","a 20 20 0 0 1 20 -20",["L",e-20,0].join(" "),"a 20,20 0 0,1 20,20"].join(" ")},procHatRect:function(e,s,o){return n.path(t(o,{path:[n.getProcHatTop(e),n.getRightAndBottom(e,s,!0,0),"Z"]}))},mouthRect:function(e,s,o,a,r){for(var c=a[0].height,l=[n.getTop(e),n.getRightAndBottom(e,c,!0,16)],p=1;p<a.length;p+=2){var h=p+2===a.length,d=a[p];c+=d.height-3,d.isFinal?l.push(n.getArmNoNotch(e,c)):l.push(n.getArm(e,c));var g=h?0:16;c+=a[p+1].height+3,l.push(n.getRightAndBottom(e,c,!(h&&o),g))}return l.push("Z"),n.path(t(r,{path:l}))},commentRect:function(e,s,o){return n.roundRect(e,s,t(o,{class:"sb3-comment"}))},commentLine:function(e,s){return n.move(-e,9,n.rect(e,2,t(s,{class:"sb3-comment-line"})))},strikethroughLine:function(e,s){return n.path(t(s,{path:["M",0,0,"L",e,0],class:"sb3-diff sb3-diff-del"}))}}}),ms=fs.init,ys=fs.makeCanvas,bs=fs.cdata,ks=fs.el,ws=fs.setProps,As=fs.withChildren,Ss=fs.group,Ls=fs.newSVG,vs=fs.polygon,Os=fs.path,Es=fs.text,Ts=fs.symbol,Rs=fs.move,Cs=fs.rect,Is=fs.roundRect,Ns=fs.pillRect,xs=fs.pointedPath,Ms=fs.pointedRect,Bs=fs.topNotch,Ds=fs.getTop,Ps=fs.getRingTop,Fs=fs.getRightAndBottom,Hs=fs.getArm,zs=fs.getArmNoNotch,Vs=fs.stackRect,Gs=fs.capPath,js=fs.capRect,Us=fs.getHatTop,_s=fs.getCatTop,Ks=fs.hatRect,Ws=fs.catHat,Zs=fs.getProcHatTop,Xs=fs.procHatRect,Ys=fs.mouthRect,Qs=fs.commentRect,qs=fs.commentLine,Js=fs.strikethroughLine,$s=e(function(e){var t=e.exports={cssContent:"\n    .sb3-label {\n      font: 500 12pt Helevetica Neue, Helvetica, sans-serif;\n      fill: #fff;\n      word-spacing: +1pt;\n    }\n\n    .sb3-motion { fill: #4c97ff; stroke: #3373cc; }\n    .sb3-motion-alt { fill: #4280d7; }\n    .sb3-motion-dark { fill: #4c97ff; }\n    .sb3-looks { fill: #9966ff; stroke: #774dcb; }\n    .sb3-looks-alt { fill: #855cd6; }\n    .sb3-looks-dark { fill: #bd42bd; }\n    .sb3-sound { fill: #cf63cf; stroke: #bd42bd; }\n    .sb3-sound-alt { fill: #c94fc9; }\n    .sb3-sound-dark { fill: #bd42bd; }\n    .sb3-control { fill: #ffab19; stroke: #cf8b17; }\n    .sb3-control-alt { fill: #ec9c13; }\n    .sb3-control-dark { fill: #cf8b17; }\n    .sb3-events { fill: #ffbf00; stroke: #cc9900; }\n    .sb3-events-alt { fill: #e6ac00; }\n    .sb3-events-dark { fill: #cc9900; }\n    .sb3-sensing { fill: #5cb1d6; stroke: #2e8eb8; }\n    .sb3-sensing-alt { fill: #47a8d1; }\n    .sb3-sensing-dark { fill: #2e8eb8; }\n    .sb3-operators { fill: #59c059; stroke: #389438; }\n    .sb3-operators-alt { fill: #46b946; }\n    .sb3-operators-dark { fill: #389438; }\n    .sb3-variables { fill: #ff8c1a; stroke: #db6e00; }\n    .sb3-variables-alt { fill: #ff8000; }\n    .sb3-variables-dark { fill: #db6e00; }\n    .sb3-list { fill: #ff661a; stroke: #e64d00; }\n    .sb3-list-alt { fill: #ff5500; }\n    .sb3-list-dark { fill: #e64d00; }\n    .sb3-custom { fill: #ff6680; stroke: #ff3355; }\n    .sb3-custom-alt { fill: #ff4d6a; }\n    .sb3-custom-dark { fill: #ff3355; }\n    .sb3-custom-arg { fill: #ff6680; stroke: #ff3355; }\n\n    /* extension blocks, e.g. pen */\n    .sb3-extension { fill: #0fbd8c; stroke: #0b8e69; }\n    .sb3-extension-alt { fill: #0da57a; }\n    .sb3-extension-line { stroke: #0da57a; }\n    .sb3-extension-dark { fill: #0b8e69; }\n\n    /* obsolete colors: chosen by hand, indicates invalid blocks */\n    .sb3-obsolete { fill: #ed4242; stroke: #ca2b2b; }\n    .sb3-obsolete-alt { fill: #db3333; }\n    .sb3-obsolete-dark { fill: #ca2b2b; }\n\n    /* grey: special color from the Scratch 3.0 design mockups */\n    .sb3-grey { fill: #bfbfbf; stroke: #909090; }\n    .sb3-grey-alt { fill: #b2b2b2; }\n    .sb3-grey-dark { fill: #909090; }\n\n    .sb3-input-color {\n      stroke: #fff;\n    }\n\n    .sb3-input-number,\n    .sb3-input-string {\n      fill: #fff;\n    }\n    .sb3-literal-number,\n    .sb3-literal-string,\n    .sb3-literal-number-dropdown,\n    .sb3-literal-dropdown {\n      word-spacing: 0;\n    }\n    .sb3-literal-number,\n    .sb3-literal-string {\n      fill: #575e75;\n    }\n\n    .sb3-comment {\n      fill: #ffffa5;\n      stroke: #d0d1d2;\n      stroke-width: 1;\n    }\n    .sb3-comment-line {\n      fill: #ffff80;\n    }\n    .sb3-comment-label {\n      font: 400 12pt Helevetica Neue, Helvetica, sans-serif;\n      fill: #000;\n      word-spacing: 0;\n    }\n\n    .sb3-diff {\n      fill: none;\n      stroke: #000;\n    }\n    .sb3-diff-ins {\n      stroke-width: 2px;\n    }\n    .sb3-diff-del {\n      stroke-width: 3px;\n    }\n  ".replace(/[ \n]+/," "),makeIcons:function(){return[fs.setProps(fs.group([fs.el("path",{d:"M20.8 3.7c-.4-.2-.9-.1-1.2.2-2 1.6-4.8 1.6-6.8 0-2.3-1.9-5.6-2.3-8.3-1v-.4c0-.6-.5-1-1-1s-1 .4-1 1v18.8c0 .5.5 1 1 1h.1c.5 0 1-.5 1-1v-6.4c1-.7 2.1-1.2 3.4-1.3 1.2 0 2.4.4 3.4 1.2 2.9 2.3 7 2.3 9.8 0 .3-.2.4-.5.4-.9V4.7c0-.5-.3-.9-.8-1zm-.3 10.2C18 16 14.4 16 11.9 14c-1.1-.9-2.5-1.4-4-1.4-1.2.1-2.3.5-3.4 1.1V4c2.5-1.4 5.5-1.1 7.7.6 2.4 1.9 5.7 1.9 8.1 0h.2l.1.1-.1 9.2z",fill:"#45993d"}),fs.el("path",{d:"M20.6 4.8l-.1 9.1v.1c-2.5 2-6.1 2-8.6 0-1.1-.9-2.5-1.4-4-1.4-1.2.1-2.3.5-3.4 1.1V4c2.5-1.4 5.5-1.1 7.7.6 2.4 1.9 5.7 1.9 8.1 0h.2c0 .1.1.1.1.2z",fill:"#4cbf56"})]),{id:"sb3-greenFlag"}),fs.setProps(fs.group([fs.el("path",{d:"M12.71 2.44A2.41 2.41 0 0 1 12 4.16L8.08 8.08a2.45 2.45 0 0 1-3.45 0L.72 4.16A2.42 2.42 0 0 1 0 2.44 2.48 2.48 0 0 1 .71.71C1 .47 1.43 0 6.36 0s5.39.46 5.64.71a2.44 2.44 0 0 1 .71 1.73z",fill:"#231f20",opacity:".1"}),fs.el("path",{d:"M6.36 7.79a1.43 1.43 0 0 1-1-.42L1.42 3.45a1.44 1.44 0 0 1 0-2c.56-.56 9.31-.56 9.87 0a1.44 1.44 0 0 1 0 2L7.37 7.37a1.43 1.43 0 0 1-1.01.42z",fill:"#fff"})]),{id:"sb3-dropdownArrow",transform:"scale(0.944)"}),fs.setProps(fs.group([fs.el("path",{d:"M22.68 12.2a1.6 1.6 0 0 1-1.27.63h-7.69a1.59 1.59 0 0 1-1.16-2.58l1.12-1.41a4.82 4.82 0 0 0-3.14-.77 4.31 4.31 0 0 0-2 .8A4.25 4.25 0 0 0 7.2 10.6a5.06 5.06 0 0 0 .54 4.62A5.58 5.58 0 0 0 12 17.74a2.26 2.26 0 0 1-.16 4.52A10.25 10.25 0 0 1 3.74 18a10.14 10.14 0 0 1-1.49-9.22 9.7 9.7 0 0 1 2.83-4.14A9.92 9.92 0 0 1 9.66 2.5a10.66 10.66 0 0 1 7.72 1.68l1.08-1.35a1.57 1.57 0 0 1 1.24-.6 1.6 1.6 0 0 1 1.54 1.21l1.7 7.37a1.57 1.57 0 0 1-.26 1.39z",fill:"#3d79cc"}),fs.el("path",{d:"M21.38 11.83h-7.61a.59.59 0 0 1-.43-1l1.75-2.19a5.9 5.9 0 0 0-4.7-1.58 5.07 5.07 0 0 0-4.11 3.17A6 6 0 0 0 7 15.77a6.51 6.51 0 0 0 5 2.92 1.31 1.31 0 0 1-.08 2.62 9.3 9.3 0 0 1-7.35-3.82 9.16 9.16 0 0 1-1.4-8.37A8.51 8.51 0 0 1 5.71 5.4a8.76 8.76 0 0 1 4.11-1.92 9.71 9.71 0 0 1 7.75 2.07l1.67-2.1a.59.59 0 0 1 1 .21L22 11.08a.59.59 0 0 1-.62.75z",fill:"#fff"})]),{id:"sb3-turnRight"}),fs.setProps(fs.group([fs.el("path",{d:"M20.34 18.21a10.24 10.24 0 0 1-8.1 4.22 2.26 2.26 0 0 1-.16-4.52 5.58 5.58 0 0 0 4.25-2.53 5.06 5.06 0 0 0 .54-4.62A4.25 4.25 0 0 0 15.55 9a4.31 4.31 0 0 0-2-.8 4.82 4.82 0 0 0-3.15.8l1.12 1.41A1.59 1.59 0 0 1 10.36 13H2.67a1.56 1.56 0 0 1-1.26-.63A1.54 1.54 0 0 1 1.13 11l1.72-7.43A1.59 1.59 0 0 1 4.38 2.4a1.57 1.57 0 0 1 1.24.6L6.7 4.35a10.66 10.66 0 0 1 7.72-1.68A9.88 9.88 0 0 1 19 4.81 9.61 9.61 0 0 1 21.83 9a10.08 10.08 0 0 1-1.49 9.21z",fill:"#3d79cc"}),fs.el("path",{d:"M19.56 17.65a9.29 9.29 0 0 1-7.35 3.83 1.31 1.31 0 0 1-.08-2.62 6.53 6.53 0 0 0 5-2.92 6.05 6.05 0 0 0 .67-5.51 5.32 5.32 0 0 0-1.64-2.16 5.21 5.21 0 0 0-2.48-1A5.86 5.86 0 0 0 9 8.84L10.74 11a.59.59 0 0 1-.43 1H2.7a.6.6 0 0 1-.6-.75l1.71-7.42a.59.59 0 0 1 1-.21l1.67 2.1a9.71 9.71 0 0 1 7.75-2.07 8.84 8.84 0 0 1 4.12 1.92 8.68 8.68 0 0 1 2.54 3.72 9.14 9.14 0 0 1-1.33 8.36z",fill:"#fff"})]),{id:"sb3-turnLeft"}),fs.el("path",{d:"M0 0L4 4L0 8Z",fill:"#111",id:"sb3-addInput"}),fs.el("path",{d:"M4 0L4 8L0 4Z",fill:"#111",id:"sb3-delInput"}),fs.setProps(fs.group([fs.el("path",{d:"M23.3 11c-.3.6-.9 1-1.5 1h-1.6c-.1 1.3-.5 2.5-1.1 3.6-.9 1.7-2.3 3.2-4.1 4.1-1.7.9-3.6 1.2-5.5.9-1.8-.3-3.5-1.1-4.9-2.3-.7-.7-.7-1.9 0-2.6.6-.6 1.6-.7 2.3-.2H7c.9.6 1.9.9 2.9.9s1.9-.3 2.7-.9c1.1-.8 1.8-2.1 1.8-3.5h-1.5c-.9 0-1.7-.7-1.7-1.7 0-.4.2-.9.5-1.2l4.4-4.4c.7-.6 1.7-.6 2.4 0L23 9.2c.5.5.6 1.2.3 1.8z",fill:"#cf8b17"}),fs.el("path",{d:"M21.8 11h-2.6c0 1.5-.3 2.9-1 4.2-.8 1.6-2.1 2.8-3.7 3.6-1.5.8-3.3 1.1-4.9.8-1.6-.2-3.2-1-4.4-2.1-.4-.3-.4-.9-.1-1.2.3-.4.9-.4 1.2-.1 1 .7 2.2 1.1 3.4 1.1s2.3-.3 3.3-1c.9-.6 1.6-1.5 2-2.6.3-.9.4-1.8.2-2.8h-2.4c-.4 0-.7-.3-.7-.7 0-.2.1-.3.2-.4l4.4-4.4c.3-.3.7-.3.9 0L22 9.8c.3.3.4.6.3.9s-.3.3-.5.3z",fill:"#fff"})]),{id:"sb3-loopArrow"}),fs.setProps(fs.group([fs.el("path",{d:"M28.456 21.675c-.009-.312-.087-.825-.256-1.702-.096-.495-.612-3.022-.753-3.73-.395-1.98-.76-3.92-1.142-6.113-.732-4.223-.693-6.05.344-6.527.502-.23 1.06-.081 1.842.35.413.227 2.181 1.365 2.07 1.296 1.993 1.243 3.463 1.775 4.928 1.549 1.527-.237 2.505-.06 2.877.618.348.635.015 1.416-.729 2.18-1.473 1.516-3.976 2.514-5.849 2.023-.822-.218-1.238-.464-2.38-1.266a9.737 9.737 0 0 0-.095-.066c.047.593.264 1.74.717 3.803.294 1.336 2.079 9.187 2.637 11.674l.002.012c.529 2.637-1.872 4.724-5.235 4.724-3.29 0-6.363-1.988-6.862-4.528-.53-2.64 1.873-4.734 5.233-4.734a8.411 8.411 0 0 1 2.65.437zM11.46 27.666c-.01-.319-.091-.84-.266-1.738-.09-.46-.595-2.937-.753-3.727-.39-1.96-.752-3.892-1.131-6.07-.732-4.224-.692-6.052.344-6.527.502-.23 1.06-.082 1.841.349.414.228 2.181 1.365 2.07 1.296 1.992 1.243 3.461 1.775 4.925 1.549 1.525-.24 2.504-.064 2.876.614.348.635.015 1.415-.728 2.18-1.474 1.517-3.977 2.513-5.847 2.017-.822-.218-1.237-.463-2.38-1.266a9.729 9.729 0 0 0-.094-.065c.047.593.264 1.74.717 3.802.294 1.337 2.078 9.19 2.636 11.675l.003.013c.517 2.638-1.884 4.732-5.234 4.732-3.286 0-6.359-1.993-6.87-4.54-.518-2.639 1.885-4.73 5.242-4.73.904 0 1.802.15 2.65.436z",stroke:"#000","stroke-opacity":".1"}),fs.el("path",{d:"M32.18 25.874C32.636 28.157 30.512 30 27.433 30c-3.07 0-5.923-1.843-6.372-4.126-.458-2.285 1.665-4.136 4.743-4.136.647 0 1.283.084 1.89.234a7 7 0 0 1 .938.302c.87-.02-.104-2.294-1.835-12.229-2.134-12.303 3.06-1.87 8.768-2.753 5.708-.885.076 4.82-3.65 3.844-3.724-.987-4.65-7.153.263 14.738zm-16.998 5.99C15.63 34.148 13.507 36 10.439 36c-3.068 0-5.92-1.852-6.379-4.136-.448-2.284 1.674-4.135 4.751-4.135 1.002 0 1.974.197 2.854.544.822-.055-.15-2.377-1.862-12.228-2.133-12.303 3.059-1.87 8.764-2.753 5.706-.894.076 4.821-3.648 3.834-3.723-.987-4.648-7.152.263 14.738z",fill:"#FFF"})]),{id:"sb3-musicBlock",fill:"none"}),fs.setProps(fs.group([fs.el("path",{d:"M8.753 34.602l-4.251 1.779 1.784-4.236c1.218-2.892 2.907-5.423 5.03-7.538L31.066 4.93c.846-.842 2.65-.41 4.032.967 1.38 1.375 1.816 3.173.97 4.015L16.318 29.59c-2.123 2.116-4.664 3.799-7.565 5.012",fill:"#FFF"}),fs.el("path",{d:"M29.41 6.111s-4.45-2.379-8.202 5.771c-1.734 3.766-4.35 1.546-4.35 1.546"}),fs.el("path",{d:"M36.42 8.825c0 .463-.14.873-.432 1.164l-9.335 9.301c.282-.29.41-.668.41-1.12 0-.874-.507-1.963-1.406-2.868-1.362-1.358-3.147-1.8-4.002-.99L30.99 5.01c.844-.84 2.65-.41 4.035.96.898.904 1.396 1.982 1.396 2.855M10.515 33.774a23.74 23.74 0 0 1-1.764.83L4.5 36.382l1.786-4.235c.258-.604.529-1.186.833-1.757.69.183 1.449.625 2.109 1.282.659.658 1.102 1.412 1.287 2.102",fill:"#4C97FF"}),fs.el("path",{d:"M36.498 8.748c0 .464-.141.874-.433 1.165l-19.742 19.68c-2.131 2.111-4.673 3.793-7.572 5.01L4.5 36.381l.974-2.317 1.925-.808c2.899-1.218 5.441-2.899 7.572-5.01l19.742-19.68c.292-.292.432-.702.432-1.165 0-.647-.27-1.4-.779-2.123.249.172.498.377.736.614.898.905 1.396 1.983 1.396 2.856",fill:"#575E75",opacity:".15"}),fs.el("path",{d:"M18.45 12.831a.904.904 0 1 1-1.807 0 .904.904 0 0 1 1.807 0z",fill:"#575E75"})]),{id:"sb3-penBlock",stroke:"#575E75",fill:"none","stroke-linejoin":"round"}),fs.setProps(fs.group([fs.el("circle",{opacity:.25,cx:32,cy:16,r:4.5}),fs.el("circle",{opacity:.5,cx:32,cy:12,r:4.5}),fs.el("circle",{opacity:.75,cx:32,cy:8,r:4.5}),fs.el("circle",{cx:32,cy:4,r:4.5}),fs.el("path",{d:"M22.672 4.42l-6.172 4V6.1c0-2.01-1.563-3.6-3.5-3.6H4.1C2.076 2.5.5 4.076.5 6.1V14c0 1.927 1.584 3.512 3.6 3.6H13c1.902 0 3.5-1.653 3.5-3.6v-2.283l6.257 3.754.097.075c.02.02.098.054.146.054.267 0 .5-.217.5-.5V4.8c0 .037-.056-.094-.129-.243-.145-.242-.43-.299-.7-.137z",fill:"#4D4D4D","stroke-linejoin":"round"})]),{id:"sb3-videoBlock",stroke:"#000",fill:"#FFF","stroke-opacity":.15}),fs.setProps(fs.group([fs.el("path",{d:"M25.644 20.5c-1.667 1.937-4.539 3.429-5.977 3.429a1.25 1.25 0 0 1-.557-.137c-.372-.186-.61-.542-.61-1.03 0-.105.017-.207.05-.308.076-.236.624-.986.727-1.173.27-.484.462-1.075.566-1.865A8.5 8.5 0 0 1 24 3.5h4a8.5 8.5 0 1 1 0 17h-2.356z",fill:"#FFF"}),fs.el("path",{d:"M15.5 21.67c0-1.016-1.494-1.586-2.387-.782l-2.7 2.163A5.958 5.958 0 0 1 6.7 24.33h-.4c-1.035 0-1.8.69-1.8 1.573v4.235c0 .883.765 1.572 1.8 1.572h.4c1.458 0 2.754.423 3.82 1.287l2.598 2.161c.908.75 2.382.188 2.382-.876V21.67z",fill:"#4D4D4D"})]),{id:"sb3-ttsBlock",stroke:"#000","stroke-opacity":.15}),fs.el("image",{id:"sb3-translateBlock",width:"40px",height:"40px",href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAA21BMVEUAAAAAAAAAAAAAAADS0tIAAABHR0cAAADX19cAAAAAAACkpKRqamq2traurq6WlpbV1dWEhITHx8fPz8/Ly8vDw8O9vb0AAABMTEz////Z2dlXXnVMl//g4ODu7u7m5ub4+PhPmf/x8fH09PT6+vri4uNRmv/r6+1uqv/0+P9Ynv/p8v+rrrphZ33S5f+51v9ho/+1uMKBhpfH3v+Wmqhrcoacxf+Pvv/KzNSgpLGLkKDd6/+rzf9npv/AwsuDtv98s/90rv9jpP9GieeOrtm5ubl2fI7Z4u56otk5hEFfAAAAGXRSTlMAJhgM1wYyHvIkEWpBhXhc5U+uybyhk0YvleQYgwAABDpJREFUWMPtmNl6mzAQhQMCBAYbvLX1GIwxi7e2TtosTdKk+/L+T1QBVoQtJHDby5yLROYTPzOagSM4e9az6oVUrDgKxh39//Bwb+QBkTZ2VL3hypYilKWicpY6gmWcTCbxIoSh0xHjOkZXA4m0rlGcrcBsslcSmrYq4qm2GczmE6Hms6A8W4GQHZ1BTxXweuTCErGz1TEEaTpLymML6HVq87VhIWPRs21yNu679guNXn9hOnWVMUwanzxG0yCTdYQQts195umwJmnUDSatFHQRPaVvljkl4CAuRlWrCfD9uiZEbR+ObrnjfRDhwHUtdAi0gK/vLtts+VqDVfIMjZSmLEycBuD1D4kK8MHc+Ju3/FFQaHdXc4rBU/8NiCE+OJyAIQKuz32qjA7O1xzwqMtiUETAXeRzinZcyoPgsPpDcco3q9WD729WhTI/e1itbriUzwwtqPI0Q5et4ZoA6SDj1pCWOeB44qJ88aOiIB8j/xMH5IiUJwG+jfyHPMCNH20FQEpkPGnbnBeFuI78Fd82VWJCeTyQCzHb3pMCb8VAQhxBCkPKkzf2Z9J9mR9dCxqb3tBO17EoTw4ky0f0VXSnUCGE6LDp1tvlwK0cyNQMJA1DlL3Px8TenvTjpcAN5cD7VVSsoR992c4oS+aGcuDbzxFBfVqvv5L/375DCzeUAXfnOW5TJHudffvdzg3FwPdZvnbX6/LXr+9t3ZCzAAaMNh/X9BdAWzcUm9T2vnrpk91QbqOhLEDeDZuNHkBSX94Nm7ciAJOWAkW8WZIDl1MikAD57ZwceJsDL0VAfsPJwgzzO5cHvsmBb2IJkAlhB5InntlXlJcc8MO00GMzsHTbsMJDdU+hOxIeCfKuXYQu7ZJ5oDmExwPjfAEvyZ9lGyDW9tOWMH6l1z4nLwjrQ572RRugAvMS57mq4MH7czq9Kgpz1QZoDcI4DsHrWUjw4E1JbLeTSZ5z2gLYMTTwBnaOEwBvS1Ke86UUyF7isKpLrIHkSvVGBORdUQx8nFb0KAUy38aSCO8I510hMrhrBOrGEFIYGToPZM+Fn+XwiraiAMh2Uwnb+3DAC9Z/t3TIA2W7MwZkYbH+uZIC+f0jD3z9+vXF05hIAJTtcK3TLIDnMSLnhqeZlDo8eksYqH/3UskWPz7aCuDTX3urMiA5ejHCp7+YV4W9gxBnMFJP/XRwKNT3IEhLZpIGQMp86seNY6LlutRQgrFr6dLPLyELjm44eemIWt6C+JP0A1HffCIm4GDEw2jvpNTxbIwQ0kUTUYUYkgYTSXfMBU1Ee+G6fSwkOlpA/RFcJCR2erRHkllKSjNWhdd+NQbqkJrgunyPhKBIprpeiZyLZtEeCRNWQdlUZPU8yF1yYJ1J1HGGEC5iknS8pN0tRtoDDzTSNDLpqjMu2s4b9fBZg/TcJVHjrA7GSl/JZz7rWbX6A0ZzUfwVEqfrAAAAAElFTkSuQmCC"}),fs.el("image",{id:"sb3-microbitBlock",width:"40px",height:"40px",href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAACmlBMVEUAAAArKysrIB8lJCNBRlY2O0U9X48sKCvOoBQzKzMnJyfrswi/xdDRoxN2dnbToxPosgnmsAq/lxo6MSq0kCLOoRXKnhbEmhc7LRooJCTcqQ7OoBXstAjpsgi9lhuvjCCPdSd4Zyg2NjZMi+Slhyq8lR5CR1fZqBG+lh3ttQjFnBnLnhbDmhqZore3kh5ARlW2kR6qiCGcfyU6QEtyYyd4ZSDSoxOGdDedgizLnhfgrA25kx9YXWqbgCxMUWDfqwzcqg/VphBBR1ecpLmcgSzHmxijq77BmRprYkOOlKZARlVGdbabo7m3kRxGcrKwjB9ARVSIjaCZobuVeyahgh+VdyE8XIOLayBIOydBR1f/vwBMl//m5+g+Q1JlanY6P0uCiJjj5OU9QVBARVQ/RFP9vgBFZpjk5ebwtgbzuAR0eotARlZITl3d3+KNlKRQVmRNUmGxs7mRlJtUW2nLnhfInRfpsQn1uQS/wsa0t7qlp62doKeKjpeBg41YXmxCSlvGyMtHb6xCUGlCTGBJgdJDSFVobXlMlPhLhtq/wchIesFGbqpDVXRXXGxCTGNiXEe+lh1LjuzP0dRJg9RIfslJfMW9v8RGbKRFY5Jzd4NdYm88QE1+bjrQpCHQohTxtwVLkPDa3OHd3t9If826vMCusLZHcrGIj6F6gpaDho9ESlpITFOQeTLcqhnEmhnqsw34uwVKkfNNhdi6vMRLUWBPUFC7lzDWpx31uQjutQj6vAP5+frZ29zZ2dvW2NtHc7JGbKVFaJx/hpl/hpdxd4hzd4JDWHpDUm5UWWiZhEh3aT6WfC/EnSqtiyW/lxzBmRpKi+VQgMhRermqq7BSdrCLjpVEXYVEW4A/SFtOT1BaV0pxZUCpjT2xkTcYNOUYAAAAWXRSTlMADBgV5DRLEdcIE+3Z2QLt6unOI/zp1dEcDf7z7eu9qVtFBPv7+/fx7u3p3NnOzcq0lXZENzD6+fj39vTm5uXk4t3c2tbS0c/NvrCopKKcm4yLbGpiTUA3JzDAPbYAAAQqSURBVFjD7dX1fxJhHMDxE+MIRRFrdnd3d3fr9ziwhsVsmC2K6HRTtzlb0ens2uzu7m79X3z4HufdwTNvj/qbfPYaPDe+vMf23AEXL168/6bBTfoWx5r0GskxVMhsoDfg3Lb12LlzIwz0zKZYzzy0lkPVKtXdutXw++o2a5UQ7SUMcqibGpA8kD09slX0azRkazwISB5Inn4D+ShwrNYjIHpQQA96mqPAYlqPgOhBAT0oUpgGyh6C6EHYWz11e7jbO9hAxUMQPezR6+wtW0nBlJzV7CB62nIyN/mB5H/ouM0G0j3ITIXsAMDUVMjcygbSPQgqrzCNDaR7sCEzO2cLKSvlLNP/ED1qgbRbh0m37viBAUSPvU/BYFZWcAMFRI+9HW/fOFLSgAaixw6erZWS5qeBVG+XKwlghWsuwALXHIA5rgUAc10r1KADvViwKNDaLO4EWCQuA5gnLgVYKs4DWCYuUoPoFRhcKa4FWCwuB1gizgeYLy4BWC4uBqWPq9Cjg55EJ5bogUi7J0wBmDwhMXzjBHBOmAyQSG4wnPd4cJ4Kejbem4gdTQL9NPN00Hlk0jRs//0p+puinaeDs0XxwMFtk8RZM6fob4pmPl/wxtqkOcemIai7Kco8HTx/88Ns8dBxgMcrEdTfFKcyP/9m1xhwwbV30sBGCdTPqczPu9Y5BoTzZODAg6S5kT9Zf1PU8+fz25TrTJuizOd32kjtL9CmaOfpJ/Zd5UTV3RTtfP6X3mfl0tNNuVSpILYp5xHL25ccFUQv9cwGhrcvPZB4jgiovyn6IHrrZFB/U/RBf6rD8f4sgqzRwTtZQfKZGPiXm4Kxb8rff6awgf9sU5jTB9O79G63BqTW1C5baQ9geNSwvnIEJ8s2PCkPXqhTtlM6HUxvWpiv3h6kyozmDY2egnzUkjc3/3X0bAjPt3gW+VWVxvFtSn6hgi9acxzfeI001yiBs46pI7/AkjzHVSgjg5XIkwvXB+xbcxNnGraHCmZUr8nxJS/g3AlC1KzujQgnOpo5axufDFasYLUa2gK2p2ohzlTtJB2sV6NCNSECCtUq1Kj3CxSq2luXlY8gufF4e9PkCLiwpWFULg38+qKiILgFYe9Lr++07zSur4SXr7zeV5Gj0z5vxt69GVcFt1vI874kS6/0pDIZsWB6crLgzhNI+wRhOrm7Sr5n4HIhWeW5yRJ/EBYuS4+5yUN5Vy9fuewT6GDouQq8qAFDITX4/XmuDF788eTJRQpoD4PTT6nAXA14KVcNhshgBDx16VTokk9oZo4Czf0JiEkgpoCYApJkEPMJwxOiQFONDn8DlrRbuWjRXrWEzWKzlOhnLNfHWN5S2Va5cndjufLG8uWMpRs0sFmqdMNliRKlS1nIlw2Xxh5kWaVKC0NNLiarqdAfZ+LixYsX77f9BFJt17cXqnnkAAAAAElFTkSuQmCC"}),fs.setProps(fs.group([fs.el("path",{d:"M23.513 11.17h-.73c-.319 0-.576.213-.576.478v1.08h1.882v-1.08c0-.265-.258-.479-.576-.479",fill:"#7C87A5"}),fs.el("path",{d:"M24.91 11.17h-.73c-.319 0-.576.213-.576.478v1.08h1.882v-1.08c0-.265-.258-.479-.576-.479z"}),fs.el("path",{d:"M9.54 11.17h-.728c-.32 0-.576.213-.576.478v1.08h1.882v-1.08c0-.265-.257-.479-.577-.479",fill:"#7C87A5"}),fs.el("path",{d:"M10.938 11.17h-.729c-.32 0-.576.213-.576.478v1.08h1.882v-1.08c0-.265-.257-.479-.577-.479z"}),fs.el("path",{d:"M26.305 11.17h-.73c-.318 0-.574.213-.574.478v1.08h1.882v-1.08c0-.265-.26-.479-.578-.479",fill:"#7C87A5"}),fs.el("path",{d:"M27.702 11.17h-.73c-.318 0-.574.213-.574.478v1.08h1.882v-1.08c0-.265-.26-.479-.578-.479z"}),fs.el("path",{d:"M29.101 11.17h-.73c-.318 0-.576.213-.576.478v1.08h1.882v-1.08c0-.265-.258-.479-.576-.479",fill:"#7C87A5"}),fs.el("path",{d:"M30.498 11.17h-.73c-.318 0-.576.213-.576.478v1.08h1.882v-1.08c0-.265-.258-.479-.576-.479z"}),fs.el("path",{d:"M17.925 11.17h-.73c-.319 0-.577.213-.577.478v1.08h1.883v-1.08c0-.265-.258-.479-.576-.479",fill:"#7C87A5"}),fs.el("path",{d:"M19.322 11.17h-.73c-.319 0-.577.213-.577.478v1.08h1.883v-1.08c0-.265-.258-.479-.576-.479z"}),fs.el("path",{d:"M20.717 11.17h-.73c-.319 0-.575.213-.575.478v1.08h1.883v-1.08c0-.265-.26-.479-.578-.479",fill:"#7C87A5"}),fs.el("path",{d:"M22.114 11.17h-.73c-.319 0-.575.213-.575.478v1.08h1.883v-1.08c0-.265-.26-.479-.578-.479z"}),fs.el("path",{d:"M15.129 11.17H14.4c-.32 0-.576.213-.576.478v1.08h1.883v-1.08c0-.265-.258-.479-.578-.479",fill:"#7C87A5"}),fs.el("path",{d:"M16.526 11.17h-.729c-.32 0-.576.213-.576.478v1.08h1.883v-1.08c0-.265-.258-.479-.578-.479z"}),fs.el("path",{d:"M12.335 11.17h-.73c-.319 0-.575.213-.575.478v1.08h1.882v-1.08c0-.265-.26-.479-.577-.479",fill:"#7C87A5"}),fs.el("path",{d:"M13.732 11.17h-.73c-.319 0-.575.213-.575.478v1.08h1.883v-1.08c0-.265-.26-.479-.578-.479z"}),fs.el("path",{d:"M31.893 11.17h-.73c-.318 0-.574.213-.574.478v1.08h1.882v-1.08c0-.265-.26-.479-.578-.479",fill:"#7C87A5"}),fs.el("path",{d:"M33.29 11.17h-.73c-.318 0-.574.213-.574.478v1.08h1.882v-1.08c0-.265-.26-.479-.578-.479z"}),fs.el("path",{d:"M33.647 28.407H15.765V12.533h17.882c.52 0 .941.445.941.992v13.89c0 .547-.421.992-.94.992",fill:"#FFF"}),fs.el("path",{d:"M33.647 28.407H15.765V12.533h17.882c.52 0 .941.445.941.992v13.89c0 .547-.421.992-.94.992z",stroke:"#7C87A5","stroke-width":".893"}),fs.el("path",{d:"M15.765 28.407H5.412c-.52 0-.941-.445-.941-.993V16.502c0-2.19 1.686-3.969 3.764-3.969h15.06-3.766c-2.078 0-3.764 1.778-3.764 3.969v11.905z",fill:"#FFF"}),fs.el("path",{d:"M15.765 28.407H5.412c-.52 0-.941-.445-.941-.993V16.502c0-2.19 1.686-3.969 3.764-3.969h15.06-3.766c-2.078 0-3.764 1.778-3.764 3.969v11.905z",stroke:"#7C87A5","stroke-width":".893"}),fs.el("path",{d:"M12.941 12.533H11.06c-1.559 0-2.824 1.334-2.824 2.977v1.986c0 .547.422.992.941.992H12c.52 0 .941-.445.941-.992V15.51c0-1.643 1.265-2.977 2.824-2.977h.94-3.764z",fill:"#4C97FF"}),fs.el("path",{d:"M12.941 12.533H11.06c-1.559 0-2.824 1.334-2.824 2.977v1.986c0 .547.422.992.941.992H12c.52 0 .941-.445.941-.992V15.51c0-1.643 1.265-2.977 2.824-2.977h.94-3.764z",stroke:"#3D79CC","stroke-width":".893"}),fs.el("path",{stroke:"#7C87A5","stroke-width":".893",d:"M4.47 20.474h27.961l2.157 2.974"}),fs.el("path",{d:"M15.765 28.407H5.412c-.52 0-.941-.445-.941-.993V16.502c0-2.19 1.686-3.969 3.764-3.969h15.06-3.766c-2.078 0-3.764 1.778-3.764 3.969v11.905z",stroke:"#7C87A5","stroke-width":".893"}),fs.el("path",{d:"M21.307 18.964h-.73c-.319 0-.576.214-.576.479v1.08h1.882v-1.08c0-.265-.258-.479-.576-.479",fill:"#7C87A5"}),fs.el("path",{d:"M21.307 18.964h-.73c-.319 0-.576.214-.576.479v1.08h1.882v-1.08c0-.265-.258-.479-.576-.479z"}),fs.el("path",{d:"M24.178 18.964h-.728c-.32 0-.576.214-.576.479v1.08h1.882v-1.08c0-.265-.258-.479-.578-.479",fill:"#7C87A5"}),fs.el("path",{d:"M24.178 18.964h-.728c-.32 0-.576.214-.576.479v1.08h1.882v-1.08c0-.265-.258-.479-.578-.479z"}),fs.el("path",{d:"M27.051 18.964h-.73c-.318 0-.576.214-.576.479v1.08h1.882v-1.08c0-.265-.257-.479-.576-.479",fill:"#7C87A5"}),fs.el("path",{d:"M27.051 18.964h-.73c-.318 0-.576.214-.576.479v1.08h1.882v-1.08c0-.265-.257-.479-.576-.479z"}),fs.el("path",{d:"M29.923 18.964h-.729c-.32 0-.576.214-.576.479v1.08h1.883v-1.08c0-.265-.258-.479-.578-.479",fill:"#7C87A5"}),fs.el("path",{d:"M29.923 18.964h-.729c-.32 0-.576.214-.576.479v1.08h1.883v-1.08c0-.265-.258-.479-.578-.479z"}),fs.el("path",{d:"M33.647 28.407H15.765V20.47H32.43l2.157 2.978v3.966c0 .548-.421.993-.94.993",fill:"#E6E7E8"}),fs.el("path",{d:"M33.647 28.407H15.765V20.47H32.43l2.157 2.978v3.966c0 .548-.421.993-.94.993z",stroke:"#7C87A5","stroke-width":".893"}),fs.el("path",{d:"M15.765 28.407H5.412c-.52 0-.941-.445-.941-.993V20.47h11.294v7.937z",fill:"#E6E7E8"}),fs.el("path",{d:"M15.765 28.407H5.412c-.52 0-.941-.445-.941-.993V20.47h11.294v7.937z",stroke:"#7C87A5","stroke-width":".893"}),fs.el("path",{fill:"#E6E7E8",d:"M19.53 24.438h11.294V20.47H19.529z"}),fs.el("path",{stroke:"#7C87A5","stroke-width":".893",d:"M19.53 24.438h11.294V20.47H19.529zm12.902-3.964l2.157-2.794"})]),{id:"sb3-wedoBlock",fill:"none"}),fs.setProps(fs.group([fs.el("rect",{stroke:"#7C87A5",fill:"#FFF",x:".5",y:"3.59",width:"28",height:"25.81",rx:"1"}),fs.el("rect",{stroke:"#7C87A5",fill:"#E6E7E8",x:"2.5",y:".5",width:"24",height:"32",rx:"1"}),fs.el("path",{stroke:"#7C87A5",fill:"#FFF",d:"M2.5 14.5h24v13h-24z"}),fs.el("path",{d:"M14.5 10.5v4",stroke:"#7C87A5",fill:"#E6E7E8"}),fs.el("rect",{fill:"#414757",x:"4.5",y:"2.5",width:"20",height:"10",rx:"1"}),fs.el("rect",{fill:"#7C87A5",opacity:".5",x:"13.5",y:"20.13",width:"2",height:"2",rx:".5"}),fs.el("path",{d:"M9.06 20.13h1.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1.5a1 1 0 0 1 0-2zM19.93 22.13h-1.51a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h1.5a1 1 0 0 1 .01 2zM8.23 17.5H5a.5.5 0 0 1-.5-.5v-2.5h6l-1.85 2.78a.51.51 0 0 1-.42.22zM18.15 18.85l-.5.5a.49.49 0 0 0-.15.36V20a.5.5 0 0 1-.5.5h-.5a.5.5 0 0 1-.5-.5.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5.5.5 0 0 1-.5.5H12a.5.5 0 0 1-.5-.5v-.29a.49.49 0 0 0-.15-.36l-.5-.5a.51.51 0 0 1 0-.71l1.51-1.49a.47.47 0 0 1 .35-.15h3.58a.47.47 0 0 1 .35.15l1.51 1.49a.51.51 0 0 1 0 .71zM10.85 23.45l.5-.5a.49.49 0 0 0 .15-.36v-.29a.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5.5.5 0 0 0 .5.5h2a.5.5 0 0 0 .5-.5.5.5 0 0 1 .5-.5h.5a.5.5 0 0 1 .5.5v.29a.49.49 0 0 0 .15.36l.5.5a.5.5 0 0 1 0 .7l-1.51 1.5a.47.47 0 0 1-.35.15h-3.58a.47.47 0 0 1-.35-.15l-1.51-1.5a.5.5 0 0 1 0-.7z",fill:"#7C87A5",opacity:".5"}),fs.el("path",{d:"M21.5 27.5h5v4a1 1 0 0 1-1 1h-4v-5z",stroke:"#CC4C23",fill:"#F15A29"})]),{transform:"translate(5.5 3.5)",id:"sb3-ev3Block"}),fs.setProps(fs.group([fs.el("path",{d:"M35 28H5a1 1 0 0 1-1-1V12c0-.6.4-1 1-1h30c.5 0 1 .4 1 1v15c0 .5-.5 1-1 1z",fill:"#fff"}),fs.el("path",{fill:"red",d:"M4 25h32v2.7H4zm9-1h-2.2a1 1 0 0 1-1-1v-9.7c0-.6.4-1 1-1H13c.6 0 1 .4 1 1V23c0 .6-.5 1-1 1z"}),fs.el("path",{fill:"red",d:"M6.1 19.3v-2.2c0-.5.4-1 1-1h9.7c.5 0 1 .5 1 1v2.2c0 .5-.5 1-1 1H7.1a1 1 0 0 1-1-1z"}),fs.el("circle",{fill:"red",cx:"22.8",cy:"18.2",r:"3.4"}),fs.el("circle",{fill:"red",cx:"30.6",cy:"18.2",r:"3.4"}),fs.el("path",{fill:"red",d:"M4.2 27h31.9v.7H4.2z"}),fs.el("circle",{fill:"#e0e0e0",cx:"22.8",cy:"18.2",r:"2.3"}),fs.el("circle",{fill:"#e0e0e0",cx:"30.6",cy:"18.2",r:"2.3"}),fs.el("path",{fill:"#e0e0e0",d:"M12.5 22.9h-1.2c-.3 0-.5-.2-.5-.5V14c0-.3.2-.5.5-.5h1.2c.3 0 .5.2.5.5v8.4c0 .3-.2.5-.5.5z"}),fs.el("path",{fill:"#e0e0e0",d:"M7.2 18.7v-1.2c0-.3.2-.5.5-.5h8.4c.3 0 .5.2.5.5v1.2c0 .3-.2.5-.5.5H7.7c-.3 0-.5-.2-.5-.5zM4 26h32v2H4z"}),fs.el("path",{stroke:"#666","stroke-width":".5",d:"M35.2 27.9H4.8a1 1 0 0 1-1-1V12.1c0-.6.5-1 1-1h30.5c.5 0 1 .4 1 1V27a1 1 0 0 1-1.1.9z"}),fs.el("path",{stroke:"#666","stroke-width":".5",d:"M35.2 27.9H4.8a1 1 0 0 1-1-1V12.1c0-.6.5-1 1-1h30.5c.5 0 1 .4 1 1V27a1 1 0 0 1-1.1.9z"})]),{id:"sb3-makeymakeyBlock",fill:"none"}),fs.el("image",{id:"sb3-gdxforBlock",width:"40px",height:"40px",href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAABAlBMVEUAAAABAQEAAAB9h6YAAAAAAAAAAAB8iKZ7iKaAjKvm5+h+iqhcXFxGR0d8iKbj5OV9iKZ8h6be3+Db3d19h6acnJ0AAAB7nrDh4uPh4uN9iabZ2tt9iKbX19nJycnExsZ8iKe+wMC7vL2Eka/g4ePU1dV8iKZ9iKZ9iKd+iKitra2RkZGLjo5wcHCLi7l0oqJV//9csdZ8h6WFkq//vwDm5+iEka79vgJ6iql9iaaHk6tgq9Btm71+iadmo8dzk7OCj6yAjKp/iqhiqc1qnsB4jKtgrNFwl7d1tLTgtCxpocN0krJ2j65ossWNtZSbt4LAulHWsDnasTTuvhXzvg9zk7TzqAfaAAAAMXRSTlMAJiLoFBwI8q4a+0c4M/nr3tnQwKxYDAnk2726tbGMh4J9dinXq56ddG9nT01ACwsDk/+seAAAAidJREFUWMPt2Olu2kAUhuE5NvuaBAhZm7TpvufgMXaBbmAghOzp/d9KD7RW6yaqPeL7YVV9/471aBgfCXnUH7ULNhtkF96qv1dgwwoxoM08cDsJcwfMdgwonoiJPRFjQXkscQM3Adhxk4NuJwkoDx0nSp5NDTiae958NEaBwzkvC4YYcOxx7fCoeJhnrwcBv7H9TklFm08R4JD5SEkiMg8B4IjXwsV1HgHAPu+EizsQcMbr2B0OufZz7X0NcIZSwC9+rD3nADI2/fCtrHEfAvZ8Liqp6PuIwZZO+ZmSnspcY8AZ55WU5xkElDwuK1Vm7xgFTjhfLud5AgPHAUvBGARKvYnnTXpp/gvAg9PLyykSPLt1nNszIHjuSOdAcNp1nO4UeYYXNzcX0UH62P+0AnjH8lgCgL8s/+uXzwZgrOV2JAMwxpIMwRjLHIyxzMEYyxyMWgAwYiHAzm99iLQ6eOJEul4d7Ea6WhG8W7rAE+fertHgVXp+clpB9Oet64M/wH2TKwI/FrRFTH6JIZ6NvmZpxoDtptlFULOtzGPWy+4/r//gvwKGgcC90NtTqIg2dIuyClaWDvTjKlDMLba4UaUMcIuVbd0gyiGwjGVlFuKWfkQZhEfSQnypd8mCvOHGvkA5quo6EQSs6yrlNumN3obs0KKGHJ70QD+hLOQMW7r0sFI5KJVeY+bGkr1JopKlEG0StXbrW/uvQGMookXLLPFAZYTMJju/7z6rRW1MZcnIAAAAAElFTkSuQmCC"}),fs.el("image",{id:"sb3-boostBlock",width:"40px",height:"40px",href:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQBAMAAAB8P++eAAAAKlBMVEUAAAD///98h6Xm5+iVnrb/Zhq+w9L5hk73+Pnf4eSQmbLr7Ozo39vp184hSCf6AAAAAXRSTlMAQObYZgAAAOFJREFUSMftlDEOgjAUhonhAi1sLvIk7NDJDTYu0LhzBzcXruHoDTyFB/BCNi30KU3InzioSb++hAS+vPfKa5pEIpHvk7a8gpf8ISWINtlg4i7ZFOKVTBlqsUR+ItYZJG7VzQQgMqGYd7zWRArpULEAe5Q/J9JMj4rluC7uleNw7TFRXcoREDnlinjX57eUsvRTn8+AE0/6OKV0g5buYTTyWFFr/XAp3aDzed4yFJWnKbhPbtaXXohDNYlDJWz4zSxEokkkEjb496AiVtqAbIYgYNGWBmhgES+NX6SRSORfeAJMWajr95DdqQAAAABJRU5ErkJggg=="})]},makeStyle:function(){var e=fs.el("style");return e.appendChild(fs.cdata(t.cssContent)),e},defaultFont:"500 12pt Helevetica Neue, Helvetica, sans-serif",commentFont:"400 12pt Helevetica Neue, Helvetica, sans-serif"}}),eo=$s.cssContent,to=$s.makeIcons,so=$s.makeStyle,oo=$s.defaultFont,io=$s.commentFont,ao=Ue.Label,no=Ue.Icon,ro=Ue.Input,co=Ue.Block,lo=Ue.Comment,po=Ue.Glow,ho=Ue.Script,go=Ue.Document,uo=Ue.extensions,fo=Ue.aliasExtensions,mo=$s.defaultFont,yo=$s.commentFont,bo=$s.makeStyle,ko=$s.makeIcons,wo=function(e){s(this,e),this.el=null,this.height=12,this.metrics=null,this.x=0};wo.prototype.isLabel=!0,wo.prototype.draw=function(){return this.el},Object.defineProperty(wo.prototype,"width",{get:function(){return this.metrics.width}}),wo.metricsCache={},wo.toMeasure=[],wo.prototype.measure=function(){var e=this.value,t="sb3-"+this.cls;this.el=fs.text(0,13,e,{class:"sb3-label "+t});var s=wo.metricsCache[t];if(s||(s=wo.metricsCache[t]=Object.create(null)),Object.hasOwnProperty.call(s,e))this.metrics=s[e];else{var o=/comment-label/.test(this.cls)?yo:mo;this.metrics=s[e]=wo.measure(e,o)}},wo.measure=function(e,t){var s=wo.measuring;s.font=t;var o=s.measureText(e),i=0|o.width+.5;return{width:i}};var Ao=function e(t){s(this,t);var o=e.icons[this.name];if(!o)throw new Error("no info for icon: "+this.name);s(this,o)};Ao.prototype.isIcon=!0,Ao.prototype.draw=function(){return fs.symbol("#sb3-"+this.name,{width:this.width,height:this.height})},Ao.icons={greenFlag:{width:20,height:21,dy:-2},turnLeft:{width:24,height:24},turnRight:{width:24,height:24},loopArrow:{width:24,height:24},addInput:{width:4,height:8},delInput:{width:4,height:8},musicBlock:{width:40,height:40},penBlock:{width:40,height:40},videoBlock:{width:40,height:40,dy:10},ttsBlock:{width:40,height:40},translateBlock:{width:40,height:40},wedoBlock:{width:40,height:40},ev3Block:{width:40,height:40},microbitBlock:{width:40,height:40},makeymakeyBlock:{width:40,height:40},gdxforBlock:{width:40,height:40},boostBlock:{width:40,height:40}};var So=function(){this.width=1,this.height=40,this.x=0};So.prototype.isLine=!0,So.prototype.measure=function(){},So.prototype.draw=function(e){var t=e.info.category;return fs.el("line",{class:"sb3-"+t+"-line","stroke-linecap":"round",x1:0,y1:0,x2:0,y2:40})};var Lo=function(e){s(this,e),e.label&&(this.label=Io(e.label)),this.isBoolean="boolean"===this.shape,this.isDropdown="dropdown"===this.shape,this.isRound=!(this.isBoolean||this.isDropdown),this.x=0};Lo.prototype.isInput=!0,Lo.prototype.measure=function(){this.hasLabel&&this.label.measure()},Lo.shapes={string:fs.pillRect,number:fs.pillRect,"number-dropdown":fs.pillRect,color:fs.pillRect,dropdown:fs.roundRect,boolean:fs.pointedRect,stack:fs.stackRect,reporter:fs.pillRect},Lo.prototype.draw=function(e){if(this.isBoolean)var t=48;else if(this.isColor)var t=40;else if(this.hasLabel){var s=this.label.draw(),o=18<=this.label.width?11:(40-this.label.width)/2,t=this.label.width+2*o;s=fs.move(o,9,s)}else var t=this.isInset?30:null;this.hasArrow&&(t+=20),this.width=t;var i=this.height=32,a=Lo.shapes[this.shape](t,i);fs.setProps(a,{class:[this.isColor?"":"sb3-"+e.info.category,"sb3-input","sb3-input-"+this.shape].join(" ")}),this.isColor?fs.setProps(a,{fill:this.value}):"dropdown"===this.shape?e.info.color&&fs.setProps(a,{fill:e.info.color,stroke:"rgba(0, 0, 0, 0.2)"}):"number-dropdown"===this.shape?(a.classList.add("sb3-"+e.info.category+"-alt"),e.info.color&&fs.setProps(a,{fill:"rgba(0, 0, 0, 0.1)",stroke:"rgba(0, 0, 0, 0.15)"})):"boolean"===this.shape&&(a.classList.remove("sb3-"+e.info.category),a.classList.add("sb3-"+e.info.category+"-dark"),e.info.color&&fs.setProps(a,{fill:"rgba(0, 0, 0, 0.15)"}));var n=fs.group([a]);return this.hasLabel&&n.appendChild(s),this.hasArrow&&n.appendChild(fs.move(t-24,13,fs.symbol("#sb3-dropdownArrow",{}))),n};var vo=function(e){s(this,e),this.children=e.children.map(Io),this.comment=this.comment?Io(this.comment):null,this.isRound=this.isReporter,this.info=s({},e.info),fo.hasOwnProperty(this.info.category)&&(this.info.category=fo[this.info.category]),uo.hasOwnProperty(this.info.category)&&(this.children.unshift(new So),this.children.unshift(new Ao({name:this.info.category+"Block"})),this.info.category="extension"),this.x=0,this.width=null,this.height=null,this.firstLine=null,this.innerWidth=null};vo.prototype.isBlock=!0,vo.prototype.measure=function(){for(var e,t=0;t<this.children.length;t++)e=this.children[t],e.measure&&e.measure();this.comment&&this.comment.measure()},vo.shapes={stack:fs.stackRect,"c-block":fs.stackRect,"if-block":fs.stackRect,celse:fs.stackRect,cend:fs.stackRect,cap:fs.capRect,reporter:fs.pillRect,boolean:fs.pointedRect,hat:fs.hatRect,cat:fs.catHat,"define-hat":fs.procHatRect,ring:fs.pillRect},vo.prototype.drawSelf=function(e,t,s){if(1<s.length)return fs.mouthRect(e,t,this.isFinal,s,{class:["sb3-"+this.info.category].join(" ")});if("outline"===this.info.shape)return fs.setProps(fs.stackRect(e,t),{class:["sb3-"+this.info.category,"sb3-"+this.info.category+"-alt"].join(" ")});if(this.isRing){var o=this.children[0];if(o&&(o.isInput||o.isBlock||o.isScript)){o.isScript?"stack":o.isInput?o.shape:o.info.shape;return fs.roundRect(e,t,{class:["sb3-"+this.info.category].join(" ")})}}var i=vo.shapes[this.info.shape];if(!i)throw new Error("no shape func: "+this.info.shape);return i(e,t,{class:["sb3-"+this.info.category].join(" ")})},vo.padding={hat:[24,8],cat:[24,8],"define-hat":[20,16],null:[4,4]},vo.prototype.horizontalPadding=function(e){if(this.isRound){if(e.isIcon)return 16;if(e.isLabel)return 12;if(e.isDropdown)return 12;if(e.isBoolean)return 12;if(e.isRound)return 4}else if(this.isBoolean){if(e.isIcon)return 24;if(e.isLabel)return 20;if(e.isDropdown)return 20;if(e.isRound&&e.isBlock)return 24;if(e.isRound)return 20;if(e.isBoolean)return 8}return 8},vo.prototype.marginBetween=function(e,t){return e.isLabel&&t.isLabel?5:8},vo.prototype.draw=function(){function e(){0===A.length?g.height+=n+r:(g.height-=11,g.y-=2),c+=g.height,A.push(g)}var t="define-hat"===this.info.shape,s=this.children,o=this.isCommand,a=vo.padding[this.info.shape]||vo.padding[null],n=a[0],r=a[1],c="cat"===this.info.shape?16:0,l=function(e){this.y=e,this.width=0,this.height=o?40:32,this.children=[]},p=0,d=0,g=new l(c);if(this.info.isRTL){for(var u=0,f=function(){s=s.slice(0,u).concat(s.slice(u,m).reverse()).concat(s.slice(m))}.bind(this),m=0;m<s.length;m++)s[m].isScript&&(f(),u=m+1);u<m&&f()}for(var b,k,w,A=[],m=0;m<s.length;m++)if(w=s[m],w.el=w.draw(this),w.isScript&&this.isCommand)this.hasScript=!0,e(),w.y=c-1,A.push(w),d=R(d,R(1,w.width)),w.height=R(29,w.height+3)-2,c+=w.height,g=new l(c),b=null;else if(w.isArrow)g.children.push(w),b=w;else{A.length||(k=w),b&&(g.width+=this.marginBetween(b,w));var S=48-this.horizontalPadding(s[0]);(this.isCommand||this.isOutline)&&!w.isLabel&&!w.isIcon&&g.width<S&&(g.width=S),w.isIcon&&0===m&&this.isCommand&&(g.height=R(g.height,w.height+8)),w.x=g.width,g.width+=w.width,p=R(p,g.width),w.isLabel||(g.height=R(g.height,w.height)),g.children.push(w),b=w}e();var L=s.length?this.horizontalPadding(s[0]):0,v=s.length?this.horizontalPadding(k):0;p+=L+v;var O=p;p=R(this.hasScript?160:this.isHat?108:this.isCommand||this.isOutline?64:this.isReporter?48:0,p),this.isReporter&&(L+=(p-O)/2),this.height=c,this.width=d?R(p,15+d):p,this.firstLine=A[0],this.innerWidth=p;for(var g,E=[],m=0;m<A.length;m++){if(g=A[m],g.isScript){E.push(fs.move(16,g.y,g.el));continue}for(var w,T=g.height,h=0;h<g.children.length;h++){if(w=g.children[h],w.isArrow){E.push(fs.move(p-32,this.height-28,w.el));continue}var c=n+(T-w.height-n-r)/2;w.isLabel&&0===m?c-=1:t&&w.isLabel?c+=3:w.isIcon&&(c+=0|w.dy,this.isCommand&&0===m&&0===h&&(c+=4));var C=L+w.x;w.dx&&(C+=w.dx),E.push(fs.move(C,0|g.y+c,w.el))}}var I=this.drawSelf(p,this.height,A);return E.splice(0,0,I),this.info.color&&fs.setProps(I,{fill:this.info.color,stroke:"rgba(0, 0, 0, 0.2)"}),fs.group(E)};var Oo=function(e){s(this,e),this.label=Io(e.label),this.width=null};Oo.prototype.isComment=!0,Oo.lineLength=12,Oo.prototype.height=20,Oo.prototype.measure=function(){this.label.measure()},Oo.prototype.draw=function(){var e=this.label.draw();return this.width=this.label.width+16,fs.group([fs.commentLine(this.hasBlock?Oo.lineLength:0,6),fs.commentRect(this.width,this.height,{class:"sb3-comment"}),fs.move(8,4,e)])};var Eo=function(e){s(this,e),this.child=Io(e.child),this.width=null,this.height=null,this.y=0};Eo.prototype.isGlow=!0,Eo.prototype.measure=function(){this.child.measure()},Eo.prototype.drawSelf=function(){var e,t=this.child,s=this.width,o=this.height-1;if(t.isScript)e=!t.isEmpty&&t.blocks[0].isHat?fs.hatRect(s,o):t.isFinal?fs.capRect(s,o):fs.stackRect(s,o);else var e=t.drawSelf(s,o,[]);return fs.setProps(e,{class:"sb3-diff sb3-diff-ins"})},Eo.prototype.draw=function(){var e=this.child,t=e.isScript?e.draw(!0):e.draw();return this.width=e.width,this.height=e.isBlock&&e.firstLine.height||e.height,fs.group([t,this.drawSelf()])};var To=function(e){s(this,e),this.blocks=e.blocks.map(Io),this.y=0};To.prototype.isScript=!0,To.prototype.measure=function(){for(var e=0;e<this.blocks.length;e++)this.blocks[e].measure()},To.prototype.draw=function(e){var t=[],s=1;this.width=0;for(var o=0;o<this.blocks.length;o++){var a=this.blocks[o],n=e?0:2,r=a.draw();t.push(fs.move(n,s,r)),this.width=R(this.width,a.width);var c=a.diff;if("-"===c){var l=a.width,p=a.firstLine.height||a.height;t.push(fs.move(n,s+p/2+1,fs.strikethroughLine(l))),this.width=R(this.width,a.width)}s+=a.height;var h=a.comment;if(h){var d=a.firstLine,g=a.innerWidth+2+Oo.lineLength,u=s-a.height+d.height/2,f=h.draw();t.push(fs.move(g,u-h.height/2,f)),this.width=R(this.width,g+h.width)}}return this.height=s+1,e||this.isFinal||(this.height+=a.hasPuzzle?8:0),!e&&a.isGlow&&(this.height+=7),fs.group(t)};var Ro=function(e){s(this,e),this.scripts=e.scripts.map(Io),this.width=null,this.height=null,this.el=null,this.defs=null};Ro.prototype.measure=function(){this.scripts.forEach(function(e){e.measure()})},Ro.prototype.render=function(){if("function"==typeof ocbptions)throw new Error("render() no longer takes a callback");this.measure();for(var e,t=0,s=0,o=[],a=0;a<this.scripts.length;a++)e=this.scripts[a],s&&(s+=10),e.y=s,o.push(fs.move(0,s,e.draw())),s+=e.height,a!=this.scripts.length-1&&(s+=36),t=R(t,e.width+4);this.width=t,this.height=s;var n=fs.newSVG(t,s);return n.appendChild(this.defs=fs.withChildren(fs.el("defs"),ko())),n.appendChild(fs.group(o)),this.el=n,n},Ro.prototype.exportSVGString=function(){if(null==this.el)throw new Error("call draw() first");var e=bo();this.defs.appendChild(e);var t=new fs.XMLSerializer().serializeToString(this.el);return this.defs.removeChild(e),t},Ro.prototype.exportSVG=function(){var e=this.exportSVGString();return"data:image/svg+xml;utf8,"+e.replace(/[#]/g,encodeURIComponent)},Ro.prototype.toCanvas=function(e,t){t=t||1;var s=fs.makeCanvas();s.width=this.width*t,s.height=this.height*t;var o=s.getContext("2d"),i=new Image;i.src=this.exportSVG(),i.onload=function(){o.save(),o.scale(t,t),o.drawImage(i,0,0),o.restore(),e(s)}},Ro.prototype.exportPNG=function(e,t){this.toCanvas(function(t){if(URL&&URL.createObjectURL&&Blob&&t.toBlob)t.toBlob(function(t){e(URL.createObjectURL(t))},"image/png");else e(t.toDataURL("image/png"))},t)};var Co=function(e){switch(e.constructor){case ao:return wo;case no:return Ao;case ro:return Lo;case co:return vo;case lo:return Oo;case po:return Eo;case ho:return To;case go:return Ro;default:throw new Error("no view for "+e.constructor.name);}},Io=function(e){return new(Co(e))(e)},No={newView:Io,LabelView:wo},xo={init:function(e){fs.init(e),No.LabelView.measuring=function(){var e=fs.makeCanvas();return e.getContext("2d")}()},newView:No.newView,makeStyle:$s.makeStyle},Mo=function(e){function t(e,t){return c.parse(e,t)}function o(e,t){var t=s({style:"scratch2"},t);switch(t.style){case"scratch2":return b.newView(e);case"scratch3":return k.newView(e);default:throw new Error("Unknown style: "+t.style);}}function i(e,t){if("function"==typeof t)throw new Error("render() no longer takes a callback");var s=o(e,t),i=s.render();return i}function a(e,t){var t=s({inline:!1},t),o=e.innerHTML.replace(/<br>\s?|\n|\r\n|\r/gi,"\n"),i=r.createElement("pre");i.innerHTML=o;var a=i.textContent;return t.inline&&(a=a.replace("\n","")),a}function n(e,t,s,o){if(o.inline){var i=r.createElement("span"),a="scratchblocks scratchblocks-inline";s.scripts[0]&&!s.scripts[0].isEmpty&&(a+=" scratchblocks-inline-"+s.scripts[0].blocks[0].shape),i.className=a,i.style.display="inline-block",i.style.verticalAlign="middle"}else{var i=r.createElement("div");i.className="scratchblocks"}i.appendChild(t),e.innerHTML="",e.appendChild(i)}var r=e.document,c=Ue,l=c.allLanguages,p=c.loadLanguages,h=c.Label,d=c.Icon,g=c.Input,u=c.Block,f=c.Comment,m=c.Script,y=c.Document,b=us;b.init(e);var k=xo;k.init(e);var w=function(e,o){var e=e||"pre.blocks",o=s({style:"scratch2",inline:!1,languages:["en"],read:a,parse:t,render:i,replace:n},o),c=[].slice.apply(r.querySelectorAll(e));c.forEach(function(e){var t=o.read(e,o),s=o.parse(t,o),i=o.render(s,o);o.replace(e,i,s,o)})};return{allLanguages:l,loadLanguages:p,stringify:function(e){return e.stringify()},Label:h,Icon:d,Input:g,Block:u,Comment:f,Script:m,Document:y,newView:o,read:a,parse:t,replace:n,render:i,renderMatching:w,appendStyles:function(){r.head.appendChild(b.makeStyle()),r.head.appendChild(k.makeStyle())}}},Bo=e(function(e){var t=window.scratchblocks=e.exports=Mo(window);t.appendStyles()});return Bo}();
  //# sourceMappingURL=scratchblocks.min.js.map
  