blockly 13.0.0-beta.4 → 13.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blockly.min.js +124 -74
- package/blockly_compressed.js +60 -49
- package/blockly_compressed.js.map +1 -1
- package/blocks_compressed.js +28 -25
- package/blocks_compressed.js.map +1 -1
- package/core/block_aria_composer.d.ts +4 -0
- package/core/flyout_button.d.ts +3 -1
- package/core/hints.d.ts +8 -0
- package/core/shortcut_items.d.ts +10 -0
- package/msg/ab.js +36 -0
- package/msg/ab.mjs +36 -0
- package/msg/ace.js +36 -0
- package/msg/ace.mjs +36 -0
- package/msg/af.js +36 -0
- package/msg/af.mjs +36 -0
- package/msg/am.js +36 -0
- package/msg/am.mjs +36 -0
- package/msg/ar.js +36 -0
- package/msg/ar.mjs +36 -0
- package/msg/ast.js +36 -0
- package/msg/ast.mjs +36 -0
- package/msg/az.js +36 -0
- package/msg/az.mjs +36 -0
- package/msg/ba.js +36 -0
- package/msg/ba.mjs +36 -0
- package/msg/bcc.js +36 -0
- package/msg/bcc.mjs +36 -0
- package/msg/be-tarask.js +36 -0
- package/msg/be-tarask.mjs +36 -0
- package/msg/be.js +36 -0
- package/msg/be.mjs +36 -0
- package/msg/bg.js +36 -0
- package/msg/bg.mjs +36 -0
- package/msg/bn.js +36 -0
- package/msg/bn.mjs +36 -0
- package/msg/br.js +36 -0
- package/msg/br.mjs +36 -0
- package/msg/bs.js +36 -0
- package/msg/bs.mjs +36 -0
- package/msg/ca.js +36 -0
- package/msg/ca.mjs +36 -0
- package/msg/ce.js +36 -0
- package/msg/ce.mjs +36 -0
- package/msg/cs.js +36 -0
- package/msg/cs.mjs +36 -0
- package/msg/da.js +36 -0
- package/msg/da.mjs +36 -0
- package/msg/de.js +36 -0
- package/msg/de.mjs +36 -0
- package/msg/diq.js +36 -0
- package/msg/diq.mjs +36 -0
- package/msg/dtp.js +36 -0
- package/msg/dtp.mjs +36 -0
- package/msg/dty.js +36 -0
- package/msg/dty.mjs +36 -0
- package/msg/ee.js +36 -0
- package/msg/ee.mjs +36 -0
- package/msg/el.js +36 -0
- package/msg/el.mjs +36 -0
- package/msg/en-gb.js +36 -0
- package/msg/en-gb.mjs +36 -0
- package/msg/en.js +36 -0
- package/msg/en.mjs +36 -0
- package/msg/eo.js +36 -0
- package/msg/eo.mjs +36 -0
- package/msg/es.js +36 -0
- package/msg/es.mjs +36 -0
- package/msg/et.js +36 -0
- package/msg/et.mjs +36 -0
- package/msg/eu.js +36 -0
- package/msg/eu.mjs +36 -0
- package/msg/fa.js +36 -0
- package/msg/fa.mjs +36 -0
- package/msg/fi.js +36 -0
- package/msg/fi.mjs +36 -0
- package/msg/fo.js +36 -0
- package/msg/fo.mjs +36 -0
- package/msg/fr.js +36 -0
- package/msg/fr.mjs +36 -0
- package/msg/frr.js +36 -0
- package/msg/frr.mjs +36 -0
- package/msg/ga.js +36 -0
- package/msg/ga.mjs +36 -0
- package/msg/gl.js +36 -0
- package/msg/gl.mjs +36 -0
- package/msg/gn.js +36 -0
- package/msg/gn.mjs +36 -0
- package/msg/gor.js +36 -0
- package/msg/gor.mjs +36 -0
- package/msg/ha.js +36 -0
- package/msg/ha.mjs +36 -0
- package/msg/hak.js +36 -0
- package/msg/hak.mjs +36 -0
- package/msg/he.js +36 -0
- package/msg/he.mjs +36 -0
- package/msg/hi.js +36 -0
- package/msg/hi.mjs +36 -0
- package/msg/hr.js +36 -0
- package/msg/hr.mjs +36 -0
- package/msg/hrx.js +36 -0
- package/msg/hrx.mjs +36 -0
- package/msg/hsb.js +36 -0
- package/msg/hsb.mjs +36 -0
- package/msg/hu.js +36 -0
- package/msg/hu.mjs +36 -0
- package/msg/hy.js +36 -0
- package/msg/hy.mjs +36 -0
- package/msg/ia.js +36 -0
- package/msg/ia.mjs +36 -0
- package/msg/id.js +36 -0
- package/msg/id.mjs +36 -0
- package/msg/ig.js +36 -0
- package/msg/ig.mjs +36 -0
- package/msg/inh.js +36 -0
- package/msg/inh.mjs +36 -0
- package/msg/is.js +36 -0
- package/msg/is.mjs +36 -0
- package/msg/it.js +36 -0
- package/msg/it.mjs +36 -0
- package/msg/ja.js +36 -0
- package/msg/ja.mjs +36 -0
- package/msg/ka.js +36 -0
- package/msg/ka.mjs +36 -0
- package/msg/kab.js +36 -0
- package/msg/kab.mjs +36 -0
- package/msg/kbd-cyrl.js +36 -0
- package/msg/kbd-cyrl.mjs +36 -0
- package/msg/km.js +36 -0
- package/msg/km.mjs +36 -0
- package/msg/kn.js +36 -0
- package/msg/kn.mjs +36 -0
- package/msg/ko.js +36 -0
- package/msg/ko.mjs +36 -0
- package/msg/krc.js +36 -0
- package/msg/krc.mjs +36 -0
- package/msg/ksh.js +36 -0
- package/msg/ksh.mjs +36 -0
- package/msg/ku-latn.js +36 -0
- package/msg/ku-latn.mjs +36 -0
- package/msg/ky.js +36 -0
- package/msg/ky.mjs +36 -0
- package/msg/la.js +36 -0
- package/msg/la.mjs +36 -0
- package/msg/lb.js +36 -0
- package/msg/lb.mjs +36 -0
- package/msg/lki.js +36 -0
- package/msg/lki.mjs +36 -0
- package/msg/lo.js +36 -0
- package/msg/lo.mjs +36 -0
- package/msg/lrc.js +36 -0
- package/msg/lrc.mjs +36 -0
- package/msg/lt.js +36 -0
- package/msg/lt.mjs +36 -0
- package/msg/lv.js +36 -0
- package/msg/lv.mjs +36 -0
- package/msg/mg.js +36 -0
- package/msg/mg.mjs +36 -0
- package/msg/mk.js +36 -0
- package/msg/mk.mjs +36 -0
- package/msg/ml.js +36 -0
- package/msg/ml.mjs +36 -0
- package/msg/mnw.js +36 -0
- package/msg/mnw.mjs +36 -0
- package/msg/ms.js +36 -0
- package/msg/ms.mjs +36 -0
- package/msg/my.js +36 -0
- package/msg/my.mjs +36 -0
- package/msg/mzn.js +36 -0
- package/msg/mzn.mjs +36 -0
- package/msg/nb.js +36 -0
- package/msg/nb.mjs +36 -0
- package/msg/ne.js +36 -0
- package/msg/ne.mjs +36 -0
- package/msg/nl.js +36 -0
- package/msg/nl.mjs +36 -0
- package/msg/oc.js +36 -0
- package/msg/oc.mjs +36 -0
- package/msg/olo.js +36 -0
- package/msg/olo.mjs +36 -0
- package/msg/pa.js +36 -0
- package/msg/pa.mjs +36 -0
- package/msg/pl.js +36 -0
- package/msg/pl.mjs +36 -0
- package/msg/pms.js +36 -0
- package/msg/pms.mjs +36 -0
- package/msg/ps.js +36 -0
- package/msg/ps.mjs +36 -0
- package/msg/pt-br.js +36 -0
- package/msg/pt-br.mjs +36 -0
- package/msg/pt.js +36 -0
- package/msg/pt.mjs +36 -0
- package/msg/ro.js +36 -0
- package/msg/ro.mjs +36 -0
- package/msg/ru.js +36 -0
- package/msg/ru.mjs +36 -0
- package/msg/sc.js +36 -0
- package/msg/sc.mjs +36 -0
- package/msg/sco.js +36 -0
- package/msg/sco.mjs +36 -0
- package/msg/sd.js +36 -0
- package/msg/sd.mjs +36 -0
- package/msg/shn.js +36 -0
- package/msg/shn.mjs +36 -0
- package/msg/si.js +36 -0
- package/msg/si.mjs +36 -0
- package/msg/sk.js +36 -0
- package/msg/sk.mjs +36 -0
- package/msg/skr-arab.js +36 -0
- package/msg/skr-arab.mjs +36 -0
- package/msg/sl.js +36 -0
- package/msg/sl.mjs +36 -0
- package/msg/smn.js +36 -0
- package/msg/smn.mjs +36 -0
- package/msg/sq.js +36 -0
- package/msg/sq.mjs +36 -0
- package/msg/sr-latn.js +36 -0
- package/msg/sr-latn.mjs +36 -0
- package/msg/sr.js +36 -0
- package/msg/sr.mjs +36 -0
- package/msg/sv.js +36 -0
- package/msg/sv.mjs +36 -0
- package/msg/sw.js +36 -0
- package/msg/sw.mjs +36 -0
- package/msg/ta.js +36 -0
- package/msg/ta.mjs +36 -0
- package/msg/tcy.js +36 -0
- package/msg/tcy.mjs +36 -0
- package/msg/tdd.js +36 -0
- package/msg/tdd.mjs +36 -0
- package/msg/te.js +36 -0
- package/msg/te.mjs +36 -0
- package/msg/th.js +36 -0
- package/msg/th.mjs +36 -0
- package/msg/ti.js +36 -0
- package/msg/ti.mjs +36 -0
- package/msg/tl.js +36 -0
- package/msg/tl.mjs +36 -0
- package/msg/tlh.js +36 -0
- package/msg/tlh.mjs +36 -0
- package/msg/tr.js +36 -0
- package/msg/tr.mjs +36 -0
- package/msg/ug-arab.js +36 -0
- package/msg/ug-arab.mjs +36 -0
- package/msg/uk.js +36 -0
- package/msg/uk.mjs +36 -0
- package/msg/ur.js +36 -0
- package/msg/ur.mjs +36 -0
- package/msg/uz.js +36 -0
- package/msg/uz.mjs +36 -0
- package/msg/vi.js +36 -0
- package/msg/vi.mjs +36 -0
- package/msg/xmf.js +36 -0
- package/msg/xmf.mjs +36 -0
- package/msg/yo.js +36 -0
- package/msg/yo.mjs +36 -0
- package/msg/zgh.js +36 -0
- package/msg/zgh.mjs +36 -0
- package/msg/zh-hans.js +36 -0
- package/msg/zh-hans.mjs +36 -0
- package/msg/zh-hant.js +36 -0
- package/msg/zh-hant.mjs +36 -0
- package/package.json +2 -1
package/blockly.min.js
CHANGED
|
@@ -54,19 +54,20 @@ disposeUiStep$$module$build$src$core$block_animations,connectionUiEffect$$module
|
|
|
54
54
|
bumpIntoBoundsHandler$$module$build$src$core$bump_objects,extractObjectFromEvent$$module$build$src$core$bump_objects,bumpTopObjectsIntoBounds$$module$build$src$core$bump_objects,copy$$module$build$src$core$clipboard,getLastCopiedData$$module$build$src$core$clipboard,setLastCopiedData$$module$build$src$core$clipboard,getLastCopiedWorkspace$$module$build$src$core$clipboard,setLastCopiedWorkspace$$module$build$src$core$clipboard,getLastCopiedLocation$$module$build$src$core$clipboard,setLastCopiedLocation$$module$build$src$core$clipboard,
|
|
55
55
|
paste$$module$build$src$core$clipboard,pasteFromData$$module$build$src$core$clipboard,hasContextMenu$$module$build$src$core$interfaces$i_contextmenu,isCopyable$$module$build$src$core$interfaces$i_copyable,isDeletable$$module$build$src$core$interfaces$i_deletable,isDraggable$$module$build$src$core$interfaces$i_draggable,registerEscape$$module$build$src$core$shortcut_items,registerDelete$$module$build$src$core$shortcut_items,isCopyable$$module$build$src$core$shortcut_items,isCuttable$$module$build$src$core$shortcut_items,
|
|
56
56
|
registerCopy$$module$build$src$core$shortcut_items,registerCut$$module$build$src$core$shortcut_items,registerPaste$$module$build$src$core$shortcut_items,registerUndo$$module$build$src$core$shortcut_items,registerRedo$$module$build$src$core$shortcut_items,registerMovementShortcuts$$module$build$src$core$shortcut_items,registerShowContextMenu$$module$build$src$core$shortcut_items,registerArrowNavigation$$module$build$src$core$shortcut_items,registerFocusWorkspace$$module$build$src$core$shortcut_items,
|
|
57
|
-
registerFocusToolbox$$module$build$src$core$shortcut_items,registerReadInformation$$module$build$src$core$shortcut_items,registerReadExtendedInformation$$module$build$src$core$shortcut_items,registerDisconnectBlock$$module$build$src$core$shortcut_items,registerStackNavigation$$module$build$src$core$shortcut_items,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
getPhysicalToolboxPosition$$module$build$src$core$keyboard_nav$navigators$toolbox_navigator,isAutoHideable$$module$build$src$core$interfaces$i_autohideable,register$$module$build$src$core$icons$registry,unregister$$module$build$src$core$icons$registry,isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block,isObservable$$module$build$src$core$interfaces$i_observable,allProcedures$$module$build$src$core$procedures,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
registerCommentOptions$$module$build$src$core$contextmenu_items,registerDefaultOptions$$module$build$src$core$contextmenu_items,isBoundedElement$$module$build$src$core$interfaces$i_bounded_element,isPaster$$module$build$src$core$interfaces$i_paster,isRenderedElement$$module$build$src$core$interfaces$i_rendered_element,hideChaff$$module$build$src$core$blockly,isFocusableTree$$module$build$src$core$interfaces$i_focusable_tree
|
|
68
|
-
|
|
69
|
-
|
|
57
|
+
registerFocusToolbox$$module$build$src$core$shortcut_items,registerReadInformation$$module$build$src$core$shortcut_items,registerReadExtendedInformation$$module$build$src$core$shortcut_items,registerDisconnectBlock$$module$build$src$core$shortcut_items,registerStackNavigation$$module$build$src$core$shortcut_items,registerHeadingNavigation$$module$build$src$core$shortcut_items,registerPerformAction$$module$build$src$core$shortcut_items,registerDuplicate$$module$build$src$core$shortcut_items,registerCleanup$$module$build$src$core$shortcut_items,
|
|
58
|
+
registerShowTooltip$$module$build$src$core$shortcut_items,registerToggleScreenreaderMode$$module$build$src$core$shortcut_items,registerDefaultShortcuts$$module$build$src$core$shortcut_items,registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items,registerScreenReaderShortcuts$$module$build$src$core$shortcut_items,showUnconstrainedMoveHint$$module$build$src$core$hints,showConstrainedMovementHint$$module$build$src$core$hints,clearMoveHints$$module$build$src$core$hints,showHelpHint$$module$build$src$core$hints,
|
|
59
|
+
showBlockNavigationHint$$module$build$src$core$hints,showWorkspaceNavigationHint$$module$build$src$core$hints,showFlyoutLabelActionHint$$module$build$src$core$hints,showCopiedHint$$module$build$src$core$hints,showCutHint$$module$build$src$core$hints,clearPasteHints$$module$build$src$core$hints,showScreenreaderModeHint$$module$build$src$core$hints,getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy,navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy,
|
|
60
|
+
isCollapsibleToolboxItem$$module$build$src$core$interfaces$i_collapsible_toolbox_item,getPhysicalToolboxPosition$$module$build$src$core$keyboard_nav$navigators$toolbox_navigator,isAutoHideable$$module$build$src$core$interfaces$i_autohideable,register$$module$build$src$core$icons$registry,unregister$$module$build$src$core$icons$registry,isProcedureBlock$$module$build$src$core$interfaces$i_procedure_block,isObservable$$module$build$src$core$interfaces$i_observable,allProcedures$$module$build$src$core$procedures,
|
|
61
|
+
procTupleComparator$$module$build$src$core$procedures,isLegalName$$module$build$src$core$procedures,isNameUsed$$module$build$src$core$procedures,xmlFlyoutCategory$$module$build$src$core$procedures,internalFlyoutCategory$$module$build$src$core$procedures,flyoutCategory$$module$build$src$core$procedures,updateMutatorFlyout$$module$build$src$core$procedures,mutatorOpenListener$$module$build$src$core$procedures,mutatorChangeListener$$module$build$src$core$procedures,getCallers$$module$build$src$core$procedures,
|
|
62
|
+
blockIsModernCallerFor$$module$build$src$core$procedures,isDynamicShape$$module$build$src$core$renderers$common$constants,isPuzzleTab$$module$build$src$core$renderers$common$constants,isNotch$$module$build$src$core$renderers$common$constants,register$$module$build$src$core$renderers$common$block_rendering,unregister$$module$build$src$core$renderers$common$block_rendering,init$$module$build$src$core$renderers$common$block_rendering,stringButtonClickHandler$$module$build$src$core$variables_dynamic,
|
|
63
|
+
numberButtonClickHandler$$module$build$src$core$variables_dynamic,colourButtonClickHandler$$module$build$src$core$variables_dynamic,internalFlyoutCategory$$module$build$src$core$variables_dynamic,flyoutCategory$$module$build$src$core$variables_dynamic,xmlFlyoutCategory$$module$build$src$core$variables_dynamic,flyoutCategoryBlocks$$module$build$src$core$variables_dynamic,resizeSvgContents$$module$build$src$core$workspace_svg,saveProcedure$$module$build$src$core$serialization$procedures,loadProcedure$$module$build$src$core$serialization$procedures,
|
|
64
|
+
save$$module$build$src$core$serialization$workspaces,load$$module$build$src$core$serialization$workspaces,inject$$module$build$src$core$inject,createDom$$module$build$src$core$inject,createMainWorkspace$$module$build$src$core$inject,init$$module$build$src$core$inject,bindDocumentEvents$$module$build$src$core$inject,loadSounds$$module$build$src$core$inject,isFullBlockField$$module$build$src$core$contextmenu_items,registerUndo$$module$build$src$core$contextmenu_items,registerRedo$$module$build$src$core$contextmenu_items,
|
|
65
|
+
registerCleanup$$module$build$src$core$contextmenu_items,toggleOption_$$module$build$src$core$contextmenu_items,registerCollapse$$module$build$src$core$contextmenu_items,registerExpand$$module$build$src$core$contextmenu_items,addDeletableBlocks_$$module$build$src$core$contextmenu_items,getDeletableBlocks_$$module$build$src$core$contextmenu_items,deleteNext_$$module$build$src$core$contextmenu_items,registerDeleteAll$$module$build$src$core$contextmenu_items,registerWorkspaceOptions_$$module$build$src$core$contextmenu_items,
|
|
66
|
+
registerDuplicate$$module$build$src$core$contextmenu_items,registerComment$$module$build$src$core$contextmenu_items,registerInline$$module$build$src$core$contextmenu_items,registerCollapseExpandBlock$$module$build$src$core$contextmenu_items,registerDisable$$module$build$src$core$contextmenu_items,registerDelete$$module$build$src$core$contextmenu_items,registerHelp$$module$build$src$core$contextmenu_items,registerCommentDelete$$module$build$src$core$contextmenu_items,registerCommentDuplicate$$module$build$src$core$contextmenu_items,
|
|
67
|
+
registerCommentCreate$$module$build$src$core$contextmenu_items,registerBlockOptions_$$module$build$src$core$contextmenu_items,registerCommentOptions$$module$build$src$core$contextmenu_items,registerDefaultOptions$$module$build$src$core$contextmenu_items,isBoundedElement$$module$build$src$core$interfaces$i_bounded_element,isPaster$$module$build$src$core$interfaces$i_paster,isRenderedElement$$module$build$src$core$interfaces$i_rendered_element,hideChaff$$module$build$src$core$blockly,isFocusableTree$$module$build$src$core$interfaces$i_focusable_tree,
|
|
68
|
+
$jscomp;
|
|
69
|
+
register$$module$build$src$core$registry=function(a,b,c,d){if(!(a instanceof Type$$module$build$src$core$registry)&&typeof a!=="string"||`${a}`.trim()==="")throw Error('Invalid type "'+a+'". The type must be a non-empty string or a Blockly.registry.Type.');a=`${a}`.toLowerCase();if(typeof b!=="string"||b.trim()==="")throw Error('Invalid name "'+b+'". The name must be a non-empty string.');var e=b.toLowerCase();if(!c)throw Error("Can not register a null value");var f=typeMap$$module$build$src$core$registry[a],g=
|
|
70
|
+
nameMap$$module$build$src$core$registry[a];f||(f=typeMap$$module$build$src$core$registry[a]=Object.create(null),g=nameMap$$module$build$src$core$registry[a]=Object.create(null));validate$$module$build$src$core$registry(a,c);if(!d&&f[e]&&f[e]!==c)throw Error('Name "'+e+'" with type "'+a+'" already registered.');f[e]=c;g[e]=b};
|
|
70
71
|
validate$$module$build$src$core$registry=function(a,b){switch(a){case String(Type$$module$build$src$core$registry.FIELD):if(typeof b.fromJson!=="function")throw Error('Type "'+a+'" must have a fromJson function');}};
|
|
71
72
|
unregister$$module$build$src$core$registry=function(a,b){a=`${a}`.toLowerCase();b=b.toLowerCase();var c=typeMap$$module$build$src$core$registry[a];c&&c[b]?(delete typeMap$$module$build$src$core$registry[a][b],delete nameMap$$module$build$src$core$registry[a][b]):console.warn("Unable to unregister ["+b+"]["+a+"] from the registry.")};
|
|
72
73
|
getItem$$module$build$src$core$registry=function(a,b,c){a=`${a}`.toLowerCase();b=b.toLowerCase();var d=typeMap$$module$build$src$core$registry[a];if(!d||!d[b]){b="Unable to find ["+b+"]["+a+"] in the registry.";if(c)throw Error(b+" You must require or register a "+a+" plugin.");console.warn(b);return null}return d[b]};hasItem$$module$build$src$core$registry=function(a,b){a=`${a}`.toLowerCase();b=b.toLowerCase();return(a=typeMap$$module$build$src$core$registry[a])?!!a[b]:!1};
|
|
@@ -239,7 +240,7 @@ loadInputBlocks$$module$build$src$core$serialization$blocks=function(a,b){if(b.i
|
|
|
239
240
|
loadNextBlocks$$module$build$src$core$serialization$blocks=function(a,b){if(b.next){if(!a.nextConnection)throw new MissingConnection$$module$build$src$core$serialization$exceptions("next",a,b);loadConnection$$module$build$src$core$serialization$blocks(a.nextConnection,b.next)}};loadConnection$$module$build$src$core$serialization$blocks=function(a,b){b.shadow&&a.setShadowState(b.shadow);b.block&&appendPrivate$$module$build$src$core$serialization$blocks(b.block,a.getSourceBlock().workspace,{parentConnection:a})};
|
|
240
241
|
initBlock$$module$build$src$core$serialization$blocks=function(a,b){if(b){a.setConnectionTracking(!1);a.initSvg();a.queueRender();for(let c of a.getIcons())c.onLocationChange(a.getRelativeToSurfaceXY())}else a.initModel()};
|
|
241
242
|
getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting=function(a){a=getShortcutKeys$$module$build$src$core$utils$shortcut_formatting(a,shortModifierNames$$module$build$src$core$utils$shortcut_formatting);return a.length?a[0].join(APPLE$$module$build$src$core$utils$useragent?" ":" + "):""};getShortcutKeysLong$$module$build$src$core$utils$shortcut_formatting=function(a){return getShortcutKeys$$module$build$src$core$utils$shortcut_formatting(a,longModifierNames$$module$build$src$core$utils$shortcut_formatting)};
|
|
242
|
-
getKeyName$$module$build$src$core$utils$shortcut_formatting=function(a){if(a>=65&&a<=90)return String.fromCharCode(a);var b={8:$.Msg$$module$build$src$core$msg.BACKSPACE_KEY,9:$.Msg$$module$build$src$core$msg.TAB_KEY,13:$.Msg$$module$build$src$core$msg.ENTER_KEY,16:$.Msg$$module$build$src$core$msg.SHIFT_KEY,17:$.Msg$$module$build$src$core$msg.
|
|
243
|
+
getKeyName$$module$build$src$core$utils$shortcut_formatting=function(a){if(a>=65&&a<=90)return String.fromCharCode(a);var b={8:$.Msg$$module$build$src$core$msg.BACKSPACE_KEY,9:$.Msg$$module$build$src$core$msg.TAB_KEY,13:$.Msg$$module$build$src$core$msg.ENTER_KEY,16:$.Msg$$module$build$src$core$msg.SHIFT_KEY,17:$.Msg$$module$build$src$core$msg.CONTROL_KEY,18:$.Msg$$module$build$src$core$msg.ALT_KEY,19:$.Msg$$module$build$src$core$msg.PAUSE_KEY,20:$.Msg$$module$build$src$core$msg.CAPS_LOCK_KEY,27:$.Msg$$module$build$src$core$msg.ESCAPE,
|
|
243
244
|
32:$.Msg$$module$build$src$core$msg.SPACE_KEY,33:$.Msg$$module$build$src$core$msg.PAGE_UP_KEY,34:$.Msg$$module$build$src$core$msg.PAGE_DOWN_KEY,35:$.Msg$$module$build$src$core$msg.END_KEY,36:$.Msg$$module$build$src$core$msg.HOME_KEY,37:"\u2190",38:"\u2191",39:"\u2192",40:"\u2193",45:$.Msg$$module$build$src$core$msg.INSERT_KEY,46:$.Msg$$module$build$src$core$msg.DELETE_KEY,48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",93:$.Msg$$module$build$src$core$msg.CONTEXT_MENU_KEY,
|
|
244
245
|
96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"\u00d7",107:"+",109:"\u2212",110:".",111:"\u00f7",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",186:";",187:"=",189:"-",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"\u2318"}[a];if(b)return b;console.warn("Unknown key code: "+a);return String.fromCharCode(a)};
|
|
245
246
|
getShortcutKeys$$module$build$src$core$utils$shortcut_formatting=function(a,b){a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.getKeyCodesByShortcutName(a);if(a.length===0)return[];a=a.map(d=>d.split("+"));a.forEach(d=>d.sort((e,f)=>{e=modifierOrder$$module$build$src$core$utils$shortcut_formatting(e);f=modifierOrder$$module$build$src$core$utils$shortcut_formatting(f);return e-f}));a.sort((d,e)=>{d=d.includes("Meta")?1:0;return(e.includes("Meta")?1:0)-d});var c=a.filter(d=>d.includes("Meta")===
|
|
@@ -408,7 +409,8 @@ b,c),b===Verbosity$$module$build$src$core$utils$aria.LOQUACIOUS&&getParentToolbo
|
|
|
408
409
|
b>=Verbosity$$module$build$src$core$utils$aria.STANDARD&&getInputCountLabel$$module$build$src$core$block_aria_composer(a)].filter(d=>!!d).join(", ")};
|
|
409
410
|
configureAriaRole$$module$build$src$core$block_aria_composer=function(a){setRole$$module$build$src$core$utils$aria(a.getSvgRoot(),Role$$module$build$src$core$utils$aria.PRESENTATION);var b=a.getFocusableElement();a.isInFlyout||setRole$$module$build$src$core$utils$aria(b,Role$$module$build$src$core$utils$aria.FIGURE);var c=a.getAriaRoleDescription();setState$$module$build$src$core$utils$aria(b,State$$module$build$src$core$utils$aria.ROLEDESCRIPTION,c?c:a.statementInputCount?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_CONTAINER:
|
|
410
411
|
a.outputConnection?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_VALUE:$.Msg$$module$build$src$core$msg.BLOCK_LABEL_STATEMENT)};
|
|
411
|
-
computeFieldRowLabel$$module$build$src$core$block_aria_composer=function(a,b,c=Verbosity$$module$build$src$core$utils$aria.STANDARD){var d=c>=Verbosity$$module$build$src$core$utils$aria.LOQUACIOUS,e=a.fieldRow.filter(
|
|
412
|
+
computeFieldRowLabel$$module$build$src$core$block_aria_composer=function(a,b,c=Verbosity$$module$build$src$core$utils$aria.STANDARD){var d=c>=Verbosity$$module$build$src$core$utils$aria.LOQUACIOUS,e=[],f=a.fieldRow.filter(g=>g.isVisible()).flatMap((g,h,k)=>{if(g instanceof FieldLabel$$module$build$src$core$field_label){if(h<k.length-1&&k[h+1]instanceof FieldLabel$$module$build$src$core$field_label)return e.push(g.computeAriaLabel(d)),[];if(e.length>=1)return e.push(g.computeAriaLabel(d)),g=e.join(" "),
|
|
413
|
+
e=[],g}return g.computeAriaLabel(d)});if(!f.length&&b){let g=a.getSourceBlock().inputList;a=g.indexOf(a);if(a>0)return computeFieldRowLabel$$module$build$src$core$block_aria_composer(g[a-1],b,c)}return f.filter(g=>!!g)};
|
|
412
414
|
getParentInputLabel$$module$build$src$core$block_aria_composer=function(a){var b,c,d,e=(b=(d=a.outputConnection)!=null?d:a.previousConnection)==null?void 0:(c=b.targetConnection)==null?void 0:c.getParentInput();if(e&&(a=e.getSourceBlock(),!a.isInsertionMarker())){if(b=e.getAriaLabelText())a=b;else{if(!a.statementInputCount)return;a=a.inputList.find(f=>f.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT);if(e===a)return;a=computeFieldRowLabel$$module$build$src$core$block_aria_composer(e,
|
|
413
415
|
!0)}return e.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT?(e=Array.isArray(a)?a.join(" "):a,$.Msg$$module$build$src$core$msg.BLOCK_LABEL_BEGIN_PREFIX.replace("%1",e)):a}};getBeginStackLabel$$module$build$src$core$block_aria_composer=function(a){if(!a.isInFlyout&&!a.workspace.isDragging())return a.getRootBlock()===a?$.Msg$$module$build$src$core$msg.BLOCK_LABEL_BEGIN_STACK:void 0};
|
|
414
416
|
getInputLabels$$module$build$src$core$block_aria_composer=function(a,b=Verbosity$$module$build$src$core$utils$aria.STANDARD,c=!0){var d=a=a.inputList.filter(e=>e.isVisible());if(b<=Verbosity$$module$build$src$core$utils$aria.STANDARD){let e=a.filter(f=>f.type===$.inputTypes$$module$build$src$core$inputs$input_types.STATEMENT);e.length>1&&(d=a.slice(0,a.indexOf(e[0])+1))}return d.map(e=>{var f;return(f=c?e.getAriaLabelText():null)!=null?f:e.getLabel(b)})};
|
|
@@ -506,6 +508,11 @@ registerStackNavigation$$module$build$src$core$shortcut_items=function(){var a=(
|
|
|
506
508
|
callback:c=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);var d=a(c);if(!d)return!1;c=a(c,c.getNavigator().navigateStacks(d,-1));if(!c)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(c);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.B],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_PREVIOUS_STACK};ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.NEXT_STACK,
|
|
507
509
|
preconditionFn:c=>!c.isDragging()&&!!a(c)&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv(),callback:c=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);var d=a(c);if(!d)return!1;c=c.getNavigator().navigateStacks(d,1);if(!c)return!1;$.getFocusManager$$module$build$src$core$focus_manager().focusNode(c);return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.N],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_NEXT_STACK});
|
|
508
510
|
ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register(b)};
|
|
511
|
+
registerHeadingNavigation$$module$build$src$core$shortcut_items=function(){var a=()=>{var e=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedTree();if(e instanceof WorkspaceSvg$$module$build$src$core$workspace_svg&&e.isFlyout&&e.targetWorkspace){let f;return(f=e.targetWorkspace.getFlyout())!=null?f:null}return null},b=e=>{var f=e.getWorkspace().getNavigator();e=e.getContents().map(k=>k.getElement());for(var g,h=(g=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())!=
|
|
512
|
+
null?g:null;h&&!e.includes(h);)h=f.getParent(h);return h},c=(e,f)=>{var g=e.getContents().map(k=>k.getElement());e=(e=b(e))?g.indexOf(e):f===1?-1:g.length;for(let k=1;k<=g.length;k++){var h=e+f*k;if(h<0||h>=g.length)break;h=g[h];if(h instanceof FlyoutButton$$module$build$src$core$flyout_button&&h.isLabel())return h}return null},d=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.H,[KeyCodes$$module$build$src$core$utils$keycodes.SHIFT]);
|
|
513
|
+
d={name:names$$module$build$src$core$shortcut_items.PREVIOUS_HEADING,preconditionFn:e=>!e.isDragging()&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv()&&!!a(),callback:()=>{var e=a();if(!e)return!1;e=c(e,-1);if(!e)return!1;keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);$.getFocusManager$$module$build$src$core$focus_manager().focusNode(e);return!0},keyCodes:[d],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_PREVIOUS_HEADING};
|
|
514
|
+
ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.NEXT_HEADING,preconditionFn:e=>!e.isDragging()&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv()&&!!a(),callback:()=>{var e=a();if(!e)return!1;e=c(e,1);if(!e)return!1;keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);$.getFocusManager$$module$build$src$core$focus_manager().focusNode(e);
|
|
515
|
+
return!0},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.H],displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_NEXT_HEADING});ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register(d)};
|
|
509
516
|
registerPerformAction$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.PERFORM_ACTION,preconditionFn:a=>!a.isDragging()&&!isVisible$$module$build$src$core$dropdowndiv()&&!isVisible$$module$build$src$core$widgetdiv()&&!$.getFocusManager$$module$build$src$core$focus_manager().ephemeralFocusTaken(),callback:(a,b)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);
|
|
510
517
|
if((a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode())&&"performAction"in a){b.preventDefault();let c;(c=a.performAction)==null||c.call(a,b);return!0}return!1},keyCodes:[KeyCodes$$module$build$src$core$utils$keycodes.ENTER,KeyCodes$$module$build$src$core$utils$keycodes.SPACE],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_PERFORM_ACTION})};
|
|
511
518
|
registerDuplicate$$module$build$src$core$shortcut_items=function(){ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.DUPLICATE,preconditionFn:(a,b)=>{({focusedNode:b}=b);return!a.isDragging()&&!a.isReadOnly()&&!a.isFlyout&&(b instanceof BlockSvg$$module$build$src$core$block_svg?b.isDuplicatable():!0)},callback:(a,b,c,d)=>{keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0);b=
|
|
@@ -514,16 +521,18 @@ registerCleanup$$module$build$src$core$shortcut_items=function(){ShortcutRegistr
|
|
|
514
521
|
registerShowTooltip$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.J,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD]);ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.SHOW_TOOLTIP,preconditionFn:b=>!b.isDragging(),callback:b=>{var c=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();
|
|
515
522
|
c!==null&&(keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setIsActive(!0),display$$module$build$src$core$tooltip(c,b));return!0},keyCodes:[a],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_SHOW_TOOLTIP})};
|
|
516
523
|
registerToggleScreenreaderMode$$module$build$src$core$shortcut_items=function(){var a=ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.createSerializedKey(KeyCodes$$module$build$src$core$utils$keycodes.Z,[KeyCodes$$module$build$src$core$utils$keycodes.CTRL_CMD,KeyCodes$$module$build$src$core$utils$keycodes.ALT]),b=!1;ShortcutRegistry$$module$build$src$core$shortcut_registry.registry.register({name:names$$module$build$src$core$shortcut_items.TOGGLE_SCREENREADER,preconditionFn:()=>
|
|
517
|
-
!0,callback:c=>{b=!b;keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setScopeChangeAudioCuesEnabled(b);c.getNavigator().setNavigationLoops(!b);var
|
|
524
|
+
!0,callback:(c,d)=>{b=!b;keyboardNavigationController$$module$build$src$core$keyboard_navigation_controller.setScopeChangeAudioCuesEnabled(b);c.getNavigator().setNavigationLoops(!b);var e;(e=c.getToolbox())==null||e.getNavigator().setNavigationLoops(!b);var f;(f=c.getFlyout())==null||f.getWorkspace().getNavigator().setNavigationLoops(!b);showScreenreaderModeHint$$module$build$src$core$hints(c,b);d.preventDefault();return!0},keyCodes:[a],allowCollision:!0,displayText:()=>$.Msg$$module$build$src$core$msg.SHORTCUTS_TOGGLE_SCREENREADER_MODE})};
|
|
518
525
|
registerDefaultShortcuts$$module$build$src$core$shortcut_items=function(){registerEscape$$module$build$src$core$shortcut_items();registerDelete$$module$build$src$core$shortcut_items();registerCopy$$module$build$src$core$shortcut_items();registerCut$$module$build$src$core$shortcut_items();registerPaste$$module$build$src$core$shortcut_items();registerUndo$$module$build$src$core$shortcut_items();registerRedo$$module$build$src$core$shortcut_items()};
|
|
519
526
|
registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items=function(){registerShowContextMenu$$module$build$src$core$shortcut_items();registerMovementShortcuts$$module$build$src$core$shortcut_items();registerFocusWorkspace$$module$build$src$core$shortcut_items();registerFocusToolbox$$module$build$src$core$shortcut_items();registerArrowNavigation$$module$build$src$core$shortcut_items();registerDisconnectBlock$$module$build$src$core$shortcut_items();registerStackNavigation$$module$build$src$core$shortcut_items();
|
|
520
|
-
|
|
527
|
+
registerHeadingNavigation$$module$build$src$core$shortcut_items();registerPerformAction$$module$build$src$core$shortcut_items();registerDuplicate$$module$build$src$core$shortcut_items();registerCleanup$$module$build$src$core$shortcut_items();registerShowTooltip$$module$build$src$core$shortcut_items()};
|
|
528
|
+
registerScreenReaderShortcuts$$module$build$src$core$shortcut_items=function(){registerReadInformation$$module$build$src$core$shortcut_items();registerReadExtendedInformation$$module$build$src$core$shortcut_items();registerToggleScreenreaderMode$$module$build$src$core$shortcut_items()};
|
|
521
529
|
showUnconstrainedMoveHint$$module$build$src$core$hints=function(a,b=!1){var c=$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT.replace("%1",MAC$$module$build$src$core$utils$useragent||IPAD$$module$build$src$core$utils$useragent||IPHONE$$module$build$src$core$utils$useragent?$.Msg$$module$build$src$core$msg.COMMAND_KEY:$.Msg$$module$build$src$core$msg.CONTROL_KEY).replace("%2",$.Msg$$module$build$src$core$msg.ENTER_KEY);Toast$$module$build$src$core$toast.show(a,{message:c,id:unconstrainedMoveHintId$$module$build$src$core$hints,
|
|
522
530
|
oncePerSession:!b})};showConstrainedMovementHint$$module$build$src$core$hints=function(a){var b=$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_CONSTRAINED_MOVE_HINT.replace("%1",$.Msg$$module$build$src$core$msg.ENTER_KEY);Toast$$module$build$src$core$toast.show(a,{message:b,id:constrainedMoveHintId$$module$build$src$core$hints,oncePerSession:!0})};
|
|
523
531
|
clearMoveHints$$module$build$src$core$hints=function(a){Toast$$module$build$src$core$toast.hide(a,constrainedMoveHintId$$module$build$src$core$hints);Toast$$module$build$src$core$toast.hide(a,unconstrainedMoveHintId$$module$build$src$core$hints)};
|
|
524
532
|
showHelpHint$$module$build$src$core$hints=function(a){var b=getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting("list_shortcuts");b&&(b=$.Msg$$module$build$src$core$msg.HELP_PROMPT.replace("%1",b),Toast$$module$build$src$core$toast.show(a,{message:b,id:helpHintId$$module$build$src$core$hints}))};
|
|
525
533
|
showBlockNavigationHint$$module$build$src$core$hints=function(a){var b=getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting(a.RTL?names$$module$build$src$core$shortcut_items.NAVIGATE_LEFT:names$$module$build$src$core$shortcut_items.NAVIGATE_RIGHT);b=$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_BLOCK_NAVIGATION_HINT.replace("%1",b);Toast$$module$build$src$core$toast.show(a,{message:b,id:blockNavigationHintId$$module$build$src$core$hints})};
|
|
526
534
|
showWorkspaceNavigationHint$$module$build$src$core$hints=function(a){Toast$$module$build$src$core$toast.show(a,{message:$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT,id:workspaceNavigationHintId$$module$build$src$core$hints})};
|
|
535
|
+
showFlyoutLabelActionHint$$module$build$src$core$hints=function(a){var b=$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_FLYOUT_LABEL_HINT.replace("%1",getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting(names$$module$build$src$core$shortcut_items.NEXT_HEADING));Toast$$module$build$src$core$toast.show(a,{message:b,id:flyoutLabelHintId$$module$build$src$core$hints})};
|
|
527
536
|
showCopiedHint$$module$build$src$core$hints=function(a){Toast$$module$build$src$core$toast.show(a,{message:$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_COPIED_HINT.replace("%1",getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting(names$$module$build$src$core$shortcut_items.PASTE)),duration:7,id:copiedHintId$$module$build$src$core$hints})};
|
|
528
537
|
showCutHint$$module$build$src$core$hints=function(a){Toast$$module$build$src$core$toast.show(a,{message:$.Msg$$module$build$src$core$msg.KEYBOARD_NAV_CUT_HINT.replace("%1",getShortcutKeysShort$$module$build$src$core$utils$shortcut_formatting(names$$module$build$src$core$shortcut_items.PASTE)),duration:7,id:cutHintId$$module$build$src$core$hints})};
|
|
529
538
|
clearPasteHints$$module$build$src$core$hints=function(a){Toast$$module$build$src$core$toast.hide(a,cutHintId$$module$build$src$core$hints);Toast$$module$build$src$core$toast.hide(a,copiedHintId$$module$build$src$core$hints)};
|
|
@@ -1695,9 +1704,9 @@ new Size$$module$build$src$core$utils$size(a+f+d*2,e);var g=0;b.RTL?this.imageEl
|
|
|
1695
1704
|
"start");var b=!!this.borderRect_;a=Math.max(b?this.getConstants().FIELD_DROPDOWN_BORDER_RECT_HEIGHT:0,this.getConstants().FIELD_TEXT_HEIGHT);var c=getTextWidth$$module$build$src$core$utils$dom(this.getTextElement());b=b?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0;var d=0;this.svgArrow&&(d=this.positionSVGArrow(c+b,a/2-this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE/2));this.size_=new Size$$module$build$src$core$utils$size(c+d+b*2,a);this.positionTextElement_(b,c)}positionSVGArrow(a,b){if(!this.svgArrow)return 0;
|
|
1696
1705
|
var c=this.getSourceBlock();if(!c)throw new UnattachedFieldError$$module$build$src$core$field;var d=this.borderRect_?this.getConstants().FIELD_BORDER_RECT_X_PADDING:0,e=this.getConstants().FIELD_DROPDOWN_SVG_ARROW_PADDING,f=this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE;this.svgArrow.setAttribute("transform","translate("+(c.RTL?d:a+e)+","+b+")");return f+e}getText_(){if(!this.selectedOption)return null;var a=this.selectedOption[0];if(isImageProperties$$module$build$src$core$field_dropdown(a))return a.alt;
|
|
1697
1706
|
if(typeof HTMLElement!=="undefined"&&a instanceof HTMLElement){let b;return a.title||((b=a.ariaLabel)!=null?b:a.innerText)}if(typeof a==="string")return a;console.warn("Can't get text for existing dropdown option. If you're using HTMLElement dropdown options in node, ensure you're using jsdom-global or similar.");return null}static fromJson(a){if(!a.options)throw Error("options are required for the dropdown field. The options property must be assigned an array of [humanReadableValue, languageNeutralValue] tuples.");
|
|
1698
|
-
return new this(a.options,void 0,a)}trimOptions(a){var b=!1,c=a.map(g=>{if(g===FieldDropdown$$module$build$src$core$field_dropdown.SEPARATOR)return b=!0,g;var [h,k,l]=g;if(typeof h==="string")return g=[replaceMessageReferences$$module$build$src$core$utils$parsing(h),k],l&&g.push(l),g;b=!0;g=[isImageProperties$$module$build$src$core$field_dropdown(h)?Object.assign({},h,{alt:replaceMessageReferences$$module$build$src$core$utils$parsing(h.alt)}):
|
|
1699
|
-
var d=c.map(([g])=>g),e=shortestStringLength$$module$build$src$core$utils$string(d);a=commonWordPrefix$$module$build$src$core$utils$string(d,e);var f=commonWordSuffix$$module$build$src$core$utils$string(d,e);if(!a&&!f||e<=a+f)return{options:c};e=a?d[0].substring(0,a-1):void 0;d=f?d[0].substr(1-f):void 0;return{options:this.applyTrim(c,a,f),prefix:e,suffix:d}}applyTrim(a,b,
|
|
1700
|
-
if(!a.length)throw TypeError("FieldDropdown options must not be an empty array.");var b=!1;for(let c=0;c<a.length;c++){let d=a[c];Array.isArray(d)||d===FieldDropdown$$module$build$src$core$field_dropdown.SEPARATOR?typeof d[1]!=="string"?(b=!0,console.error(`Invalid option[${c}]: Each FieldDropdown option id must be a string.
|
|
1707
|
+
return new this(a.options,void 0,a)}trimOptions(a){var b=!1,c=a.map(g=>{if(g===FieldDropdown$$module$build$src$core$field_dropdown.SEPARATOR)return b=!0,g;var [h,k,l]=g;if(typeof h==="string")return g=[replaceMessageReferences$$module$build$src$core$utils$parsing(h),k],l&&g.push(replaceMessageReferences$$module$build$src$core$utils$parsing(l)),g;b=!0;g=[isImageProperties$$module$build$src$core$field_dropdown(h)?Object.assign({},h,{alt:replaceMessageReferences$$module$build$src$core$utils$parsing(h.alt)}):
|
|
1708
|
+
h,k];l&&g.push(replaceMessageReferences$$module$build$src$core$utils$parsing(l));return g});if(b||a.length<2)return{options:c};var d=c.map(([g])=>g),e=shortestStringLength$$module$build$src$core$utils$string(d);a=commonWordPrefix$$module$build$src$core$utils$string(d,e);var f=commonWordSuffix$$module$build$src$core$utils$string(d,e);if(!a&&!f||e<=a+f)return{options:c};e=a?d[0].substring(0,a-1):void 0;d=f?d[0].substr(1-f):void 0;return{options:this.applyTrim(c,a,f),prefix:e,suffix:d}}applyTrim(a,b,
|
|
1709
|
+
c){return a.map(([d,e,f])=>{d=d.substring(b,d.length-c);return f!==void 0?[d,e,f]:[d,e]})}validateOptions(a){if(!Array.isArray(a))throw TypeError("FieldDropdown options must be an array.");if(!a.length)throw TypeError("FieldDropdown options must not be an empty array.");var b=!1;for(let c=0;c<a.length;c++){let d=a[c];Array.isArray(d)||d===FieldDropdown$$module$build$src$core$field_dropdown.SEPARATOR?typeof d[1]!=="string"?(b=!0,console.error(`Invalid option[${c}]: Each FieldDropdown option id must be a string.
|
|
1701
1710
|
Found ${d[1]} in: ${d}`)):!d[0]||typeof d[0]==="string"||isImageProperties$$module$build$src$core$field_dropdown(d[0])||typeof HTMLElement!=="undefined"&&d[0]instanceof HTMLElement?d[2]&&typeof d[2]!=="string"&&(b=!0,console.error(`Invalid option[${c}]: Each FieldDropdown option ARIA label must be a string.
|
|
1702
1711
|
Found ${d[2]} in: ${d}`)):(b=!0,console.error(`Invalid option[${c}]: Each FieldDropdown option must have a string
|
|
1703
1712
|
label, image description, or HTML element. Found ${d[0]} in: ${d}`)):(b=!0,console.error(`Invalid option[${c}]: Each FieldDropdown option must be an array or
|
|
@@ -1896,19 +1905,33 @@ isEnabled$$module$build$src$core$events$utils()&&!d.isShadow()&&fire$$module$bui
|
|
|
1896
1905
|
register$$module$build$src$core$clipboard$registry(BlockPaster$$module$build$src$core$clipboard$block_paster.TYPE,new BlockPaster$$module$build$src$core$clipboard$block_paster);var module$build$src$core$clipboard$block_paster={};module$build$src$core$clipboard$block_paster.BlockPaster=BlockPaster$$module$build$src$core$clipboard$block_paster;module$build$src$core$clipboard$block_paster.moveBlockToNotConflict=moveBlockToNotConflict$$module$build$src$core$clipboard$block_paster;var bumpIntoBounds$$module$build$src$core$bump_objects=bumpObjectIntoBounds$$module$build$src$core$bump_objects,module$build$src$core$bump_objects={};module$build$src$core$bump_objects.bumpIntoBounds=bumpObjectIntoBounds$$module$build$src$core$bump_objects;module$build$src$core$bump_objects.bumpIntoBoundsHandler=bumpIntoBoundsHandler$$module$build$src$core$bump_objects;module$build$src$core$bump_objects.bumpTopObjectsIntoBounds=bumpTopObjectsIntoBounds$$module$build$src$core$bump_objects;var stashedCopyData$$module$build$src$core$clipboard=null,stashedWorkspace$$module$build$src$core$clipboard=null,stashedCoordinates$$module$build$src$core$clipboard=void 0,module$build$src$core$clipboard={};module$build$src$core$clipboard.BlockPaster=BlockPaster$$module$build$src$core$clipboard$block_paster;module$build$src$core$clipboard.copy=copy$$module$build$src$core$clipboard;module$build$src$core$clipboard.getLastCopiedData=getLastCopiedData$$module$build$src$core$clipboard;
|
|
1897
1906
|
module$build$src$core$clipboard.getLastCopiedLocation=getLastCopiedLocation$$module$build$src$core$clipboard;module$build$src$core$clipboard.getLastCopiedWorkspace=getLastCopiedWorkspace$$module$build$src$core$clipboard;module$build$src$core$clipboard.paste=paste$$module$build$src$core$clipboard;module$build$src$core$clipboard.registry=module$build$src$core$clipboard$registry;module$build$src$core$clipboard.setLastCopiedData=setLastCopiedData$$module$build$src$core$clipboard;
|
|
1898
1907
|
module$build$src$core$clipboard.setLastCopiedLocation=setLastCopiedLocation$$module$build$src$core$clipboard;module$build$src$core$clipboard.setLastCopiedWorkspace=setLastCopiedWorkspace$$module$build$src$core$clipboard;var module$build$src$core$comments={};module$build$src$core$comments.CollapseCommentBarButton=CollapseCommentBarButton$$module$build$src$core$comments$collapse_comment_bar_button;module$build$src$core$comments.CommentBarButton=CommentBarButton$$module$build$src$core$comments$comment_bar_button;module$build$src$core$comments.CommentEditor=CommentEditor$$module$build$src$core$comments$comment_editor;module$build$src$core$comments.CommentView=CommentView$$module$build$src$core$comments$comment_view;
|
|
1899
|
-
module$build$src$core$comments.DeleteCommentBarButton=DeleteCommentBarButton$$module$build$src$core$comments$delete_comment_bar_button;module$build$src$core$comments.RenderedWorkspaceComment=RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment;module$build$src$core$comments.WorkspaceComment=WorkspaceComment$$module$build$src$core$comments$workspace_comment;var module$build$src$core$
|
|
1908
|
+
module$build$src$core$comments.DeleteCommentBarButton=DeleteCommentBarButton$$module$build$src$core$comments$delete_comment_bar_button;module$build$src$core$comments.RenderedWorkspaceComment=RenderedWorkspaceComment$$module$build$src$core$comments$rendered_workspace_comment;module$build$src$core$comments.WorkspaceComment=WorkspaceComment$$module$build$src$core$comments$workspace_comment;var FlyoutButton$$module$build$src$core$flyout_button=class{constructor(a,b,c,d){this.workspace=a;this.targetWorkspace=b;this.isFlyoutLabel=d;this.height=this.width=0;this.cursorSvg=this.svgText=null;this.text=c.text;this.position=new Coordinate$$module$build$src$core$utils$coordinate(0,0);this.callbackKey=c.callbackKey||c.callbackkey;this.cssClass=c["web-class"]||null;this.info=c;a=this.isFlyoutLabel?"blocklyFlyoutLabel":"blocklyFlyoutButton";this.cssClass&&(a+=" "+this.cssClass);this.id=getNextUniqueId$$module$build$src$core$utils$idgenerator();
|
|
1909
|
+
this.svgGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{id:this.id,"class":a},this.workspace.getCanvas());if(!this.isFlyoutLabel){var e=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyFlyoutButtonShadow",rx:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,ry:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,x:1,y:1},this.svgGroup);setRole$$module$build$src$core$utils$aria(e,
|
|
1910
|
+
Role$$module$build$src$core$utils$aria.PRESENTATION)}a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":this.isFlyoutLabel?"blocklyFlyoutLabelBackground":"blocklyFlyoutButtonBackground",rx:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,ry:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS},this.svgGroup);setRole$$module$build$src$core$utils$aria(a,Role$$module$build$src$core$utils$aria.PRESENTATION);b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TEXT,
|
|
1911
|
+
{"class":this.isFlyoutLabel?"blocklyFlyoutLabelText":"blocklyText",x:0,y:0,"text-anchor":"middle"},this.svgGroup);c=replaceMessageReferences$$module$build$src$core$utils$parsing(this.text);this.workspace.RTL&&(c+="\u200f");b.textContent=c;this.isFlyoutLabel&&(this.svgText=b,this.workspace.getThemeManager().subscribe(this.svgText,"flyoutForegroundColour","fill"));setRole$$module$build$src$core$utils$aria(b,Role$$module$build$src$core$utils$aria.PRESENTATION);d=`${c}, ${this.isFlyoutLabel?$.Msg$$module$build$src$core$msg.ARIA_LABEL_HEADING:
|
|
1912
|
+
$.Msg$$module$build$src$core$msg.ARIA_LABEL_BUTTON}`;setState$$module$build$src$core$utils$aria(this.getFocusableElement(),State$$module$build$src$core$utils$aria.LABEL,d);setRole$$module$build$src$core$utils$aria(this.getFocusableElement(),Role$$module$build$src$core$utils$aria.LISTITEM);d=getComputedStyle$$module$build$src$core$utils$style(b,"fontSize");var f=getComputedStyle$$module$build$src$core$utils$style(b,"fontWeight"),g=getComputedStyle$$module$build$src$core$utils$style(b,"fontFamily");
|
|
1913
|
+
this.width=getFastTextWidthWithSizeString$$module$build$src$core$utils$dom(b,d,f,g);c=measureFontMetrics$$module$build$src$core$utils$dom(c,d,f,g);this.height=this.height||c.height;if(!this.isFlyoutLabel){this.width+=2*FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_X;this.height+=2*FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_Y;let h;(h=e)==null||h.setAttribute("width",String(this.width));let k;(k=e)==null||k.setAttribute("height",String(this.height))}a.setAttribute("width",
|
|
1914
|
+
String(this.width));a.setAttribute("height",String(this.height));b.setAttribute("x",String(this.width/2));b.setAttribute("y",String(this.height/2-c.height/2+c.baseline));this.updateTransform();this.onMouseDownWrapper=conditionalBind$$module$build$src$core$browser_events(this.svgGroup,"pointerdown",this,this.onMouseDown);this.onMouseUpWrapper=conditionalBind$$module$build$src$core$browser_events(this.svgGroup,"pointerup",this,this.onMouseUp)}createDom(){return this.svgGroup}show(){this.updateTransform();
|
|
1915
|
+
this.svgGroup.setAttribute("display","block")}updateTransform(){this.svgGroup.setAttribute("transform","translate("+this.position.x+","+this.position.y+")")}moveTo(a,b){this.position.x=a;this.position.y=b;this.updateTransform()}moveBy(a,b,c){this.moveTo(this.position.x+a,this.position.y+b)}isLabel(){return this.isFlyoutLabel}getPosition(){return this.position}getBoundingRectangle(){return new Rect$$module$build$src$core$utils$rect(this.position.y,this.position.y+this.height,this.position.x,this.position.x+
|
|
1916
|
+
this.width)}getButtonText(){return this.text}getTargetWorkspace(){return this.targetWorkspace}getWorkspace(){return this.workspace}dispose(){unbind$$module$build$src$core$browser_events(this.onMouseDownWrapper);unbind$$module$build$src$core$browser_events(this.onMouseUpWrapper);this.svgGroup&&removeNode$$module$build$src$core$utils$dom(this.svgGroup);this.svgText&&this.workspace.getThemeManager().unsubscribe(this.svgText)}setCursorSvg(a){a?this.svgGroup&&(this.svgGroup.appendChild(a),this.cursorSvg=
|
|
1917
|
+
a):this.cursorSvg=null}onMouseUp(a){(a=this.targetWorkspace.getGesture(a))&&a.cancel();this.isFlyoutLabel&&this.callbackKey?console.warn("Labels should not have callbacks. Label text: "+this.text):this.isFlyoutLabel||this.callbackKey&&this.targetWorkspace.getButtonCallback(this.callbackKey)?this.isFlyoutLabel||(a=this.targetWorkspace.getButtonCallback(this.callbackKey))&&a(this):console.warn("Buttons should have callbacks. Button text: "+this.text)}onMouseDown(a){var b=this.targetWorkspace.getGesture(a),
|
|
1918
|
+
c=this.targetWorkspace.getFlyout();b&&c&&b.handleFlyoutStart(a,c)}getSvgRoot(){return this.svgGroup}getFocusableElement(){return this.svgGroup}getFocusableTree(){return this.workspace}onNodeFocus(){var a=this.getPosition();a=new Rect$$module$build$src$core$utils$rect(a.y,a.y+this.height,a.x,a.x+this.width);this.workspace.scrollBoundsIntoView(a)}onNodeBlur(){}canBeFocused(){return!0}getId(){return this.id}performAction(){if(this.isFlyoutLabel)showFlyoutLabelActionHint$$module$build$src$core$hints(this.targetWorkspace);
|
|
1919
|
+
else{var a=this.targetWorkspace.getButtonCallback(this.callbackKey);a&&a(this)}}};FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_X=5;FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_Y=2;FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS=4;register$$module$build$src$core$css("\n.blocklyFlyoutButton {\n fill: #888;\n cursor: default;\n}\n\n.blocklyFlyoutButtonShadow {\n fill: #666;\n}\n\n@media (hover: hover) {\n .blocklyFlyoutButton:hover {\n fill: #aaa;\n }\n}\n\n.blocklyFlyoutButton:active {\n fill: #aaa;\n}\n\n.blocklyFlyoutLabel {\n cursor: default;\n}\n\n.blocklyFlyoutLabelBackground {\n opacity: 0;\n}\n");
|
|
1920
|
+
var module$build$src$core$flyout_button={};module$build$src$core$flyout_button.FlyoutButton=FlyoutButton$$module$build$src$core$flyout_button;var module$build$src$core$interfaces$i_contextmenu={};module$build$src$core$interfaces$i_contextmenu.hasContextMenu=hasContextMenu$$module$build$src$core$interfaces$i_contextmenu;var module$build$src$core$interfaces$i_copyable={};module$build$src$core$interfaces$i_copyable.isCopyable=isCopyable$$module$build$src$core$interfaces$i_copyable;var module$build$src$core$interfaces$i_deletable={};module$build$src$core$interfaces$i_deletable.isDeletable=isDeletable$$module$build$src$core$interfaces$i_deletable;var DragDisposition$$module$build$src$core$interfaces$i_draggable;(function(a){a[a.COMMIT=1]="COMMIT";a[a.DELETE=2]="DELETE";a[a.REVERT=3]="REVERT"})(DragDisposition$$module$build$src$core$interfaces$i_draggable||(DragDisposition$$module$build$src$core$interfaces$i_draggable={}));var module$build$src$core$interfaces$i_draggable={};module$build$src$core$interfaces$i_draggable.DragDisposition=DragDisposition$$module$build$src$core$interfaces$i_draggable;
|
|
1900
1921
|
module$build$src$core$interfaces$i_draggable.isDraggable=isDraggable$$module$build$src$core$interfaces$i_draggable;var names$$module$build$src$core$shortcut_items;
|
|
1901
1922
|
(function(a){a.ESCAPE="escape";a.DELETE="delete";a.COPY="copy";a.CUT="cut";a.PASTE="paste";a.UNDO="undo";a.REDO="redo";a.MENU="menu";a.FOCUS_WORKSPACE="focus_workspace";a.FOCUS_TOOLBOX="focus_toolbox";a.START_MOVE="start_move";a.START_MOVE_STACK="start_move_stack";a.FINISH_MOVE="finish_move";a.ABORT_MOVE="abort_move";a.MOVE_UP="move_up";a.MOVE_DOWN="move_down";a.MOVE_LEFT="move_left";a.MOVE_RIGHT="move_right";a.NAVIGATE_RIGHT="right";a.NAVIGATE_LEFT="left";a.NAVIGATE_UP="up";a.NAVIGATE_DOWN="down";
|
|
1902
|
-
a.DISCONNECT="disconnect";a.NEXT_STACK="next_stack";a.PREVIOUS_STACK="previous_stack";a.INFORMATION="information";a.EXTENDED_INFORMATION="extended_information";a.PERFORM_ACTION="perform_action";a.DUPLICATE="duplicate";a.CLEANUP="cleanup";a.SHOW_TOOLTIP="show_tooltip";a.TOGGLE_SCREENREADER="toggle_screenreader"})(names$$module$build$src$core$shortcut_items||(names$$module$build$src$core$shortcut_items={}));
|
|
1923
|
+
a.DISCONNECT="disconnect";a.NEXT_STACK="next_stack";a.PREVIOUS_STACK="previous_stack";a.INFORMATION="information";a.EXTENDED_INFORMATION="extended_information";a.PERFORM_ACTION="perform_action";a.DUPLICATE="duplicate";a.CLEANUP="cleanup";a.SHOW_TOOLTIP="show_tooltip";a.NEXT_HEADING="next_heading";a.PREVIOUS_HEADING="previous_heading";a.TOGGLE_SCREENREADER="toggle_screenreader"})(names$$module$build$src$core$shortcut_items||(names$$module$build$src$core$shortcut_items={}));
|
|
1903
1924
|
var resolveWorkspace$$module$build$src$core$shortcut_items=a=>{if(a.isFlyout){let c=a.targetWorkspace;if(c)return resolveWorkspace$$module$build$src$core$shortcut_items(c)}var b;return(b=a.getRootWorkspace())!=null?b:a};registerDefaultShortcuts$$module$build$src$core$shortcut_items();registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items();registerScreenReaderShortcuts$$module$build$src$core$shortcut_items();var module$build$src$core$shortcut_items={};
|
|
1904
1925
|
module$build$src$core$shortcut_items.names=names$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerArrowNavigation=registerArrowNavigation$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerCleanup=registerCleanup$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerCopy=registerCopy$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerCut=registerCut$$module$build$src$core$shortcut_items;
|
|
1905
1926
|
module$build$src$core$shortcut_items.registerDefaultShortcuts=registerDefaultShortcuts$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerDelete=registerDelete$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerDisconnectBlock=registerDisconnectBlock$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerDuplicate=registerDuplicate$$module$build$src$core$shortcut_items;
|
|
1906
|
-
module$build$src$core$shortcut_items.registerEscape=registerEscape$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerFocusToolbox=registerFocusToolbox$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerFocusWorkspace=registerFocusWorkspace$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.
|
|
1907
|
-
module$build$src$core$shortcut_items.
|
|
1908
|
-
module$build$src$core$shortcut_items.
|
|
1909
|
-
module$build$src$core$shortcut_items.
|
|
1910
|
-
|
|
1911
|
-
module$build$src$core$hints
|
|
1927
|
+
module$build$src$core$shortcut_items.registerEscape=registerEscape$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerFocusToolbox=registerFocusToolbox$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerFocusWorkspace=registerFocusWorkspace$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerHeadingNavigation=registerHeadingNavigation$$module$build$src$core$shortcut_items;
|
|
1928
|
+
module$build$src$core$shortcut_items.registerKeyboardNavigationShortcuts=registerKeyboardNavigationShortcuts$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerMovementShortcuts=registerMovementShortcuts$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerPaste=registerPaste$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerPerformAction=registerPerformAction$$module$build$src$core$shortcut_items;
|
|
1929
|
+
module$build$src$core$shortcut_items.registerReadExtendedInformation=registerReadExtendedInformation$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerReadInformation=registerReadInformation$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerRedo=registerRedo$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerScreenReaderShortcuts=registerScreenReaderShortcuts$$module$build$src$core$shortcut_items;
|
|
1930
|
+
module$build$src$core$shortcut_items.registerShowContextMenu=registerShowContextMenu$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerShowTooltip=registerShowTooltip$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerStackNavigation=registerStackNavigation$$module$build$src$core$shortcut_items;module$build$src$core$shortcut_items.registerToggleScreenreaderMode=registerToggleScreenreaderMode$$module$build$src$core$shortcut_items;
|
|
1931
|
+
module$build$src$core$shortcut_items.registerUndo=registerUndo$$module$build$src$core$shortcut_items;var unconstrainedMoveHintId$$module$build$src$core$hints="unconstrainedMoveHint",constrainedMoveHintId$$module$build$src$core$hints="constrainedMoveHint",helpHintId$$module$build$src$core$hints="helpHint",blockNavigationHintId$$module$build$src$core$hints="blockNavigationHint",workspaceNavigationHintId$$module$build$src$core$hints="workspaceNavigationHint",flyoutLabelHintId$$module$build$src$core$hints="flyoutLabelHint",copiedHintId$$module$build$src$core$hints="copiedHint",cutHintId$$module$build$src$core$hints=
|
|
1932
|
+
"cutHint",screenreaderHintId$$module$build$src$core$hints="screenreaderHint",module$build$src$core$hints={};module$build$src$core$hints.clearMoveHints=clearMoveHints$$module$build$src$core$hints;module$build$src$core$hints.clearPasteHints=clearPasteHints$$module$build$src$core$hints;module$build$src$core$hints.showBlockNavigationHint=showBlockNavigationHint$$module$build$src$core$hints;module$build$src$core$hints.showConstrainedMovementHint=showConstrainedMovementHint$$module$build$src$core$hints;
|
|
1933
|
+
module$build$src$core$hints.showCopiedHint=showCopiedHint$$module$build$src$core$hints;module$build$src$core$hints.showCutHint=showCutHint$$module$build$src$core$hints;module$build$src$core$hints.showFlyoutLabelActionHint=showFlyoutLabelActionHint$$module$build$src$core$hints;module$build$src$core$hints.showHelpHint=showHelpHint$$module$build$src$core$hints;module$build$src$core$hints.showScreenreaderModeHint=showScreenreaderModeHint$$module$build$src$core$hints;
|
|
1934
|
+
module$build$src$core$hints.showUnconstrainedMoveHint=showUnconstrainedMoveHint$$module$build$src$core$hints;module$build$src$core$hints.showWorkspaceNavigationHint=showWorkspaceNavigationHint$$module$build$src$core$hints;var MoveMode$$module$build$src$core$dragging$block_drag_strategy;(function(a){a[a.CONSTRAINED=1]="CONSTRAINED";a[a.UNCONSTRAINED=2]="UNCONSTRAINED"})(MoveMode$$module$build$src$core$dragging$block_drag_strategy||(MoveMode$$module$build$src$core$dragging$block_drag_strategy={}));
|
|
1912
1935
|
var BlockDragStrategy$$module$build$src$core$dragging$block_drag_strategy=class{constructor(a){this.block=a;this.connectionPreviewer=this.connectionCandidate=this.startLoc=this.startChildConn=this.startParentConn=null;this.dragging=!1;this.allConnectionPairs=[];this.moveMode=MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED;this.originalEventGroup="";this.BLOCK_CONNECTION_OFFSET=10;this.workspace=a.workspace}isMovable(){var a;return this.block.isOwnMovable()&&!this.block.isDeadOrDying()&&
|
|
1913
1936
|
!this.workspace.isReadOnly()&&(!this.block.isInFlyout||this.block.isEnabled()&&!((a=this.block.workspace.targetWorkspace)==null?0:a.isReadOnly()))}positionNewBlock(a,b){a=wsToScreenCoordinates$$module$build$src$core$utils$svg_math(a.workspace,a.getRelativeToSurfaceXY());a=screenToWsCoordinates$$module$build$src$core$utils$svg_math(b.workspace,a);b.moveDuringDrag(a)}getTargetBlock(){if(this.block.isShadow()){var a=this.block.getParent();if(a)return a}else if(this.block.isInFlyout&&this.block.workspace.targetWorkspace&&
|
|
1914
1937
|
(a=this.block.getRootBlock(),a=save$$module$build$src$core$serialization$blocks(a)))return a=appendInternal$$module$build$src$core$serialization$blocks(a,this.block.workspace.targetWorkspace,{recordUndo:!0}),$.setRecordUndo$$module$build$src$core$events$utils(!1),this.positionNewBlock(this.block,a),$.setRecordUndo$$module$build$src$core$events$utils(!0),a;return this.block}announceMove(a=!1){if(this.connectionCandidate)a=computeMoveLabel$$module$build$src$core$block_aria_composer(this.connectionCandidate.local,
|
|
@@ -1921,13 +1944,13 @@ this.allConnectionPairs.push({local:e,neighbour:d})}}getVisibleBubbles(a){return
|
|
|
1921
1944
|
!(a.shiftKey||!this.block.previousConnection):!1}shouldDisconnect(a){return!!(this.block.getParent()||a&&this.block.nextConnection&&this.block.nextConnection.targetBlock())}disconnectBlock(a){this.block.unplug(a);disconnectUiEffect$$module$build$src$core$block_animations(this.block)}storeInitialConnections(a){var b=null,c=null,d;if((d=this.block.outputConnection)==null?0:d.isConnected())b=this.block.outputConnection,c=this.block.outputConnection.targetConnection;else{let e;if((e=this.block.previousConnection)==
|
|
1922
1945
|
null?0:e.isConnected())b=this.block.previousConnection,c=this.block.previousConnection.targetConnection}this.startParentConn=c;b&&c?this.connectionCandidate={local:b,neighbour:c,distance:0}:a&&(a=this.block.nextConnection,b=a==null?void 0:a.targetConnection,a&&b&&(this.connectionCandidate={local:a,neighbour:b,distance:0}),this.startChildConn=b!=null?b:null)}fireDragStartEvent(){var a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_DRAG))(this.block,
|
|
1923
1946
|
!0,this.block.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}fireDragEndEvent(){var a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_DRAG))(this.block,!1,this.block.getDescendants(!1));fire$$module$build$src$core$events$utils(a)}fireMoveEvent(){if(!this.block.isDeadOrDying()){var a=new (get$$module$build$src$core$events$utils(EventType$$module$build$src$core$events$type.BLOCK_MOVE))(this.block);a.setReason(["drag"]);a.oldCoordinate=
|
|
1924
|
-
this.startLoc;a.recordNew();fire$$module$build$src$core$events$utils(a)}}drag(a,b){this.moveMode=b instanceof KeyboardEvent&&!b.ctrlKey&&!b.metaKey?MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED:MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED;this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED&&this.block.moveDuringDrag(a);this.updateConnectionPreview(this.block,Coordinate$$module$build$src$core$utils$coordinate.difference(a,
|
|
1947
|
+
this.startLoc;a.recordNew();fire$$module$build$src$core$events$utils(a)}}drag(a,b){this.moveMode=b instanceof KeyboardEvent&&!b.ctrlKey&&!b.metaKey?MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED:MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED;this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.UNCONSTRAINED&&this.block.moveDuringDrag(a);b=!!this.connectionCandidate;this.updateConnectionPreview(this.block,Coordinate$$module$build$src$core$utils$coordinate.difference(a,
|
|
1925
1948
|
this.startLoc));if(this.connectionCandidate){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED){let {local:c,neighbour:d}=this.connectionCandidate;a=this.startLoc.x+(d.x-c.x);b=this.startLoc.y+(d.y-c.y);let e=this.BLOCK_CONNECTION_OFFSET;c.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT||c.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?(a+=e,b+=e):(a-=e,b-=e);this.block.moveDuringDrag(new Coordinate$$module$build$src$core$utils$coordinate(a,
|
|
1926
|
-
b))}}else this.moveMode
|
|
1927
|
-
neighbour:h}=f;f=g.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE||g.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT;var k,l=h.isConnected()&&!((k=h.targetBlock())==null?0:k.isInsertionMarker());if(f&&l&&!this.orphanCanConnectAtEnd(a,h.targetBlock(),g.type)){var m;(m=this.connectionPreviewer)==null||m.previewReplacement(g,h,h.targetBlock())}else{let p;(p=this.connectionPreviewer)==null||p.previewConnection(g,h)}return h}m=c==
|
|
1928
|
-
var n;k=(n=m==null?void 0:m.getRootBlock())!=null?n:m;k===a&&(k=m);m=this.getDirectionToNewLocation(Coordinate$$module$build$src$core$utils$coordinate.sum(this.startLoc,b));if(k=(l=k)==null?void 0:l.getBoundingRectangle()){switch(m){case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT:case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:l=new Coordinate$$module$build$src$core$utils$coordinate(k.getOrigin().x,k.getOrigin().y-
|
|
1929
|
-
break;default:l=new Coordinate$$module$build$src$core$utils$coordinate(k.getOrigin().x,k.getOrigin().y+k.getHeight()+this.BLOCK_CONNECTION_OFFSET*2)}a.moveDuringDrag(l);(f=this.connectionPreviewer)==null||f.hidePreview();this.connectionCandidate=null}}orphanCanConnectAtEnd(a,b,c){return!!Connection$$module$build$src$core$connection.getConnectionForOrphanedConnection(a,c===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?b.outputConnection:
|
|
1930
|
-
b,c){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED)return!1;var {local:d,neighbour:e}=a;a=new Coordinate$$module$build$src$core$utils$coordinate(d.x,d.y);var f=new Coordinate$$module$build$src$core$utils$coordinate(e.x,e.y);b=Coordinate$$module$build$src$core$utils$coordinate.distance(Coordinate$$module$build$src$core$utils$coordinate.sum(a,b),f);return c.distance>b-$.config$$module$build$src$core$config.currentConnectionPreference}getConnectionCandidate(a){return this.moveMode===
|
|
1949
|
+
b))}}else if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED){this.allConnectionPairs.length||showUnconstrainedMoveHint$$module$build$src$core$hints(this.workspace,!0);b||this.workspace.getAudioManager().playErrorBeep();return}this.announceMove()}updateConnectionPreview(a,b){var c=this.connectionCandidate,d,e=(d=this.getInitialCandidate())!=null?d:this.getConnectionCandidate(b);if(e){var f=c&&this.currCandidateIsBetter(c,b,e)?c:e;this.connectionCandidate=f;
|
|
1950
|
+
var {local:g,neighbour:h}=f;f=g.type===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE||g.type===ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT;var k,l=h.isConnected()&&!((k=h.targetBlock())==null?0:k.isInsertionMarker());if(f&&l&&!this.orphanCanConnectAtEnd(a,h.targetBlock(),g.type)){var m;(m=this.connectionPreviewer)==null||m.previewReplacement(g,h,h.targetBlock())}else{let p;(p=this.connectionPreviewer)==null||p.previewConnection(g,h)}return h}m=c==
|
|
1951
|
+
null?void 0:c.neighbour.getSourceBlock();var n;k=(n=m==null?void 0:m.getRootBlock())!=null?n:m;k===a&&(k=m);m=this.getDirectionToNewLocation(Coordinate$$module$build$src$core$utils$coordinate.sum(this.startLoc,b));if(k=(l=k)==null?void 0:l.getBoundingRectangle()){switch(m){case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.LEFT:case Direction$$module$build$src$core$keyboard_nav$keyboard_mover.UP:l=new Coordinate$$module$build$src$core$utils$coordinate(k.getOrigin().x,k.getOrigin().y-
|
|
1952
|
+
this.BLOCK_CONNECTION_OFFSET*2-a.getHeightWidth().height);break;default:l=new Coordinate$$module$build$src$core$utils$coordinate(k.getOrigin().x,k.getOrigin().y+k.getHeight()+this.BLOCK_CONNECTION_OFFSET*2)}a.moveDuringDrag(l);(f=this.connectionPreviewer)==null||f.hidePreview();this.connectionCandidate=null}}orphanCanConnectAtEnd(a,b,c){return!!Connection$$module$build$src$core$connection.getConnectionForOrphanedConnection(a,c===ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE?b.outputConnection:
|
|
1953
|
+
b.previousConnection)}currCandidateIsBetter(a,b,c){if(this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED)return!1;var {local:d,neighbour:e}=a;a=new Coordinate$$module$build$src$core$utils$coordinate(d.x,d.y);var f=new Coordinate$$module$build$src$core$utils$coordinate(e.x,e.y);b=Coordinate$$module$build$src$core$utils$coordinate.distance(Coordinate$$module$build$src$core$utils$coordinate.sum(a,b),f);return c.distance>b-$.config$$module$build$src$core$config.currentConnectionPreference}getConnectionCandidate(a){return this.moveMode===
|
|
1931
1954
|
MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED?this.findTraversalCandidate(a):this.getClosestCandidate(this.block,a)}getClosestCandidate(a,b){var c=this.getSearchRadius();a=this.getLocalConnections(a);var d=null;for(let e of a){let {connection:f,radius:g}=e.closest(c,b);f&&(d={local:e,neighbour:f,distance:g},c=g)}return d}getSearchRadius(){return this.moveMode===MoveMode$$module$build$src$core$dragging$block_drag_strategy.CONSTRAINED?Infinity:this.connectionCandidate?$.config$$module$build$src$core$config.connectingSnapRadius:
|
|
1932
1955
|
$.config$$module$build$src$core$config.snapRadius}getLocalConnections(a){var b=a.getConnections_(!1),c=a.lastConnectionInStack(!0);c&&c!==a.nextConnection&&b.push(c);a=[a.outputConnection,a.previousConnection,a.nextConnection].filter(d=>!!d);c=[];for(let d of b)a.includes(d)||c.push(d);c.reverse();return[...a,...c]}endDrag(a,b){b===DragDisposition$$module$build$src$core$interfaces$i_draggable.DELETE&&disposeUiEffect$$module$build$src$core$block_animations(this.block);this.originalEventGroup=$.getGroup$$module$build$src$core$events$utils();
|
|
1933
1956
|
this.fireDragEndEvent();this.fireMoveEvent();stopTextWidthCache$$module$build$src$core$utils$dom();disconnectUiStop$$module$build$src$core$block_animations();var c;(c=this.connectionPreviewer)==null||c.hidePreview();if(!this.block.isDeadOrDying()&&this.dragging){let d;(d=this.workspace.getLayerManager())==null||d.moveOffDragLayer(this.block,BLOCK$$module$build$src$core$layers);this.getVisibleBubbles(this.block).forEach(e=>{var f;return(f=this.workspace.getLayerManager())==null?void 0:f.moveOffDragLayer(e,
|
|
@@ -1988,7 +2011,7 @@ a+=c.height-d;b=Math.max(b,c.width)}return{height:a,width:b}}fadeForReplacement(
|
|
|
1988
2011
|
Object.assign({},{kind:"BLOCK"},save$$module$build$src$core$serialization$blocks(this)),b=new Set(["id","height","width","pinned","enabled"]),c=function(d){for(let e in d)b.has(e)?delete d[e]:typeof d[e]==="object"&&c(d[e])};c(a);return[a]}jsonInit(a){super.jsonInit(a);a.classes&&this.addClass(Array.isArray(a.classes)?a.classes.join(" "):a.classes)}getNestingLevel(){var a=this.getSurroundParent();return a?a.getNestingLevel()+1:0}getFocusableElement(){var a=this.getFullBlockField();return a?a.getFocusableElement():
|
|
1989
2012
|
this.pathObject.svgPath}getFocusableTree(){return this.workspace}onNodeFocus(){this.recomputeAriaContext();this.select();var a=$.getFocusManager$$module$build$src$core$focus_manager().getFocusedNode();a&&a!==this&&finishQueuedRenders$$module$build$src$core$render_management().then(()=>{this.workspace.scrollBoundsIntoView(this.getBoundingRectangleWithoutChildren())})}onNodeBlur(){this.unselect()}canBeFocused(){return!0}performAction(a){if(this.workspace.isFlyout)KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.startMove(this,
|
|
1990
2013
|
a);else{if(this.isSimpleReporter())for(let b of this.inputList)for(let c of b.fieldRow)if(c.isClickable()&&c.isFullBlockField()){c.showEditor();return}this.workspace.getNavigator().getInNode(this)?showBlockNavigationHint$$module$build$src$core$hints(this.workspace):showHelpHint$$module$build$src$core$hints(this.workspace)}}getParents(){for(var a=new Set,b=this.getParent();b;)a.add(b),b=b.getParent();return a}getOutputParents(){var a=new Set;a.add(this);for(var b,c=(b=this.outputConnection)==null?
|
|
1991
|
-
void 0:b.targetBlock();c;){a.add(c);let d;c=(d=c.outputConnection)==null?void 0:d.targetBlock()}return a}getRowId(){var a,b,c=(a=this.outputConnection)==null?void 0:(b=a.targetConnection)==null?void 0:b.getParentInput();return c?c.getRowId():this.id}recomputeAriaContext(){this.getFullBlockField()||(setState$$module$build$src$core$utils$aria(this.getFocusableElement(),State$$module$build$src$core$utils$aria.LABEL,
|
|
2014
|
+
void 0:b.targetBlock();c;){a.add(c);let d;c=(d=c.outputConnection)==null?void 0:d.targetBlock()}return a}getRowId(){var a,b,c=(a=this.outputConnection)==null?void 0:(b=a.targetConnection)==null?void 0:b.getParentInput();return c?c.getRowId():this.id}recomputeAriaContext(){this.getFullBlockField()||(setState$$module$build$src$core$utils$aria(this.getFocusableElement(),State$$module$build$src$core$utils$aria.LABEL,this.getAriaLabel(Verbosity$$module$build$src$core$utils$aria.STANDARD)),configureAriaRole$$module$build$src$core$block_aria_composer(this))}getAriaLabel(a){return computeAriaLabel$$module$build$src$core$block_aria_composer(this,
|
|
1992
2015
|
a,!1)}getStackBlocksCountLabel(){for(var a=1,b=this.getNextBlock();b;)a++,b=b.getNextBlock();return a<=1?computeAriaLabel$$module$build$src$core$block_aria_composer(this,Verbosity$$module$build$src$core$utils$aria.TERSE):$.Msg$$module$build$src$core$msg.BLOCK_LABEL_STACK_BLOCKS.replace("%1",a.toString())}};BlockSvg$$module$build$src$core$block_svg.INLINE=-1;BlockSvg$$module$build$src$core$block_svg.COLLAPSED_WARNING_ID="TEMP_COLLAPSED_WARNING_";var module$build$src$core$block_svg={};
|
|
1993
2016
|
module$build$src$core$block_svg.BlockSvg=BlockSvg$$module$build$src$core$block_svg;var DragTarget$$module$build$src$core$drag_target=class{constructor(){}onDragEnter(a){}onDragOver(a){}onDragExit(a){}onDrop(a){}getClientRect(){return null}shouldPreventMove(a){return!1}},module$build$src$core$drag_target={};module$build$src$core$drag_target.DragTarget=DragTarget$$module$build$src$core$drag_target;var DeleteArea$$module$build$src$core$delete_area=class extends DragTarget$$module$build$src$core$drag_target{constructor(){super();this.wouldDelete_=!1}wouldDelete(a){KeyboardMover$$module$build$src$core$keyboard_nav$keyboard_mover.mover.isMoving()?this.updateWouldDelete_(!1):a instanceof BlockSvg$$module$build$src$core$block_svg?(a=!a.getParent()&&a.isDeletable(),this.updateWouldDelete_(a)):this.updateWouldDelete_(isDeletable$$module$build$src$core$interfaces$i_deletable(a)&&a.isDeletable());return this.wouldDelete_}updateWouldDelete_(a){this.wouldDelete_=
|
|
1994
2017
|
a}},module$build$src$core$delete_area={};module$build$src$core$delete_area.DeleteArea=DeleteArea$$module$build$src$core$delete_area;var FlyoutItem$$module$build$src$core$flyout_item=class{constructor(a,b){this.element=a;this.type=b}getElement(){return this.element}getType(){return this.type}},module$build$src$core$flyout_item={};module$build$src$core$flyout_item.FlyoutItem=FlyoutItem$$module$build$src$core$flyout_item;var MetricsManager$$module$build$src$core$metrics_manager=class{constructor(a){this.workspace_=a}getDimensionsPx_(a){var b=0,c=0;a&&(b=a.getWidth(),c=a.getHeight());return new Size$$module$build$src$core$utils$size(b,c)}getFlyoutMetrics(a){a=this.getDimensionsPx_(this.workspace_.getFlyout(a));return{width:a.width,height:a.height,position:this.workspace_.toolboxPosition}}getToolboxMetrics(){var a=this.getDimensionsPx_(this.workspace_.getToolbox());return{width:a.width,height:a.height,position:this.workspace_.toolboxPosition}}getSvgMetrics(){return this.workspace_.getCachedParentSvgSize()}getAbsoluteMetrics(){var a=
|
|
@@ -2000,19 +2023,7 @@ c.top:b.top;var e=c.left!==void 0?c.left:b.left;return{top:d/a,left:e/a,width:((
|
|
|
2000
2023
|
e,f);return{contentHeight:f.height,contentWidth:f.width,contentTop:f.top,contentLeft:f.left,scrollHeight:g.height,scrollWidth:g.width,scrollTop:g.top,scrollLeft:g.left,viewHeight:e.height,viewWidth:e.width,viewTop:e.top,viewLeft:e.left,absoluteTop:d.top,absoluteLeft:d.left,svgHeight:c.height,svgWidth:c.width,toolboxWidth:a.width,toolboxHeight:a.height,toolboxPosition:a.position,flyoutWidth:b.width,flyoutHeight:b.height}}};
|
|
2001
2024
|
register$$module$build$src$core$registry(Type$$module$build$src$core$registry.METRICS_MANAGER,DEFAULT$$module$build$src$core$registry,MetricsManager$$module$build$src$core$metrics_manager);var module$build$src$core$metrics_manager={};module$build$src$core$metrics_manager.MetricsManager=MetricsManager$$module$build$src$core$metrics_manager;var FlyoutMetricsManager$$module$build$src$core$flyout_metrics_manager=class extends MetricsManager$$module$build$src$core$metrics_manager{constructor(a,b){super(a);this.flyout_=b}getBoundingBox(){try{var a=this.workspace_.getCanvas().getBBox()}catch(b){a={height:0,y:0,width:0,x:0}}return a}getContentMetrics(a){var b=this.getBoundingBox();a=a?1:this.workspace_.scale;return{height:b.height*a,width:b.width*a,top:b.y*a,left:b.x*a}}getScrollMetrics(a,b,c){b=c||this.getContentMetrics();c=this.flyout_.MARGIN*
|
|
2002
2025
|
this.workspace_.scale;a=a?this.workspace_.scale:1;return{height:(b.height+2*c)/a,width:(b.width+b.left+c)/a,top:0,left:0}}},module$build$src$core$flyout_metrics_manager={};module$build$src$core$flyout_metrics_manager.FlyoutMetricsManager=FlyoutMetricsManager$$module$build$src$core$flyout_metrics_manager;var FlyoutSeparator$$module$build$src$core$flyout_separator=class{constructor(a,b){this.gap=a;this.axis=b;this.y=this.x=0}getBoundingRectangle(){switch(this.axis){case "x":return new Rect$$module$build$src$core$utils$rect(this.y,this.y,this.x,this.x+this.gap);case "y":return new Rect$$module$build$src$core$utils$rect(this.y,this.y+this.gap,this.x,this.x)}}moveBy(a,b,c){this.x+=a;this.y+=b}isNavigable(){return!1}getFocusableElement(){throw Error("Cannot be focused");}getFocusableTree(){throw Error("Cannot be focused");
|
|
2003
|
-
}onNodeFocus(){}onNodeBlur(){}canBeFocused(){return!1}},module$build$src$core$flyout_separator={};module$build$src$core$flyout_separator.FlyoutSeparator=FlyoutSeparator$$module$build$src$core$flyout_separator;var
|
|
2004
|
-
this.svgGroup=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.G,{id:this.id,"class":a},this.workspace.getCanvas());if(!this.isFlyoutLabel){var e=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":"blocklyFlyoutButtonShadow",rx:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,ry:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,x:1,y:1},this.svgGroup);setRole$$module$build$src$core$utils$aria(e,
|
|
2005
|
-
Role$$module$build$src$core$utils$aria.PRESENTATION)}a=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.RECT,{"class":this.isFlyoutLabel?"blocklyFlyoutLabelBackground":"blocklyFlyoutButtonBackground",rx:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS,ry:FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS},this.svgGroup);setRole$$module$build$src$core$utils$aria(a,Role$$module$build$src$core$utils$aria.PRESENTATION);b=createSvgElement$$module$build$src$core$utils$dom(Svg$$module$build$src$core$utils$svg.TEXT,
|
|
2006
|
-
{"class":this.isFlyoutLabel?"blocklyFlyoutLabelText":"blocklyText",x:0,y:0,"text-anchor":"middle"},this.svgGroup);c=replaceMessageReferences$$module$build$src$core$utils$parsing(this.text);this.workspace.RTL&&(c+="\u200f");b.textContent=c;this.isFlyoutLabel&&(this.svgText=b,this.workspace.getThemeManager().subscribe(this.svgText,"flyoutForegroundColour","fill"));setRole$$module$build$src$core$utils$aria(b,Role$$module$build$src$core$utils$aria.PRESENTATION);d=`${c}, ${this.isFlyoutLabel?$.Msg$$module$build$src$core$msg.ARIA_LABEL_HEADING:
|
|
2007
|
-
$.Msg$$module$build$src$core$msg.ARIA_LABEL_BUTTON}`;setState$$module$build$src$core$utils$aria(this.getFocusableElement(),State$$module$build$src$core$utils$aria.LABEL,d);setRole$$module$build$src$core$utils$aria(this.getFocusableElement(),Role$$module$build$src$core$utils$aria.LISTITEM);d=getComputedStyle$$module$build$src$core$utils$style(b,"fontSize");var f=getComputedStyle$$module$build$src$core$utils$style(b,"fontWeight"),g=getComputedStyle$$module$build$src$core$utils$style(b,"fontFamily");
|
|
2008
|
-
this.width=getFastTextWidthWithSizeString$$module$build$src$core$utils$dom(b,d,f,g);c=measureFontMetrics$$module$build$src$core$utils$dom(c,d,f,g);this.height=this.height||c.height;if(!this.isFlyoutLabel){this.width+=2*FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_X;this.height+=2*FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_Y;let h;(h=e)==null||h.setAttribute("width",String(this.width));let k;(k=e)==null||k.setAttribute("height",String(this.height))}a.setAttribute("width",
|
|
2009
|
-
String(this.width));a.setAttribute("height",String(this.height));b.setAttribute("x",String(this.width/2));b.setAttribute("y",String(this.height/2-c.height/2+c.baseline));this.updateTransform();this.onMouseDownWrapper=conditionalBind$$module$build$src$core$browser_events(this.svgGroup,"pointerdown",this,this.onMouseDown);this.onMouseUpWrapper=conditionalBind$$module$build$src$core$browser_events(this.svgGroup,"pointerup",this,this.onMouseUp)}createDom(){return this.svgGroup}show(){this.updateTransform();
|
|
2010
|
-
this.svgGroup.setAttribute("display","block")}updateTransform(){this.svgGroup.setAttribute("transform","translate("+this.position.x+","+this.position.y+")")}moveTo(a,b){this.position.x=a;this.position.y=b;this.updateTransform()}moveBy(a,b,c){this.moveTo(this.position.x+a,this.position.y+b)}isLabel(){return this.isFlyoutLabel}getPosition(){return this.position}getBoundingRectangle(){return new Rect$$module$build$src$core$utils$rect(this.position.y,this.position.y+this.height,this.position.x,this.position.x+
|
|
2011
|
-
this.width)}getButtonText(){return this.text}getTargetWorkspace(){return this.targetWorkspace}getWorkspace(){return this.workspace}dispose(){unbind$$module$build$src$core$browser_events(this.onMouseDownWrapper);unbind$$module$build$src$core$browser_events(this.onMouseUpWrapper);this.svgGroup&&removeNode$$module$build$src$core$utils$dom(this.svgGroup);this.svgText&&this.workspace.getThemeManager().unsubscribe(this.svgText)}setCursorSvg(a){a?this.svgGroup&&(this.svgGroup.appendChild(a),this.cursorSvg=
|
|
2012
|
-
a):this.cursorSvg=null}onMouseUp(a){(a=this.targetWorkspace.getGesture(a))&&a.cancel();this.isFlyoutLabel&&this.callbackKey?console.warn("Labels should not have callbacks. Label text: "+this.text):this.isFlyoutLabel||this.callbackKey&&this.targetWorkspace.getButtonCallback(this.callbackKey)?this.isFlyoutLabel||(a=this.targetWorkspace.getButtonCallback(this.callbackKey))&&a(this):console.warn("Buttons should have callbacks. Button text: "+this.text)}onMouseDown(a){var b=this.targetWorkspace.getGesture(a),
|
|
2013
|
-
c=this.targetWorkspace.getFlyout();b&&c&&b.handleFlyoutStart(a,c)}getSvgRoot(){return this.svgGroup}getFocusableElement(){return this.svgGroup}getFocusableTree(){return this.workspace}onNodeFocus(){var a=this.getPosition();a=new Rect$$module$build$src$core$utils$rect(a.y,a.y+this.height,a.x,a.x+this.width);this.workspace.scrollBoundsIntoView(a)}onNodeBlur(){}canBeFocused(){return!0}getId(){return this.id}performAction(){if(!this.isFlyoutLabel){let a=this.targetWorkspace.getButtonCallback(this.callbackKey);
|
|
2014
|
-
a&&a(this)}}};FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_X=5;FlyoutButton$$module$build$src$core$flyout_button.TEXT_MARGIN_Y=2;FlyoutButton$$module$build$src$core$flyout_button.BORDER_RADIUS=4;register$$module$build$src$core$css("\n.blocklyFlyoutButton {\n fill: #888;\n cursor: default;\n}\n\n.blocklyFlyoutButtonShadow {\n fill: #666;\n}\n\n@media (hover: hover) {\n .blocklyFlyoutButton:hover {\n fill: #aaa;\n }\n}\n\n.blocklyFlyoutButton:active {\n fill: #aaa;\n}\n\n.blocklyFlyoutLabel {\n cursor: default;\n}\n\n.blocklyFlyoutLabelBackground {\n opacity: 0;\n}\n");
|
|
2015
|
-
var module$build$src$core$flyout_button={};module$build$src$core$flyout_button.FlyoutButton=FlyoutButton$$module$build$src$core$flyout_button;var FlyoutButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$flyout_button_navigation_policy=class{getFirstChild(a){return null}getParent(a){return a.getWorkspace()}getNextSibling(a){return null}getPreviousSibling(a){return null}getRowId(a){return a.getId()}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof FlyoutButton$$module$build$src$core$flyout_button}},module$build$src$core$keyboard_nav$navigation_policies$flyout_button_navigation_policy={};
|
|
2026
|
+
}onNodeFocus(){}onNodeBlur(){}canBeFocused(){return!1}},module$build$src$core$flyout_separator={};module$build$src$core$flyout_separator.FlyoutSeparator=FlyoutSeparator$$module$build$src$core$flyout_separator;var FlyoutButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$flyout_button_navigation_policy=class{getFirstChild(a){return null}getParent(a){return a.getWorkspace()}getNextSibling(a){return null}getPreviousSibling(a){return null}getRowId(a){return a.getId()}isNavigable(a){return a.canBeFocused()}isApplicable(a){return a instanceof FlyoutButton$$module$build$src$core$flyout_button}},module$build$src$core$keyboard_nav$navigation_policies$flyout_button_navigation_policy={};
|
|
2016
2027
|
module$build$src$core$keyboard_nav$navigation_policies$flyout_button_navigation_policy.FlyoutButtonNavigationPolicy=FlyoutButtonNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$flyout_button_navigation_policy;var FlyoutSeparatorNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$flyout_separator_navigation_policy=class{getFirstChild(a){return null}getParent(a){return null}getNextSibling(a){return null}getPreviousSibling(a){return null}getRowId(){return"error"}isNavigable(a){return!1}isApplicable(a){return a instanceof FlyoutSeparator$$module$build$src$core$flyout_separator}},module$build$src$core$keyboard_nav$navigation_policies$flyout_separator_navigation_policy={};
|
|
2017
2028
|
module$build$src$core$keyboard_nav$navigation_policies$flyout_separator_navigation_policy.FlyoutSeparatorNavigationPolicy=FlyoutSeparatorNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$flyout_separator_navigation_policy;var BlockNavigationPolicy$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy=class{getFirstChild(a){return getBlockNavigationCandidates$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a)[0]}getParent(a){var b;if((b=a.previousConnection)==null?0:b.targetBlock()){if(b=a.getSurroundParent())return b}else{let c;if((c=a.outputConnection)==null?0:c.targetBlock())return a.outputConnection.targetBlock()}return a.workspace}getNextSibling(a){if(a.nextConnection){let c;
|
|
2018
2029
|
return(c=a.nextConnection.targetBlock())!=null?c:a.nextConnection}var b;return((b=a.outputConnection)==null?0:b.targetConnection)?(b=this.getParent(a),navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(b,a,1)):null}getPreviousSibling(a){var b;if((b=a.previousConnection)==null?0:b.targetBlock())return a.previousConnection;var c;return((c=a.outputConnection)==null?0:c.targetBlock())?navigateBlock$$module$build$src$core$keyboard_nav$navigation_policies$block_navigation_policy(a.outputConnection.targetBlock(),
|
|
@@ -2629,7 +2640,7 @@ null||d.scrollToStart()}else{let c;(c=this.flyout)==null||c.hide()}}fireSelectEv
|
|
|
2629
2640
|
b.isCollapsible())&&((c=this.selectedItem_)==null?void 0:c.isExpanded())!==a?(this.selectedItem_.toggleExpanded(),!0):!1}dispose(){this.workspace_.getComponentManager().removeComponent("toolbox");var a;(a=this.flyout)==null||a.dispose();this.contents.forEach(b=>b.dispose());for(a=0;a<this.boundEvents_.length;a++)unbind$$module$build$src$core$browser_events(this.boundEvents_[a]);this.boundEvents_=[];this.contents.clear();this.HtmlDiv&&(this.workspace_.getThemeManager().unsubscribe(this.HtmlDiv),removeNode$$module$build$src$core$utils$dom(this.HtmlDiv));
|
|
2630
2641
|
$.getFocusManager$$module$build$src$core$focus_manager().unregisterTree(this)}getFocusableElement(){if(!this.HtmlDiv)throw Error("Toolbox DOM has not yet been created.");return this.HtmlDiv}getFocusableTree(){return this}onNodeFocus(){}onNodeBlur(){}canBeFocused(){return!0}getRootFocusableNode(){return this}getRestoredFocusableNode(a){if(!a||a===this){let b;return(b=this.getToolboxItems().find(c=>c.isSelectable()))!=null?b:null}return null}getNestedTrees(){return[]}lookUpFocusableNode(a){return this.getToolboxItemById(a)}onTreeFocus(a,
|
|
2631
2642
|
b){a!==this?this.getSelectedItem()===a||this.mouseDown||this.setSelectedItem(a):this.clearSelection()}onTreeBlur(a){var b;a&&a===((b=this.flyout)==null?void 0:b.getWorkspace())||this.autoHide(!1)}getNavigator(){return this.navigator}};register$$module$build$src$core$css('\n.blocklyToolboxDelete {\n cursor: url("<<<PATH>>>/handdelete.cur"), auto;\n}\n\n.blocklyToolboxGrab {\n cursor: url("<<<PATH>>>/handclosed.cur"), auto;\n cursor: grabbing;\n cursor: -webkit-grabbing;\n}\n\n/* Category tree in Toolbox. */\n.blocklyToolbox {\n box-sizing: border-box;\n user-select: none;\n -ms-user-select: none;\n -webkit-user-select: none;\n background-color: #ddd;\n overflow-x: visible;\n overflow-y: auto;\n padding: 4px 0 4px 0;\n position: absolute;\n z-index: 70; /* so blocks go under toolbox when dragging */\n -webkit-tap-highlight-color: transparent; /* issue #1345 */\n}\n\n.blocklyToolboxCategoryGroup {\n display: flex;\n flex-wrap: wrap;\n flex-direction: column;\n}\n\n.blocklyToolboxCategoryGroup:focus {\n outline: none;\n}\n');
|
|
2632
|
-
register$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX,DEFAULT$$module$build$src$core$registry,Toolbox$$module$build$src$core$toolbox$toolbox);var module$build$src$core$toolbox$toolbox={};module$build$src$core$toolbox$toolbox.Toolbox=Toolbox$$module$build$src$core$toolbox$toolbox;var module$build$src$core$interfaces$i_navigation_policy={};var VERSION$$module$build$src$core$blockly="13.0.0-beta.
|
|
2643
|
+
register$$module$build$src$core$registry(Type$$module$build$src$core$registry.TOOLBOX,DEFAULT$$module$build$src$core$registry,Toolbox$$module$build$src$core$toolbox$toolbox);var module$build$src$core$toolbox$toolbox={};module$build$src$core$toolbox$toolbox.Toolbox=Toolbox$$module$build$src$core$toolbox$toolbox;var module$build$src$core$interfaces$i_navigation_policy={};var VERSION$$module$build$src$core$blockly="13.0.0-beta.5",INPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.INPUT_VALUE,OUTPUT_VALUE$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.OUTPUT_VALUE,NEXT_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.NEXT_STATEMENT,PREVIOUS_STATEMENT$$module$build$src$core$blockly=ConnectionType$$module$build$src$core$connection_type.PREVIOUS_STATEMENT,
|
|
2633
2644
|
TOOLBOX_AT_TOP$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.TOP,TOOLBOX_AT_BOTTOM$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.BOTTOM,TOOLBOX_AT_LEFT$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.LEFT,TOOLBOX_AT_RIGHT$$module$build$src$core$blockly=Position$$module$build$src$core$utils$toolbox.RIGHT,svgResize$$module$build$src$core$blockly=svgResize$$module$build$src$core$common,getMainWorkspace$$module$build$src$core$blockly=
|
|
2634
2645
|
getMainWorkspace$$module$build$src$core$common,getSelected$$module$build$src$core$blockly=getSelected$$module$build$src$core$common,defineBlocksWithJsonArray$$module$build$src$core$blockly=defineBlocksWithJsonArray$$module$build$src$core$common,setParentContainer$$module$build$src$core$blockly=setParentContainer$$module$build$src$core$common,COLLAPSE_CHARS$$module$build$src$core$blockly=COLLAPSE_CHARS$$module$build$src$core$internal_constants,OPPOSITE_TYPE$$module$build$src$core$blockly=OPPOSITE_TYPE$$module$build$src$core$internal_constants,
|
|
2635
2646
|
RENAME_VARIABLE_ID$$module$build$src$core$blockly=RENAME_VARIABLE_ID$$module$build$src$core$internal_constants,DELETE_VARIABLE_ID$$module$build$src$core$blockly=DELETE_VARIABLE_ID$$module$build$src$core$internal_constants,COLLAPSED_INPUT_NAME$$module$build$src$core$blockly=COLLAPSED_INPUT_NAME$$module$build$src$core$constants,COLLAPSED_FIELD_NAME$$module$build$src$core$blockly=COLLAPSED_FIELD_NAME$$module$build$src$core$constants,VARIABLE_CATEGORY_NAME$$module$build$src$core$blockly=CATEGORY_NAME$$module$build$src$core$variables,
|
|
@@ -2843,6 +2854,7 @@ Blockly.Msg["KEYBOARD_NAV_BLOCK_NAVIGATION_HINT"] = "Use %1 to navigate inside o
|
|
|
2843
2854
|
Blockly.Msg["KEYBOARD_NAV_CONSTRAINED_MOVE_HINT"] = "Use the arrow keys to move, then %1 to accept the position.";
|
|
2844
2855
|
Blockly.Msg["KEYBOARD_NAV_COPIED_HINT"] = "Copied. Press %1 to paste.";
|
|
2845
2856
|
Blockly.Msg["KEYBOARD_NAV_CUT_HINT"] = "Cut. Press %1 to paste.";
|
|
2857
|
+
Blockly.Msg["KEYBOARD_NAV_FLYOUT_LABEL_HINT"] = "Use the arrow keys to navigate to a block, or press %1 to go to the next heading.";
|
|
2846
2858
|
Blockly.Msg["KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT"] = "Hold %1 and use arrow keys to move freely, then %2 to accept the position.";
|
|
2847
2859
|
Blockly.Msg["KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT"] = "Use the arrow keys to navigate.";
|
|
2848
2860
|
Blockly.Msg["LINUX"] = "Linux";
|
|
@@ -2935,7 +2947,13 @@ Blockly.Msg["LOGIC_BOOLEAN_FALSE"] = "false";
|
|
|
2935
2947
|
Blockly.Msg["LOGIC_BOOLEAN_HELPURL"] = "https://github.com/RaspberryPiFoundation/blockly/wiki/Logic#values";
|
|
2936
2948
|
Blockly.Msg["LOGIC_BOOLEAN_TOOLTIP"] = "Returns either true or false.";
|
|
2937
2949
|
Blockly.Msg["LOGIC_BOOLEAN_TRUE"] = "true";
|
|
2950
|
+
Blockly.Msg["LOGIC_COMPARE_EQ_ARIA"] = "equals";
|
|
2951
|
+
Blockly.Msg["LOGIC_COMPARE_GTE_ARIA"] = "greater than or equal to";
|
|
2952
|
+
Blockly.Msg["LOGIC_COMPARE_GT_ARIA"] = "greater than";
|
|
2938
2953
|
Blockly.Msg["LOGIC_COMPARE_HELPURL"] = "https://en.wikipedia.org/wiki/Inequality_(mathematics)";
|
|
2954
|
+
Blockly.Msg["LOGIC_COMPARE_LTE_ARIA"] = "less than or equal to";
|
|
2955
|
+
Blockly.Msg["LOGIC_COMPARE_LT_ARIA"] = "less than";
|
|
2956
|
+
Blockly.Msg["LOGIC_COMPARE_NEQ_ARIA"] = "not equals";
|
|
2939
2957
|
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_EQ"] = "Return true if both inputs equal each other.";
|
|
2940
2958
|
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_GT"] = "Return true if the first input is greater than the second input.";
|
|
2941
2959
|
Blockly.Msg["LOGIC_COMPARE_TOOLTIP_GTE"] = "Return true if the first input is greater than or equal to the second input.";
|
|
@@ -2960,6 +2978,7 @@ Blockly.Msg["LOGIC_TERNARY_IF_TRUE"] = "if true";
|
|
|
2960
2978
|
Blockly.Msg["LOGIC_TERNARY_TOOLTIP"] = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value.";
|
|
2961
2979
|
Blockly.Msg["MAC_OS"] = "macOS";
|
|
2962
2980
|
Blockly.Msg["MATH_ADDITION_SYMBOL"] = "+";
|
|
2981
|
+
Blockly.Msg["MATH_ADDITION_SYMBOL_ARIA"] = "plus";
|
|
2963
2982
|
Blockly.Msg["MATH_ARITHMETIC_HELPURL"] = "https://en.wikipedia.org/wiki/Arithmetic";
|
|
2964
2983
|
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_ADD"] = "Return the sum of the two numbers.";
|
|
2965
2984
|
Blockly.Msg["MATH_ARITHMETIC_TOOLTIP_DIVIDE"] = "Return the quotient of the two numbers.";
|
|
@@ -2972,12 +2991,19 @@ Blockly.Msg["MATH_ATAN2_TOOLTIP"] = "Return the arctangent of point (X, Y) in de
|
|
|
2972
2991
|
Blockly.Msg["MATH_CHANGE_HELPURL"] = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
|
|
2973
2992
|
Blockly.Msg["MATH_CHANGE_TITLE"] = "change %1 by %2";
|
|
2974
2993
|
Blockly.Msg["MATH_CHANGE_TOOLTIP"] = "Add a number to variable '%1'.";
|
|
2994
|
+
Blockly.Msg["MATH_CONSTANT_E_ARIA"] = "e";
|
|
2995
|
+
Blockly.Msg["MATH_CONSTANT_GOLDEN_RATIO_ARIA"] = "golden ratio";
|
|
2975
2996
|
Blockly.Msg["MATH_CONSTANT_HELPURL"] = "https://en.wikipedia.org/wiki/Mathematical_constant";
|
|
2997
|
+
Blockly.Msg["MATH_CONSTANT_INFINITY_ARIA"] = "infinity";
|
|
2998
|
+
Blockly.Msg["MATH_CONSTANT_PI_ARIA"] = "pi";
|
|
2999
|
+
Blockly.Msg["MATH_CONSTANT_SQRT1_2_ARIA"] = "square root of 1 over 2";
|
|
3000
|
+
Blockly.Msg["MATH_CONSTANT_SQRT2_ARIA"] = "square root of 2";
|
|
2976
3001
|
Blockly.Msg["MATH_CONSTANT_TOOLTIP"] = "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).";
|
|
2977
3002
|
Blockly.Msg["MATH_CONSTRAIN_HELPURL"] = "https://en.wikipedia.org/wiki/Clamping_(graphics)";
|
|
2978
3003
|
Blockly.Msg["MATH_CONSTRAIN_TITLE"] = "constrain %1 low %2 high %3";
|
|
2979
3004
|
Blockly.Msg["MATH_CONSTRAIN_TOOLTIP"] = "Constrain a number to be between the specified limits (inclusive).";
|
|
2980
3005
|
Blockly.Msg["MATH_DIVISION_SYMBOL"] = "÷";
|
|
3006
|
+
Blockly.Msg["MATH_DIVISION_SYMBOL_ARIA"] = "divided by";
|
|
2981
3007
|
Blockly.Msg["MATH_IS_DIVISIBLE_BY"] = "is divisible by";
|
|
2982
3008
|
Blockly.Msg["MATH_IS_EVEN"] = "is even";
|
|
2983
3009
|
Blockly.Msg["MATH_IS_NEGATIVE"] = "is negative";
|
|
@@ -2990,13 +3016,16 @@ Blockly.Msg["MATH_MODULO_HELPURL"] = "https://en.wikipedia.org/wiki/Modulo_opera
|
|
|
2990
3016
|
Blockly.Msg["MATH_MODULO_TITLE"] = "remainder of %1 ÷ %2";
|
|
2991
3017
|
Blockly.Msg["MATH_MODULO_TOOLTIP"] = "Return the remainder from dividing the two numbers.";
|
|
2992
3018
|
Blockly.Msg["MATH_MULTIPLICATION_SYMBOL"] = "×";
|
|
3019
|
+
Blockly.Msg["MATH_MULTIPLICATION_SYMBOL_ARIA"] = "times";
|
|
2993
3020
|
Blockly.Msg["MATH_NUMBER_HELPURL"] = "https://en.wikipedia.org/wiki/Number";
|
|
2994
3021
|
Blockly.Msg["MATH_NUMBER_TOOLTIP"] = "A number.";
|
|
2995
3022
|
Blockly.Msg["MATH_ONLIST_HELPURL"] = "";
|
|
2996
3023
|
Blockly.Msg["MATH_ONLIST_OPERATOR_AVERAGE"] = "average of list";
|
|
2997
3024
|
Blockly.Msg["MATH_ONLIST_OPERATOR_MAX"] = "max of list";
|
|
3025
|
+
Blockly.Msg["MATH_ONLIST_OPERATOR_MAX_ARIA"] = "maximum";
|
|
2998
3026
|
Blockly.Msg["MATH_ONLIST_OPERATOR_MEDIAN"] = "median of list";
|
|
2999
3027
|
Blockly.Msg["MATH_ONLIST_OPERATOR_MIN"] = "min of list";
|
|
3028
|
+
Blockly.Msg["MATH_ONLIST_OPERATOR_MIN_ARIA"] = "minimum";
|
|
3000
3029
|
Blockly.Msg["MATH_ONLIST_OPERATOR_MODE"] = "modes of list";
|
|
3001
3030
|
Blockly.Msg["MATH_ONLIST_OPERATOR_RANDOM"] = "random item of list";
|
|
3002
3031
|
Blockly.Msg["MATH_ONLIST_OPERATOR_STD_DEV"] = "standard deviation of list";
|
|
@@ -3010,6 +3039,7 @@ Blockly.Msg["MATH_ONLIST_TOOLTIP_RANDOM"] = "Return a random element from the li
|
|
|
3010
3039
|
Blockly.Msg["MATH_ONLIST_TOOLTIP_STD_DEV"] = "Return the standard deviation of the list.";
|
|
3011
3040
|
Blockly.Msg["MATH_ONLIST_TOOLTIP_SUM"] = "Return the sum of all the numbers in the list.";
|
|
3012
3041
|
Blockly.Msg["MATH_POWER_SYMBOL"] = "^";
|
|
3042
|
+
Blockly.Msg["MATH_POWER_SYMBOL_ARIA"] = "to the power of";
|
|
3013
3043
|
Blockly.Msg["MATH_RANDOM_FLOAT_HELPURL"] = "https://en.wikipedia.org/wiki/Random_number_generation";
|
|
3014
3044
|
Blockly.Msg["MATH_RANDOM_FLOAT_TITLE_RANDOM"] = "random fraction";
|
|
3015
3045
|
Blockly.Msg["MATH_RANDOM_FLOAT_TOOLTIP"] = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive).";
|
|
@@ -3023,6 +3053,12 @@ Blockly.Msg["MATH_ROUND_OPERATOR_ROUNDUP"] = "round up";
|
|
|
3023
3053
|
Blockly.Msg["MATH_ROUND_TOOLTIP"] = "Round a number up or down.";
|
|
3024
3054
|
Blockly.Msg["MATH_SINGLE_HELPURL"] = "https://en.wikipedia.org/wiki/Square_root";
|
|
3025
3055
|
Blockly.Msg["MATH_SINGLE_OP_ABSOLUTE"] = "absolute";
|
|
3056
|
+
Blockly.Msg["MATH_SINGLE_OP_ABSOLUTE_ARIA"] = "absolute value";
|
|
3057
|
+
Blockly.Msg["MATH_SINGLE_OP_EXP_ARIA"] = "e to the power of";
|
|
3058
|
+
Blockly.Msg["MATH_SINGLE_OP_LN_ARIA"] = "natural logarithm";
|
|
3059
|
+
Blockly.Msg["MATH_SINGLE_OP_LOG10_ARIA"] = "base 10 logarithm";
|
|
3060
|
+
Blockly.Msg["MATH_SINGLE_OP_NEG_ARIA"] = "negative";
|
|
3061
|
+
Blockly.Msg["MATH_SINGLE_OP_POW10_ARIA"] = "10 to the power of";
|
|
3026
3062
|
Blockly.Msg["MATH_SINGLE_OP_ROOT"] = "square root";
|
|
3027
3063
|
Blockly.Msg["MATH_SINGLE_TOOLTIP_ABS"] = "Return the absolute value of a number.";
|
|
3028
3064
|
Blockly.Msg["MATH_SINGLE_TOOLTIP_EXP"] = "Return e to the power of a number.";
|
|
@@ -3032,13 +3068,20 @@ Blockly.Msg["MATH_SINGLE_TOOLTIP_NEG"] = "Return the negation of a number.";
|
|
|
3032
3068
|
Blockly.Msg["MATH_SINGLE_TOOLTIP_POW10"] = "Return 10 to the power of a number.";
|
|
3033
3069
|
Blockly.Msg["MATH_SINGLE_TOOLTIP_ROOT"] = "Return the square root of a number.";
|
|
3034
3070
|
Blockly.Msg["MATH_SUBTRACTION_SYMBOL"] = "-";
|
|
3071
|
+
Blockly.Msg["MATH_SUBTRACTION_SYMBOL_ARIA"] = "minus";
|
|
3035
3072
|
Blockly.Msg["MATH_TRIG_ACOS"] = "acos";
|
|
3073
|
+
Blockly.Msg["MATH_TRIG_ACOS_ARIA"] = "inverse cosine";
|
|
3036
3074
|
Blockly.Msg["MATH_TRIG_ASIN"] = "asin";
|
|
3075
|
+
Blockly.Msg["MATH_TRIG_ASIN_ARIA"] = "inverse sine";
|
|
3037
3076
|
Blockly.Msg["MATH_TRIG_ATAN"] = "atan";
|
|
3077
|
+
Blockly.Msg["MATH_TRIG_ATAN_ARIA"] = "inverse tangent";
|
|
3038
3078
|
Blockly.Msg["MATH_TRIG_COS"] = "cos";
|
|
3079
|
+
Blockly.Msg["MATH_TRIG_COS_ARIA"] = "cosine";
|
|
3039
3080
|
Blockly.Msg["MATH_TRIG_HELPURL"] = "https://en.wikipedia.org/wiki/Trigonometric_functions";
|
|
3040
3081
|
Blockly.Msg["MATH_TRIG_SIN"] = "sin";
|
|
3082
|
+
Blockly.Msg["MATH_TRIG_SIN_ARIA"] = "sine";
|
|
3041
3083
|
Blockly.Msg["MATH_TRIG_TAN"] = "tan";
|
|
3084
|
+
Blockly.Msg["MATH_TRIG_TAN_ARIA"] = "tangent";
|
|
3042
3085
|
Blockly.Msg["MATH_TRIG_TOOLTIP_ACOS"] = "Return the arccosine of a number.";
|
|
3043
3086
|
Blockly.Msg["MATH_TRIG_TOOLTIP_ASIN"] = "Return the arcsine of a number.";
|
|
3044
3087
|
Blockly.Msg["MATH_TRIG_TOOLTIP_ATAN"] = "Return the arctangent of a number.";
|
|
@@ -3114,8 +3157,10 @@ Blockly.Msg["SHORTCUTS_MOVE_DOWN"] = "Move down";
|
|
|
3114
3157
|
Blockly.Msg["SHORTCUTS_MOVE_LEFT"] = "Move left";
|
|
3115
3158
|
Blockly.Msg["SHORTCUTS_MOVE_RIGHT"] = "Move right";
|
|
3116
3159
|
Blockly.Msg["SHORTCUTS_MOVE_UP"] = "Move up";
|
|
3160
|
+
Blockly.Msg["SHORTCUTS_NEXT_HEADING"] = "Next heading";
|
|
3117
3161
|
Blockly.Msg["SHORTCUTS_NEXT_STACK"] = "Next stack";
|
|
3118
3162
|
Blockly.Msg["SHORTCUTS_PERFORM_ACTION"] = "Edit or confirm";
|
|
3163
|
+
Blockly.Msg["SHORTCUTS_PREVIOUS_HEADING"] = "Previous heading";
|
|
3119
3164
|
Blockly.Msg["SHORTCUTS_PREVIOUS_STACK"] = "Previous stack";
|
|
3120
3165
|
Blockly.Msg["SHORTCUTS_SHOW_CONTEXT_MENU"] = "Show menu";
|
|
3121
3166
|
Blockly.Msg["SHORTCUTS_SHOW_TOOLTIP"] = "Show tooltip";
|
|
@@ -3147,6 +3192,8 @@ Blockly.Msg["TEXT_COUNT_TOOLTIP"] = "Count how many times some text occurs withi
|
|
|
3147
3192
|
Blockly.Msg["TEXT_CREATE_JOIN_ITEM_TOOLTIP"] = "Add an item to the text.";
|
|
3148
3193
|
Blockly.Msg["TEXT_CREATE_JOIN_TITLE_JOIN"] = "join";
|
|
3149
3194
|
Blockly.Msg["TEXT_CREATE_JOIN_TOOLTIP"] = "Add, remove, or reorder sections to reconfigure this text block.";
|
|
3195
|
+
Blockly.Msg["TEXT_FROM_END_ARIA"] = "letter number from end";
|
|
3196
|
+
Blockly.Msg["TEXT_FROM_START_ARIA"] = "letter number";
|
|
3150
3197
|
Blockly.Msg["TEXT_GET_SUBSTRING_END_FROM_END"] = "to letter # from end";
|
|
3151
3198
|
Blockly.Msg["TEXT_GET_SUBSTRING_END_FROM_START"] = "to letter #";
|
|
3152
3199
|
Blockly.Msg["TEXT_GET_SUBSTRING_END_LAST"] = "to last letter";
|
|
@@ -3278,13 +3325,13 @@ b&&$.deleteVariable$$module$build$src$core$variables(b.getWorkspace(),b,a)}};$.r
|
|
|
3278
3325
|
{type:"text_create_join_container",message0:"%{BKY_TEXT_CREATE_JOIN_TITLE_JOIN} %1 %2",args0:[{type:"input_dummy"},{type:"input_statement",name:"STACK"}],style:"text_blocks",tooltip:"%{BKY_TEXT_CREATE_JOIN_TOOLTIP}",enableContextMenu:!1},{type:"text_create_join_item",message0:"%{BKY_TEXT_CREATE_JOIN_ITEM_TITLE_ITEM}",previousStatement:null,nextStatement:null,style:"text_blocks",tooltip:"%{BKY_TEXT_CREATE_JOIN_ITEM_TOOLTIP}",enableContextMenu:!1},{type:"text_append",message0:"%{BKY_TEXT_APPEND_TITLE}",
|
|
3279
3326
|
args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_TEXT_APPEND_VARIABLE}"},{type:"input_value",name:"TEXT"}],previousStatement:null,nextStatement:null,style:"text_blocks",extensions:["text_append_tooltip"]},{type:"text_length",message0:"%{BKY_TEXT_LENGTH_TITLE}",args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Number",style:"text_blocks",tooltip:"%{BKY_TEXT_LENGTH_TOOLTIP}",helpUrl:"%{BKY_TEXT_LENGTH_HELPURL}"},{type:"text_isEmpty",message0:"%{BKY_TEXT_ISEMPTY_TITLE}",
|
|
3280
3327
|
args0:[{type:"input_value",name:"VALUE",check:["String","Array"]}],output:"Boolean",style:"text_blocks",tooltip:"%{BKY_TEXT_ISEMPTY_TOOLTIP}",helpUrl:"%{BKY_TEXT_ISEMPTY_HELPURL}"},{type:"text_indexOf",message0:"%{BKY_TEXT_INDEXOF_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"END",options:[["%{BKY_TEXT_INDEXOF_OPERATOR_FIRST}","FIRST"],["%{BKY_TEXT_INDEXOF_OPERATOR_LAST}","LAST"]]},{type:"input_value",name:"FIND",check:"String"}],output:"Number",style:"text_blocks",
|
|
3281
|
-
helpUrl:"%{BKY_TEXT_INDEXOF_HELPURL}",inputsInline:!0,extensions:["text_indexOf_tooltip"]},{type:"text_charAt",message0:"%{BKY_TEXT_CHARAT_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"WHERE",options:[["%{BKY_TEXT_CHARAT_FROM_START}","FROM_START"],["%{BKY_TEXT_CHARAT_FROM_END}","FROM_END"],["%{BKY_TEXT_CHARAT_FIRST}","FIRST"],["%{BKY_TEXT_CHARAT_LAST}","LAST"],["%{BKY_TEXT_CHARAT_RANDOM}","RANDOM"]]}],
|
|
3282
|
-
inputsInline:!0,mutator:"text_charAt_mutator"}]),GET_SUBSTRING_BLOCK$$module$build$src$blocks$text={init:function(){this.WHERE_OPTIONS_1=[[$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_START_FROM_START,"FROM_START"
|
|
3283
|
-
"FROM_END"],[$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_END_LAST,"LAST"]];this.setHelpUrl($.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_HELPURL);this.setStyle("text_blocks");this.appendValueInput("STRING").setCheck("String").appendField($.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT);
|
|
3284
|
-
d==="FROM_END";d!==(e==="FROM_START"||e==="FROM_END")&&this.getSourceBlock().updateAt_(b,d)});return c};this.appendDummyInput("WHERE1_INPUT").appendField(a(1),"WHERE1");this.appendDummyInput("AT1");this.appendDummyInput("WHERE2_INPUT").appendField(a(2),"WHERE2");this.appendDummyInput("AT2");$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TAIL&&
|
|
3285
|
-
this.updateAt_(1,!0);this.updateAt_(2,!0);this.setTooltip($.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TOOLTIP)},mutationToDom:function(){var a=$.createElement$$module$build$src$core$utils$xml("mutation"),b=this.getInput("AT1")instanceof $.ValueInput$$module$build$src$core$inputs$value_input;a.setAttribute("at1",`${b}`);b=this.getInput("AT2")instanceof
|
|
3286
|
-
"true";a=a.getAttribute("at2")==="true";this.updateAt_(1,b);this.updateAt_(2,a)},updateAt_:function(a,b){this.removeInput("AT"+a);this.removeInput("ORDINAL"+a,!0);b?(this.appendValueInput("AT"+a).setCheck("Number"),$.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+a).appendField($.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX)):
|
|
3287
|
-
a===1&&(this.moveInputBefore("AT1","WHERE2_INPUT"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","WHERE2_INPUT"))}};blocks$$module$build$src$blocks$text.text_getSubstring=GET_SUBSTRING_BLOCK$$module$build$src$blocks$text;
|
|
3328
|
+
helpUrl:"%{BKY_TEXT_INDEXOF_HELPURL}",inputsInline:!0,extensions:["text_indexOf_tooltip"]},{type:"text_charAt",message0:"%{BKY_TEXT_CHARAT_TITLE}",args0:[{type:"input_value",name:"VALUE",check:"String"},{type:"field_dropdown",name:"WHERE",options:[["%{BKY_TEXT_CHARAT_FROM_START}","FROM_START","%{BKY_TEXT_FROM_START_ARIA}"],["%{BKY_TEXT_CHARAT_FROM_END}","FROM_END","%{BKY_TEXT_FROM_END_ARIA}"],["%{BKY_TEXT_CHARAT_FIRST}","FIRST"],["%{BKY_TEXT_CHARAT_LAST}","LAST"],["%{BKY_TEXT_CHARAT_RANDOM}","RANDOM"]]}],
|
|
3329
|
+
output:"String",style:"text_blocks",helpUrl:"%{BKY_TEXT_CHARAT_HELPURL}",inputsInline:!0,mutator:"text_charAt_mutator"}]),GET_SUBSTRING_BLOCK$$module$build$src$blocks$text={init:function(){this.WHERE_OPTIONS_1=[[$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_START_FROM_START,"FROM_START",$.Msg$$module$build$src$core$msg.TEXT_FROM_START_ARIA],[$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_START_FROM_END,"FROM_END",$.Msg$$module$build$src$core$msg.TEXT_FROM_END_ARIA],[$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_START_FIRST,
|
|
3330
|
+
"FIRST"]];this.WHERE_OPTIONS_2=[[$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_END_FROM_START,"FROM_START",$.Msg$$module$build$src$core$msg.TEXT_FROM_START_ARIA],[$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_END_FROM_END,"FROM_END",$.Msg$$module$build$src$core$msg.TEXT_FROM_END_ARIA],[$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_END_LAST,"LAST"]];this.setHelpUrl($.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_HELPURL);this.setStyle("text_blocks");this.appendValueInput("STRING").setCheck("String").appendField($.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT);
|
|
3331
|
+
var a=b=>{var c=$.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:this["WHERE_OPTIONS_"+b]});c.setValidator(function(d){var e=this.getValue();d=d==="FROM_START"||d==="FROM_END";d!==(e==="FROM_START"||e==="FROM_END")&&this.getSourceBlock().updateAt_(b,d)});return c};this.appendDummyInput("WHERE1_INPUT").appendField(a(1),"WHERE1");this.appendDummyInput("AT1");this.appendDummyInput("WHERE2_INPUT").appendField(a(2),"WHERE2");this.appendDummyInput("AT2");$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TAIL&&
|
|
3332
|
+
this.appendDummyInput("TAIL").appendField($.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TAIL);this.setInputsInline(!0);this.setOutput(!0,"String");this.updateAt_(1,!0);this.updateAt_(2,!0);this.setTooltip($.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TOOLTIP)},mutationToDom:function(){var a=$.createElement$$module$build$src$core$utils$xml("mutation"),b=this.getInput("AT1")instanceof $.ValueInput$$module$build$src$core$inputs$value_input;a.setAttribute("at1",`${b}`);b=this.getInput("AT2")instanceof
|
|
3333
|
+
$.ValueInput$$module$build$src$core$inputs$value_input;a.setAttribute("at2",`${b}`);return a},domToMutation:function(a){var b=a.getAttribute("at1")==="true";a=a.getAttribute("at2")==="true";this.updateAt_(1,b);this.updateAt_(2,a)},updateAt_:function(a,b){this.removeInput("AT"+a);this.removeInput("ORDINAL"+a,!0);b?(this.appendValueInput("AT"+a).setCheck("Number"),$.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX&&this.appendDummyInput("ORDINAL"+a).appendField($.Msg$$module$build$src$core$msg.ORDINAL_NUMBER_SUFFIX)):
|
|
3334
|
+
this.appendDummyInput("AT"+a);a===2&&$.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TAIL&&(this.removeInput("TAIL",!0),this.appendDummyInput("TAIL").appendField($.Msg$$module$build$src$core$msg.TEXT_GET_SUBSTRING_TAIL));a===1&&(this.moveInputBefore("AT1","WHERE2_INPUT"),this.getInput("ORDINAL1")&&this.moveInputBefore("ORDINAL1","WHERE2_INPUT"))}};blocks$$module$build$src$blocks$text.text_getSubstring=GET_SUBSTRING_BLOCK$$module$build$src$blocks$text;
|
|
3288
3335
|
blocks$$module$build$src$blocks$text.text_changeCase={init:function(){var a=[[$.Msg$$module$build$src$core$msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE,"UPPERCASE"],[$.Msg$$module$build$src$core$msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE,"LOWERCASE"],[$.Msg$$module$build$src$core$msg.TEXT_CHANGECASE_OPERATOR_TITLECASE,"TITLECASE"]];this.setHelpUrl($.Msg$$module$build$src$core$msg.TEXT_CHANGECASE_HELPURL);this.setStyle("text_blocks");this.appendValueInput("TEXT").setCheck("String").appendField($.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",
|
|
3289
3336
|
options:a}),"CASE");this.setOutput(!0,"String");this.setTooltip($.Msg$$module$build$src$core$msg.TEXT_CHANGECASE_TOOLTIP)}};
|
|
3290
3337
|
blocks$$module$build$src$blocks$text.text_trim={init:function(){var a=[[$.Msg$$module$build$src$core$msg.TEXT_TRIM_OPERATOR_BOTH,"BOTH"],[$.Msg$$module$build$src$core$msg.TEXT_TRIM_OPERATOR_LEFT,"LEFT"],[$.Msg$$module$build$src$core$msg.TEXT_TRIM_OPERATOR_RIGHT,"RIGHT"]];this.setHelpUrl($.Msg$$module$build$src$core$msg.TEXT_TRIM_HELPURL);this.setStyle("text_blocks");this.appendValueInput("TEXT").setCheck("String").appendField($.fromJson$$module$build$src$core$field_registry({type:"field_dropdown",options:a}),
|
|
@@ -3353,18 +3400,20 @@ this.setTooltip($.Msg$$module$build$src$core$msg.PROCEDURES_IFRETURN_TOOLTIP);th
|
|
|
3353
3400
|
onchange:function(a){if(!(this.workspace.isDragging&&this.workspace.isDragging()||a.type!==$.BLOCK_MOVE$$module$build$src$core$events$events&&a.type!==$.BLOCK_CREATE$$module$build$src$core$events$events)){a=!1;var b=this;do{if(this.FUNCTION_TYPES.includes(b.type)){a=!0;break}b=b.getSurroundParent()}while(b);a?(b.type==="procedures_defnoreturn"&&this.hasReturnValue_?(this.removeInput("VALUE"),this.appendDummyInput("VALUE").appendField($.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=
|
|
3354
3401
|
!1):b.type!=="procedures_defreturn"||this.hasReturnValue_||(this.removeInput("VALUE"),this.appendValueInput("VALUE").appendField($.Msg$$module$build$src$core$msg.PROCEDURES_DEFRETURN_RETURN),this.hasReturnValue_=!0),this.setWarningText(null)):this.setWarningText($.Msg$$module$build$src$core$msg.PROCEDURES_IFRETURN_WARNING);if(!this.isInFlyout)try{$.setRecordUndo$$module$build$src$core$events$utils(!1),this.setDisabledReason(!a,UNPARENTED_IFRETURN_DISABLED_REASON$$module$build$src$blocks$procedures)}finally{$.setRecordUndo$$module$build$src$core$events$utils(!0)}}},
|
|
3355
3402
|
FUNCTION_TYPES:["procedures_defnoreturn","procedures_defreturn"]};blocks$$module$build$src$blocks$procedures.procedures_ifreturn=PROCEDURES_IFRETURN$$module$build$src$blocks$procedures;$.defineBlocks$$module$build$src$core$common(blocks$$module$build$src$blocks$procedures);var module$build$src$blocks$procedures={blocks:blocks$$module$build$src$blocks$procedures};var blocks$$module$build$src$blocks$math=$.createBlockDefinitionsFromJsonArray$$module$build$src$core$common([{type:"math_number",message0:"%1",args0:[{type:"field_number",name:"NUM",value:0}],output:"Number",helpUrl:"%{BKY_MATH_NUMBER_HELPURL}",style:"math_blocks",tooltip:"%{BKY_MATH_NUMBER_TOOLTIP}",extensions:["parent_tooltip_when_inline"]},{type:"math_arithmetic",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Number"},{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ADDITION_SYMBOL}",
|
|
3356
|
-
"ADD"],["%{BKY_MATH_SUBTRACTION_SYMBOL}","MINUS"],["%{BKY_MATH_MULTIPLICATION_SYMBOL}","MULTIPLY"],["%{BKY_MATH_DIVISION_SYMBOL}","DIVIDE"],["%{BKY_MATH_POWER_SYMBOL}","POWER"]]},{type:"input_value",name:"B",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ARITHMETIC_HELPURL}",extensions:["math_op_tooltip"]},
|
|
3357
|
-
"
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
["%{
|
|
3362
|
-
"
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
name:"
|
|
3366
|
-
|
|
3367
|
-
|
|
3403
|
+
"ADD","%{BKY_MATH_ADDITION_SYMBOL_ARIA}"],["%{BKY_MATH_SUBTRACTION_SYMBOL}","MINUS","%{BKY_MATH_SUBTRACTION_SYMBOL_ARIA}"],["%{BKY_MATH_MULTIPLICATION_SYMBOL}","MULTIPLY","%{BKY_MATH_MULTIPLICATION_SYMBOL_ARIA}"],["%{BKY_MATH_DIVISION_SYMBOL}","DIVIDE","%{BKY_MATH_DIVISION_SYMBOL_ARIA}"],["%{BKY_MATH_POWER_SYMBOL}","POWER","%{BKY_MATH_POWER_SYMBOL_ARIA}"]]},{type:"input_value",name:"B",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ARITHMETIC_HELPURL}",extensions:["math_op_tooltip"]},
|
|
3404
|
+
{type:"math_single",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_SINGLE_OP_ROOT}","ROOT"],["%{BKY_MATH_SINGLE_OP_ABSOLUTE}","ABS","%{BKY_MATH_SINGLE_OP_ABSOLUTE_ARIA}"],["-","NEG","%{BKY_MATH_SINGLE_OP_NEG_ARIA}"],["ln","LN","%{BKY_MATH_SINGLE_OP_LN_ARIA}"],["log10","LOG10","%{BKY_MATH_SINGLE_OP_LOG10_ARIA}"],["e^","EXP","%{BKY_MATH_SINGLE_OP_EXP_ARIA}"],["10^","POW10","%{BKY_MATH_SINGLE_OP_POW10_ARIA}"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",
|
|
3405
|
+
style:"math_blocks",helpUrl:"%{BKY_MATH_SINGLE_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_trig",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_TRIG_SIN}","SIN","%{BKY_MATH_TRIG_SIN_ARIA}"],["%{BKY_MATH_TRIG_COS}","COS","%{BKY_MATH_TRIG_COS_ARIA}"],["%{BKY_MATH_TRIG_TAN}","TAN","%{BKY_MATH_TRIG_TAN_ARIA}"],["%{BKY_MATH_TRIG_ASIN}","ASIN","%{BKY_MATH_TRIG_ASIN_ARIA}"],["%{BKY_MATH_TRIG_ACOS}","ACOS","%{BKY_MATH_TRIG_ACOS_ARIA}"],["%{BKY_MATH_TRIG_ATAN}","ATAN",
|
|
3406
|
+
"%{BKY_MATH_TRIG_ATAN_ARIA}"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_TRIG_HELPURL}",extensions:["math_op_tooltip"]},{type:"math_constant",message0:"%1",args0:[{type:"field_dropdown",name:"CONSTANT",options:[["\u03c0","PI","%{BKY_MATH_CONSTANT_PI_ARIA}"],["e","E","%{BKY_MATH_CONSTANT_E_ARIA}"],["\u03c6","GOLDEN_RATIO","%{BKY_MATH_CONSTANT_GOLDEN_RATIO_ARIA}"],["sqrt(2)","SQRT2","%{BKY_MATH_CONSTANT_SQRT2_ARIA}"],["sqrt(\u00bd)","SQRT1_2",
|
|
3407
|
+
"%{BKY_MATH_CONSTANT_SQRT1_2_ARIA}"],["\u221e","INFINITY","%{BKY_MATH_CONSTANT_INFINITY_ARIA}"]]}],output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTANT_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTANT_HELPURL}"},{type:"math_number_property",message0:"%1 %2",args0:[{type:"input_value",name:"NUMBER_TO_CHECK",check:"Number"},{type:"field_dropdown",name:"PROPERTY",options:[["%{BKY_MATH_IS_EVEN}","EVEN"],["%{BKY_MATH_IS_ODD}","ODD"],["%{BKY_MATH_IS_PRIME}","PRIME"],["%{BKY_MATH_IS_WHOLE}","WHOLE"],["%{BKY_MATH_IS_POSITIVE}",
|
|
3408
|
+
"POSITIVE"],["%{BKY_MATH_IS_NEGATIVE}","NEGATIVE"],["%{BKY_MATH_IS_DIVISIBLE_BY}","DIVISIBLE_BY"]]}],inputsInline:!0,output:"Boolean",style:"math_blocks",tooltip:"%{BKY_MATH_IS_TOOLTIP}",mutator:"math_is_divisibleby_mutator"},{type:"math_change",message0:"%{BKY_MATH_CHANGE_TITLE}",args0:[{type:"field_variable",name:"VAR",variable:"%{BKY_MATH_CHANGE_TITLE_ITEM}"},{type:"input_value",name:"DELTA",check:"Number"}],previousStatement:null,nextStatement:null,style:"variable_blocks",helpUrl:"%{BKY_MATH_CHANGE_HELPURL}",
|
|
3409
|
+
extensions:["math_change_tooltip"]},{type:"math_round",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",options:[["%{BKY_MATH_ROUND_OPERATOR_ROUND}","ROUND"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDUP}","ROUNDUP"],["%{BKY_MATH_ROUND_OPERATOR_ROUNDDOWN}","ROUNDDOWN"]]},{type:"input_value",name:"NUM",check:"Number"}],output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ROUND_HELPURL}",tooltip:"%{BKY_MATH_ROUND_TOOLTIP}"},{type:"math_on_list",message0:"%1 %2",args0:[{type:"field_dropdown",name:"OP",
|
|
3410
|
+
options:[["%{BKY_MATH_ONLIST_OPERATOR_SUM}","SUM"],["%{BKY_MATH_ONLIST_OPERATOR_MIN}","MIN","%{BKY_MATH_ONLIST_OPERATOR_MIN_ARIA}"],["%{BKY_MATH_ONLIST_OPERATOR_MAX}","MAX","%{BKY_MATH_ONLIST_OPERATOR_MAX_ARIA}"],["%{BKY_MATH_ONLIST_OPERATOR_AVERAGE}","AVERAGE"],["%{BKY_MATH_ONLIST_OPERATOR_MEDIAN}","MEDIAN"],["%{BKY_MATH_ONLIST_OPERATOR_MODE}","MODE"],["%{BKY_MATH_ONLIST_OPERATOR_STD_DEV}","STD_DEV"],["%{BKY_MATH_ONLIST_OPERATOR_RANDOM}","RANDOM"]]},{type:"input_value",name:"LIST",check:"Array"}],
|
|
3411
|
+
output:"Number",style:"math_blocks",helpUrl:"%{BKY_MATH_ONLIST_HELPURL}",mutator:"math_modes_of_list_mutator",extensions:["math_op_tooltip"]},{type:"math_modulo",message0:"%{BKY_MATH_MODULO_TITLE}",args0:[{type:"input_value",name:"DIVIDEND",check:"Number"},{type:"input_value",name:"DIVISOR",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_MODULO_TOOLTIP}",helpUrl:"%{BKY_MATH_MODULO_HELPURL}"},{type:"math_constrain",message0:"%{BKY_MATH_CONSTRAIN_TITLE}",args0:[{type:"input_value",
|
|
3412
|
+
name:"VALUE",check:"Number"},{type:"input_value",name:"LOW",check:"Number"},{type:"input_value",name:"HIGH",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_CONSTRAIN_TOOLTIP}",helpUrl:"%{BKY_MATH_CONSTRAIN_HELPURL}"},{type:"math_random_int",message0:"%{BKY_MATH_RANDOM_INT_TITLE}",args0:[{type:"input_value",name:"FROM",check:"Number"},{type:"input_value",name:"TO",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_INT_TOOLTIP}",
|
|
3413
|
+
helpUrl:"%{BKY_MATH_RANDOM_INT_HELPURL}"},{type:"math_random_float",message0:"%{BKY_MATH_RANDOM_FLOAT_TITLE_RANDOM}",output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_RANDOM_FLOAT_TOOLTIP}",helpUrl:"%{BKY_MATH_RANDOM_FLOAT_HELPURL}"},{type:"math_atan2",message0:"%{BKY_MATH_ATAN2_TITLE}",args0:[{type:"input_value",name:"X",check:"Number"},{type:"input_value",name:"Y",check:"Number"}],inputsInline:!0,output:"Number",style:"math_blocks",tooltip:"%{BKY_MATH_ATAN2_TOOLTIP}",helpUrl:"%{BKY_MATH_ATAN2_HELPURL}"}]),
|
|
3414
|
+
TOOLTIPS_BY_OP$$module$build$src$blocks$math={ADD:"%{BKY_MATH_ARITHMETIC_TOOLTIP_ADD}",MINUS:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MINUS}",MULTIPLY:"%{BKY_MATH_ARITHMETIC_TOOLTIP_MULTIPLY}",DIVIDE:"%{BKY_MATH_ARITHMETIC_TOOLTIP_DIVIDE}",POWER:"%{BKY_MATH_ARITHMETIC_TOOLTIP_POWER}",ROOT:"%{BKY_MATH_SINGLE_TOOLTIP_ROOT}",ABS:"%{BKY_MATH_SINGLE_TOOLTIP_ABS}",NEG:"%{BKY_MATH_SINGLE_TOOLTIP_NEG}",LN:"%{BKY_MATH_SINGLE_TOOLTIP_LN}",LOG10:"%{BKY_MATH_SINGLE_TOOLTIP_LOG10}",EXP:"%{BKY_MATH_SINGLE_TOOLTIP_EXP}",
|
|
3415
|
+
POW10:"%{BKY_MATH_SINGLE_TOOLTIP_POW10}",SIN:"%{BKY_MATH_TRIG_TOOLTIP_SIN}",COS:"%{BKY_MATH_TRIG_TOOLTIP_COS}",TAN:"%{BKY_MATH_TRIG_TOOLTIP_TAN}",ASIN:"%{BKY_MATH_TRIG_TOOLTIP_ASIN}",ACOS:"%{BKY_MATH_TRIG_TOOLTIP_ACOS}",ATAN:"%{BKY_MATH_TRIG_TOOLTIP_ATAN}",SUM:"%{BKY_MATH_ONLIST_TOOLTIP_SUM}",MIN:"%{BKY_MATH_ONLIST_TOOLTIP_MIN}",MAX:"%{BKY_MATH_ONLIST_TOOLTIP_MAX}",AVERAGE:"%{BKY_MATH_ONLIST_TOOLTIP_AVERAGE}",MEDIAN:"%{BKY_MATH_ONLIST_TOOLTIP_MEDIAN}",MODE:"%{BKY_MATH_ONLIST_TOOLTIP_MODE}",STD_DEV:"%{BKY_MATH_ONLIST_TOOLTIP_STD_DEV}",
|
|
3416
|
+
RANDOM:"%{BKY_MATH_ONLIST_TOOLTIP_RANDOM}"};$.register$$module$build$src$core$extensions("math_op_tooltip",$.buildTooltipForDropdown$$module$build$src$core$extensions("OP",TOOLTIPS_BY_OP$$module$build$src$blocks$math));
|
|
3368
3417
|
var IS_DIVISIBLEBY_MUTATOR_MIXIN$$module$build$src$blocks$math={mutationToDom:function(){var a=$.createElement$$module$build$src$core$utils$xml("mutation"),b=this.getFieldValue("PROPERTY")==="DIVISIBLE_BY";a.setAttribute("divisor_input",String(b));return a},domToMutation:function(a){a=a.getAttribute("divisor_input")==="true";this.updateShape_(a)},updateShape_:function(a){var b=this.getInput("DIVISOR");a?b||this.appendValueInput("DIVISOR").setCheck("Number"):b&&this.removeInput("DIVISOR")}},IS_DIVISIBLE_MUTATOR_EXTENSION$$module$build$src$blocks$math=
|
|
3369
3418
|
function(){this.getField("PROPERTY").setValidator(function(a){a=a==="DIVISIBLE_BY";this.getSourceBlock().updateShape_(a)})};$.registerMutator$$module$build$src$core$extensions("math_is_divisibleby_mutator",IS_DIVISIBLEBY_MUTATOR_MIXIN$$module$build$src$blocks$math,IS_DIVISIBLE_MUTATOR_EXTENSION$$module$build$src$blocks$math);$.register$$module$build$src$core$extensions("math_change_tooltip",$.buildTooltipWithFieldText$$module$build$src$core$extensions("%{BKY_MATH_CHANGE_TOOLTIP}","VAR"));
|
|
3370
3419
|
var LIST_MODES_MUTATOR_MIXIN$$module$build$src$blocks$math={updateType_:function(a){a==="MODE"?this.outputConnection.setCheck("Array"):this.outputConnection.setCheck("Number")},mutationToDom:function(){var a=$.createElement$$module$build$src$core$utils$xml("mutation");a.setAttribute("op",this.getFieldValue("OP"));return a},domToMutation:function(a){a=a.getAttribute("op");if(a===null)throw new TypeError("xmlElement had no op attribute");this.updateType_(a)}},LIST_MODES_MUTATOR_EXTENSION$$module$build$src$blocks$math=
|
|
@@ -3381,12 +3430,13 @@ var loopTypes$$module$build$src$blocks$loops=new Set(["controls_repeat","control
|
|
|
3381
3430
|
if(b.isDragging&&!b.isDragging()&&(a.type===$.BLOCK_MOVE$$module$build$src$core$events$events||a.type===$.BLOCK_CREATE$$module$build$src$core$events$events)&&(a=!!this.getSurroundLoop(),this.setWarningText(a?null:$.Msg$$module$build$src$core$msg.CONTROLS_FLOW_STATEMENTS_WARNING),!this.isInFlyout))try{$.setRecordUndo$$module$build$src$core$events$utils(!1),this.setDisabledReason(!a,CONTROL_FLOW_NOT_IN_LOOP_DISABLED_REASON$$module$build$src$blocks$loops)}finally{$.setRecordUndo$$module$build$src$core$events$utils(!0)}}};
|
|
3382
3431
|
$.registerMixin$$module$build$src$core$extensions("controls_flow_in_loop_check",CONTROL_FLOW_IN_LOOP_CHECK_MIXIN$$module$build$src$blocks$loops);$.defineBlocks$$module$build$src$core$common(blocks$$module$build$src$blocks$loops);var module$build$src$blocks$loops={blocks:blocks$$module$build$src$blocks$loops,loopTypes:loopTypes$$module$build$src$blocks$loops};var blocks$$module$build$src$blocks$logic=$.createBlockDefinitionsFromJsonArray$$module$build$src$core$common([{type:"logic_boolean",message0:"%1",args0:[{type:"field_dropdown",name:"BOOL",options:[["%{BKY_LOGIC_BOOLEAN_TRUE}","TRUE"],["%{BKY_LOGIC_BOOLEAN_FALSE}","FALSE"]]}],output:"Boolean",style:"logic_blocks",tooltip:"%{BKY_LOGIC_BOOLEAN_TOOLTIP}",helpUrl:"%{BKY_LOGIC_BOOLEAN_HELPURL}"},{type:"controls_if",message0:"%{BKY_CONTROLS_IF_MSG_IF} %1",args0:[{type:"input_value",name:"IF0",check:"Boolean"}],
|
|
3383
3432
|
message1:"%{BKY_CONTROLS_IF_MSG_THEN} %1",args1:[{type:"input_statement",name:"DO0"}],previousStatement:null,nextStatement:null,style:"logic_blocks",helpUrl:"%{BKY_CONTROLS_IF_HELPURL}",suppressPrefixSuffix:!0,mutator:"controls_if_mutator",extensions:["controls_if_tooltip"]},{type:"controls_ifelse",message0:"%{BKY_CONTROLS_IF_MSG_IF} %1",args0:[{type:"input_value",name:"IF0",check:"Boolean"}],message1:"%{BKY_CONTROLS_IF_MSG_THEN} %1",args1:[{type:"input_statement",name:"DO0"}],message2:"%{BKY_CONTROLS_IF_MSG_ELSE} %1",
|
|
3384
|
-
args2:[{type:"input_statement",name:"ELSE"}],previousStatement:null,nextStatement:null,style:"logic_blocks",tooltip:"%{BKYCONTROLS_IF_TOOLTIP_2}",helpUrl:"%{BKY_CONTROLS_IF_HELPURL}",suppressPrefixSuffix:!0,extensions:["controls_if_tooltip"]},{type:"logic_compare",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A"},{type:"field_dropdown",name:"OP",options:[["=","EQ"
|
|
3385
|
-
inputsInline:!0,output:"Boolean",style:"logic_blocks",helpUrl:"%{BKY_LOGIC_COMPARE_HELPURL}",extensions:["logic_compare","logic_op_tooltip"]},{type:"logic_operation",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Boolean"},{type:"field_dropdown",name:"OP",options:[["%{BKY_LOGIC_OPERATION_AND}",
|
|
3386
|
-
|
|
3387
|
-
message1:"%{BKY_LOGIC_TERNARY_IF_TRUE} %1",args1:[{type:"input_value",name:"THEN"}],message2:"%{BKY_LOGIC_TERNARY_IF_FALSE} %1",args2:[{type:"input_value",name:"ELSE"}],output:null,style:"logic_blocks",tooltip:"%{BKY_LOGIC_TERNARY_TOOLTIP}",helpUrl:"%{BKY_LOGIC_TERNARY_HELPURL}",extensions:["logic_ternary"]},
|
|
3388
|
-
message0:"%{
|
|
3389
|
-
LTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_LTE}",GT:"%{BKY_LOGIC_COMPARE_TOOLTIP_GT}",GTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_GTE}",AND:"%{BKY_LOGIC_OPERATION_TOOLTIP_AND}",OR:"%{BKY_LOGIC_OPERATION_TOOLTIP_OR}"}
|
|
3433
|
+
args2:[{type:"input_statement",name:"ELSE"}],previousStatement:null,nextStatement:null,style:"logic_blocks",tooltip:"%{BKYCONTROLS_IF_TOOLTIP_2}",helpUrl:"%{BKY_CONTROLS_IF_HELPURL}",suppressPrefixSuffix:!0,extensions:["controls_if_tooltip"]},{type:"logic_compare",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A"},{type:"field_dropdown",name:"OP",options:[["=","EQ","%{BKY_LOGIC_COMPARE_EQ_ARIA}"],["\u2260","NEQ","%{BKY_LOGIC_COMPARE_NEQ_ARIA}"],["\u200f<","LT","%{BKY_LOGIC_COMPARE_LT_ARIA}"],
|
|
3434
|
+
["\u200f\u2264","LTE","%{BKY_LOGIC_COMPARE_LTE_ARIA}"],["\u200f>","GT","%{BKY_LOGIC_COMPARE_GT_ARIA}"],["\u200f\u2265","GTE","%{BKY_LOGIC_COMPARE_GTE_ARIA}"]]},{type:"input_value",name:"B"}],inputsInline:!0,output:"Boolean",style:"logic_blocks",helpUrl:"%{BKY_LOGIC_COMPARE_HELPURL}",extensions:["logic_compare","logic_op_tooltip"]},{type:"logic_operation",message0:"%1 %2 %3",args0:[{type:"input_value",name:"A",check:"Boolean"},{type:"field_dropdown",name:"OP",options:[["%{BKY_LOGIC_OPERATION_AND}",
|
|
3435
|
+
"AND"],["%{BKY_LOGIC_OPERATION_OR}","OR"]]},{type:"input_value",name:"B",check:"Boolean"}],inputsInline:!0,output:"Boolean",style:"logic_blocks",helpUrl:"%{BKY_LOGIC_OPERATION_HELPURL}",extensions:["logic_op_tooltip"]},{type:"logic_negate",message0:"%{BKY_LOGIC_NEGATE_TITLE}",args0:[{type:"input_value",name:"BOOL",check:"Boolean"}],output:"Boolean",style:"logic_blocks",tooltip:"%{BKY_LOGIC_NEGATE_TOOLTIP}",helpUrl:"%{BKY_LOGIC_NEGATE_HELPURL}"},{type:"logic_null",message0:"%{BKY_LOGIC_NULL}",output:null,
|
|
3436
|
+
style:"logic_blocks",tooltip:"%{BKY_LOGIC_NULL_TOOLTIP}",helpUrl:"%{BKY_LOGIC_NULL_HELPURL}"},{type:"logic_ternary",message0:"%{BKY_LOGIC_TERNARY_CONDITION} %1",args0:[{type:"input_value",name:"IF",check:"Boolean"}],message1:"%{BKY_LOGIC_TERNARY_IF_TRUE} %1",args1:[{type:"input_value",name:"THEN"}],message2:"%{BKY_LOGIC_TERNARY_IF_FALSE} %1",args2:[{type:"input_value",name:"ELSE"}],output:null,style:"logic_blocks",tooltip:"%{BKY_LOGIC_TERNARY_TOOLTIP}",helpUrl:"%{BKY_LOGIC_TERNARY_HELPURL}",extensions:["logic_ternary"]},
|
|
3437
|
+
{type:"controls_if_if",message0:"%{BKY_CONTROLS_IF_IF_TITLE_IF}",nextStatement:null,enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_IF_TOOLTIP}"},{type:"controls_if_elseif",message0:"%{BKY_CONTROLS_IF_ELSEIF_TITLE_ELSEIF}",previousStatement:null,nextStatement:null,enableContextMenu:!1,style:"logic_blocks",tooltip:"%{BKY_CONTROLS_IF_ELSEIF_TOOLTIP}"},{type:"controls_if_else",message0:"%{BKY_CONTROLS_IF_ELSE_TITLE_ELSE}",previousStatement:null,enableContextMenu:!1,style:"logic_blocks",
|
|
3438
|
+
tooltip:"%{BKY_CONTROLS_IF_ELSE_TOOLTIP}"}]),TOOLTIPS_BY_OP$$module$build$src$blocks$logic={EQ:"%{BKY_LOGIC_COMPARE_TOOLTIP_EQ}",NEQ:"%{BKY_LOGIC_COMPARE_TOOLTIP_NEQ}",LT:"%{BKY_LOGIC_COMPARE_TOOLTIP_LT}",LTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_LTE}",GT:"%{BKY_LOGIC_COMPARE_TOOLTIP_GT}",GTE:"%{BKY_LOGIC_COMPARE_TOOLTIP_GTE}",AND:"%{BKY_LOGIC_OPERATION_TOOLTIP_AND}",OR:"%{BKY_LOGIC_OPERATION_TOOLTIP_OR}"};
|
|
3439
|
+
$.register$$module$build$src$core$extensions("logic_op_tooltip",$.buildTooltipForDropdown$$module$build$src$core$extensions("OP",TOOLTIPS_BY_OP$$module$build$src$blocks$logic));
|
|
3390
3440
|
var CONTROLS_IF_MUTATOR_MIXIN$$module$build$src$blocks$logic={elseifCount_:0,elseCount_:0,mutationToDom:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var a=$.createElement$$module$build$src$core$utils$xml("mutation");this.elseifCount_&&a.setAttribute("elseif",String(this.elseifCount_));this.elseCount_&&a.setAttribute("else","1");return a},domToMutation:function(a){this.elseifCount_=parseInt(a.getAttribute("elseif"),10)||0;this.elseCount_=parseInt(a.getAttribute("else"),10)||0;this.rebuildShape_()},
|
|
3391
3441
|
saveExtraState:function(){if(!this.elseifCount_&&!this.elseCount_)return null;var a=Object.create(null);this.elseifCount_&&(a.elseIfCount=this.elseifCount_);this.elseCount_&&(a.hasElse=!0);return a},loadExtraState:function(a){this.elseifCount_=a.elseIfCount||0;this.elseCount_=a.hasElse?1:0;this.updateShape_()},decompose:function(a){var b=a.newBlock("controls_if_if");b.initSvg();var c=b.nextConnection;for(let d=1;d<=this.elseifCount_;d++){let e=a.newBlock("controls_if_elseif");e.initSvg();c.connect(e.previousConnection);
|
|
3392
3442
|
c=e.nextConnection}this.elseCount_&&(a=a.newBlock("controls_if_else"),a.initSvg(),c.connect(a.previousConnection));return b},compose:function(a){a=a.nextConnection.targetBlock();this.elseCount_=this.elseifCount_=0;for(var b=[null],c=[null],d=null;a;){if(!a.isInsertionMarker())switch(a.type){case "controls_if_elseif":this.elseifCount_++;b.push(a.valueConnection_);c.push(a.statementConnection_);break;case "controls_if_else":this.elseCount_++;d=a.statementConnection_;break;default:throw TypeError("Unknown block type: "+
|