diff --git a/.gitignore b/.gitignore index 53eebc859..4216e2f62 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ npm-debug.log .project *.pyc *.komodoproject -/nbproject/private/ \ No newline at end of file +/nbproject/private/ diff --git a/accessible/toolbox-modal.service.js b/accessible/toolbox-modal.service.js index fa860d58d..5d93cea88 100644 --- a/accessible/toolbox-modal.service.js +++ b/accessible/toolbox-modal.service.js @@ -90,24 +90,20 @@ blocklyApp.ToolboxModalService = ng.core.Class({ ); this.computeCategoriesForCreateNewGroupModal_(); } else { - // A timeout seems to be needed in order for the .children accessor to - // work correctly. var that = this; - setTimeout(function() { - // If there are no top-level categories, we create a single category - // containing all the top-level blocks. - var tmpWorkspace = new Blockly.Workspace(); - Array.from(toolboxXmlElt.children).forEach(function(topLevelNode) { - Blockly.Xml.domToBlock(tmpWorkspace, topLevelNode); - }); - - that.allToolboxCategories = [{ - categoryName: '', - blocks: tmpWorkspace.topBlocks_ - }]; - - that.computeCategoriesForCreateNewGroupModal_(); + // If there are no top-level categories, we create a single category + // containing all the top-level blocks. + var tmpWorkspace = new Blockly.Workspace(); + Array.from(toolboxXmlElt.children).forEach(function(topLevelNode) { + Blockly.Xml.domToBlock(tmpWorkspace, topLevelNode); }); + + that.allToolboxCategories = [{ + categoryName: '', + blocks: tmpWorkspace.topBlocks_ + }]; + + that.computeCategoriesForCreateNewGroupModal_(); } }, computeCategoriesForCreateNewGroupModal_: function() { diff --git a/blockly_accessible_compressed.js b/blockly_accessible_compressed.js index 138f74b6a..d3e0380ac 100644 --- a/blockly_accessible_compressed.js +++ b/blockly_accessible_compressed.js @@ -1,7 +1,8 @@ // Do not edit this file; automatically generated by build.py. 'use strict'; -var COMPILED=!0,goog=goog||{};goog.global=this;goog.isDef=function(a){return void 0!==a};goog.isString=function(a){return"string"==typeof a};goog.isBoolean=function(a){return"boolean"==typeof a};goog.isNumber=function(a){return"number"==typeof a};goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&goog.isDef(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}}; +var $jscomp=$jscomp||{};$jscomp.scope={};var COMPILED=!0,goog=goog||{};goog.global=this;goog.isDef=function(a){return void 0!==a};goog.isString=function(a){return"string"==typeof a};goog.isBoolean=function(a){return"boolean"==typeof a};goog.isNumber=function(a){return"number"==typeof a}; +goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&goog.isDef(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}}; goog.define=function(a,b){COMPILED||(goog.global.CLOSURE_UNCOMPILED_DEFINES&&void 0===goog.global.CLOSURE_UNCOMPILED_DEFINES.nodeType&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_UNCOMPILED_DEFINES,a)?b=goog.global.CLOSURE_UNCOMPILED_DEFINES[a]:goog.global.CLOSURE_DEFINES&&void 0===goog.global.CLOSURE_DEFINES.nodeType&&Object.prototype.hasOwnProperty.call(goog.global.CLOSURE_DEFINES,a)&&(b=goog.global.CLOSURE_DEFINES[a]));goog.exportPath_(a,b)};goog.DEBUG=!1;goog.LOCALE="en"; goog.TRUSTED_SITE=!0;goog.STRICT_MODE_COMPATIBLE=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG;goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1;goog.provide=function(a){if(goog.isInModuleLoader_())throw Error("goog.provide can not be used within a goog.module.");if(!COMPILED&&goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');goog.constructNamespace_(a)}; goog.constructNamespace_=function(a,b){if(!COMPILED){delete goog.implicitNamespaces_[a];for(var c=a;(c=c.substring(0,c.lastIndexOf(".")))&&!goog.getObjectByName(c);)goog.implicitNamespaces_[c]=!0}goog.exportPath_(a,b)};goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/; @@ -9,20 +10,20 @@ goog.module=function(a){if(!goog.isString(a)||!a||-1==a.search(goog.VALID_MODULE goog.moduleLoaderState_.moduleName=a;if(!COMPILED){if(goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');delete goog.implicitNamespaces_[a]}};goog.module.get=function(a){return goog.module.getInternal_(a)};goog.module.getInternal_=function(a){if(!COMPILED){if(a in goog.loadedModules_)return goog.loadedModules_[a];if(!goog.implicitNamespaces_[a])return a=goog.getObjectByName(a),null!=a?a:null}return null};goog.moduleLoaderState_=null; goog.isInModuleLoader_=function(){return null!=goog.moduleLoaderState_};goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0}; goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};goog.forwardDeclare=function(a){};COMPILED||(goog.isProvided_=function(a){return a in goog.loadedModules_||!goog.implicitNamespaces_[a]&&goog.isDefAndNotNull(goog.getObjectByName(a))},goog.implicitNamespaces_={"goog.module":!0}); -goog.getObjectByName=function(a,b){a=a.split(".");b=b||goog.global;for(var c;c=a.shift();)if(goog.isDefAndNotNull(b[c]))b=b[c];else return null;return b};goog.globalize=function(a,b){b=b||goog.global;for(var c in a)b[c]=a[c]}; +goog.getObjectByName=function(a,b){a=a.split(".");b=b||goog.global;for(var c=0;c\x3c/script>')},goog.appendScriptSrcNode_=function(a){var b=goog.global.document,c=b.createElement("script"); c.type="text/javascript";c.src=a;c.defer=!1;c.async=!1;b.head.appendChild(c)},goog.writeScriptTag_=function(a,b){if(goog.inHtmlDocument_()){var c=goog.global.document;if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&"complete"==c.readyState){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load');}void 0===b?goog.IS_OLD_IE_?(goog.oldIeWaiting_=!0,b=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ",c.write(' + @@ -354,10 +355,21 @@

Block Definition: +

diff --git a/demos/code/code.js b/demos/code/code.js index 8ad4d1667..db839810c 100644 --- a/demos/code/code.js +++ b/demos/code/code.js @@ -52,6 +52,7 @@ Code.LANGUAGE_NAME = { 'is': 'Íslenska', 'it': 'Italiano', 'ja': '日本語', + 'kab': 'Kabyle', 'ko': '한국어', 'mk': 'Македонски', 'ms': 'Bahasa Melayu', diff --git a/demos/codelab/README.md b/demos/codelab/README.md new file mode 100644 index 000000000..2a5e91315 --- /dev/null +++ b/demos/codelab/README.md @@ -0,0 +1,16 @@ +# Blockly for the Web codelab + +Code for the [Blockly for the Web codelab](https://developers.google.com/TODO). + +In this codelab, you'll learn how to use Blockly JavaScript library +to add a block code editor to a web application. + +## What you'll learn + +* How to add Blockly to a sample web app. +* How to set up a Blockly workspace. +* How to create a new block in Blockly. +* How to generate and run JavaScript code from blocks. + +Example code for each step of the codelab is available from +the [completed](completed/) directory. diff --git a/demos/codelab/app-complete/index.html b/demos/codelab/app-complete/index.html new file mode 100644 index 000000000..107ceefe1 --- /dev/null +++ b/demos/codelab/app-complete/index.html @@ -0,0 +1,73 @@ + + + + + + + + Blockly for the Web Codelab + + + + + + +
+

Music Maker

+

Music Maker Configuration

+
+ +
+ + + +

Tap any button to edit its code.
When complete, press Done.

+ +
+
+
1
+
2
+
3
+
+
+
4
+
5
+
6
+
+
+
7
+
8
+
9
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + diff --git a/demos/codelab/app-complete/scripts/main.js b/demos/codelab/app-complete/scripts/main.js new file mode 100644 index 000000000..2e8e1572e --- /dev/null +++ b/demos/codelab/app-complete/scripts/main.js @@ -0,0 +1,88 @@ +/** + * Copyright 2017 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + (function() { + + let currentButton; + + function handlePlay(event) { + loadWorkspace(event.target); + Blockly.JavaScript.addReservedWords('code'); + var code = Blockly.JavaScript.workspaceToCode(Blockly.getMainWorkspace()); + code += 'MusicMaker.play();'; + // Eval can be dangerous. For more controlled execution, check + // https://github.com/NeilFraser/JS-Interpreter. + try { + eval(code); + } catch (error) { + console.log(error); + } + } + + function loadWorkspace(button) { + let workspace = Blockly.getMainWorkspace(); + workspace.clear(); + if (button.blocklyXml) { + Blockly.Xml.domToWorkspace(button.blocklyXml, workspace); + } + } + + function save(button) { + let xml = Blockly.Xml.workspaceToDom(Blockly.getMainWorkspace()); + button.blocklyXml = xml; + } + + function handleSave() { + document.body.setAttribute('mode', 'edit'); + save(currentButton); + } + + function enableEditMode() { + document.body.setAttribute('mode', 'edit'); + document.querySelectorAll('.button').forEach(btn => { + btn.removeEventListener('click', handlePlay); + btn.addEventListener('click', enableBlocklyMode); + }); + } + + function enableMakerMode() { + document.body.setAttribute('mode', 'maker'); + document.querySelectorAll('.button').forEach(btn => { + btn.addEventListener('click', handlePlay); + btn.removeEventListener('click', enableBlocklyMode); + }); + } + + function enableBlocklyMode(e) { + document.body.setAttribute('mode', 'blockly'); + currentButton = e.target; + loadWorkspace(currentButton); + } + + document.querySelector('#edit').addEventListener('click', enableEditMode); + document.querySelector('#done').addEventListener('click', enableMakerMode); + document.querySelector('#save').addEventListener('click', handleSave); + + enableMakerMode(); + + Blockly.inject('blockly-div', { + media: '../../../media/', + toolbox: document.getElementById('toolbox'), + toolboxPosition: 'end', + horizontalLayout: true, + scrollbars: false + }); +})(); diff --git a/demos/codelab/app-complete/scripts/music_maker.js b/demos/codelab/app-complete/scripts/music_maker.js new file mode 100644 index 000000000..50a8a3b7f --- /dev/null +++ b/demos/codelab/app-complete/scripts/music_maker.js @@ -0,0 +1,33 @@ +/** + * Copyright 2017 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + const MusicMaker = { + queue_: [], + player_: new Audio(), + queueSound: function(soundUrl) { + this.queue_.push(soundUrl); + }, + play: function() { + let next = this.queue_.shift(); + if (next) { + this.player_.src = next; + this.player_.play(); + } + }, +}; + +MusicMaker.player_.addEventListener( + 'ended', MusicMaker.play.bind(MusicMaker)); diff --git a/demos/codelab/app-complete/scripts/sound_blocks.js b/demos/codelab/app-complete/scripts/sound_blocks.js new file mode 100644 index 000000000..b666d4f4d --- /dev/null +++ b/demos/codelab/app-complete/scripts/sound_blocks.js @@ -0,0 +1,50 @@ +/** + * Copyright 2017 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +Blockly.defineBlocksWithJsonArray([ + // Block for colour picker. + { + "type": "play_sound", + "message0": "Play %1", + "args0": [ + { + "type": "field_dropdown", + "name": "VALUE", + "options": [ + ["C4", "sounds/c4.m4a"], + ["D4", "sounds/d4.m4a"], + ["E4", "sounds/e4.m4a"], + ["F4", "sounds/f4.m4a"], + ["G4", "sounds/g4.m4a"], + ["A5", "sounds/a5.m4a"], + ["B5", "sounds/b5.m4a"], + ["C5", "sounds/c5.m4a"] + ] + } + ], + "previousStatement": null, + "nextStatement": null, + "colour": 355, + "tooltip": "", + "helpUrl": "" + } +]); + +Blockly.JavaScript['play_sound'] = function(block) { + var value = '\'' + block.getFieldValue('VALUE') + '\''; + return 'MusicMaker.queueSound(' + value + ');\n'; +}; diff --git a/demos/codelab/app-complete/sounds/c4.m4a b/demos/codelab/app-complete/sounds/c4.m4a new file mode 100644 index 000000000..33941cfae Binary files /dev/null and b/demos/codelab/app-complete/sounds/c4.m4a differ diff --git a/demos/codelab/app-complete/sounds/c5.m4a b/demos/codelab/app-complete/sounds/c5.m4a new file mode 100644 index 000000000..49721cd31 Binary files /dev/null and b/demos/codelab/app-complete/sounds/c5.m4a differ diff --git a/demos/codelab/app-complete/sounds/d4.m4a b/demos/codelab/app-complete/sounds/d4.m4a new file mode 100644 index 000000000..51bcad6c2 Binary files /dev/null and b/demos/codelab/app-complete/sounds/d4.m4a differ diff --git a/demos/codelab/app-complete/sounds/e4.m4a b/demos/codelab/app-complete/sounds/e4.m4a new file mode 100644 index 000000000..d910052ef Binary files /dev/null and b/demos/codelab/app-complete/sounds/e4.m4a differ diff --git a/demos/codelab/app-complete/sounds/f4.m4a b/demos/codelab/app-complete/sounds/f4.m4a new file mode 100644 index 000000000..c80a0bfd3 Binary files /dev/null and b/demos/codelab/app-complete/sounds/f4.m4a differ diff --git a/demos/codelab/app-complete/sounds/g4.m4a b/demos/codelab/app-complete/sounds/g4.m4a new file mode 100644 index 000000000..45ea44830 Binary files /dev/null and b/demos/codelab/app-complete/sounds/g4.m4a differ diff --git a/demos/codelab/app-complete/styles/index.css b/demos/codelab/app-complete/styles/index.css new file mode 100644 index 000000000..0ef8f3bfc --- /dev/null +++ b/demos/codelab/app-complete/styles/index.css @@ -0,0 +1,75 @@ +main { + width: 400px; + position: relative; + margin: 0 auto; + overflow:hidden; + height: 600px; +} + +header { + background-color: green; + width: 100%; +} + +h1 { + width: 400px; + position: relative; + margin: 0 auto; + color: #fff; + font-size: 1.8em; + line-height: 2.4em; +} + +.mode-edit, +.mode-maker, +.mode-blockly { + display: none; +} + +[mode="maker"] .mode-maker, +[mode="edit"] .mode-edit, +[mode="blockly"] .mode-blockly { + display: block; +} + +.blockly-editor { + position: absolute; + top: 64px; + left: -400px; + transition: left .4s; + height: 460px; + width: 400px; + background-color: #eee; +} + +[mode="blockly"] .blockly-editor { + left: 0; +} + +.maker { + display: flex; + flex-flow: column; + justify-content: space-between; + height: 460px; + width: 400px; +} + +.maker > div { + display: flex; + justify-content: space-between; +} + +.button { + width: 120px; + height: 140px; + color: #fff; + font-size: 3em; + text-align: center; + vertical-align: middle; + line-height: 140px; +} + +.mdl-button { + margin: 1em 0; + float: right; +} diff --git a/demos/codelab/app/index.html b/demos/codelab/app/index.html new file mode 100644 index 000000000..31eeff776 --- /dev/null +++ b/demos/codelab/app/index.html @@ -0,0 +1,53 @@ + + + + + + + + Blockly for the Web Codelab + + + + + + +
+

Music Maker

+

Music Maker Configuration

+
+ +
+ + + +

Tap any button to edit its code.
When complete, press Done.

+ +
+
+
1
+
2
+
3
+
+
+
4
+
5
+
6
+
+
+
7
+
8
+
9
+
+
+ +
+
+
+
+ + + + + + diff --git a/demos/codelab/app/scripts/main.js b/demos/codelab/app/scripts/main.js new file mode 100644 index 000000000..31fba5a97 --- /dev/null +++ b/demos/codelab/app/scripts/main.js @@ -0,0 +1,61 @@ +/** + * Copyright 2017 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + (function() { + + let currentButton; + + function handlePlay(event) { + // Add code for playing sound. + } + + function save(button) { + // Add code for saving the behavior of a button. + } + + function handleSave() { + document.body.setAttribute('mode', 'edit'); + save(currentButton); + } + + function enableEditMode() { + document.body.setAttribute('mode', 'edit'); + document.querySelectorAll('.button').forEach(btn => { + btn.removeEventListener('click', handlePlay); + btn.addEventListener('click', enableBlocklyMode); + }); + } + + function enableMakerMode() { + document.body.setAttribute('mode', 'maker'); + document.querySelectorAll('.button').forEach(btn => { + btn.addEventListener('click', handlePlay); + btn.removeEventListener('click', enableBlocklyMode); + }); + } + + function enableBlocklyMode(e) { + document.body.setAttribute('mode', 'blockly'); + currentButton = e.target; + } + + document.querySelector('#edit').addEventListener('click', enableEditMode); + document.querySelector('#done').addEventListener('click', enableMakerMode); + document.querySelector('#save').addEventListener('click', handleSave); + + enableMakerMode(); + +})(); diff --git a/demos/codelab/app/scripts/music_maker.js b/demos/codelab/app/scripts/music_maker.js new file mode 100644 index 000000000..50a8a3b7f --- /dev/null +++ b/demos/codelab/app/scripts/music_maker.js @@ -0,0 +1,33 @@ +/** + * Copyright 2017 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + const MusicMaker = { + queue_: [], + player_: new Audio(), + queueSound: function(soundUrl) { + this.queue_.push(soundUrl); + }, + play: function() { + let next = this.queue_.shift(); + if (next) { + this.player_.src = next; + this.player_.play(); + } + }, +}; + +MusicMaker.player_.addEventListener( + 'ended', MusicMaker.play.bind(MusicMaker)); diff --git a/demos/codelab/app/sounds/c4.m4a b/demos/codelab/app/sounds/c4.m4a new file mode 100644 index 000000000..33941cfae Binary files /dev/null and b/demos/codelab/app/sounds/c4.m4a differ diff --git a/demos/codelab/app/sounds/c5.m4a b/demos/codelab/app/sounds/c5.m4a new file mode 100644 index 000000000..49721cd31 Binary files /dev/null and b/demos/codelab/app/sounds/c5.m4a differ diff --git a/demos/codelab/app/sounds/d4.m4a b/demos/codelab/app/sounds/d4.m4a new file mode 100644 index 000000000..51bcad6c2 Binary files /dev/null and b/demos/codelab/app/sounds/d4.m4a differ diff --git a/demos/codelab/app/sounds/e4.m4a b/demos/codelab/app/sounds/e4.m4a new file mode 100644 index 000000000..d910052ef Binary files /dev/null and b/demos/codelab/app/sounds/e4.m4a differ diff --git a/demos/codelab/app/sounds/f4.m4a b/demos/codelab/app/sounds/f4.m4a new file mode 100644 index 000000000..c80a0bfd3 Binary files /dev/null and b/demos/codelab/app/sounds/f4.m4a differ diff --git a/demos/codelab/app/sounds/g4.m4a b/demos/codelab/app/sounds/g4.m4a new file mode 100644 index 000000000..45ea44830 Binary files /dev/null and b/demos/codelab/app/sounds/g4.m4a differ diff --git a/demos/codelab/app/styles/index.css b/demos/codelab/app/styles/index.css new file mode 100644 index 000000000..0ef8f3bfc --- /dev/null +++ b/demos/codelab/app/styles/index.css @@ -0,0 +1,75 @@ +main { + width: 400px; + position: relative; + margin: 0 auto; + overflow:hidden; + height: 600px; +} + +header { + background-color: green; + width: 100%; +} + +h1 { + width: 400px; + position: relative; + margin: 0 auto; + color: #fff; + font-size: 1.8em; + line-height: 2.4em; +} + +.mode-edit, +.mode-maker, +.mode-blockly { + display: none; +} + +[mode="maker"] .mode-maker, +[mode="edit"] .mode-edit, +[mode="blockly"] .mode-blockly { + display: block; +} + +.blockly-editor { + position: absolute; + top: 64px; + left: -400px; + transition: left .4s; + height: 460px; + width: 400px; + background-color: #eee; +} + +[mode="blockly"] .blockly-editor { + left: 0; +} + +.maker { + display: flex; + flex-flow: column; + justify-content: space-between; + height: 460px; + width: 400px; +} + +.maker > div { + display: flex; + justify-content: space-between; +} + +.button { + width: 120px; + height: 140px; + color: #fff; + font-size: 3em; + text-align: center; + vertical-align: middle; + line-height: 140px; +} + +.mdl-button { + margin: 1em 0; + float: right; +} diff --git a/demos/custom-dialogs/index.html b/demos/custom-dialogs/index.html index 42cba5477..ee1bc840e 100644 --- a/demos/custom-dialogs/index.html +++ b/demos/custom-dialogs/index.html @@ -47,7 +47,7 @@ diff --git a/demos/fixed-advanced/index.html b/demos/fixed-advanced/index.html new file mode 100644 index 000000000..a5630860d --- /dev/null +++ b/demos/fixed-advanced/index.html @@ -0,0 +1,45 @@ + + + + + Blockly Demo: Fixed Blockly built with Closure Compiler's advanced optimizations + + + + +

+ Blockly > + Demos > + Fixed Blockly built with Closure Compiler's advanced optimizations +

+ +

+ This is a simple demo of injecting Blockly into a fixed-sized 'div' element + from a Closure-compiled source code with advanced optimizations. +

+ +

→ More info on injecting fixed-sized Blockly

+ +
+ + + + + diff --git a/demos/fixed-advanced/main.js b/demos/fixed-advanced/main.js new file mode 100644 index 000000000..5276e03d3 --- /dev/null +++ b/demos/fixed-advanced/main.js @@ -0,0 +1,31 @@ +/** + * @fileoverview Main file (entry point) for the advanced compilation demo. + */ +'use strict'; + +goog.provide('Demo'); + +// messages (in some language) +goog.require('Blockly.Msg.en'); +// core +goog.require('Blockly'); +// blocks +goog.require('Blockly.Constants.Colour'); +goog.require('Blockly.Constants.Lists'); +goog.require('Blockly.Constants.Logic'); +goog.require('Blockly.Constants.Loops'); +goog.require('Blockly.Constants.Math'); +goog.require('Blockly.Blocks.procedures'); +goog.require('Blockly.Constants.Text'); +goog.require('Blockly.Constants.Variables'); + + +Demo.init = function() { + Blockly.inject('blocklyDiv', { + 'media': '../../media/', + 'toolbox': document.getElementById('toolbox') + }); +} + +window.addEventListener('load', Demo.init); + diff --git a/demos/fixed/index.html b/demos/fixed/index.html index 680fa7691..346732858 100644 --- a/demos/fixed/index.html +++ b/demos/fixed/index.html @@ -38,7 +38,7 @@ diff --git a/demos/generator/index.html b/demos/generator/index.html index 7bc483855..c76e1f3e6 100644 --- a/demos/generator/index.html +++ b/demos/generator/index.html @@ -113,16 +113,16 @@ diff --git a/demos/interpreter/async-execution.html b/demos/interpreter/async-execution.html index e68f0dc0d..bb9c0a4b6 100644 --- a/demos/interpreter/async-execution.html +++ b/demos/interpreter/async-execution.html @@ -132,11 +132,11 @@ - \ No newline at end of file + diff --git a/demos/interpreter/step-execution.html b/demos/interpreter/step-execution.html index 8a8b95a6a..c0a3b59f3 100644 --- a/demos/interpreter/step-execution.html +++ b/demos/interpreter/step-execution.html @@ -134,11 +134,11 @@ diff --git a/demos/resizable/overlay.html b/demos/resizable/overlay.html index 2d9f41f9b..ee2600e04 100644 --- a/demos/resizable/overlay.html +++ b/demos/resizable/overlay.html @@ -66,7 +66,7 @@ diff --git a/demos/rtl/index.html b/demos/rtl/index.html index fd84febd2..080e9f864 100644 --- a/demos/rtl/index.html +++ b/demos/rtl/index.html @@ -23,12 +23,12 @@ diff --git a/externs/svg-externs.js b/externs/svg-externs.js new file mode 100644 index 000000000..68cd99706 --- /dev/null +++ b/externs/svg-externs.js @@ -0,0 +1,10243 @@ +/* + * Copyright 2017 The Closure Compiler Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Generated by closureidl 0.2dev closureidl-parser-webkit 0.2dev dart-idl 7592. + * Parser: type=webkit dir=${WEBKIT}/Source/WebCore/_/_.idl dir=${WEBKIT}/Source/WebCore/_/_/_.idl dir=${WEBKIT}/Source/WebCore/Modules/_/_.idl + * Context0: id=webkit + * Filter0: annotate-platform platform=webkit + * Filter1: merge-supplemental + * Filter2: fix-nulls + * Filter3: fix-constructors + * Filter4: rename-interfaces + * Filter5: check-consistency + * Context1: id=closure + * Filter0: import context=webkit + * Filter1: closure:merge-overloaded-methods + * Filter2: closure:fix-callbacks remove=false + * Filter3: closure:fix-arrays remove=simple + * Filter4: closure:fix-optionals + * Filter5: closure:rename-reserved-params + * Filter6: closure:guess-interfaces + * Filter7: closure:expand-interfaces + * Output: format=js + * + * @externs + */ + + + +/** + * @constructor + */ +function SVGAnimatedNumberList(){} + + +/** + * @type {!SVGNumberList} + */ +SVGAnimatedNumberList.prototype.baseVal; + + +/** + * @type {!SVGNumberList} + */ +SVGAnimatedNumberList.prototype.animVal; + + + +/** + * @constructor + */ +function SVGLengthList(){} + + +/** + * @type {number} + */ +SVGLengthList.prototype.numberOfItems; + + +/** */ +SVGLengthList.prototype.clear = function(){}; + + +/** + * @param {!SVGLength} item + * @return {!SVGLength} + */ +SVGLengthList.prototype.initialize = function(item){}; + + +/** + * @param {number} index + * @return {!SVGLength} + */ +SVGLengthList.prototype.getItem = function(index){}; + + +/** + * @param {!SVGLength} item + * @param {number} index + * @return {!SVGLength} + */ +SVGLengthList.prototype.insertItemBefore = function(item, index){}; + + +/** + * @param {!SVGLength} item + * @param {number} index + * @return {!SVGLength} + */ +SVGLengthList.prototype.replaceItem = function(item, index){}; + + +/** + * @param {number} index + * @return {!SVGLength} + */ +SVGLengthList.prototype.removeItem = function(index){}; + + +/** + * @param {!SVGLength} item + * @return {!SVGLength} + */ +SVGLengthList.prototype.appendItem = function(item){}; + + + +/** + * @constructor + * @implements {EventTarget} + */ +function SVGElementInstance(){} + + +/** + * @type {!SVGElement} + */ +SVGElementInstance.prototype.correspondingElement; + + +/** + * @type {!SVGUseElement} + */ +SVGElementInstance.prototype.correspondingUseElement; + + +/** + * @type {!SVGElementInstance} + */ +SVGElementInstance.prototype.parentNode; + + +/** + * @type {!Array|!SVGElementInstanceList} + */ +SVGElementInstance.prototype.childNodes; + + +/** + * @type {!SVGElementInstance} + */ +SVGElementInstance.prototype.firstChild; + + +/** + * @type {!SVGElementInstance} + */ +SVGElementInstance.prototype.lastChild; + + +/** + * @type {!SVGElementInstance} + */ +SVGElementInstance.prototype.previousSibling; + + +/** + * @type {!SVGElementInstance} + */ +SVGElementInstance.prototype.nextSibling; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onabort; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onblur; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onchange; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onclick; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.oncontextmenu; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.ondblclick; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onerror; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onfocus; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.oninput; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onkeydown; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onkeypress; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onkeyup; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onload; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onmousedown; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onmousemove; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onmouseout; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onmouseover; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onmouseup; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onmousewheel; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onbeforecut; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.oncut; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onbeforecopy; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.oncopy; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onbeforepaste; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onpaste; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.ondragenter; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.ondragover; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.ondragleave; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.ondrop; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.ondragstart; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.ondrag; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.ondragend; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onreset; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onresize; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onscroll; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onsearch; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onselect; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onselectstart; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onsubmit; + + +/** + * @type {!EventListener|function(!Event)} + */ +SVGElementInstance.prototype.onunload; + + +/** + * @override + */ +SVGElementInstance.prototype.addEventListener = function(type, listener, opt_useCapture){}; + + +/** + * @override + */ +SVGElementInstance.prototype.removeEventListener = function(type, listener, opt_useCapture){}; + + +/** + * @param {!Event} event + * @return {boolean} + * @override + */ +SVGElementInstance.prototype.dispatchEvent = function(event){}; + + + +/** + * @constructor + */ +function SVGAnimatedRect(){} + + +/** + * @type {!SVGRect} + */ +SVGAnimatedRect.prototype.baseVal; + + +/** + * @type {!SVGRect} + */ +SVGAnimatedRect.prototype.animVal; + + + +/** + * @constructor + */ +function SVGAnimatedString(){} + + +/** + * @type {string} + */ +SVGAnimatedString.prototype.baseVal; + + +/** + * @type {string} + */ +SVGAnimatedString.prototype.animVal; + + + +/** + * @interface + */ +function SVGStylable(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGStylable.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + */ +SVGStylable.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @interface + */ +function SVGExternalResourcesRequired(){} + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGExternalResourcesRequired.prototype.externalResourcesRequired; + + + +/** + * @constructor + */ +function SVGPoint(){} + + +/** + * @type {number} + */ +SVGPoint.prototype.x; + + +/** + * @type {number} + */ +SVGPoint.prototype.y; + + +/** + * @param {!SVGMatrix} matrix + * @return {!SVGPoint} + */ +SVGPoint.prototype.matrixTransform = function(matrix){}; + + + +/** + * @constructor + */ +function SVGMatrix(){} + + +/** + * @type {number} + */ +SVGMatrix.prototype.a; + + +/** + * @type {number} + */ +SVGMatrix.prototype.b; + + +/** + * @type {number} + */ +SVGMatrix.prototype.c; + + +/** + * @type {number} + */ +SVGMatrix.prototype.d; + + +/** + * @type {number} + */ +SVGMatrix.prototype.e; + + +/** + * @type {number} + */ +SVGMatrix.prototype.f; + + +/** + * @param {!SVGMatrix} secondMatrix + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.multiply = function(secondMatrix){}; + + +/** + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.inverse = function(){}; + + +/** + * @param {number} x + * @param {number} y + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.translate = function(x, y){}; + + +/** + * @param {number} scaleFactor + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.scale = function(scaleFactor){}; + + +/** + * @param {number} scaleFactorX + * @param {number} scaleFactorY + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.scaleNonUniform = function(scaleFactorX, scaleFactorY){}; + + +/** + * @param {number} angle + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.rotate = function(angle){}; + + +/** + * @param {number} x + * @param {number} y + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.rotateFromVector = function(x, y){}; + + +/** + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.flipX = function(){}; + + +/** + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.flipY = function(){}; + + +/** + * @param {number} angle + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.skewX = function(angle){}; + + +/** + * @param {number} angle + * @return {!SVGMatrix} + */ +SVGMatrix.prototype.skewY = function(angle){}; + + + +/** + * @constructor + */ +function SVGNumberList(){} + + +/** + * @type {number} + */ +SVGNumberList.prototype.numberOfItems; + + +/** */ +SVGNumberList.prototype.clear = function(){}; + + +/** + * @param {!SVGNumber} item + * @return {!SVGNumber} + */ +SVGNumberList.prototype.initialize = function(item){}; + + +/** + * @param {number} index + * @return {!SVGNumber} + */ +SVGNumberList.prototype.getItem = function(index){}; + + +/** + * @param {!SVGNumber} item + * @param {number} index + * @return {!SVGNumber} + */ +SVGNumberList.prototype.insertItemBefore = function(item, index){}; + + +/** + * @param {!SVGNumber} item + * @param {number} index + * @return {!SVGNumber} + */ +SVGNumberList.prototype.replaceItem = function(item, index){}; + + +/** + * @param {number} index + * @return {!SVGNumber} + */ +SVGNumberList.prototype.removeItem = function(index){}; + + +/** + * @param {!SVGNumber} item + * @return {!SVGNumber} + */ +SVGNumberList.prototype.appendItem = function(item){}; + + + +/** + * @interface + */ +function SVGLangSpace(){} + + +/** + * @type {string} + */ +SVGLangSpace.prototype.xmllang; + + +/** + * @type {string} + */ +SVGLangSpace.prototype.xmlspace; + + + +/** + * @constructor + */ +function SVGAnimatedLengthList(){} + + +/** + * @type {!SVGLengthList} + */ +SVGAnimatedLengthList.prototype.baseVal; + + +/** + * @type {!SVGLengthList} + */ +SVGAnimatedLengthList.prototype.animVal; + + + +/** + * @constructor + */ +function SVGAnimatedTransformList(){} + + +/** + * @type {!SVGTransformList} + */ +SVGAnimatedTransformList.prototype.baseVal; + + +/** + * @type {!SVGTransformList} + */ +SVGAnimatedTransformList.prototype.animVal; + + + +/** + * @constructor + */ +function SVGUnitTypes(){} + + +/** + * @const + * @type {number} + */ +SVGUnitTypes.SVG_UNIT_TYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGUnitTypes.prototype.SVG_UNIT_TYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE; + + +/** + * @const + * @type {number} + */ +SVGUnitTypes.prototype.SVG_UNIT_TYPE_USERSPACEONUSE; + + +/** + * @const + * @type {number} + */ +SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX; + + +/** + * @const + * @type {number} + */ +SVGUnitTypes.prototype.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX; + + + +/** + * @constructor + */ +function SVGLength(){} + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_NUMBER; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_NUMBER; + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_PERCENTAGE; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_PERCENTAGE; + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_EMS; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_EMS; + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_EXS; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_EXS; + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_PX; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_PX; + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_CM; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_CM; + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_MM; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_MM; + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_IN; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_IN; + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_PT; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_PT; + + +/** + * @const + * @type {number} + */ +SVGLength.SVG_LENGTHTYPE_PC; + + +/** + * @const + * @type {number} + */ +SVGLength.prototype.SVG_LENGTHTYPE_PC; + + +/** + * @type {number} + */ +SVGLength.prototype.unitType; + + +/** + * @type {number} + */ +SVGLength.prototype.value; + + +/** + * @type {number} + */ +SVGLength.prototype.valueInSpecifiedUnits; + + +/** + * @type {string} + */ +SVGLength.prototype.valueAsString; + + +/** + * @param {number} unitType + * @param {number} valueInSpecifiedUnits + * @return {undefined} + */ +SVGLength.prototype.newValueSpecifiedUnits = function(unitType, valueInSpecifiedUnits){}; + + +/** + * @param {number} unitType + * @return {undefined} + */ +SVGLength.prototype.convertToSpecifiedUnits = function(unitType){}; + + + +/** + * @constructor + */ +function SVGAnimatedNumber(){} + + +/** + * @type {number} + */ +SVGAnimatedNumber.prototype.baseVal; + + +/** + * @type {number} + */ +SVGAnimatedNumber.prototype.animVal; + + + +/** + * @constructor + */ +function SVGAnimatedAngle(){} + + +/** + * @type {!SVGAngle} + */ +SVGAnimatedAngle.prototype.baseVal; + + +/** + * @type {!SVGAngle} + */ +SVGAnimatedAngle.prototype.animVal; + + + +/** + * @interface + * @extends {SVGStylable} + */ +function SVGFilterPrimitiveStandardAttributes(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFilterPrimitiveStandardAttributes.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFilterPrimitiveStandardAttributes.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFilterPrimitiveStandardAttributes.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFilterPrimitiveStandardAttributes.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFilterPrimitiveStandardAttributes.prototype.result; + + + +/** + * @constructor + * @extends {SVGGradientElement} + */ +function SVGLinearGradientElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGLinearGradientElement.prototype.x1; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGLinearGradientElement.prototype.y1; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGLinearGradientElement.prototype.x2; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGLinearGradientElement.prototype.y2; + + + +/** + * @constructor + * @extends {SVGGradientElement} + */ +function SVGRadialGradientElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRadialGradientElement.prototype.cx; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRadialGradientElement.prototype.cy; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRadialGradientElement.prototype.r; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRadialGradientElement.prototype.fx; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRadialGradientElement.prototype.fy; + + + +/** + * @constructor + */ +function SVGTransform(){} + + +/** + * @const + * @type {number} + */ +SVGTransform.SVG_TRANSFORM_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGTransform.prototype.SVG_TRANSFORM_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGTransform.SVG_TRANSFORM_MATRIX; + + +/** + * @const + * @type {number} + */ +SVGTransform.prototype.SVG_TRANSFORM_MATRIX; + + +/** + * @const + * @type {number} + */ +SVGTransform.SVG_TRANSFORM_TRANSLATE; + + +/** + * @const + * @type {number} + */ +SVGTransform.prototype.SVG_TRANSFORM_TRANSLATE; + + +/** + * @const + * @type {number} + */ +SVGTransform.SVG_TRANSFORM_SCALE; + + +/** + * @const + * @type {number} + */ +SVGTransform.prototype.SVG_TRANSFORM_SCALE; + + +/** + * @const + * @type {number} + */ +SVGTransform.SVG_TRANSFORM_ROTATE; + + +/** + * @const + * @type {number} + */ +SVGTransform.prototype.SVG_TRANSFORM_ROTATE; + + +/** + * @const + * @type {number} + */ +SVGTransform.SVG_TRANSFORM_SKEWX; + + +/** + * @const + * @type {number} + */ +SVGTransform.prototype.SVG_TRANSFORM_SKEWX; + + +/** + * @const + * @type {number} + */ +SVGTransform.SVG_TRANSFORM_SKEWY; + + +/** + * @const + * @type {number} + */ +SVGTransform.prototype.SVG_TRANSFORM_SKEWY; + + +/** + * @type {number} + */ +SVGTransform.prototype.type; + + +/** + * @type {!SVGMatrix} + */ +SVGTransform.prototype.matrix; + + +/** + * @type {number} + */ +SVGTransform.prototype.angle; + + +/** + * @param {!SVGMatrix} matrix + * @return {undefined} + */ +SVGTransform.prototype.setMatrix = function(matrix){}; + + +/** + * @param {number} tx + * @param {number} ty + * @return {undefined} + */ +SVGTransform.prototype.setTranslate = function(tx, ty){}; + + +/** + * @param {number} sx + * @param {number} sy + * @return {undefined} + */ +SVGTransform.prototype.setScale = function(sx, sy){}; + + +/** + * @param {number} angle + * @param {number} cx + * @param {number} cy + * @return {undefined} + */ +SVGTransform.prototype.setRotate = function(angle, cx, cy){}; + + +/** + * @param {number} angle + * @return {undefined} + */ +SVGTransform.prototype.setSkewX = function(angle){}; + + +/** + * @param {number} angle + * @return {undefined} + */ +SVGTransform.prototype.setSkewY = function(angle){}; + + + +/** + * @interface + */ +function SVGZoomAndPan(){} + +/** + * @type {number} + */ +SVGZoomAndPan.prototype.zoomAndPan; + + + +/** + * @constructor + */ +function SVGPreserveAspectRatio(){} + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_NONE; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_NONE; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMIN; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_XMINYMIN; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_XMIDYMIN; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_XMAXYMIN; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMID; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_XMINYMID; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_XMIDYMID; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMID; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_XMAXYMID; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMAX; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_XMINYMAX; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMAX; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_XMIDYMAX; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMAX; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_PRESERVEASPECTRATIO_XMAXYMAX; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_MEETORSLICE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_MEETORSLICE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_MEETORSLICE_MEET; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE; + + +/** + * @const + * @type {number} + */ +SVGPreserveAspectRatio.prototype.SVG_MEETORSLICE_SLICE; + + +/** + * @type {number} + */ +SVGPreserveAspectRatio.prototype.align; + + +/** + * @type {number} + */ +SVGPreserveAspectRatio.prototype.meetOrSlice; + + + +/** + * @constructor + */ +function SVGRect(){} + + +/** + * @type {number} + */ +SVGRect.prototype.x; + + +/** + * @type {number} + */ +SVGRect.prototype.y; + + +/** + * @type {number} + */ +SVGRect.prototype.width; + + +/** + * @type {number} + */ +SVGRect.prototype.height; + + + +/** + * @constructor + */ +function SVGException(){} + + +/** + * @const + * @type {number} + */ +SVGException.SVG_WRONG_TYPE_ERR; + + +/** + * @const + * @type {number} + */ +SVGException.prototype.SVG_WRONG_TYPE_ERR; + + +/** + * @const + * @type {number} + */ +SVGException.SVG_INVALID_VALUE_ERR; + + +/** + * @const + * @type {number} + */ +SVGException.prototype.SVG_INVALID_VALUE_ERR; + + +/** + * @const + * @type {number} + */ +SVGException.SVG_MATRIX_NOT_INVERTABLE; + + +/** + * @const + * @type {number} + */ +SVGException.prototype.SVG_MATRIX_NOT_INVERTABLE; + + +/** + * @type {number} + */ +SVGException.prototype.code; + + +/** + * @type {string} + */ +SVGException.prototype.name; + + +/** + * @type {string} + */ +SVGException.prototype.message; + + +/** + * @return {string} + * @override + */ +SVGException.prototype.toString = function(){}; + + + +/** + * @constructor + * @extends {CSSValue} + */ +function SVGColor(){} + + +/** + * @const + * @type {number} + */ +SVGColor.SVG_COLORTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGColor.prototype.SVG_COLORTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGColor.SVG_COLORTYPE_RGBCOLOR; + + +/** + * @const + * @type {number} + */ +SVGColor.prototype.SVG_COLORTYPE_RGBCOLOR; + + +/** + * @const + * @type {number} + */ +SVGColor.SVG_COLORTYPE_RGBCOLOR_ICCCOLOR; + + +/** + * @const + * @type {number} + */ +SVGColor.prototype.SVG_COLORTYPE_RGBCOLOR_ICCCOLOR; + + +/** + * @const + * @type {number} + */ +SVGColor.SVG_COLORTYPE_CURRENTCOLOR; + + +/** + * @const + * @type {number} + */ +SVGColor.prototype.SVG_COLORTYPE_CURRENTCOLOR; + + +/** + * @type {number} + */ +SVGColor.prototype.colorType; + + +/** + * @type {!RGBColor} + */ +SVGColor.prototype.rgbColor; + + +/** + * @param {string} rgbColor + * @return {undefined} + */ +SVGColor.prototype.setRGBColor = function(rgbColor){}; + + +/** + * @param {string} rgbColor + * @param {string} iccColor + * @return {undefined} + */ +SVGColor.prototype.setRGBColorICCColor = function(rgbColor, iccColor){}; + + +/** + * @param {number} colorType + * @param {string} rgbColor + * @param {string} iccColor + * @return {undefined} + */ +SVGColor.prototype.setColor = function(colorType, rgbColor, iccColor){}; + + + +/** + * @constructor + * @extends {SVGColor} + */ +function SVGPaint(){} + + +/** + * @const + * @type {number} + */ +SVGPaint.SVG_PAINTTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGPaint.prototype.SVG_PAINTTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGPaint.SVG_PAINTTYPE_RGBCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.prototype.SVG_PAINTTYPE_RGBCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.prototype.SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.SVG_PAINTTYPE_NONE; + + +/** + * @const + * @type {number} + */ +SVGPaint.prototype.SVG_PAINTTYPE_NONE; + + +/** + * @const + * @type {number} + */ +SVGPaint.SVG_PAINTTYPE_CURRENTCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.prototype.SVG_PAINTTYPE_CURRENTCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.SVG_PAINTTYPE_URI_NONE; + + +/** + * @const + * @type {number} + */ +SVGPaint.prototype.SVG_PAINTTYPE_URI_NONE; + + +/** + * @const + * @type {number} + */ +SVGPaint.SVG_PAINTTYPE_URI_CURRENTCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.prototype.SVG_PAINTTYPE_URI_CURRENTCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.SVG_PAINTTYPE_URI_RGBCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.prototype.SVG_PAINTTYPE_URI_RGBCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.prototype.SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR; + + +/** + * @const + * @type {number} + */ +SVGPaint.SVG_PAINTTYPE_URI; + + +/** + * @const + * @type {number} + */ +SVGPaint.prototype.SVG_PAINTTYPE_URI; + + +/** + * @type {number} + */ +SVGPaint.prototype.paintType; + + +/** + * @type {string} + */ +SVGPaint.prototype.uri; + + +/** + * @param {string} uri + * @return {undefined} + */ +SVGPaint.prototype.setUri = function(uri){}; + + +/** + * @param {number} paintType + * @param {string} uri + * @param {string} rgbColor + * @param {string} iccColor + * @return {undefined} + */ +SVGPaint.prototype.setPaint = function(paintType, uri, rgbColor, iccColor){}; + + + +/** + * @constructor + */ +function SVGPointList(){} + + +/** + * @type {number} + */ +SVGPointList.prototype.numberOfItems; + + +/** */ +SVGPointList.prototype.clear = function(){}; + + +/** + * @param {!SVGPoint} item + * @return {!SVGPoint} + */ +SVGPointList.prototype.initialize = function(item){}; + + +/** + * @param {number} index + * @return {!SVGPoint} + */ +SVGPointList.prototype.getItem = function(index){}; + + +/** + * @param {!SVGPoint} item + * @param {number} index + * @return {!SVGPoint} + */ +SVGPointList.prototype.insertItemBefore = function(item, index){}; + + +/** + * @param {!SVGPoint} item + * @param {number} index + * @return {!SVGPoint} + */ +SVGPointList.prototype.replaceItem = function(item, index){}; + + +/** + * @param {number} index + * @return {!SVGPoint} + */ +SVGPointList.prototype.removeItem = function(index){}; + + +/** + * @param {!SVGPoint} item + * @return {!SVGPoint} + */ +SVGPointList.prototype.appendItem = function(item){}; + + + +/** + * @constructor + */ +function SVGTransformList(){} + + +/** + * @type {number} + */ +SVGTransformList.prototype.numberOfItems; + + +/** */ +SVGTransformList.prototype.clear = function(){}; + + +/** + * @param {!SVGTransform} item + * @return {!SVGTransform} + */ +SVGTransformList.prototype.initialize = function(item){}; + + +/** + * @param {number} index + * @return {!SVGTransform} + */ +SVGTransformList.prototype.getItem = function(index){}; + + +/** + * @param {!SVGTransform} item + * @param {number} index + * @return {!SVGTransform} + */ +SVGTransformList.prototype.insertItemBefore = function(item, index){}; + + +/** + * @param {!SVGTransform} item + * @param {number} index + * @return {!SVGTransform} + */ +SVGTransformList.prototype.replaceItem = function(item, index){}; + + +/** + * @param {number} index + * @return {!SVGTransform} + */ +SVGTransformList.prototype.removeItem = function(index){}; + + +/** + * @param {!SVGTransform} item + * @return {!SVGTransform} + */ +SVGTransformList.prototype.appendItem = function(item){}; + + +/** + * @param {!SVGMatrix} matrix + * @return {!SVGTransform} + */ +SVGTransformList.prototype.createSVGTransformFromMatrix = function(matrix){}; + + +/** + * @return {!SVGTransform} + */ +SVGTransformList.prototype.consolidate = function(){}; + + + +/** + * @constructor + * @extends {UIEvent} + */ +function SVGZoomEvent(){} + + +/** + * @type {!SVGRect} + */ +SVGZoomEvent.prototype.zoomRectScreen; + + +/** + * @type {number} + */ +SVGZoomEvent.prototype.previousScale; + + +/** + * @type {!SVGPoint} + */ +SVGZoomEvent.prototype.previousTranslate; + + +/** + * @type {number} + */ +SVGZoomEvent.prototype.newScale; + + +/** + * @type {!SVGPoint} + */ +SVGZoomEvent.prototype.newTranslate; + + + +/** + * @constructor + * @extends {SVGTextContentElement} + */ +function SVGTextPositioningElement(){} + + +/** + * @type {!SVGAnimatedLengthList} + */ +SVGTextPositioningElement.prototype.x; + + +/** + * @type {!SVGAnimatedLengthList} + */ +SVGTextPositioningElement.prototype.y; + + +/** + * @type {!SVGAnimatedLengthList} + */ +SVGTextPositioningElement.prototype.dx; + + +/** + * @type {!SVGAnimatedLengthList} + */ +SVGTextPositioningElement.prototype.dy; + + +/** + * @type {!SVGAnimatedNumberList} + */ +SVGTextPositioningElement.prototype.rotate; + + + +/** + * @constructor + * @extends {SVGTextPositioningElement} + */ +function SVGTSpanElement(){} + + + +/** + * @constructor + */ +function SVGStringList(){} + + +/** + * @type {number} + */ +SVGStringList.prototype.numberOfItems; + + +/** */ +SVGStringList.prototype.clear = function(){}; + + +/** + * @param {string} item + * @return {string} + */ +SVGStringList.prototype.initialize = function(item){}; + + +/** + * @param {number} index + * @return {string} + */ +SVGStringList.prototype.getItem = function(index){}; + + +/** + * @param {string} item + * @param {number} index + * @return {string} + */ +SVGStringList.prototype.insertItemBefore = function(item, index){}; + + +/** + * @param {string} item + * @param {number} index + * @return {string} + */ +SVGStringList.prototype.replaceItem = function(item, index){}; + + +/** + * @param {number} index + * @return {string} + */ +SVGStringList.prototype.removeItem = function(index){}; + + +/** + * @param {string} item + * @return {string} + */ +SVGStringList.prototype.appendItem = function(item){}; + + + +/** + * @interface + */ +function SVGURIReference(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGURIReference.prototype.href; + + + +/** + * @constructor + * @extends {SVGTextPositioningElement} + * @implements {SVGURIReference} + */ +function SVGTRefElement(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGTRefElement.prototype.href; + + + +/** + * @constructor + * @extends {SVGTextContentElement} + * @implements {SVGURIReference} + */ +function SVGTextPathElement(){} + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.TEXTPATH_METHODTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.prototype.TEXTPATH_METHODTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.TEXTPATH_METHODTYPE_ALIGN; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.prototype.TEXTPATH_METHODTYPE_ALIGN; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.TEXTPATH_METHODTYPE_STRETCH; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.prototype.TEXTPATH_METHODTYPE_STRETCH; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.TEXTPATH_SPACINGTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.prototype.TEXTPATH_SPACINGTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.TEXTPATH_SPACINGTYPE_AUTO; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.prototype.TEXTPATH_SPACINGTYPE_AUTO; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.TEXTPATH_SPACINGTYPE_EXACT; + + +/** + * @const + * @type {number} + */ +SVGTextPathElement.prototype.TEXTPATH_SPACINGTYPE_EXACT; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGTextPathElement.prototype.startOffset; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGTextPathElement.prototype.method; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGTextPathElement.prototype.spacing; + + +/** + * @type {!SVGAnimatedString} + */ +SVGTextPathElement.prototype.href; + + + +/** + * @constructor + * @extends {SVGTextPositioningElement} + * @implements {SVGURIReference} + */ +function SVGAltGlyphElement(){} + + +/** + * @type {string} + */ +SVGAltGlyphElement.prototype.glyphRef; + + +/** + * @type {string} + */ +SVGAltGlyphElement.prototype.format; + + +/** + * @type {!SVGAnimatedString} + */ +SVGAltGlyphElement.prototype.href; + + + +/** + * @constructor + * @extends {SVGComponentTransferFunctionElement} + */ +function SVGFEFuncGElement(){} + + + +/** + * @constructor + * @extends {SVGComponentTransferFunctionElement} + */ +function SVGFEFuncAElement(){} + + + +/** + * @constructor + * @extends {SVGComponentTransferFunctionElement} + */ +function SVGFEFuncRElement(){} + + + +/** + * @constructor + */ +function SVGNumber(){} + + +/** + * @type {number} + */ +SVGNumber.prototype.value; + + + +/** + * @interface + */ +function SVGTests(){} + + +/** + * @type {!SVGStringList} + */ +SVGTests.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGTests.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGTests.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + */ +SVGTests.prototype.hasExtension = function(opt_extension){}; + + + +/** + * @constructor + */ +function SVGPathSeg(){} + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_CLOSEPATH; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_CLOSEPATH; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_MOVETO_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_MOVETO_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_MOVETO_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_MOVETO_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_LINETO_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_LINETO_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_LINETO_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_LINETO_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_CURVETO_CUBIC_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_CURVETO_CUBIC_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_CURVETO_QUADRATIC_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_CURVETO_QUADRATIC_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_ARC_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_ARC_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_ARC_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_ARC_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_LINETO_HORIZONTAL_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_LINETO_HORIZONTAL_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_LINETO_VERTICAL_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_LINETO_VERTICAL_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_CURVETO_CUBIC_SMOOTH_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; + + +/** + * @const + * @type {number} + */ +SVGPathSeg.prototype.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; + + +/** + * @type {number} + */ +SVGPathSeg.prototype.pathSegType; + + +/** + * @type {string} + */ +SVGPathSeg.prototype.pathSegTypeAsLetter; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegCurvetoQuadraticSmoothAbs(){} + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticSmoothAbs.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticSmoothAbs.prototype.y; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegArcRel(){} + + +/** + * @type {number} + */ +SVGPathSegArcRel.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegArcRel.prototype.y; + + +/** + * @type {number} + */ +SVGPathSegArcRel.prototype.r1; + + +/** + * @type {number} + */ +SVGPathSegArcRel.prototype.r2; + + +/** + * @type {number} + */ +SVGPathSegArcRel.prototype.angle; + + +/** + * @type {boolean} + */ +SVGPathSegArcRel.prototype.largeArcFlag; + + +/** + * @type {boolean} + */ +SVGPathSegArcRel.prototype.sweepFlag; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegCurvetoQuadraticAbs(){} + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticAbs.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticAbs.prototype.y; + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticAbs.prototype.x1; + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticAbs.prototype.y1; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegLinetoHorizontalRel(){} + + +/** + * @type {number} + */ +SVGPathSegLinetoHorizontalRel.prototype.x; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegLinetoRel(){} + + +/** + * @type {number} + */ +SVGPathSegLinetoRel.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegLinetoRel.prototype.y; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegCurvetoCubicRel(){} + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicRel.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicRel.prototype.y; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicRel.prototype.x1; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicRel.prototype.y1; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicRel.prototype.x2; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicRel.prototype.y2; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegMovetoAbs(){} + + +/** + * @type {number} + */ +SVGPathSegMovetoAbs.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegMovetoAbs.prototype.y; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegCurvetoQuadraticSmoothRel(){} + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticSmoothRel.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticSmoothRel.prototype.y; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegLinetoVerticalRel(){} + + +/** + * @type {number} + */ +SVGPathSegLinetoVerticalRel.prototype.y; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegLinetoAbs(){} + + +/** + * @type {number} + */ +SVGPathSegLinetoAbs.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegLinetoAbs.prototype.y; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegCurvetoCubicSmoothRel(){} + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicSmoothRel.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicSmoothRel.prototype.y; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicSmoothRel.prototype.x2; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicSmoothRel.prototype.y2; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegLinetoHorizontalAbs(){} + + +/** + * @type {number} + */ +SVGPathSegLinetoHorizontalAbs.prototype.x; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegCurvetoQuadraticRel(){} + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticRel.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticRel.prototype.y; + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticRel.prototype.x1; + + +/** + * @type {number} + */ +SVGPathSegCurvetoQuadraticRel.prototype.y1; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegCurvetoCubicSmoothAbs(){} + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicSmoothAbs.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicSmoothAbs.prototype.y; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicSmoothAbs.prototype.x2; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicSmoothAbs.prototype.y2; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegCurvetoCubicAbs(){} + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicAbs.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicAbs.prototype.y; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicAbs.prototype.x1; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicAbs.prototype.y1; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicAbs.prototype.x2; + + +/** + * @type {number} + */ +SVGPathSegCurvetoCubicAbs.prototype.y2; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegClosePath(){} + + + +/** + * @interface + */ +function SVGFitToViewBox(){} + + +/** + * @type {!SVGAnimatedRect} + */ +SVGFitToViewBox.prototype.viewBox; + + +/** + * @type {!SVGAnimatedPreserveAspectRatio} + */ +SVGFitToViewBox.prototype.preserveAspectRatio; + + + +/** + * @constructor + * @implements {SVGZoomAndPan} + * @implements {SVGFitToViewBox} + */ +function SVGViewSpec(){} + + +/** + * @type {!SVGTransformList} + */ +SVGViewSpec.prototype.transform; + + +/** + * @type {!SVGElement} + */ +SVGViewSpec.prototype.viewTarget; + + +/** + * @type {string} + */ +SVGViewSpec.prototype.viewBoxString; + + +/** + * @type {string} + */ +SVGViewSpec.prototype.preserveAspectRatioString; + + +/** + * @type {string} + */ +SVGViewSpec.prototype.transformString; + + +/** + * @type {string} + */ +SVGViewSpec.prototype.viewTargetString; + + +/** + * @const + * @type {number} + */ +SVGViewSpec.SVG_ZOOMANDPAN_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGViewSpec.prototype.SVG_ZOOMANDPAN_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGViewSpec.SVG_ZOOMANDPAN_DISABLE; + + +/** + * @const + * @type {number} + */ +SVGViewSpec.prototype.SVG_ZOOMANDPAN_DISABLE; + + +/** + * @const + * @type {number} + */ +SVGViewSpec.SVG_ZOOMANDPAN_MAGNIFY; + + +/** + * @const + * @type {number} + */ +SVGViewSpec.prototype.SVG_ZOOMANDPAN_MAGNIFY; + + +/** + * @type {number} + */ +SVGViewSpec.prototype.zoomAndPan; + + +/** + * @type {!SVGAnimatedRect} + */ +SVGViewSpec.prototype.viewBox; + + +/** + * @type {!SVGAnimatedPreserveAspectRatio} + */ +SVGViewSpec.prototype.preserveAspectRatio; + + + +/** + * @constructor + */ +function SVGRenderingIntent(){} + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.RENDERING_INTENT_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.prototype.RENDERING_INTENT_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.RENDERING_INTENT_AUTO; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.prototype.RENDERING_INTENT_AUTO; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.RENDERING_INTENT_PERCEPTUAL; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.prototype.RENDERING_INTENT_PERCEPTUAL; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.RENDERING_INTENT_RELATIVE_COLORIMETRIC; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.prototype.RENDERING_INTENT_RELATIVE_COLORIMETRIC; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.RENDERING_INTENT_SATURATION; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.prototype.RENDERING_INTENT_SATURATION; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.RENDERING_INTENT_ABSOLUTE_COLORIMETRIC; + + +/** + * @const + * @type {number} + */ +SVGRenderingIntent.prototype.RENDERING_INTENT_ABSOLUTE_COLORIMETRIC; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegLinetoVerticalAbs(){} + + +/** + * @type {number} + */ +SVGPathSegLinetoVerticalAbs.prototype.y; + + + +/** + * @constructor + */ +function SVGPathSegList(){} + + +/** + * @type {number} + */ +SVGPathSegList.prototype.numberOfItems; + + +/** */ +SVGPathSegList.prototype.clear = function(){}; + + +/** + * @param {!SVGPathSeg} newItem + * @return {!SVGPathSeg} + */ +SVGPathSegList.prototype.initialize = function(newItem){}; + + +/** + * @param {number} index + * @return {!SVGPathSeg} + */ +SVGPathSegList.prototype.getItem = function(index){}; + + +/** + * @param {!SVGPathSeg} newItem + * @param {number} index + * @return {!SVGPathSeg} + */ +SVGPathSegList.prototype.insertItemBefore = function(newItem, index){}; + + +/** + * @param {!SVGPathSeg} newItem + * @param {number} index + * @return {!SVGPathSeg} + */ +SVGPathSegList.prototype.replaceItem = function(newItem, index){}; + + +/** + * @param {number} index + * @return {!SVGPathSeg} + */ +SVGPathSegList.prototype.removeItem = function(index){}; + + +/** + * @param {!SVGPathSeg} newItem + * @return {!SVGPathSeg} + */ +SVGPathSegList.prototype.appendItem = function(newItem){}; + + + +/** + * @constructor + * @extends {Document} + */ +function SVGDocument(){} + + +/** + * @type {!SVGSVGElement} + */ +SVGDocument.prototype.rootElement; + + +/** + * @param {string=} opt_eventType + * @return {!Event} + * @override + */ +SVGDocument.prototype.createEvent = function(opt_eventType){}; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGAltGlyphItemElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGFontFaceFormatElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFECompositeElement(){} + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.prototype.SVG_FECOMPOSITE_OPERATOR_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OVER; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.prototype.SVG_FECOMPOSITE_OPERATOR_OVER; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_IN; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.prototype.SVG_FECOMPOSITE_OPERATOR_IN; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_OUT; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.prototype.SVG_FECOMPOSITE_OPERATOR_OUT; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ATOP; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.prototype.SVG_FECOMPOSITE_OPERATOR_ATOP; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_XOR; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.prototype.SVG_FECOMPOSITE_OPERATOR_XOR; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC; + + +/** + * @const + * @type {number} + */ +SVGFECompositeElement.prototype.SVG_FECOMPOSITE_OPERATOR_ARITHMETIC; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFECompositeElement.prototype.in1; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFECompositeElement.prototype.in2; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFECompositeElement.prototype.operator; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFECompositeElement.prototype.k1; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFECompositeElement.prototype.k2; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFECompositeElement.prototype.k3; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFECompositeElement.prototype.k4; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFECompositeElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFECompositeElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFECompositeElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFECompositeElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFECompositeElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFECompositeElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFECompositeElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGLangSpace} + * @implements {SVGStylable} + */ +function SVGDescElement(){} + + +/** + * @type {string} + */ +SVGDescElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGDescElement.prototype.xmlspace; + + +/** + * @type {!SVGAnimatedString} + */ +SVGDescElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGDescElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGEllipseElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGEllipseElement.prototype.cx; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGEllipseElement.prototype.cy; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGEllipseElement.prototype.rx; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGEllipseElement.prototype.ry; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGEllipseElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGEllipseElement.prototype.transform; + + +/** + * @type {string} + */ +SVGEllipseElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGEllipseElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGEllipseElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + * @override + */ +SVGEllipseElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGEllipseElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGEllipseElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGEllipseElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGEllipseElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGEllipseElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGEllipseElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGEllipseElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGEllipseElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGEllipseElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGEllipseElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFESpecularLightingElement(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGFESpecularLightingElement.prototype.in1; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpecularLightingElement.prototype.surfaceScale; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpecularLightingElement.prototype.specularConstant; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpecularLightingElement.prototype.specularExponent; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFESpecularLightingElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFESpecularLightingElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFESpecularLightingElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFESpecularLightingElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFESpecularLightingElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFESpecularLightingElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFESpecularLightingElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEColorMatrixElement(){} + + +/** + * @const + * @type {number} + */ +SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFEColorMatrixElement.prototype.SVG_FECOLORMATRIX_TYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX; + + +/** + * @const + * @type {number} + */ +SVGFEColorMatrixElement.prototype.SVG_FECOLORMATRIX_TYPE_MATRIX; + + +/** + * @const + * @type {number} + */ +SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE; + + +/** + * @const + * @type {number} + */ +SVGFEColorMatrixElement.prototype.SVG_FECOLORMATRIX_TYPE_SATURATE; + + +/** + * @const + * @type {number} + */ +SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_HUEROTATE; + + +/** + * @const + * @type {number} + */ +SVGFEColorMatrixElement.prototype.SVG_FECOLORMATRIX_TYPE_HUEROTATE; + + +/** + * @const + * @type {number} + */ +SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA; + + +/** + * @const + * @type {number} + */ +SVGFEColorMatrixElement.prototype.SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEColorMatrixElement.prototype.in1; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFEColorMatrixElement.prototype.type; + + +/** + * @type {!SVGAnimatedNumberList} + */ +SVGFEColorMatrixElement.prototype.values; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEColorMatrixElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEColorMatrixElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEColorMatrixElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEColorMatrixElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEColorMatrixElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEColorMatrixElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEColorMatrixElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGFitToViewBox} + */ +function SVGSymbolElement(){} + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGSymbolElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedRect} + */ +SVGSymbolElement.prototype.viewBox; + + +/** + * @type {!SVGAnimatedPreserveAspectRatio} + */ +SVGSymbolElement.prototype.preserveAspectRatio; + + +/** + * @type {string} + */ +SVGSymbolElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGSymbolElement.prototype.xmlspace; + + +/** + * @type {!SVGAnimatedString} + */ +SVGSymbolElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGSymbolElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEConvolveMatrixElement(){} + + +/** + * @const + * @type {number} + */ +SVGFEConvolveMatrixElement.SVG_EDGEMODE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFEConvolveMatrixElement.prototype.SVG_EDGEMODE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFEConvolveMatrixElement.SVG_EDGEMODE_DUPLICATE; + + +/** + * @const + * @type {number} + */ +SVGFEConvolveMatrixElement.prototype.SVG_EDGEMODE_DUPLICATE; + + +/** + * @const + * @type {number} + */ +SVGFEConvolveMatrixElement.SVG_EDGEMODE_WRAP; + + +/** + * @const + * @type {number} + */ +SVGFEConvolveMatrixElement.prototype.SVG_EDGEMODE_WRAP; + + +/** + * @const + * @type {number} + */ +SVGFEConvolveMatrixElement.SVG_EDGEMODE_NONE; + + +/** + * @const + * @type {number} + */ +SVGFEConvolveMatrixElement.prototype.SVG_EDGEMODE_NONE; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEConvolveMatrixElement.prototype.in1; + + +/** + * @type {!SVGAnimatedInteger} + */ +SVGFEConvolveMatrixElement.prototype.orderX; + + +/** + * @type {!SVGAnimatedInteger} + */ +SVGFEConvolveMatrixElement.prototype.orderY; + + +/** + * @type {!SVGAnimatedNumberList} + */ +SVGFEConvolveMatrixElement.prototype.kernelMatrix; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEConvolveMatrixElement.prototype.divisor; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEConvolveMatrixElement.prototype.bias; + + +/** + * @type {!SVGAnimatedInteger} + */ +SVGFEConvolveMatrixElement.prototype.targetX; + + +/** + * @type {!SVGAnimatedInteger} + */ +SVGFEConvolveMatrixElement.prototype.targetY; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFEConvolveMatrixElement.prototype.edgeMode; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEConvolveMatrixElement.prototype.kernelUnitLengthX; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEConvolveMatrixElement.prototype.kernelUnitLengthY; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGFEConvolveMatrixElement.prototype.preserveAlpha; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEConvolveMatrixElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEConvolveMatrixElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEConvolveMatrixElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEConvolveMatrixElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEConvolveMatrixElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEConvolveMatrixElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEConvolveMatrixElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEFloodElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEFloodElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEFloodElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEFloodElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEFloodElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEFloodElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEFloodElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEFloodElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGStylable} + */ +function SVGStopElement(){} + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGStopElement.prototype.offset; + + +/** + * @type {!SVGAnimatedString} + */ +SVGStopElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGStopElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGGlyphElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGHKernElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGVKernElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGFontElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEOffsetElement(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEOffsetElement.prototype.in1; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEOffsetElement.prototype.dx; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEOffsetElement.prototype.dy; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEOffsetElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEOffsetElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEOffsetElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEOffsetElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEOffsetElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEOffsetElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEOffsetElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + */ +function SVGFilterElement(){} + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFilterElement.prototype.filterUnits; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFilterElement.prototype.primitiveUnits; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFilterElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFilterElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFilterElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFilterElement.prototype.height; + + +/** + * @type {!SVGAnimatedInteger} + */ +SVGFilterElement.prototype.filterResX; + + +/** + * @type {!SVGAnimatedInteger} + */ +SVGFilterElement.prototype.filterResY; + + +/** + * @param {number=} opt_filterResX + * @param {number=} opt_filterResY + * @return {undefined} + */ +SVGFilterElement.prototype.setFilterRes = function(opt_filterResX, opt_filterResY){}; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGFilterElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFilterElement.prototype.href; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFilterElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFilterElement.prototype.getPresentationAttribute = function(opt_name){}; + + +/** + * @type {string} + */ +SVGFilterElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGFilterElement.prototype.xmlspace; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEGaussianBlurElement(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEGaussianBlurElement.prototype.in1; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEGaussianBlurElement.prototype.stdDeviationX; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEGaussianBlurElement.prototype.stdDeviationY; + + +/** + * @param {number=} opt_stdDeviationX + * @param {number=} opt_stdDeviationY + * @return {undefined} + */ +SVGFEGaussianBlurElement.prototype.setStdDeviation = function(opt_stdDeviationX, opt_stdDeviationY){}; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEGaussianBlurElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEGaussianBlurElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEGaussianBlurElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEGaussianBlurElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEGaussianBlurElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEGaussianBlurElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEGaussianBlurElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGAltGlyphDefElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGComponentTransferFunctionElement(){} + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.prototype.SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.prototype.SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_TABLE; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.prototype.SVG_FECOMPONENTTRANSFER_TYPE_TABLE; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.prototype.SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.prototype.SVG_FECOMPONENTTRANSFER_TYPE_LINEAR; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.SVG_FECOMPONENTTRANSFER_TYPE_GAMMA; + + +/** + * @const + * @type {number} + */ +SVGComponentTransferFunctionElement.prototype.SVG_FECOMPONENTTRANSFER_TYPE_GAMMA; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGComponentTransferFunctionElement.prototype.type; + + +/** + * @type {!SVGAnimatedNumberList} + */ +SVGComponentTransferFunctionElement.prototype.tableValues; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGComponentTransferFunctionElement.prototype.slope; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGComponentTransferFunctionElement.prototype.intercept; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGComponentTransferFunctionElement.prototype.amplitude; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGComponentTransferFunctionElement.prototype.exponent; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGComponentTransferFunctionElement.prototype.offset; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGMetadataElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGLangSpace} + * @implements {SVGStylable} + */ +function SVGTitleElement(){} + + +/** + * @type {string} + */ +SVGTitleElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGTitleElement.prototype.xmlspace; + + +/** + * @type {!SVGAnimatedString} + */ +SVGTitleElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGTitleElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGTests} + * @implements {SVGExternalResourcesRequired} + */ +function SVGCursorElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGCursorElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGCursorElement.prototype.y; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGCursorElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedString} + */ +SVGCursorElement.prototype.href; + + +/** + * @type {!SVGStringList} + */ +SVGCursorElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGCursorElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGCursorElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGCursorElement.prototype.hasExtension = function(opt_extension){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + */ +function SVGGradientElement(){} + + +/** + * @const + * @type {number} + */ +SVGGradientElement.SVG_SPREADMETHOD_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGGradientElement.prototype.SVG_SPREADMETHOD_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGGradientElement.SVG_SPREADMETHOD_PAD; + + +/** + * @const + * @type {number} + */ +SVGGradientElement.prototype.SVG_SPREADMETHOD_PAD; + + +/** + * @const + * @type {number} + */ +SVGGradientElement.SVG_SPREADMETHOD_REFLECT; + + +/** + * @const + * @type {number} + */ +SVGGradientElement.prototype.SVG_SPREADMETHOD_REFLECT; + + +/** + * @const + * @type {number} + */ +SVGGradientElement.SVG_SPREADMETHOD_REPEAT; + + +/** + * @const + * @type {number} + */ +SVGGradientElement.prototype.SVG_SPREADMETHOD_REPEAT; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGGradientElement.prototype.gradientUnits; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGGradientElement.prototype.gradientTransform; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGGradientElement.prototype.spreadMethod; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGGradientElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedString} + */ +SVGGradientElement.prototype.href; + + +/** + * @type {!SVGAnimatedString} + */ +SVGGradientElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGGradientElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGFitToViewBox} + */ +function SVGMarkerElement(){} + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.SVG_MARKERUNITS_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.prototype.SVG_MARKERUNITS_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.SVG_MARKERUNITS_USERSPACEONUSE; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.prototype.SVG_MARKERUNITS_USERSPACEONUSE; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.prototype.SVG_MARKERUNITS_STROKEWIDTH; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.prototype.SVG_MARKER_ORIENT_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.SVG_MARKER_ORIENT_AUTO; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.prototype.SVG_MARKER_ORIENT_AUTO; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE; + + +/** + * @const + * @type {number} + */ +SVGMarkerElement.prototype.SVG_MARKER_ORIENT_ANGLE; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGMarkerElement.prototype.refX; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGMarkerElement.prototype.refY; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGMarkerElement.prototype.markerUnits; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGMarkerElement.prototype.markerWidth; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGMarkerElement.prototype.markerHeight; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGMarkerElement.prototype.orientType; + + +/** + * @type {!SVGAnimatedAngle} + */ +SVGMarkerElement.prototype.orientAngle; + + +/** */ +SVGMarkerElement.prototype.setOrientToAuto = function(){}; + + +/** + * @param {!SVGAngle=} opt_angle + * @return {undefined} + */ +SVGMarkerElement.prototype.setOrientToAngle = function(opt_angle){}; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGMarkerElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedRect} + */ +SVGMarkerElement.prototype.viewBox; + + +/** + * @type {!SVGAnimatedPreserveAspectRatio} + */ +SVGMarkerElement.prototype.preserveAspectRatio; + + +/** + * @type {string} + */ +SVGMarkerElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGMarkerElement.prototype.xmlspace; + + +/** + * @type {!SVGAnimatedString} + */ +SVGMarkerElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGMarkerElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + */ +function SVGMaskElement(){} + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGMaskElement.prototype.maskUnits; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGMaskElement.prototype.maskContentUnits; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGMaskElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGMaskElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGMaskElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGMaskElement.prototype.height; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGMaskElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGStringList} + */ +SVGMaskElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGMaskElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGMaskElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGMaskElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGMaskElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGMaskElement.prototype.getPresentationAttribute = function(opt_name){}; + + +/** + * @type {string} + */ +SVGMaskElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGMaskElement.prototype.xmlspace; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGFitToViewBox} + * @implements {SVGZoomAndPan} + */ +function SVGViewElement(){} + + +/** + * @type {!SVGStringList} + */ +SVGViewElement.prototype.viewTarget; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGViewElement.prototype.externalResourcesRequired; + + +/** + * @const + * @type {number} + */ +SVGViewElement.SVG_ZOOMANDPAN_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGViewElement.prototype.SVG_ZOOMANDPAN_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGViewElement.SVG_ZOOMANDPAN_DISABLE; + + +/** + * @const + * @type {number} + */ +SVGViewElement.prototype.SVG_ZOOMANDPAN_DISABLE; + + +/** + * @const + * @type {number} + */ +SVGViewElement.SVG_ZOOMANDPAN_MAGNIFY; + + +/** + * @const + * @type {number} + */ +SVGViewElement.prototype.SVG_ZOOMANDPAN_MAGNIFY; + + +/** + * @type {number} + */ +SVGViewElement.prototype.zoomAndPan; + + +/** + * @type {!SVGAnimatedRect} + */ +SVGViewElement.prototype.viewBox; + + +/** + * @type {!SVGAnimatedPreserveAspectRatio} + */ +SVGViewElement.prototype.preserveAspectRatio; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGExternalResourcesRequired} + */ +function SVGMPathElement(){} + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGMPathElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedString} + */ +SVGMPathElement.prototype.href; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGFontFaceSrcElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEImageElement(){} + + +/** + * @type {!SVGAnimatedPreserveAspectRatio} + */ +SVGFEImageElement.prototype.preserveAspectRatio; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEImageElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEImageElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEImageElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEImageElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEImageElement.prototype.result; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGFEImageElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEImageElement.prototype.href; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEImageElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEImageElement.prototype.getPresentationAttribute = function(opt_name){}; + + +/** + * @type {string} + */ +SVGFEImageElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGFEImageElement.prototype.xmlspace; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGFEDistantLightElement(){} + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDistantLightElement.prototype.azimuth; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDistantLightElement.prototype.elevation; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGFontFaceUriElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEDiffuseLightingElement(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEDiffuseLightingElement.prototype.in1; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDiffuseLightingElement.prototype.surfaceScale; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDiffuseLightingElement.prototype.diffuseConstant; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDiffuseLightingElement.prototype.kernelUnitLengthX; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDiffuseLightingElement.prototype.kernelUnitLengthY; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDiffuseLightingElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDiffuseLightingElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDiffuseLightingElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDiffuseLightingElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEDiffuseLightingElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEDiffuseLightingElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEDiffuseLightingElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEMorphologyElement(){} + + +/** + * @const + * @type {number} + */ +SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFEMorphologyElement.prototype.SVG_MORPHOLOGY_OPERATOR_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_ERODE; + + +/** + * @const + * @type {number} + */ +SVGFEMorphologyElement.prototype.SVG_MORPHOLOGY_OPERATOR_ERODE; + + +/** + * @const + * @type {number} + */ +SVGFEMorphologyElement.SVG_MORPHOLOGY_OPERATOR_DILATE; + + +/** + * @const + * @type {number} + */ +SVGFEMorphologyElement.prototype.SVG_MORPHOLOGY_OPERATOR_DILATE; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEMorphologyElement.prototype.in1; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFEMorphologyElement.prototype.operator; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEMorphologyElement.prototype.radiusX; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEMorphologyElement.prototype.radiusY; + + +/** + * @param {number=} opt_radiusX + * @param {number=} opt_radiusY + * @return {undefined} + */ +SVGFEMorphologyElement.prototype.setRadius = function(opt_radiusX, opt_radiusY){}; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEMorphologyElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEMorphologyElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEMorphologyElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEMorphologyElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEMorphologyElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEMorphologyElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEMorphologyElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGStylable} + */ +function SVGGlyphRefElement(){} + + +/** + * @type {string} + */ +SVGGlyphRefElement.prototype.glyphRef; + + +/** + * @type {string} + */ +SVGGlyphRefElement.prototype.format; + + +/** + * @type {number} + */ +SVGGlyphRefElement.prototype.x; + + +/** + * @type {number} + */ +SVGGlyphRefElement.prototype.y; + + +/** + * @type {number} + */ +SVGGlyphRefElement.prototype.dx; + + +/** + * @type {number} + */ +SVGGlyphRefElement.prototype.dy; + + +/** + * @type {!SVGAnimatedString} + */ +SVGGlyphRefElement.prototype.href; + + +/** + * @type {!SVGAnimatedString} + */ +SVGGlyphRefElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGGlyphRefElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + */ +function SVGTextContentElement(){} + + +/** + * @const + * @type {number} + */ +SVGTextContentElement.LENGTHADJUST_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGTextContentElement.prototype.LENGTHADJUST_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGTextContentElement.LENGTHADJUST_SPACING; + + +/** + * @const + * @type {number} + */ +SVGTextContentElement.prototype.LENGTHADJUST_SPACING; + + +/** + * @const + * @type {number} + */ +SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS; + + +/** + * @const + * @type {number} + */ +SVGTextContentElement.prototype.LENGTHADJUST_SPACINGANDGLYPHS; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGTextContentElement.prototype.textLength; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGTextContentElement.prototype.lengthAdjust; + + +/** + * @return {number} + */ +SVGTextContentElement.prototype.getNumberOfChars = function(){}; + + +/** + * @return {number} + */ +SVGTextContentElement.prototype.getComputedTextLength = function(){}; + + +/** + * @param {number=} opt_offset + * @param {number=} opt_length + * @return {number} + */ +SVGTextContentElement.prototype.getSubStringLength = function(opt_offset, opt_length){}; + + +/** + * @param {number=} opt_offset + * @return {!SVGPoint} + */ +SVGTextContentElement.prototype.getStartPositionOfChar = function(opt_offset){}; + + +/** + * @param {number=} opt_offset + * @return {!SVGPoint} + */ +SVGTextContentElement.prototype.getEndPositionOfChar = function(opt_offset){}; + + +/** + * @param {number=} opt_offset + * @return {!SVGRect} + */ +SVGTextContentElement.prototype.getExtentOfChar = function(opt_offset){}; + + +/** + * @param {number=} opt_offset + * @return {number} + */ +SVGTextContentElement.prototype.getRotationOfChar = function(opt_offset){}; + + +/** + * @param {!SVGPoint=} opt_point + * @return {number} + */ +SVGTextContentElement.prototype.getCharNumAtPosition = function(opt_point){}; + + +/** + * @param {number=} opt_offset + * @param {number=} opt_length + * @return {undefined} + */ +SVGTextContentElement.prototype.selectSubString = function(opt_offset, opt_length){}; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGTextContentElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGStringList} + */ +SVGTextContentElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGTextContentElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGTextContentElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGTextContentElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGTextContentElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGTextContentElement.prototype.getPresentationAttribute = function(opt_name){}; + + +/** + * @type {string} + */ +SVGTextContentElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGTextContentElement.prototype.xmlspace; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGFESpotLightElement(){} + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpotLightElement.prototype.x; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpotLightElement.prototype.y; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpotLightElement.prototype.z; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpotLightElement.prototype.pointsAtX; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpotLightElement.prototype.pointsAtY; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpotLightElement.prototype.pointsAtZ; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpotLightElement.prototype.specularExponent; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFESpotLightElement.prototype.limitingConeAngle; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGFontFaceNameElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGFEPointLightElement(){} + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEPointLightElement.prototype.x; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEPointLightElement.prototype.y; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEPointLightElement.prototype.z; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEDropShadowElement(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEDropShadowElement.prototype.in1; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDropShadowElement.prototype.dx; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDropShadowElement.prototype.dy; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDropShadowElement.prototype.stdDeviationX; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDropShadowElement.prototype.stdDeviationY; + + +/** + * @param {number=} opt_stdDeviationX + * @param {number=} opt_stdDeviationY + * @return {undefined} + */ +SVGFEDropShadowElement.prototype.setStdDeviation = function(opt_stdDeviationX, opt_stdDeviationY){}; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDropShadowElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDropShadowElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDropShadowElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDropShadowElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEDropShadowElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEDropShadowElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEDropShadowElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFETileElement(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGFETileElement.prototype.in1; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFETileElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFETileElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFETileElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFETileElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFETileElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFETileElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFETileElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGMissingGlyphElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEBlendElement(){} + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.SVG_FEBLEND_MODE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.prototype.SVG_FEBLEND_MODE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.prototype.SVG_FEBLEND_MODE_NORMAL; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.SVG_FEBLEND_MODE_MULTIPLY; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.prototype.SVG_FEBLEND_MODE_MULTIPLY; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.SVG_FEBLEND_MODE_SCREEN; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.prototype.SVG_FEBLEND_MODE_SCREEN; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.SVG_FEBLEND_MODE_DARKEN; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.prototype.SVG_FEBLEND_MODE_DARKEN; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN; + + +/** + * @const + * @type {number} + */ +SVGFEBlendElement.prototype.SVG_FEBLEND_MODE_LIGHTEN; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEBlendElement.prototype.in1; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEBlendElement.prototype.in2; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFEBlendElement.prototype.mode; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEBlendElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEBlendElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEBlendElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEBlendElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEBlendElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEBlendElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEBlendElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGFitToViewBox} + */ +function SVGPatternElement(){} + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGPatternElement.prototype.patternUnits; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGPatternElement.prototype.patternContentUnits; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGPatternElement.prototype.patternTransform; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGPatternElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGPatternElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGPatternElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGPatternElement.prototype.height; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGPatternElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedRect} + */ +SVGPatternElement.prototype.viewBox; + + +/** + * @type {!SVGAnimatedPreserveAspectRatio} + */ +SVGPatternElement.prototype.preserveAspectRatio; + + +/** + * @type {!SVGAnimatedString} + */ +SVGPatternElement.prototype.href; + + +/** + * @type {string} + */ +SVGPatternElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGPatternElement.prototype.xmlspace; + + +/** + * @type {!SVGStringList} + */ +SVGPatternElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGPatternElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGPatternElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGPatternElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGPatternElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGPatternElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGFEMergeNodeElement(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEMergeNodeElement.prototype.in1; + + + +/** + * @constructor + * @extends {SVGComponentTransferFunctionElement} + */ +function SVGFEFuncBElement(){} + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegMovetoRel(){} + + +/** + * @type {number} + */ +SVGPathSegMovetoRel.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegMovetoRel.prototype.y; + + + +/** + * @interface + */ +function SVGLocatable(){} + + +/** + * @type {!SVGElement} + */ +SVGLocatable.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGLocatable.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + */ +SVGLocatable.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + */ +SVGLocatable.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + */ +SVGLocatable.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + */ +SVGLocatable.prototype.getTransformToElement = function(opt_element){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGLocatable} + * @implements {SVGFitToViewBox} + * @implements {SVGZoomAndPan} + */ +function SVGSVGElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGSVGElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGSVGElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGSVGElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGSVGElement.prototype.height; + + +/** + * @type {string} + */ +SVGSVGElement.prototype.contentScriptType; + + +/** + * @type {string} + */ +SVGSVGElement.prototype.contentStyleType; + + +/** + * @type {!SVGRect} + */ +SVGSVGElement.prototype.viewport; + + +/** + * @type {number} + */ +SVGSVGElement.prototype.pixelUnitToMillimeterX; + + +/** + * @type {number} + */ +SVGSVGElement.prototype.pixelUnitToMillimeterY; + + +/** + * @type {number} + */ +SVGSVGElement.prototype.screenPixelToMillimeterX; + + +/** + * @type {number} + */ +SVGSVGElement.prototype.screenPixelToMillimeterY; + + +/** + * @type {boolean} + */ +SVGSVGElement.prototype.useCurrentView; + + +/** + * @type {number} + */ +SVGSVGElement.prototype.currentScale; + + +/** + * @type {!SVGPoint} + */ +SVGSVGElement.prototype.currentTranslate; + + +/** + * @param {number=} opt_maxWaitMilliseconds + * @return {number} + */ +SVGSVGElement.prototype.suspendRedraw = function(opt_maxWaitMilliseconds){}; + + +/** + * @param {number=} opt_suspendHandleId + * @return {undefined} + */ +SVGSVGElement.prototype.unsuspendRedraw = function(opt_suspendHandleId){}; + + +/** */ +SVGSVGElement.prototype.unsuspendRedrawAll = function(){}; + + +/** */ +SVGSVGElement.prototype.forceRedraw = function(){}; + + +/** */ +SVGSVGElement.prototype.pauseAnimations = function(){}; + + +/** */ +SVGSVGElement.prototype.unpauseAnimations = function(){}; + + +/** + * @return {boolean} + */ +SVGSVGElement.prototype.animationsPaused = function(){}; + + +/** + * @return {number} + */ +SVGSVGElement.prototype.getCurrentTime = function(){}; + + +/** + * @param {number=} opt_seconds + * @return {undefined} + */ +SVGSVGElement.prototype.setCurrentTime = function(opt_seconds){}; + + +/** + * @param {!SVGRect=} opt_rect + * @param {!SVGElement=} opt_referenceElement + * @return {!NodeList} + */ +SVGSVGElement.prototype.getIntersectionList = function(opt_rect, opt_referenceElement){}; + + +/** + * @param {!SVGRect=} opt_rect + * @param {!SVGElement=} opt_referenceElement + * @return {!NodeList} + */ +SVGSVGElement.prototype.getEnclosureList = function(opt_rect, opt_referenceElement){}; + + +/** + * @param {!SVGElement=} opt_element + * @param {!SVGRect=} opt_rect + * @return {boolean} + */ +SVGSVGElement.prototype.checkIntersection = function(opt_element, opt_rect){}; + + +/** + * @param {!SVGElement=} opt_element + * @param {!SVGRect=} opt_rect + * @return {boolean} + */ +SVGSVGElement.prototype.checkEnclosure = function(opt_element, opt_rect){}; + + +/** */ +SVGSVGElement.prototype.deselectAll = function(){}; + + +/** + * @return {!SVGNumber} + */ +SVGSVGElement.prototype.createSVGNumber = function(){}; + + +/** + * @return {!SVGLength} + */ +SVGSVGElement.prototype.createSVGLength = function(){}; + + +/** + * @return {!SVGAngle} + */ +SVGSVGElement.prototype.createSVGAngle = function(){}; + + +/** + * @return {!SVGPoint} + */ +SVGSVGElement.prototype.createSVGPoint = function(){}; + + +/** + * @return {!SVGMatrix} + */ +SVGSVGElement.prototype.createSVGMatrix = function(){}; + + +/** + * @return {!SVGRect} + */ +SVGSVGElement.prototype.createSVGRect = function(){}; + + +/** + * @return {!SVGTransform} + */ +SVGSVGElement.prototype.createSVGTransform = function(){}; + + +/** + * @param {!SVGMatrix=} opt_matrix + * @return {!SVGTransform} + */ +SVGSVGElement.prototype.createSVGTransformFromMatrix = function(opt_matrix){}; + + +/** + * @param {string=} opt_elementId + * @return {Element} + * @see https://developer.mozilla.org/en/docs/Web/API/SVGSVGElement + */ +SVGSVGElement.prototype.getElementById = function(opt_elementId){}; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGSVGElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedRect} + */ +SVGSVGElement.prototype.viewBox; + + +/** + * @type {!SVGAnimatedPreserveAspectRatio} + */ +SVGSVGElement.prototype.preserveAspectRatio; + + +/** + * @type {string} + */ +SVGSVGElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGSVGElement.prototype.xmlspace; + + +/** + * @const + * @type {number} + */ +SVGSVGElement.SVG_ZOOMANDPAN_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGSVGElement.prototype.SVG_ZOOMANDPAN_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGSVGElement.SVG_ZOOMANDPAN_DISABLE; + + +/** + * @const + * @type {number} + */ +SVGSVGElement.prototype.SVG_ZOOMANDPAN_DISABLE; + + +/** + * @const + * @type {number} + */ +SVGSVGElement.SVG_ZOOMANDPAN_MAGNIFY; + + +/** + * @const + * @type {number} + */ +SVGSVGElement.prototype.SVG_ZOOMANDPAN_MAGNIFY; + + +/** + * @type {number} + */ +SVGSVGElement.prototype.zoomAndPan; + + +/** + * @type {!SVGElement} + */ +SVGSVGElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGSVGElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGSVGElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGSVGElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGSVGElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGSVGElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGSVGElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGSVGElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGSVGElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGSVGElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGSVGElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGSVGElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @interface + * @extends {SVGLocatable} + */ +function SVGTransformable(){} + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGTransformable.prototype.transform; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGDefsElement(){} + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGDefsElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGDefsElement.prototype.transform; + + +/** + * @type {string} + */ +SVGDefsElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGDefsElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGDefsElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGDefsElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGDefsElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGDefsElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGDefsElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGDefsElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGDefsElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGDefsElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGDefsElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGDefsElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGDefsElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGDefsElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGPolygonElement(){} + + +/** + * @type {!SVGPointList} + */ +SVGPolygonElement.prototype.points; + + +/** + * @type {!SVGPointList} + */ +SVGPolygonElement.prototype.animatedPoints; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGPolygonElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGPolygonElement.prototype.transform; + + +/** + * @type {string} + */ +SVGPolygonElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGPolygonElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGPolygonElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGPolygonElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGPolygonElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGPolygonElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGPolygonElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGPolygonElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGPolygonElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGPolygonElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGPolygonElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGPolygonElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGPolygonElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGPolygonElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGPathElement(){} + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGPathElement.prototype.pathLength; + + +/** + * @type {!SVGPathSegList} + */ +SVGPathElement.prototype.pathSegList; + + +/** + * @type {!SVGPathSegList} + */ +SVGPathElement.prototype.normalizedPathSegList; + + +/** + * @type {!SVGPathSegList} + */ +SVGPathElement.prototype.animatedPathSegList; + + +/** + * @type {!SVGPathSegList} + */ +SVGPathElement.prototype.animatedNormalizedPathSegList; + + +/** + * @return {number} + */ +SVGPathElement.prototype.getTotalLength = function(){}; + + +/** + * @param {number=} opt_distance + * @return {!SVGPoint} + */ +SVGPathElement.prototype.getPointAtLength = function(opt_distance){}; + + +/** + * @param {number=} opt_distance + * @return {number} + */ +SVGPathElement.prototype.getPathSegAtLength = function(opt_distance){}; + + +/** + * @return {!SVGPathSegClosePath} + */ +SVGPathElement.prototype.createSVGPathSegClosePath = function(){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @return {!SVGPathSegMovetoAbs} + */ +SVGPathElement.prototype.createSVGPathSegMovetoAbs = function(opt_x, opt_y){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @return {!SVGPathSegMovetoRel} + */ +SVGPathElement.prototype.createSVGPathSegMovetoRel = function(opt_x, opt_y){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @return {!SVGPathSegLinetoAbs} + */ +SVGPathElement.prototype.createSVGPathSegLinetoAbs = function(opt_x, opt_y){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @return {!SVGPathSegLinetoRel} + */ +SVGPathElement.prototype.createSVGPathSegLinetoRel = function(opt_x, opt_y){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @param {number=} opt_x1 + * @param {number=} opt_y1 + * @param {number=} opt_x2 + * @param {number=} opt_y2 + * @return {!SVGPathSegCurvetoCubicAbs} + */ +SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs = function(opt_x, opt_y, opt_x1, opt_y1, opt_x2, opt_y2){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @param {number=} opt_x1 + * @param {number=} opt_y1 + * @param {number=} opt_x2 + * @param {number=} opt_y2 + * @return {!SVGPathSegCurvetoCubicRel} + */ +SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel = function(opt_x, opt_y, opt_x1, opt_y1, opt_x2, opt_y2){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @param {number=} opt_x1 + * @param {number=} opt_y1 + * @return {!SVGPathSegCurvetoQuadraticAbs} + */ +SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs = function(opt_x, opt_y, opt_x1, opt_y1){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @param {number=} opt_x1 + * @param {number=} opt_y1 + * @return {!SVGPathSegCurvetoQuadraticRel} + */ +SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel = function(opt_x, opt_y, opt_x1, opt_y1){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @param {number=} opt_r1 + * @param {number=} opt_r2 + * @param {number=} opt_angle + * @param {boolean=} opt_largeArcFlag + * @param {boolean=} opt_sweepFlag + * @return {!SVGPathSegArcAbs} + */ +SVGPathElement.prototype.createSVGPathSegArcAbs = function(opt_x, opt_y, opt_r1, opt_r2, opt_angle, opt_largeArcFlag, opt_sweepFlag){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @param {number=} opt_r1 + * @param {number=} opt_r2 + * @param {number=} opt_angle + * @param {boolean=} opt_largeArcFlag + * @param {boolean=} opt_sweepFlag + * @return {!SVGPathSegArcRel} + */ +SVGPathElement.prototype.createSVGPathSegArcRel = function(opt_x, opt_y, opt_r1, opt_r2, opt_angle, opt_largeArcFlag, opt_sweepFlag){}; + + +/** + * @param {number=} opt_x + * @return {!SVGPathSegLinetoHorizontalAbs} + */ +SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs = function(opt_x){}; + + +/** + * @param {number=} opt_x + * @return {!SVGPathSegLinetoHorizontalRel} + */ +SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel = function(opt_x){}; + + +/** + * @param {number=} opt_y + * @return {!SVGPathSegLinetoVerticalAbs} + */ +SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs = function(opt_y){}; + + +/** + * @param {number=} opt_y + * @return {!SVGPathSegLinetoVerticalRel} + */ +SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel = function(opt_y){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @param {number=} opt_x2 + * @param {number=} opt_y2 + * @return {!SVGPathSegCurvetoCubicSmoothAbs} + */ +SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs = function(opt_x, opt_y, opt_x2, opt_y2){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @param {number=} opt_x2 + * @param {number=} opt_y2 + * @return {!SVGPathSegCurvetoCubicSmoothRel} + */ +SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel = function(opt_x, opt_y, opt_x2, opt_y2){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @return {!SVGPathSegCurvetoQuadraticSmoothAbs} + */ +SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs = function(opt_x, opt_y){}; + + +/** + * @param {number=} opt_x + * @param {number=} opt_y + * @return {!SVGPathSegCurvetoQuadraticSmoothRel} + */ +SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel = function(opt_x, opt_y){}; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGPathElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGPathElement.prototype.transform; + + +/** + * @type {string} + */ +SVGPathElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGPathElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGPathElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGPathElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGPathElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGPathElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGPathElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGPathElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGPathElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGPathElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGPathElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGPathElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGPathElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGPathElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGCircleElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGCircleElement.prototype.cx; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGCircleElement.prototype.cy; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGCircleElement.prototype.r; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGCircleElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGCircleElement.prototype.transform; + + +/** + * @type {string} + */ +SVGCircleElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGCircleElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGCircleElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGCircleElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGCircleElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGCircleElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGCircleElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGCircleElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGCircleElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGCircleElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGCircleElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGCircleElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGCircleElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGCircleElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGUseElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGUseElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGUseElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGUseElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGUseElement.prototype.height; + + +/** + * @type {!SVGElementInstance} + */ +SVGUseElement.prototype.instanceRoot; + + +/** + * @type {!SVGElementInstance} + */ +SVGUseElement.prototype.animatedInstanceRoot; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGUseElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGElement} + */ +SVGUseElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGUseElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGUseElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGUseElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGUseElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGUseElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGUseElement.prototype.transform; + + +/** + * @type {!SVGAnimatedString} + */ +SVGUseElement.prototype.href; + + +/** + * @type {string} + */ +SVGUseElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGUseElement.prototype.xmlspace; + + +/** + * @type {!SVGStringList} + */ +SVGUseElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGUseElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGUseElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGUseElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGUseElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGUseElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGPolylineElement(){} + + +/** + * @type {!SVGPointList} + */ +SVGPolylineElement.prototype.points; + + +/** + * @type {!SVGPointList} + */ +SVGPolylineElement.prototype.animatedPoints; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGPolylineElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGPolylineElement.prototype.transform; + + +/** + * @type {string} + */ +SVGPolylineElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGPolylineElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGPolylineElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGPolylineElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGPolylineElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGPolylineElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGPolylineElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGPolylineElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGPolylineElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGPolylineElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGPolylineElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGPolylineElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGPolylineElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGPolylineElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGGElement(){} + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGGElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGGElement.prototype.transform; + + +/** + * @type {string} + */ +SVGGElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGGElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGGElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGGElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGGElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGGElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGGElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGGElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGGElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGGElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGGElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGGElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGGElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGGElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGSwitchElement(){} + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGSwitchElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGSwitchElement.prototype.transform; + + +/** + * @type {string} + */ +SVGSwitchElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGSwitchElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGSwitchElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGSwitchElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGSwitchElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGSwitchElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGSwitchElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGSwitchElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGSwitchElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGSwitchElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGSwitchElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGSwitchElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGSwitchElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGSwitchElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGImageElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGImageElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGImageElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGImageElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGImageElement.prototype.height; + + +/** + * @type {!SVGAnimatedPreserveAspectRatio} + */ +SVGImageElement.prototype.preserveAspectRatio; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGImageElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGElement} + */ +SVGImageElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGImageElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGImageElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGImageElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGImageElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGImageElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGImageElement.prototype.transform; + + +/** + * @type {!SVGAnimatedString} + */ +SVGImageElement.prototype.href; + + +/** + * @type {string} + */ +SVGImageElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGImageElement.prototype.xmlspace; + + +/** + * @type {!SVGStringList} + */ +SVGImageElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGImageElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGImageElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGImageElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGImageElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGImageElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGRectElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRectElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRectElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRectElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRectElement.prototype.height; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRectElement.prototype.rx; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGRectElement.prototype.ry; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGRectElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGRectElement.prototype.transform; + + +/** + * @type {string} + */ +SVGRectElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGRectElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGRectElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGRectElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGRectElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGRectElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGRectElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGRectElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGRectElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGRectElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGRectElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGRectElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGRectElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGRectElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGAElement(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGAElement.prototype.target; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGAElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGElement} + */ +SVGAElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGAElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGAElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGAElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGAElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGAElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGAElement.prototype.transform; + + +/** + * @type {!SVGAnimatedString} + */ +SVGAElement.prototype.href; + + +/** + * @type {string} + */ +SVGAElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGAElement.prototype.xmlspace; + + +/** + * @type {!SVGStringList} + */ +SVGAElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGAElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGAElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGAElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGAElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGAElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + */ +function SVGAnimatedPreserveAspectRatio(){} + + +/** + * @type {!SVGPreserveAspectRatio} + */ +SVGAnimatedPreserveAspectRatio.prototype.baseVal; + + +/** + * @type {!SVGPreserveAspectRatio} + */ +SVGAnimatedPreserveAspectRatio.prototype.animVal; + + + +/** + * @constructor + */ +function SVGElementInstanceList(){} + + +/** + * @type {number} + */ +SVGElementInstanceList.prototype.length; + + +/** + * @param {number=} opt_index + * @return {!SVGElementInstance} + */ +SVGElementInstanceList.prototype.item = function(opt_index){}; + + + +/** + * @constructor + * @extends {Element} + */ +function SVGElement(){} + + +/** + * @type {string} + */ +SVGElement.prototype.id; + + +/** + * @type {string} + */ +SVGElement.prototype.xmlbase; + + +/** + * @type {!SVGSVGElement} + */ +SVGElement.prototype.ownerSVGElement; + + +/** + * @type {!SVGElement} + */ +SVGElement.prototype.viewportElement; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFETurbulenceElement(){} + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.prototype.SVG_TURBULENCE_TYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_FRACTALNOISE; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.prototype.SVG_TURBULENCE_TYPE_FRACTALNOISE; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.SVG_TURBULENCE_TYPE_TURBULENCE; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.prototype.SVG_TURBULENCE_TYPE_TURBULENCE; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.SVG_STITCHTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.prototype.SVG_STITCHTYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.SVG_STITCHTYPE_STITCH; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.prototype.SVG_STITCHTYPE_STITCH; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.SVG_STITCHTYPE_NOSTITCH; + + +/** + * @const + * @type {number} + */ +SVGFETurbulenceElement.prototype.SVG_STITCHTYPE_NOSTITCH; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFETurbulenceElement.prototype.baseFrequencyX; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFETurbulenceElement.prototype.baseFrequencyY; + + +/** + * @type {!SVGAnimatedInteger} + */ +SVGFETurbulenceElement.prototype.numOctaves; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFETurbulenceElement.prototype.seed; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFETurbulenceElement.prototype.stitchTiles; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFETurbulenceElement.prototype.type; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFETurbulenceElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFETurbulenceElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFETurbulenceElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFETurbulenceElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFETurbulenceElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFETurbulenceElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFETurbulenceElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGPathSeg} + */ +function SVGPathSegArcAbs(){} + + +/** + * @type {number} + */ +SVGPathSegArcAbs.prototype.x; + + +/** + * @type {number} + */ +SVGPathSegArcAbs.prototype.y; + + +/** + * @type {number} + */ +SVGPathSegArcAbs.prototype.r1; + + +/** + * @type {number} + */ +SVGPathSegArcAbs.prototype.r2; + + +/** + * @type {number} + */ +SVGPathSegArcAbs.prototype.angle; + + +/** + * @type {boolean} + */ +SVGPathSegArcAbs.prototype.largeArcFlag; + + +/** + * @type {boolean} + */ +SVGPathSegArcAbs.prototype.sweepFlag; + + + +/** + * @constructor + */ +function SVGAnimatedBoolean(){} + + +/** + * @type {boolean} + */ +SVGAnimatedBoolean.prototype.baseVal; + + +/** + * @type {boolean} + */ +SVGAnimatedBoolean.prototype.animVal; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGLangSpace} + */ +function SVGStyleElement(){} + + +/** + * @type {boolean} + */ +SVGStyleElement.prototype.disabled; + + +/** + * @type {string} + */ +SVGStyleElement.prototype.type; + + +/** + * @type {string} + */ +SVGStyleElement.prototype.media; + + +/** + * @type {string} + */ +SVGStyleElement.prototype.title; + + +/** + * @type {string} + */ +SVGStyleElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGStyleElement.prototype.xmlspace; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGClipPathElement(){} + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGClipPathElement.prototype.clipPathUnits; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGClipPathElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGClipPathElement.prototype.transform; + + +/** + * @type {string} + */ +SVGClipPathElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGClipPathElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGClipPathElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGClipPathElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGClipPathElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGClipPathElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGClipPathElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGClipPathElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGClipPathElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGClipPathElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGClipPathElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGClipPathElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGClipPathElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGClipPathElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @interface + */ +function ElementTimeControl(){} + + +/** + * @return {undefined} + */ +ElementTimeControl.prototype.beginElement = function(){}; + + +/** + * @param {number=} opt_offset + * @return {undefined} + */ +ElementTimeControl.prototype.beginElementAt = function(opt_offset){}; + + +/** + * @return {undefined} + */ +ElementTimeControl.prototype.endElement = function(){}; + + +/** + * @param {number=} opt_offset + * @return {undefined} + */ +ElementTimeControl.prototype.endElementAt = function(opt_offset){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGExternalResourcesRequired} + * @implements {ElementTimeControl} + */ +function SVGAnimationElement(){} + + +/** + * @type {!SVGElement} + */ +SVGAnimationElement.prototype.targetElement; + + +/** + * @return {number} + */ +SVGAnimationElement.prototype.getStartTime = function(){}; + + +/** + * @return {number} + */ +SVGAnimationElement.prototype.getCurrentTime = function(){}; + + +/** + * @return {number} + */ +SVGAnimationElement.prototype.getSimpleDuration = function(){}; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGAnimationElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGStringList} + */ +SVGAnimationElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGAnimationElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGAnimationElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGAnimationElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @override + * @return {undefined} + */ +SVGAnimationElement.prototype.beginElement = function(){}; + + +/** + * @param {number=} opt_offset + * @override + * @return {undefined} + */ +SVGAnimationElement.prototype.beginElementAt = function(opt_offset){}; + + +/** + * @override + * @return {undefined} + */ +SVGAnimationElement.prototype.endElement = function(){}; + + +/** + * @param {number=} opt_offset + * @override + * @return {undefined} + */ +SVGAnimationElement.prototype.endElementAt = function(opt_offset){}; + + + +/** + * @constructor + * @extends {SVGAnimationElement} + */ +function SVGAnimateMotionElement(){} + + + +/** + * @constructor + * @extends {SVGAnimationElement} + */ +function SVGAnimateElement(){} + + + +/** + * @constructor + * @extends {SVGAnimationElement} + */ +function SVGAnimateColorElement(){} + + + +/** + * @constructor + * @extends {SVGAnimationElement} + */ +function SVGAnimateTransformElement(){} + + + +/** + * @constructor + * @extends {SVGAnimationElement} + */ +function SVGSetElement(){} + + + +/** + * @constructor + */ +function SVGAngle(){} + + +/** + * @const + * @type {number} + */ +SVGAngle.SVG_ANGLETYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGAngle.prototype.SVG_ANGLETYPE_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGAngle.SVG_ANGLETYPE_UNSPECIFIED; + + +/** + * @const + * @type {number} + */ +SVGAngle.prototype.SVG_ANGLETYPE_UNSPECIFIED; + + +/** + * @const + * @type {number} + */ +SVGAngle.SVG_ANGLETYPE_DEG; + + +/** + * @const + * @type {number} + */ +SVGAngle.prototype.SVG_ANGLETYPE_DEG; + + +/** + * @const + * @type {number} + */ +SVGAngle.SVG_ANGLETYPE_RAD; + + +/** + * @const + * @type {number} + */ +SVGAngle.prototype.SVG_ANGLETYPE_RAD; + + +/** + * @const + * @type {number} + */ +SVGAngle.SVG_ANGLETYPE_GRAD; + + +/** + * @const + * @type {number} + */ +SVGAngle.prototype.SVG_ANGLETYPE_GRAD; + + +/** + * @type {number} + */ +SVGAngle.prototype.unitType; + + +/** + * @type {number} + */ +SVGAngle.prototype.value; + + +/** + * @type {number} + */ +SVGAngle.prototype.valueInSpecifiedUnits; + + +/** + * @type {string} + */ +SVGAngle.prototype.valueAsString; + + +/** + * @param {number} unitType + * @param {number} valueInSpecifiedUnits + * @return {undefined} + */ +SVGAngle.prototype.newValueSpecifiedUnits = function(unitType, valueInSpecifiedUnits){}; + + +/** + * @param {number} unitType + * @return {undefined} + */ +SVGAngle.prototype.convertToSpecifiedUnits = function(unitType){}; + + + +/** + * @constructor + * @extends {SVGTextPositioningElement} + * @implements {SVGTransformable} + */ +function SVGTextElement(){} + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGTextElement.prototype.transform; + + +/** + * @type {!SVGElement} + */ +SVGTextElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGTextElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGTextElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGTextElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGTextElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGTextElement.prototype.getTransformToElement = function(opt_element){}; + + + +/** + * @constructor + * @extends {SVGElement} + */ +function SVGFontFaceElement(){} + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGLineElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGLineElement.prototype.x1; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGLineElement.prototype.y1; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGLineElement.prototype.x2; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGLineElement.prototype.y2; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGLineElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGLineElement.prototype.transform; + + +/** + * @type {string} + */ +SVGLineElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGLineElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGLineElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGLineElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGLineElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGLineElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGLineElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGLineElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGLineElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGLineElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGLineElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGLineElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGLineElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGLineElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEComponentTransferElement(){} + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEComponentTransferElement.prototype.in1; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEComponentTransferElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEComponentTransferElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEComponentTransferElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEComponentTransferElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEComponentTransferElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEComponentTransferElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEComponentTransferElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEDisplacementMapElement(){} + + +/** + * @const + * @type {number} + */ +SVGFEDisplacementMapElement.SVG_CHANNEL_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFEDisplacementMapElement.prototype.SVG_CHANNEL_UNKNOWN; + + +/** + * @const + * @type {number} + */ +SVGFEDisplacementMapElement.SVG_CHANNEL_R; + + +/** + * @const + * @type {number} + */ +SVGFEDisplacementMapElement.prototype.SVG_CHANNEL_R; + + +/** + * @const + * @type {number} + */ +SVGFEDisplacementMapElement.SVG_CHANNEL_G; + + +/** + * @const + * @type {number} + */ +SVGFEDisplacementMapElement.prototype.SVG_CHANNEL_G; + + +/** + * @const + * @type {number} + */ +SVGFEDisplacementMapElement.SVG_CHANNEL_B; + + +/** + * @const + * @type {number} + */ +SVGFEDisplacementMapElement.prototype.SVG_CHANNEL_B; + + +/** + * @const + * @type {number} + */ +SVGFEDisplacementMapElement.SVG_CHANNEL_A; + + +/** + * @const + * @type {number} + */ +SVGFEDisplacementMapElement.prototype.SVG_CHANNEL_A; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEDisplacementMapElement.prototype.in1; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEDisplacementMapElement.prototype.in2; + + +/** + * @type {!SVGAnimatedNumber} + */ +SVGFEDisplacementMapElement.prototype.scale; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFEDisplacementMapElement.prototype.xChannelSelector; + + +/** + * @type {!SVGAnimatedEnumeration} + */ +SVGFEDisplacementMapElement.prototype.yChannelSelector; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDisplacementMapElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDisplacementMapElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDisplacementMapElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEDisplacementMapElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEDisplacementMapElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEDisplacementMapElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEDisplacementMapElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + */ +function SVGAnimatedEnumeration(){} + + +/** + * @type {number} + */ +SVGAnimatedEnumeration.prototype.baseVal; + + +/** + * @type {number} + */ +SVGAnimatedEnumeration.prototype.animVal; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGFilterPrimitiveStandardAttributes} + */ +function SVGFEMergeElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEMergeElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEMergeElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEMergeElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGFEMergeElement.prototype.height; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEMergeElement.prototype.result; + + +/** + * @type {!SVGAnimatedString} + */ +SVGFEMergeElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGFEMergeElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGTests} + * @implements {SVGLangSpace} + * @implements {SVGExternalResourcesRequired} + * @implements {SVGStylable} + * @implements {SVGTransformable} + */ +function SVGForeignObjectElement(){} + + +/** + * @type {!SVGAnimatedLength} + */ +SVGForeignObjectElement.prototype.x; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGForeignObjectElement.prototype.y; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGForeignObjectElement.prototype.width; + + +/** + * @type {!SVGAnimatedLength} + */ +SVGForeignObjectElement.prototype.height; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGForeignObjectElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedTransformList} + */ +SVGForeignObjectElement.prototype.transform; + + +/** + * @type {string} + */ +SVGForeignObjectElement.prototype.xmllang; + + +/** + * @type {string} + */ +SVGForeignObjectElement.prototype.xmlspace; + + +/** + * @type {!SVGElement} + */ +SVGForeignObjectElement.prototype.nearestViewportElement; + + +/** + * @type {!SVGElement} + */ +SVGForeignObjectElement.prototype.farthestViewportElement; + + +/** + * @return {!SVGRect} + * @override + */ +SVGForeignObjectElement.prototype.getBBox = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGForeignObjectElement.prototype.getCTM = function(){}; + + +/** + * @return {!SVGMatrix} + * @override + */ +SVGForeignObjectElement.prototype.getScreenCTM = function(){}; + + +/** + * @param {!SVGElement=} opt_element + * @return {!SVGMatrix} + * @override + */ +SVGForeignObjectElement.prototype.getTransformToElement = function(opt_element){}; + + +/** + * @type {!SVGStringList} + */ +SVGForeignObjectElement.prototype.requiredFeatures; + + +/** + * @type {!SVGStringList} + */ +SVGForeignObjectElement.prototype.requiredExtensions; + + +/** + * @type {!SVGStringList} + */ +SVGForeignObjectElement.prototype.systemLanguage; + + +/** + * @param {string=} opt_extension + * @return {boolean} + * @override + */ +SVGForeignObjectElement.prototype.hasExtension = function(opt_extension){}; + + +/** + * @type {!SVGAnimatedString} + */ +SVGForeignObjectElement.prototype.className; + + +/** + * @param {string=} opt_name + * @return {!CSSValue} + * @override + */ +SVGForeignObjectElement.prototype.getPresentationAttribute = function(opt_name){}; + + + +/** + * @constructor + */ +function SVGAnimatedLength(){} + + +/** + * @type {!SVGLength} + */ +SVGAnimatedLength.prototype.baseVal; + + +/** + * @type {!SVGLength} + */ +SVGAnimatedLength.prototype.animVal; + + + +/** + * @constructor + * @extends {SVGElement} + * @implements {SVGURIReference} + * @implements {SVGExternalResourcesRequired} + */ +function SVGScriptElement(){} + + +/** + * @type {string} + */ +SVGScriptElement.prototype.type; + + +/** + * @type {!SVGAnimatedBoolean} + */ +SVGScriptElement.prototype.externalResourcesRequired; + + +/** + * @type {!SVGAnimatedString} + */ +SVGScriptElement.prototype.href; + + + +/** + * @constructor + */ +function SVGAnimatedInteger(){} + + +/** + * @type {number} + */ +SVGAnimatedInteger.prototype.baseVal; + + +/** + * @type {number} + */ +SVGAnimatedInteger.prototype.animVal; diff --git a/generators/dart/procedures.js b/generators/dart/procedures.js index ad2550cc7..fad15c211 100644 --- a/generators/dart/procedures.js +++ b/generators/dart/procedures.js @@ -35,9 +35,10 @@ Blockly.Dart['procedures_defreturn'] = function(block) { Blockly.Procedures.NAME_TYPE); var branch = Blockly.Dart.statementToCode(block, 'STACK'); if (Blockly.Dart.STATEMENT_PREFIX) { + var id = block.id.replace(/\$/g, '$$$$'); // Issue 251. branch = Blockly.Dart.prefixLines( Blockly.Dart.STATEMENT_PREFIX.replace(/%1/g, - '\'' + block.id + '\''), Blockly.Dart.INDENT) + branch; + '\'' + id + '\''), Blockly.Dart.INDENT) + branch; } if (Blockly.Dart.INFINITE_LOOP_TRAP) { branch = Blockly.Dart.INFINITE_LOOP_TRAP.replace(/%1/g, diff --git a/generators/javascript/procedures.js b/generators/javascript/procedures.js index 04845f9bd..aaab94350 100644 --- a/generators/javascript/procedures.js +++ b/generators/javascript/procedures.js @@ -35,9 +35,10 @@ Blockly.JavaScript['procedures_defreturn'] = function(block) { block.getFieldValue('NAME'), Blockly.Procedures.NAME_TYPE); var branch = Blockly.JavaScript.statementToCode(block, 'STACK'); if (Blockly.JavaScript.STATEMENT_PREFIX) { + var id = block.id.replace(/\$/g, '$$$$'); // Issue 251. branch = Blockly.JavaScript.prefixLines( Blockly.JavaScript.STATEMENT_PREFIX.replace(/%1/g, - '\'' + block.id + '\''), Blockly.JavaScript.INDENT) + branch; + '\'' + id + '\''), Blockly.JavaScript.INDENT) + branch; } if (Blockly.JavaScript.INFINITE_LOOP_TRAP) { branch = Blockly.JavaScript.INFINITE_LOOP_TRAP.replace(/%1/g, diff --git a/generators/lua/procedures.js b/generators/lua/procedures.js index b6d6cdda1..92e7b4da2 100644 --- a/generators/lua/procedures.js +++ b/generators/lua/procedures.js @@ -35,9 +35,10 @@ Blockly.Lua['procedures_defreturn'] = function(block) { block.getFieldValue('NAME'), Blockly.Procedures.NAME_TYPE); var branch = Blockly.Lua.statementToCode(block, 'STACK'); if (Blockly.Lua.STATEMENT_PREFIX) { + var id = block.id.replace(/\$/g, '$$$$'); // Issue 251. branch = Blockly.Lua.prefixLines( Blockly.Lua.STATEMENT_PREFIX.replace(/%1/g, - '\'' + block.id + '\''), Blockly.Lua.INDENT) + branch; + '\'' + id + '\''), Blockly.Lua.INDENT) + branch; } if (Blockly.Lua.INFINITE_LOOP_TRAP) { branch = Blockly.Lua.INFINITE_LOOP_TRAP.replace(/%1/g, diff --git a/generators/php/procedures.js b/generators/php/procedures.js index ac4f0244e..10569268d 100644 --- a/generators/php/procedures.js +++ b/generators/php/procedures.js @@ -49,9 +49,10 @@ Blockly.PHP['procedures_defreturn'] = function(block) { block.getFieldValue('NAME'), Blockly.Procedures.NAME_TYPE); var branch = Blockly.PHP.statementToCode(block, 'STACK'); if (Blockly.PHP.STATEMENT_PREFIX) { + var id = block.id.replace(/\$/g, '$$$$'); // Issue 251. branch = Blockly.PHP.prefixLines( Blockly.PHP.STATEMENT_PREFIX.replace(/%1/g, - '\'' + block.id + '\''), Blockly.PHP.INDENT) + branch; + '\'' + id + '\''), Blockly.PHP.INDENT) + branch; } if (Blockly.PHP.INFINITE_LOOP_TRAP) { branch = Blockly.PHP.INFINITE_LOOP_TRAP.replace(/%1/g, diff --git a/generators/python/procedures.js b/generators/python/procedures.js index 10d279a90..506482d17 100644 --- a/generators/python/procedures.js +++ b/generators/python/procedures.js @@ -49,9 +49,10 @@ Blockly.Python['procedures_defreturn'] = function(block) { Blockly.Procedures.NAME_TYPE); var branch = Blockly.Python.statementToCode(block, 'STACK'); if (Blockly.Python.STATEMENT_PREFIX) { + var id = block.id.replace(/\$/g, '$$$$'); // Issue 251. branch = Blockly.Python.prefixLines( Blockly.Python.STATEMENT_PREFIX.replace(/%1/g, - '\'' + block.id + '\''), Blockly.Python.INDENT) + branch; + '\'' + id + '\''), Blockly.Python.INDENT) + branch; } if (Blockly.Python.INFINITE_LOOP_TRAP) { branch = Blockly.Python.INFINITE_LOOP_TRAP.replace(/%1/g, diff --git a/i18n/create_messages.py b/i18n/create_messages.py index dc2620a31..2254b3012 100755 --- a/i18n/create_messages.py +++ b/i18n/create_messages.py @@ -42,7 +42,8 @@ def load_constants(filename): for key in constant_defs: value = constant_defs[key] value = value.replace('"', '\\"') - constants_text += '\nBlockly.Msg["{0}"] = "{1}";'.format(key, value) + constants_text += u'\n/** @export */ Blockly.Msg.{0} = \"{1}\";'.format( + key, value) return constants_text def main(): @@ -87,8 +88,8 @@ def main(): # Read in synonyms file, which must be output in every language. synonym_defs = read_json_file(os.path.join( os.curdir, args.source_synonym_file)) - synonym_text = '\n'.join(['Blockly.Msg.{0} = Blockly.Msg.{1};'.format( - key, synonym_defs[key]) for key in synonym_defs]) + synonym_text = '\n'.join([u'/** @export */ Blockly.Msg.{0} = Blockly.Msg.{1};' + .format(key, synonym_defs[key]) for key in synonym_defs]) # Read in constants file, which must be output in every language. constants_text = load_constants(os.path.join(os.curdir, args.source_constants_file)) @@ -139,8 +140,8 @@ goog.require('Blockly.Msg'); value = source_defs[key] comment = ' // untranslated' value = value.replace('"', '\\"') - outfile.write(u'Blockly.Msg["{0}"] = "{1}";{2}\n'.format( - key, value, comment)) + outfile.write(u'/** @export */ Blockly.Msg.{0} = "{1}";{2}\n' + .format(key, value, comment)) # Announce any keys defined only for target language. if target_defs: diff --git a/javascript_compressed.js b/javascript_compressed.js index cf91cab53..da860030b 100644 --- a/javascript_compressed.js +++ b/javascript_compressed.js @@ -1,25 +1,7 @@ // Do not edit this file; automatically generated by build.py. 'use strict'; -/* - Visual Blocks Language - - Copyright 2012 Google Inc. - https://developers.google.com/blockly/ - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ Blockly.JavaScript=new Blockly.Generator("JavaScript");Blockly.JavaScript.addReservedWords("Blockly,break,case,catch,continue,debugger,default,delete,do,else,finally,for,function,if,in,instanceof,new,return,switch,this,throw,try,typeof,var,void,while,with,class,enum,export,extends,import,super,implements,interface,let,package,private,protected,public,static,yield,const,null,true,false,Array,ArrayBuffer,Boolean,Date,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Error,eval,EvalError,Float32Array,Float64Array,Function,Infinity,Int16Array,Int32Array,Int8Array,isFinite,isNaN,Iterator,JSON,Math,NaN,Number,Object,parseFloat,parseInt,RangeError,ReferenceError,RegExp,StopIteration,String,SyntaxError,TypeError,Uint16Array,Uint32Array,Uint8Array,Uint8ClampedArray,undefined,uneval,URIError,applicationCache,closed,Components,content,_content,controllers,crypto,defaultStatus,dialogArguments,directories,document,frameElement,frames,fullScreen,globalStorage,history,innerHeight,innerWidth,length,location,locationbar,localStorage,menubar,messageManager,mozAnimationStartTime,mozInnerScreenX,mozInnerScreenY,mozPaintCount,name,navigator,opener,outerHeight,outerWidth,pageXOffset,pageYOffset,parent,performance,personalbar,pkcs11,returnValue,screen,screenX,screenY,scrollbars,scrollMaxX,scrollMaxY,scrollX,scrollY,self,sessionStorage,sidebar,status,statusbar,toolbar,top,URL,window,addEventListener,alert,atob,back,blur,btoa,captureEvents,clearImmediate,clearInterval,clearTimeout,close,confirm,disableExternalCapture,dispatchEvent,dump,enableExternalCapture,escape,find,focus,forward,GeckoActiveXObject,getAttention,getAttentionWithCycleCount,getComputedStyle,getSelection,home,matchMedia,maximize,minimize,moveBy,moveTo,mozRequestAnimationFrame,open,openDialog,postMessage,print,prompt,QueryInterface,releaseEvents,removeEventListener,resizeBy,resizeTo,restore,routeEvent,scroll,scrollBy,scrollByLines,scrollByPages,scrollTo,setCursor,setImmediate,setInterval,setResizable,setTimeout,showModalDialog,sizeToContent,stop,unescape,updateCommands,XPCNativeWrapper,XPCSafeJSObjectWrapper,onabort,onbeforeunload,onblur,onchange,onclick,onclose,oncontextmenu,ondevicemotion,ondeviceorientation,ondragdrop,onerror,onfocus,onhashchange,onkeydown,onkeypress,onkeyup,onload,onmousedown,onmousemove,onmouseout,onmouseover,onmouseup,onmozbeforepaint,onpaint,onpopstate,onreset,onresize,onscroll,onselect,onsubmit,onunload,onpageshow,onpagehide,Image,Option,Worker,Event,Range,File,FileReader,Blob,BlobBuilder,Attr,CDATASection,CharacterData,Comment,console,DocumentFragment,DocumentType,DomConfiguration,DOMError,DOMErrorHandler,DOMException,DOMImplementation,DOMImplementationList,DOMImplementationRegistry,DOMImplementationSource,DOMLocator,DOMObject,DOMString,DOMStringList,DOMTimeStamp,DOMUserData,Entity,EntityReference,MediaQueryList,MediaQueryListListener,NameList,NamedNodeMap,Node,NodeFilter,NodeIterator,NodeList,Notation,Plugin,PluginArray,ProcessingInstruction,SharedWorker,Text,TimeRanges,Treewalker,TypeInfo,UserDataHandler,Worker,WorkerGlobalScope,HTMLDocument,HTMLElement,HTMLAnchorElement,HTMLAppletElement,HTMLAudioElement,HTMLAreaElement,HTMLBaseElement,HTMLBaseFontElement,HTMLBodyElement,HTMLBRElement,HTMLButtonElement,HTMLCanvasElement,HTMLDirectoryElement,HTMLDivElement,HTMLDListElement,HTMLEmbedElement,HTMLFieldSetElement,HTMLFontElement,HTMLFormElement,HTMLFrameElement,HTMLFrameSetElement,HTMLHeadElement,HTMLHeadingElement,HTMLHtmlElement,HTMLHRElement,HTMLIFrameElement,HTMLImageElement,HTMLInputElement,HTMLKeygenElement,HTMLLabelElement,HTMLLIElement,HTMLLinkElement,HTMLMapElement,HTMLMenuElement,HTMLMetaElement,HTMLModElement,HTMLObjectElement,HTMLOListElement,HTMLOptGroupElement,HTMLOptionElement,HTMLOutputElement,HTMLParagraphElement,HTMLParamElement,HTMLPreElement,HTMLQuoteElement,HTMLScriptElement,HTMLSelectElement,HTMLSourceElement,HTMLSpanElement,HTMLStyleElement,HTMLTableElement,HTMLTableCaptionElement,HTMLTableCellElement,HTMLTableDataCellElement,HTMLTableHeaderCellElement,HTMLTableColElement,HTMLTableRowElement,HTMLTableSectionElement,HTMLTextAreaElement,HTMLTimeElement,HTMLTitleElement,HTMLTrackElement,HTMLUListElement,HTMLUnknownElement,HTMLVideoElement,HTMLCanvasElement,CanvasRenderingContext2D,CanvasGradient,CanvasPattern,TextMetrics,ImageData,CanvasPixelArray,HTMLAudioElement,HTMLVideoElement,NotifyAudioAvailableEvent,HTMLCollection,HTMLAllCollection,HTMLFormControlsCollection,HTMLOptionsCollection,HTMLPropertiesCollection,DOMTokenList,DOMSettableTokenList,DOMStringMap,RadioNodeList,SVGDocument,SVGElement,SVGAElement,SVGAltGlyphElement,SVGAltGlyphDefElement,SVGAltGlyphItemElement,SVGAnimationElement,SVGAnimateElement,SVGAnimateColorElement,SVGAnimateMotionElement,SVGAnimateTransformElement,SVGSetElement,SVGCircleElement,SVGClipPathElement,SVGColorProfileElement,SVGCursorElement,SVGDefsElement,SVGDescElement,SVGEllipseElement,SVGFilterElement,SVGFilterPrimitiveStandardAttributes,SVGFEBlendElement,SVGFEColorMatrixElement,SVGFEComponentTransferElement,SVGFECompositeElement,SVGFEConvolveMatrixElement,SVGFEDiffuseLightingElement,SVGFEDisplacementMapElement,SVGFEDistantLightElement,SVGFEFloodElement,SVGFEGaussianBlurElement,SVGFEImageElement,SVGFEMergeElement,SVGFEMergeNodeElement,SVGFEMorphologyElement,SVGFEOffsetElement,SVGFEPointLightElement,SVGFESpecularLightingElement,SVGFESpotLightElement,SVGFETileElement,SVGFETurbulenceElement,SVGComponentTransferFunctionElement,SVGFEFuncRElement,SVGFEFuncGElement,SVGFEFuncBElement,SVGFEFuncAElement,SVGFontElement,SVGFontFaceElement,SVGFontFaceFormatElement,SVGFontFaceNameElement,SVGFontFaceSrcElement,SVGFontFaceUriElement,SVGForeignObjectElement,SVGGElement,SVGGlyphElement,SVGGlyphRefElement,SVGGradientElement,SVGLinearGradientElement,SVGRadialGradientElement,SVGHKernElement,SVGImageElement,SVGLineElement,SVGMarkerElement,SVGMaskElement,SVGMetadataElement,SVGMissingGlyphElement,SVGMPathElement,SVGPathElement,SVGPatternElement,SVGPolylineElement,SVGPolygonElement,SVGRectElement,SVGScriptElement,SVGStopElement,SVGStyleElement,SVGSVGElement,SVGSwitchElement,SVGSymbolElement,SVGTextElement,SVGTextPathElement,SVGTitleElement,SVGTRefElement,SVGTSpanElement,SVGUseElement,SVGViewElement,SVGVKernElement,SVGAngle,SVGColor,SVGICCColor,SVGElementInstance,SVGElementInstanceList,SVGLength,SVGLengthList,SVGMatrix,SVGNumber,SVGNumberList,SVGPaint,SVGPoint,SVGPointList,SVGPreserveAspectRatio,SVGRect,SVGStringList,SVGTransform,SVGTransformList,SVGAnimatedAngle,SVGAnimatedBoolean,SVGAnimatedEnumeration,SVGAnimatedInteger,SVGAnimatedLength,SVGAnimatedLengthList,SVGAnimatedNumber,SVGAnimatedNumberList,SVGAnimatedPreserveAspectRatio,SVGAnimatedRect,SVGAnimatedString,SVGAnimatedTransformList,SVGPathSegList,SVGPathSeg,SVGPathSegArcAbs,SVGPathSegArcRel,SVGPathSegClosePath,SVGPathSegCurvetoCubicAbs,SVGPathSegCurvetoCubicRel,SVGPathSegCurvetoCubicSmoothAbs,SVGPathSegCurvetoCubicSmoothRel,SVGPathSegCurvetoQuadraticAbs,SVGPathSegCurvetoQuadraticRel,SVGPathSegCurvetoQuadraticSmoothAbs,SVGPathSegCurvetoQuadraticSmoothRel,SVGPathSegLinetoAbs,SVGPathSegLinetoHorizontalAbs,SVGPathSegLinetoHorizontalRel,SVGPathSegLinetoRel,SVGPathSegLinetoVerticalAbs,SVGPathSegLinetoVerticalRel,SVGPathSegMovetoAbs,SVGPathSegMovetoRel,ElementTimeControl,TimeEvent,SVGAnimatedPathData,SVGAnimatedPoints,SVGColorProfileRule,SVGCSSRule,SVGExternalResourcesRequired,SVGFitToViewBox,SVGLangSpace,SVGLocatable,SVGRenderingIntent,SVGStylable,SVGTests,SVGTextContentElement,SVGTextPositioningElement,SVGTransformable,SVGUnitTypes,SVGURIReference,SVGViewSpec,SVGZoomAndPan"); Blockly.JavaScript.ORDER_ATOMIC=0;Blockly.JavaScript.ORDER_NEW=1.1;Blockly.JavaScript.ORDER_MEMBER=1.2;Blockly.JavaScript.ORDER_FUNCTION_CALL=2;Blockly.JavaScript.ORDER_INCREMENT=3;Blockly.JavaScript.ORDER_DECREMENT=3;Blockly.JavaScript.ORDER_BITWISE_NOT=4.1;Blockly.JavaScript.ORDER_UNARY_PLUS=4.2;Blockly.JavaScript.ORDER_UNARY_NEGATION=4.3;Blockly.JavaScript.ORDER_LOGICAL_NOT=4.4;Blockly.JavaScript.ORDER_TYPEOF=4.5;Blockly.JavaScript.ORDER_VOID=4.6;Blockly.JavaScript.ORDER_DELETE=4.7; Blockly.JavaScript.ORDER_DIVISION=5.1;Blockly.JavaScript.ORDER_MULTIPLICATION=5.2;Blockly.JavaScript.ORDER_MODULUS=5.3;Blockly.JavaScript.ORDER_SUBTRACTION=6.1;Blockly.JavaScript.ORDER_ADDITION=6.2;Blockly.JavaScript.ORDER_BITWISE_SHIFT=7;Blockly.JavaScript.ORDER_RELATIONAL=8;Blockly.JavaScript.ORDER_IN=8;Blockly.JavaScript.ORDER_INSTANCEOF=8;Blockly.JavaScript.ORDER_EQUALITY=9;Blockly.JavaScript.ORDER_BITWISE_AND=10;Blockly.JavaScript.ORDER_BITWISE_XOR=11;Blockly.JavaScript.ORDER_BITWISE_OR=12; @@ -39,19 +21,19 @@ Blockly.JavaScript.colour_blend=function(a){var b=Blockly.JavaScript.valueToCode " return '#' + r + g + b;","}"])+"("+b+", "+c+", "+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.lists={};Blockly.JavaScript.lists_create_empty=function(a){return["[]",Blockly.JavaScript.ORDER_ATOMIC]};Blockly.JavaScript.lists_create_with=function(a){for(var b=Array(a.itemCount_),c=0;c b.toString() ? 1 : -1; },", ' "IGNORE_CASE": function(a, b) {'," return a.toString().toLowerCase() > b.toString().toLowerCase() ? 1 : -1; },"," };"," var compare = compareFuncs[type];"," return function(a, b) { return compare(a, b) * direction; }","}"]);return[b+".slice().sort("+d+'("'+a+'", '+c+"))",Blockly.JavaScript.ORDER_FUNCTION_CALL]}; Blockly.JavaScript.lists_split=function(a){var b=Blockly.JavaScript.valueToCode(a,"INPUT",Blockly.JavaScript.ORDER_MEMBER),c=Blockly.JavaScript.valueToCode(a,"DELIM",Blockly.JavaScript.ORDER_NONE)||"''";a=a.getFieldValue("MODE");if("SPLIT"==a)b||(b="''"),a="split";else if("JOIN"==a)b||(b="[]"),a="join";else throw"Unknown mode: "+a;return[b+"."+a+"("+c+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]}; @@ -60,15 +42,15 @@ Blockly.JavaScript.logic_compare=function(a){var b={EQ:"==",NEQ:"!=",LT:"<",LTE: Blockly.JavaScript.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"&&":"||",c="&&"==b?Blockly.JavaScript.ORDER_LOGICAL_AND:Blockly.JavaScript.ORDER_LOGICAL_OR,d=Blockly.JavaScript.valueToCode(a,"A",c);a=Blockly.JavaScript.valueToCode(a,"B",c);if(d||a){var e="&&"==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+" "+b+" "+a,c]}; Blockly.JavaScript.logic_negate=function(a){var b=Blockly.JavaScript.ORDER_LOGICAL_NOT;return["!"+(Blockly.JavaScript.valueToCode(a,"BOOL",b)||"true"),b]};Blockly.JavaScript.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.JavaScript.ORDER_ATOMIC]};Blockly.JavaScript.logic_null=function(a){return["null",Blockly.JavaScript.ORDER_ATOMIC]}; Blockly.JavaScript.logic_ternary=function(a){var b=Blockly.JavaScript.valueToCode(a,"IF",Blockly.JavaScript.ORDER_CONDITIONAL)||"false",c=Blockly.JavaScript.valueToCode(a,"THEN",Blockly.JavaScript.ORDER_CONDITIONAL)||"null";a=Blockly.JavaScript.valueToCode(a,"ELSE",Blockly.JavaScript.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.JavaScript.ORDER_CONDITIONAL]};Blockly.JavaScript.loops={}; -Blockly.JavaScript.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.JavaScript.valueToCode(a,"TIMES",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0";var c=Blockly.JavaScript.statementToCode(a,"DO"),c=Blockly.JavaScript.addLoopTrap(c,a.id),d="",e=Blockly.JavaScript.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);a=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(a=Blockly.JavaScript.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE), -d+="var "+a+" = "+b+";\n");return d+("for (var "+e+" = 0; "+e+" < "+a+"; "+e+"++) {\n"+c+"}\n")};Blockly.JavaScript.controls_repeat=Blockly.JavaScript.controls_repeat_ext; -Blockly.JavaScript.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.JavaScript.valueToCode(a,"BOOL",b?Blockly.JavaScript.ORDER_LOGICAL_NOT:Blockly.JavaScript.ORDER_NONE)||"false",d=Blockly.JavaScript.statementToCode(a,"DO"),d=Blockly.JavaScript.addLoopTrap(d,a.id);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"}; -Blockly.JavaScript.controls_for=function(a){var b=Blockly.JavaScript.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);var c=Blockly.JavaScript.valueToCode(a,"FROM",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0";var d=Blockly.JavaScript.valueToCode(a,"TO",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",e=Blockly.JavaScript.valueToCode(a,"BY",Blockly.JavaScript.ORDER_ASSIGNMENT)||"1",f=Blockly.JavaScript.statementToCode(a,"DO"),f=Blockly.JavaScript.addLoopTrap(f,a.id);if(Blockly.isNumber(c)&& -Blockly.isNumber(d)&&Blockly.isNumber(e)){var g=parseFloat(c)<=parseFloat(d);a="for ("+b+" = "+c+"; "+b+(g?" <= ":" >= ")+d+"; "+b;b=Math.abs(parseFloat(e));a=(1==b?a+(g?"++":"--"):a+((g?" += ":" -= ")+b))+(") {\n"+f+"}\n")}else a="",g=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(g=Blockly.JavaScript.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+="var "+g+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.JavaScript.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE), +Blockly.JavaScript.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.JavaScript.valueToCode(a,"TIMES",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",c=Blockly.JavaScript.statementToCode(a,"DO");c=Blockly.JavaScript.addLoopTrap(c,a.id);a="";var d=Blockly.JavaScript.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE),e=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(e=Blockly.JavaScript.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE), +a+="var "+e+" = "+b+";\n");return a+("for (var "+d+" = 0; "+d+" < "+e+"; "+d+"++) {\n"+c+"}\n")};Blockly.JavaScript.controls_repeat=Blockly.JavaScript.controls_repeat_ext; +Blockly.JavaScript.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.JavaScript.valueToCode(a,"BOOL",b?Blockly.JavaScript.ORDER_LOGICAL_NOT:Blockly.JavaScript.ORDER_NONE)||"false",d=Blockly.JavaScript.statementToCode(a,"DO");d=Blockly.JavaScript.addLoopTrap(d,a.id);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"}; +Blockly.JavaScript.controls_for=function(a){var b=Blockly.JavaScript.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.JavaScript.valueToCode(a,"FROM",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",d=Blockly.JavaScript.valueToCode(a,"TO",Blockly.JavaScript.ORDER_ASSIGNMENT)||"0",e=Blockly.JavaScript.valueToCode(a,"BY",Blockly.JavaScript.ORDER_ASSIGNMENT)||"1",f=Blockly.JavaScript.statementToCode(a,"DO");f=Blockly.JavaScript.addLoopTrap(f,a.id);if(Blockly.isNumber(c)&&Blockly.isNumber(d)&& +Blockly.isNumber(e)){var g=parseFloat(c)<=parseFloat(d);a="for ("+b+" = "+c+"; "+b+(g?" <= ":" >= ")+d+"; "+b;b=Math.abs(parseFloat(e));a=(1==b?a+(g?"++":"--"):a+((g?" += ":" -= ")+b))+(") {\n"+f+"}\n")}else a="",g=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(g=Blockly.JavaScript.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+="var "+g+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.JavaScript.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE), a+="var "+c+" = "+d+";\n"),d=Blockly.JavaScript.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),a+="var "+d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("Math.abs("+e+");\n"),a=a+("if ("+g+" > "+c+") {\n")+(Blockly.JavaScript.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+g+"; "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+"; "+b+" += "+d+") {\n"+f+"}\n";return a}; -Blockly.JavaScript.controls_forEach=function(a){var b=Blockly.JavaScript.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_ASSIGNMENT)||"[]",d=Blockly.JavaScript.statementToCode(a,"DO"),d=Blockly.JavaScript.addLoopTrap(d,a.id);a="";var e=c;c.match(/^\w+$/)||(e=Blockly.JavaScript.variableDB_.getDistinctName(b+"_list",Blockly.Variables.NAME_TYPE),a+="var "+e+" = "+c+";\n");c=Blockly.JavaScript.variableDB_.getDistinctName(b+ +Blockly.JavaScript.controls_forEach=function(a){var b=Blockly.JavaScript.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_ASSIGNMENT)||"[]",d=Blockly.JavaScript.statementToCode(a,"DO");d=Blockly.JavaScript.addLoopTrap(d,a.id);a="";var e=c;c.match(/^\w+$/)||(e=Blockly.JavaScript.variableDB_.getDistinctName(b+"_list",Blockly.Variables.NAME_TYPE),a+="var "+e+" = "+c+";\n");c=Blockly.JavaScript.variableDB_.getDistinctName(b+ "_index",Blockly.Variables.NAME_TYPE);d=Blockly.JavaScript.INDENT+b+" = "+e+"["+c+"];\n"+d;return a+("for (var "+c+" in "+e+") {\n"+d+"}\n")};Blockly.JavaScript.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.JavaScript.math={};Blockly.JavaScript.math_number=function(a){return[parseFloat(a.getFieldValue("NUM")),Blockly.JavaScript.ORDER_ATOMIC]}; -Blockly.JavaScript.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.JavaScript.ORDER_ADDITION],MINUS:[" - ",Blockly.JavaScript.ORDER_SUBTRACTION],MULTIPLY:[" * ",Blockly.JavaScript.ORDER_MULTIPLICATION],DIVIDE:[" / ",Blockly.JavaScript.ORDER_DIVISION],POWER:[null,Blockly.JavaScript.ORDER_COMMA]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.JavaScript.valueToCode(a,"A",b)||"0";a=Blockly.JavaScript.valueToCode(a,"B",b)||"0";return c?[d+c+a,b]:["Math.pow("+d+", "+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]}; +Blockly.JavaScript.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.JavaScript.ORDER_ADDITION],MINUS:[" - ",Blockly.JavaScript.ORDER_SUBTRACTION],MULTIPLY:[" * ",Blockly.JavaScript.ORDER_MULTIPLICATION],DIVIDE:[" / ",Blockly.JavaScript.ORDER_DIVISION],POWER:[null,Blockly.JavaScript.ORDER_COMMA]}[a.getFieldValue("OP")],c=b[0];b=b[1];var d=Blockly.JavaScript.valueToCode(a,"A",b)||"0";a=Blockly.JavaScript.valueToCode(a,"B",b)||"0";return c?[d+c+a,b]:["Math.pow("+d+", "+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]}; Blockly.JavaScript.math_single=function(a){var b=a.getFieldValue("OP");if("NEG"==b)return a=Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_UNARY_NEGATION)||"0","-"==a[0]&&(a=" "+a),["-"+a,Blockly.JavaScript.ORDER_UNARY_NEGATION];a="SIN"==b||"COS"==b||"TAN"==b?Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_DIVISION)||"0":Blockly.JavaScript.valueToCode(a,"NUM",Blockly.JavaScript.ORDER_NONE)||"0";switch(b){case "ABS":var c="Math.abs("+a+")";break;case "ROOT":c="Math.sqrt("+ a+")";break;case "LN":c="Math.log("+a+")";break;case "EXP":c="Math.exp("+a+")";break;case "POW10":c="Math.pow(10,"+a+")";break;case "ROUND":c="Math.round("+a+")";break;case "ROUNDUP":c="Math.ceil("+a+")";break;case "ROUNDDOWN":c="Math.floor("+a+")";break;case "SIN":c="Math.sin("+a+" / 180 * Math.PI)";break;case "COS":c="Math.cos("+a+" / 180 * Math.PI)";break;case "TAN":c="Math.tan("+a+" / 180 * Math.PI)"}if(c)return[c,Blockly.JavaScript.ORDER_FUNCTION_CALL];switch(b){case "LOG10":c="Math.log("+a+ ") / Math.log(10)";break;case "ASIN":c="Math.asin("+a+") / Math.PI * 180";break;case "ACOS":c="Math.acos("+a+") / Math.PI * 180";break;case "ATAN":c="Math.atan("+a+") / Math.PI * 180";break;default:throw"Unknown math operator: "+b;}return[c,Blockly.JavaScript.ORDER_DIVISION]}; @@ -87,22 +69,22 @@ Blockly.JavaScript.math_on_list=function(a){var b=a.getFieldValue("OP");switch(b Blockly.JavaScript.math_constrain=function(a){var b=Blockly.JavaScript.valueToCode(a,"VALUE",Blockly.JavaScript.ORDER_COMMA)||"0",c=Blockly.JavaScript.valueToCode(a,"LOW",Blockly.JavaScript.ORDER_COMMA)||"0";a=Blockly.JavaScript.valueToCode(a,"HIGH",Blockly.JavaScript.ORDER_COMMA)||"Infinity";return["Math.min(Math.max("+b+", "+c+"), "+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]}; Blockly.JavaScript.math_random_int=function(a){var b=Blockly.JavaScript.valueToCode(a,"FROM",Blockly.JavaScript.ORDER_COMMA)||"0";a=Blockly.JavaScript.valueToCode(a,"TO",Blockly.JavaScript.ORDER_COMMA)||"0";return[Blockly.JavaScript.provideFunction_("mathRandomInt",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(a, b) {"," if (a > b) {"," // Swap a and b to ensure a is smaller."," var c = a;"," a = b;"," b = c;"," }"," return Math.floor(Math.random() * (b - a + 1) + a);", "}"])+"("+b+", "+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.math_random_float=function(a){return["Math.random()",Blockly.JavaScript.ORDER_FUNCTION_CALL]};Blockly.JavaScript.procedures={}; -Blockly.JavaScript.procedures_defreturn=function(a){var b=Blockly.JavaScript.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=Blockly.JavaScript.statementToCode(a,"STACK");Blockly.JavaScript.STATEMENT_PREFIX&&(c=Blockly.JavaScript.prefixLines(Blockly.JavaScript.STATEMENT_PREFIX.replace(/%1/g,"'"+a.id+"'"),Blockly.JavaScript.INDENT)+c);Blockly.JavaScript.INFINITE_LOOP_TRAP&&(c=Blockly.JavaScript.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+a.id+"'")+c);var d=Blockly.JavaScript.valueToCode(a, -"RETURN",Blockly.JavaScript.ORDER_NONE)||"";d&&(d=" return "+d+";\n");for(var e=[],f=0;f",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Lua.valueToCode(a,"A",Blockly.Lua.ORDER_RELATIONAL)||"0";a=Blockly.Lua.valueToCode(a,"B",Blockly.Lua.ORDER_RELATIONAL)||"0";return[c+" "+b+" "+a,Blockly.Lua.ORDER_RELATIONAL]}; Blockly.Lua.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"and":"or",c="and"==b?Blockly.Lua.ORDER_AND:Blockly.Lua.ORDER_OR,d=Blockly.Lua.valueToCode(a,"A",c);a=Blockly.Lua.valueToCode(a,"B",c);if(d||a){var e="and"==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+" "+b+" "+a,c]};Blockly.Lua.logic_negate=function(a){return["not "+(Blockly.Lua.valueToCode(a,"BOOL",Blockly.Lua.ORDER_UNARY)||"true"),Blockly.Lua.ORDER_UNARY]}; Blockly.Lua.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.Lua.ORDER_ATOMIC]};Blockly.Lua.logic_null=function(a){return["nil",Blockly.Lua.ORDER_ATOMIC]};Blockly.Lua.logic_ternary=function(a){var b=Blockly.Lua.valueToCode(a,"IF",Blockly.Lua.ORDER_AND)||"false",c=Blockly.Lua.valueToCode(a,"THEN",Blockly.Lua.ORDER_AND)||"nil";a=Blockly.Lua.valueToCode(a,"ELSE",Blockly.Lua.ORDER_OR)||"nil";return[b+" and "+c+" or "+a,Blockly.Lua.ORDER_OR]};Blockly.Lua.loops={};Blockly.Lua.CONTINUE_STATEMENT="goto continue\n";Blockly.Lua.addContinueLabel=function(a){return-1 ("+d+") then\n")+(Blockly.Lua.INDENT+g+" = -"+g+"\n"),a+="end\n";return a+("for "+b+" = "+c+", "+d+", "+g)+(" do\n"+f+"end\n")}; Blockly.Lua.controls_forEach=function(a){var b=Blockly.Lua.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Lua.valueToCode(a,"LIST",Blockly.Lua.ORDER_NONE)||"{}";a=Blockly.Lua.statementToCode(a,"DO")||"\n";a=Blockly.Lua.addContinueLabel(a);return"for _, "+b+" in ipairs("+c+") do \n"+a+"end\n"}; Blockly.Lua.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break\n";case "CONTINUE":return Blockly.Lua.CONTINUE_STATEMENT}throw"Unknown flow statement.";};Blockly.Lua.math={};Blockly.Lua.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));return[a,0>a?Blockly.Lua.ORDER_UNARY:Blockly.Lua.ORDER_ATOMIC]}; -Blockly.Lua.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Lua.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Lua.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Lua.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Lua.ORDER_MULTIPLICATIVE],POWER:[" ^ ",Blockly.Lua.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Lua.valueToCode(a,"A",b)||"0";a=Blockly.Lua.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; +Blockly.Lua.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Lua.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Lua.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Lua.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Lua.ORDER_MULTIPLICATIVE],POWER:[" ^ ",Blockly.Lua.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0];b=b[1];var d=Blockly.Lua.valueToCode(a,"A",b)||"0";a=Blockly.Lua.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; Blockly.Lua.math_single=function(a){var b=a.getFieldValue("OP");if("NEG"==b)return a=Blockly.Lua.valueToCode(a,"NUM",Blockly.Lua.ORDER_UNARY)||"0",["-"+a,Blockly.Lua.ORDER_UNARY];a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Lua.valueToCode(a,"NUM",Blockly.Lua.ORDER_MULTIPLICATIVE)||"0":Blockly.Lua.valueToCode(a,"NUM",Blockly.Lua.ORDER_NONE)||"0";switch(b){case "ABS":b="math.abs("+a+")";break;case "ROOT":b="math.sqrt("+a+")";break;case "LN":b="math.log("+a+")";break;case "LOG10":b="math.log10("+a+")";break; case "EXP":b="math.exp("+a+")";break;case "POW10":b="math.pow(10,"+a+")";break;case "ROUND":b="math.floor("+a+" + .5)";break;case "ROUNDUP":b="math.ceil("+a+")";break;case "ROUNDDOWN":b="math.floor("+a+")";break;case "SIN":b="math.sin(math.rad("+a+"))";break;case "COS":b="math.cos(math.rad("+a+"))";break;case "TAN":b="math.tan(math.rad("+a+"))";break;case "ASIN":b="math.deg(math.asin("+a+"))";break;case "ACOS":b="math.deg(math.acos("+a+"))";break;case "ATAN":b="math.deg(math.atan("+a+"))";break;default:throw"Unknown math operator: "+ b;}return[b,Blockly.Lua.ORDER_HIGH]};Blockly.Lua.math_constant=function(a){return{PI:["math.pi",Blockly.Lua.ORDER_HIGH],E:["math.exp(1)",Blockly.Lua.ORDER_HIGH],GOLDEN_RATIO:["(1 + math.sqrt(5)) / 2",Blockly.Lua.ORDER_MULTIPLICATIVE],SQRT2:["math.sqrt(2)",Blockly.Lua.ORDER_HIGH],SQRT1_2:["math.sqrt(1 / 2)",Blockly.Lua.ORDER_HIGH],INFINITY:["math.huge",Blockly.Lua.ORDER_HIGH]}[a.getFieldValue("CONSTANT")]}; @@ -72,22 +54,22 @@ Blockly.Lua.math_on_list=function(a){function b(){return Blockly.Lua.provideFunc default:throw"Unknown operator: "+c;}return[c+"("+a+")",Blockly.Lua.ORDER_HIGH]};Blockly.Lua.math_modulo=function(a){var b=Blockly.Lua.valueToCode(a,"DIVIDEND",Blockly.Lua.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Lua.valueToCode(a,"DIVISOR",Blockly.Lua.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Lua.ORDER_MULTIPLICATIVE]}; Blockly.Lua.math_constrain=function(a){var b=Blockly.Lua.valueToCode(a,"VALUE",Blockly.Lua.ORDER_NONE)||"0",c=Blockly.Lua.valueToCode(a,"LOW",Blockly.Lua.ORDER_NONE)||"-math.huge";a=Blockly.Lua.valueToCode(a,"HIGH",Blockly.Lua.ORDER_NONE)||"math.huge";return["math.min(math.max("+b+", "+c+"), "+a+")",Blockly.Lua.ORDER_HIGH]}; Blockly.Lua.math_random_int=function(a){var b=Blockly.Lua.valueToCode(a,"FROM",Blockly.Lua.ORDER_NONE)||"0";a=Blockly.Lua.valueToCode(a,"TO",Blockly.Lua.ORDER_NONE)||"0";return["math.random("+b+", "+a+")",Blockly.Lua.ORDER_HIGH]};Blockly.Lua.math_random_float=function(a){return["math.random()",Blockly.Lua.ORDER_HIGH]};Blockly.Lua.procedures={}; -Blockly.Lua.procedures_defreturn=function(a){var b=Blockly.Lua.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE),c=Blockly.Lua.statementToCode(a,"STACK");Blockly.Lua.STATEMENT_PREFIX&&(c=Blockly.Lua.prefixLines(Blockly.Lua.STATEMENT_PREFIX.replace(/%1/g,"'"+a.id+"'"),Blockly.Lua.INDENT)+c);Blockly.Lua.INFINITE_LOOP_TRAP&&(c=Blockly.Lua.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+a.id+"'")+c);var d=Blockly.Lua.valueToCode(a,"RETURN",Blockly.Lua.ORDER_NONE)||"";d?d=" return "+d+"\n": -c||(c="");for(var e=[],f=0;f", - "lastupdated": "2017-07-31 17:25:19.178683", + "lastupdated": "2017-09-26 13:14:31.417792", "locale": "en", "messagedocumentation" : "qqq" }, diff --git a/msg/json/qqq.json b/msg/json/qqq.json index 69bf31f88..e701c323f 100644 --- a/msg/json/qqq.json +++ b/msg/json/qqq.json @@ -1,13 +1,4 @@ { - "@metadata": { - "authors": [ - "Espertus", - "Liuxinyu970226", - "Robby", - "Shirayuki", - "Metalhead64" - ] - }, "VARIABLES_DEFAULT_NAME": "default name - A simple, general default name for a variable, preferably short. For more context, see [[Translating:Blockly#infrequent_message_types]].\n{{Identical|Item}}", "TODAY": "button text - Button that sets a calendar to today's date.\n{{Identical|Today}}", "DUPLICATE_BLOCK": "context menu - Make a copy of the selected block (and any blocks it contains).\n{{Identical|Duplicate}}", @@ -246,7 +237,7 @@ "TEXT_GET_SUBSTRING_HELPURL": "url - Information about extracting characters from text. Reminder: urls are the lowest priority translations. Feel free to skip.", "TEXT_GET_SUBSTRING_INPUT_IN_TEXT": "block text - Precedes a piece of text from which a portion should be extracted. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_START_FROM_START": "dropdown - Indicates that the following number specifies the position (relative to the start position) of the beginning of the region of text that should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", - "TEXT_GET_SUBSTRING_START_FROM_END": "dropdown - Indicates that the following number specifies the position (relative to the end position) of the beginning of the region of text that should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. Note: If {{msg-blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will automatically appear ''after'' this and any other [https://translatewiki.net/wiki/Translating:Blockly#Ordinal_numbers ordinal numbers] on this block. [[File:Blockly-get-substring.png]]", + "TEXT_GET_SUBSTRING_START_FROM_END": "dropdown - Indicates that the following number specifies the position (relative to the end position) of the beginning of the region of text that should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. Note: If {{msg-Blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will automatically appear ''after'' this and any other [https://translatewiki.net/wiki/Translating:Blockly#Ordinal_numbers ordinal numbers] on this block. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_START_FIRST": "block text - Indicates that a region starting with the first letter of the preceding piece of text should be extracted. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_END_FROM_START": "dropdown - Indicates that the following number specifies the position (relative to the start position) of the end of the region of text that should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", "TEXT_GET_SUBSTRING_END_FROM_END": "dropdown - Indicates that the following number specifies the position (relative to the end position) of the end of the region of text that should be obtained from the preceding piece of text. See [https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text]. [[File:Blockly-get-substring.png]]", @@ -305,7 +296,7 @@ "LISTS_GET_INDEX_GET": "dropdown - Indicates that the user wishes to [https://github.com/google/blockly/wiki/Lists#getting-a-single-item get an item from a list] without removing it from the list.", "LISTS_GET_INDEX_GET_REMOVE": "dropdown - Indicates that the user wishes to [https://github.com/google/blockly/wiki/Lists#getting-a-single-item get and remove an item from a list], as opposed to merely getting it without modifying the list.", "LISTS_GET_INDEX_REMOVE": "dropdown - Indicates that the user wishes to [https://github.com/google/blockly/wiki/Lists#removing-an-item remove an item from a list].\n{{Identical|Remove}}", - "LISTS_GET_INDEX_FROM_START": "dropdown - Indicates that an index relative to the front of the list should be used to [https://github.com/google/blockly/wiki/Lists#getting-a-single-item get and/or remove an item from a list]. Note: If {{msg-blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will automatically appear ''after'' this number (and any other ordinal numbers on this block). See [[Translating:Blockly#Ordinal_numbers]] for more information on ordinal numbers in Blockly. [[File:Blockly-list-get-item.png]]", + "LISTS_GET_INDEX_FROM_START": "dropdown - Indicates that an index relative to the front of the list should be used to [https://github.com/google/blockly/wiki/Lists#getting-a-single-item get and/or remove an item from a list]. Note: If {{msg-Blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will automatically appear ''after'' this number (and any other ordinal numbers on this block). See [[Translating:Blockly#Ordinal_numbers]] for more information on ordinal numbers in Blockly. [[File:Blockly-list-get-item.png]]", "LISTS_GET_INDEX_FROM_END": "dropdown - Indicates that an index relative to the end of the list should be used to [https://github.com/google/blockly/wiki/Lists#getting-a-single-item access an item in a list]. [[File:Blockly-list-get-item.png]]", "LISTS_GET_INDEX_FIRST": "dropdown - Indicates that the '''first''' item should be [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list]. [[File:Blockly-list-get-item.png]]", "LISTS_GET_INDEX_LAST": "dropdown - Indicates that the '''last''' item should be [https://github.com/google/blockly/wiki/Lists#getting-a-single-item accessed in a list]. [[File:Blockly-list-get-item.png]]", @@ -338,7 +329,7 @@ "LISTS_SET_INDEX_TOOLTIP_INSERT_LAST": "tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the 'get' block, the idea is the same for the 'insert' block).", "LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM": "tooltip - See [https://github.com/google/blockly/wiki/Lists#getting-a-single-item} (even though the page describes the 'get' block, the idea is the same for the 'insert' block).", "LISTS_GET_SUBLIST_HELPURL": "url - Information describing extracting a sublist from an existing list.", - "LISTS_GET_SUBLIST_START_FROM_START": "dropdown - Indicates that an index relative to the front of the list should be used to specify the beginning of the range from which to [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist]. [[File:Blockly-get-sublist.png]] Note: If {{msg-blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will automatically appear ''after'' this number (and any other ordinal numbers on this block). See [[Translating:Blockly#Ordinal_numbers]] for more information on ordinal numbers in Blockly.", + "LISTS_GET_SUBLIST_START_FROM_START": "dropdown - Indicates that an index relative to the front of the list should be used to specify the beginning of the range from which to [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist]. [[File:Blockly-get-sublist.png]] Note: If {{msg-Blockly|ORDINAL_NUMBER_SUFFIX}} is defined, it will automatically appear ''after'' this number (and any other ordinal numbers on this block). See [[Translating:Blockly#Ordinal_numbers]] for more information on ordinal numbers in Blockly.", "LISTS_GET_SUBLIST_START_FROM_END": "dropdown - Indicates that an index relative to the end of the list should be used to specify the beginning of the range from which to [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist].", "LISTS_GET_SUBLIST_START_FIRST": "dropdown - Indicates that the [https://github.com/google/blockly/wiki/Lists#getting-a-sublist sublist to extract] should begin with the list's first item.", "LISTS_GET_SUBLIST_END_FROM_START": "dropdown - Indicates that an index relative to the front of the list should be used to specify the end of the range from which to [https://github.com/google/blockly/wiki/Lists#getting-a-sublist get a sublist]. [[File:Blockly-get-sublist.png]]", diff --git a/php_compressed.js b/php_compressed.js index bbf2eecbe..1868473f4 100644 --- a/php_compressed.js +++ b/php_compressed.js @@ -1,25 +1,7 @@ // Do not edit this file; automatically generated by build.py. 'use strict'; -/* - Visual Blocks Language - - Copyright 2015 Google Inc. - https://developers.google.com/blockly/ - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ Blockly.PHP=new Blockly.Generator("PHP");Blockly.PHP.addReservedWords("__halt_compiler,abstract,and,array,as,break,callable,case,catch,class,clone,const,continue,declare,default,die,do,echo,else,elseif,empty,enddeclare,endfor,endforeach,endif,endswitch,endwhile,eval,exit,extends,final,for,foreach,function,global,goto,if,implements,include,include_once,instanceof,insteadof,interface,isset,list,namespace,new,or,print,private,protected,public,require,require_once,return,static,switch,throw,trait,try,unset,use,var,while,xor,PHP_VERSION,PHP_MAJOR_VERSION,PHP_MINOR_VERSION,PHP_RELEASE_VERSION,PHP_VERSION_ID,PHP_EXTRA_VERSION,PHP_ZTS,PHP_DEBUG,PHP_MAXPATHLEN,PHP_OS,PHP_SAPI,PHP_EOL,PHP_INT_MAX,PHP_INT_SIZE,DEFAULT_INCLUDE_PATH,PEAR_INSTALL_DIR,PEAR_EXTENSION_DIR,PHP_EXTENSION_DIR,PHP_PREFIX,PHP_BINDIR,PHP_BINARY,PHP_MANDIR,PHP_LIBDIR,PHP_DATADIR,PHP_SYSCONFDIR,PHP_LOCALSTATEDIR,PHP_CONFIG_FILE_PATH,PHP_CONFIG_FILE_SCAN_DIR,PHP_SHLIB_SUFFIX,E_ERROR,E_WARNING,E_PARSE,E_NOTICE,E_CORE_ERROR,E_CORE_WARNING,E_COMPILE_ERROR,E_COMPILE_WARNING,E_USER_ERROR,E_USER_WARNING,E_USER_NOTICE,E_DEPRECATED,E_USER_DEPRECATED,E_ALL,E_STRICT,__COMPILER_HALT_OFFSET__,TRUE,FALSE,NULL,__CLASS__,__DIR__,__FILE__,__FUNCTION__,__LINE__,__METHOD__,__NAMESPACE__,__TRAIT__"); Blockly.PHP.ORDER_ATOMIC=0;Blockly.PHP.ORDER_CLONE=1;Blockly.PHP.ORDER_NEW=1;Blockly.PHP.ORDER_MEMBER=2.1;Blockly.PHP.ORDER_FUNCTION_CALL=2.2;Blockly.PHP.ORDER_POWER=3;Blockly.PHP.ORDER_INCREMENT=4;Blockly.PHP.ORDER_DECREMENT=4;Blockly.PHP.ORDER_BITWISE_NOT=4;Blockly.PHP.ORDER_CAST=4;Blockly.PHP.ORDER_SUPPRESS_ERROR=4;Blockly.PHP.ORDER_INSTANCEOF=5;Blockly.PHP.ORDER_LOGICAL_NOT=6;Blockly.PHP.ORDER_UNARY_PLUS=7.1;Blockly.PHP.ORDER_UNARY_NEGATION=7.2;Blockly.PHP.ORDER_MULTIPLICATION=8.1; Blockly.PHP.ORDER_DIVISION=8.2;Blockly.PHP.ORDER_MODULUS=8.3;Blockly.PHP.ORDER_ADDITION=9.1;Blockly.PHP.ORDER_SUBTRACTION=9.2;Blockly.PHP.ORDER_STRING_CONCAT=9.3;Blockly.PHP.ORDER_BITWISE_SHIFT=10;Blockly.PHP.ORDER_RELATIONAL=11;Blockly.PHP.ORDER_EQUALITY=12;Blockly.PHP.ORDER_REFERENCE=13;Blockly.PHP.ORDER_BITWISE_AND=13;Blockly.PHP.ORDER_BITWISE_XOR=14;Blockly.PHP.ORDER_BITWISE_OR=15;Blockly.PHP.ORDER_LOGICAL_AND=16;Blockly.PHP.ORDER_LOGICAL_OR=17;Blockly.PHP.ORDER_IF_NULL=18; @@ -38,7 +20,7 @@ Blockly.PHP.colour_blend=function(a){var b=Blockly.PHP.valueToCode(a,"COLOUR1",B Blockly.PHP.lists_repeat=function(a){var b=Blockly.PHP.provideFunction_("lists_repeat",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($value, $count) {"," $array = array();"," for ($index = 0; $index < $count; $index++) {"," $array[] = $value;"," }"," return $array;","}"]),c=Blockly.PHP.valueToCode(a,"ITEM",Blockly.PHP.ORDER_COMMA)||"null";a=Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_COMMA)||"0";return[b+"("+c+", "+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]}; Blockly.PHP.lists_length=function(a){var b=Blockly.PHP.provideFunction_("length",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($value) {"," if (is_string($value)) {"," return strlen($value);"," } else {"," return count($value);"," }","}"]);a=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"''";return[b+"("+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]}; Blockly.PHP.lists_isEmpty=function(a){return["empty("+(Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_FUNCTION_CALL)||"array()")+")",Blockly.PHP.ORDER_FUNCTION_CALL]}; -Blockly.PHP.lists_indexOf=function(a){var b=Blockly.PHP.valueToCode(a,"FIND",Blockly.PHP.ORDER_NONE)||"''",c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_MEMBER)||"[]";if(a.workspace.options.oneBasedIndex){var d=" 0";var e=" + 1"}else d=" -1",e="";return[("FIRST"==a.getFieldValue("END")?Blockly.PHP.provideFunction_("indexOf",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($haystack, $needle) {"," for ($index = 0; $index < count($haystack); $index++) {"," if ($haystack[$index] == $needle) return $index"+ +Blockly.PHP.lists_indexOf=function(a){var b=Blockly.PHP.valueToCode(a,"FIND",Blockly.PHP.ORDER_NONE)||"''",c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_MEMBER)||"[]";if(a.workspace.options.oneBasedIndex)var d=" 0",e=" + 1";else d=" -1",e="";return[("FIRST"==a.getFieldValue("END")?Blockly.PHP.provideFunction_("indexOf",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($haystack, $needle) {"," for ($index = 0; $index < count($haystack); $index++) {"," if ($haystack[$index] == $needle) return $index"+ e+";"," }"," return "+d+";","}"]):Blockly.PHP.provideFunction_("lastIndexOf",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($haystack, $needle) {"," $last = "+d+";"," for ($index = 0; $index < count($haystack); $index++) {"," if ($haystack[$index] == $needle) $last = $index"+e+";"," }"," return $last;","}"]))+"("+c+", "+b+")",Blockly.PHP.ORDER_FUNCTION_CALL]}; Blockly.PHP.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET";switch(a.getFieldValue("WHERE")||"FROM_START"){case "FIRST":if("GET"==b){var c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_MEMBER)||"array()";return[c+"[0]",Blockly.PHP.ORDER_MEMBER]}if("GET_REMOVE"==b)return c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"array()",["array_shift("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)|| "array()","array_shift("+c+");\n";break;case "LAST":if("GET"==b)return c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"array()",["end("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL];if("GET_REMOVE"==b)return c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"array()",["array_pop("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"array()","array_pop("+c+");\n";break;case "FROM_START":var d=Blockly.PHP.getAdjusted(a, @@ -46,29 +28,29 @@ Blockly.PHP.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET";swit "VALUE",Blockly.PHP.ORDER_COMMA)||"array()",d=Blockly.PHP.getAdjusted(a,"AT",1,!0),["array_slice("+c+", "+d+", 1)[0]",Blockly.PHP.ORDER_FUNCTION_CALL];if("GET_REMOVE"==b||"REMOVE"==b){c=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_NONE)||"array()";d=Blockly.PHP.getAdjusted(a,"AT",1,!1,Blockly.PHP.ORDER_SUBTRACTION);c="array_splice("+c+", count("+c+") - "+d+", 1)[0]";if("GET_REMOVE"==b)return[c,Blockly.PHP.ORDER_FUNCTION_CALL];if("REMOVE"==b)return c+";\n"}break;case "RANDOM":c=Blockly.PHP.valueToCode(a, "VALUE",Blockly.PHP.ORDER_NONE)||"array()";if("GET"==b)return b=Blockly.PHP.provideFunction_("lists_get_random_item",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($list) {"," return $list[rand(0,count($list)-1)];","}"]),[b+"("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL];if("GET_REMOVE"==b)return b=Blockly.PHP.provideFunction_("lists_get_remove_random_item",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list) {"," $x = rand(0,count($list)-1);"," unset($list[$x]);"," return array_values($list);", "}"]),[b+"("+c+")",Blockly.PHP.ORDER_FUNCTION_CALL];if("REMOVE"==b)return b=Blockly.PHP.provideFunction_("lists_remove_random_item",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list) {"," unset($list[rand(0,count($list)-1)]);","}"]),b+"("+c+");\n"}throw"Unhandled combination (lists_getIndex).";}; -Blockly.PHP.lists_setIndex=function(a){var b=a.getFieldValue("MODE")||"GET";var c=a.getFieldValue("WHERE")||"FROM_START";var d=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_ASSIGNMENT)||"null";switch(c){case "FIRST":if("SET"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_MEMBER)||"array()",c+"[0] = "+d+";\n";if("INSERT"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()","array_unshift("+c+", "+d+");\n";break;case "LAST":c=Blockly.PHP.valueToCode(a, -"LIST",Blockly.PHP.ORDER_COMMA)||"array()";if("SET"==b)return b=Blockly.PHP.provideFunction_("lists_set_last_item",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $value) {"," $list[count($list) - 1] = $value;","}"]),b+"("+c+", "+d+");\n";if("INSERT"==b)return"array_push("+c+", "+d+");\n";break;case "FROM_START":var e=Blockly.PHP.getAdjusted(a,"AT");if("SET"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_MEMBER)||"array()",c+"["+e+"] = "+d+";\n";if("INSERT"==b)return c= -Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()","array_splice("+c+", "+e+", 0, "+d+");\n";break;case "FROM_END":c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()";e=Blockly.PHP.getAdjusted(a,"AT",1);if("SET"==b)return b=Blockly.PHP.provideFunction_("lists_set_from_end",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $at, $value) {"," $list[count($list) - $at] = $value;","}"]),b+"("+c+", "+e+", "+d+");\n";if("INSERT"==b)return b=Blockly.PHP.provideFunction_("lists_insert_from_end", +Blockly.PHP.lists_setIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a.getFieldValue("WHERE")||"FROM_START",d=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_ASSIGNMENT)||"null";switch(c){case "FIRST":if("SET"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_MEMBER)||"array()",c+"[0] = "+d+";\n";if("INSERT"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()","array_unshift("+c+", "+d+");\n";break;case "LAST":c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)|| +"array()";if("SET"==b)return b=Blockly.PHP.provideFunction_("lists_set_last_item",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $value) {"," $list[count($list) - 1] = $value;","}"]),b+"("+c+", "+d+");\n";if("INSERT"==b)return"array_push("+c+", "+d+");\n";break;case "FROM_START":var e=Blockly.PHP.getAdjusted(a,"AT");if("SET"==b)return c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_MEMBER)||"array()",c+"["+e+"] = "+d+";\n";if("INSERT"==b)return c=Blockly.PHP.valueToCode(a,"LIST", +Blockly.PHP.ORDER_COMMA)||"array()","array_splice("+c+", "+e+", 0, "+d+");\n";break;case "FROM_END":c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()";e=Blockly.PHP.getAdjusted(a,"AT",1);if("SET"==b)return b=Blockly.PHP.provideFunction_("lists_set_from_end",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $at, $value) {"," $list[count($list) - $at] = $value;","}"]),b+"("+c+", "+e+", "+d+");\n";if("INSERT"==b)return b=Blockly.PHP.provideFunction_("lists_insert_from_end", ["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $at, $value) {"," return array_splice($list, count($list) - $at, 0, $value);","}"]),b+"("+c+", "+e+", "+d+");\n";break;case "RANDOM":c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_REFERENCE)||"array()";c.match(/^\$\w+$/)?a="":(a=Blockly.PHP.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),e=a+" = &"+c+";\n",c=a,a=e);e=Blockly.PHP.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);a+=e+" = rand(0, count("+ c+")-1);\n";if("SET"==b)return a+(c+"["+e+"] = "+d+";\n");if("INSERT"==b)return a+("array_splice("+c+", "+e+", 0, "+d+");\n")}throw"Unhandled combination (lists_setIndex).";}; -Blockly.PHP.lists_getSublist=function(a){var b=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()";var c=a.getFieldValue("WHERE1");var d=a.getFieldValue("WHERE2");if("FIRST"==c&&"LAST"==d)var e=b;else if(b.match(/^\$\w+$/)||"FROM_END"!=c&&"FROM_START"==d){switch(c){case "FROM_START":e=Blockly.PHP.getAdjusted(a,"AT1");break;case "FROM_END":e=Blockly.PHP.getAdjusted(a,"AT1",1,!1,Blockly.PHP.ORDER_SUBTRACTION);e="count("+b+") - "+e;break;case "FIRST":e="0";break;default:throw"Unhandled option (lists_getSublist)."; +Blockly.PHP.lists_getSublist=function(a){var b=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2");if("FIRST"!=c||"LAST"!=d)if(b.match(/^\$\w+$/)||"FROM_END"!=c&&"FROM_START"==d){switch(c){case "FROM_START":var e=Blockly.PHP.getAdjusted(a,"AT1");break;case "FROM_END":e=Blockly.PHP.getAdjusted(a,"AT1",1,!1,Blockly.PHP.ORDER_SUBTRACTION);e="count("+b+") - "+e;break;case "FIRST":e="0";break;default:throw"Unhandled option (lists_getSublist)."; }switch(d){case "FROM_START":a=Blockly.PHP.getAdjusted(a,"AT2",0,!1,Blockly.PHP.ORDER_SUBTRACTION);c=a+" - ";c=Blockly.isNumber(String(e))||String(e).match(/^\(.+\)$/)?c+e:c+("("+e+")");c+=" + 1";break;case "FROM_END":a=Blockly.PHP.getAdjusted(a,"AT2",0,!1,Blockly.PHP.ORDER_SUBTRACTION);c="count("+b+") - "+a+" - ";c=Blockly.isNumber(String(e))||String(e).match(/^\(.+\)$/)?c+e:c+("("+e+")");break;case "LAST":c="count("+b+") - ";c=Blockly.isNumber(String(e))||String(e).match(/^\(.+\)$/)?c+e:c+("("+ -e+")");break;default:throw"Unhandled option (lists_getSublist).";}e="array_slice("+b+", "+e+", "+c+")"}else e=Blockly.PHP.getAdjusted(a,"AT1"),a=Blockly.PHP.getAdjusted(a,"AT2"),e=Blockly.PHP.provideFunction_("lists_get_sublist",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($list, $where1, $at1, $where2, $at2) {"," if ($where1 == 'FROM_END') {"," $at1 = count($list) - 1 - $at1;"," } else if ($where1 == 'FIRST') {"," $at1 = 0;"," } else if ($where1 != 'FROM_START'){"," throw new Exception('Unhandled option (lists_get_sublist).');", -" }"," $length = 0;"," if ($where2 == 'FROM_START') {"," $length = $at2 - $at1 + 1;"," } else if ($where2 == 'FROM_END') {"," $length = count($list) - $at1 - $at2;"," } else if ($where2 == 'LAST') {"," $length = count($list) - $at1;"," } else {"," throw new Exception('Unhandled option (lists_get_sublist).');"," }"," return array_slice($list, $at1, $length);","}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+a+")";return[e,Blockly.PHP.ORDER_FUNCTION_CALL]}; +e+")");break;default:throw"Unhandled option (lists_getSublist).";}b="array_slice("+b+", "+e+", "+c+")"}else e=Blockly.PHP.getAdjusted(a,"AT1"),a=Blockly.PHP.getAdjusted(a,"AT2"),b=Blockly.PHP.provideFunction_("lists_get_sublist",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($list, $where1, $at1, $where2, $at2) {"," if ($where1 == 'FROM_END') {"," $at1 = count($list) - 1 - $at1;"," } else if ($where1 == 'FIRST') {"," $at1 = 0;"," } else if ($where1 != 'FROM_START'){"," throw new Exception('Unhandled option (lists_get_sublist).');", +" }"," $length = 0;"," if ($where2 == 'FROM_START') {"," $length = $at2 - $at1 + 1;"," } else if ($where2 == 'FROM_END') {"," $length = count($list) - $at1 - $at2;"," } else if ($where2 == 'LAST') {"," $length = count($list) - $at1;"," } else {"," throw new Exception('Unhandled option (lists_get_sublist).');"," }"," return array_slice($list, $at1, $length);","}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+a+")";return[b,Blockly.PHP.ORDER_FUNCTION_CALL]}; Blockly.PHP.lists_sort=function(a){var b=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"array()",c="1"===a.getFieldValue("DIRECTION")?1:-1;a=a.getFieldValue("TYPE");return[Blockly.PHP.provideFunction_("lists_sort",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($list, $type, $direction) {"," $sortCmpFuncs = array(",' "NUMERIC" => "strnatcasecmp",',' "TEXT" => "strcmp",',' "IGNORE_CASE" => "strcasecmp"'," );"," $sortCmp = $sortCmpFuncs[$type];"," $list2 = $list;"," usort($list2, $sortCmp);", " if ($direction == -1) {"," $list2 = array_reverse($list2);"," }"," return $list2;","}"])+"("+b+', "'+a+'", '+c+")",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.lists_split=function(a){var b=Blockly.PHP.valueToCode(a,"INPUT",Blockly.PHP.ORDER_COMMA),c=Blockly.PHP.valueToCode(a,"DELIM",Blockly.PHP.ORDER_COMMA)||"''";a=a.getFieldValue("MODE");if("SPLIT"==a)b||(b="''"),a="explode";else if("JOIN"==a)b||(b="array()"),a="implode";else throw"Unknown mode: "+a;return[a+"("+c+", "+b+")",Blockly.PHP.ORDER_FUNCTION_CALL]}; Blockly.PHP.lists_reverse=function(a){return["array_reverse("+(Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_COMMA)||"[]")+")",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.logic={};Blockly.PHP.controls_if=function(a){var b=0,c="";do{var d=Blockly.PHP.valueToCode(a,"IF"+b,Blockly.PHP.ORDER_NONE)||"false";var e=Blockly.PHP.statementToCode(a,"DO"+b);c+=(0",GTE:">="}[a.getFieldValue("OP")],c="=="==b||"!="==b?Blockly.PHP.ORDER_EQUALITY:Blockly.PHP.ORDER_RELATIONAL,d=Blockly.PHP.valueToCode(a,"A",c)||"0";a=Blockly.PHP.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]}; Blockly.PHP.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"&&":"||",c="&&"==b?Blockly.PHP.ORDER_LOGICAL_AND:Blockly.PHP.ORDER_LOGICAL_OR,d=Blockly.PHP.valueToCode(a,"A",c);a=Blockly.PHP.valueToCode(a,"B",c);if(d||a){var e="&&"==b?"true":"false";d||(d=e);a||(a=e)}else a=d="false";return[d+" "+b+" "+a,c]};Blockly.PHP.logic_negate=function(a){var b=Blockly.PHP.ORDER_LOGICAL_NOT;return["!"+(Blockly.PHP.valueToCode(a,"BOOL",b)||"true"),b]}; Blockly.PHP.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"true":"false",Blockly.PHP.ORDER_ATOMIC]};Blockly.PHP.logic_null=function(a){return["null",Blockly.PHP.ORDER_ATOMIC]};Blockly.PHP.logic_ternary=function(a){var b=Blockly.PHP.valueToCode(a,"IF",Blockly.PHP.ORDER_CONDITIONAL)||"false",c=Blockly.PHP.valueToCode(a,"THEN",Blockly.PHP.ORDER_CONDITIONAL)||"null";a=Blockly.PHP.valueToCode(a,"ELSE",Blockly.PHP.ORDER_CONDITIONAL)||"null";return[b+" ? "+c+" : "+a,Blockly.PHP.ORDER_CONDITIONAL]};Blockly.PHP.loops={}; -Blockly.PHP.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.PHP.valueToCode(a,"TIMES",Blockly.PHP.ORDER_ASSIGNMENT)||"0";var c=Blockly.PHP.statementToCode(a,"DO"),c=Blockly.PHP.addLoopTrap(c,a.id),d="",e=Blockly.PHP.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE);a=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(a=Blockly.PHP.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE),d+=a+" = "+b+";\n");return d+("for ("+ -e+" = 0; "+e+" < "+a+"; "+e+"++) {\n"+c+"}\n")};Blockly.PHP.controls_repeat=Blockly.PHP.controls_repeat_ext;Blockly.PHP.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.PHP.valueToCode(a,"BOOL",b?Blockly.PHP.ORDER_LOGICAL_NOT:Blockly.PHP.ORDER_NONE)||"false",d=Blockly.PHP.statementToCode(a,"DO"),d=Blockly.PHP.addLoopTrap(d,a.id);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"}; -Blockly.PHP.controls_for=function(a){var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE);var c=Blockly.PHP.valueToCode(a,"FROM",Blockly.PHP.ORDER_ASSIGNMENT)||"0";var d=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_ASSIGNMENT)||"0",e=Blockly.PHP.valueToCode(a,"BY",Blockly.PHP.ORDER_ASSIGNMENT)||"1",g=Blockly.PHP.statementToCode(a,"DO"),g=Blockly.PHP.addLoopTrap(g,a.id);if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var f=parseFloat(c)<=parseFloat(d); +Blockly.PHP.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Number(a.getFieldValue("TIMES"))):Blockly.PHP.valueToCode(a,"TIMES",Blockly.PHP.ORDER_ASSIGNMENT)||"0",c=Blockly.PHP.statementToCode(a,"DO");c=Blockly.PHP.addLoopTrap(c,a.id);a="";var d=Blockly.PHP.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE),e=b;b.match(/^\w+$/)||Blockly.isNumber(b)||(e=Blockly.PHP.variableDB_.getDistinctName("repeat_end",Blockly.Variables.NAME_TYPE),a+=e+" = "+b+";\n");return a+("for ("+ +d+" = 0; "+d+" < "+e+"; "+d+"++) {\n"+c+"}\n")};Blockly.PHP.controls_repeat=Blockly.PHP.controls_repeat_ext;Blockly.PHP.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.PHP.valueToCode(a,"BOOL",b?Blockly.PHP.ORDER_LOGICAL_NOT:Blockly.PHP.ORDER_NONE)||"false",d=Blockly.PHP.statementToCode(a,"DO");d=Blockly.PHP.addLoopTrap(d,a.id);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"}; +Blockly.PHP.controls_for=function(a){var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.PHP.valueToCode(a,"FROM",Blockly.PHP.ORDER_ASSIGNMENT)||"0",d=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_ASSIGNMENT)||"0",e=Blockly.PHP.valueToCode(a,"BY",Blockly.PHP.ORDER_ASSIGNMENT)||"1",g=Blockly.PHP.statementToCode(a,"DO");g=Blockly.PHP.addLoopTrap(g,a.id);if(Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)){var f=parseFloat(c)<=parseFloat(d); a="for ("+b+" = "+c+"; "+b+(f?" <= ":" >= ")+d+"; "+b;b=Math.abs(parseFloat(e));a=(1==b?a+(f?"++":"--"):a+((f?" += ":" -= ")+b))+(") {\n"+g+"}\n")}else a="",f=c,c.match(/^\w+$/)||Blockly.isNumber(c)||(f=Blockly.PHP.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+=f+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.PHP.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),a+=c+" = "+d+";\n"),d=Blockly.PHP.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE), a+=d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("abs("+e+");\n"),a=a+("if ("+f+" > "+c+") {\n")+(Blockly.PHP.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+f+"; "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+"; "+b+" += "+d+") {\n"+g+"}\n";return a}; -Blockly.PHP.controls_forEach=function(a){var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_ASSIGNMENT)||"[]",d=Blockly.PHP.statementToCode(a,"DO"),d=Blockly.PHP.addLoopTrap(d,a.id);return""+("foreach ("+c+" as "+b+") {\n"+d+"}\n")}; +Blockly.PHP.controls_forEach=function(a){var b=Blockly.PHP.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_ASSIGNMENT)||"[]",d=Blockly.PHP.statementToCode(a,"DO");d=Blockly.PHP.addLoopTrap(d,a.id);return""+("foreach ("+c+" as "+b+") {\n"+d+"}\n")}; Blockly.PHP.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.PHP.math={};Blockly.PHP.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));Infinity==a?a="INF":-Infinity==a&&(a="-INF");return[a,Blockly.PHP.ORDER_ATOMIC]}; -Blockly.PHP.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.PHP.ORDER_ADDITION],MINUS:[" - ",Blockly.PHP.ORDER_SUBTRACTION],MULTIPLY:[" * ",Blockly.PHP.ORDER_MULTIPLICATION],DIVIDE:[" / ",Blockly.PHP.ORDER_DIVISION],POWER:[" ** ",Blockly.PHP.ORDER_POWER]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.PHP.valueToCode(a,"A",b)||"0";a=Blockly.PHP.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; +Blockly.PHP.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.PHP.ORDER_ADDITION],MINUS:[" - ",Blockly.PHP.ORDER_SUBTRACTION],MULTIPLY:[" * ",Blockly.PHP.ORDER_MULTIPLICATION],DIVIDE:[" / ",Blockly.PHP.ORDER_DIVISION],POWER:[" ** ",Blockly.PHP.ORDER_POWER]}[a.getFieldValue("OP")],c=b[0];b=b[1];var d=Blockly.PHP.valueToCode(a,"A",b)||"0";a=Blockly.PHP.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; Blockly.PHP.math_single=function(a){var b=a.getFieldValue("OP");if("NEG"==b)return a=Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_UNARY_NEGATION)||"0","-"==a[0]&&(a=" "+a),["-"+a,Blockly.PHP.ORDER_UNARY_NEGATION];a="SIN"==b||"COS"==b||"TAN"==b?Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_DIVISION)||"0":Blockly.PHP.valueToCode(a,"NUM",Blockly.PHP.ORDER_NONE)||"0";switch(b){case "ABS":var c="abs("+a+")";break;case "ROOT":c="sqrt("+a+")";break;case "LN":c="log("+a+")";break;case "EXP":c="exp("+ a+")";break;case "POW10":c="pow(10,"+a+")";break;case "ROUND":c="round("+a+")";break;case "ROUNDUP":c="ceil("+a+")";break;case "ROUNDDOWN":c="floor("+a+")";break;case "SIN":c="sin("+a+" / 180 * pi())";break;case "COS":c="cos("+a+" / 180 * pi())";break;case "TAN":c="tan("+a+" / 180 * pi())"}if(c)return[c,Blockly.PHP.ORDER_FUNCTION_CALL];switch(b){case "LOG10":c="log("+a+") / log(10)";break;case "ASIN":c="asin("+a+") / pi() * 180";break;case "ACOS":c="acos("+a+") / pi() * 180";break;case "ATAN":c="atan("+ a+") / pi() * 180";break;default:throw"Unknown math operator: "+b;}return[c,Blockly.PHP.ORDER_DIVISION]};Blockly.PHP.math_constant=function(a){return{PI:["M_PI",Blockly.PHP.ORDER_ATOMIC],E:["M_E",Blockly.PHP.ORDER_ATOMIC],GOLDEN_RATIO:["(1 + sqrt(5)) / 2",Blockly.PHP.ORDER_DIVISION],SQRT2:["M_SQRT2",Blockly.PHP.ORDER_ATOMIC],SQRT1_2:["M_SQRT1_2",Blockly.PHP.ORDER_ATOMIC],INFINITY:["INF",Blockly.PHP.ORDER_ATOMIC]}[a.getFieldValue("CONSTANT")]}; @@ -83,21 +65,21 @@ Blockly.PHP.math_on_list=function(a){var b=a.getFieldValue("OP");switch(b){case Blockly.PHP.math_constrain=function(a){var b=Blockly.PHP.valueToCode(a,"VALUE",Blockly.PHP.ORDER_COMMA)||"0",c=Blockly.PHP.valueToCode(a,"LOW",Blockly.PHP.ORDER_COMMA)||"0";a=Blockly.PHP.valueToCode(a,"HIGH",Blockly.PHP.ORDER_COMMA)||"Infinity";return["min(max("+b+", "+c+"), "+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]}; Blockly.PHP.math_random_int=function(a){var b=Blockly.PHP.valueToCode(a,"FROM",Blockly.PHP.ORDER_COMMA)||"0";a=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_COMMA)||"0";return[Blockly.PHP.provideFunction_("math_random_int",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($a, $b) {"," if ($a > $b) {"," return rand($b, $a);"," }"," return rand($a, $b);","}"])+"("+b+", "+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]}; Blockly.PHP.math_random_float=function(a){return["(float)rand()/(float)getrandmax()",Blockly.PHP.ORDER_FUNCTION_CALL]};Blockly.PHP.procedures={}; -Blockly.PHP.procedures_defreturn=function(a){for(var b=[],c,d=a.workspace.getAllVariables()||[],e=0;c=d[e];e++)c=c.name,-1==a.arguments_.indexOf(c)&&b.push(Blockly.PHP.variableDB_.getName(c,Blockly.Variables.NAME_TYPE));b=b.length?" global "+b.join(", ")+";\n":"";d=Blockly.PHP.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE);c=Blockly.PHP.statementToCode(a,"STACK");Blockly.PHP.STATEMENT_PREFIX&&(c=Blockly.PHP.prefixLines(Blockly.PHP.STATEMENT_PREFIX.replace(/%1/g,"'"+a.id+ -"'"),Blockly.PHP.INDENT)+c);Blockly.PHP.INFINITE_LOOP_TRAP&&(c=Blockly.PHP.INFINITE_LOOP_TRAP.replace(/%1/g,"'"+a.id+"'")+c);var g=Blockly.PHP.valueToCode(a,"RETURN",Blockly.PHP.ORDER_NONE)||"";g&&(g=" return "+g+";\n");for(var f=[],e=0;e",GTE:">="}[a.getFieldValue("OP")],c=Blockly.Python.ORDER_RELATIONAL,d=Blockly.Python.valueToCode(a,"A",c)||"0";a=Blockly.Python.valueToCode(a,"B",c)||"0";return[d+" "+b+" "+a,c]}; Blockly.Python.logic_operation=function(a){var b="AND"==a.getFieldValue("OP")?"and":"or",c="and"==b?Blockly.Python.ORDER_LOGICAL_AND:Blockly.Python.ORDER_LOGICAL_OR,d=Blockly.Python.valueToCode(a,"A",c);a=Blockly.Python.valueToCode(a,"B",c);if(d||a){var e="and"==b?"True":"False";d||(d=e);a||(a=e)}else a=d="False";return[d+" "+b+" "+a,c]};Blockly.Python.logic_negate=function(a){return["not "+(Blockly.Python.valueToCode(a,"BOOL",Blockly.Python.ORDER_LOGICAL_NOT)||"True"),Blockly.Python.ORDER_LOGICAL_NOT]}; Blockly.Python.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"True":"False",Blockly.Python.ORDER_ATOMIC]};Blockly.Python.logic_null=function(a){return["None",Blockly.Python.ORDER_ATOMIC]}; -Blockly.Python.logic_ternary=function(a){var b=Blockly.Python.valueToCode(a,"IF",Blockly.Python.ORDER_CONDITIONAL)||"False",c=Blockly.Python.valueToCode(a,"THEN",Blockly.Python.ORDER_CONDITIONAL)||"None";a=Blockly.Python.valueToCode(a,"ELSE",Blockly.Python.ORDER_CONDITIONAL)||"None";return[c+" if "+b+" else "+a,Blockly.Python.ORDER_CONDITIONAL]};Blockly.Python.loops={};Blockly.Python.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(parseInt(a.getFieldValue("TIMES"),10)):Blockly.Python.valueToCode(a,"TIMES",Blockly.Python.ORDER_NONE)||"0";b=Blockly.isNumber(b)?parseInt(b,10):"int("+b+")";var c=Blockly.Python.statementToCode(a,"DO"),c=Blockly.Python.addLoopTrap(c,a.id)||Blockly.Python.PASS;return"for "+Blockly.Python.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE)+" in range("+b+"):\n"+c}; -Blockly.Python.controls_repeat=Blockly.Python.controls_repeat_ext;Blockly.Python.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Python.valueToCode(a,"BOOL",b?Blockly.Python.ORDER_LOGICAL_NOT:Blockly.Python.ORDER_NONE)||"False",d=Blockly.Python.statementToCode(a,"DO"),d=Blockly.Python.addLoopTrap(d,a.id)||Blockly.Python.PASS;b&&(c="not "+c);return"while "+c+":\n"+d}; -Blockly.Python.controls_for=function(a){var b=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Python.valueToCode(a,"FROM",Blockly.Python.ORDER_NONE)||"0",d=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"0",e=Blockly.Python.valueToCode(a,"BY",Blockly.Python.ORDER_NONE)||"1",f=Blockly.Python.statementToCode(a,"DO"),f=Blockly.Python.addLoopTrap(f,a.id)||Blockly.Python.PASS,g="",h=function(){return Blockly.Python.provideFunction_("upRange", +Blockly.Python.logic_ternary=function(a){var b=Blockly.Python.valueToCode(a,"IF",Blockly.Python.ORDER_CONDITIONAL)||"False",c=Blockly.Python.valueToCode(a,"THEN",Blockly.Python.ORDER_CONDITIONAL)||"None";a=Blockly.Python.valueToCode(a,"ELSE",Blockly.Python.ORDER_CONDITIONAL)||"None";return[c+" if "+b+" else "+a,Blockly.Python.ORDER_CONDITIONAL]};Blockly.Python.loops={};Blockly.Python.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(parseInt(a.getFieldValue("TIMES"),10)):Blockly.Python.valueToCode(a,"TIMES",Blockly.Python.ORDER_NONE)||"0";b=Blockly.isNumber(b)?parseInt(b,10):"int("+b+")";var c=Blockly.Python.statementToCode(a,"DO");c=Blockly.Python.addLoopTrap(c,a.id)||Blockly.Python.PASS;return"for "+Blockly.Python.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE)+" in range("+b+"):\n"+c}; +Blockly.Python.controls_repeat=Blockly.Python.controls_repeat_ext;Blockly.Python.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Python.valueToCode(a,"BOOL",b?Blockly.Python.ORDER_LOGICAL_NOT:Blockly.Python.ORDER_NONE)||"False",d=Blockly.Python.statementToCode(a,"DO");d=Blockly.Python.addLoopTrap(d,a.id)||Blockly.Python.PASS;b&&(c="not "+c);return"while "+c+":\n"+d}; +Blockly.Python.controls_for=function(a){var b=Blockly.Python.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Python.valueToCode(a,"FROM",Blockly.Python.ORDER_NONE)||"0",d=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"0",e=Blockly.Python.valueToCode(a,"BY",Blockly.Python.ORDER_NONE)||"1",f=Blockly.Python.statementToCode(a,"DO");f=Blockly.Python.addLoopTrap(f,a.id)||Blockly.Python.PASS;var g="",h=function(){return Blockly.Python.provideFunction_("upRange", ["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(start, stop, step):"," while start <= stop:"," yield start"," start += abs(step)"])},k=function(){return Blockly.Python.provideFunction_("downRange",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(start, stop, step):"," while start >= stop:"," yield start"," start -= abs(step)"])};a=function(a,b,c){return"("+a+" <= "+b+") and "+h()+"("+a+", "+b+", "+c+") or "+k()+"("+a+", "+b+", "+c+")"};if(Blockly.isNumber(c)&&Blockly.isNumber(d)&& -Blockly.isNumber(e))c=parseFloat(c),d=parseFloat(d),e=Math.abs(parseFloat(e)),0===c%1&&0===d%1&&0===e%1?(c<=d?(d++,a=0==c&&1==e?d:c+", "+d,1!=e&&(a+=", "+e)):(d--,a=c+", "+d+", -"+e),a="range("+a+")"):(a=ca?Blockly.Python.ORDER_UNARY_SIGN:Blockly.Python.ORDER_ATOMIC;return[a,b]}; -Blockly.Python.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Python.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Python.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Python.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Python.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Python.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Python.valueToCode(a,"A",b)||"0";a=Blockly.Python.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; +Blockly.Python.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Python.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Python.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Python.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Python.ORDER_MULTIPLICATIVE],POWER:[" ** ",Blockly.Python.ORDER_EXPONENTIATION]}[a.getFieldValue("OP")],c=b[0];b=b[1];var d=Blockly.Python.valueToCode(a,"A",b)||"0";a=Blockly.Python.valueToCode(a,"B",b)||"0";return[d+c+a,b]}; Blockly.Python.math_single=function(a){var b=a.getFieldValue("OP");if("NEG"==b){var c=Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_UNARY_SIGN)||"0";return["-"+c,Blockly.Python.ORDER_UNARY_SIGN]}Blockly.Python.definitions_.import_math="import math";a="SIN"==b||"COS"==b||"TAN"==b?Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_MULTIPLICATIVE)||"0":Blockly.Python.valueToCode(a,"NUM",Blockly.Python.ORDER_NONE)||"0";switch(b){case "ABS":c="math.fabs("+a+")";break;case "ROOT":c="math.sqrt("+ a+")";break;case "LN":c="math.log("+a+")";break;case "LOG10":c="math.log10("+a+")";break;case "EXP":c="math.exp("+a+")";break;case "POW10":c="math.pow(10,"+a+")";break;case "ROUND":c="round("+a+")";break;case "ROUNDUP":c="math.ceil("+a+")";break;case "ROUNDDOWN":c="math.floor("+a+")";break;case "SIN":c="math.sin("+a+" / 180.0 * math.pi)";break;case "COS":c="math.cos("+a+" / 180.0 * math.pi)";break;case "TAN":c="math.tan("+a+" / 180.0 * math.pi)"}if(c)return[c,Blockly.Python.ORDER_FUNCTION_CALL];switch(b){case "ASIN":c= "math.asin("+a+") / math.pi * 180";break;case "ACOS":c="math.acos("+a+") / math.pi * 180";break;case "ATAN":c="math.atan("+a+") / math.pi * 180";break;default:throw"Unknown math operator: "+b;}return[c,Blockly.Python.ORDER_MULTIPLICATIVE]}; @@ -77,21 +59,21 @@ Blockly.Python.math_on_list=function(a){var b=a.getFieldValue("OP");a=Blockly.Py Blockly.Python.math_modulo=function(a){var b=Blockly.Python.valueToCode(a,"DIVIDEND",Blockly.Python.ORDER_MULTIPLICATIVE)||"0";a=Blockly.Python.valueToCode(a,"DIVISOR",Blockly.Python.ORDER_MULTIPLICATIVE)||"0";return[b+" % "+a,Blockly.Python.ORDER_MULTIPLICATIVE]}; Blockly.Python.math_constrain=function(a){var b=Blockly.Python.valueToCode(a,"VALUE",Blockly.Python.ORDER_NONE)||"0",c=Blockly.Python.valueToCode(a,"LOW",Blockly.Python.ORDER_NONE)||"0";a=Blockly.Python.valueToCode(a,"HIGH",Blockly.Python.ORDER_NONE)||"float('inf')";return["min(max("+b+", "+c+"), "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]}; Blockly.Python.math_random_int=function(a){Blockly.Python.definitions_.import_random="import random";var b=Blockly.Python.valueToCode(a,"FROM",Blockly.Python.ORDER_NONE)||"0";a=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"0";return["random.randint("+b+", "+a+")",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.math_random_float=function(a){Blockly.Python.definitions_.import_random="import random";return["random.random()",Blockly.Python.ORDER_FUNCTION_CALL]};Blockly.Python.procedures={}; -Blockly.Python.procedures_defreturn=function(a){for(var b=[],c,d=a.workspace.getAllVariables()||[],e=0;c=d[e];e++)c=c.name,-1==a.arguments_.indexOf(c)&&b.push(Blockly.Python.variableDB_.getName(c,Blockly.Variables.NAME_TYPE));b=b.length?" global "+b.join(", ")+"\n":"";d=Blockly.Python.variableDB_.getName(a.getFieldValue("NAME"),Blockly.Procedures.NAME_TYPE);c=Blockly.Python.statementToCode(a,"STACK");Blockly.Python.STATEMENT_PREFIX&&(c=Blockly.Python.prefixLines(Blockly.Python.STATEMENT_PREFIX.replace(/%1/g,"'"+ -a.id+"'"),Blockly.Python.INDENT)+c);Blockly.Python.INFINITE_LOOP_TRAP&&(c=Blockly.Python.INFINITE_LOOP_TRAP.replace(/%1/g,'"'+a.id+'"')+c);var f=Blockly.Python.valueToCode(a,"RETURN",Blockly.Python.ORDER_NONE)||"";f?f=" return "+f+"\n":c||(c=Blockly.Python.PASS);for(var g=[],e=0;e 'use strict'; -var workspace = null; +var demoWorkspace = null; function start() { - workspace = Blockly.inject('blocklyDiv', + demoWorkspace = Blockly.inject('blocklyDiv', {grid: {spacing: 25, length: 3, @@ -129,14 +129,14 @@ function fromXml(xmlText) { output.value = xmlText; output.scrollTop = 0; output.scrollLeft = 0; - workspace.clear(); + demoWorkspace.clear(); try { var xmlDoc = Blockly.Xml.textToDom(xmlText); } catch (e) { alert('Error parsing XML:\n' + e); return; } - Blockly.Xml.domToWorkspace(xmlDoc, workspace); + Blockly.Xml.domToWorkspace(xmlDoc, demoWorkspace); } function setOutput(text) { @@ -147,7 +147,8 @@ function setOutput(text) { } function toXml() { - var xmlDom = Blockly.Xml.workspaceToDom(workspace, /* opt_noId */ true); + var xmlDom = Blockly.Xml.workspaceToDom(demoWorkspace, + /* opt_noId */ true); var xmlText = Blockly.Xml.domToPrettyText(xmlDom); xmlText = xmlText.replace(/ id="\d+"/g, ''); setOutput(xmlText); @@ -155,34 +156,34 @@ function toXml() { function toJavaScript() { var code = '\'use strict\';\n\n' - code += Blockly.JavaScript.workspaceToCode(workspace); + code += Blockly.JavaScript.workspaceToCode(demoWorkspace); setOutput(code); } function toPython() { - var code = Blockly.Python.workspaceToCode(workspace); + var code = Blockly.Python.workspaceToCode(demoWorkspace); setOutput(code); } function toPhp() { - var code = Blockly.PHP.workspaceToCode(workspace); + var code = Blockly.PHP.workspaceToCode(demoWorkspace); setOutput(code); } function toLua() { - var code = Blockly.Lua.workspaceToCode(workspace); + var code = Blockly.Lua.workspaceToCode(demoWorkspace); setOutput(code); } function toDart() { - var code = Blockly.Dart.workspaceToCode(workspace); + var code = Blockly.Dart.workspaceToCode(demoWorkspace); setOutput(code); } function changeIndex() { var oneBasedIndex = document.getElementById('indexing').checked; - workspace.options.oneBasedIndex = oneBasedIndex; - workspace.toolbox_.flyout_.workspace_.options.oneBasedIndex = oneBasedIndex; + demoWorkspace.options.oneBasedIndex = oneBasedIndex; + demoWorkspace.toolbox_.flyout_.workspace_.options.oneBasedIndex = oneBasedIndex; } @@ -353,7 +354,7 @@ h1 {
diff --git a/tests/jsunit/event_test.js b/tests/jsunit/event_test.js index c019515e9..d5583089e 100644 --- a/tests/jsunit/event_test.js +++ b/tests/jsunit/event_test.js @@ -392,3 +392,136 @@ function test_varBackard_runForward() { checkVariableValues(workspace, 'name1', 'type1', 'id1'); eventTest_tearDown(); } + +function test_events_filter() { + eventTest_setUpWithMockBlocks(); + var block1 = workspace.newBlock('field_variable_test_block', '1'); + var events = [ + new Blockly.Events.BlockCreate(block1), + new Blockly.Events.BlockMove(block1), + new Blockly.Events.BlockChange(block1, 'field', 'VAR', 'item', 'item1'), + new Blockly.Events.Ui(block1, 'click') + ]; + var filteredEvents = Blockly.Events.filter(events, true); + assertEquals(4, filteredEvents.length); // no event should have been removed. + // test that the order hasn't changed + assertTrue(filteredEvents[0] instanceof Blockly.Events.BlockCreate); + assertTrue(filteredEvents[1] instanceof Blockly.Events.BlockMove); + assertTrue(filteredEvents[2] instanceof Blockly.Events.BlockChange); + assertTrue(filteredEvents[3] instanceof Blockly.Events.Ui); +} + +function test_events_filterForward() { + eventTest_setUpWithMockBlocks(); + var block1 = workspace.newBlock('field_variable_test_block', '1'); + var events = [ + new Blockly.Events.BlockCreate(block1), + ]; + helper_addMoveEvent(events, block1, 1, 1); + helper_addMoveEvent(events, block1, 2, 2); + helper_addMoveEvent(events, block1, 3, 3); + var filteredEvents = Blockly.Events.filter(events, true); + assertEquals(2, filteredEvents.length); // duplicate moves should have been removed. + // test that the order hasn't changed + assertTrue(filteredEvents[0] instanceof Blockly.Events.BlockCreate); + assertTrue(filteredEvents[1] instanceof Blockly.Events.BlockMove); + assertEquals(3, filteredEvents[1].newCoordinate.x); + assertEquals(3, filteredEvents[1].newCoordinate.y); + eventTest_tearDownWithMockBlocks(); +} + +function test_events_filterBackward() { + eventTest_setUpWithMockBlocks(); + var block1 = workspace.newBlock('field_variable_test_block', '1'); + var events = [ + new Blockly.Events.BlockCreate(block1), + ]; + helper_addMoveEvent(events, block1, 1, 1); + helper_addMoveEvent(events, block1, 2, 2); + helper_addMoveEvent(events, block1, 3, 3); + var filteredEvents = Blockly.Events.filter(events, false); + assertEquals(2, filteredEvents.length); // duplicate event should have been removed. + // test that the order hasn't changed + assertTrue(filteredEvents[0] instanceof Blockly.Events.BlockCreate); + assertTrue(filteredEvents[1] instanceof Blockly.Events.BlockMove); + assertEquals(1, filteredEvents[1].newCoordinate.x); + assertEquals(1, filteredEvents[1].newCoordinate.y); + eventTest_tearDownWithMockBlocks(); +} + +function test_events_filterDifferentBlocks() { + eventTest_setUpWithMockBlocks(); + var block1 = workspace.newBlock('field_variable_test_block', '1'); + var block2 = workspace.newBlock('field_variable_test_block', '2'); + var events = [ + new Blockly.Events.BlockCreate(block1), + new Blockly.Events.BlockMove(block1), + new Blockly.Events.BlockCreate(block2), + new Blockly.Events.BlockMove(block2) + ]; + var filteredEvents = Blockly.Events.filter(events, true); + assertEquals(4, filteredEvents.length); // no event should have been removed. + eventTest_tearDownWithMockBlocks(); +} + +function test_events_mergeMove() { + eventTest_setUpWithMockBlocks(); + var block1 = workspace.newBlock('field_variable_test_block', '1'); + var events = []; + helper_addMoveEvent(events, block1, 0, 0); + helper_addMoveEvent(events, block1, 1, 1); + var filteredEvents = Blockly.Events.filter(events, true); + assertEquals(1, filteredEvents.length); // second move event merged into first + assertEquals(1, filteredEvents[0].newCoordinate.x); + assertEquals(1, filteredEvents[0].newCoordinate.y); + eventTest_tearDownWithMockBlocks(); +} + +function test_events_mergeChange() { + eventTest_setUpWithMockBlocks(); + var block1 = workspace.newBlock('field_variable_test_block', '1'); + var events = [ + new Blockly.Events.Change(block1, 'field', 'VAR', 'item', 'item1'), + new Blockly.Events.Change(block1, 'field', 'VAR', 'item1', 'item2') + ]; + var filteredEvents = Blockly.Events.filter(events, true); + assertEquals(1, filteredEvents.length); // second change event merged into first + assertEquals('item', filteredEvents[0].oldValue); + assertEquals('item2', filteredEvents[0].newValue); + eventTest_tearDownWithMockBlocks(); +} + +function test_events_mergeUi() { + eventTest_setUpWithMockBlocks(); + var block1 = workspace.newBlock('field_variable_test_block', '1'); + var block2 = workspace.newBlock('field_variable_test_block', '2'); + var block3 = workspace.newBlock('field_variable_test_block', '3'); + var events = [ + new Blockly.Events.Ui(block1, 'commentOpen', 'false', 'true'), + new Blockly.Events.Ui(block1, 'click', 'false', 'true'), + new Blockly.Events.Ui(block2, 'mutatorOpen', 'false', 'true'), + new Blockly.Events.Ui(block2, 'click', 'false', 'true'), + new Blockly.Events.Ui(block3, 'warningOpen', 'false', 'true'), + new Blockly.Events.Ui(block3, 'click', 'false', 'true') + ]; + var filteredEvents = Blockly.Events.filter(events, true); + assertEquals(3, filteredEvents.length); // click event merged into corresponding *Open event + assertEquals('commentOpen', filteredEvents[0].element); + assertEquals('mutatorOpen', filteredEvents[1].element); + assertEquals('warningOpen', filteredEvents[2].element); + eventTest_tearDownWithMockBlocks(); +} + +/** + * Helper function to simulate block move events. + * + * @param {!Array.} events a queue of events. + * @param {!Blockly.Block} block the block to be moved + * @param {number} newX new X coordinate of the block + * @param {number} newY new Y coordinate of the block + */ +function helper_addMoveEvent(events, block, newX, newY) { + events.push(new Blockly.Events.BlockMove(block)); + block.xy_ = new goog.math.Coordinate(newX, newY); + events[events.length-1].recordNew(); +} diff --git a/tests/jsunit/index.html b/tests/jsunit/index.html index 940111ecb..8ab715c6f 100644 --- a/tests/jsunit/index.html +++ b/tests/jsunit/index.html @@ -28,5 +28,6 @@ + diff --git a/tests/jsunit/widget_div_test.js b/tests/jsunit/widget_div_test.js new file mode 100644 index 000000000..e43cde217 --- /dev/null +++ b/tests/jsunit/widget_div_test.js @@ -0,0 +1,154 @@ +/** + * @license + * Blockly Tests + * + * Copyright 2017 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; + +goog.require('goog.testing'); + +function widgetdiv_testHelper_makeBBox(left, top, width, height) { + return { + left: left, + right: left + width, + top: top, + bottom: top + height + }; +} + +function widgetdiv_testHelper_makeSize(width, height) { + return { + width: width, + height: height + }; +} + +var widgetDiv_test_viewport = widgetdiv_testHelper_makeBBox(0, 0, 1000, 1000); +var widgetDiv_test_widgetSize = widgetdiv_testHelper_makeSize(100, 100); + +// Anchor is always 90 px wide and 90 px tall for this test. +var widgetDiv_test_anchorSize = 90; + +function widgetdiv_testHelper_makeAnchor(left, top) { + return { + left: left, + right: left + widgetDiv_test_anchorSize, + top: top, + bottom: top + widgetDiv_test_anchorSize + }; +} + +function test_widgetDiv_topConflict() { + var anchorTop = 50; + // Anchor placed close to the top. + var anchorBBox = widgetdiv_testHelper_makeAnchor(500, anchorTop); + + // The widget div should be placed just below the anchor. + var calculated = Blockly.WidgetDiv.calculateY_(widgetDiv_test_viewport, + anchorBBox, widgetDiv_test_widgetSize); + assertEquals(anchorTop + widgetDiv_test_anchorSize, calculated); +} + +function test_widgetDiv_bottomConflict() { + var anchorTop = 900; + // Anchor placed close to the bottom. + var anchorBBox = widgetdiv_testHelper_makeAnchor(500, anchorTop); + + // The widget div should be placed just above the anchor. + var calculated = Blockly.WidgetDiv.calculateY_(widgetDiv_test_viewport, + anchorBBox, widgetDiv_test_widgetSize); + assertEquals(anchorTop - widgetDiv_test_widgetSize.height, calculated); +} + +function test_widgetDiv_noYConflict() { + var anchorTop = 500; + // Anchor placed in the middle. + var anchorBBox = widgetdiv_testHelper_makeAnchor(500, anchorTop); + + // The widget div should be placed just below the anchor. + var calculated = Blockly.WidgetDiv.calculateY_(widgetDiv_test_viewport, + anchorBBox, widgetDiv_test_widgetSize); + assertEquals(anchorTop + widgetDiv_test_anchorSize, calculated); +} + + +function test_widgetDiv_leftConflict_LTR() { + var anchorLeft = 50; + // Anchor placed close to the left side. + var anchorBBox = widgetdiv_testHelper_makeAnchor(anchorLeft, 500); + + // The widget div should be placed at the anchor. + var calculated = Blockly.WidgetDiv.calculateX_(widgetDiv_test_viewport, + anchorBBox, widgetDiv_test_widgetSize, false /* rtl */); + assertEquals(anchorLeft, calculated); +} + +function test_widgetDiv_rightConflict_LTR() { + var anchorLeft = 950; + // Anchor placed close to the right side. + var anchorBBox = widgetdiv_testHelper_makeAnchor(anchorLeft, 500); + + // The widget div should be placed as far right as possible--at the edge of + // the screen. + var calculated = Blockly.WidgetDiv.calculateX_(widgetDiv_test_viewport, + anchorBBox, widgetDiv_test_widgetSize, false /* rtl */); + assertEquals(1000 - widgetDiv_test_widgetSize.width, calculated); +} + +function test_widgetDiv_noXConflict_LTR() { + var anchorLeft = 500; + // Anchor in the middle + var anchorBBox = widgetdiv_testHelper_makeAnchor(anchorLeft, 500); + // The widget div should be placed just at the left side of the anchor. + var calculated = Blockly.WidgetDiv.calculateX_(widgetDiv_test_viewport, + anchorBBox, widgetDiv_test_widgetSize, false /* rtl */); + assertEquals(anchorLeft, calculated); +} + +function test_widgetDiv_leftConflict_RTL() { + var anchorLeft = 10; + // Anchor placed close to the left side. + var anchorBBox = widgetdiv_testHelper_makeAnchor(anchorLeft, 500); + // The widget div should be placed as far left as possible--at the edge of + // the screen. + var calculated = Blockly.WidgetDiv.calculateX_(widgetDiv_test_viewport, + anchorBBox, widgetDiv_test_widgetSize, true /* rtl */); + assertEquals(0, calculated); +} + +function test_widgetDiv_rightConflict_RTL() { + var anchorLeft = 950; + // Anchor placed close to the right side. + var anchorBBox = widgetdiv_testHelper_makeAnchor(anchorLeft, 500); + + // The widget div should be placed as far right as possible--at the edge of + // the screen. + var calculated = Blockly.WidgetDiv.calculateX_(widgetDiv_test_viewport, + anchorBBox, widgetDiv_test_widgetSize, true /* rtl */); + assertEquals(1000 - widgetDiv_test_widgetSize.width, calculated); +} + +function test_widgetDiv_noXConflict_RTL() { + var anchorLeft = 500; + // anchor placed in the middle + var anchorBBox = widgetdiv_testHelper_makeAnchor(anchorLeft, 500); + // The widget div should be placed at the right side of the anchor. + var calculated = Blockly.WidgetDiv.calculateX_(widgetDiv_test_viewport, + anchorBBox, widgetDiv_test_widgetSize, true /* rtl */); + assertEquals(anchorBBox.right - widgetDiv_test_widgetSize.width, calculated); +} +