mirror of
https://github.com/google/blockly.git
synced 2026-06-17 00:25:14 +02:00
Merge branch 'develop'
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
*_compressed*.js
|
||||
*_uncompressed*.js
|
||||
/msg/*
|
||||
/core/css.js
|
||||
/tests/jsunit/*
|
||||
/tests/generators/*
|
||||
/generators/*
|
||||
/demos/*
|
||||
/accessible/*
|
||||
/appengine/*
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"rules": {
|
||||
"curly": ["error", "multi-line"],
|
||||
"eol-last": ["error"],
|
||||
"indent": ["error", 2, {"SwitchCase": 1}], # Blockly/Google use 2-space indents
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"max-len": ["error", 120, 4],
|
||||
"no-trailing-spaces": ["error", { "skipBlankLines": true }],
|
||||
"no-unused-vars": ["error", {"args": "after-used", "varsIgnorePattern": "^_"}],
|
||||
"no-use-before-define": ["error"],
|
||||
"quotes": ["off"], # Blockly mixes single and double quotes
|
||||
"semi": ["error", "always"],
|
||||
"space-before-function-paren": ["error", "never"], # Blockly doesn't have space before function paren
|
||||
"strict": ["off"], # Blockly uses 'use strict' in files
|
||||
"no-cond-assign": ["off"], # Blockly often uses cond-assignment in loops
|
||||
"no-redeclare": ["off"], # Closure style allows redeclarations
|
||||
"valid-jsdoc": ["error", {"requireReturn": false}],
|
||||
"no-console": ["off"]
|
||||
},
|
||||
"env": {
|
||||
"browser": true
|
||||
},
|
||||
"globals": {
|
||||
"Blockly": true, # Blockly global
|
||||
"goog": true # goog closure libraries/includes
|
||||
},
|
||||
"extends": "eslint:recommended"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
Accessible Blockly
|
||||
=======
|
||||
|
||||
Google's Blockly is a web-based, visual programming editor: accessible to blind users.
|
||||
|
||||
What Does Accessible Blockly Do?
|
||||
-----------
|
||||
* renders a version of the blockly toolbox and workspace that is easily navigable using solely the keyboard
|
||||
* renders a version of the blockly toolbox and workspace that is compatible with JAWS/NVDA screen readers on Firefox for Windows.
|
||||
* Accessible Blockly will hopefully be modified to work well with most other screen readers, however JAWS and NVDA are the most robust screen readers and are compatible with many more aria tags than other screen readers. Therefore it was easiest to first be compatible with them.
|
||||
* Accessible Blockly will be modified to suit accessibility needs other than visual impairments as well. Deaf users will be expected to continue using Blockly over Accessible Blockly.
|
||||
|
||||
Use Accessible Blockly in Your Web App
|
||||
-----------
|
||||
1. see the basic demo under blockly/demos/accessible. This covers the absolute minimum required to import Accessible Blockly into your own web app.
|
||||
2. You will need to import the files in the same order as in the demo: utils.service.js will need to be the first Angular file imported.
|
||||
3. When the DOMContentLoaded event fires, call ng.platform.browser.bootstrap() on the main component to be loaded. This will usually be blocklyApp.AppView, but if you have another component that wraps it, use that one instead.
|
||||
4. You will need to implement a runCode() function in the global scope. This function will be called when the user presses the Run Code button in the Accessible Blockly app.
|
||||
5. Note that we do not support having multiple Accessible Blockly apps in a single webpage.
|
||||
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component that details how the AccessibleBlockly
|
||||
* app is rendered on the page.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
blocklyApp.workspace = new Blockly.Workspace();
|
||||
|
||||
// If the debug flag is true, print console.logs to help with debugging.
|
||||
blocklyApp.debug = false;
|
||||
|
||||
blocklyApp.AppView = ng.core
|
||||
.Component({
|
||||
selector: 'blockly-app',
|
||||
template: `
|
||||
<table>
|
||||
<tr>
|
||||
<td class="blocklyTable">
|
||||
<toolbox-view>{{stringMap['TOOLBOX_LOAD']}}</toolbox-view>
|
||||
</td>
|
||||
<td class="blocklyTable">
|
||||
<workspace-view>{{stringMap['WORKSPACE_LOAD']}}</workspace-view>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<label id="blockly-block-summary" aria-hidden="true" hidden>{{stringMap['BLOCK_SUMMARY']}}</label>
|
||||
<label id="blockly-block-menu" aria-hidden="true" hidden>{{stringMap['BLOCK_ACTION_LIST']}}</label>
|
||||
<label id="blockly-menu" aria-hidden="true" hidden>{{stringMap['OPTION_LIST']}}</label>
|
||||
<label id="blockly-argument-menu" aria-hidden="true" hidden>{{stringMap['ARGUMENT_OPTIONS_LIST']}}</label>
|
||||
<label id="blockly-argument-input" aria-hidden="true" hidden>{{stringMap['ARGUMENT_INPUT']}}</label>
|
||||
<label id="blockly-argument-block-menu" aria-hidden="true" hidden>{{stringMap['ARGUMENT_BLOCK_ACTION_LIST']}}</label>
|
||||
<label id="blockly-argument-text" aria-hidden="true" hidden>{{stringMap['TEXT']}}</label>
|
||||
<label id="blockly-button" aria-hidden="true" hidden>{{stringMap['BUTTON']}}</label>
|
||||
<label id="blockly-disabled" aria-hidden="true" hidden>{{stringMap['UNAVAILABLE']}}</label>
|
||||
`,
|
||||
directives: [blocklyApp.ToolboxView, blocklyApp.WorkspaceView],
|
||||
// ClipboardService declared here so that all components are using the same
|
||||
// instance of the clipboard.
|
||||
// https://www.sitepoint.com/angular-2-components-providers-classes-factories-values/
|
||||
providers: [blocklyApp.ClipboardService]
|
||||
})
|
||||
.Class({
|
||||
constructor: function() {
|
||||
this.stringMap = {
|
||||
['TOOLBOX_LOAD']: Blockly.Msg.TOOLBOX_LOAD_MSG,
|
||||
['WORKSPACE_LOAD']: Blockly.Msg.WORKSPACE_LOAD_MSG,
|
||||
['BLOCK_SUMMARY']: Blockly.Msg.BLOCK_SUMMARY,
|
||||
['BLOCK_ACTION_LIST']: Blockly.Msg.BLOCK_ACTION_LIST,
|
||||
['OPTION_LIST']: Blockly.Msg.OPTION_LIST,
|
||||
['ARGUMENT_OPTIONS_LIST']: Blockly.Msg.ARGUMENT_OPTIONS_LIST,
|
||||
['UNAVAILABLE']: Blockly.Msg.UNAVAILABLE,
|
||||
['BUTTON']: Blockly.Msg.BUTTON,
|
||||
['TEXT']: Blockly.Msg.TEXT,
|
||||
['ARGUMENT_BLOCK_ACTION_LIST']: Blockly.Msg.ARGUMENT_BLOCK_ACTION_LIST,
|
||||
['ARGUMENT_INPUT']: Blockly.Msg.ARGUMENT_INPUT
|
||||
};
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,119 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service that handles the clipboard and marked spots.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
blocklyApp.ClipboardService = ng.core
|
||||
.Class({
|
||||
constructor: function() {
|
||||
this.clipboardBlockXml_ = null;
|
||||
this.clipboardBlockSuperiorConnection_ = null;
|
||||
this.clipboardBlockNextConnection_ = null;
|
||||
this.markedConnection_ = null;
|
||||
},
|
||||
cut: function(block) {
|
||||
var blockSummary = block.toString();
|
||||
this.copy(block, false);
|
||||
block.dispose(true);
|
||||
blocklyApp.debug && console.log('cut');
|
||||
alert(Blockly.Msg.CUT_BLOCK_MSG + blockSummary);
|
||||
},
|
||||
copy: function(block, announce) {
|
||||
this.clipboardBlockXml_ = Blockly.Xml.blockToDom(block);
|
||||
this.clipboardBlockSuperiorConnection_ = block.outputConnection ||
|
||||
block.previousConnection;
|
||||
this.clipboardBlockNextConnection_ = block.nextConnection;
|
||||
blocklyApp.debug && console.log('copy');
|
||||
if (announce) {
|
||||
alert(Blockly.Msg.COPIED_BLOCK_MSG + block.toString());
|
||||
}
|
||||
},
|
||||
pasteFromClipboard: function(connection) {
|
||||
var reconstitutedBlock = Blockly.Xml.domToBlock(blocklyApp.workspace,
|
||||
this.clipboardBlockXml_);
|
||||
switch (connection.type) {
|
||||
case Blockly.NEXT_STATEMENT:
|
||||
connection.connect(reconstitutedBlock.previousConnection);
|
||||
break;
|
||||
case Blockly.PREVIOUS_STATEMENT:
|
||||
connection.connect(reconstitutedBlock.nextConnection);
|
||||
break;
|
||||
default:
|
||||
connection.connect(reconstitutedBlock.outputConnection);
|
||||
}
|
||||
blocklyApp.debug && console.log('paste');
|
||||
alert(Blockly.Msg.PASTED_BLOCK_FROM_CLIPBOARD_MSG + block.toString());
|
||||
},
|
||||
pasteToMarkedConnection: function(block, announce) {
|
||||
var xml = Blockly.Xml.blockToDom(block);
|
||||
var reconstitutedBlock =
|
||||
Blockly.Xml.domToBlock(blocklyApp.workspace, xml);
|
||||
this.markedConnection_.connect(
|
||||
reconstitutedBlock.outputConnection ||
|
||||
reconstitutedBlock.previousConnection);
|
||||
blocklyApp.debug && console.log('paste to marked connection');
|
||||
if (announce) {
|
||||
alert(Blockly.Msg.PASTED_BLOCK_TO_MARKED_SPOT_MSG + block.toString());
|
||||
}
|
||||
},
|
||||
markConnection: function(connection) {
|
||||
this.markedConnection_ = connection;
|
||||
blocklyApp.debug && console.log('mark connection');
|
||||
alert(Blockly.Msg.MARKED_SPOT_MSG);
|
||||
},
|
||||
isCompatibleWithConnection_: function(blockConnection, connection) {
|
||||
// Checking that the connection and blockConnection exist.
|
||||
if (!connection || !blockConnection) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Checking that the types match and it's the right kind of connection.
|
||||
var isCompatible = Blockly.OPPOSITE_TYPE[blockConnection.type] ==
|
||||
connection.type && connection.checkType_(blockConnection);
|
||||
|
||||
if (blocklyApp.debug) {
|
||||
if (isCompatible) {
|
||||
console.log('blocks should be connected');
|
||||
} else {
|
||||
console.log('blocks should not be connected');
|
||||
}
|
||||
}
|
||||
return isCompatible;
|
||||
},
|
||||
isBlockCompatibleWithMarkedConnection: function(block) {
|
||||
var blockConnection = block.outputConnection || block.previousConnection;
|
||||
return this.markedConnection_ &&
|
||||
this.markedConnection_.sourceBlock_.workspace &&
|
||||
this.isCompatibleWithConnection_(
|
||||
blockConnection, this.markedConnection_);
|
||||
},
|
||||
getClipboardCompatibilityHTMLText: function(connection) {
|
||||
if (this.isCompatibleWithConnection_(connection,
|
||||
this.clipboardBlockSuperiorConnection_) ||
|
||||
this.isCompatibleWithConnection_(connection,
|
||||
this.clipboardBlockNextConnection_)){
|
||||
return '';
|
||||
} else {
|
||||
return 'blockly-disabled';
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component that details how a Blockly.Field is
|
||||
* rendered in the toolbox in AccessibleBlockly. Also handles any interactions
|
||||
* with the field.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
blocklyApp.FieldView = ng.core
|
||||
.Component({
|
||||
selector: 'field-view',
|
||||
template: `
|
||||
<li [id]="idMap['listItem']" role="treeitem" *ngIf="isTextInput()"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr('blockly-argument-input', idMap['input'])"
|
||||
[attr.aria-level]="level" aria-selected=false>
|
||||
<input [id]="idMap['input']" [ngModel]="field.getValue()" (ngModelChange)="field.setValue($event)">
|
||||
</li>
|
||||
<li [id]="idMap['listItem']" *ngIf="isDropdown()"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr('blockly-argument-menu', idMap['label'])"
|
||||
[attr.aria-level]="level" aria-selected=false role="treeitem">
|
||||
<label [id]="idMap['label']">{{stringMap['CURRENT_ARGUMENT_VALUE']}} {{field.getText()}}</label>
|
||||
<ol role="group" [attr.aria-level]="level+1">
|
||||
<li [id]="idMap[optionValue]" role="treeitem" *ngFor="#optionValue of getOptions()"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap[optionValue + 'Button'], 'blockly-button')"
|
||||
[attr.aria-level]="level+1" aria-selected=false>
|
||||
<button [id]="idMap[optionValue + 'Button']" (click)="handleDropdownChange(field, optionValue)">
|
||||
{{optionText[optionValue]}}
|
||||
</button>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li [id]="idMap['listItem']" role="treeitem"
|
||||
*ngIf="isCheckbox()" [attr.aria-level]="level"
|
||||
aria-selected=false>
|
||||
// Checkboxes not currently supported.
|
||||
</li>
|
||||
<li [id]="idMap['listItem']" role="treeitem"
|
||||
[attr.aria-labelledBy]="utilsService.generateAriaLabelledByAttr('blockly-argument-text', idMap['label'])"
|
||||
*ngIf="isTextField() && hasVisibleText()"
|
||||
[attr.aria-level]="level" aria-selected=false>
|
||||
<label [id]="idMap['label']">
|
||||
{{field.getText()}}
|
||||
</label>
|
||||
</li>
|
||||
`,
|
||||
inputs: ['field', 'level', 'index', 'parentId'],
|
||||
providers: [blocklyApp.TreeService, blocklyApp.UtilsService]
|
||||
})
|
||||
.Class({
|
||||
constructor: [blocklyApp.TreeService, blocklyApp.UtilsService,
|
||||
function(_treeService, _utilsService) {
|
||||
this.optionText = {
|
||||
keys: []
|
||||
};
|
||||
this.treeService = _treeService;
|
||||
this.utilsService = _utilsService;
|
||||
this.stringMap = {
|
||||
'CURRENT_ARGUMENT_VALUE': Blockly.Msg.CURRENT_ARGUMENT_VALUE
|
||||
};
|
||||
}],
|
||||
ngOnInit: function() {
|
||||
var elementsNeedingIds = this.generateElementNames(this.field);
|
||||
this.idMap = this.utilsService.generateIds(elementsNeedingIds);
|
||||
},
|
||||
generateAriaLabelledByAttr: function() {
|
||||
return this.utilsService.generateAriaLabelledByAttr.apply(this,
|
||||
arguments);
|
||||
},
|
||||
generateElementNames: function() {
|
||||
var elementNames = ['listItem'];
|
||||
if (this.isTextInput()) {
|
||||
elementNames.push('input');
|
||||
} else if (this.isDropdown()) {
|
||||
elementNames.push('label');
|
||||
var keys = this.getOptions();
|
||||
for (var i = 0; i < keys.length; i++){
|
||||
elementNames.push(keys[i], keys[i] + 'Button');
|
||||
}
|
||||
} else if (this.isTextField() && this.hasVisibleText()) {
|
||||
elementNames.push('label');
|
||||
}
|
||||
return elementNames;
|
||||
},
|
||||
isTextInput: function() {
|
||||
return this.field instanceof Blockly.FieldTextInput;
|
||||
},
|
||||
isDropdown: function() {
|
||||
return this.field instanceof Blockly.FieldDropdown;
|
||||
},
|
||||
isCheckbox: function() {
|
||||
return this.field instanceof Blockly.FieldCheckbox;
|
||||
},
|
||||
isTextField: function() {
|
||||
return !(this.field instanceof Blockly.FieldTextInput) &&
|
||||
!(this.field instanceof Blockly.FieldDropdown) &&
|
||||
!(this.field instanceof Blockly.FieldCheckbox);
|
||||
},
|
||||
hasVisibleText: function() {
|
||||
var text = this.field.getText().trim();
|
||||
return !!text;
|
||||
},
|
||||
getOptions: function() {
|
||||
if (this.optionText.keys.length) {
|
||||
return this.optionText.keys;
|
||||
}
|
||||
var options = this.field.getOptions_();
|
||||
for (var i = 0; i < options.length; i++) {
|
||||
var tuple = options[i];
|
||||
this.optionText[tuple[1]] = tuple[0];
|
||||
this.optionText.keys.push(tuple[1]);
|
||||
}
|
||||
return this.optionText.keys;
|
||||
},
|
||||
handleDropdownChange: function(field, text) {
|
||||
if (text == 'NO_ACTION') {
|
||||
return;
|
||||
}
|
||||
if (this.field instanceof Blockly.FieldVariable) {
|
||||
blocklyApp.debug && console.log();
|
||||
Blockly.FieldVariable.dropdownChange.call(this.field, text);
|
||||
} else {
|
||||
this.field.setValue(text);
|
||||
}
|
||||
}
|
||||
});
|
||||
Vendored
+321
@@ -0,0 +1,321 @@
|
||||
(function(t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).Rx=t()})(function(){return function a(b,e,h){function k(f,d){if(!e[f]){if(!b[f]){var c="function"==typeof require&&require;if(!d&&c)return c(f,!0);if(m)return m(f,!0);c=Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}c=e[f]={exports:{}};
|
||||
b[f][0].call(c.exports,function(a){var c=b[f][1][a];return k(c?c:a)},c,c.exports,a,b,e,h)}return e[f].exports}for(var m="function"==typeof require&&require,l=0;l<h.length;l++)k(h[l]);return k}({1:[function(a,b,e){var h=this&&this.__extends||function(a,b){function l(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(l.prototype=b.prototype,new l)};a=function(a){function b(l,f,d){a.call(this);this.parent=l;this.outerValue=f;this.outerIndex=d;
|
||||
this.index=0}h(b,a);b.prototype._next=function(a){var f=this.index++;this.parent.notifyNext(this.outerValue,a,this.outerIndex,f)};b.prototype._error=function(a){this.parent.notifyError(a,this)};b.prototype._complete=function(){this.parent.notifyComplete(this)};return b}(a("./Subscriber").Subscriber);e.InnerSubscriber=a},{"./Subscriber":7}],2:[function(a,b,e){var h=a("./Observable");a=function(){function a(b,l,f){this.kind=b;this.value=l;this.exception=f;this.hasValue="N"===b}a.prototype.observe=function(a){switch(this.kind){case "N":return a.next(this.value);
|
||||
case "E":return a.error(this.exception);case "C":return a.complete()}};a.prototype.do=function(a,b,f){switch(this.kind){case "N":return a(this.value);case "E":return b(this.exception);case "C":return f()}};a.prototype.accept=function(a,b,f){return a&&"function"===typeof a.next?this.observe(a):this.do(a,b,f)};a.prototype.toObservable=function(){switch(this.kind){case "N":return h.Observable.of(this.value);case "E":return h.Observable.throw(this.exception);case "C":return h.Observable.empty()}};a.createNext=
|
||||
function(b){return"undefined"!==typeof b?new a("N",b):this.undefinedValueNotification};a.createError=function(b){return new a("E",void 0,b)};a.createComplete=function(){return this.completeNotification};a.completeNotification=new a("C");a.undefinedValueNotification=new a("N",void 0);return a}();e.Notification=a},{"./Observable":3}],3:[function(a,b,e){var h=a("./Subscriber"),k=a("./util/root"),m=a("./util/SymbolShim"),l=a("./symbol/rxSubscriber");a=function(){function a(d){this._isScalar=!1;d&&(this._subscribe=
|
||||
d)}a.prototype.lift=function(d){var c=new a;c.source=this;c.operator=d;return c};a.prototype[m.SymbolShim.observable]=function(){return this};a.prototype.subscribe=function(a,c,g){a=a&&"object"===typeof a?a instanceof h.Subscriber?a:a[l.rxSubscriber]?a[l.rxSubscriber]():new h.Subscriber(a):h.Subscriber.create(a,c,g);a.add(this._subscribe(a));return a};a.prototype.forEach=function(a,c,g){g||(k.root.Rx&&k.root.Rx.config&&k.root.Rx.config.Promise?g=k.root.Rx.config.Promise:k.root.Promise&&(g=k.root.Promise));
|
||||
if(!g)throw Error("no Promise impl found");var n;c?(n=function q(a){return q.next.call(q.thisArg,a)},n.thisArg=c,n.next=a):n=a;a=function q(a,c){q.source.subscribe(q.nextHandler,c,a)};a.source=this;a.nextHandler=n;return new g(a)};a.prototype._subscribe=function(a){return this.source._subscribe(this.operator.call(a))};a.create=function(d){return new a(d)};return a}();e.Observable=a},{"./Subscriber":7,"./symbol/rxSubscriber":221,"./util/SymbolShim":229,"./util/root":238}],4:[function(a,b,e){var h=
|
||||
this&&this.__extends||function(a,b){function l(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(l.prototype=b.prototype,new l)};a=function(a){function b(){a.apply(this,arguments)}h(b,a);b.prototype.notifyComplete=function(a){this.destination.complete()};b.prototype.notifyNext=function(a,f,d,c){this.destination.next(f)};b.prototype.notifyError=function(a,f){this.destination.error(a)};return b}(a("./Subscriber").Subscriber);e.OuterSubscriber=
|
||||
a},{"./Subscriber":7}],5:[function(a,b,e){b=a("./Subject");e.Subject=b.Subject;b=a("./Observable");e.Observable=b.Observable;a("./add/operator/combineLatest-static");a("./add/operator/concat-static");a("./add/operator/merge-static");a("./add/observable/bindCallback");a("./add/observable/defer");a("./add/observable/empty");a("./add/observable/forkJoin");a("./add/observable/from");a("./add/observable/fromArray");a("./add/observable/fromEvent");a("./add/observable/fromEventPattern");a("./add/observable/fromPromise");
|
||||
a("./add/observable/interval");a("./add/observable/never");a("./add/observable/range");a("./add/observable/throw");a("./add/observable/timer");a("./add/operator/zip-static");a("./add/operator/buffer");a("./add/operator/bufferCount");a("./add/operator/bufferTime");a("./add/operator/bufferToggle");a("./add/operator/bufferWhen");a("./add/operator/catch");a("./add/operator/combineAll");a("./add/operator/combineLatest");a("./add/operator/concat");a("./add/operator/concatAll");a("./add/operator/concatMap");
|
||||
a("./add/operator/concatMapTo");a("./add/operator/count");a("./add/operator/dematerialize");a("./add/operator/debounce");a("./add/operator/debounceTime");a("./add/operator/defaultIfEmpty");a("./add/operator/delay");a("./add/operator/distinctUntilChanged");a("./add/operator/do");a("./add/operator/expand");a("./add/operator/filter");a("./add/operator/finally");a("./add/operator/first");a("./add/operator/groupBy");a("./add/operator/ignoreElements");a("./add/operator/every");a("./add/operator/last");
|
||||
a("./add/operator/map");a("./add/operator/mapTo");a("./add/operator/materialize");a("./add/operator/merge");a("./add/operator/mergeAll");a("./add/operator/mergeMap");a("./add/operator/mergeMapTo");a("./add/operator/multicast");a("./add/operator/observeOn");a("./add/operator/partition");a("./add/operator/publish");a("./add/operator/publishBehavior");a("./add/operator/publishReplay");a("./add/operator/publishLast");a("./add/operator/reduce");a("./add/operator/repeat");a("./add/operator/retry");a("./add/operator/retryWhen");
|
||||
a("./add/operator/sample");a("./add/operator/sampleTime");a("./add/operator/scan");a("./add/operator/share");a("./add/operator/single");a("./add/operator/skip");a("./add/operator/skipUntil");a("./add/operator/skipWhile");a("./add/operator/startWith");a("./add/operator/subscribeOn");a("./add/operator/switch");a("./add/operator/switchMap");a("./add/operator/switchMapTo");a("./add/operator/take");a("./add/operator/takeUntil");a("./add/operator/takeWhile");a("./add/operator/throttle");a("./add/operator/throttleTime");
|
||||
a("./add/operator/timeout");a("./add/operator/timeoutWith");a("./add/operator/toArray");a("./add/operator/toPromise");a("./add/operator/window");a("./add/operator/windowCount");a("./add/operator/windowTime");a("./add/operator/windowToggle");a("./add/operator/windowWhen");a("./add/operator/withLatestFrom");a("./add/operator/zip");a("./add/operator/zipAll");b=a("./Subscription");e.Subscription=b.Subscription;b=a("./Subscriber");e.Subscriber=b.Subscriber;b=a("./subject/AsyncSubject");e.AsyncSubject=
|
||||
b.AsyncSubject;b=a("./subject/ReplaySubject");e.ReplaySubject=b.ReplaySubject;b=a("./subject/BehaviorSubject");e.BehaviorSubject=b.BehaviorSubject;b=a("./observable/ConnectableObservable");e.ConnectableObservable=b.ConnectableObservable;b=a("./Notification");e.Notification=b.Notification;b=a("./util/EmptyError");e.EmptyError=b.EmptyError;b=a("./util/ArgumentOutOfRangeError");e.ArgumentOutOfRangeError=b.ArgumentOutOfRangeError;b=a("./util/ObjectUnsubscribedError");e.ObjectUnsubscribedError=b.ObjectUnsubscribedError;
|
||||
b=a("./scheduler/asap");var h=a("./scheduler/queue");a=a("./symbol/rxSubscriber");e.Scheduler={asap:b.asap,queue:h.queue};e.Symbol={rxSubscriber:a.rxSubscriber}},{"./Notification":2,"./Observable":3,"./Subject":6,"./Subscriber":7,"./Subscription":8,"./add/observable/bindCallback":9,"./add/observable/defer":10,"./add/observable/empty":11,"./add/observable/forkJoin":12,"./add/observable/from":13,"./add/observable/fromArray":14,"./add/observable/fromEvent":15,"./add/observable/fromEventPattern":16,"./add/observable/fromPromise":17,
|
||||
"./add/observable/interval":18,"./add/observable/never":19,"./add/observable/range":20,"./add/observable/throw":21,"./add/observable/timer":22,"./add/operator/buffer":23,"./add/operator/bufferCount":24,"./add/operator/bufferTime":25,"./add/operator/bufferToggle":26,"./add/operator/bufferWhen":27,"./add/operator/catch":28,"./add/operator/combineAll":29,"./add/operator/combineLatest":31,"./add/operator/combineLatest-static":30,"./add/operator/concat":33,"./add/operator/concat-static":32,"./add/operator/concatAll":34,
|
||||
"./add/operator/concatMap":35,"./add/operator/concatMapTo":36,"./add/operator/count":37,"./add/operator/debounce":38,"./add/operator/debounceTime":39,"./add/operator/defaultIfEmpty":40,"./add/operator/delay":41,"./add/operator/dematerialize":42,"./add/operator/distinctUntilChanged":43,"./add/operator/do":44,"./add/operator/every":45,"./add/operator/expand":46,"./add/operator/filter":47,"./add/operator/finally":48,"./add/operator/first":49,"./add/operator/groupBy":50,"./add/operator/ignoreElements":51,
|
||||
"./add/operator/last":52,"./add/operator/map":53,"./add/operator/mapTo":54,"./add/operator/materialize":55,"./add/operator/merge":57,"./add/operator/merge-static":56,"./add/operator/mergeAll":58,"./add/operator/mergeMap":59,"./add/operator/mergeMapTo":60,"./add/operator/multicast":61,"./add/operator/observeOn":62,"./add/operator/partition":63,"./add/operator/publish":64,"./add/operator/publishBehavior":65,"./add/operator/publishLast":66,"./add/operator/publishReplay":67,"./add/operator/reduce":68,
|
||||
"./add/operator/repeat":69,"./add/operator/retry":70,"./add/operator/retryWhen":71,"./add/operator/sample":72,"./add/operator/sampleTime":73,"./add/operator/scan":74,"./add/operator/share":75,"./add/operator/single":76,"./add/operator/skip":77,"./add/operator/skipUntil":78,"./add/operator/skipWhile":79,"./add/operator/startWith":80,"./add/operator/subscribeOn":81,"./add/operator/switch":82,"./add/operator/switchMap":83,"./add/operator/switchMapTo":84,"./add/operator/take":85,"./add/operator/takeUntil":86,
|
||||
"./add/operator/takeWhile":87,"./add/operator/throttle":88,"./add/operator/throttleTime":89,"./add/operator/timeout":90,"./add/operator/timeoutWith":91,"./add/operator/toArray":92,"./add/operator/toPromise":93,"./add/operator/window":94,"./add/operator/windowCount":95,"./add/operator/windowTime":96,"./add/operator/windowToggle":97,"./add/operator/windowWhen":98,"./add/operator/withLatestFrom":99,"./add/operator/zip":101,"./add/operator/zip-static":100,"./add/operator/zipAll":102,"./observable/ConnectableObservable":103,
|
||||
"./scheduler/asap":215,"./scheduler/queue":216,"./subject/AsyncSubject":217,"./subject/BehaviorSubject":218,"./subject/ReplaySubject":219,"./symbol/rxSubscriber":221,"./util/ArgumentOutOfRangeError":222,"./util/EmptyError":223,"./util/ObjectUnsubscribedError":228}],6:[function(a,b,e){var h=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===c?Object.create(c):(g.prototype=c.prototype,new g)};b=a("./Observable");var k=
|
||||
a("./Subscriber"),m=a("./Subscription"),l=a("./subject/SubjectSubscription"),f=a("./symbol/rxSubscriber"),d=m.Subscription.prototype.add,c=m.Subscription.prototype.remove,g=m.Subscription.prototype.unsubscribe,n=k.Subscriber.prototype.next,p=k.Subscriber.prototype.error,q=k.Subscriber.prototype.complete,w=k.Subscriber.prototype._next,x=k.Subscriber.prototype._error,r=k.Subscriber.prototype._complete;a=function(a){function n(){a.apply(this,arguments);this.observers=[];this.completeSignal=this.errorSignal=
|
||||
this.dispatching=this.isUnsubscribed=!1}h(n,a);n.prototype[f.rxSubscriber]=function(){return this};n.create=function(a,c){return new v(a,c)};n.prototype.lift=function(a){var c=new v(this,this.destination||this);c.operator=a;return c};n.prototype._subscribe=function(a){if(!a.isUnsubscribed)if(this.errorSignal)a.error(this.errorInstance);else if(this.completeSignal)a.complete();else{if(this.isUnsubscribed)throw Error("Cannot subscribe to a disposed Subject.");this.observers.push(a);return new l.SubjectSubscription(this,
|
||||
a)}};n.prototype.add=function(a){d.call(this,a)};n.prototype.remove=function(a){c.call(this,a)};n.prototype.unsubscribe=function(){this.observers=void 0;g.call(this)};n.prototype.next=function(a){this.isUnsubscribed||(this.dispatching=!0,this._next(a),this.dispatching=!1,this.errorSignal?this.error(this.errorInstance):this.completeSignal&&this.complete())};n.prototype.error=function(a){this.isUnsubscribed||this.completeSignal||(this.errorSignal=!0,this.errorInstance=a,this.dispatching||(this._error(a),
|
||||
this.unsubscribe()))};n.prototype.complete=function(){this.isUnsubscribed||this.errorSignal||(this.completeSignal=!0,this.dispatching||(this._complete(),this.unsubscribe()))};n.prototype._next=function(a){for(var c=-1,g=this.observers.slice(0),n=g.length;++c<n;)g[c].next(a)};n.prototype._error=function(a){var c=-1,g=this.observers,n=g.length;this.observers=void 0;for(this.isUnsubscribed=!0;++c<n;)g[c].error(a);this.isUnsubscribed=!1};n.prototype._complete=function(){var a=-1,c=this.observers,g=c.length;
|
||||
this.observers=void 0;for(this.isUnsubscribed=!0;++a<g;)c[a].complete();this.isUnsubscribed=!1};return n}(b.Observable);e.Subject=a;var v=function(a){function c(g,n){a.call(this);this.source=g;this.destination=n}h(c,a);c.prototype._subscribe=function(a){var c=this.operator;return this.source._subscribe.call(this.source,c?c.call(a):a)};c.prototype.next=function(a){n.call(this,a)};c.prototype.error=function(a){p.call(this,a)};c.prototype.complete=function(){q.call(this)};c.prototype._next=function(a){w.call(this,
|
||||
a)};c.prototype._error=function(a){x.call(this,a)};c.prototype._complete=function(){r.call(this)};return c}(a)},{"./Observable":3,"./Subscriber":7,"./Subscription":8,"./subject/SubjectSubscription":220,"./symbol/rxSubscriber":221}],7:[function(a,b,e){var h=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var n in c)c.hasOwnProperty(n)&&(a[n]=c[n]);a.prototype=null===c?Object.create(c):(g.prototype=c.prototype,new g)},k=a("./util/noop"),m=a("./util/throwError"),l=a("./util/tryOrOnError");
|
||||
b=a("./Subscription");var f=a("./symbol/rxSubscriber");a=function(a){function c(g){a.call(this);this.destination=g;this._isUnsubscribed=!1;if(this.destination){var n=g._subscription;n?this._subscription=n:g instanceof c&&(this._subscription=g)}}h(c,a);c.prototype[f.rxSubscriber]=function(){return this};Object.defineProperty(c.prototype,"isUnsubscribed",{get:function(){var a=this._subscription;return a?this._isUnsubscribed||a.isUnsubscribed:this._isUnsubscribed},set:function(a){var c=this._subscription;
|
||||
c?c.isUnsubscribed=Boolean(a):this._isUnsubscribed=Boolean(a)},enumerable:!0,configurable:!0});c.create=function(a,n,d){var f=new c;f._next="function"===typeof a&&l.tryOrOnError(a)||k.noop;f._error="function"===typeof n&&n||m.throwError;f._complete="function"===typeof d&&d||k.noop;return f};c.prototype.add=function(c){var n=this._subscription;n?n.add(c):a.prototype.add.call(this,c)};c.prototype.remove=function(c){this._subscription?this._subscription.remove(c):a.prototype.remove.call(this,c)};c.prototype.unsubscribe=
|
||||
function(){this._isUnsubscribed||(this._subscription?this._isUnsubscribed=!0:a.prototype.unsubscribe.call(this))};c.prototype._next=function(a){var c=this.destination;c.next&&c.next(a)};c.prototype._error=function(a){var c=this.destination;c.error&&c.error(a)};c.prototype._complete=function(){var a=this.destination;a.complete&&a.complete()};c.prototype.next=function(a){this.isUnsubscribed||this._next(a)};c.prototype.error=function(a){this.isUnsubscribed||(this._error(a),this.unsubscribe())};c.prototype.complete=
|
||||
function(){this.isUnsubscribed||(this._complete(),this.unsubscribe())};return c}(b.Subscription);e.Subscriber=a},{"./Subscription":8,"./symbol/rxSubscriber":221,"./util/noop":236,"./util/throwError":240,"./util/tryOrOnError":242}],8:[function(a,b,e){var h=a("./util/noop");a=function(){function a(b){this.isUnsubscribed=!1;b&&(this._unsubscribe=b)}a.prototype._unsubscribe=function(){h.noop()};a.prototype.unsubscribe=function(){if(!this.isUnsubscribed){this.isUnsubscribed=!0;var a=this._unsubscribe,
|
||||
b=this._subscriptions;this._subscriptions=void 0;a&&a.call(this);if(null!=b)for(var a=-1,f=b.length;++a<f;)b[a].unsubscribe()}};a.prototype.add=function(b){if(b&&b!==this&&b!==a.EMPTY){var l=b;switch(typeof b){case "function":l=new a(b);case "object":if(l.isUnsubscribed||"function"!==typeof l.unsubscribe)break;else this.isUnsubscribed?l.unsubscribe():(this._subscriptions||(this._subscriptions=[])).push(l);break;default:throw Error("Unrecognized subscription "+b+" added to Subscription.");}}};a.prototype.remove=
|
||||
function(b){if(null!=b&&b!==this&&b!==a.EMPTY){var l=this._subscriptions;l&&(b=l.indexOf(b),-1!==b&&l.splice(b,1))}};a.EMPTY=function(a){a.isUnsubscribed=!0;return a}(new a);return a}();e.Subscription=a},{"./util/noop":236}],9:[function(a,b,e){b=a("../../Observable");a=a("../../observable/bindCallback");b.Observable.bindCallback=a.BoundCallbackObservable.create},{"../../Observable":3,"../../observable/bindCallback":107}],10:[function(a,b,e){b=a("../../Observable");a=a("../../observable/defer");b.Observable.defer=
|
||||
a.DeferObservable.create},{"../../Observable":3,"../../observable/defer":108}],11:[function(a,b,e){b=a("../../Observable");a=a("../../observable/empty");b.Observable.empty=a.EmptyObservable.create},{"../../Observable":3,"../../observable/empty":109}],12:[function(a,b,e){b=a("../../Observable");a=a("../../observable/forkJoin");b.Observable.forkJoin=a.ForkJoinObservable.create},{"../../Observable":3,"../../observable/forkJoin":110}],13:[function(a,b,e){b=a("../../Observable");a=a("../../observable/from");
|
||||
b.Observable.from=a.FromObservable.create},{"../../Observable":3,"../../observable/from":111}],14:[function(a,b,e){b=a("../../Observable");a=a("../../observable/fromArray");b.Observable.fromArray=a.ArrayObservable.create;b.Observable.of=a.ArrayObservable.of},{"../../Observable":3,"../../observable/fromArray":112}],15:[function(a,b,e){b=a("../../Observable");a=a("../../observable/fromEvent");b.Observable.fromEvent=a.FromEventObservable.create},{"../../Observable":3,"../../observable/fromEvent":113}],
|
||||
16:[function(a,b,e){b=a("../../Observable");a=a("../../observable/fromEventPattern");b.Observable.fromEventPattern=a.FromEventPatternObservable.create},{"../../Observable":3,"../../observable/fromEventPattern":114}],17:[function(a,b,e){b=a("../../Observable");a=a("../../observable/fromPromise");b.Observable.fromPromise=a.PromiseObservable.create},{"../../Observable":3,"../../observable/fromPromise":115}],18:[function(a,b,e){b=a("../../Observable");a=a("../../observable/interval");b.Observable.interval=
|
||||
a.IntervalObservable.create},{"../../Observable":3,"../../observable/interval":116}],19:[function(a,b,e){b=a("../../Observable");a=a("../../observable/never");b.Observable.never=a.InfiniteObservable.create},{"../../Observable":3,"../../observable/never":117}],20:[function(a,b,e){b=a("../../Observable");a=a("../../observable/range");b.Observable.range=a.RangeObservable.create},{"../../Observable":3,"../../observable/range":118}],21:[function(a,b,e){b=a("../../Observable");a=a("../../observable/throw");
|
||||
b.Observable.throw=a.ErrorObservable.create},{"../../Observable":3,"../../observable/throw":119}],22:[function(a,b,e){b=a("../../Observable");a=a("../../observable/timer");b.Observable.timer=a.TimerObservable.create},{"../../Observable":3,"../../observable/timer":120}],23:[function(a,b,e){b=a("../../Observable");a=a("../../operator/buffer");b.Observable.prototype.buffer=a.buffer},{"../../Observable":3,"../../operator/buffer":121}],24:[function(a,b,e){b=a("../../Observable");a=a("../../operator/bufferCount");
|
||||
b.Observable.prototype.bufferCount=a.bufferCount},{"../../Observable":3,"../../operator/bufferCount":122}],25:[function(a,b,e){b=a("../../Observable");a=a("../../operator/bufferTime");b.Observable.prototype.bufferTime=a.bufferTime},{"../../Observable":3,"../../operator/bufferTime":123}],26:[function(a,b,e){b=a("../../Observable");a=a("../../operator/bufferToggle");b.Observable.prototype.bufferToggle=a.bufferToggle},{"../../Observable":3,"../../operator/bufferToggle":124}],27:[function(a,b,e){b=a("../../Observable");
|
||||
a=a("../../operator/bufferWhen");b.Observable.prototype.bufferWhen=a.bufferWhen},{"../../Observable":3,"../../operator/bufferWhen":125}],28:[function(a,b,e){b=a("../../Observable");a=a("../../operator/catch");b.Observable.prototype.catch=a._catch},{"../../Observable":3,"../../operator/catch":126}],29:[function(a,b,e){b=a("../../Observable");a=a("../../operator/combineAll");b.Observable.prototype.combineAll=a.combineAll},{"../../Observable":3,"../../operator/combineAll":127}],30:[function(a,b,e){b=
|
||||
a("../../Observable");a=a("../../operator/combineLatest-static");b.Observable.combineLatest=a.combineLatest},{"../../Observable":3,"../../operator/combineLatest-static":128}],31:[function(a,b,e){b=a("../../Observable");a=a("../../operator/combineLatest");b.Observable.prototype.combineLatest=a.combineLatest},{"../../Observable":3,"../../operator/combineLatest":130}],32:[function(a,b,e){b=a("../../Observable");a=a("../../operator/concat-static");b.Observable.concat=a.concat},{"../../Observable":3,"../../operator/concat-static":131}],
|
||||
33:[function(a,b,e){b=a("../../Observable");a=a("../../operator/concat");b.Observable.prototype.concat=a.concat},{"../../Observable":3,"../../operator/concat":132}],34:[function(a,b,e){b=a("../../Observable");a=a("../../operator/concatAll");b.Observable.prototype.concatAll=a.concatAll},{"../../Observable":3,"../../operator/concatAll":133}],35:[function(a,b,e){b=a("../../Observable");a=a("../../operator/concatMap");b.Observable.prototype.concatMap=a.concatMap},{"../../Observable":3,"../../operator/concatMap":134}],
|
||||
36:[function(a,b,e){b=a("../../Observable");a=a("../../operator/concatMapTo");b.Observable.prototype.concatMapTo=a.concatMapTo},{"../../Observable":3,"../../operator/concatMapTo":135}],37:[function(a,b,e){b=a("../../Observable");a=a("../../operator/count");b.Observable.prototype.count=a.count},{"../../Observable":3,"../../operator/count":136}],38:[function(a,b,e){b=a("../../Observable");a=a("../../operator/debounce");b.Observable.prototype.debounce=a.debounce},{"../../Observable":3,"../../operator/debounce":137}],
|
||||
39:[function(a,b,e){b=a("../../Observable");a=a("../../operator/debounceTime");b.Observable.prototype.debounceTime=a.debounceTime},{"../../Observable":3,"../../operator/debounceTime":138}],40:[function(a,b,e){b=a("../../Observable");a=a("../../operator/defaultIfEmpty");b.Observable.prototype.defaultIfEmpty=a.defaultIfEmpty},{"../../Observable":3,"../../operator/defaultIfEmpty":139}],41:[function(a,b,e){b=a("../../Observable");a=a("../../operator/delay");b.Observable.prototype.delay=a.delay},{"../../Observable":3,
|
||||
"../../operator/delay":140}],42:[function(a,b,e){b=a("../../Observable");a=a("../../operator/dematerialize");b.Observable.prototype.dematerialize=a.dematerialize},{"../../Observable":3,"../../operator/dematerialize":141}],43:[function(a,b,e){b=a("../../Observable");a=a("../../operator/distinctUntilChanged");b.Observable.prototype.distinctUntilChanged=a.distinctUntilChanged},{"../../Observable":3,"../../operator/distinctUntilChanged":142}],44:[function(a,b,e){b=a("../../Observable");a=a("../../operator/do");
|
||||
b.Observable.prototype.do=a._do},{"../../Observable":3,"../../operator/do":143}],45:[function(a,b,e){b=a("../../Observable");a=a("../../operator/every");b.Observable.prototype.every=a.every},{"../../Observable":3,"../../operator/every":144}],46:[function(a,b,e){b=a("../../Observable");a=a("../../operator/expand");b.Observable.prototype.expand=a.expand},{"../../Observable":3,"../../operator/expand":146}],47:[function(a,b,e){b=a("../../Observable");a=a("../../operator/filter");b.Observable.prototype.filter=
|
||||
a.filter},{"../../Observable":3,"../../operator/filter":147}],48:[function(a,b,e){b=a("../../Observable");a=a("../../operator/finally");b.Observable.prototype.finally=a._finally},{"../../Observable":3,"../../operator/finally":148}],49:[function(a,b,e){b=a("../../Observable");a=a("../../operator/first");b.Observable.prototype.first=a.first},{"../../Observable":3,"../../operator/first":149}],50:[function(a,b,e){b=a("../../Observable");a=a("../../operator/groupBy");b.Observable.prototype.groupBy=a.groupBy},
|
||||
{"../../Observable":3,"../../operator/groupBy":151}],51:[function(a,b,e){b=a("../../Observable");a=a("../../operator/ignoreElements");b.Observable.prototype.ignoreElements=a.ignoreElements},{"../../Observable":3,"../../operator/ignoreElements":152}],52:[function(a,b,e){b=a("../../Observable");a=a("../../operator/last");b.Observable.prototype.last=a.last},{"../../Observable":3,"../../operator/last":153}],53:[function(a,b,e){b=a("../../Observable");a=a("../../operator/map");b.Observable.prototype.map=
|
||||
a.map},{"../../Observable":3,"../../operator/map":154}],54:[function(a,b,e){b=a("../../Observable");a=a("../../operator/mapTo");b.Observable.prototype.mapTo=a.mapTo},{"../../Observable":3,"../../operator/mapTo":155}],55:[function(a,b,e){b=a("../../Observable");a=a("../../operator/materialize");b.Observable.prototype.materialize=a.materialize},{"../../Observable":3,"../../operator/materialize":156}],56:[function(a,b,e){b=a("../../Observable");a=a("../../operator/merge-static");b.Observable.merge=a.merge},
|
||||
{"../../Observable":3,"../../operator/merge-static":157}],57:[function(a,b,e){b=a("../../Observable");a=a("../../operator/merge");b.Observable.prototype.merge=a.merge},{"../../Observable":3,"../../operator/merge":158}],58:[function(a,b,e){b=a("../../Observable");a=a("../../operator/mergeAll");b.Observable.prototype.mergeAll=a.mergeAll},{"../../Observable":3,"../../operator/mergeAll":160}],59:[function(a,b,e){b=a("../../Observable");a=a("../../operator/mergeMap");b.Observable.prototype.mergeMap=a.mergeMap;
|
||||
b.Observable.prototype.flatMap=a.mergeMap},{"../../Observable":3,"../../operator/mergeMap":162}],60:[function(a,b,e){b=a("../../Observable");a=a("../../operator/mergeMapTo");b.Observable.prototype.mergeMapTo=a.mergeMapTo},{"../../Observable":3,"../../operator/mergeMapTo":164}],61:[function(a,b,e){b=a("../../Observable");a=a("../../operator/multicast");b.Observable.prototype.multicast=a.multicast},{"../../Observable":3,"../../operator/multicast":165}],62:[function(a,b,e){b=a("../../Observable");a=
|
||||
a("../../operator/observeOn");b.Observable.prototype.observeOn=a.observeOn},{"../../Observable":3,"../../operator/observeOn":167}],63:[function(a,b,e){b=a("../../Observable");a=a("../../operator/partition");b.Observable.prototype.partition=a.partition},{"../../Observable":3,"../../operator/partition":168}],64:[function(a,b,e){b=a("../../Observable");a=a("../../operator/publish");b.Observable.prototype.publish=a.publish},{"../../Observable":3,"../../operator/publish":169}],65:[function(a,b,e){b=a("../../Observable");
|
||||
a=a("../../operator/publishBehavior");b.Observable.prototype.publishBehavior=a.publishBehavior},{"../../Observable":3,"../../operator/publishBehavior":170}],66:[function(a,b,e){b=a("../../Observable");a=a("../../operator/publishLast");b.Observable.prototype.publishLast=a.publishLast},{"../../Observable":3,"../../operator/publishLast":171}],67:[function(a,b,e){b=a("../../Observable");a=a("../../operator/publishReplay");b.Observable.prototype.publishReplay=a.publishReplay},{"../../Observable":3,"../../operator/publishReplay":172}],
|
||||
68:[function(a,b,e){b=a("../../Observable");a=a("../../operator/reduce");b.Observable.prototype.reduce=a.reduce},{"../../Observable":3,"../../operator/reduce":174}],69:[function(a,b,e){b=a("../../Observable");a=a("../../operator/repeat");b.Observable.prototype.repeat=a.repeat},{"../../Observable":3,"../../operator/repeat":175}],70:[function(a,b,e){b=a("../../Observable");a=a("../../operator/retry");b.Observable.prototype.retry=a.retry},{"../../Observable":3,"../../operator/retry":176}],71:[function(a,
|
||||
b,e){b=a("../../Observable");a=a("../../operator/retryWhen");b.Observable.prototype.retryWhen=a.retryWhen},{"../../Observable":3,"../../operator/retryWhen":177}],72:[function(a,b,e){b=a("../../Observable");a=a("../../operator/sample");b.Observable.prototype.sample=a.sample},{"../../Observable":3,"../../operator/sample":178}],73:[function(a,b,e){b=a("../../Observable");a=a("../../operator/sampleTime");b.Observable.prototype.sampleTime=a.sampleTime},{"../../Observable":3,"../../operator/sampleTime":179}],
|
||||
74:[function(a,b,e){b=a("../../Observable");a=a("../../operator/scan");b.Observable.prototype.scan=a.scan},{"../../Observable":3,"../../operator/scan":180}],75:[function(a,b,e){b=a("../../Observable");a=a("../../operator/share");b.Observable.prototype.share=a.share},{"../../Observable":3,"../../operator/share":181}],76:[function(a,b,e){b=a("../../Observable");a=a("../../operator/single");b.Observable.prototype.single=a.single},{"../../Observable":3,"../../operator/single":182}],77:[function(a,b,e){b=
|
||||
a("../../Observable");a=a("../../operator/skip");b.Observable.prototype.skip=a.skip},{"../../Observable":3,"../../operator/skip":183}],78:[function(a,b,e){b=a("../../Observable");a=a("../../operator/skipUntil");b.Observable.prototype.skipUntil=a.skipUntil},{"../../Observable":3,"../../operator/skipUntil":184}],79:[function(a,b,e){b=a("../../Observable");a=a("../../operator/skipWhile");b.Observable.prototype.skipWhile=a.skipWhile},{"../../Observable":3,"../../operator/skipWhile":185}],80:[function(a,
|
||||
b,e){b=a("../../Observable");a=a("../../operator/startWith");b.Observable.prototype.startWith=a.startWith},{"../../Observable":3,"../../operator/startWith":186}],81:[function(a,b,e){b=a("../../Observable");a=a("../../operator/subscribeOn");b.Observable.prototype.subscribeOn=a.subscribeOn},{"../../Observable":3,"../../operator/subscribeOn":187}],82:[function(a,b,e){b=a("../../Observable");a=a("../../operator/switch");b.Observable.prototype.switch=a._switch},{"../../Observable":3,"../../operator/switch":188}],
|
||||
83:[function(a,b,e){b=a("../../Observable");a=a("../../operator/switchMap");b.Observable.prototype.switchMap=a.switchMap},{"../../Observable":3,"../../operator/switchMap":189}],84:[function(a,b,e){b=a("../../Observable");a=a("../../operator/switchMapTo");b.Observable.prototype.switchMapTo=a.switchMapTo},{"../../Observable":3,"../../operator/switchMapTo":190}],85:[function(a,b,e){b=a("../../Observable");a=a("../../operator/take");b.Observable.prototype.take=a.take},{"../../Observable":3,"../../operator/take":191}],
|
||||
86:[function(a,b,e){b=a("../../Observable");a=a("../../operator/takeUntil");b.Observable.prototype.takeUntil=a.takeUntil},{"../../Observable":3,"../../operator/takeUntil":192}],87:[function(a,b,e){b=a("../../Observable");a=a("../../operator/takeWhile");b.Observable.prototype.takeWhile=a.takeWhile},{"../../Observable":3,"../../operator/takeWhile":193}],88:[function(a,b,e){b=a("../../Observable");a=a("../../operator/throttle");b.Observable.prototype.throttle=a.throttle},{"../../Observable":3,"../../operator/throttle":194}],
|
||||
89:[function(a,b,e){b=a("../../Observable");a=a("../../operator/throttleTime");b.Observable.prototype.throttleTime=a.throttleTime},{"../../Observable":3,"../../operator/throttleTime":195}],90:[function(a,b,e){b=a("../../Observable");a=a("../../operator/timeout");b.Observable.prototype.timeout=a.timeout},{"../../Observable":3,"../../operator/timeout":196}],91:[function(a,b,e){b=a("../../Observable");a=a("../../operator/timeoutWith");b.Observable.prototype.timeoutWith=a.timeoutWith},{"../../Observable":3,
|
||||
"../../operator/timeoutWith":197}],92:[function(a,b,e){b=a("../../Observable");a=a("../../operator/toArray");b.Observable.prototype.toArray=a.toArray},{"../../Observable":3,"../../operator/toArray":198}],93:[function(a,b,e){b=a("../../Observable");a=a("../../operator/toPromise");b.Observable.prototype.toPromise=a.toPromise},{"../../Observable":3,"../../operator/toPromise":199}],94:[function(a,b,e){b=a("../../Observable");a=a("../../operator/window");b.Observable.prototype.window=a.window},{"../../Observable":3,
|
||||
"../../operator/window":200}],95:[function(a,b,e){b=a("../../Observable");a=a("../../operator/windowCount");b.Observable.prototype.windowCount=a.windowCount},{"../../Observable":3,"../../operator/windowCount":201}],96:[function(a,b,e){b=a("../../Observable");a=a("../../operator/windowTime");b.Observable.prototype.windowTime=a.windowTime},{"../../Observable":3,"../../operator/windowTime":202}],97:[function(a,b,e){b=a("../../Observable");a=a("../../operator/windowToggle");b.Observable.prototype.windowToggle=
|
||||
a.windowToggle},{"../../Observable":3,"../../operator/windowToggle":203}],98:[function(a,b,e){b=a("../../Observable");a=a("../../operator/windowWhen");b.Observable.prototype.windowWhen=a.windowWhen},{"../../Observable":3,"../../operator/windowWhen":204}],99:[function(a,b,e){b=a("../../Observable");a=a("../../operator/withLatestFrom");b.Observable.prototype.withLatestFrom=a.withLatestFrom},{"../../Observable":3,"../../operator/withLatestFrom":205}],100:[function(a,b,e){b=a("../../Observable");a=a("../../operator/zip-static");
|
||||
b.Observable.zip=a.zip},{"../../Observable":3,"../../operator/zip-static":206}],101:[function(a,b,e){b=a("../../Observable");a=a("../../operator/zip");b.Observable.prototype.zip=a.zipProto},{"../../Observable":3,"../../operator/zip":208}],102:[function(a,b,e){b=a("../../Observable");a=a("../../operator/zipAll");b.Observable.prototype.zipAll=a.zipAll},{"../../Observable":3,"../../operator/zipAll":209}],103:[function(a,b,e){var h=this&&this.__extends||function(a,g){function n(){this.constructor=a}for(var d in g)g.hasOwnProperty(d)&&
|
||||
(a[d]=g[d]);a.prototype=null===g?Object.create(g):(n.prototype=g.prototype,new n)};b=a("../Observable");var k=a("../Subscription");a=a("../Subscriber");var m=function(a){function g(n,g){a.call(this);this.source=n;this.subjectFactory=g}h(g,a);g.prototype._subscribe=function(a){return this._getSubject().subscribe(a)};g.prototype._getSubject=function(){var a=this.subject;return a&&!a.isUnsubscribed?a:this.subject=this.subjectFactory()};g.prototype.connect=function(){var a=this.subscription;if(a&&!a.isUnsubscribed)return a;
|
||||
a=this.source.subscribe(this._getSubject());a.add(new l(this));return this.subscription=a};g.prototype.refCount=function(){return new f(this)};return g}(b.Observable);e.ConnectableObservable=m;var l=function(a){function g(g){a.call(this);this.connectable=g}h(g,a);g.prototype._unsubscribe=function(){var a=this.connectable;a.subject=void 0;this.connectable=a.subscription=void 0};return g}(k.Subscription),f=function(a){function g(g,d){void 0===d&&(d=0);a.call(this);this.connectable=g;this.refCount=d}
|
||||
h(g,a);g.prototype._subscribe=function(a){var c=this.connectable;a=new d(a,this);var g=c.subscribe(a);g.isUnsubscribed||1!==++this.refCount||(a.connection=this.connection=c.connect());return g};return g}(b.Observable),d=function(a){function g(g,d){a.call(this,null);this.destination=g;this.refCountObservable=d;this.connection=d.connection;g.add(this)}h(g,a);g.prototype._next=function(a){this.destination.next(a)};g.prototype._error=function(a){this._resetConnectable();this.destination.error(a)};g.prototype._complete=
|
||||
function(){this._resetConnectable();this.destination.complete()};g.prototype._resetConnectable=function(){var a=this.refCountObservable,c=a.connection,g=this.connection;g&&g===c&&(a.refCount=0,c.unsubscribe(),a.connection=void 0,this.unsubscribe())};g.prototype._unsubscribe=function(){var a=this.refCountObservable;if(0!==a.refCount&&0===--a.refCount){var c=a.connection,g=this.connection;g&&g===c&&(c.unsubscribe(),a.connection=void 0)}};return g}(a.Subscriber)},{"../Observable":3,"../Subscriber":7,
|
||||
"../Subscription":8}],104:[function(a,b,e){var h=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===c?Object.create(c):(g.prototype=c.prototype,new g)};b=a("../Observable");var k=a("../util/root"),m=a("../util/SymbolShim"),l=a("../util/tryCatch"),f=a("../util/errorObject");a=function(a){function g(f,b,p,l){a.call(this);this.project=b;this.thisArg=p;this.scheduler=l;if(null==f)throw Error("iterator cannot be null.");
|
||||
if(b&&"function"!==typeof b)throw Error("When provided, `project` must be a function.");if((b=f[m.SymbolShim.iterator])||"string"!==typeof f)if(b||void 0===f.length){if(!b)throw new TypeError("Object is not iterable");f=f[m.SymbolShim.iterator]()}else f=new c(f);else f=new d(f);this.iterator=f}h(g,a);g.create=function(a,c,d,n){return new g(a,c,d,n)};g.dispatch=function(a){var c=a.index,g=a.thisArg,d=a.project,n=a.iterator,b=a.subscriber;a.hasError?b.error(a.error):(n=n.next(),n.done?b.complete():
|
||||
(d?(n=l.tryCatch(d).call(g,n.value,c),n===f.errorObject?(a.error=f.errorObject.e,a.hasError=!0):(b.next(n),a.index=c+1)):(b.next(n.value),a.index=c+1),b.isUnsubscribed||this.schedule(a)))};g.prototype._subscribe=function(a){var c=0,d=this.iterator,n=this.project,b=this.thisArg,m=this.scheduler;if(m)a.add(m.schedule(g.dispatch,0,{index:c,thisArg:b,project:n,iterator:d,subscriber:a}));else{do{m=d.next();if(m.done){a.complete();break}else if(n){m=l.tryCatch(n).call(b,m.value,c++);if(m===f.errorObject){a.error(f.errorObject.e);
|
||||
break}a.next(m)}else a.next(m.value);if(a.isUnsubscribed)break}while(1)}};return g}(b.Observable);e.IteratorObservable=a;var d=function(){function a(c,g,d){void 0===g&&(g=0);void 0===d&&(d=c.length);this.str=c;this.idx=g;this.len=d}a.prototype[m.SymbolShim.iterator]=function(){return this};a.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}};return a}(),c=function(){function a(c,d,n){void 0===d&&(d=0);if(void 0===n)if(n=+c.length,
|
||||
isNaN(n))n=0;else if(0!==n&&"number"===typeof n&&k.root.isFinite(n)){var f;f=+n;f=0===f?f:isNaN(f)?f:0>f?-1:1;n=f*Math.floor(Math.abs(n));n=0>=n?0:n>g?g:n}this.arr=c;this.idx=d;this.len=n}a.prototype[m.SymbolShim.iterator]=function(){return this};a.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}};return a}(),g=Math.pow(2,53)-1},{"../Observable":3,"../util/SymbolShim":229,"../util/errorObject":230,"../util/root":238,"../util/tryCatch":241}],
|
||||
105:[function(a,b,e){var h=this&&this.__extends||function(a,g){function d(){this.constructor=a}for(var f in g)g.hasOwnProperty(f)&&(a[f]=g[f]);a.prototype=null===g?Object.create(g):(d.prototype=g.prototype,new d)};b=a("../Observable");var k=a("../util/tryCatch"),m=a("../util/errorObject"),l=a("./throw"),f=a("./empty"),d=function(a){function g(g,d){a.call(this);this.value=g;this.scheduler=d;this._isScalar=!0}h(g,a);g.create=function(a,c){return new g(a,c)};g.dispatch=function(a){var c=a.value,g=a.subscriber;
|
||||
a.done?g.complete():(g.next(c),g.isUnsubscribed||(a.done=!0,this.schedule(a)))};g.prototype._subscribe=function(a){var c=this.value,d=this.scheduler;d?a.add(d.schedule(g.dispatch,0,{done:!1,value:c,subscriber:a})):(a.next(c),a.isUnsubscribed||a.complete())};return g}(b.Observable);e.ScalarObservable=d;a=d.prototype;a.map=function(a,g){return k.tryCatch(a).call(g||this,this.value,0)===m.errorObject?new l.ErrorObservable(m.errorObject.e):new d(a.call(g||this,this.value,0))};a.filter=function(a,g){var d=
|
||||
k.tryCatch(a).call(g||this,this.value,0);return d===m.errorObject?new l.ErrorObservable(m.errorObject.e):d?this:new f.EmptyObservable};a.reduce=function(a,g){if("undefined"===typeof g)return this;var n=k.tryCatch(a)(g,this.value);return n===m.errorObject?new l.ErrorObservable(m.errorObject.e):new d(n)};a.scan=function(a,g){return this.reduce(a,g)};a.count=function(a){return a?(a=k.tryCatch(a).call(this,this.value,0,this),a===m.errorObject?new l.ErrorObservable(m.errorObject.e):new d(a?1:0)):new d(1)};
|
||||
a.skip=function(a){return 0<a?new f.EmptyObservable:this};a.take=function(a){return 0<a?this:new f.EmptyObservable}},{"../Observable":3,"../util/errorObject":230,"../util/tryCatch":241,"./empty":109,"./throw":119}],106:[function(a,b,e){var h=this&&this.__extends||function(a,f){function d(){this.constructor=a}for(var c in f)f.hasOwnProperty(c)&&(a[c]=f[c]);a.prototype=null===f?Object.create(f):(d.prototype=f.prototype,new d)};b=a("../Observable");var k=a("../scheduler/asap"),m=a("../util/isNumeric");
|
||||
a=function(a){function f(d,c,g){void 0===c&&(c=0);void 0===g&&(g=k.asap);a.call(this);this.source=d;this.delayTime=c;this.scheduler=g;if(!m.isNumeric(c)||0>c)this.delayTime=0;g&&"function"===typeof g.schedule||(this.scheduler=k.asap)}h(f,a);f.create=function(a,c,g){void 0===c&&(c=0);void 0===g&&(g=k.asap);return new f(a,c,g)};f.dispatch=function(a){return a.source.subscribe(a.subscriber)};f.prototype._subscribe=function(a){a.add(this.scheduler.schedule(f.dispatch,this.delayTime,{source:this.source,
|
||||
subscriber:a}))};return f}(b.Observable);e.SubscribeOnObservable=a},{"../Observable":3,"../scheduler/asap":215,"../util/isNumeric":233}],107:[function(a,b,e){function h(a){var n=a.source;a=a.subscriber;var b=n.callbackFunc,l=n.args,e=n.scheduler,h=n.subject;if(!h){var h=n.subject=new c.AsyncSubject,r=function u(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];var g=u.source,c=g.selector,g=g.subject;c?(a=f.tryCatch(c).apply(this,a),a===d.errorObject?g.add(e.schedule(m,0,{err:d.errorObject.e,
|
||||
subject:g})):g.add(e.schedule(k,0,{value:a,subject:g}))):g.add(e.schedule(k,0,{value:1===a.length?a[0]:a,subject:g}))};r.source=n;f.tryCatch(b).apply(this,l.concat(r))===d.errorObject&&h.error(d.errorObject.e)}this.add(h.subscribe(a))}function k(a){var c=a.subject;c.next(a.value);c.complete()}function m(a){a.subject.error(a.err)}var l=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(d.prototype=
|
||||
c.prototype,new d)};b=a("../Observable");var f=a("../util/tryCatch"),d=a("../util/errorObject"),c=a("../subject/AsyncSubject");a=function(a){function n(c,d,n,f){a.call(this);this.callbackFunc=c;this.selector=d;this.args=n;this.scheduler=f}l(n,a);n.create=function(a,c,g){void 0===c&&(c=void 0);return function(){for(var d=[],f=0;f<arguments.length;f++)d[f-0]=arguments[f];return new n(a,c,d,g)}};n.prototype._subscribe=function(a){var g=this.callbackFunc,n=this.args,b=this.scheduler,l=this.subject;if(b)return a.add(b.schedule(h,
|
||||
0,{source:this,subscriber:a})),a;l||(l=this.subject=new c.AsyncSubject,b=function u(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];var g=u.source,c=g.selector,g=g.subject;c?(a=f.tryCatch(c).apply(this,a),a===d.errorObject?g.error(d.errorObject.e):(g.next(a),g.complete())):(g.next(1===a.length?a[0]:a),g.complete())},b.source=this,f.tryCatch(g).apply(this,n.concat(b))===d.errorObject&&l.error(d.errorObject.e));return l.subscribe(a)};return n}(b.Observable);e.BoundCallbackObservable=a},
|
||||
{"../Observable":3,"../subject/AsyncSubject":217,"../util/errorObject":230,"../util/tryCatch":241}],108:[function(a,b,e){var h=this&&this.__extends||function(a,f){function d(){this.constructor=a}for(var c in f)f.hasOwnProperty(c)&&(a[c]=f[c]);a.prototype=null===f?Object.create(f):(d.prototype=f.prototype,new d)};b=a("../Observable");var k=a("../util/tryCatch"),m=a("../util/errorObject");a=function(a){function f(d){a.call(this);this.observableFactory=d}h(f,a);f.create=function(a){return new f(a)};
|
||||
f.prototype._subscribe=function(a){var c=k.tryCatch(this.observableFactory)();c===m.errorObject?a.error(m.errorObject.e):c.subscribe(a)};return f}(b.Observable);e.DeferObservable=a},{"../Observable":3,"../util/errorObject":230,"../util/tryCatch":241}],109:[function(a,b,e){var h=this&&this.__extends||function(a,b){function l(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(l.prototype=b.prototype,new l)};a=function(a){function b(l){a.call(this);
|
||||
this.scheduler=l}h(b,a);b.create=function(a){return new b(a)};b.dispatch=function(a){a.subscriber.complete()};b.prototype._subscribe=function(a){var f=this.scheduler;f?a.add(f.schedule(b.dispatch,0,{subscriber:a})):a.complete()};return b}(a("../Observable").Observable);e.EmptyObservable=a},{"../Observable":3}],110:[function(a,b,e){function h(a){return null!==a}var k=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===
|
||||
c?Object.create(c):(g.prototype=c.prototype,new g)},m=a("../Observable");b=a("../Subscriber");var l=a("./fromPromise"),f=a("./empty"),d=a("../util/isPromise"),c=a("../util/isArray");a=function(a){function b(c,g){a.call(this);this.sources=c;this.resultSelector=g}k(b,a);b.create=function(){for(var a=[],g=0;g<arguments.length;g++)a[g-0]=arguments[g];if(null===a||0===arguments.length)return new f.EmptyObservable;g=null;"function"===typeof a[a.length-1]&&(g=a.pop());1===a.length&&c.isArray(a[0])&&(a=a[0]);
|
||||
return new b(a,g)};b.prototype._subscribe=function(a){for(var c=this.sources,n=c.length,f=[],b=0;b<n;b++)f.push(null);f={completed:0,total:n,values:f,selector:this.resultSelector};for(b=0;b<n;b++){var p=c[b];d.isPromise(p)&&(p=new l.PromiseObservable(p));p.subscribe(new g(a,b,f))}};return b}(m.Observable);e.ForkJoinObservable=a;var g=function(a){function c(g,d,f){a.call(this,g);this.index=d;this.context=f;this._value=null}k(c,a);c.prototype._next=function(a){this._value=a};c.prototype._complete=function(){var a=
|
||||
this.destination;null==this._value&&a.complete();var c=this.context;c.completed++;c.values[this.index]=this._value;var g=c.values;c.completed===g.length&&(g.every(h)&&(c=c.selector?c.selector.apply(this,g):g,a.next(c)),a.complete())};return c}(b.Subscriber)},{"../Observable":3,"../Subscriber":7,"../util/isArray":231,"../util/isPromise":234,"./empty":109,"./fromPromise":115}],111:[function(a,b,e){var h=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&
|
||||
(a[d]=c[d]);a.prototype=null===c?Object.create(c):(g.prototype=c.prototype,new g)},k=a("./fromPromise"),m=a("./IteratorObservable"),l=a("./fromArray"),f=a("../util/SymbolShim"),d=a("../Observable"),c=a("../operator/observeOn-support"),g=a("../scheduler/queue"),n=Array.isArray;a=function(a){function b(c,g){a.call(this,null);this.ish=c;this.scheduler=g}h(b,a);b.create=function(a,c){void 0===c&&(c=g.queue);if(a){if(n(a))return new l.ArrayObservable(a,c);if("function"===typeof a.then)return new k.PromiseObservable(a,
|
||||
c);if("function"===typeof a[f.SymbolShim.observable])return a instanceof d.Observable?a:new b(a,c);if("function"===typeof a[f.SymbolShim.iterator])return new m.IteratorObservable(a,null,null,c)}throw new TypeError(typeof a+" is not observable");};b.prototype._subscribe=function(a){var d=this.ish,n=this.scheduler;return n===g.queue?d[f.SymbolShim.observable]().subscribe(a):d[f.SymbolShim.observable]().subscribe(new c.ObserveOnSubscriber(a,n,0))};return b}(d.Observable);e.FromObservable=a},{"../Observable":3,
|
||||
"../operator/observeOn-support":166,"../scheduler/queue":216,"../util/SymbolShim":229,"./IteratorObservable":104,"./fromArray":112,"./fromPromise":115}],112:[function(a,b,e){var h=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var g in d)d.hasOwnProperty(g)&&(a[g]=d[g]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Observable");var k=a("./ScalarObservable"),m=a("./empty"),l=a("../util/isScheduler");a=function(a){function d(c,g){a.call(this);
|
||||
this.array=c;this.scheduler=g;g||1!==c.length||(this._isScalar=!0,this.value=c[0])}h(d,a);d.create=function(a,g){return new d(a,g)};d.of=function(){for(var a=[],g=0;g<arguments.length;g++)a[g-0]=arguments[g];g=a[a.length-1];l.isScheduler(g)?a.pop():g=void 0;var n=a.length;return 1<n?new d(a,g):1===n?new k.ScalarObservable(a[0],g):new m.EmptyObservable(g)};d.dispatch=function(a){var g=a.array,d=a.index,f=a.subscriber;d>=a.count?f.complete():(f.next(g[d]),f.isUnsubscribed||(a.index=d+1,this.schedule(a)))};
|
||||
d.prototype._subscribe=function(a){var g=this.array,n=g.length,f=this.scheduler;if(f)a.add(f.schedule(d.dispatch,0,{array:g,index:0,count:n,subscriber:a}));else{for(f=0;f<n&&!a.isUnsubscribed;f++)a.next(g[f]);a.complete()}};return d}(b.Observable);e.ArrayObservable=a},{"../Observable":3,"../util/isScheduler":235,"./ScalarObservable":105,"./empty":109}],113:[function(a,b,e){var h=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var g in d)d.hasOwnProperty(g)&&(a[g]=d[g]);a.prototype=
|
||||
null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Observable");var k=a("../util/tryCatch"),m=a("../util/errorObject"),l=a("../Subscription");a=function(a){function d(c,g,d){a.call(this);this.sourceObj=c;this.eventName=g;this.selector=d}h(d,a);d.create=function(a,g,n){return new d(a,g,n)};d.setupSubscription=function(a,g,n,f){var b,e=a.toString();if("[object NodeList]"===e||"[object HTMLCollection]"===e)for(var e=0,m=a.length;e<m;e++)d.setupSubscription(a[e],g,n,f);else"function"===
|
||||
typeof a.addEventListener&&"function"===typeof a.removeEventListener?(a.addEventListener(g,n),b=function(){return a.removeEventListener(g,n)}):"function"===typeof a.on&&"function"===typeof a.off?(a.on(g,n),b=function(){return a.off(g,n)}):"function"===typeof a.addListener&&"function"===typeof a.removeListener&&(a.addListener(g,n),b=function(){return a.removeListener(g,n)});f.add(new l.Subscription(b))};d.prototype._subscribe=function(a){var g=this.selector;d.setupSubscription(this.sourceObj,this.eventName,
|
||||
g?function(d){d=k.tryCatch(g)(d);d===m.errorObject?a.error(d.e):a.next(d)}:function(g){return a.next(g)},a)};return d}(b.Observable);e.FromEventObservable=a},{"../Observable":3,"../Subscription":8,"../util/errorObject":230,"../util/tryCatch":241}],114:[function(a,b,e){var h=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var g in d)d.hasOwnProperty(g)&&(a[g]=d[g]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Observable");var k=a("../Subscription"),
|
||||
m=a("../util/tryCatch"),l=a("../util/errorObject");a=function(a){function d(c,g,d){a.call(this);this.addHandler=c;this.removeHandler=g;this.selector=d}h(d,a);d.create=function(a,g,n){return new d(a,g,n)};d.prototype._subscribe=function(a){var g=this.removeHandler,d=this.selector,f=d?function(g){var f=m.tryCatch(d).apply(null,arguments);f===l.errorObject?a.error(f.e):a.next(f)}:function(g){a.next(g)},b=m.tryCatch(this.addHandler)(f);b===l.errorObject&&a.error(b.e);a.add(new k.Subscription(function(){g(f)}))};
|
||||
return d}(b.Observable);e.FromEventPatternObservable=a},{"../Observable":3,"../Subscription":8,"../util/errorObject":230,"../util/tryCatch":241}],115:[function(a,b,e){function h(a){var c=a.subscriber;c.next(a.value);c.complete()}function k(a){a.subscriber.error(a.err)}var m=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var n in c)c.hasOwnProperty(n)&&(a[n]=c[n]);a.prototype=null===c?Object.create(c):(g.prototype=c.prototype,new g)};b=a("../Observable");var l=a("../Subscription"),
|
||||
f=a("../scheduler/queue");a=function(a){function c(c,n){void 0===n&&(n=f.queue);a.call(this);this.promise=c;this.scheduler=n;this._isScalar=!1}m(c,a);c.create=function(a,d){void 0===d&&(d=f.queue);return new c(a,d)};c.prototype._subscribe=function(a){var c=this,d=this.scheduler,b=this.promise;if(d===f.queue)this._isScalar?(a.next(this.value),a.complete()):b.then(function(d){c._isScalar=!0;c.value=d;a.next(d);a.complete()},function(c){return a.error(c)}).then(null,function(a){setTimeout(function(){throw a;
|
||||
})});else{var e=new l.Subscription;this._isScalar?e.add(d.schedule(h,0,{value:this.value,subscriber:a})):b.then(function(f){c._isScalar=!0;c.value=f;e.add(d.schedule(h,0,{value:f,subscriber:a}))},function(c){return e.add(d.schedule(k,0,{err:c,subscriber:a}))}).then(null,function(a){d.schedule(function(){throw a;})});return e}};return c}(b.Observable);e.PromiseObservable=a},{"../Observable":3,"../Subscription":8,"../scheduler/queue":216}],116:[function(a,b,e){var h=this&&this.__extends||function(a,
|
||||
f){function d(){this.constructor=a}for(var c in f)f.hasOwnProperty(c)&&(a[c]=f[c]);a.prototype=null===f?Object.create(f):(d.prototype=f.prototype,new d)},k=a("../util/isNumeric");b=a("../Observable");var m=a("../scheduler/asap");a=function(a){function f(d,c){void 0===d&&(d=0);void 0===c&&(c=m.asap);a.call(this);this.period=d;this.scheduler=c;if(!k.isNumeric(d)||0>d)this.period=0;c&&"function"===typeof c.schedule||(this.scheduler=m.asap)}h(f,a);f.create=function(a,c){void 0===a&&(a=0);void 0===c&&
|
||||
(c=m.asap);return new f(a,c)};f.dispatch=function(a){var c=a.subscriber,g=a.period;c.next(a.index);c.isUnsubscribed||(a.index+=1,this.schedule(a,g))};f.prototype._subscribe=function(a){var c=this.period;a.add(this.scheduler.schedule(f.dispatch,c,{index:0,subscriber:a,period:c}))};return f}(b.Observable);e.IntervalObservable=a},{"../Observable":3,"../scheduler/asap":215,"../util/isNumeric":233}],117:[function(a,b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&
|
||||
(a[d]=b[d]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Observable");var k=a("../util/noop");a=function(a){function b(){a.call(this)}h(b,a);b.create=function(){return new b};b.prototype._subscribe=function(a){k.noop()};return b}(b.Observable);e.InfiniteObservable=a},{"../Observable":3,"../util/noop":236}],118:[function(a,b,e){var h=this&&this.__extends||function(a,b){function l(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===
|
||||
b?Object.create(b):(l.prototype=b.prototype,new l)};a=function(a){function b(l,f,d){a.call(this);this.start=l;this.end=f;this.scheduler=d}h(b,a);b.create=function(a,f,d){void 0===a&&(a=0);void 0===f&&(f=0);return new b(a,f,d)};b.dispatch=function(a){var b=a.start,d=a.index,c=a.subscriber;d>=a.end?c.complete():(c.next(b),c.isUnsubscribed||(a.index=d+1,a.start=b+1,this.schedule(a)))};b.prototype._subscribe=function(a){var f=0,d=this.start,c=this.end,g=this.scheduler;if(g)a.add(g.schedule(b.dispatch,
|
||||
0,{index:f,end:c,start:d,subscriber:a}));else{do{if(f++>=c){a.complete();break}a.next(d++);if(a.isUnsubscribed)break}while(1)}};return b}(a("../Observable").Observable);e.RangeObservable=a},{"../Observable":3}],119:[function(a,b,e){var h=this&&this.__extends||function(a,b){function l(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(l.prototype=b.prototype,new l)};a=function(a){function b(l,f){a.call(this);this.error=l;this.scheduler=f}h(b,
|
||||
a);b.create=function(a,f){return new b(a,f)};b.dispatch=function(a){a.subscriber.error(a.error)};b.prototype._subscribe=function(a){var f=this.error,d=this.scheduler;d?a.add(d.schedule(b.dispatch,0,{error:f,subscriber:a})):a.error(f)};return b}(a("../Observable").Observable);e.ErrorObservable=a},{"../Observable":3}],120:[function(a,b,e){var h=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var n in c)c.hasOwnProperty(n)&&(a[n]=c[n]);a.prototype=null===c?Object.create(c):(g.prototype=
|
||||
c.prototype,new g)},k=a("../util/isNumeric");b=a("../Observable");var m=a("../scheduler/asap"),l=a("../util/isScheduler"),f=a("../util/isDate");a=function(a){function c(c,n,b){void 0===c&&(c=0);a.call(this);this.period=n;this.scheduler=b;this.dueTime=0;k.isNumeric(n)?this._period=1>Number(n)&&1||Number(n):l.isScheduler(n)&&(b=n);l.isScheduler(b)||(b=m.asap);this.scheduler=b;this.dueTime=f.isDate(c)?+c-this.scheduler.now():c}h(c,a);c.create=function(a,d,b){void 0===a&&(a=0);return new c(a,d,b)};c.dispatch=
|
||||
function(a){var d=a.index,b=a.period,f=a.subscriber;f.next(d);"undefined"===typeof b?f.complete():f.isUnsubscribed||("undefined"===typeof this.delay?this.add(this.scheduler.schedule(c.dispatch,b,{index:d+1,period:b,subscriber:f})):(a.index=d+1,this.schedule(a,b)))};c.prototype._subscribe=function(a){a.add(this.scheduler.schedule(c.dispatch,this.dueTime,{index:0,period:this._period,subscriber:a}))};return c}(b.Observable);e.TimerObservable=a},{"../Observable":3,"../scheduler/asap":215,"../util/isDate":232,
|
||||
"../util/isNumeric":233,"../util/isScheduler":235}],121:[function(a,b,e){var h=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var g in d)d.hasOwnProperty(g)&&(a[g]=d[g]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};a=a("../Subscriber");e.buffer=function(a){return this.lift(new k(a))};var k=function(){function a(d){this.closingNotifier=d}a.prototype.call=function(a){return new m(a,this.closingNotifier)};return a}(),m=function(a){function d(c,g){a.call(this,
|
||||
c);this.buffer=[];this.notifierSubscriber=null;this.notifierSubscriber=new l(this);this.add(g._subscribe(this.notifierSubscriber))}h(d,a);d.prototype._next=function(a){this.buffer.push(a)};d.prototype._error=function(a){this.destination.error(a)};d.prototype._complete=function(){this.destination.complete()};d.prototype.flushBuffer=function(){var a=this.buffer;this.buffer=[];this.destination.next(a);this.isUnsubscribed&&this.notifierSubscriber.unsubscribe()};return d}(a.Subscriber),l=function(a){function d(c){a.call(this,
|
||||
null);this.parent=c}h(d,a);d.prototype._next=function(a){this.parent.flushBuffer()};d.prototype._error=function(a){this.parent.error(a)};d.prototype._complete=function(){this.parent.complete()};return d}(a.Subscriber)},{"../Subscriber":7}],122:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");e.bufferCount=function(a,b){void 0===
|
||||
b&&(b=null);return this.lift(new k(a,b))};var k=function(){function a(b,d){this.bufferSize=b;this.startBufferEvery=d}a.prototype.call=function(a){return new m(a,this.bufferSize,this.startBufferEvery)};return a}(),m=function(a){function b(d,c,g){a.call(this,d);this.bufferSize=c;this.startBufferEvery=g;this.buffers=[[]];this.count=0}h(b,a);b.prototype._next=function(a){var c=this.count+=1,g=this.destination,n=this.bufferSize,b=this.buffers,f=b.length,l=-1;0===c%(null==this.startBufferEvery?n:this.startBufferEvery)&&
|
||||
b.push([]);for(c=0;c<f;c++){var e=b[c];e.push(a);e.length===n&&(l=c,g.next(e))}-1!==l&&b.splice(l,1)};b.prototype._error=function(a){this.destination.error(a)};b.prototype._complete=function(){for(var a=this.destination,c=this.buffers;0<c.length;){var g=c.shift();0<g.length&&a.next(g)}a.complete()};return b}(a.Subscriber)},{"../Subscriber":7}],123:[function(a,b,e){function h(a){var c=a.subscriber,d=a.buffer;d&&c.closeBuffer(d);a.buffer=c.openBuffer();c.isUnsubscribed||this.schedule(a,a.bufferTimeSpan)}
|
||||
function k(a){var c=a.bufferCreationInterval,d=a.bufferTimeSpan,b=a.subscriber,f=a.scheduler,l=b.openBuffer();b.isUnsubscribed||(this.add(f.schedule(m,d,{subscriber:b,buffer:l})),this.schedule(a,c))}function m(a){a.subscriber.closeBuffer(a.buffer)}var l=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Subscriber");var f=a("../scheduler/asap");e.bufferTime=
|
||||
function(a,c,b){void 0===c&&(c=null);void 0===b&&(b=f.asap);return this.lift(new d(a,c,b))};var d=function(){function a(c,d,g){this.bufferTimeSpan=c;this.bufferCreationInterval=d;this.scheduler=g}a.prototype.call=function(a){return new c(a,this.bufferTimeSpan,this.bufferCreationInterval,this.scheduler)};return a}(),c=function(a){function c(d,b,n,f){a.call(this,d);this.bufferTimeSpan=b;this.bufferCreationInterval=n;this.scheduler=f;this.buffers=[];d=this.openBuffer();if(null!==n&&0<=n){var l={bufferTimeSpan:b,
|
||||
bufferCreationInterval:n,subscriber:this,scheduler:f};this.add(f.schedule(m,b,{subscriber:this,buffer:d}));this.add(f.schedule(k,n,l))}else this.add(f.schedule(h,b,{subscriber:this,buffer:d,bufferTimeSpan:b}))}l(c,a);c.prototype._next=function(a){for(var c=this.buffers,d=c.length,g=0;g<d;g++)c[g].push(a)};c.prototype._error=function(a){this.buffers.length=0;this.destination.error(a)};c.prototype._complete=function(){for(var a=this.buffers;0<a.length;)this.destination.next(a.shift());this.destination.complete()};
|
||||
c.prototype.openBuffer=function(){var a=[];this.buffers.push(a);return a};c.prototype.closeBuffer=function(a){this.destination.next(a);var c=this.buffers;c.splice(c.indexOf(a),1)};return c}(b.Subscriber)},{"../Subscriber":7,"../scheduler/asap":215}],124:[function(a,b,e){var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var g in c)c.hasOwnProperty(g)&&(a[g]=c[g]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Subscriber");var k=a("../Subscription"),
|
||||
m=a("../util/tryCatch"),l=a("../util/errorObject");e.bufferToggle=function(a,c){return this.lift(new f(a,c))};var f=function(){function a(c,d){this.openings=c;this.closingSelector=d}a.prototype.call=function(a){return new d(a,this.openings,this.closingSelector)};return a}(),d=function(a){function d(g,b,f){a.call(this,g);this.openings=b;this.closingSelector=f;this.contexts=[];this.add(this.openings._subscribe(new c(this)))}h(d,a);d.prototype._next=function(a){for(var c=this.contexts,d=c.length,g=0;g<
|
||||
d;g++)c[g].buffer.push(a)};d.prototype._error=function(a){for(var c=this.contexts;0<c.length;){var d=c.shift();d.subscription.unsubscribe();d.buffer=null;d.subscription=null}this.contexts=null;this.destination.error(a)};d.prototype._complete=function(){for(var a=this.contexts;0<a.length;){var c=a.shift();this.destination.next(c.buffer);c.subscription.unsubscribe();c.buffer=null;c.subscription=null}this.contexts=null;this.destination.complete()};d.prototype.openBuffer=function(a){var c=this.contexts,
|
||||
d=m.tryCatch(this.closingSelector)(a);d===l.errorObject?this._error(d.e):(a={buffer:[],subscription:new k.Subscription},c.push(a),c=new g(this,a),c=d._subscribe(c),a.subscription.add(c),this.add(c))};d.prototype.closeBuffer=function(a){var c=this.contexts;if(null!==c){var d=a.subscription;this.destination.next(a.buffer);c.splice(c.indexOf(a),1);this.remove(d);d.unsubscribe()}};return d}(b.Subscriber),c=function(a){function c(d){a.call(this,null);this.parent=d}h(c,a);c.prototype._next=function(a){this.parent.openBuffer(a)};
|
||||
c.prototype._error=function(a){this.parent.error(a)};c.prototype._complete=function(){};return c}(b.Subscriber),g=function(a){function c(d,g){a.call(this,null);this.parent=d;this.context=g}h(c,a);c.prototype._next=function(){this.parent.closeBuffer(this.context)};c.prototype._error=function(a){this.parent.error(a)};c.prototype._complete=function(){this.parent.closeBuffer(this.context)};return c}(b.Subscriber)},{"../Subscriber":7,"../Subscription":8,"../util/errorObject":230,"../util/tryCatch":241}],
|
||||
125:[function(a,b,e){var h=this&&this.__extends||function(a,d){function b(){this.constructor=a}for(var f in d)d.hasOwnProperty(f)&&(a[f]=d[f]);a.prototype=null===d?Object.create(d):(b.prototype=d.prototype,new b)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");e.bufferWhen=function(a){return this.lift(new l(a))};var l=function(){function a(c){this.closingSelector=c}a.prototype.call=function(a){return new f(a,this.closingSelector)};return a}(),f=function(a){function g(d,
|
||||
g){a.call(this,d);this.closingSelector=g;this.openBuffer()}h(g,a);g.prototype._next=function(a){this.buffer.push(a)};g.prototype._error=function(a){this.buffer=null;this.destination.error(a)};g.prototype._complete=function(){this.destination.next(this.buffer);this.buffer=null;this.destination.complete()};g.prototype.openBuffer=function(){var a=this.closingNotification;a&&(this.remove(a),a.unsubscribe());(a=this.buffer)&&this.destination.next(a);this.buffer=[];a=k.tryCatch(this.closingSelector)();
|
||||
a===m.errorObject?(a=a.e,this.buffer=null,this.destination.error(a)):this.add(this.closingNotification=a._subscribe(new d(this)))};return g}(b.Subscriber),d=function(a){function d(g){a.call(this,null);this.parent=g}h(d,a);d.prototype._next=function(){this.parent.openBuffer()};d.prototype._error=function(a){this.parent.error(a)};d.prototype._complete=function(){this.parent.openBuffer()};return d}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],126:[function(a,b,
|
||||
e){var h=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(g.prototype=c.prototype,new g)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");e._catch=function(a){a=new l(a);var c=this.lift(a);return a.caught=c};var l=function(){function a(c){this.selector=c}a.prototype.call=function(a){return new f(a,this.selector,this.caught)};return a}(),f=function(a){function c(c,b,
|
||||
f){a.call(this,null);this.destination=c;this.selector=b;this.caught=f;this.lastSubscription=this;this.destination.add(this)}h(c,a);c.prototype._next=function(a){this.destination.next(a)};c.prototype._error=function(a){a=k.tryCatch(this.selector)(a,this.caught);a===m.errorObject?this.destination.error(m.errorObject.e):(this.lastSubscription.unsubscribe(),this.lastSubscription=a.subscribe(this.destination))};c.prototype._complete=function(){this.lastSubscription.unsubscribe();this.destination.complete()};
|
||||
c.prototype._unsubscribe=function(){this.lastSubscription.unsubscribe()};return c}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],127:[function(a,b,e){var h=a("./combineLatest-support");e.combineAll=function(a){return this.lift(new h.CombineLatestOperator(a))}},{"./combineLatest-support":129}],128:[function(a,b,e){var h=a("../observable/fromArray"),k=a("./combineLatest-support"),m=a("../util/isScheduler"),l=a("../util/isArray");e.combineLatest=function(){for(var a=
|
||||
[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];var c=d=null;m.isScheduler(a[a.length-1])&&(c=a.pop());"function"===typeof a[a.length-1]&&(d=a.pop());1===a.length&&l.isArray(a[0])&&(a=a[0]);return(new h.ArrayObservable(a,c)).lift(new k.CombineLatestOperator(d))}},{"../observable/fromArray":112,"../util/isArray":231,"../util/isScheduler":235,"./combineLatest-support":129}],129:[function(a,b,e){var h=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&
|
||||
(a[b]=c[b]);a.prototype=null===c?Object.create(c):(g.prototype=c.prototype,new g)},k=a("../util/tryCatch"),m=a("../util/errorObject");b=a("../OuterSubscriber");var l=a("../util/subscribeToResult");a=function(){function a(c){this.project=c}a.prototype.call=function(a){return new f(a,this.project)};return a}();e.CombineLatestOperator=a;var f=function(a){function c(c,b){a.call(this,c);this.project=b;this.active=0;this.values=[];this.observables=[];this.toRespond=[]}h(c,a);c.prototype._next=function(a){var c=
|
||||
this.toRespond;c.push(c.length);this.observables.push(a)};c.prototype._complete=function(){var a=this.observables,c=a.length;if(0===c)this.destination.complete();else{this.active=c;for(var d=0;d<c;d++){var b=a[d];this.add(l.subscribeToResult(this,b,b,d))}}};c.prototype.notifyComplete=function(a){0===--this.active&&this.destination.complete()};c.prototype.notifyNext=function(a,c,d,b){a=this.values;a[d]=c;c=this.toRespond;0<c.length&&(d=c.indexOf(d),-1!==d&&c.splice(d,1));0===c.length&&(c=this.project,
|
||||
d=this.destination,c?(a=k.tryCatch(c).apply(this,a),a===m.errorObject?d.error(m.errorObject.e):d.next(a)):d.next(a))};return c}(b.OuterSubscriber);e.CombineLatestSubscriber=f},{"../OuterSubscriber":4,"../util/errorObject":230,"../util/subscribeToResult":239,"../util/tryCatch":241}],130:[function(a,b,e){var h=a("../observable/fromArray"),k=a("./combineLatest-support"),m=a("../util/isArray");e.combineLatest=function(){for(var a=[],b=0;b<arguments.length;b++)a[b-0]=arguments[b];b=null;"function"===typeof a[a.length-
|
||||
1]&&(b=a.pop());1===a.length&&m.isArray(a[0])&&(a=a[0]);a.unshift(this);return(new h.ArrayObservable(a)).lift(new k.CombineLatestOperator(b))}},{"../observable/fromArray":112,"../util/isArray":231,"./combineLatest-support":129}],131:[function(a,b,e){var h=a("../scheduler/queue"),k=a("./mergeAll-support"),m=a("../observable/fromArray"),l=a("../util/isScheduler");e.concat=function(){for(var a=[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];d=h.queue;l.isScheduler(a[a.length-1])&&(d=a.pop());return(new m.ArrayObservable(a,
|
||||
d)).lift(new k.MergeAllOperator(1))}},{"../observable/fromArray":112,"../scheduler/queue":216,"../util/isScheduler":235,"./mergeAll-support":159}],132:[function(a,b,e){var h=a("../util/isScheduler"),k=a("../observable/fromArray"),m=a("./mergeAll-support");e.concat=function(){for(var a=[],b=0;b<arguments.length;b++)a[b-0]=arguments[b];a.unshift(this);b=null;h.isScheduler(a[a.length-1])&&(b=a.pop());return(new k.ArrayObservable(a,b)).lift(new m.MergeAllOperator(1))}},{"../observable/fromArray":112,
|
||||
"../util/isScheduler":235,"./mergeAll-support":159}],133:[function(a,b,e){var h=a("./mergeAll-support");e.concatAll=function(){return this.lift(new h.MergeAllOperator(1))}},{"./mergeAll-support":159}],134:[function(a,b,e){var h=a("./mergeMap-support");e.concatMap=function(a,b){return this.lift(new h.MergeMapOperator(a,b,1))}},{"./mergeMap-support":161}],135:[function(a,b,e){var h=a("./mergeMapTo-support");e.concatMapTo=function(a,b){return this.lift(new h.MergeMapToOperator(a,b,1))}},{"./mergeMapTo-support":163}],
|
||||
136:[function(a,b,e){var h=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(g.prototype=c.prototype,new g)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");e.count=function(a){return this.lift(new l(a,this))};var l=function(){function a(c,d){this.predicate=c;this.source=d}a.prototype.call=function(a){return new f(a,this.predicate,this.source)};return a}(),f=function(a){function c(c,
|
||||
b,f){a.call(this,c);this.predicate=b;this.source=f;this.index=this.count=0}h(c,a);c.prototype._next=function(a){var c=this.predicate,d=!0;if(c&&(d=k.tryCatch(c)(a,this.index++,this.source),d===m.errorObject)){this.destination.error(d.e);return}d&&(this.count+=1)};c.prototype._complete=function(){this.destination.next(this.count);this.destination.complete()};return c}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],137:[function(a,b,e){var h=this&&this.__extends||
|
||||
function(a,c){function d(){this.constructor=a}for(var g in c)c.hasOwnProperty(g)&&(a[g]=c[g]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("../observable/fromPromise");b=a("../Subscriber");var m=a("../util/tryCatch"),l=a("../util/isPromise"),f=a("../util/errorObject");e.debounce=function(a){return this.lift(new d(a))};var d=function(){function a(c){this.durationSelector=c}a.prototype.call=function(a){return new c(a,this.durationSelector)};return a}(),c=function(a){function c(d,
|
||||
g){a.call(this,d);this.durationSelector=g;this.lastValue=this.debouncedSubscription=null;this._index=0}h(c,a);Object.defineProperty(c.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0});c.prototype._next=function(a){var c=this.destination,d=++this._index,b=m.tryCatch(this.durationSelector)(a);b===f.errorObject?c.error(f.errorObject.e):(l.isPromise(b)&&(b=k.PromiseObservable.create(b)),this.lastValue=a,this.clearDebounce(),this.add(this.debouncedSubscription=b._subscribe(new g(this,
|
||||
d))))};c.prototype._complete=function(){this.debouncedNext();this.destination.complete()};c.prototype.debouncedNext=function(){this.clearDebounce();null!=this.lastValue&&(this.destination.next(this.lastValue),this.lastValue=null)};c.prototype.clearDebounce=function(){var a=this.debouncedSubscription;a&&(a.unsubscribe(),this.remove(a),this.debouncedSubscription=null)};return c}(b.Subscriber),g=function(a){function c(d,g){a.call(this,null);this.parent=d;this.currentIndex=g}h(c,a);c.prototype.debounceNext=
|
||||
function(){var a=this.parent;this.currentIndex===a.index&&(a.debouncedNext(),this.isUnsubscribed||this.unsubscribe())};c.prototype._next=function(a){this.debounceNext()};c.prototype._error=function(a){this.parent.error(a)};c.prototype._complete=function(){this.debounceNext()};return c}(b.Subscriber)},{"../Subscriber":7,"../observable/fromPromise":115,"../util/errorObject":230,"../util/isPromise":234,"../util/tryCatch":241}],138:[function(a,b,e){function h(a){a.debouncedNext()}var k=this&&this.__extends||
|
||||
function(a,c){function g(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(g.prototype=c.prototype,new g)};b=a("../Subscriber");var m=a("../scheduler/asap");e.debounceTime=function(a,c){void 0===c&&(c=m.asap);return this.lift(new l(a,c))};var l=function(){function a(c,d){this.dueTime=c;this.scheduler=d}a.prototype.call=function(a){return new f(a,this.dueTime,this.scheduler)};return a}(),f=function(a){function c(c,b,f){a.call(this,c);this.dueTime=
|
||||
b;this.scheduler=f;this.lastValue=this.debouncedSubscription=null}k(c,a);c.prototype._next=function(a){this.clearDebounce();this.lastValue=a;this.add(this.debouncedSubscription=this.scheduler.schedule(h,this.dueTime,this))};c.prototype._complete=function(){this.debouncedNext();this.destination.complete()};c.prototype.debouncedNext=function(){this.clearDebounce();null!=this.lastValue&&(this.destination.next(this.lastValue),this.lastValue=null)};c.prototype.clearDebounce=function(){var a=this.debouncedSubscription;
|
||||
null!==a&&(this.remove(a),a.unsubscribe(),this.debouncedSubscription=null)};return c}(b.Subscriber)},{"../Subscriber":7,"../scheduler/asap":215}],139:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");e.defaultIfEmpty=function(a){void 0===a&&(a=null);return this.lift(new k(a))};var k=function(){function a(b){this.defaultValue=
|
||||
b}a.prototype.call=function(a){return new m(a,this.defaultValue)};return a}(),m=function(a){function b(d,c){a.call(this,d);this.defaultValue=c;this.isEmpty=!0}h(b,a);b.prototype._next=function(a){this.isEmpty=!1;this.destination.next(a)};b.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue);this.destination.complete()};return b}(a.Subscriber)},{"../Subscriber":7}],140:[function(a,b,e){var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&
|
||||
(a[b]=c[b]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Subscriber");var k=a("../Notification"),m=a("../scheduler/queue"),l=a("../util/isDate");e.delay=function(a,c){void 0===c&&(c=m.queue);var d=l.isDate(a)?+a-c.now():a;return this.lift(new f(d,c))};var f=function(){function a(c,d){this.delay=c;this.scheduler=d}a.prototype.call=function(a){return new d(a,this.delay,this.scheduler)};return a}(),d=function(a){function d(c,b,f){a.call(this,c);this.delay=b;this.scheduler=
|
||||
f;this.queue=[];this.errored=this.active=!1}h(d,a);d.dispatch=function(a){for(var c=a.source,d=c.queue,b=a.scheduler,g=a.destination;0<d.length&&0>=d[0].time-b.now();)d.shift().notification.observe(g);0<d.length?(c=Math.max(0,d[0].time-b.now()),this.schedule(a,c)):c.active=!1};d.prototype._schedule=function(a){this.active=!0;this.add(a.schedule(d.dispatch,this.delay,{source:this,destination:this.destination,scheduler:a}))};d.prototype.scheduleNotification=function(a){if(!0!==this.errored){var d=this.scheduler;
|
||||
a=new c(d.now()+this.delay,a);this.queue.push(a);!1===this.active&&this._schedule(d)}};d.prototype._next=function(a){this.scheduleNotification(k.Notification.createNext(a))};d.prototype._error=function(a){this.errored=!0;this.queue=[];this.destination.error(a)};d.prototype._complete=function(){this.scheduleNotification(k.Notification.createComplete())};return d}(b.Subscriber),c=function(){return function(a,c){this.time=a;this.notification=c}}()},{"../Notification":2,"../Subscriber":7,"../scheduler/queue":216,
|
||||
"../util/isDate":232}],141:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");e.dematerialize=function(){return this.lift(new k)};var k=function(){function a(){}a.prototype.call=function(a){return new m(a)};return a}(),m=function(a){function b(d){a.call(this,d)}h(b,a);b.prototype._next=function(a){a.observe(this.destination)};
|
||||
return b}(a.Subscriber)},{"../Subscriber":7}],142:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");e.distinctUntilChanged=function(a){return this.lift(new l(a))};var l=function(){function a(c){this.compare=c}a.prototype.call=function(a){return new f(a,this.compare)};
|
||||
return a}(),f=function(a){function c(c,b){a.call(this,c);this.hasValue=!1;"function"===typeof b&&(this.compare=b)}h(c,a);c.prototype.compare=function(a,c){return a===c};c.prototype._next=function(a){var c=!1;if(this.hasValue){if(c=k.tryCatch(this.compare)(this.value,a),c===m.errorObject){this.destination.error(m.errorObject.e);return}}else this.hasValue=!0;!1===Boolean(c)&&(this.value=a,this.destination.next(a))};return c}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],
|
||||
143:[function(a,b,e){var h=this&&this.__extends||function(a,d){function b(){this.constructor=a}for(var f in d)d.hasOwnProperty(f)&&(a[f]=d[f]);a.prototype=null===d?Object.create(d):(b.prototype=d.prototype,new b)};b=a("../Subscriber");var k=a("../util/noop"),m=a("../util/tryCatch"),l=a("../util/errorObject");e._do=function(a,d,b){var l;a&&"object"===typeof a?(l=a.next,d=a.error,b=a.complete):l=a;return this.lift(new f(l||k.noop,d||k.noop,b||k.noop))};var f=function(){function a(c,d,b){this.next=c;
|
||||
this.error=d;this.complete=b}a.prototype.call=function(a){return new d(a,this.next,this.error,this.complete)};return a}(),d=function(a){function d(b,g,f,l){a.call(this,b);this.__next=g;this.__error=f;this.__complete=l}h(d,a);d.prototype._next=function(a){m.tryCatch(this.__next)(a)===l.errorObject?this.destination.error(l.errorObject.e):this.destination.next(a)};d.prototype._error=function(a){m.tryCatch(this.__error)(a)===l.errorObject?this.destination.error(l.errorObject.e):this.destination.error(a)};
|
||||
d.prototype._complete=function(){m.tryCatch(this.__complete)()===l.errorObject?this.destination.error(l.errorObject.e):this.destination.complete()};return d}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/noop":236,"../util/tryCatch":241}],144:[function(a,b,e){var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("../observable/ScalarObservable"),
|
||||
m=a("../observable/fromArray"),l=a("../observable/throw");b=a("../Subscriber");var f=a("../util/tryCatch"),d=a("../util/errorObject");e.every=function(a,b){var g;return this._isScalar?(g=f.tryCatch(a).call(b||this,this.value,0,this),g===d.errorObject?new l.ErrorObservable(d.errorObject.e,this.scheduler):new k.ScalarObservable(g,this.scheduler)):this instanceof m.ArrayObservable?(g=this.array,g=f.tryCatch(function(a,c,d){return a.every(c,d)})(g,a,b),g===d.errorObject?new l.ErrorObservable(d.errorObject.e,
|
||||
this.scheduler):new k.ScalarObservable(g,this.scheduler)):this.lift(new c(a,b,this))};var c=function(){function a(c,d,b){this.predicate=c;this.thisArg=d;this.source=b}a.prototype.call=function(a){return new g(a,this.predicate,this.thisArg,this.source)};return a}(),g=function(a){function c(d,b,g,f){a.call(this,d);this.predicate=b;this.thisArg=g;this.source=f;this.index=0}h(c,a);c.prototype.notifyComplete=function(a){this.destination.next(a);this.destination.complete()};c.prototype._next=function(a){a=
|
||||
f.tryCatch(this.predicate).call(this.thisArg||this,a,this.index++,this.source);a===d.errorObject?this.destination.error(a.e):a||this.notifyComplete(!1)};c.prototype._complete=function(){this.notifyComplete(!0)};return c}(b.Subscriber)},{"../Subscriber":7,"../observable/ScalarObservable":105,"../observable/fromArray":112,"../observable/throw":119,"../util/errorObject":230,"../util/tryCatch":241}],145:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&
|
||||
(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)},k=a("../util/tryCatch"),m=a("../util/errorObject");b=a("../OuterSubscriber");var l=a("../util/subscribeToResult");a=function(){function a(c,d,b){this.project=c;this.concurrent=d;this.scheduler=b}a.prototype.call=function(a){return new f(a,this.project,this.concurrent,this.scheduler)};return a}();e.ExpandOperator=a;var f=function(a){function c(c,b,f,l){a.call(this,c);this.project=b;this.concurrent=f;this.scheduler=l;
|
||||
this.active=this.index=0;this.hasCompleted=!1;f<Number.POSITIVE_INFINITY&&(this.buffer=[])}h(c,a);c.dispatch=function(a){a.subscriber.subscribeToProjection(a.result,a.value,a.index)};c.prototype._next=function(a){var d=this.destination;if(d.isUnsubscribed)this._complete();else{var b=this.index++;if(this.active<this.concurrent){d.next(a);var f=k.tryCatch(this.project)(a,b);f===m.errorObject?d.error(f.e):this.scheduler?this.add(this.scheduler.schedule(c.dispatch,0,{subscriber:this,result:f,value:a,
|
||||
index:b})):this.subscribeToProjection(f,a,b)}else this.buffer.push(a)}};c.prototype.subscribeToProjection=function(a,c,d){a._isScalar?this._next(a.value):(this.active++,this.add(l.subscribeToResult(this,a,c,d)))};c.prototype._complete=function(){(this.hasCompleted=!0,0===this.active)&&this.destination.complete()};c.prototype.notifyComplete=function(a){var c=this.buffer;this.remove(a);this.active--;c&&0<c.length&&this._next(c.shift());this.hasCompleted&&0===this.active&&this.destination.complete()};
|
||||
c.prototype.notifyNext=function(a,c,d,b){this._next(c)};return c}(b.OuterSubscriber);e.ExpandSubscriber=f},{"../OuterSubscriber":4,"../util/errorObject":230,"../util/subscribeToResult":239,"../util/tryCatch":241}],146:[function(a,b,e){var h=a("./expand-support");e.expand=function(a,b,l){void 0===b&&(b=Number.POSITIVE_INFINITY);void 0===l&&(l=void 0);b=1>(b||0)?Number.POSITIVE_INFINITY:b;return this.lift(new h.ExpandOperator(a,b,l))}},{"./expand-support":145}],147:[function(a,b,e){var h=this&&this.__extends||
|
||||
function(a,c){function b(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");e.filter=function(a,c){return this.lift(new l(a,c))};var l=function(){function a(c,d){this.select=c;this.thisArg=d}a.prototype.call=function(a){return new f(a,this.select,this.thisArg)};return a}(),f=function(a){function c(c,b,f){a.call(this,c);this.thisArg=f;
|
||||
this.count=0;this.select=b}h(c,a);c.prototype._next=function(a){var c=k.tryCatch(this.select).call(this.thisArg||this,a,this.count++);c===m.errorObject?this.destination.error(m.errorObject.e):Boolean(c)&&this.destination.next(a)};return c}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],148:[function(a,b,e){var h=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):
|
||||
(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../Subscription");e._finally=function(a){return this.lift(new m(a))};var m=function(){function a(d){this.finallySelector=d}a.prototype.call=function(a){return new l(a,this.finallySelector)};return a}(),l=function(a){function d(c,d){a.call(this,c);this.add(new k.Subscription(d))}h(d,a);return d}(b.Subscriber)},{"../Subscriber":7,"../Subscription":8}],149:[function(a,b,e){var h=this&&this.__extends||function(a,d){function b(){this.constructor=
|
||||
a}for(var f in d)d.hasOwnProperty(f)&&(a[f]=d[f]);a.prototype=null===d?Object.create(d):(b.prototype=d.prototype,new b)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject"),l=a("../util/EmptyError");e.first=function(a,d,b){return this.lift(new f(a,d,b,this))};var f=function(){function a(c,d,b,f){this.predicate=c;this.resultSelector=d;this.defaultValue=b;this.source=f}a.prototype.call=function(a){return new d(a,this.predicate,this.resultSelector,this.defaultValue,this.source)};
|
||||
return a}(),d=function(a){function d(b,g,f,l,e){a.call(this,b);this.predicate=g;this.resultSelector=f;this.defaultValue=l;this.source=e;this.index=0;this.hasCompleted=!1}h(d,a);d.prototype._next=function(a){var c=this.destination,d=this.predicate,b=this.resultSelector,g=this.index++,f=!0;if(d&&(f=k.tryCatch(d)(a,g,this.source),f===m.errorObject)){c.error(m.errorObject.e);return}if(f){if(b&&(a=k.tryCatch(b)(a,g),a===m.errorObject)){c.error(m.errorObject.e);return}c.next(a);c.complete();this.hasCompleted=
|
||||
!0}};d.prototype._complete=function(){var a=this.destination;this.hasCompleted||"undefined"===typeof this.defaultValue?this.hasCompleted||a.error(new l.EmptyError):(a.next(this.defaultValue),a.complete())};return d}(b.Subscriber)},{"../Subscriber":7,"../util/EmptyError":223,"../util/errorObject":230,"../util/tryCatch":241}],150:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):
|
||||
(d.prototype=b.prototype,new d)},k=a("../Subscription");a=a("../Observable");b=function(a){function b(){a.call(this);this.attemptedToUnsubscribePrimary=!1;this.count=0}h(b,a);b.prototype.setPrimary=function(a){this.primary=a};b.prototype.unsubscribe=function(){this.isUnsubscribed||this.attemptedToUnsubscribePrimary||(this.attemptedToUnsubscribePrimary=!0,0===this.count&&(a.prototype.unsubscribe.call(this),this.primary.unsubscribe()))};return b}(k.Subscription);e.RefCountSubscription=b;a=function(a){function b(d,
|
||||
c,g){a.call(this);this.key=d;this.groupSubject=c;this.refCountSubscription=g}h(b,a);b.prototype._subscribe=function(a){var c=new k.Subscription;this.refCountSubscription&&!this.refCountSubscription.isUnsubscribed&&c.add(new m(this.refCountSubscription));c.add(this.groupSubject.subscribe(a));return c};return b}(a.Observable);e.GroupedObservable=a;var m=function(a){function b(d){a.call(this);this.parent=d;d.count++}h(b,a);b.prototype.unsubscribe=function(){this.parent.isUnsubscribed||this.isUnsubscribed||
|
||||
(a.prototype.unsubscribe.call(this),this.parent.count--,0===this.parent.count&&this.parent.attemptedToUnsubscribePrimary&&(this.parent.unsubscribe(),this.parent.primary.unsubscribe()))};return b}(k.Subscription);e.InnerRefCountSubscription=m},{"../Observable":3,"../Subscription":8}],151:[function(a,b,e){var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Subscriber");
|
||||
var k=a("../Observable"),m=a("../Subject"),l=a("../util/Map"),f=a("../util/FastMap"),d=a("./groupBy-support"),c=a("../util/tryCatch"),g=a("../util/errorObject");e.groupBy=function(a,c,d){return new n(this,a,c,d)};var n=function(a){function c(d,b,g,f){a.call(this);this.source=d;this.keySelector=b;this.elementSelector=g;this.durationSelector=f}h(c,a);c.prototype._subscribe=function(a){var c=new d.RefCountSubscription;a=new p(a,c,this.keySelector,this.elementSelector,this.durationSelector);c.setPrimary(this.source.subscribe(a));
|
||||
return c};return c}(k.Observable);e.GroupByObservable=n;var p=function(a){function b(c,d,g,f,n){a.call(this);this.refCountSubscription=d;this.keySelector=g;this.elementSelector=f;this.durationSelector=n;this.groups=null;this.destination=c;this.add(c)}h(b,a);b.prototype._next=function(a){var b=c.tryCatch(this.keySelector)(a);if(b===g.errorObject)this.error(b.e);else{var n=this.groups,e=this.elementSelector,k=this.durationSelector;n||(n=this.groups="string"===typeof b?new f.FastMap:new l.Map);var h=
|
||||
n.get(b);h||(n.set(b,h=new m.Subject),n=new d.GroupedObservable(b,h,this.refCountSubscription),k&&(k=c.tryCatch(k)(new d.GroupedObservable(b,h)),k===g.errorObject?this.error(k.e):this.add(k._subscribe(new q(b,h,this)))),this.destination.next(n));e?(a=c.tryCatch(e)(a),a===g.errorObject?this.error(a.e):h.next(a)):h.next(a)}};b.prototype._error=function(a){var c=this,b=this.groups;b&&b.forEach(function(b,d){b.error(a);c.removeGroup(d)});this.destination.error(a)};b.prototype._complete=function(){var a=
|
||||
this,c=this.groups;c&&c.forEach(function(c,b){c.complete();a.removeGroup(c)});this.destination.complete()};b.prototype.removeGroup=function(a){this.groups.delete(a)};return b}(b.Subscriber),q=function(a){function c(b,d,g){a.call(this,null);this.key=b;this.group=d;this.parent=g}h(c,a);c.prototype._next=function(a){this.group.complete();this.parent.removeGroup(this.key)};c.prototype._error=function(a){this.group.error(a);this.parent.removeGroup(this.key)};c.prototype._complete=function(){this.group.complete();
|
||||
this.parent.removeGroup(this.key)};return c}(b.Subscriber)},{"../Observable":3,"../Subject":6,"../Subscriber":7,"../util/FastMap":224,"../util/Map":226,"../util/errorObject":230,"../util/tryCatch":241,"./groupBy-support":150}],152:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var k=a("../util/noop");e.ignoreElements=
|
||||
function(){return this.lift(new m)};var m=function(){function a(){}a.prototype.call=function(a){return new l(a)};return a}(),l=function(a){function b(){a.apply(this,arguments)}h(b,a);b.prototype._next=function(a){k.noop()};return b}(b.Subscriber)},{"../Subscriber":7,"../util/noop":236}],153:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};
|
||||
b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject"),l=a("../util/EmptyError");e.last=function(a,b,d){return this.lift(new f(a,b,d,this))};var f=function(){function a(c,b,d,f){this.predicate=c;this.resultSelector=b;this.defaultValue=d;this.source=f}a.prototype.call=function(a){return new d(a,this.predicate,this.resultSelector,this.defaultValue,this.source)};return a}(),d=function(a){function b(d,g,f,e,l){a.call(this,d);this.predicate=g;this.resultSelector=f;this.defaultValue=
|
||||
e;this.source=l;this.hasValue=!1;this.index=0;"undefined"!==typeof e&&(this.lastValue=e,this.hasValue=!0)}h(b,a);b.prototype._next=function(a){var c=this.predicate,b=this.resultSelector,d=this.destination,g=this.index++;if(c)if(c=k.tryCatch(c)(a,g,this.source),c===m.errorObject)d.error(m.errorObject.e);else{if(c){if(b&&(a=k.tryCatch(b)(a,g),a===m.errorObject)){d.error(m.errorObject.e);return}this.lastValue=a;this.hasValue=!0}}else this.lastValue=a,this.hasValue=!0};b.prototype._complete=function(){var a=
|
||||
this.destination;this.hasValue?(a.next(this.lastValue),a.complete()):a.error(new l.EmptyError)};return b}(b.Subscriber)},{"../Subscriber":7,"../util/EmptyError":223,"../util/errorObject":230,"../util/tryCatch":241}],154:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");
|
||||
e.map=function(a,c){if("function"!==typeof a)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return this.lift(new l(a,c))};var l=function(){function a(c,b){this.project=c;this.thisArg=b}a.prototype.call=function(a){return new f(a,this.project,this.thisArg)};return a}(),f=function(a){function c(c,b,f){a.call(this,c);this.project=b;this.thisArg=f;this.count=0}h(c,a);c.prototype._next=function(a){a=k.tryCatch(this.project).call(this.thisArg||this,a,this.count++);a===
|
||||
m.errorObject?this.error(m.errorObject.e):this.destination.next(a)};return c}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],155:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");e.mapTo=function(a){return this.lift(new k(a))};var k=function(){function a(b){this.value=b}a.prototype.call=
|
||||
function(a){return new m(a,this.value)};return a}(),m=function(a){function b(d,c){a.call(this,d);this.value=c}h(b,a);b.prototype._next=function(a){this.destination.next(this.value)};return b}(a.Subscriber)},{"../Subscriber":7}],156:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var k=a("../Notification");e.materialize=
|
||||
function(){return this.lift(new m)};var m=function(){function a(){}a.prototype.call=function(a){return new l(a)};return a}(),l=function(a){function b(c){a.call(this,c)}h(b,a);b.prototype._next=function(a){this.destination.next(k.Notification.createNext(a))};b.prototype._error=function(a){var b=this.destination;b.next(k.Notification.createError(a));b.complete()};b.prototype._complete=function(){var a=this.destination;a.next(k.Notification.createComplete());a.complete()};return b}(b.Subscriber)},{"../Notification":2,
|
||||
"../Subscriber":7}],157:[function(a,b,e){var h=a("../observable/fromArray"),k=a("./mergeAll-support"),m=a("../scheduler/queue"),l=a("../util/isScheduler");e.merge=function(){for(var a=[],b=0;b<arguments.length;b++)a[b-0]=arguments[b];var b=Number.POSITIVE_INFINITY,c=m.queue,g=a[a.length-1];l.isScheduler(g)?(c=a.pop(),1<a.length&&"number"===typeof a[a.length-1]&&(b=a.pop())):"number"===typeof g&&(b=a.pop());return 1===a.length?a[0]:(new h.ArrayObservable(a,c)).lift(new k.MergeAllOperator(b))}},{"../observable/fromArray":112,
|
||||
"../scheduler/queue":216,"../util/isScheduler":235,"./mergeAll-support":159}],158:[function(a,b,e){var h=a("./merge-static");e.merge=function(){for(var a=[],b=0;b<arguments.length;b++)a[b-0]=arguments[b];a.unshift(this);return h.merge.apply(this,a)}},{"./merge-static":157}],159:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};b=a("../OuterSubscriber");
|
||||
var k=a("../util/subscribeToResult");a=function(){function a(b){this.concurrent=b}a.prototype.call=function(a){return new m(a,this.concurrent)};return a}();e.MergeAllOperator=a;var m=function(a){function b(d,c){a.call(this,d);this.concurrent=c;this.hasCompleted=!1;this.buffer=[];this.active=0}h(b,a);b.prototype._next=function(a){this.active<this.concurrent?a._isScalar?this.destination.next(a.value):(this.active++,this.add(k.subscribeToResult(this,a))):this.buffer.push(a)};b.prototype._complete=function(){this.hasCompleted=
|
||||
!0;0===this.active&&0===this.buffer.length&&this.destination.complete()};b.prototype.notifyComplete=function(a){var c=this.buffer;this.remove(a);this.active--;0<c.length?this._next(c.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()};return b}(b.OuterSubscriber);e.MergeAllSubscriber=m},{"../OuterSubscriber":4,"../util/subscribeToResult":239}],160:[function(a,b,e){var h=a("./mergeAll-support");e.mergeAll=function(a){void 0===a&&(a=Number.POSITIVE_INFINITY);return this.lift(new h.MergeAllOperator(a))}},
|
||||
{"./mergeAll-support":159}],161:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)},k=a("../util/tryCatch"),m=a("../util/errorObject"),l=a("../util/subscribeToResult");a=a("../OuterSubscriber");b=function(){function a(c,b,d){void 0===d&&(d=Number.POSITIVE_INFINITY);this.project=c;this.resultSelector=b;this.concurrent=d}a.prototype.call=function(a){return new f(a,
|
||||
this.project,this.resultSelector,this.concurrent)};return a}();e.MergeMapOperator=b;var f=function(a){function c(c,b,f,e){void 0===e&&(e=Number.POSITIVE_INFINITY);a.call(this,c);this.project=b;this.resultSelector=f;this.concurrent=e;this.hasCompleted=!1;this.buffer=[];this.index=this.active=0}h(c,a);c.prototype._next=function(a){if(this.active<this.concurrent){var c=this.index++,b=k.tryCatch(this.project)(a,c),d=this.destination;b===m.errorObject?d.error(b.e):(this.active++,this._innerSub(b,a,c))}else this.buffer.push(a)};
|
||||
c.prototype._innerSub=function(a,c,b){this.add(l.subscribeToResult(this,a,c,b))};c.prototype._complete=function(){this.hasCompleted=!0;0===this.active&&0===this.buffer.length&&this.destination.complete()};c.prototype.notifyNext=function(a,c,b,d){var f=this.destination,e=this.resultSelector;e?(a=k.tryCatch(e)(a,c,b,d),a===m.errorObject?f.error(m.errorObject.e):f.next(a)):f.next(c)};c.prototype.notifyComplete=function(a){var c=this.buffer;this.remove(a);this.active--;0<c.length?this._next(c.shift()):
|
||||
0===this.active&&this.hasCompleted&&this.destination.complete()};return c}(a.OuterSubscriber);e.MergeMapSubscriber=f},{"../OuterSubscriber":4,"../util/errorObject":230,"../util/subscribeToResult":239,"../util/tryCatch":241}],162:[function(a,b,e){var h=a("./mergeMap-support");e.mergeMap=function(a,b,e){void 0===e&&(e=Number.POSITIVE_INFINITY);return this.lift(new h.MergeMapOperator(a,b,e))}},{"./mergeMap-support":161}],163:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor=
|
||||
a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)},k=a("../util/tryCatch"),m=a("../util/errorObject");b=a("../OuterSubscriber");var l=a("../util/subscribeToResult");a=function(){function a(c,b,d){void 0===d&&(d=Number.POSITIVE_INFINITY);this.ish=c;this.resultSelector=b;this.concurrent=d}a.prototype.call=function(a){return new f(a,this.ish,this.resultSelector,this.concurrent)};return a}();e.MergeMapToOperator=a;var f=function(a){function c(c,
|
||||
b,f,e){void 0===e&&(e=Number.POSITIVE_INFINITY);a.call(this,c);this.ish=b;this.resultSelector=f;this.concurrent=e;this.hasCompleted=!1;this.buffer=[];this.index=this.active=0}h(c,a);c.prototype._next=function(a){if(this.active<this.concurrent){var c=this.resultSelector,b=this.index++,d=this.ish,f=this.destination;this.active++;this._innerSub(d,f,c,a,b)}else this.buffer.push(a)};c.prototype._innerSub=function(a,c,b,d,f){this.add(l.subscribeToResult(this,a,d,f))};c.prototype._complete=function(){this.hasCompleted=
|
||||
!0;0===this.active&&0===this.buffer.length&&this.destination.complete()};c.prototype.notifyNext=function(a,c,b,d){var f=this.resultSelector,e=this.destination;f?(a=k.tryCatch(f)(a,c,b,d),a===m.errorObject?e.error(m.errorObject.e):e.next(a)):e.next(c)};c.prototype.notifyError=function(a){this.destination.error(a)};c.prototype.notifyComplete=function(a){var c=this.buffer;this.remove(a);this.active--;0<c.length?this._next(c.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()};return c}(b.OuterSubscriber);
|
||||
e.MergeMapToSubscriber=f},{"../OuterSubscriber":4,"../util/errorObject":230,"../util/subscribeToResult":239,"../util/tryCatch":241}],164:[function(a,b,e){var h=a("./mergeMapTo-support");e.mergeMapTo=function(a,b,e){void 0===e&&(e=Number.POSITIVE_INFINITY);return this.lift(new h.MergeMapToOperator(a,b,e))}},{"./mergeMapTo-support":163}],165:[function(a,b,e){var h=a("../observable/ConnectableObservable");e.multicast=function(a){return new h.ConnectableObservable(this,"function"===typeof a?a:function(){return a})}},
|
||||
{"../observable/ConnectableObservable":103}],166:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var k=a("../Notification");a=function(){function a(b,c){void 0===c&&(c=0);this.scheduler=b;this.delay=c}a.prototype.call=function(a){return new m(a,this.scheduler,this.delay)};return a}();e.ObserveOnOperator=a;var m=function(a){function b(c,
|
||||
d,n){void 0===n&&(n=0);a.call(this,c);this.scheduler=d;this.delay=n}h(b,a);b.dispatch=function(a){a.notification.observe(a.destination)};b.prototype.scheduleMessage=function(a){this.add(this.scheduler.schedule(b.dispatch,this.delay,new l(a,this.destination)))};b.prototype._next=function(a){this.scheduleMessage(k.Notification.createNext(a))};b.prototype._error=function(a){this.scheduleMessage(k.Notification.createError(a))};b.prototype._complete=function(){this.scheduleMessage(k.Notification.createComplete())};
|
||||
return b}(b.Subscriber);e.ObserveOnSubscriber=m;var l=function(){return function(a,b){this.notification=a;this.destination=b}}()},{"../Notification":2,"../Subscriber":7}],167:[function(a,b,e){var h=a("./observeOn-support");e.observeOn=function(a,b){void 0===b&&(b=0);return this.lift(new h.ObserveOnOperator(a,b))}},{"./observeOn-support":166}],168:[function(a,b,e){var h=a("../util/not"),k=a("./filter");e.partition=function(a,b){return[k.filter.call(this,a),k.filter.call(this,h.not(a,b))]}},{"../util/not":237,
|
||||
"./filter":147}],169:[function(a,b,e){var h=a("../Subject"),k=a("./multicast");e.publish=function(){return k.multicast.call(this,new h.Subject)}},{"../Subject":6,"./multicast":165}],170:[function(a,b,e){var h=a("../subject/BehaviorSubject"),k=a("./multicast");e.publishBehavior=function(a){return k.multicast.call(this,new h.BehaviorSubject(a))}},{"../subject/BehaviorSubject":218,"./multicast":165}],171:[function(a,b,e){var h=a("../subject/AsyncSubject"),k=a("./multicast");e.publishLast=function(){return k.multicast.call(this,
|
||||
new h.AsyncSubject)}},{"../subject/AsyncSubject":217,"./multicast":165}],172:[function(a,b,e){var h=a("../subject/ReplaySubject"),k=a("./multicast");e.publishReplay=function(a,b,f){void 0===a&&(a=Number.POSITIVE_INFINITY);void 0===b&&(b=Number.POSITIVE_INFINITY);return k.multicast.call(this,new h.ReplaySubject(a,b,f))}},{"../subject/ReplaySubject":219,"./multicast":165}],173:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&
|
||||
(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");a=function(){function a(b,c){this.project=b;this.seed=c}a.prototype.call=function(a){return new l(a,this.project,this.seed)};return a}();e.ReduceOperator=a;var l=function(a){function b(c,d,n){a.call(this,c);this.hasValue=!1;this.acc=n;this.project=d;this.hasSeed="undefined"!==typeof n}h(b,a);b.prototype._next=function(a){this.hasValue||(this.hasValue=
|
||||
this.hasSeed)?(a=k.tryCatch(this.project).call(this,this.acc,a),a===m.errorObject?this.destination.error(m.errorObject.e):this.acc=a):(this.acc=a,this.hasValue=!0)};b.prototype._complete=function(){(this.hasValue||this.hasSeed)&&this.destination.next(this.acc);this.destination.complete()};return b}(b.Subscriber);e.ReduceSubscriber=l},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],174:[function(a,b,e){var h=a("./reduce-support");e.reduce=function(a,b){return this.lift(new h.ReduceOperator(a,
|
||||
b))}},{"./reduce-support":173}],175:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../observable/empty");e.repeat=function(a){void 0===a&&(a=-1);return 0===a?new k.EmptyObservable:this.lift(new m(a,this))};var m=function(){function a(c,b){this.count=c;this.source=b}a.prototype.call=function(a){return new l(a,
|
||||
this.count,this.source)};return a}(),l=function(a){function c(c,b,f){a.call(this);this.destination=c;this.count=b;this.source=f;c.add(this);this.lastSubscription=this}h(c,a);c.prototype._next=function(a){this.destination.next(a)};c.prototype._error=function(a){this.destination.error(a)};c.prototype.complete=function(){this.isUnsubscribed||this.resubscribe(this.count)};c.prototype.unsubscribe=function(){var c=this.lastSubscription;c===this?a.prototype.unsubscribe.call(this):c.unsubscribe()};c.prototype.resubscribe=
|
||||
function(a){var c=this.destination,b=this.lastSubscription;c.remove(b);b.unsubscribe();0===a-1?c.complete():(a=new f(this,a-1),this.lastSubscription=this.source.subscribe(a),c.add(this.lastSubscription))};return c}(b.Subscriber),f=function(a){function c(c,b){a.call(this);this.parent=c;this.count=b}h(c,a);c.prototype._next=function(a){this.parent.destination.next(a)};c.prototype._error=function(a){this.parent.destination.error(a)};c.prototype._complete=function(){var a=this.count;this.parent.resubscribe(0>
|
||||
a?-1:a)};return c}(b.Subscriber)},{"../Subscriber":7,"../observable/empty":109}],176:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};a=a("../Subscriber");e.retry=function(a){void 0===a&&(a=0);return this.lift(new k(a,this))};var k=function(){function a(b,c){this.count=b;this.source=c}a.prototype.call=function(a){return new m(a,this.count,
|
||||
this.source)};return a}(),m=function(a){function b(c,d,n){a.call(this);this.destination=c;this.count=d;this.source=n;c.add(this);this.lastSubscription=this}h(b,a);b.prototype._next=function(a){this.destination.next(a)};b.prototype.error=function(a){this.isUnsubscribed||(this.unsubscribe(),this.resubscribe())};b.prototype._complete=function(){this.unsubscribe();this.destination.complete()};b.prototype.resubscribe=function(a){void 0===a&&(a=0);var b=this.lastSubscription,d=this.destination;d.remove(b);
|
||||
b.unsubscribe();a=new l(this,this.count,a+1);this.lastSubscription=this.source.subscribe(a);d.add(this.lastSubscription)};return b}(a.Subscriber),l=function(a){function b(c,d,n){void 0===n&&(n=0);a.call(this,null);this.parent=c;this.count=d;this.retried=n}h(b,a);b.prototype._next=function(a){this.parent.destination.next(a)};b.prototype._error=function(a){var b=this.parent,d=this.retried,f=this.count;f&&d===f?b.destination.error(a):b.resubscribe(d)};b.prototype._complete=function(){this.parent.destination.complete()};
|
||||
return b}(a.Subscriber)},{"../Subscriber":7}],177:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../Subject"),m=a("../util/tryCatch"),l=a("../util/errorObject");e.retryWhen=function(a){return this.lift(new f(a,this))};var f=function(){function a(c,b){this.notifier=c;this.source=b}a.prototype.call=function(a){return new d(a,
|
||||
this.notifier,this.source)};return a}(),d=function(a){function b(c,d,g){a.call(this);this.destination=c;this.notifier=d;this.source=g;c.add(this);this.lastSubscription=this}h(b,a);b.prototype._next=function(a){this.destination.next(a)};b.prototype.error=function(c){var b=this.destination;if(!this.isUnsubscribed){a.prototype.unsubscribe.call(this);if(!this.retryNotifications){this.errors=new k.Subject;var d=m.tryCatch(this.notifier).call(this,this.errors);if(d===l.errorObject)b.error(l.errorObject.e);
|
||||
else{this.retryNotifications=d;var f=new g(this);this.notificationSubscription=d.subscribe(f);b.add(this.notificationSubscription)}}this.errors.next(c)}};b.prototype.destinationError=function(a){this.tearDown();this.destination.error(a)};b.prototype._complete=function(){this.destinationComplete()};b.prototype.destinationComplete=function(){this.tearDown();this.destination.complete()};b.prototype.unsubscribe=function(){this.lastSubscription===this?a.prototype.unsubscribe.call(this):this.tearDown()};
|
||||
b.prototype.tearDown=function(){a.prototype.unsubscribe.call(this);this.lastSubscription.unsubscribe();var c=this.notificationSubscription;c&&c.unsubscribe()};b.prototype.resubscribe=function(){var a=this.destination,b=this.lastSubscription;a.remove(b);b.unsubscribe();b=new c(this);this.lastSubscription=this.source.subscribe(b);a.add(this.lastSubscription)};return b}(b.Subscriber),c=function(a){function c(b){a.call(this,null);this.parent=b}h(c,a);c.prototype._next=function(a){this.parent.destination.next(a)};
|
||||
c.prototype._error=function(a){this.parent.errors.next(a)};c.prototype._complete=function(){this.parent.destinationComplete()};return c}(b.Subscriber),g=function(a){function c(b){a.call(this,null);this.parent=b}h(c,a);c.prototype._next=function(a){this.parent.resubscribe()};c.prototype._error=function(a){this.parent.destinationError(a)};c.prototype._complete=function(){this.parent.destinationComplete()};return c}(b.Subscriber)},{"../Subject":6,"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],
|
||||
178:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};a=a("../Subscriber");e.sample=function(a){return this.lift(new k(a))};var k=function(){function a(b){this.notifier=b}a.prototype.call=function(a){return new m(a,this.notifier)};return a}(),m=function(a){function b(c,d){a.call(this,c);this.notifier=d;this.hasValue=!1;this.add(d._subscribe(new l(this)))}
|
||||
h(b,a);b.prototype._next=function(a){this.lastValue=a;this.hasValue=!0};b.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))};return b}(a.Subscriber),l=function(a){function b(c){a.call(this,null);this.parent=c}h(b,a);b.prototype._next=function(){this.parent.notifyNext()};b.prototype._error=function(a){this.parent.error(a)};b.prototype._complete=function(){this.parent.notifyNext()};return b}(a.Subscriber)},{"../Subscriber":7}],179:[function(a,b,
|
||||
e){function h(a){var c=a.delay;a.subscriber.notifyNext();this.schedule(a,c)}var k=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var m=a("../scheduler/asap");e.sampleTime=function(a,c){void 0===c&&(c=m.asap);return this.lift(new l(a,c))};var l=function(){function a(c,b){this.delay=c;this.scheduler=b}a.prototype.call=function(a){return new f(a,
|
||||
this.delay,this.scheduler)};return a}(),f=function(a){function c(c,b,f){a.call(this,c);this.delay=b;this.scheduler=f;this.hasValue=!1;this.add(f.schedule(h,b,{subscriber:this,delay:b}))}k(c,a);c.prototype._next=function(a){this.lastValue=a;this.hasValue=!0};c.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))};return c}(b.Subscriber)},{"../Subscriber":7,"../scheduler/asap":215}],180:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor=
|
||||
a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");e.scan=function(a,c){return this.lift(new l(a,c))};var l=function(){function a(c,b){this.accumulator=c;this.seed=b}a.prototype.call=function(a){return new f(a,this.accumulator,this.seed)};return a}(),f=function(a){function c(c,b,f){a.call(this,c);this.accumulator=b;this.accumulatorSet=!1;this.seed=f;this.accumulator=
|
||||
b;this.accumulatorSet="undefined"!==typeof f}h(c,a);Object.defineProperty(c.prototype,"seed",{get:function(){return this._seed},set:function(a){this.accumulatorSet=!0;this._seed=a},enumerable:!0,configurable:!0});c.prototype._next=function(a){this.accumulatorSet?(a=k.tryCatch(this.accumulator).call(this,this.seed,a),a===m.errorObject?this.destination.error(m.errorObject.e):(this.seed=a,this.destination.next(this.seed))):(this.seed=a,this.destination.next(a))};return c}(b.Subscriber)},{"../Subscriber":7,
|
||||
"../util/errorObject":230,"../util/tryCatch":241}],181:[function(a,b,e){function h(){return new m.Subject}var k=a("./multicast"),m=a("../Subject");e.share=function(){return k.multicast.call(this,h).refCount()}},{"../Subject":6,"./multicast":165}],182:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};b=a("../Subscriber");var k=a("../util/tryCatch"),
|
||||
m=a("../util/errorObject"),l=a("../util/EmptyError");e.single=function(a){return this.lift(new f(a,this))};var f=function(){function a(b,c){this.predicate=b;this.source=c}a.prototype.call=function(a){return new d(a,this.predicate,this.source)};return a}(),d=function(a){function b(d,g,f){a.call(this,d);this.predicate=g;this.source=f;this.seenValue=!1;this.index=0}h(b,a);b.prototype.applySingleValue=function(a){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=
|
||||
!0,this.singleValue=a)};b.prototype._next=function(a){var b=this.predicate,c=this.index++;b?(b=k.tryCatch(b)(a,c,this.source),b===m.errorObject?this.destination.error(b.e):b&&this.applySingleValue(a)):this.applySingleValue(a)};b.prototype._complete=function(){var a=this.destination;0<this.index?(a.next(this.seenValue?this.singleValue:void 0),a.complete()):a.error(new l.EmptyError)};return b}(b.Subscriber)},{"../Subscriber":7,"../util/EmptyError":223,"../util/errorObject":230,"../util/tryCatch":241}],
|
||||
183:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");e.skip=function(a){return this.lift(new k(a))};var k=function(){function a(b){this.total=b}a.prototype.call=function(a){return new m(a,this.total)};return a}(),m=function(a){function b(d,c){a.call(this,d);this.total=c;this.count=0}h(b,a);b.prototype._next=function(a){++this.count>
|
||||
this.total&&this.destination.next(a)};return b}(a.Subscriber)},{"../Subscriber":7}],184:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};a=a("../Subscriber");e.skipUntil=function(a){return this.lift(new k(a))};var k=function(){function a(b){this.notifier=b}a.prototype.call=function(a){return new m(a,this.notifier)};return a}(),m=function(a){function b(c,
|
||||
d){a.call(this,c);this.notifier=d;this.notificationSubscriber=null;this.notificationSubscriber=new l(this);this.add(this.notifier.subscribe(this.notificationSubscriber))}h(b,a);b.prototype._next=function(a){this.notificationSubscriber.hasValue&&this.destination.next(a)};b.prototype._error=function(a){this.destination.error(a)};b.prototype._complete=function(){this.notificationSubscriber.hasCompleted&&this.destination.complete();this.notificationSubscriber.unsubscribe()};b.prototype.unsubscribe=function(){this._isUnsubscribed||
|
||||
(this._subscription?(this._subscription.unsubscribe(),this._isUnsubscribed=!0):a.prototype.unsubscribe.call(this))};return b}(a.Subscriber),l=function(a){function b(c){a.call(this,null);this.parent=c;this.hasCompleted=this.hasValue=!1}h(b,a);b.prototype._next=function(a){this.hasValue=!0};b.prototype._error=function(a){this.parent.error(a);this.hasValue=!0};b.prototype._complete=function(){this.hasCompleted=!0};return b}(a.Subscriber)},{"../Subscriber":7}],185:[function(a,b,e){var h=this&&this.__extends||
|
||||
function(a,b){function g(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(g.prototype=b.prototype,new g)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");e.skipWhile=function(a){return this.lift(new l(a))};var l=function(){function a(b){this.predicate=b}a.prototype.call=function(a){return new f(a,this.predicate)};return a}(),f=function(a){function b(c,f){a.call(this,c);this.predicate=f;this.skipping=!0;this.index=
|
||||
0}h(b,a);b.prototype._next=function(a){var b=this.destination;if(!0===this.skipping){var c=this.index++,c=k.tryCatch(this.predicate)(a,c);c===m.errorObject?b.error(c.e):this.skipping=Boolean(c)}!1===this.skipping&&b.next(a)};return b}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],186:[function(a,b,e){var h=a("../observable/fromArray"),k=a("../observable/ScalarObservable"),m=a("../observable/empty"),l=a("./concat-static"),f=a("../util/isScheduler");e.startWith=
|
||||
function(){for(var a=[],b=0;b<arguments.length;b++)a[b-0]=arguments[b];b=a[a.length-1];f.isScheduler(b)?a.pop():b=void 0;var g=a.length;return 1===g?l.concat(new k.ScalarObservable(a[0],b),this):1<g?l.concat(new h.ArrayObservable(a,b),this):l.concat(new m.EmptyObservable(b),this)}},{"../observable/ScalarObservable":105,"../observable/empty":109,"../observable/fromArray":112,"../util/isScheduler":235,"./concat-static":131}],187:[function(a,b,e){var h=a("../observable/SubscribeOnObservable");e.subscribeOn=
|
||||
function(a,b){void 0===b&&(b=0);return new h.SubscribeOnObservable(this,b,a)}},{"../observable/SubscribeOnObservable":106}],188:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");e._switch=function(){return this.lift(new m)};var m=function(){function a(){}a.prototype.call=function(a){return new l(a)};
|
||||
return a}(),l=function(a){function b(c){a.call(this,c);this.active=0;this.hasCompleted=!1}h(b,a);b.prototype._next=function(a){this.unsubscribeInner();this.active++;this.add(this.innerSubscription=k.subscribeToResult(this,a))};b.prototype._complete=function(){this.hasCompleted=!0;0===this.active&&this.destination.complete()};b.prototype.unsubscribeInner=function(){this.active=0<this.active?this.active-1:0;var a=this.innerSubscription;a&&(a.unsubscribe(),this.remove(a))};b.prototype.notifyNext=function(a,
|
||||
b){this.destination.next(b)};b.prototype.notifyError=function(a){this.destination.error(a)};b.prototype.notifyComplete=function(){this.unsubscribeInner();this.hasCompleted&&0===this.active&&this.destination.complete()};return b}(b.OuterSubscriber)},{"../OuterSubscriber":4,"../util/subscribeToResult":239}],189:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(d.prototype=
|
||||
b.prototype,new d)},k=a("../util/tryCatch"),m=a("../util/errorObject");b=a("../OuterSubscriber");var l=a("../util/subscribeToResult");e.switchMap=function(a,b){return this.lift(new f(a,b))};var f=function(){function a(b,c){this.project=b;this.resultSelector=c}a.prototype.call=function(a){return new d(a,this.project,this.resultSelector)};return a}(),d=function(a){function b(d,g,f){a.call(this,d);this.project=g;this.resultSelector=f;this.hasCompleted=!1;this.index=0}h(b,a);b.prototype._next=function(a){var b=
|
||||
this.index++,c=this.destination,d=k.tryCatch(this.project)(a,b);d===m.errorObject?c.error(d.e):((c=this.innerSubscription)&&c.unsubscribe(),this.add(this.innerSubscription=l.subscribeToResult(this,d,a,b)))};b.prototype._complete=function(){var a=this.innerSubscription;this.hasCompleted=!0;a&&!a.isUnsubscribed||this.destination.complete()};b.prototype.notifyComplete=function(a){this.remove(a);(a=this.innerSubscription)&&a.unsubscribe();this.innerSubscription=null;this.hasCompleted&&this.destination.complete()};
|
||||
b.prototype.notifyError=function(a){this.destination.error(a)};b.prototype.notifyNext=function(a,b,c,d){var g=this.resultSelector,f=this.destination;g?(a=k.tryCatch(g)(a,b,c,d),a===m.errorObject?f.error(m.errorObject.e):f.next(a)):f.next(b)};return b}(b.OuterSubscriber)},{"../OuterSubscriber":4,"../util/errorObject":230,"../util/subscribeToResult":239,"../util/tryCatch":241}],190:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&
|
||||
(a[f]=b[f]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},k=a("../util/tryCatch"),m=a("../util/errorObject");b=a("../OuterSubscriber");var l=a("../util/subscribeToResult");e.switchMapTo=function(a,b){return this.lift(new f(a,b))};var f=function(){function a(b,c){this.observable=b;this.resultSelector=c}a.prototype.call=function(a){return new d(a,this.observable,this.resultSelector)};return a}(),d=function(a){function b(d,f,g){a.call(this,d);this.inner=f;this.resultSelector=
|
||||
g;this.hasCompleted=!1;this.index=0}h(b,a);b.prototype._next=function(a){var b=this.index++,c=this.innerSubscription;c&&c.unsubscribe();this.add(this.innerSubscription=l.subscribeToResult(this,this.inner,a,b))};b.prototype._complete=function(){var a=this.innerSubscription;this.hasCompleted=!0;a&&!a.isUnsubscribed||this.destination.complete()};b.prototype.notifyComplete=function(a){this.remove(a);(a=this.innerSubscription)&&a.unsubscribe();this.innerSubscription=null;this.hasCompleted&&this.destination.complete()};
|
||||
b.prototype.notifyError=function(a){this.destination.error(a)};b.prototype.notifyNext=function(a,b,c,d){var f=this.resultSelector,g=this.destination;f?(a=k.tryCatch(f)(a,b,c,d),a===m.errorObject?g.error(m.errorObject.e):g.next(a)):g.next(b)};return b}(b.OuterSubscriber)},{"../OuterSubscriber":4,"../util/errorObject":230,"../util/subscribeToResult":239,"../util/tryCatch":241}],191:[function(a,b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&
|
||||
(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Subscriber");var k=a("../util/ArgumentOutOfRangeError"),m=a("../observable/empty");e.take=function(a){return 0===a?new m.EmptyObservable:this.lift(new l(a))};var l=function(){function a(b){this.total=b;if(0>this.total)throw new k.ArgumentOutOfRangeError;}a.prototype.call=function(a){return new f(a,this.total)};return a}(),f=function(a){function b(c,f){a.call(this,c);this.total=f;this.count=0}h(b,a);b.prototype._next=
|
||||
function(a){var b=this.total;++this.count<=b&&(this.destination.next(a),this.count===b&&this.destination.complete())};return b}(b.Subscriber)},{"../Subscriber":7,"../observable/empty":109,"../util/ArgumentOutOfRangeError":222}],192:[function(a,b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Subscriber");var k=a("../util/noop");e.takeUntil=function(a){return this.lift(new m(a))};
|
||||
var m=function(){function a(b){this.notifier=b}a.prototype.call=function(a){return new l(a,this.notifier)};return a}(),l=function(a){function b(c,e){a.call(this,c);this.notifier=e;this.notificationSubscriber=null;this.notificationSubscriber=new f(c);this.add(e.subscribe(this.notificationSubscriber))}h(b,a);b.prototype._complete=function(){this.destination.complete();this.notificationSubscriber.unsubscribe()};return b}(b.Subscriber),f=function(a){function b(c){a.call(this,null);this.destination=c}
|
||||
h(b,a);b.prototype._next=function(a){this.destination.complete()};b.prototype._error=function(a){this.destination.error(a)};b.prototype._complete=function(){k.noop()};return b}(b.Subscriber)},{"../Subscriber":7,"../util/noop":236}],193:[function(a,b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");
|
||||
e.takeWhile=function(a){return this.lift(new l(a))};var l=function(){function a(b){this.predicate=b}a.prototype.call=function(a){return new f(a,this.predicate)};return a}(),f=function(a){function b(c,f){a.call(this,c);this.predicate=f;this.index=0}h(b,a);b.prototype._next=function(a){var b=this.destination,c=k.tryCatch(this.predicate)(a,this.index++);c==m.errorObject?b.error(c.e):Boolean(c)?b.next(a):b.complete()};return b}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],
|
||||
194:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)},k=a("../observable/fromPromise");b=a("../Subscriber");var m=a("../util/tryCatch"),l=a("../util/isPromise"),f=a("../util/errorObject");e.throttle=function(a){return this.lift(new d(a))};var d=function(){function a(b){this.durationSelector=b}a.prototype.call=function(a){return new c(a,this.durationSelector)};
|
||||
return a}(),c=function(a){function b(c,d){a.call(this,c);this.durationSelector=d}h(b,a);b.prototype._next=function(a){if(!this.throttled){var b=this.destination,c=m.tryCatch(this.durationSelector)(a);c===f.errorObject?b.error(f.errorObject.e):(l.isPromise(c)&&(c=k.PromiseObservable.create(c)),this.add(this.throttled=c._subscribe(new g(this))),b.next(a))}};b.prototype._error=function(b){this.clearThrottle();a.prototype._error.call(this,b)};b.prototype._complete=function(){this.clearThrottle();a.prototype._complete.call(this)};
|
||||
b.prototype.clearThrottle=function(){var a=this.throttled;a&&(a.unsubscribe(),this.remove(a),this.throttled=null)};return b}(b.Subscriber),g=function(a){function b(c){a.call(this,null);this.parent=c}h(b,a);b.prototype._next=function(a){this.parent.clearThrottle()};b.prototype._error=function(a){this.parent.error(a)};b.prototype._complete=function(){this.parent.clearThrottle()};return b}(b.Subscriber)},{"../Subscriber":7,"../observable/fromPromise":115,"../util/errorObject":230,"../util/isPromise":234,
|
||||
"../util/tryCatch":241}],195:[function(a,b,e){function h(a){a.subscriber.clearThrottle()}var k=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Subscriber");var m=a("../scheduler/asap");e.throttleTime=function(a,b){void 0===b&&(b=m.asap);return this.lift(new l(a,b))};var l=function(){function a(b,d){this.delay=b;this.scheduler=d}a.prototype.call=function(a){return new f(a,
|
||||
this.delay,this.scheduler)};return a}(),f=function(a){function b(c,f,e){a.call(this,c);this.delay=f;this.scheduler=e}k(b,a);b.prototype._next=function(a){this.throttled||(this.add(this.throttled=this.scheduler.schedule(h,this.delay,{subscriber:this})),this.destination.next(a))};b.prototype.clearThrottle=function(){var a=this.throttled;a&&(a.unsubscribe(),this.remove(a),this.throttled=null)};return b}(b.Subscriber)},{"../Subscriber":7,"../scheduler/asap":215}],196:[function(a,b,e){var h=this&&this.__extends||
|
||||
function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Subscriber");var k=a("../scheduler/queue"),m=a("../util/isDate");e.timeout=function(a,b,f){void 0===b&&(b=null);void 0===f&&(f=k.queue);var e=m.isDate(a);a=e?+a-f.now():a;return this.lift(new l(a,e,b,f))};var l=function(){function a(b,d,f,e){this.waitFor=b;this.absoluteTimeout=d;this.errorToSend=f;this.scheduler=e}a.prototype.call=
|
||||
function(a){return new f(a,this.absoluteTimeout,this.waitFor,this.errorToSend,this.scheduler)};return a}(),f=function(a){function b(c,f,e,l,k){a.call(this,c);this.absoluteTimeout=f;this.waitFor=e;this.errorToSend=l;this.scheduler=k;this._previousIndex=this.index=0;this._hasCompleted=!1;this.scheduleTimeout()}h(b,a);Object.defineProperty(b.prototype,"previousIndex",{get:function(){return this._previousIndex},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"hasCompleted",{get:function(){return this._hasCompleted},
|
||||
enumerable:!0,configurable:!0});b.dispatchTimeout=function(a){var b=a.subscriber;a=a.index;b.hasCompleted||b.previousIndex!==a||b.notifyTimeout()};b.prototype.scheduleTimeout=function(){var a=this.index;this.scheduler.schedule(b.dispatchTimeout,this.waitFor,{subscriber:this,index:a});this.index++;this._previousIndex=a};b.prototype._next=function(a){this.destination.next(a);this.absoluteTimeout||this.scheduleTimeout()};b.prototype._error=function(a){this.destination.error(a);this._hasCompleted=!0};
|
||||
b.prototype._complete=function(){this.destination.complete();this._hasCompleted=!0};b.prototype.notifyTimeout=function(){this.error(this.errorToSend||Error("timeout"))};return b}(b.Subscriber)},{"../Subscriber":7,"../scheduler/queue":216,"../util/isDate":232}],197:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},k=a("../scheduler/queue"),
|
||||
m=a("../util/isDate");b=a("../OuterSubscriber");var l=a("../util/subscribeToResult");e.timeoutWith=function(a,b,d){void 0===d&&(d=k.queue);var e=m.isDate(a);a=e?+a-d.now():a;return this.lift(new f(a,e,b,d))};var f=function(){function a(b,c,d,f){this.waitFor=b;this.absoluteTimeout=c;this.withObservable=d;this.scheduler=f}a.prototype.call=function(a){return new d(a,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler)};return a}(),d=function(a){function b(d,f,g,e,l){a.call(this,null);
|
||||
this.destination=d;this.absoluteTimeout=f;this.waitFor=g;this.withObservable=e;this.scheduler=l;this.timeoutSubscription=void 0;this._previousIndex=this.index=0;this._hasCompleted=!1;d.add(this);this.scheduleTimeout()}h(b,a);Object.defineProperty(b.prototype,"previousIndex",{get:function(){return this._previousIndex},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"hasCompleted",{get:function(){return this._hasCompleted},enumerable:!0,configurable:!0});b.dispatchTimeout=function(a){var b=
|
||||
a.subscriber;a=a.index;b.hasCompleted||b.previousIndex!==a||b.handleTimeout()};b.prototype.scheduleTimeout=function(){var a=this.index;this.scheduler.schedule(b.dispatchTimeout,this.waitFor,{subscriber:this,index:a});this.index++;this._previousIndex=a};b.prototype._next=function(a){this.destination.next(a);this.absoluteTimeout||this.scheduleTimeout()};b.prototype._error=function(a){this.destination.error(a);this._hasCompleted=!0};b.prototype._complete=function(){this.destination.complete();this._hasCompleted=
|
||||
!0};b.prototype.handleTimeout=function(){if(!this.isUnsubscribed){var a=this.withObservable;this.unsubscribe();this.destination.add(this.timeoutSubscription=l.subscribeToResult(this,a))}};return b}(b.OuterSubscriber)},{"../OuterSubscriber":4,"../scheduler/queue":216,"../util/isDate":232,"../util/subscribeToResult":239}],198:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):
|
||||
(d.prototype=b.prototype,new d)};a=a("../Subscriber");e.toArray=function(){return this.lift(new k)};var k=function(){function a(){}a.prototype.call=function(a){return new m(a)};return a}(),m=function(a){function b(d){a.call(this,d);this.array=[]}h(b,a);b.prototype._next=function(a){this.array.push(a)};b.prototype._complete=function(){this.destination.next(this.array);this.destination.complete()};return b}(a.Subscriber)},{"../Subscriber":7}],199:[function(a,b,e){var h=a("../util/root");e.toPromise=
|
||||
function(a){var b=this;a||(h.root.Rx&&h.root.Rx.config&&h.root.Rx.config.Promise?a=h.root.Rx.config.Promise:h.root.Promise&&(a=h.root.Promise));if(!a)throw Error("no Promise impl found");return new a(function(a,f){var d;b.subscribe(function(a){return d=a},function(a){return f(a)},function(){return a(d)})})}},{"../util/root":238}],200:[function(a,b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):
|
||||
(f.prototype=b.prototype,new f)};b=a("../Subscriber");var k=a("../Subject");e.window=function(a){return this.lift(new m(a))};var m=function(){function a(b){this.closingNotifier=b}a.prototype.call=function(a){return new l(a,this.closingNotifier)};return a}(),l=function(a){function b(c,e){a.call(this,c);this.destination=c;this.closingNotifier=e;this.add(e._subscribe(new f(this)));this.openWindow()}h(b,a);b.prototype._next=function(a){this.window.next(a)};b.prototype._error=function(a){this.window.error(a);
|
||||
this.destination.error(a)};b.prototype._complete=function(){this.window.complete();this.destination.complete()};b.prototype.openWindow=function(){var a=this.window;a&&a.complete();var a=this.destination,b=this.window=new k.Subject;a.add(b);a.next(b)};return b}(b.Subscriber),f=function(a){function b(c){a.call(this,null);this.parent=c}h(b,a);b.prototype._next=function(){this.parent.openWindow()};b.prototype._error=function(a){this.parent._error(a)};b.prototype._complete=function(){this.parent._complete()};
|
||||
return b}(b.Subscriber)},{"../Subject":6,"../Subscriber":7}],201:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var k=a("../Subject");e.windowCount=function(a,b){void 0===b&&(b=0);return this.lift(new m(a,b))};var m=function(){function a(b,c){this.windowSize=b;this.startWindowEvery=c}a.prototype.call=function(a){return new l(a,
|
||||
this.windowSize,this.startWindowEvery)};return a}(),l=function(a){function b(c,d,e){a.call(this,c);this.destination=c;this.windowSize=d;this.startWindowEvery=e;this.windows=[new k.Subject];this.count=0;d=this.windows[0];c.add(d);c.next(d)}h(b,a);b.prototype._next=function(a){for(var b=0<this.startWindowEvery?this.startWindowEvery:this.windowSize,d=this.destination,f=this.windowSize,e=this.windows,l=e.length,h=0;h<l;h++)e[h].next(a);a=this.count-f+1;0<=a&&0===a%b&&e.shift().complete();0===++this.count%
|
||||
b&&(b=new k.Subject,e.push(b),d.add(b),d.next(b))};b.prototype._error=function(a){for(var b=this.windows;0<b.length;)b.shift().error(a);this.destination.error(a)};b.prototype._complete=function(){for(var a=this.windows;0<a.length;)a.shift().complete();this.destination.complete()};return b}(b.Subscriber)},{"../Subject":6,"../Subscriber":7}],202:[function(a,b,e){function h(a){var b=a.subscriber,c=a.windowTimeSpan,d=a.window;d&&d.complete();a.window=b.openWindow();this.schedule(a,c)}function k(a){var b=
|
||||
a.windowTimeSpan,c=a.subscriber,d=a.scheduler,f=a.windowCreationInterval,e=c.openWindow(),g={action:this,subscription:null};g.subscription=d.schedule(m,b,{subscriber:c,window:e,context:g});this.add(g.subscription);this.schedule(a,f)}function m(a){var b=a.subscriber,c=a.window;(a=a.context)&&a.action&&a.subscription&&a.action.remove(a.subscription);b.closeWindow(c)}var l=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=
|
||||
null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var f=a("../Subject"),d=a("../scheduler/asap");e.windowTime=function(a,b,f){void 0===b&&(b=null);void 0===f&&(f=d.asap);return this.lift(new c(a,b,f))};var c=function(){function a(b,c,d){this.windowTimeSpan=b;this.windowCreationInterval=c;this.scheduler=d}a.prototype.call=function(a){return new g(a,this.windowTimeSpan,this.windowCreationInterval,this.scheduler)};return a}(),g=function(a){function b(c,d,f,e){a.call(this,
|
||||
c);this.destination=c;this.windowTimeSpan=d;this.windowCreationInterval=f;this.scheduler=e;this.windows=[];if(null!==f&&0<=f){c={subscriber:this,window:this.openWindow(),context:null};var g={windowTimeSpan:d,windowCreationInterval:f,subscriber:this,scheduler:e};this.add(e.schedule(m,d,c));this.add(e.schedule(k,f,g))}else f={subscriber:this,window:this.openWindow(),windowTimeSpan:d},this.add(e.schedule(h,d,f))}l(b,a);b.prototype._next=function(a){for(var b=this.windows,c=b.length,d=0;d<c;d++)b[d].next(a)};
|
||||
b.prototype._error=function(a){for(var b=this.windows;0<b.length;)b.shift().error(a);this.destination.error(a)};b.prototype._complete=function(){for(var a=this.windows;0<a.length;)a.shift().complete();this.destination.complete()};b.prototype.openWindow=function(){var a=new f.Subject;this.windows.push(a);var b=this.destination;b.add(a);b.next(a);return a};b.prototype.closeWindow=function(a){a.complete();var b=this.windows;b.splice(b.indexOf(a),1)};return b}(b.Subscriber)},{"../Subject":6,"../Subscriber":7,
|
||||
"../scheduler/asap":215}],203:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var k=a("../Subject"),m=a("../Subscription"),l=a("../util/tryCatch"),f=a("../util/errorObject");e.windowToggle=function(a,b){return this.lift(new d(a,b))};var d=function(){function a(b,c){this.openings=b;this.closingSelector=c}a.prototype.call=
|
||||
function(a){return new c(a,this.openings,this.closingSelector)};return a}(),c=function(a){function b(c,d,f){a.call(this,c);this.destination=c;this.openings=d;this.closingSelector=f;this.contexts=[];this.add(this.openings._subscribe(new n(this)))}h(b,a);b.prototype._next=function(a){for(var b=this.contexts,c=b.length,d=0;d<c;d++)b[d].window.next(a)};b.prototype._error=function(a){for(var b=this.contexts;0<b.length;)b.shift().window.error(a);this.destination.error(a)};b.prototype._complete=function(){for(var a=
|
||||
this.contexts;0<a.length;){var b=a.shift();b.window.complete();b.subscription.unsubscribe()}this.destination.complete()};b.prototype.openWindow=function(a){var b=l.tryCatch(this.closingSelector)(a);if(b===f.errorObject)this.error(b.e);else{a=this.destination;var c=new k.Subject,d=new m.Subscription,e={window:c,subscription:d};this.contexts.push(e);e=new g(this,e);b=b._subscribe(e);d.add(b);a.add(d);a.add(c);a.next(c)}};b.prototype.closeWindow=function(a){var b=a.window,c=a.subscription,d=this.contexts,
|
||||
f=this.destination;d.splice(d.indexOf(a),1);b.complete();f.remove(c);f.remove(b);c.unsubscribe()};return b}(b.Subscriber),g=function(a){function b(c,d){a.call(this,null);this.parent=c;this.windowContext=d}h(b,a);b.prototype._next=function(){this.parent.closeWindow(this.windowContext)};b.prototype._error=function(a){this.parent.error(a)};b.prototype._complete=function(){this.parent.closeWindow(this.windowContext)};return b}(b.Subscriber),n=function(a){function b(c){a.call(this);this.parent=c}h(b,a);
|
||||
b.prototype._next=function(a){this.parent.openWindow(a)};b.prototype._error=function(a){this.parent.error(a)};b.prototype._complete=function(){};return b}(b.Subscriber)},{"../Subject":6,"../Subscriber":7,"../Subscription":8,"../util/errorObject":230,"../util/tryCatch":241}],204:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");
|
||||
var k=a("../Subject"),m=a("../Subscription"),l=a("../util/tryCatch"),f=a("../util/errorObject");e.windowWhen=function(a){return this.lift(new d(a))};var d=function(){function a(b){this.closingSelector=b}a.prototype.call=function(a){return new c(a,this.closingSelector)};return a}(),c=function(a){function b(c,d){a.call(this,c);this.destination=c;this.closingSelector=d;this.openWindow()}h(b,a);b.prototype._next=function(a){this.window.next(a)};b.prototype._error=function(a){this.window.error(a);this.destination.error(a);
|
||||
this._unsubscribeClosingNotification()};b.prototype._complete=function(){this.window.complete();this.destination.complete();this._unsubscribeClosingNotification()};b.prototype.unsubscribe=function(){a.prototype.unsubscribe.call(this);this._unsubscribeClosingNotification()};b.prototype._unsubscribeClosingNotification=function(){var a=this.closingNotification;a&&a.unsubscribe()};b.prototype.openWindow=function(){var a=this.closingNotification;a&&(this.remove(a),a.unsubscribe());(a=this.window)&&a.complete();
|
||||
a=this.window=new k.Subject;this.destination.next(a);var b=l.tryCatch(this.closingSelector)();if(b===f.errorObject)a=b.e,this.destination.error(a),this.window.error(a);else{var c=this.closingNotification=new m.Subscription;c.add(b._subscribe(new g(this)));this.add(c);this.add(a)}};return b}(b.Subscriber),g=function(a){function b(c){a.call(this,null);this.parent=c}h(b,a);b.prototype._next=function(){this.parent.openWindow()};b.prototype._error=function(a){this.parent.error(a)};b.prototype._complete=
|
||||
function(){this.parent.openWindow()};return b}(b.Subscriber)},{"../Subject":6,"../Subscriber":7,"../Subscription":8,"../util/errorObject":230,"../util/tryCatch":241}],205:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},k=a("../util/tryCatch"),m=a("../util/errorObject");b=a("../OuterSubscriber");var l=a("../util/subscribeToResult");e.withLatestFrom=
|
||||
function(){for(var a=[],b=0;b<arguments.length;b++)a[b-0]=arguments[b];var d;"function"===typeof a[a.length-1]&&(d=a.pop());return this.lift(new f(a,d))};var f=function(){function a(b,c){this.observables=b;this.project=c}a.prototype.call=function(a){return new d(a,this.observables,this.project)};return a}(),d=function(a){function b(d,f,e){a.call(this,d);this.observables=f;this.project=e;this.toRespond=[];d=f.length;this.values=Array(d);for(e=0;e<d;e++)this.toRespond.push(e);for(e=0;e<d;e++){var g=
|
||||
f[e];this.add(l.subscribeToResult(this,g,g,e))}}h(b,a);b.prototype.notifyNext=function(a,b,c,d){this.values[c]=b;a=this.toRespond;0<a.length&&(c=a.indexOf(c),-1!==c&&a.splice(c,1))};b.prototype.notifyComplete=function(){};b.prototype._next=function(a){if(0===this.toRespond.length){var b=this.destination,c=this.project;a=[a].concat(this.values);c?(c=k.tryCatch(this.project).apply(this,a),c===m.errorObject?b.error(c.e):b.next(c)):b.next(a)}};return b}(b.OuterSubscriber)},{"../OuterSubscriber":4,"../util/errorObject":230,
|
||||
"../util/subscribeToResult":239,"../util/tryCatch":241}],206:[function(a,b,e){var h=a("../observable/fromArray"),k=a("./zip-support");e.zip=function(){for(var a=[],b=0;b<arguments.length;b++)a[b-0]=arguments[b];b=a[a.length-1];"function"===typeof b&&a.pop();return(new h.ArrayObservable(a)).lift(new k.ZipOperator(b))}},{"../observable/fromArray":112,"./zip-support":207}],207:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&
|
||||
(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject"),l=a("../OuterSubscriber"),f=a("../util/subscribeToResult"),d=a("../util/SymbolShim"),c=Array.isArray;a=function(){function a(b){this.project=b}a.prototype.call=function(a){return new g(a,this.project)};return a}();e.ZipOperator=a;var g=function(a){function b(c,d,f){void 0===f&&(f=Object.create(null));a.call(this,c);this.index=0;this.iterators=
|
||||
[];this.active=0;this.project="function"===typeof d?d:null;this.values=f}h(b,a);b.prototype._next=function(a){var b=this.iterators,f=this.index++;c(a)?b.push(new p(a)):"function"===typeof a[d.SymbolShim.iterator]?b.push(new n(a[d.SymbolShim.iterator]())):b.push(new q(this.destination,this,a,f))};b.prototype._complete=function(){var a=this.iterators,b=a.length;this.active=b;for(var c=0;c<b;c++){var d=a[c];d.stillUnsubscribed?d.subscribe(d,c):this.active--}};b.prototype.notifyInactive=function(){this.active--;
|
||||
0===this.active&&this.destination.complete()};b.prototype.checkIterators=function(){for(var a=this.iterators,b=a.length,c=this.destination,d=0;d<b;d++){var f=a[d];if("function"===typeof f.hasValue&&!f.hasValue())return}for(var e=!1,g=[],d=0;d<b;d++){var f=a[d],l=f.next();f.hasCompleted()&&(e=!0);if(l.done){c.complete();return}g.push(l.value)}(a=this.project)?(l=k.tryCatch(a).apply(this,g),l===m.errorObject?c.error(m.errorObject.e):c.next(l)):c.next(g);e&&c.complete()};return b}(b.Subscriber);e.ZipSubscriber=
|
||||
g;var n=function(){function a(b){this.iterator=b;this.nextResult=b.next()}a.prototype.hasValue=function(){return!0};a.prototype.next=function(){var a=this.nextResult;this.nextResult=this.iterator.next();return a};a.prototype.hasCompleted=function(){var a=this.nextResult;return a&&a.done};return a}(),p=function(){function a(b){this.array=b;this.length=this.index=0;this.length=b.length}a.prototype[d.SymbolShim.iterator]=function(){return this};a.prototype.next=function(a){a=this.index++;var b=this.array;
|
||||
return a<this.length?{value:b[a],done:!1}:{done:!0}};a.prototype.hasValue=function(){return this.array.length>this.index};a.prototype.hasCompleted=function(){return this.array.length===this.index};return a}(),q=function(a){function b(c,d,f,e){a.call(this,c);this.parent=d;this.observable=f;this.index=e;this.stillUnsubscribed=!0;this.buffer=[];this.isComplete=!1}h(b,a);b.prototype[d.SymbolShim.iterator]=function(){return this};b.prototype.next=function(){var a=this.buffer;return 0===a.length&&this.isComplete?
|
||||
{done:!0}:{value:a.shift(),done:!1}};b.prototype.hasValue=function(){return 0<this.buffer.length};b.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete};b.prototype.notifyComplete=function(){0<this.buffer.length?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()};b.prototype.notifyNext=function(a,b,c,d){this.buffer.push(b);this.parent.checkIterators()};b.prototype.subscribe=function(a,b){this.add(f.subscribeToResult(this,this.observable,this,
|
||||
b))};return b}(l.OuterSubscriber)},{"../OuterSubscriber":4,"../Subscriber":7,"../util/SymbolShim":229,"../util/errorObject":230,"../util/subscribeToResult":239,"../util/tryCatch":241}],208:[function(a,b,e){var h=a("./zip-static");e.zipProto=function(){for(var a=[],b=0;b<arguments.length;b++)a[b-0]=arguments[b];a.unshift(this);return h.zip.apply(this,a)}},{"./zip-static":206}],209:[function(a,b,e){var h=a("./zip-support");e.zipAll=function(a){return this.lift(new h.ZipOperator(a))}},{"./zip-support":207}],
|
||||
210:[function(a,b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)},k=a("../util/Immediate");a=function(a){function b(){a.apply(this,arguments)}h(b,a);b.prototype.schedule=function(a){var b=this;if(this.isUnsubscribed)return this;this.state=a;a=this.scheduler;a.actions.push(this);a.scheduled||(a.scheduled=!0,this.id=k.Immediate.setImmediate(function(){b.id=
|
||||
null;b.scheduler.scheduled=!1;b.scheduler.flush()}));return this};b.prototype.unsubscribe=function(){var b=this.id,d=this.scheduler;a.prototype.unsubscribe.call(this);0===d.actions.length&&(d.active=!1,d.scheduled=!1);b&&(this.id=null,k.Immediate.clearImmediate(b))};return b}(a("./QueueAction").QueueAction);e.AsapAction=a},{"../util/Immediate":225,"./QueueAction":213}],211:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&
|
||||
(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};b=a("./QueueScheduler");var k=a("./AsapAction"),m=a("./QueueAction");a=function(a){function b(){a.apply(this,arguments)}h(b,a);b.prototype.scheduleNow=function(a,b){return(this.scheduled?new m.QueueAction(this,a):new k.AsapAction(this,a)).schedule(b)};return b}(b.QueueScheduler);e.AsapScheduler=a},{"./AsapAction":210,"./QueueAction":213,"./QueueScheduler":214}],212:[function(a,b,e){var h=this&&this.__extends||function(a,
|
||||
b){function e(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(e.prototype=b.prototype,new e)};a=function(a){function b(e,f){a.call(this,e,f);this.scheduler=e;this.work=f}h(b,a);b.prototype.schedule=function(a,b){var d=this;void 0===b&&(b=0);if(this.isUnsubscribed)return this;this.delay=b;this.state=a;var c=this.id;null!=c&&(this.id=void 0,clearTimeout(c));var e=this.scheduler;this.id=setTimeout(function(){d.id=void 0;e.actions.push(d);e.flush()},
|
||||
this.delay);return this};b.prototype.unsubscribe=function(){var b=this.id;null!=b&&(this.id=void 0,clearTimeout(b));a.prototype.unsubscribe.call(this)};return b}(a("./QueueAction").QueueAction);e.FutureAction=a},{"./QueueAction":213}],213:[function(a,b,e){var h=this&&this.__extends||function(a,b){function e(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(e.prototype=b.prototype,new e)};a=function(a){function b(e,f){a.call(this);this.scheduler=
|
||||
e;this.work=f}h(b,a);b.prototype.schedule=function(a){if(this.isUnsubscribed)return this;this.state=a;a=this.scheduler;a.actions.push(this);a.flush();return this};b.prototype.execute=function(){if(this.isUnsubscribed)throw Error("How did did we execute a canceled Action?");this.work(this.state)};b.prototype.unsubscribe=function(){var b=this.scheduler.actions,f=b.indexOf(this);this.scheduler=this.state=this.work=void 0;-1!==f&&b.splice(f,1);a.prototype.unsubscribe.call(this)};return b}(a("../Subscription").Subscription);
|
||||
e.QueueAction=a},{"../Subscription":8}],214:[function(a,b,e){var h=a("./QueueAction"),k=a("./FutureAction");a=function(){function a(){this.actions=[];this.scheduled=this.active=!1}a.prototype.now=function(){return Date.now()};a.prototype.flush=function(){if(!this.active&&!this.scheduled){this.active=!0;for(var a=this.actions,b=void 0;b=a.shift();)b.execute();this.active=!1}};a.prototype.schedule=function(a,b,d){void 0===b&&(b=0);return 0>=b?this.scheduleNow(a,d):this.scheduleLater(a,b,d)};a.prototype.scheduleNow=
|
||||
function(a,b){return(new h.QueueAction(this,a)).schedule(b)};a.prototype.scheduleLater=function(a,b,d){return(new k.FutureAction(this,a)).schedule(d,b)};return a}();e.QueueScheduler=a},{"./FutureAction":212,"./QueueAction":213}],215:[function(a,b,e){a=a("./AsapScheduler");e.asap=new a.AsapScheduler},{"./AsapScheduler":211}],216:[function(a,b,e){a=a("./QueueScheduler");e.queue=new a.QueueScheduler},{"./QueueScheduler":214}],217:[function(a,b,e){var h=this&&this.__extends||function(a,b){function e(){this.constructor=
|
||||
a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(e.prototype=b.prototype,new e)};a=function(a){function b(){a.call(this);this._value=void 0;this._isScalar=this._hasNext=!1}h(b,a);b.prototype._subscribe=function(b){this.completeSignal&&this._hasNext&&b.next(this._value);return a.prototype._subscribe.call(this,b)};b.prototype._next=function(a){this._value=a;this._hasNext=!0};b.prototype._complete=function(){var a=-1,b=this.observers,d=b.length;this.observers=
|
||||
void 0;this.isUnsubscribed=!0;if(this._hasNext)for(;++a<d;){var c=b[a];c.next(this._value);c.complete()}else for(;++a<d;)b[a].complete();this.isUnsubscribed=!1};return b}(a("../Subject").Subject);e.AsyncSubject=a},{"../Subject":6}],218:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};b=a("../Subject");var k=a("../util/throwError"),m=a("../util/ObjectUnsubscribedError");
|
||||
a=function(a){function b(d){a.call(this);this._value=d;this._hasError=!1}h(b,a);b.prototype.getValue=function(){if(this._hasError)k.throwError(this._err);else if(this.isUnsubscribed)k.throwError(new m.ObjectUnsubscribedError);else return this._value};Object.defineProperty(b.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0});b.prototype._subscribe=function(b){var c=a.prototype._subscribe.call(this,b);if(c)return c.isUnsubscribed||b.next(this._value),c};b.prototype._next=
|
||||
function(b){a.prototype._next.call(this,this._value=b)};b.prototype._error=function(b){this._hasError=!0;a.prototype._error.call(this,this._err=b)};return b}(b.Subject);e.BehaviorSubject=a},{"../Subject":6,"../util/ObjectUnsubscribedError":228,"../util/throwError":240}],219:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};b=a("../Subject");
|
||||
var k=a("../scheduler/queue");a=function(a){function b(d,c,f){void 0===d&&(d=Number.POSITIVE_INFINITY);void 0===c&&(c=Number.POSITIVE_INFINITY);a.call(this);this.events=[];this.bufferSize=1>d?1:d;this._windowTime=1>c?1:c;this.scheduler=f}h(b,a);b.prototype._next=function(b){var c=this._getNow();this.events.push(new m(c,b));this._trimBufferThenGetEvents(c);a.prototype._next.call(this,b)};b.prototype._subscribe=function(b){for(var c=this._trimBufferThenGetEvents(this._getNow()),f=-1,e=c.length;!b.isUnsubscribed&&
|
||||
++f<e;)b.next(c[f].value);return a.prototype._subscribe.call(this,b)};b.prototype._getNow=function(){return(this.scheduler||k.queue).now()};b.prototype._trimBufferThenGetEvents=function(a){for(var b=this.bufferSize,f=this._windowTime,e=this.events,h=e.length,k=0;k<h&&!(a-e[k].time<f);)k+=1;h>b&&(k=Math.max(k,h-b));0<k&&e.splice(0,k);return e};return b}(b.Subject);e.ReplaySubject=a;var m=function(){return function(a,b){this.time=a;this.value=b}}()},{"../Subject":6,"../scheduler/queue":216}],220:[function(a,
|
||||
b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Subscription");var k=a("../Subscriber");a=function(a){function b(f,d){a.call(this);this.subject=f;this.observer=d;this.isUnsubscribed=!1}h(b,a);b.prototype.unsubscribe=function(){if(!this.isUnsubscribed){this.isUnsubscribed=!0;var a=this.subject,b=a.observers;this.subject=void 0;b&&0!==b.length&&
|
||||
!a.isUnsubscribed&&(this.observer instanceof k.Subscriber&&this.observer.unsubscribe(),a=b.indexOf(this.observer),-1!==a&&b.splice(a,1))}};return b}(b.Subscription);e.SubjectSubscription=a},{"../Subscriber":7,"../Subscription":8}],221:[function(a,b,e){a=a("../util/SymbolShim");e.rxSubscriber=a.SymbolShim.for("rxSubscriber")},{"../util/SymbolShim":229}],222:[function(a,b,e){a=function(){return function(){this.name="ArgumentOutOfRangeError";this.message="argument out of range"}}();e.ArgumentOutOfRangeError=
|
||||
a},{}],223:[function(a,b,e){a=function(){return function(){this.name="EmptyError";this.message="no elements in sequence"}}();e.EmptyError=a},{}],224:[function(a,b,e){a=function(){function a(){this.values={}}a.prototype.delete=function(a){this.values[a]=null;return!0};a.prototype.set=function(a,b){this.values[a]=b;return this};a.prototype.get=function(a){return this.values[a]};a.prototype.forEach=function(a,b){var e=this.values,f;for(f in e)e.hasOwnProperty(f)&&null!==e[f]&&a.call(b,e[f],f)};a.prototype.clear=
|
||||
function(){this.values={}};return a}();e.FastMap=a},{}],225:[function(a,b,e){a=a("./root");b=function(){function a(b){this.root=b;b.setImmediate?(this.setImmediate=b.setImmediate,this.clearImmediate=b.clearImmediate):(this.nextHandle=1,this.tasksByHandle={},this.currentlyRunningATask=!1,this.canUseProcessNextTick()?this.setImmediate=this.createProcessNextTickSetImmediate():this.canUsePostMessage()?this.setImmediate=this.createPostMessageSetImmediate():this.canUseMessageChannel()?this.setImmediate=
|
||||
this.createMessageChannelSetImmediate():this.canUseReadyStateChange()?this.setImmediate=this.createReadyStateChangeSetImmediate():this.setImmediate=this.createSetTimeoutSetImmediate(),b=function l(a){delete l.instance.tasksByHandle[a]},b.instance=this,this.clearImmediate=b)}a.prototype.identify=function(a){return this.root.Object.prototype.toString.call(a)};a.prototype.canUseProcessNextTick=function(){return"[object process]"===this.identify(this.root.process)};a.prototype.canUseMessageChannel=function(){return Boolean(this.root.MessageChannel)};
|
||||
a.prototype.canUseReadyStateChange=function(){var a=this.root.document;return Boolean(a&&"onreadystatechange"in a.createElement("script"))};a.prototype.canUsePostMessage=function(){var a=this.root;if(a.postMessage&&!a.importScripts){var b=!0,e=a.onmessage;a.onmessage=function(){b=!1};a.postMessage("","*");a.onmessage=e;return b}return!1};a.prototype.partiallyApplied=function(a){for(var b=[],e=1;e<arguments.length;e++)b[e-1]=arguments[e];e=function d(){var a=d.handler,b=d.args;"function"===typeof a?
|
||||
a.apply(void 0,b):(new Function(""+a))()};e.handler=a;e.args=b;return e};a.prototype.addFromSetImmediateArguments=function(a){this.tasksByHandle[this.nextHandle]=this.partiallyApplied.apply(void 0,a);return this.nextHandle++};a.prototype.createProcessNextTickSetImmediate=function(){var a=function l(){var a=l.instance,b=a.addFromSetImmediateArguments(arguments);a.root.process.nextTick(a.partiallyApplied(a.runIfPresent,b));return b};a.instance=this;return a};a.prototype.createPostMessageSetImmediate=
|
||||
function(){var a=this.root,b="setImmediate$"+a.Math.random()+"$",e=function d(c){var e=d.instance;c.source===a&&"string"===typeof c.data&&0===c.data.indexOf(b)&&e.runIfPresent(+c.data.slice(b.length))};e.instance=this;a.addEventListener("message",e,!1);e=function c(){var a=c,b=a.messagePrefix,a=a.instance,e=a.addFromSetImmediateArguments(arguments);a.root.postMessage(b+e,"*");return e};e.instance=this;e.messagePrefix=b;return e};a.prototype.runIfPresent=function(a){if(this.currentlyRunningATask)this.root.setTimeout(this.partiallyApplied(this.runIfPresent,
|
||||
a),0);else{var b=this.tasksByHandle[a];if(b){this.currentlyRunningATask=!0;try{b()}finally{this.clearImmediate(a),this.currentlyRunningATask=!1}}}};a.prototype.createMessageChannelSetImmediate=function(){var a=this,b=new this.root.MessageChannel;b.port1.onmessage=function(b){a.runIfPresent(b.data)};var e=function d(){var a=d,b=a.channel,a=a.instance.addFromSetImmediateArguments(arguments);b.port2.postMessage(a);return a};e.channel=b;e.instance=this;return e};a.prototype.createReadyStateChangeSetImmediate=
|
||||
function(){var a=function l(){var a=l.instance,b=a.root.document,c=b.documentElement,e=a.addFromSetImmediateArguments(arguments),h=b.createElement("script");h.onreadystatechange=function(){a.runIfPresent(e);h.onreadystatechange=null;c.removeChild(h);h=null};c.appendChild(h);return e};a.instance=this;return a};a.prototype.createSetTimeoutSetImmediate=function(){var a=function l(){var a=l.instance,b=a.addFromSetImmediateArguments(arguments);a.root.setTimeout(a.partiallyApplied(a.runIfPresent,b),0);
|
||||
return b};a.instance=this;return a};return a}();e.ImmediateDefinition=b;e.Immediate=new b(a.root)},{"./root":238}],226:[function(a,b,e){b=a("./root");a=a("./MapPolyfill");e.Map=b.root.Map||a.MapPolyfill},{"./MapPolyfill":227,"./root":238}],227:[function(a,b,e){a=function(){function a(){this.size=0;this._values=[];this._keys=[]}a.prototype.get=function(a){a=this._keys.indexOf(a);return-1===a?void 0:this._values[a]};a.prototype.set=function(a,b){var e=this._keys.indexOf(a);-1===e?(this._keys.push(a),
|
||||
this._values.push(b),this.size++):this._values[e]=b;return this};a.prototype.delete=function(a){a=this._keys.indexOf(a);if(-1===a)return!1;this._values.splice(a,1);this._keys.splice(a,1);this.size--;return!0};a.prototype.forEach=function(a,b){for(var e=0;e<this.size;e++)a.call(b,this._values[e],this._keys[e])};return a}();e.MapPolyfill=a},{}],228:[function(a,b,e){var h=this&&this.__extends||function(a,b){function e(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===
|
||||
b?Object.create(b):(e.prototype=b.prototype,new e)};a=function(a){function b(){a.call(this,"object unsubscribed");this.name="ObjectUnsubscribedError"}h(b,a);return b}(Error);e.ObjectUnsubscribedError=a},{}],229:[function(a,b,e){function h(a){var b=m(a);f(b,a);d(b);k(b);return b}function k(a){a.for||(a.for=l)}function m(a){a.Symbol||(a.Symbol=function(a){return"@@Symbol("+a+"):"+c++});return a.Symbol}function l(a){return"@@"+a}function f(a,b){if(!a.iterator)if("function"===typeof a.for)a.iterator=
|
||||
a.for("iterator");else if(b.Set&&"function"===typeof(new b.Set)["@@iterator"])a.iterator="@@iterator";else if(b.Map)for(var c=Object.getOwnPropertyNames(b.Map.prototype),d=0;d<c.length;++d){var e=c[d];if("entries"!==e&&"size"!==e&&b.Map.prototype[e]===b.Map.prototype.entries){a.iterator=e;break}}else a.iterator="@@iterator"}function d(a){a.observable||(a.observable="function"===typeof a.for?a.for("observable"):"@@observable")}a=a("./root");e.polyfillSymbol=h;e.ensureFor=k;var c=0;e.ensureSymbol=m;
|
||||
e.symbolForPolyfill=l;e.ensureIterator=f;e.ensureObservable=d;e.SymbolShim=h(a.root)},{"./root":238}],230:[function(a,b,e){e.errorObject={e:{}}},{}],231:[function(a,b,e){e.isArray=Array.isArray||function(a){return a&&"number"===typeof a.length}},{}],232:[function(a,b,e){e.isDate=function(a){return a instanceof Date&&!isNaN(+a)}},{}],233:[function(a,b,e){var h=Array.isArray;e.isNumeric=function(a){return!h(a)&&0<=a-parseFloat(a)+1}},{}],234:[function(a,b,e){e.isPromise=function(a){return a&&"function"!==
|
||||
typeof a.subscribe&&"function"===typeof a.then}},{}],235:[function(a,b,e){e.isScheduler=function(a){return a&&"function"===typeof a.schedule}},{}],236:[function(a,b,e){e.noop=function(){}},{}],237:[function(a,b,e){e.not=function(a,b){function e(){return!e.pred.apply(e.thisArg,arguments)}e.pred=a;e.thisArg=b;return e}},{}],238:[function(a,b,e){a="undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{};b={"boolean":!1,"function":!0,object:!0,number:!1,
|
||||
string:!1,undefined:!1};e.root=b[typeof self]&&self||b[typeof window]&&window;!(a=b[typeof a]&&a)||a.global!==a&&a.window!==a||(e.root=a)},{}],239:[function(a,b,e){var h=a("../Observable"),k=a("../util/SymbolShim"),m=a("../InnerSubscriber"),l=Array.isArray;e.subscribeToResult=function(a,b,c,e){var n=new m.InnerSubscriber(a,c,e);if(!n.isUnsubscribed){if(b instanceof h.Observable){if(b._isScalar){n.next(b.value);n.complete();return}return b.subscribe(n)}if(l(b)){a=0;for(c=b.length;a<c&&!n.isUnsubscribed;a++)n.next(b[a]);
|
||||
n.isUnsubscribed||n.complete()}else{if("function"===typeof b.then)return b.then(function(a){n.isUnsubscribed||(n.next(a),n.complete())},function(a){return n.error(a)}).then(null,function(a){setTimeout(function(){throw a;})}),n;if("function"===typeof b[k.SymbolShim.iterator]){for(a=0;a<b.length&&(n.next(b[a]),!n.isUnsubscribed);a++);n.isUnsubscribed||n.complete()}else if("function"===typeof b[k.SymbolShim.observable])if(b=b[k.SymbolShim.observable](),"function"!==typeof b.subscribe)n.error("invalid observable");
|
||||
else return b.subscribe(new m.InnerSubscriber(a,c,e));else n.error(new TypeError("unknown type returned"))}}}},{"../InnerSubscriber":1,"../Observable":3,"../util/SymbolShim":229}],240:[function(a,b,e){e.throwError=function(a){throw a;}},{}],241:[function(a,b,e){function h(){try{return m.apply(this,arguments)}catch(a){return k.errorObject.e=a,k.errorObject}}var k=a("./errorObject"),m;e.tryCatch=function(a){m=a;return h}},{"./errorObject":230}],242:[function(a,b,e){e.tryOrOnError=function(a){function b(){try{b.target.apply(this,
|
||||
arguments)}catch(a){this.error(a)}}b.target=a;return b}},{}]},{},[5])(5)});
|
||||
+18
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
Vendored
+12
File diff suppressed because one or more lines are too long
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @license
|
||||
* Visual Blocks Language
|
||||
*
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Accessible strings.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
// The following are all Accessible Blockly strings.
|
||||
// None of the alert messages have periods on them. This is because the user
|
||||
// will have their punctuation setting set to 'all', which will result in any
|
||||
// punctuation being read out to them.
|
||||
Blockly.Msg.RUN_CODE = 'Run Code';
|
||||
Blockly.Msg.CLEAR_WORKSPACE = 'Clear Workspace';
|
||||
Blockly.Msg.BLOCK_ACTION_LIST = 'block action list';
|
||||
Blockly.Msg.CUT_BLOCK = 'cut block';
|
||||
Blockly.Msg.COPY_BLOCK = 'copy block';
|
||||
Blockly.Msg.PASTE_BELOW = 'paste below';
|
||||
Blockly.Msg.PASTE_ABOVE = 'paste above';
|
||||
Blockly.Msg.MARK_SPOT_BELOW = 'mark spot below';
|
||||
Blockly.Msg.MARK_SPOT_ABOVE = 'mark spot above';
|
||||
Blockly.Msg.MOVE_TO_MARKED_SPOT = 'move to marked spot';
|
||||
Blockly.Msg.DELETE = 'delete';
|
||||
Blockly.Msg.MARK_THIS_SPOT = 'mark this spot';
|
||||
Blockly.Msg.PASTE = 'paste';
|
||||
Blockly.Msg.TOOLBOX_LOAD_MSG = 'Loading Toolbox…';
|
||||
Blockly.Msg.WORKSPACE_LOAD_MSG = 'Loading Workspace…';
|
||||
Blockly.Msg.BLOCK_SUMMARY = 'block summary';
|
||||
Blockly.Msg.OPTION_LIST = 'option list';
|
||||
Blockly.Msg.ARGUMENT_OPTIONS_LIST = 'argument options list';
|
||||
Blockly.Msg.ARGUMENT_INPUT = 'argument input';
|
||||
Blockly.Msg.ARGUMENT_BLOCK_ACTION_LIST = 'argument block action list';
|
||||
Blockly.Msg.TEXT = 'text';
|
||||
Blockly.Msg.BUTTON = 'button';
|
||||
Blockly.Msg.UNAVAILABLE = 'unavailable';
|
||||
Blockly.Msg.CURRENT_ARGUMENT_VALUE = 'current argument value:';
|
||||
Blockly.Msg.COPY_TO_WORKSPACE = 'copy to workspace';
|
||||
Blockly.Msg.COPY_TO_CLIPBOARD = 'copy to clipboard';
|
||||
Blockly.Msg.COPY_TO_MARKED_SPOT = 'copy to marked spot';
|
||||
Blockly.Msg.TOOLBOX = 'Toolbox';
|
||||
Blockly.Msg.WORKSPACE = 'Workspace';
|
||||
Blockly.Msg.ANY = 'any';
|
||||
Blockly.Msg.STATEMENT = 'statement';
|
||||
Blockly.Msg.VALUE = 'value';
|
||||
Blockly.Msg.CUT_BLOCK_MSG = 'Cut block: ';
|
||||
Blockly.Msg.COPIED_BLOCK_MSG = 'Copied block to clipboard: ';
|
||||
Blockly.Msg.PASTED_BLOCK_FROM_CLIPBOARD_MSG = 'Pasted block from clipboard: ';
|
||||
Blockly.Msg.PASTED_BLOCK_TO_MARKED_SPOT_MSG = 'Pasted block to marked spot: ';
|
||||
Blockly.Msg.MARKED_SPOT_MSG = 'Marked spot';
|
||||
Blockly.Msg.BLOCK_MOVED_TO_MARKED_SPOT_MSB = 'Block moved to marked spot: ';
|
||||
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component that details how blocks are
|
||||
* rendered in the toolbox in AccessibleBlockly. Also handles any interactions
|
||||
* with the blocks.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
blocklyApp.ToolboxTreeView = ng.core
|
||||
.Component({
|
||||
selector: 'toolbox-tree-view',
|
||||
template: `
|
||||
<li #parentList [id]="idMap['parentList']" role="treeitem"
|
||||
[ngClass]="{blocklyHasChildren: displayBlockMenu || block.inputList.length > 0, blocklyActiveDescendant: index == 0 && noCategories}"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr('blockly-block-summary', idMap['blockSummaryLabel'])"
|
||||
[attr.aria-selected]="index == 0 && tree.getAttribute('aria-activedescendant') == 'blockly-toolbox-tree-node0'"
|
||||
[attr.aria-level]="level">
|
||||
{{setActiveDesc(parentList)}}
|
||||
<label #blockSummaryLabel [id]="idMap['blockSummaryLabel']">{{block.toString()}}</label>
|
||||
<ol role="group" *ngIf="displayBlockMenu || block.inputList.length > 0" [attr.aria-level]="level+1">
|
||||
<li #listItem [attr.aria-labelledBy]="generateAriaLabelledByAttr('blockly-block-menu', idMap['blockSummaryLabel'])" class="blocklyHasChildren" [id]="idMap['listItem']" *ngIf="displayBlockMenu" role="treeitem" aria-selected=false [attr.aria-level]="level+1">
|
||||
<label #label [id]="idMap['label']">{{stringMap['BLOCK_ACTION_LIST']}}</label>
|
||||
<ol role="group" *ngIf="displayBlockMenu" [attr.aria-level]="level+2">
|
||||
<li #workspaceCopy [id]="idMap['workspaceCopy']" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['workspaceCopyButton'], 'blockly-button')"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button #workspaceCopyButton [id]="idMap['workspaceCopyButton']"
|
||||
(click)="copyToWorkspace(block)">{{stringMap['COPY_TO_WORKSPACE']}}</button>
|
||||
</li>
|
||||
<li #blockCopy [id]="idMap['blockCopy']" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['blockCopyButton'], 'blockly-button')"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button #blockCopyButton [id]="idMap['blockCopyButton']"
|
||||
(click)="clipboardService.copy(block, true)">{{stringMap['COPY_TO_CLIPBOARD']}}</button>
|
||||
</li>
|
||||
<li #sendToSelected [id]="idMap['sendToSelected']" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['sendToSelectedButton'], 'blockly-button', utilsService.getMarkedBlockCompatibilityHTMLText(clipboardService.isBlockCompatibleWithMarkedConnection(block)))"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button #sendToSelectedButton [id]="idMap['sendToSelectedButton']" (click)="copyToMarked(block)"
|
||||
[disabled]="getMarkedBlockCompatibilityHTMLText(clipboardService.isBlockCompatibleWithMarkedConnection(block))">
|
||||
{{stringMap['COPY_TO_MARKED_SPOT']}}</button>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<div *ngFor="#inputBlock of block.inputList; #i=index">
|
||||
<field-view *ngFor="#field of inputBlock.fieldRow; #j=index" [attr.aria-level]="level+1" [field]="field" [level]="level+1"></field-view>
|
||||
<toolbox-tree-view *ngIf="inputBlock.connection && inputBlock.connection.targetBlock()" [block]="inputBlock.connection.targetBlock()" [displayBlockMenu]="false" [level]="level+1"></toolbox-tree-view>
|
||||
<li #listItem1 [id]="idMap['listItem' + i]" role="treeitem"
|
||||
*ngIf="inputBlock.connection && !inputBlock.connection.targetBlock()"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr('blockly-argument-text', idMap['listItem' + i + 'Label'])"
|
||||
[attr.aria-level]="level+1" aria-selected=false>
|
||||
<!--TODO(madeeha): i18n here will need to happen in a different way due to the way grammar changes based on language.-->
|
||||
<label #label [id]="idMap['listItem' + i + 'Label']">{{utilsService.getInputTypeLabel(inputBlock.connection)}} {{utilsService.getBlockTypeLabel(inputBlock)}} needed:</label>
|
||||
</li>
|
||||
</div>
|
||||
</ol>
|
||||
</li>
|
||||
<toolbox-tree-view *ngIf= "block.nextConnection && block.nextConnection.targetBlock()" [level]="level" [block]="block.nextConnection.targetBlock()" [displayBlockMenu]="false"></toolbox-tree-view>
|
||||
`,
|
||||
directives: [ng.core.forwardRef(
|
||||
function() { return blocklyApp.ToolboxTreeView; }),
|
||||
blocklyApp.FieldView],
|
||||
inputs: ['block', 'displayBlockMenu', 'level', 'index', 'tree',
|
||||
'noCategories'],
|
||||
providers: [blocklyApp.TreeService, blocklyApp.UtilsService]
|
||||
})
|
||||
.Class({
|
||||
constructor: [blocklyApp.ClipboardService, blocklyApp.TreeService,
|
||||
blocklyApp.UtilsService,
|
||||
function(_clipboardService, _treeService, _utilsService) {
|
||||
this.infoBlocks = Object.create(null);
|
||||
this.clipboardService = _clipboardService;
|
||||
this.treeService = _treeService;
|
||||
this.utilsService = _utilsService;
|
||||
this.stringMap = {
|
||||
'BLOCK_ACTION_LIST': Blockly.Msg.BLOCK_ACTION_LIST,
|
||||
'COPY_TO_CLIPBOARD': Blockly.Msg.COPY_TO_CLIPBOARD,
|
||||
'COPY_TO_WORKSPACE': Blockly.Msg.COPY_TO_WORKSPACE,
|
||||
'COPY_TO_MARKED_SPOT': Blockly.Msg.COPY_TO_MARKED_SPOT
|
||||
};
|
||||
}],
|
||||
ngOnInit: function() {
|
||||
var elementsNeedingIds = ['blockSummaryLabel'];
|
||||
if (this.displayBlockMenu || this.block.inputList.length){
|
||||
elementsNeedingIds = elementsNeedingIds.concat(['listItem', 'label',
|
||||
'workspaceCopy', 'workspaceCopyButton', 'blockCopy',
|
||||
'blockCopyButton', 'sendToSelected', 'sendToSelectedButton']);
|
||||
}
|
||||
for (var i = 0; i < this.block.inputList.length; i++){
|
||||
elementsNeedingIds.push('listItem' + i);
|
||||
elementsNeedingIds.push('listItem' + i + 'Label')
|
||||
}
|
||||
this.idMap = this.utilsService.generateIds(elementsNeedingIds);
|
||||
if (this.index == 0 && this.noCategories) {
|
||||
this.idMap['parentList'] = 'blockly-toolbox-tree-node0';
|
||||
} else {
|
||||
this.idMap['parentList'] = this.utilsService.generateUniqueId();
|
||||
}
|
||||
},
|
||||
getMarkedBlockCompatibilityHTMLText: function(isCompatible) {
|
||||
return this.utilsService.getMarkedBlockCompatibilityHTMLText(
|
||||
isCompatible);
|
||||
},
|
||||
generateAriaLabelledByAttr: function() {
|
||||
return this.utilsService.generateAriaLabelledByAttr.apply(this,
|
||||
arguments);
|
||||
},
|
||||
setActiveDesc: function(parentList) {
|
||||
// If this is the first child of the toolbox and the
|
||||
// current active descendant of the tree is this child,
|
||||
// then set the active descendant stored in the treeService.
|
||||
if (this.index == 0 && this.tree.getAttribute('aria-activedescendant') ==
|
||||
'blockly-toolbox-tree-node0') {
|
||||
this.treeService.setActiveDesc(parentList, this.tree.id);
|
||||
}
|
||||
},
|
||||
copyToWorkspace: function(block) {
|
||||
var xml = Blockly.Xml.blockToDom(block);
|
||||
Blockly.Xml.domToBlock(blocklyApp.workspace, xml);
|
||||
alert('Added block to workspace: ' + block.toString());
|
||||
},
|
||||
copyToClipboard: function(block) {
|
||||
if (this.clipboardService) {
|
||||
this.clipboardService.copy(block, true);
|
||||
}
|
||||
},
|
||||
copyToMarked: function(block) {
|
||||
if (this.clipboardService) {
|
||||
this.clipboardService.pasteToMarkedConnection(block);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component that details how a toolbox is rendered
|
||||
* in AccessibleBlockly. Also handles any interactions with the toolbox.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
blocklyApp.ToolboxView = ng.core
|
||||
.Component({
|
||||
selector: 'toolbox-view',
|
||||
template: `
|
||||
<h3 #toolboxTitle id="blockly-toolbox-title">Toolbox</h3>
|
||||
<ol #tree id="blockly-toolbox-tree" role="group" class="blocklyTree"
|
||||
*ngIf="makeArray(sightedToolbox) && makeArray(sightedToolbox).length > 0"
|
||||
tabIndex="0" [attr.aria-labelledby]="toolboxTitle.id"
|
||||
[attr.aria-activedescendant]="tree.getAttribute('aria-activedescendant') || tree.id + '-node0' "
|
||||
(keydown)="treeService.onKeypress($event, tree)">
|
||||
<li #parent [id]="idMap['Parent' + i]" role="treeitem"
|
||||
[ngClass]="{blocklyHasChildren: true,
|
||||
blocklyActiveDescendant: tree.getAttribute('aria-activedescendant') == idMap['Parent' + i]}"
|
||||
*ngIf="toolboxHasCategories" *ngFor="#category of makeArray(sightedToolbox); #i=index"
|
||||
aria-level="1" aria-selected=false>
|
||||
<!-- TODO(madeeha): There seems to be some bug in Angular that makes it
|
||||
access index=undefined in the ngFor loop. This causes it to throw an error once it reaches line
|
||||
44. To combat this, we have added the div at line 43. Talk to fraser@.-->
|
||||
<div *ngIf="category && category.attributes">
|
||||
<label [id]="idMap['Label' + i]" #name>{{category.attributes.name.value}}</label>
|
||||
{{labelCategory(name, i, tree)}}
|
||||
<ol role="group" *ngIf="getToolboxWorkspace(category).topBlocks_.length > 0">
|
||||
<toolbox-tree-view *ngFor="#block of getToolboxWorkspace(category).topBlocks_" [level]=2 [block]="block" [displayBlockMenu]="true" [clipboardService]="clipboardService"></toolbox-tree-view>
|
||||
</ol>
|
||||
</div>
|
||||
</li>
|
||||
<div *ngIf="!toolboxHasCategories">
|
||||
<toolbox-tree-view *ngFor="#block of getToolboxWorkspace(toolboxCategories[0]).topBlocks_; #i=index" [level]=1 [block]="block" [displayBlockMenu]="true" [clipboardService]="clipboardService" [index]="i" [tree]="tree" [noCategories]="true"></toolbox-tree-view>
|
||||
</div>
|
||||
</ol>
|
||||
`,
|
||||
directives: [blocklyApp.ToolboxTreeView],
|
||||
providers: [blocklyApp.TreeService, blocklyApp.UtilsService],
|
||||
})
|
||||
.Class({
|
||||
constructor: [blocklyApp.TreeService, blocklyApp.UtilsService, function(_treeService, _utilsService) {
|
||||
this.sightedToolbox = document.getElementById('blockly-toolbox-xml');
|
||||
|
||||
this.toolboxCategories = [];
|
||||
this.toolboxWorkspaces = Object.create(null);
|
||||
this.treeService = _treeService;
|
||||
this.utilsService = _utilsService;
|
||||
|
||||
this.toolboxHasCategories = false;
|
||||
}],
|
||||
ngOnInit: function() {
|
||||
var elementsNeedingIds = [];
|
||||
var categories = this.makeArray(this.sightedToolbox);
|
||||
if (this.toolboxHasCategories) {
|
||||
for (var i = 0; i < categories.length; i++){
|
||||
elementsNeedingIds.push('Parent' + i);
|
||||
elementsNeedingIds.push('Label' + i);
|
||||
}
|
||||
this.idMap = this.utilsService.generateIds(elementsNeedingIds);
|
||||
this.idMap['Parent0'] = 'blockly-toolbox-tree-node0';
|
||||
}
|
||||
},
|
||||
labelCategory: function(label, i, tree) {
|
||||
var parent = label.parentNode;
|
||||
while (parent && parent.tagName != 'LI') {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
parent.setAttribute('aria-label', label.innerText);
|
||||
parent.id = 'blockly-toolbox-tree-node' + i;
|
||||
if (i == 0 && tree.getAttribute('aria-activedescendant') ==
|
||||
'blockly-toolbox-tree-node0') {
|
||||
this.treeService.setActiveDesc(parent, tree.id);
|
||||
parent.setAttribute('aria-selected', 'true');
|
||||
}
|
||||
},
|
||||
makeArray: function(val) {
|
||||
if (val) {
|
||||
if (this.toolboxCategories.length) {
|
||||
return this.toolboxCategories;
|
||||
} else {
|
||||
var categories = val.getElementsByTagName('category');
|
||||
if (categories.length) {
|
||||
this.toolboxHasCategories = true;
|
||||
this.toolboxCategories = Array.from(categories);
|
||||
return this.toolboxCategories;
|
||||
}
|
||||
this.toolboxHasCategories = false;
|
||||
this.toolboxCategories = [Array.from(val.children)];
|
||||
return this.toolboxCategories;
|
||||
}
|
||||
}
|
||||
},
|
||||
getToolboxWorkspace: function(categoryNode) {
|
||||
if (categoryNode.attributes && categoryNode.attributes.name) {
|
||||
var categoryName = categoryNode.attributes.name.value;
|
||||
} else {
|
||||
var categoryName = 'no-category';
|
||||
}
|
||||
if (this.toolboxWorkspaces[categoryName]) {
|
||||
return this.toolboxWorkspaces[categoryName];
|
||||
} else {
|
||||
var categoryWorkspace = new Blockly.Workspace();
|
||||
if (categoryName == 'no-category') {
|
||||
for (var i = 0; i < categoryNode.length; i++) {
|
||||
Blockly.Xml.domToBlock(categoryWorkspace, categoryNode[i]);
|
||||
}
|
||||
} else {
|
||||
Blockly.Xml.domToWorkspace(categoryNode, categoryWorkspace);
|
||||
}
|
||||
this.toolboxWorkspaces[categoryName] = categoryWorkspace;
|
||||
return this.toolboxWorkspaces[categoryName];
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,325 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service that handles all tree keyboard navigation.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
blocklyApp.TreeService = ng.core
|
||||
.Class({
|
||||
constructor: function() {
|
||||
blocklyApp.debug && console.log('making a new tree service');
|
||||
// Keeping track of the active descendants in each tree.
|
||||
this.activeDesc_ = Object.create(null);
|
||||
this.trees = document.getElementsByClassName('blocklyTree');
|
||||
// Keeping track of the last key pressed. If the user presses
|
||||
// enter (to edit a text input or press a button), the keyboard
|
||||
// focus shifts to that element. In the next keystroke, if the user
|
||||
// navigates away from the element using the arrow keys, we want
|
||||
// to shift focus back to the tree as a whole.
|
||||
this.previousKey_ = null;
|
||||
},
|
||||
createId: function(obj) {
|
||||
if (obj && obj.id) {
|
||||
return obj.id;
|
||||
}
|
||||
return 'blockly-' + Blockly.genUid();
|
||||
},
|
||||
setActiveDesc: function(node, id) {
|
||||
blocklyApp.debug && console.log('setting active descendant for tree ' + id);
|
||||
this.activeDesc_[id] = node;
|
||||
},
|
||||
getActiveDesc: function(id) {
|
||||
return this.activeDesc_[id] ||
|
||||
document.getElementById((document.getElementById(id)).getAttribute('aria-activedescendant'));
|
||||
},
|
||||
// Makes a given node the active descendant of a given tree.
|
||||
updateSelectedNode: function(node, tree, keepFocus) {
|
||||
blocklyApp.debug && console.log('updating node: ' + node.id);
|
||||
var treeId = tree.id;
|
||||
var activeDesc = this.getActiveDesc(treeId);
|
||||
if (activeDesc) {
|
||||
activeDesc.classList.remove('blocklyActiveDescendant');
|
||||
activeDesc.setAttribute('aria-selected', 'false');
|
||||
} else {
|
||||
blocklyApp.debug && console.log('updateSelectedNode: there is no active descendant');
|
||||
}
|
||||
node.classList.add('blocklyActiveDescendant');
|
||||
tree.setAttribute('aria-activedescendant', node.id);
|
||||
this.setActiveDesc(node, treeId);
|
||||
node.setAttribute('aria-selected', 'true');
|
||||
|
||||
// Make sure keyboard focus is on tree as a whole
|
||||
// in case focus was previously on a button or input
|
||||
// element.
|
||||
if (keepFocus) {
|
||||
tree.focus();
|
||||
}
|
||||
},
|
||||
onWorkspaceToolbarKeypress: function(e, treeId) {
|
||||
blocklyApp.debug && console.log(e.keyCode + 'inside TreeService onWorkspaceToolbarKeypress');
|
||||
switch (e.keyCode) {
|
||||
case 9:
|
||||
// 16,9: shift, tab
|
||||
if (e.shiftKey) {
|
||||
blocklyApp.debug && console.log('shifttabbing');
|
||||
// If the previous key is shift, we're shift-tabbing mode.
|
||||
this.goToPreviousTree(treeId);
|
||||
} else {
|
||||
// If previous key isn't shift, we're tabbing.
|
||||
this.goToNextTree(treeId);
|
||||
}
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
break;
|
||||
}
|
||||
},
|
||||
goToNextTree: function(treeId, e) {
|
||||
for (var i = 0; i < this.trees.length; i++) {
|
||||
if (this.trees[i].id == treeId) {
|
||||
if (i + 1 < this.trees.length) {
|
||||
this.trees[i + 1].focus();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
goToPreviousTree: function(treeId, e) {
|
||||
if (treeId == this.trees[0].id) {
|
||||
return;
|
||||
}
|
||||
for (var i = (this.trees.length - 1); i >= 0; i--) {
|
||||
if (this.trees[i].id == treeId) {
|
||||
if (i - 1 < this.trees.length) {
|
||||
this.trees[i - 1].focus();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
onKeypress: function(e, tree) {
|
||||
var treeId = tree.id;
|
||||
var node = this.getActiveDesc(treeId);
|
||||
var keepFocus = this.previousKey_ == 13;
|
||||
if (!node) {
|
||||
blocklyApp.debug && console.log('KeyHandler: no active descendant');
|
||||
}
|
||||
blocklyApp.debug && console.log(e.keyCode + ': inside TreeService');
|
||||
switch (e.keyCode) {
|
||||
case 9:
|
||||
// 16,9: shift, tab
|
||||
if (e.shiftKey) {
|
||||
blocklyApp.debug && console.log('shifttabbing');
|
||||
// If the previous key is shift, we're shift-tabbing.
|
||||
this.goToPreviousTree(treeId);
|
||||
} else {
|
||||
// If previous key isn't shift, we're tabbing
|
||||
// we want to go to the run code button.
|
||||
this.goToNextTree(treeId);
|
||||
}
|
||||
// Setting the previous key variable in each case because
|
||||
// we only want to save the previous navigation keystroke,
|
||||
// not any typing.
|
||||
this.previousKey_ = e.keyCode;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
break;
|
||||
case 37:
|
||||
// Left-facing arrow: go out a level, if possible. If not, do nothing.
|
||||
blocklyApp.debug && console.log('in left arrow section');
|
||||
var nextNode = node.parentNode;
|
||||
if (node.tagName == 'BUTTON' || node.tagName == 'INPUT') {
|
||||
nextNode = nextNode.parentNode;
|
||||
}
|
||||
while (nextNode && nextNode.className != 'treeview' &&
|
||||
nextNode.tagName != 'LI') {
|
||||
nextNode = nextNode.parentNode;
|
||||
}
|
||||
if (!nextNode || nextNode.className == 'treeview') {
|
||||
return;
|
||||
}
|
||||
this.updateSelectedNode(nextNode, tree, keepFocus);
|
||||
this.previousKey_ = e.keyCode;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
break;
|
||||
case 38:
|
||||
// Up-facing arrow: go up a level, if possible. If not, do nothing.
|
||||
blocklyApp.debug && console.log('node passed in: ' + node.id);
|
||||
var prevSibling = this.getPreviousSibling(node);
|
||||
if (prevSibling && prevSibling.tagName != 'H1') {
|
||||
this.updateSelectedNode(prevSibling, tree, keepFocus);
|
||||
} else {
|
||||
blocklyApp.debug && console.log('no previous sibling');
|
||||
}
|
||||
this.previousKey_ = e.keyCode;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
break;
|
||||
case 39:
|
||||
blocklyApp.debug && console.log('in right arrow section');
|
||||
var firstChild = this.getFirstChild(node);
|
||||
if (firstChild) {
|
||||
this.updateSelectedNode(firstChild, tree, keepFocus);
|
||||
} else {
|
||||
blocklyApp.debug && console.log('no valid child');
|
||||
}
|
||||
this.previousKey_ = e.keyCode;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
break;
|
||||
case 40:
|
||||
// Down-facing arrow: go down a level, if possible.
|
||||
// If not, do nothing.
|
||||
blocklyApp.debug && console.log('preventing propogation');
|
||||
var nextSibling = this.getNextSibling(node);
|
||||
if (nextSibling) {
|
||||
this.updateSelectedNode(nextSibling, tree, keepFocus);
|
||||
} else {
|
||||
blocklyApp.debug && console.log('no next sibling');
|
||||
}
|
||||
this.previousKey_ = e.keyCode;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
break;
|
||||
case 13:
|
||||
// If I've pressed enter, I want to interact with a child.
|
||||
blocklyApp.debug && console.log('enter is pressed');
|
||||
var activeDesc = this.getActiveDesc(treeId);
|
||||
if (activeDesc) {
|
||||
var children = activeDesc.children;
|
||||
var child = children[0];
|
||||
if (children.length == 1 && (child.tagName == 'INPUT' ||
|
||||
child.tagName == 'BUTTON')) {
|
||||
if (child.tagName == 'BUTTON') {
|
||||
child.click();
|
||||
}
|
||||
else if (child.tagName == 'INPUT') {
|
||||
child.focus();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
blocklyApp.debug && console.log('no activeDesc');
|
||||
}
|
||||
this.previousKey_ = e.keyCode;
|
||||
break;
|
||||
}
|
||||
},
|
||||
getFirstChild: function(element) {
|
||||
if (!element) {
|
||||
return element;
|
||||
} else {
|
||||
var childList = element.children;
|
||||
for (var i = 0; i < childList.length; i++) {
|
||||
if (childList[i].tagName == 'LI') {
|
||||
return childList[i];
|
||||
} else {
|
||||
var potentialElement = this.getFirstChild(childList[i]);
|
||||
if (potentialElement) {
|
||||
return potentialElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getNextSibling: function(element) {
|
||||
if (element.nextElementSibling) {
|
||||
// If there is a sibling, find the list element child of the sibling.
|
||||
var node = element.nextElementSibling;
|
||||
if (node.tagName != 'LI') {
|
||||
var listElems = node.getElementsByTagName('li');
|
||||
// getElementsByTagName returns in DFS order
|
||||
// therefore the first element is the first relevant list child.
|
||||
return listElems[0];
|
||||
} else {
|
||||
return element.nextElementSibling;
|
||||
}
|
||||
} else {
|
||||
var parent = element.parentNode;
|
||||
while (parent && parent.tagName != 'OL') {
|
||||
if (parent.nextElementSibling) {
|
||||
var node = parent.nextElementSibling;
|
||||
if (node.tagName == 'LI') {
|
||||
return node;
|
||||
} else {
|
||||
return this.getFirstChild(node);
|
||||
}
|
||||
} else {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getPreviousSibling: function(element) {
|
||||
if (element.previousElementSibling) {
|
||||
var sibling = element.previousElementSibling;
|
||||
if (sibling.tagName == 'LI') {
|
||||
return sibling;
|
||||
} else {
|
||||
return this.getLastChild(sibling);
|
||||
}
|
||||
} else {
|
||||
var parent = element.parentNode;
|
||||
while (parent) {
|
||||
blocklyApp.debug && console.log('looping');
|
||||
if (parent.tagName == 'OL') {
|
||||
break;
|
||||
}
|
||||
if (parent.previousElementSibling) {
|
||||
blocklyApp.debug && console.log('parent has a sibling!');
|
||||
var node = parent.previousElementSibling;
|
||||
if (node.tagName == 'LI') {
|
||||
blocklyApp.debug && console.log('return the sibling of the parent!');
|
||||
return node;
|
||||
} else {
|
||||
// Find the last list element child of the sibling of the parent.
|
||||
return this.getLastChild(node);
|
||||
}
|
||||
} else {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getLastChild: function(element) {
|
||||
if (!element) {
|
||||
blocklyApp.debug && console.log('no element');
|
||||
return element;
|
||||
} else {
|
||||
var childList = element.children;
|
||||
for (var i = childList.length - 1; i >= 0; i--) {
|
||||
// Find the last child that is a list element.
|
||||
if (childList[i].tagName == 'LI') {
|
||||
return childList[i];
|
||||
} else {
|
||||
var potentialElement = this.getLastChild(childList[i]);
|
||||
if (potentialElement) {
|
||||
return potentialElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
blocklyApp.debug && console.log('no last child');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service with functions required by multiple
|
||||
* components.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
var blocklyApp = {};
|
||||
|
||||
blocklyApp.UtilsService = ng.core
|
||||
.Class({
|
||||
constructor: function() {
|
||||
},
|
||||
generateUniqueId: function() {
|
||||
return 'blockly-' + Blockly.genUid();
|
||||
},
|
||||
generateIds: function(elementsList) {
|
||||
var idMap = {};
|
||||
for (var i = 0; i < elementsList.length; i++){
|
||||
idMap[elementsList[i]] = this.generateUniqueId();
|
||||
}
|
||||
return idMap;
|
||||
},
|
||||
generateAriaLabelledByAttr: function() {
|
||||
return Array.from(arguments).join(' ').trim();
|
||||
},
|
||||
getInputTypeLabel: function(connection) {
|
||||
// Returns an upper case string in the case of official input type names.
|
||||
// Returns the lower case string 'any' if any official input type qualifies.
|
||||
// The differentiation between upper and lower case signifies the difference
|
||||
// between an input type (BOOLEAN, LIST, etc) and the colloquial english term
|
||||
// 'any'.
|
||||
if (connection.check_) {
|
||||
return connection.check_.join(', ').toUpperCase();
|
||||
} else {
|
||||
return Blockly.Msg.ANY;
|
||||
}
|
||||
},
|
||||
getBlockTypeLabel: function(inputBlock) {
|
||||
if (inputBlock.type == Blockly.NEXT_STATEMENT) {
|
||||
return Blockly.Msg.STATEMENT;
|
||||
} else {
|
||||
return Blockly.Msg.VALUE;
|
||||
}
|
||||
},
|
||||
getMarkedBlockCompatibilityHTMLText: function(isCompatible) {
|
||||
if (isCompatible) {
|
||||
// undefined will result in the
|
||||
// 'copy to marked block' option being ENABLED.
|
||||
return '';
|
||||
} else {
|
||||
// Anything will result in the
|
||||
// 'copy to marked block' option being DISABLED.
|
||||
return 'blockly-disabled';
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,224 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component that details how Blockly.Block's are
|
||||
* rendered in the workspace in AccessibleBlockly. Also handles any
|
||||
* interactions with the blocks.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
blocklyApp.WorkspaceTreeView = ng.core
|
||||
.Component({
|
||||
selector: 'tree-view',
|
||||
template: `
|
||||
<li #parentList [id]="idMap['parentList']" role="treeitem" class="blocklyHasChildren"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr('blockly-block-summary', idMap['blockSummary'])"
|
||||
[attr.aria-level]="level" aria-selected=false>
|
||||
{{checkParentList(parentList)}}
|
||||
<label [id]="idMap['blockSummary']">{{block.toString()}}</label>
|
||||
<ol role="group" [attr.aria-level]="level+1">
|
||||
<li [id]="idMap['listItem']" class="blocklyHasChildren" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr('blockly-block-menu', idMap['blockSummary'])"
|
||||
[attr.aria-level]="level+1" aria-selected=false>
|
||||
<label [id]="idMap['label']">{{stringMap['BLOCK_ACTION_LIST']}}</label>
|
||||
<ol role="group" [attr.aria-level]="level+2">
|
||||
<li [id]="idMap['cutListItem']" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['cutButton'], 'blockly-button')"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button [id]="idMap['cutButton']" (click)="clipboardService.cut(block)">{{stringMap['CUT_BLOCK']}}</button>
|
||||
</li>
|
||||
<li [id]="idMap['copyListItem']" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['copyButton'], 'blockly-button')"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button [id]="idMap['copyButton']" (click)="clipboardService.copy(block, true)">{{stringMap['COPY_BLOCK']}}</button>
|
||||
</li>
|
||||
<li [id]="idMap['pasteBelow']" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['pasteBelowButton'], 'blockly-button', (getNoNextConnectionHTMLText(block)||clipboardService.getClipboardCompatibilityHTMLText(block.nextConnection)))"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button [id]="idMap['pasteBelowButton']" (click)="clipboardService.pasteFromClipboard(block.nextConnection)"
|
||||
[disabled]="getNoNextConnectionHTMLText(block)" [disabled]="clipboardService.getClipboardCompatibilityHTMLText(block.nextConnection)">{{stringMap['PASTE_BELOW']}}</button>
|
||||
</li>
|
||||
<li [id]="idMap['pasteAbove']" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['pasteAboveButton'], 'blockly-button', (getNoPreviousConnectionHTMLText(block) || clipboardService.getClipboardCompatibilityHTMLText(block.previousConnection)))"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button [id]="idMap['pasteAboveButton']" (click)="clipboardService.pasteFromClipboard(block.previousConnection)"
|
||||
[disabled]="getNoPreviousConnectionHTMLText(block)" [disabled]="clipboardService.getClipboardCompatibilityHTMLText(block.previousConnection)">{{stringMap['PASTE_ABOVE']}}</button>
|
||||
</li>
|
||||
<li [id]="idMap['markBelow']" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['markBelowButton'], 'blockly-button', getNoNextConnectionHTMLText(block))"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button [id]="idMap['markBelowButton']" (click)="clipboardService.markConnection(block.nextConnection)"
|
||||
[disabled]="getNoNextConnectionHTMLText(block)">{{stringMap['MARK_SPOT_BELOW']}}</button>
|
||||
</li>
|
||||
<li [id]="idMap['markAbove']" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['markAboveButton'], 'blockly-button', getNoPreviousConnectionHTMLText(block))"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button [id]="idMap['markAboveButton']" (click)="clipboardService.markConnection(block.previousConnection)"
|
||||
[disabled]="getNoPreviousConnectionHTMLText(block)">{{stringMap['MARK_SPOT_ABOVE']}}</button>
|
||||
</li>
|
||||
<li [id]="idMap['sendToSelectedListItem']" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['sendToSelectedButton'], 'blockly-button', utilsService.getMarkedBlockCompatibilityHTMLText(clipboardService.isBlockCompatibleWithMarkedConnection(block)))"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button [id]="idMap['sendToSelectedButton']" (click)="sendToSelected(block)"
|
||||
[disabled]="getMarkedBlockCompatibilityHTMLText(clipboardService.isBlockCompatibleWithMarkedConnection(block))">{{stringMap['MOVE_TO_MARKED_SPOT']}}</button>
|
||||
</li>
|
||||
<li [attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['deleteButton'], 'blockly-button')" [id]="idMap['delete']" role="treeitem" aria-selected=false [attr.aria-level]="level+2">
|
||||
<button [id]="idMap['deleteButton']" (click)="deleteBlock(block)">{{stringMap['DELETE']}}</button>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<div *ngFor="#inputBlock of block.inputList; #i = index">
|
||||
<field-view *ngFor="#field of inputBlock.fieldRow" [field]="field"></field-view>
|
||||
<tree-view *ngIf="inputBlock.connection && inputBlock.connection.targetBlock()" [block]="inputBlock.connection.targetBlock()" [isTopBlock]="false" [level]="level"></tree-view>
|
||||
<li #inputList [attr.aria-level]="level + 1" [id]="idMap['inputList' + i]"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr('blockly-menu', idMap['inputMenuLabel' + i])"
|
||||
*ngIf="inputBlock.connection && !inputBlock.connection.targetBlock()" (keydown)="treeService.onKeypress($event, tree)">
|
||||
<!-- TODO(madeeha): i18n here will need to happen in a different way due to the way grammar changes based on language. -->
|
||||
<label [id]="idMap['inputMenuLabel' + i]"> {{utilsService.getInputTypeLabel(inputBlock.connection)}} {{utilsService.getBlockTypeLabel(inputBlock)}} needed: </label>
|
||||
<ol role="group" [attr.aria-level]="level+2">
|
||||
<li [id]="idMap['markSpot' + i]" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['markButton' + i], 'blockly-button')"
|
||||
[attr.aria-level]="level + 2" aria-selected=false>
|
||||
<button [id]="idMap['markSpotButton + i']" (click)="clipboardService.markConnection(inputBlock.connection)">{{stringMap['MARK_THIS_SPOT']}}</button>
|
||||
</li>
|
||||
<li [id]="idMap['paste' + i]" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(idMap['pasteButton' + i], 'blockly-button', clipboardService.getClipboardCompatibilityHTMLText(inputBlock.connection))"
|
||||
[attr.aria-level]="level+2" aria-selected=false>
|
||||
<button [id]="idMap['pasteButton' + i]" (click)="clipboardService.pasteFromClipboard(inputBlock.connection)"
|
||||
[disabled]="clipboardService.getClipboardCompatibilityHTMLText(inputBlock.connection)">{{stringMap['PASTE']}}</button>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
</div>
|
||||
</ol>
|
||||
</li>
|
||||
<tree-view *ngIf= "block.nextConnection && block.nextConnection.targetBlock()" [block]="block.nextConnection.targetBlock()" [isTopBlock]="false" [level]="level"></tree-view>
|
||||
`,
|
||||
directives: [ng.core.forwardRef(
|
||||
function() { return blocklyApp.WorkspaceTreeView; }), blocklyApp.FieldView],
|
||||
inputs: ['block', 'isTopBlock', 'topBlockIndex', 'level', 'parentId'],
|
||||
providers: [blocklyApp.TreeService, blocklyApp.UtilsService],
|
||||
})
|
||||
.Class({
|
||||
constructor: [blocklyApp.ClipboardService, blocklyApp.TreeService,
|
||||
blocklyApp.UtilsService,
|
||||
function(_clipboardService, _treeService, _utilsService) {
|
||||
this.infoBlocks = Object.create(null);
|
||||
this.clipboardService = _clipboardService;
|
||||
this.treeService = _treeService;
|
||||
this.utilsService = _utilsService;
|
||||
this.stringMap = {
|
||||
'BLOCK_ACTION_LIST': Blockly.Msg.BLOCK_ACTION_LIST,
|
||||
'PASTE': Blockly.Msg.PASTE,
|
||||
'PASTE_ABOVE': Blockly.Msg.PASTE_ABOVE,
|
||||
'PASTE_BELOW': Blockly.Msg.PASTE_BELOW,
|
||||
'MARK_THIS_SPOT': Blockly.Msg.MARK_THIS_SPOT,
|
||||
'MARK_SPOT_ABOVE': Blockly.Msg.MARK_SPOT_ABOVE,
|
||||
'MARK_SPOT_BELOW': Blockly.Msg.MARK_SPOT_BELOW,
|
||||
'CUT_BLOCK': Blockly.Msg.CUT_BLOCK,
|
||||
'COPY_BLOCK': Blockly.Msg.COPY_BLOCK,
|
||||
'MOVE_TO_MARKED_SPOT': Blockly.Msg.MOVE_TO_MARKED_SPOT,
|
||||
'DELETE': Blockly.Msg.DELETE
|
||||
};
|
||||
}],
|
||||
deleteBlock: function(block) {
|
||||
// If this is the top block, we should shift focus to the previous tree
|
||||
var topBlocks = blocklyApp.workspace.topBlocks_;
|
||||
for (var i = 0; i < topBlocks.length; i++) {
|
||||
if (topBlocks[i].id == block.id) {
|
||||
this.treeService.goToPreviousTree(this.parentId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// If this is not the top block, we should change the active descendant of the tree.
|
||||
|
||||
block.dispose(true);
|
||||
},
|
||||
getMarkedBlockCompatibilityHTMLText: function(isCompatible) {
|
||||
return this.utilsService.getMarkedBlockCompatibilityHTMLText(isCompatible);
|
||||
},
|
||||
generateAriaLabelledByAttr: function() {
|
||||
return this.utilsService.generateAriaLabelledByAttr.apply(this,
|
||||
arguments);
|
||||
},
|
||||
ngOnInit: function() {
|
||||
var elementsNeedingIds = ['blockSummary', 'listItem', 'label',
|
||||
'cutListItem', 'cutButton', 'copyListItem', 'copyButton',
|
||||
'pasteBelow', 'pasteBelowButton', 'pasteAbove', 'pasteAboveButton',
|
||||
'markBelow', 'markBelowButton', 'markAbove', 'markAboveButton',
|
||||
'sendToSelectedListItem', 'sendToSelectedButton', 'delete',
|
||||
'deleteButton'];
|
||||
for (var i = 0; i < this.block.inputList.length; i++) {
|
||||
var inputBlock = this.block.inputList[i];
|
||||
if (inputBlock.connection && !inputBlock.connection.targetBlock()) {
|
||||
elementsNeedingIds = elementsNeedingIds.concat(
|
||||
['inputList' + i, 'inputMenuLabel' + i, 'markSpot' + i,
|
||||
'markSpotButton' + i, 'paste' + i, 'pasteButton' + i]);
|
||||
}
|
||||
}
|
||||
this.idMap = this.utilsService.generateIds(elementsNeedingIds);
|
||||
this.idMap['parentList'] = this.generateParentListId();
|
||||
},
|
||||
generateParentListId: function() {
|
||||
if (this.isTopBlock) {
|
||||
return this.parentId + '-node0'
|
||||
} else {
|
||||
return this.utilsService.generateUniqueId();
|
||||
}
|
||||
},
|
||||
getNoPreviousConnectionHTMLText: function(block) {
|
||||
if (!block.previousConnection) {
|
||||
return 'blockly-disabled';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
getNoNextConnectionHTMLText: function(block) {
|
||||
if (!block.nextConnection) {
|
||||
return 'blockly-disabled';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
checkParentList: function(parentList) {
|
||||
blocklyApp.debug && console.log('setting parent list');
|
||||
var tree = parentList;
|
||||
var regex = /^blockly-workspace-tree\d+$/;
|
||||
while (tree && !tree.id.match(regex)) {
|
||||
tree = tree.parentNode;
|
||||
}
|
||||
if (tree && tree.getAttribute('aria-activedescendant') == parentList.id) {
|
||||
this.treeService.updateSelectedNode(parentList, tree, false);
|
||||
}
|
||||
},
|
||||
setId: function(block) {
|
||||
if (this.isTopBlock) {
|
||||
return this.parentId + '-node0';
|
||||
}
|
||||
return this.treeService.createId(block);
|
||||
},
|
||||
sendToSelected: function(block) {
|
||||
if (this.clipboardService) {
|
||||
this.clipboardService.pasteToMarkedConnection(block, false);
|
||||
block.dispose(true);
|
||||
alert('Block moved to marked spot: ' + block.toString());
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component that details how a Blockly.Workspace is
|
||||
* rendered in AccessibleBlockly.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
blocklyApp.WorkspaceView = ng.core
|
||||
.Component({
|
||||
selector: 'workspace-view',
|
||||
viewInjector: [blocklyApp.ClipboardService],
|
||||
template: `
|
||||
<label>
|
||||
<h3 #workspaceTitle id="blockly-workspace-title">{{stringMap['WORKSPACE']}}</h3>
|
||||
</label>
|
||||
<div id="blockly-workspace-toolbar" (keydown)="onWorkspaceToolbarKeypress($event, getActiveElementId())">
|
||||
<button id='run-code' (click)='runCode()' disabled={{disableRunCode()}}
|
||||
[attr.aria-disabled]='disableRunCode()' class='blocklyTree'>{{stringMap['RUN_CODE']}}</button>
|
||||
<button id='clear-workspace' (click)='workspace.clear()' disabled={{disableRunCode()}}
|
||||
[attr.aria-disabled]='disableRunCode()' class='blocklyTree'>{{stringMap['CLEAR_WORKSPACE']}}</button>
|
||||
</div>
|
||||
<div *ngIf="workspace">
|
||||
<ol #tree id={{makeId(i)}} *ngFor="#block of workspace.topBlocks_; #i=index"
|
||||
tabIndex="0" role="group" class="blocklyTree" [attr.aria-labelledby]="workspaceTitle.id"
|
||||
[attr.aria-activedescendant]="tree.getAttribute('aria-activedescendant') || tree.id + '-node0' "
|
||||
(keydown)="onKeypress($event, tree)">
|
||||
<tree-view [level]=1 [block]="block" [isTopBlock]="true" [topBlockIndex]="i" [parentId]="tree.id"></tree-view>
|
||||
</ol>
|
||||
</div>
|
||||
`,
|
||||
directives: [blocklyApp.WorkspaceTreeView],
|
||||
providers: [blocklyApp.TreeService]
|
||||
})
|
||||
.Class({
|
||||
constructor: [blocklyApp.TreeService, function(_treeService) {
|
||||
if (blocklyApp.workspace) {
|
||||
this.workspace = blocklyApp.workspace;
|
||||
this.treeService = _treeService;
|
||||
}
|
||||
this.stringMap = {
|
||||
'WORKSPACE': Blockly.Msg.WORKSPACE,
|
||||
'RUN_CODE': Blockly.Msg.RUN_CODE,
|
||||
'CLEAR_WORKSPACE': Blockly.Msg.CLEAR_WORKSPACE
|
||||
};
|
||||
}],
|
||||
onWorkspaceToolbarKeypress: function(event, id) {
|
||||
this.treeService.onWorkspaceToolbarKeypress(event, id);
|
||||
},
|
||||
onKeypress: function(event, tree){
|
||||
this.treeService.onKeypress(event, tree);
|
||||
},
|
||||
getActiveElementId: function() {
|
||||
return document.activeElement.id;
|
||||
},
|
||||
makeId: function(index) {
|
||||
return 'blockly-workspace-tree' + index;
|
||||
},
|
||||
runCode: function() {
|
||||
runCode();
|
||||
},
|
||||
disableRunCode: function() {
|
||||
if (blocklyApp.workspace.topBlocks_.length){
|
||||
return undefined;
|
||||
} else {
|
||||
return 'blockly-disabled';
|
||||
}
|
||||
}
|
||||
});
|
||||
+113
-105
@@ -9,21 +9,24 @@ goog.module.get=function(a){return goog.module.getInternal_(a)};goog.module.getI
|
||||
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){for(var c=a.split("."),d=b||goog.global,e;e=c.shift();)if(goog.isDefAndNotNull(d[e]))d=d[e];else return null;return d};goog.globalize=function(a,b){var c=b||goog.global,d;for(d in a)c[d]=a[d]};
|
||||
goog.addDependency=function(a,b,c,d){if(goog.DEPENDENCIES_ENABLED){var e;a=a.replace(/\\/g,"/");var f=goog.dependencies_;d&&"boolean"!==typeof d||(d=d?{module:"goog"}:{});for(var g=0;e=b[g];g++)f.nameToPath[e]=a,f.pathIsModule[a]="goog"==d.module;for(d=0;b=c[d];d++)a in f.requires||(f.requires[a]={}),f.requires[a][b]=!0}};goog.ENABLE_DEBUG_LOADER=!0;goog.logToConsole_=function(a){goog.global.console&&goog.global.console.error(a)};
|
||||
goog.addDependency=function(a,b,c,d){if(goog.DEPENDENCIES_ENABLED){var e;a=a.replace(/\\/g,"/");var f=goog.dependencies_;d&&"boolean"!==typeof d||(d=d?{module:"goog"}:{});for(var g=0;e=b[g];g++)f.nameToPath[e]=a,f.loadFlags[a]=d;for(d=0;b=c[d];d++)a in f.requires||(f.requires[a]={}),f.requires[a][b]=!0}};goog.ENABLE_DEBUG_LOADER=!0;goog.logToConsole_=function(a){goog.global.console&&goog.global.console.error(a)};
|
||||
goog.require=function(a){if(!COMPILED){goog.ENABLE_DEBUG_LOADER&&goog.IS_OLD_IE_&&goog.maybeProcessDeferredDep_(a);if(goog.isProvided_(a))return goog.isInModuleLoader_()?goog.module.getInternal_(a):null;if(goog.ENABLE_DEBUG_LOADER){var b=goog.getPathFromDeps_(a);if(b)return goog.writeScripts_(b),null}a="goog.require could not find: "+a;goog.logToConsole_(a);throw Error(a);}};goog.basePath="";goog.nullFunction=function(){};
|
||||
goog.abstractMethod=function(){throw Error("unimplemented abstract method");};goog.addSingletonGetter=function(a){a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.LOAD_MODULE_USING_EVAL=!0;goog.SEAL_MODULE_EXPORTS=goog.DEBUG;goog.loadedModules_={};goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER;
|
||||
goog.DEPENDENCIES_ENABLED&&(goog.dependencies_={pathIsModule:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var a=goog.global.document;return null!=a&&"write"in a},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document.getElementsByTagName("SCRIPT"),b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?"),d=-1==d?c.length:
|
||||
d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}},goog.importScript_=function(a,b){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(a,b)&&(goog.dependencies_.written[a]=!0)},goog.IS_OLD_IE_=!(goog.global.atob||!goog.global.document||!goog.global.document.all),goog.importModule_=function(a){goog.importScript_("",'goog.retrieveAndExecModule_("'+a+'");')&&(goog.dependencies_.written[a]=!0)},goog.queuedModules_=[],goog.wrapModule_=function(a,b){return goog.LOAD_MODULE_USING_EVAL&&
|
||||
goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(b+"\n//# sourceURL="+a+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+b+"\n;return exports});\n//# sourceURL="+a+"\n"},goog.loadQueuedModules_=function(){var a=goog.queuedModules_.length;if(0<a){var b=goog.queuedModules_;goog.queuedModules_=[];for(var c=0;c<a;c++)goog.maybeProcessDeferredPath_(b[c])}},goog.maybeProcessDeferredDep_=function(a){goog.isDeferredModule_(a)&&goog.allDepsAreAvailable_(a)&&(a=goog.getPathFromDeps_(a),
|
||||
goog.maybeProcessDeferredPath_(goog.basePath+a))},goog.isDeferredModule_=function(a){return(a=goog.getPathFromDeps_(a))&&goog.dependencies_.pathIsModule[a]?goog.basePath+a in goog.dependencies_.deferred:!1},goog.allDepsAreAvailable_=function(a){if((a=goog.getPathFromDeps_(a))&&a in goog.dependencies_.requires)for(var b in goog.dependencies_.requires[a])if(!goog.isProvided_(b)&&!goog.isDeferredModule_(b))return!1;return!0},goog.maybeProcessDeferredPath_=function(a){if(a in goog.dependencies_.deferred){var b=
|
||||
goog.dependencies_.deferred[a];delete goog.dependencies_.deferred[a];goog.globalEval(b)}},goog.loadModuleFromUrl=function(a){goog.retrieveAndExecModule_(a)},goog.loadModule=function(a){var b=goog.moduleLoaderState_;try{goog.moduleLoaderState_={moduleName:void 0,declareLegacyNamespace:!1};var c;if(goog.isFunction(a))c=a.call(goog.global,{});else if(goog.isString(a))c=goog.loadModuleFromSource_.call(goog.global,a);else throw Error("Invalid module definition");var d=goog.moduleLoaderState_.moduleName;
|
||||
goog.abstractMethod=function(){throw Error("unimplemented abstract method");};goog.addSingletonGetter=function(a){a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.LOAD_MODULE_USING_EVAL=!0;goog.SEAL_MODULE_EXPORTS=goog.DEBUG;goog.loadedModules_={};goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER;goog.ALWAYS_TRANSPILE=!1;
|
||||
goog.NEVER_TRANSPILE=!1;
|
||||
goog.DEPENDENCIES_ENABLED&&(goog.dependencies_={loadFlags:{},nameToPath:{},requires:{},visited:{},written:{},deferred:{}},goog.inHtmlDocument_=function(){var a=goog.global.document;return null!=a&&"write"in a},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_())for(var a=goog.global.document.getElementsByTagName("SCRIPT"),b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?"),d=-1==d?c.length:d;if("base.js"==
|
||||
c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}},goog.importScript_=function(a,b){(goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_)(a,b)&&(goog.dependencies_.written[a]=!0)},goog.IS_OLD_IE_=!(goog.global.atob||!goog.global.document||!goog.global.document.all),goog.importProcessedScript_=function(a,b,c){goog.importScript_("",'goog.retrieveAndExec_("'+a+'", '+b+", "+c+");")},goog.queuedModules_=[],goog.wrapModule_=function(a,b){return goog.LOAD_MODULE_USING_EVAL&&goog.isDef(goog.global.JSON)?
|
||||
"goog.loadModule("+goog.global.JSON.stringify(b+"\n//# sourceURL="+a+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+b+"\n;return exports});\n//# sourceURL="+a+"\n"},goog.loadQueuedModules_=function(){var a=goog.queuedModules_.length;if(0<a){var b=goog.queuedModules_;goog.queuedModules_=[];for(var c=0;c<a;c++)goog.maybeProcessDeferredPath_(b[c])}},goog.maybeProcessDeferredDep_=function(a){goog.isDeferredModule_(a)&&goog.allDepsAreAvailable_(a)&&(a=goog.getPathFromDeps_(a),goog.maybeProcessDeferredPath_(goog.basePath+
|
||||
a))},goog.isDeferredModule_=function(a){var b=(a=goog.getPathFromDeps_(a))&&goog.dependencies_.loadFlags[a]||{};return a&&("goog"==b.module||goog.needsTranspile_(b.lang))?goog.basePath+a in goog.dependencies_.deferred:!1},goog.allDepsAreAvailable_=function(a){if((a=goog.getPathFromDeps_(a))&&a in goog.dependencies_.requires)for(var b in goog.dependencies_.requires[a])if(!goog.isProvided_(b)&&!goog.isDeferredModule_(b))return!1;return!0},goog.maybeProcessDeferredPath_=function(a){if(a in goog.dependencies_.deferred){var b=
|
||||
goog.dependencies_.deferred[a];delete goog.dependencies_.deferred[a];goog.globalEval(b)}},goog.loadModuleFromUrl=function(a){goog.retrieveAndExec_(a,!0,!1)},goog.loadModule=function(a){var b=goog.moduleLoaderState_;try{goog.moduleLoaderState_={moduleName:void 0,declareLegacyNamespace:!1};var c;if(goog.isFunction(a))c=a.call(goog.global,{});else if(goog.isString(a))c=goog.loadModuleFromSource_.call(goog.global,a);else throw Error("Invalid module definition");var d=goog.moduleLoaderState_.moduleName;
|
||||
if(!goog.isString(d)||!d)throw Error('Invalid module name "'+d+'"');goog.moduleLoaderState_.declareLegacyNamespace?goog.constructNamespace_(d,c):goog.SEAL_MODULE_EXPORTS&&Object.seal&&Object.seal(c);goog.loadedModules_[d]=c}finally{goog.moduleLoaderState_=b}},goog.loadModuleFromSource_=function(a){eval(a);return{}},goog.writeScriptSrcNode_=function(a){goog.global.document.write('<script type="text/javascript" src="'+a+'">\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');}var d=goog.IS_OLD_IE_;void 0===b?d?(d=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ",c.write('<script type="text/javascript" src="'+
|
||||
a+'"'+d+">\x3c/script>")):goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING?goog.appendScriptSrcNode_(a):goog.writeScriptSrcNode_(a):c.write('<script type="text/javascript">'+b+"\x3c/script>");return!0}return!1},goog.lastNonModuleScriptIndex_=0,goog.onScriptLoad_=function(a,b){"complete"==a.readyState&&goog.lastNonModuleScriptIndex_==b&&goog.loadQueuedModules_();return!0},goog.writeScripts_=function(a){function b(a){if(!(a in e.written||a in e.visited)){e.visited[a]=!0;if(a in e.requires)for(var f in e.requires[a])if(!goog.isProvided_(f))if(f in
|
||||
e.nameToPath)b(e.nameToPath[f]);else throw Error("Undefined nameToPath for "+f);a in d||(d[a]=!0,c.push(a))}}var c=[],d={},e=goog.dependencies_;b(a);for(a=0;a<c.length;a++){var f=c[a];goog.dependencies_.written[f]=!0}var g=goog.moduleLoaderState_;goog.moduleLoaderState_=null;for(a=0;a<c.length;a++)if(f=c[a])e.pathIsModule[f]?goog.importModule_(goog.basePath+f):goog.importScript_(goog.basePath+f);else throw goog.moduleLoaderState_=g,Error("Undefined script input");goog.moduleLoaderState_=g},goog.getPathFromDeps_=
|
||||
function(a){return a in goog.dependencies_.nameToPath?goog.dependencies_.nameToPath[a]:null},goog.findBasePath_(),goog.global.CLOSURE_NO_DEPS||goog.importScript_(goog.basePath+"deps.js"));goog.normalizePath_=function(a){a=a.split("/");for(var b=0;b<a.length;)"."==a[b]?a.splice(b,1):b&&".."==a[b]&&a[b-1]&&".."!=a[b-1]?a.splice(--b,2):b++;return a.join("/")};
|
||||
goog.loadFileSync_=function(a){if(goog.global.CLOSURE_LOAD_FILE_SYNC)return goog.global.CLOSURE_LOAD_FILE_SYNC(a);var b=new goog.global.XMLHttpRequest;b.open("get",a,!1);b.send();return b.responseText};
|
||||
goog.retrieveAndExecModule_=function(a){if(!COMPILED){var b=a;a=goog.normalizePath_(a);var c=goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_,d=goog.loadFileSync_(a);if(null!=d)d=goog.wrapModule_(a,d),goog.IS_OLD_IE_?(goog.dependencies_.deferred[b]=d,goog.queuedModules_.push(b)):c(a,d);else throw Error("load of "+a+"failed");}};
|
||||
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');}if(void 0===b)if(goog.IS_OLD_IE_){var d=" onreadystatechange='goog.onScriptLoad_(this, "+ ++goog.lastNonModuleScriptIndex_+")' ";c.write('<script type="text/javascript" src="'+
|
||||
a+'"'+d+">\x3c/script>")}else goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING?goog.appendScriptSrcNode_(a):goog.writeScriptSrcNode_(a);else c.write('<script type="text/javascript">'+b+"\x3c/script>");return!0}return!1},goog.needsTranspile_=function(a){if(goog.ALWAYS_TRANSPILE)return!0;if(goog.NEVER_TRANSPILE)return!1;if(!goog.transpiledLanguages_){goog.transpiledLanguages_={es5:!0,es6:!0,"es6-impl":!0};try{goog.transpiledLanguages_.es5=eval("[1,].length!=1"),eval('(()=>{"use strict";let a={};const X=class{constructor(){}x(z){return new Map([...arguments]).get(z[0])==3}};return new X().x([a,3])})()')&&
|
||||
(goog.transpiledLanguages_["es6-impl"]=!1),eval('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')&&(goog.transpiledLanguages_.es6=!1)}catch(b){}}return!!goog.transpiledLanguages_[a]},goog.transpiledLanguages_=null,goog.lastNonModuleScriptIndex_=0,goog.onScriptLoad_=function(a,
|
||||
b){"complete"==a.readyState&&goog.lastNonModuleScriptIndex_==b&&goog.loadQueuedModules_();return!0},goog.writeScripts_=function(a){function b(a){if(!(a in e.written||a in e.visited)){e.visited[a]=!0;if(a in e.requires)for(var f in e.requires[a])if(!goog.isProvided_(f))if(f in e.nameToPath)b(e.nameToPath[f]);else throw Error("Undefined nameToPath for "+f);a in d||(d[a]=!0,c.push(a))}}var c=[],d={},e=goog.dependencies_;b(a);for(a=0;a<c.length;a++){var f=c[a];goog.dependencies_.written[f]=!0}var g=goog.moduleLoaderState_;
|
||||
goog.moduleLoaderState_=null;for(a=0;a<c.length;a++)if(f=c[a]){var h=e.loadFlags[f]||{},k=goog.needsTranspile_(h.lang);"goog"==h.module||k?goog.importProcessedScript_(goog.basePath+f,"goog"==h.module,k):goog.importScript_(goog.basePath+f)}else throw goog.moduleLoaderState_=g,Error("Undefined script input");goog.moduleLoaderState_=g},goog.getPathFromDeps_=function(a){return a in goog.dependencies_.nameToPath?goog.dependencies_.nameToPath[a]:null},goog.findBasePath_(),goog.global.CLOSURE_NO_DEPS||goog.importScript_(goog.basePath+
|
||||
"deps.js"));goog.normalizePath_=function(a){a=a.split("/");for(var b=0;b<a.length;)"."==a[b]?a.splice(b,1):b&&".."==a[b]&&a[b-1]&&".."!=a[b-1]?a.splice(--b,2):b++;return a.join("/")};goog.loadFileSync_=function(a){if(goog.global.CLOSURE_LOAD_FILE_SYNC)return goog.global.CLOSURE_LOAD_FILE_SYNC(a);var b=new goog.global.XMLHttpRequest;b.open("get",a,!1);b.send();return 200==b.status?b.responseText:null};
|
||||
goog.retrieveAndExec_=function(a,b,c){if(!COMPILED){var d=a;a=goog.normalizePath_(a);var e=goog.global.CLOSURE_IMPORT_SCRIPT||goog.writeScriptTag_,f=goog.loadFileSync_(a);if(null==f)throw Error('Load of "'+a+'" failed');c&&(f=goog.transpile_.call(goog.global,f,a));f=b?goog.wrapModule_(a,f):f+("\n//# sourceURL="+a);goog.IS_OLD_IE_?(goog.dependencies_.deferred[d]=f,goog.queuedModules_.push(d)):e(a,f)}};
|
||||
goog.transpile_=function(a,b){var c=goog.global.$jscomp;c||(goog.global.$jscomp=c={});var d=c.transpile;if(!d){var e=goog.basePath+"transpile.js",f=goog.loadFileSync_(e);f&&(eval(f+"\n//# sourceURL="+e),c=goog.global.$jscomp,d=c.transpile)}d||(d=c.transpile=function(a,b){goog.logToConsole_(b+" requires transpilation but no transpiler was found.");return a});return d(a,b)};
|
||||
goog.typeOf=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
|
||||
else if("function"==b&&"undefined"==typeof a.call)return"object";return b};goog.isNull=function(a){return null===a};goog.isDefAndNotNull=function(a){return null!=a};goog.isArray=function(a){return"array"==goog.typeOf(a)};goog.isArrayLike=function(a){var b=goog.typeOf(a);return"array"==b||"object"==b&&"number"==typeof a.length};goog.isDateLike=function(a){return goog.isObject(a)&&"function"==typeof a.getFullYear};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.isFunction=function(a){return"function"==goog.typeOf(a)};goog.isObject=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b};goog.getUid=function(a){return a[goog.UID_PROPERTY_]||(a[goog.UID_PROPERTY_]=++goog.uidCounter_)};goog.hasUid=function(a){return!!a[goog.UID_PROPERTY_]};
|
||||
@@ -37,7 +40,7 @@ goog.inherits=function(a,b){function c(){}c.prototype=b.prototype;a.superClass_=
|
||||
goog.base=function(a,b,c){var d=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!d)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(d.superClass_){for(var e=Array(arguments.length-1),f=1;f<arguments.length;f++)e[f-1]=arguments[f];return d.superClass_.constructor.apply(a,e)}e=Array(arguments.length-2);for(f=2;f<arguments.length;f++)e[f-2]=arguments[f];for(var f=!1,g=a.constructor;g;g=
|
||||
g.superClass_&&g.superClass_.constructor)if(g.prototype[b]===d)f=!0;else if(f)return g.prototype[b].apply(a,e);if(a[b]===d)return a.constructor.prototype[b].apply(a,e);throw Error("goog.base called from a method of one name to a method of a different name");};goog.scope=function(a){if(goog.isInModuleLoader_())throw Error("goog.scope is not supported within a goog.module.");a.call(goog.global)};COMPILED||(goog.global.COMPILED=COMPILED);
|
||||
goog.defineClass=function(a,b){var c=b.constructor,d=b.statics;c&&c!=Object.prototype.constructor||(c=function(){throw Error("cannot instantiate an interface (no constructor defined).");});c=goog.defineClass.createSealingConstructor_(c,a);a&&goog.inherits(c,a);delete b.constructor;delete b.statics;goog.defineClass.applyProperties_(c.prototype,b);null!=d&&(d instanceof Function?d(c):goog.defineClass.applyProperties_(c,d));return c};goog.defineClass.SEAL_CLASS_INSTANCES=goog.DEBUG;
|
||||
goog.defineClass.createSealingConstructor_=function(a,b){if(goog.defineClass.SEAL_CLASS_INSTANCES&&Object.seal instanceof Function){if(b&&b.prototype&&b.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_])return a;var c=function(){var b=a.apply(this,arguments)||this;b[goog.UID_PROPERTY_]=b[goog.UID_PROPERTY_];this.constructor===c&&Object.seal(b);return b};return c}return a};goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
|
||||
goog.defineClass.createSealingConstructor_=function(a,b){if(!goog.defineClass.SEAL_CLASS_INSTANCES)return a;var c=!goog.defineClass.isUnsealable_(b),d=function(){var b=a.apply(this,arguments)||this;b[goog.UID_PROPERTY_]=b[goog.UID_PROPERTY_];this.constructor===d&&c&&Object.seal instanceof Function&&Object.seal(b);return b};return d};goog.defineClass.isUnsealable_=function(a){return a&&a.prototype&&a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]};goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
|
||||
goog.defineClass.applyProperties_=function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c]);for(var d=0;d<goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;d++)c=goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[d],Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])};goog.tagUnsealableClass=function(a){!COMPILED&&goog.defineClass.SEAL_CLASS_INSTANCES&&(a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]=!0)};goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable";goog.debug={};goog.debug.Error=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,goog.debug.Error);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a));this.reportErrorToServer=!0};goog.inherits(goog.debug.Error,Error);goog.debug.Error.prototype.name="CustomError";goog.dom={};goog.dom.NodeType={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};goog.string={};goog.string.DETECT_DOUBLE_ESCAPING=!1;goog.string.FORCE_NON_DOM_HTML_UNESCAPING=!1;goog.string.Unicode={NBSP:"\u00a0"};goog.string.startsWith=function(a,b){return 0==a.lastIndexOf(b,0)};goog.string.endsWith=function(a,b){var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)==c};goog.string.caseInsensitiveStartsWith=function(a,b){return 0==goog.string.caseInsensitiveCompare(b,a.substr(0,b.length))};
|
||||
goog.string.caseInsensitiveEndsWith=function(a,b){return 0==goog.string.caseInsensitiveCompare(b,a.substr(a.length-b.length,b.length))};goog.string.caseInsensitiveEquals=function(a,b){return a.toLowerCase()==b.toLowerCase()};goog.string.subs=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")};goog.string.collapseWhitespace=function(a){return a.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")};
|
||||
goog.string.isEmptyOrWhitespace=function(a){return/^[\s\xa0]*$/.test(a)};goog.string.isEmptyString=function(a){return 0==a.length};goog.string.isEmpty=goog.string.isEmptyOrWhitespace;goog.string.isEmptyOrWhitespaceSafe=function(a){return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(a))};goog.string.isEmptySafe=goog.string.isEmptyOrWhitespaceSafe;goog.string.isBreakingWhitespace=function(a){return!/[^\t\n\r ]/.test(a)};goog.string.isAlpha=function(a){return!/[^a-zA-Z]/.test(a)};
|
||||
@@ -55,12 +58,12 @@ goog.string.unescapePureXmlEntities_=function(a){return a.replace(/&([^;]+);/g,f
|
||||
goog.string.preserveSpaces=function(a){return a.replace(/(^|[\n ]) /g,"$1"+goog.string.Unicode.NBSP)};goog.string.stripQuotes=function(a,b){for(var c=b.length,d=0;d<c;d++){var e=1==c?b:b.charAt(d);if(a.charAt(0)==e&&a.charAt(a.length-1)==e)return a.substring(1,a.length-1)}return a};goog.string.truncate=function(a,b,c){c&&(a=goog.string.unescapeEntities(a));a.length>b&&(a=a.substring(0,b-3)+"...");c&&(a=goog.string.htmlEscape(a));return a};
|
||||
goog.string.truncateMiddle=function(a,b,c,d){c&&(a=goog.string.unescapeEntities(a));if(d&&a.length>b){d>b&&(d=b);var e=a.length-d;a=a.substring(0,b-d)+"..."+a.substring(e)}else a.length>b&&(d=Math.floor(b/2),e=a.length-d,a=a.substring(0,d+b%2)+"..."+a.substring(e));c&&(a=goog.string.htmlEscape(a));return a};goog.string.specialEscapeChars_={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":"<"};goog.string.jsEscapeCache_={"'":"\\'"};
|
||||
goog.string.quote=function(a){a=String(a);for(var b=['"'],c=0;c<a.length;c++){var d=a.charAt(c),e=d.charCodeAt(0);b[c+1]=goog.string.specialEscapeChars_[d]||(31<e&&127>e?d:goog.string.escapeChar(d))}b.push('"');return b.join("")};goog.string.escapeString=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=goog.string.escapeChar(a.charAt(c));return b.join("")};
|
||||
goog.string.escapeChar=function(a){if(a in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[a];if(a in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[a]=goog.string.specialEscapeChars_[a];var b=a,c=a.charCodeAt(0);if(31<c&&127>c)b=a;else{if(256>c){if(b="\\x",16>c||256<c)b+="0"}else b="\\u",4096>c&&(b+="0");b+=c.toString(16).toUpperCase()}return goog.string.jsEscapeCache_[a]=b};goog.string.contains=function(a,b){return-1!=a.indexOf(b)};
|
||||
goog.string.escapeChar=function(a){if(a in goog.string.jsEscapeCache_)return goog.string.jsEscapeCache_[a];if(a in goog.string.specialEscapeChars_)return goog.string.jsEscapeCache_[a]=goog.string.specialEscapeChars_[a];var b,c=a.charCodeAt(0);if(31<c&&127>c)b=a;else{if(256>c){if(b="\\x",16>c||256<c)b+="0"}else b="\\u",4096>c&&(b+="0");b+=c.toString(16).toUpperCase()}return goog.string.jsEscapeCache_[a]=b};goog.string.contains=function(a,b){return-1!=a.indexOf(b)};
|
||||
goog.string.caseInsensitiveContains=function(a,b){return goog.string.contains(a.toLowerCase(),b.toLowerCase())};goog.string.countOf=function(a,b){return a&&b?a.split(b).length-1:0};goog.string.removeAt=function(a,b,c){var d=a;0<=b&&b<a.length&&0<c&&(d=a.substr(0,b)+a.substr(b+c,a.length-b-c));return d};goog.string.remove=function(a,b){var c=new RegExp(goog.string.regExpEscape(b),"");return a.replace(c,"")};
|
||||
goog.string.removeAll=function(a,b){var c=new RegExp(goog.string.regExpEscape(b),"g");return a.replace(c,"")};goog.string.regExpEscape=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};goog.string.repeat=String.prototype.repeat?function(a,b){return a.repeat(b)}:function(a,b){return Array(b+1).join(a)};
|
||||
goog.string.padNumber=function(a,b,c){a=goog.isDef(c)?a.toFixed(c):String(a);c=a.indexOf(".");-1==c&&(c=a.length);return goog.string.repeat("0",Math.max(0,b-c))+a};goog.string.makeSafe=function(a){return null==a?"":String(a)};goog.string.buildString=function(a){return Array.prototype.join.call(arguments,"")};goog.string.getRandomString=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^goog.now()).toString(36)};
|
||||
goog.string.compareVersions=function(a,b){for(var c=0,d=goog.string.trim(String(a)).split("."),e=goog.string.trim(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var h=d[g]||"",k=e[g]||"",l=RegExp("(\\d*)(\\D*)","g"),n=RegExp("(\\d*)(\\D*)","g");do{var m=l.exec(h)||["","",""],q=n.exec(k)||["","",""];if(0==m[0].length&&0==q[0].length)break;var c=0==m[1].length?0:parseInt(m[1],10),p=0==q[1].length?0:parseInt(q[1],10),c=goog.string.compareElements_(c,p)||goog.string.compareElements_(0==
|
||||
m[2].length,0==q[2].length)||goog.string.compareElements_(m[2],q[2])}while(0==c)}return c};goog.string.compareElements_=function(a,b){return a<b?-1:a>b?1:0};goog.string.hashCode=function(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c)>>>0;return b};goog.string.uniqueStringCounter_=2147483648*Math.random()|0;goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++};
|
||||
goog.string.compareVersions=function(a,b){for(var c=0,d=goog.string.trim(String(a)).split("."),e=goog.string.trim(String(b)).split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var h=d[g]||"",k=e[g]||"",m=RegExp("(\\d*)(\\D*)","g"),n=RegExp("(\\d*)(\\D*)","g");do{var l=m.exec(h)||["","",""],q=n.exec(k)||["","",""];if(0==l[0].length&&0==q[0].length)break;var c=0==l[1].length?0:parseInt(l[1],10),p=0==q[1].length?0:parseInt(q[1],10),c=goog.string.compareElements_(c,p)||goog.string.compareElements_(0==
|
||||
l[2].length,0==q[2].length)||goog.string.compareElements_(l[2],q[2])}while(0==c)}return c};goog.string.compareElements_=function(a,b){return a<b?-1:a>b?1:0};goog.string.hashCode=function(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c)>>>0;return b};goog.string.uniqueStringCounter_=2147483648*Math.random()|0;goog.string.createUniqueString=function(){return"goog_"+goog.string.uniqueStringCounter_++};
|
||||
goog.string.toNumber=function(a){var b=Number(a);return 0==b&&goog.string.isEmptyOrWhitespace(a)?NaN:b};goog.string.isLowerCamelCase=function(a){return/^[a-z]+([A-Z][a-z]*)*$/.test(a)};goog.string.isUpperCamelCase=function(a){return/^([A-Z][a-z]*)+$/.test(a)};goog.string.toCamelCase=function(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};goog.string.toSelectorCase=function(a){return String(a).replace(/([A-Z])/g,"-$1").toLowerCase()};
|
||||
goog.string.toTitleCase=function(a,b){var c=goog.isString(b)?goog.string.regExpEscape(b):"\\s";return a.replace(new RegExp("(^"+(c?"|["+c+"]+":"")+")([a-z])","g"),function(a,b,c){return b+c.toUpperCase()})};goog.string.capitalize=function(a){return String(a.charAt(0)).toUpperCase()+String(a.substr(1)).toLowerCase()};goog.string.parseInt=function(a){isFinite(a)&&(a=String(a));return goog.isString(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};
|
||||
goog.string.splitLimit=function(a,b,c){a=a.split(b);for(var d=[];0<c&&a.length;)d.push(a.shift()),c--;a.length&&d.push(a.join(b));return d};goog.string.lastComponent=function(a,b){if(b)"string"==typeof b&&(b=[b]);else return a;for(var c=-1,d=0;d<b.length;d++)if(""!=b[d]){var e=a.lastIndexOf(b[d]);e>c&&(c=e)}return-1==c?a:a.slice(c+1)};
|
||||
@@ -88,37 +91,38 @@ goog.array.removeLast=function(a,b){var c=goog.array.lastIndexOf(a,b);return 0<=
|
||||
goog.array.concat=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)};goog.array.join=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)};goog.array.toArray=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]};goog.array.clone=goog.array.toArray;
|
||||
goog.array.extend=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(goog.isArrayLike(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var g=0;g<f;g++)a[e+g]=d[g]}else a.push(d)}};goog.array.splice=function(a,b,c,d){goog.asserts.assert(null!=a.length);return Array.prototype.splice.apply(a,goog.array.slice(arguments,1))};
|
||||
goog.array.slice=function(a,b,c){goog.asserts.assert(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)};goog.array.removeDuplicates=function(a,b,c){b=b||a;var d=function(a){return goog.isObject(a)?"o"+goog.getUid(a):(typeof a).charAt(0)+a};c=c||d;for(var d={},e=0,f=0;f<a.length;){var g=a[f++],h=c(g);Object.prototype.hasOwnProperty.call(d,h)||(d[h]=!0,b[e++]=g)}b.length=e};
|
||||
goog.array.binarySearch=function(a,b,c){return goog.array.binarySearch_(a,c||goog.array.defaultCompare,!1,b)};goog.array.binarySelect=function(a,b,c){return goog.array.binarySearch_(a,b,!0,void 0,c)};goog.array.binarySearch_=function(a,b,c,d,e){for(var f=0,g=a.length,h;f<g;){var k=f+g>>1,l;l=c?b.call(e,a[k],k,a):b(d,a[k]);0<l?f=k+1:(g=k,h=!l)}return h?f:~f};goog.array.sort=function(a,b){a.sort(b||goog.array.defaultCompare)};
|
||||
goog.array.binarySearch=function(a,b,c){return goog.array.binarySearch_(a,c||goog.array.defaultCompare,!1,b)};goog.array.binarySelect=function(a,b,c){return goog.array.binarySearch_(a,b,!0,void 0,c)};goog.array.binarySearch_=function(a,b,c,d,e){for(var f=0,g=a.length,h;f<g;){var k=f+g>>1,m;m=c?b.call(e,a[k],k,a):b(d,a[k]);0<m?f=k+1:(g=k,h=!m)}return h?f:~f};goog.array.sort=function(a,b){a.sort(b||goog.array.defaultCompare)};
|
||||
goog.array.stableSort=function(a,b){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]={index:d,value:a[d]};var e=b||goog.array.defaultCompare;goog.array.sort(c,function(a,b){return e(a.value,b.value)||a.index-b.index});for(d=0;d<a.length;d++)a[d]=c[d].value};goog.array.sortByKey=function(a,b,c){var d=c||goog.array.defaultCompare;goog.array.sort(a,function(a,c){return d(b(a),b(c))})};goog.array.sortObjectsByKey=function(a,b,c){goog.array.sortByKey(a,function(a){return a[b]},c)};
|
||||
goog.array.isSorted=function(a,b,c){b=b||goog.array.defaultCompare;for(var d=1;d<a.length;d++){var e=b(a[d-1],a[d]);if(0<e||0==e&&c)return!1}return!0};goog.array.equals=function(a,b,c){if(!goog.isArrayLike(a)||!goog.isArrayLike(b)||a.length!=b.length)return!1;var d=a.length;c=c||goog.array.defaultCompareEquality;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0};
|
||||
goog.array.compare3=function(a,b,c){c=c||goog.array.defaultCompare;for(var d=Math.min(a.length,b.length),e=0;e<d;e++){var f=c(a[e],b[e]);if(0!=f)return f}return goog.array.defaultCompare(a.length,b.length)};goog.array.defaultCompare=function(a,b){return a>b?1:a<b?-1:0};goog.array.inverseDefaultCompare=function(a,b){return-goog.array.defaultCompare(a,b)};goog.array.defaultCompareEquality=function(a,b){return a===b};
|
||||
goog.array.binaryInsert=function(a,b,c){c=goog.array.binarySearch(a,b,c);return 0>c?(goog.array.insertAt(a,b,-(c+1)),!0):!1};goog.array.binaryRemove=function(a,b,c){b=goog.array.binarySearch(a,b,c);return 0<=b?goog.array.removeAt(a,b):!1};goog.array.bucket=function(a,b,c){for(var d={},e=0;e<a.length;e++){var f=a[e],g=b.call(c,f,e,a);goog.isDef(g)&&(d[g]||(d[g]=[])).push(f)}return d};goog.array.toObject=function(a,b,c){var d={};goog.array.forEach(a,function(e,f){d[b.call(c,e,f,a)]=e});return d};
|
||||
goog.array.range=function(a,b,c){var d=[],e=0,f=a;c=c||1;void 0!==b&&(e=a,f=b);if(0>c*(f-e))return[];if(0<c)for(a=e;a<f;a+=c)d.push(a);else for(a=e;a>f;a+=c)d.push(a);return d};goog.array.repeat=function(a,b){for(var c=[],d=0;d<b;d++)c[d]=a;return c};goog.array.flatten=function(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];if(goog.isArray(d))for(var e=0;e<d.length;e+=8192)for(var f=goog.array.slice(d,e,e+8192),f=goog.array.flatten.apply(null,f),g=0;g<f.length;g++)b.push(f[g]);else b.push(d)}return b};
|
||||
goog.array.rotate=function(a,b){goog.asserts.assert(null!=a.length);a.length&&(b%=a.length,0<b?Array.prototype.unshift.apply(a,a.splice(-b,b)):0>b&&Array.prototype.push.apply(a,a.splice(0,-b)));return a};goog.array.moveItem=function(a,b,c){goog.asserts.assert(0<=b&&b<a.length);goog.asserts.assert(0<=c&&c<a.length);b=Array.prototype.splice.call(a,b,1);Array.prototype.splice.call(a,c,0,b[0])};
|
||||
goog.array.zip=function(a){if(!arguments.length)return[];for(var b=[],c=arguments[0].length,d=1;d<arguments.length;d++)arguments[d].length<c&&(c=arguments[d].length);for(d=0;d<c;d++){for(var e=[],f=0;f<arguments.length;f++)e.push(arguments[f][d]);b.push(e)}return b};goog.array.shuffle=function(a,b){for(var c=b||Math.random,d=a.length-1;0<d;d--){var e=Math.floor(c()*(d+1)),f=a[d];a[d]=a[e];a[e]=f}};goog.array.copyByIndex=function(a,b){var c=[];goog.array.forEach(b,function(b){c.push(a[b])});return c};goog.math={};goog.math.randomInt=function(a){return Math.floor(Math.random()*a)};goog.math.uniformRandom=function(a,b){return a+Math.random()*(b-a)};goog.math.clamp=function(a,b,c){return Math.min(Math.max(a,b),c)};goog.math.modulo=function(a,b){var c=a%b;return 0>c*b?c+b:c};goog.math.lerp=function(a,b,c){return a+c*(b-a)};goog.math.nearlyEquals=function(a,b,c){return Math.abs(a-b)<=(c||1E-6)};goog.math.standardAngle=function(a){return goog.math.modulo(a,360)};
|
||||
goog.array.zip=function(a){if(!arguments.length)return[];for(var b=[],c=arguments[0].length,d=1;d<arguments.length;d++)arguments[d].length<c&&(c=arguments[d].length);for(d=0;d<c;d++){for(var e=[],f=0;f<arguments.length;f++)e.push(arguments[f][d]);b.push(e)}return b};goog.array.shuffle=function(a,b){for(var c=b||Math.random,d=a.length-1;0<d;d--){var e=Math.floor(c()*(d+1)),f=a[d];a[d]=a[e];a[e]=f}};goog.array.copyByIndex=function(a,b){var c=[];goog.array.forEach(b,function(b){c.push(a[b])});return c};
|
||||
goog.array.concatMap=function(a,b,c){return goog.array.concat.apply([],goog.array.map(a,b,c))};goog.math={};goog.math.randomInt=function(a){return Math.floor(Math.random()*a)};goog.math.uniformRandom=function(a,b){return a+Math.random()*(b-a)};goog.math.clamp=function(a,b,c){return Math.min(Math.max(a,b),c)};goog.math.modulo=function(a,b){var c=a%b;return 0>c*b?c+b:c};goog.math.lerp=function(a,b,c){return a+c*(b-a)};goog.math.nearlyEquals=function(a,b,c){return Math.abs(a-b)<=(c||1E-6)};goog.math.standardAngle=function(a){return goog.math.modulo(a,360)};
|
||||
goog.math.standardAngleInRadians=function(a){return goog.math.modulo(a,2*Math.PI)};goog.math.toRadians=function(a){return a*Math.PI/180};goog.math.toDegrees=function(a){return 180*a/Math.PI};goog.math.angleDx=function(a,b){return b*Math.cos(goog.math.toRadians(a))};goog.math.angleDy=function(a,b){return b*Math.sin(goog.math.toRadians(a))};goog.math.angle=function(a,b,c,d){return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(d-b,c-a)))};
|
||||
goog.math.angleDifference=function(a,b){var c=goog.math.standardAngle(b)-goog.math.standardAngle(a);180<c?c-=360:-180>=c&&(c=360+c);return c};goog.math.sign=Math.sign||function(a){return 0<a?1:0>a?-1:a};
|
||||
goog.math.longestCommonSubsequence=function(a,b,c,d){c=c||function(a,b){return a==b};d=d||function(b,c){return a[b]};for(var e=a.length,f=b.length,g=[],h=0;h<e+1;h++)g[h]=[],g[h][0]=0;for(var k=0;k<f+1;k++)g[0][k]=0;for(h=1;h<=e;h++)for(k=1;k<=f;k++)c(a[h-1],b[k-1])?g[h][k]=g[h-1][k-1]+1:g[h][k]=Math.max(g[h-1][k],g[h][k-1]);for(var l=[],h=e,k=f;0<h&&0<k;)c(a[h-1],b[k-1])?(l.unshift(d(h-1,k-1)),h--,k--):g[h-1][k]>g[h][k-1]?h--:k--;return l};
|
||||
goog.math.longestCommonSubsequence=function(a,b,c,d){c=c||function(a,b){return a==b};d=d||function(b,c){return a[b]};for(var e=a.length,f=b.length,g=[],h=0;h<e+1;h++)g[h]=[],g[h][0]=0;for(var k=0;k<f+1;k++)g[0][k]=0;for(h=1;h<=e;h++)for(k=1;k<=f;k++)c(a[h-1],b[k-1])?g[h][k]=g[h-1][k-1]+1:g[h][k]=Math.max(g[h-1][k],g[h][k-1]);for(var m=[],h=e,k=f;0<h&&0<k;)c(a[h-1],b[k-1])?(m.unshift(d(h-1,k-1)),h--,k--):g[h-1][k]>g[h][k-1]?h--:k--;return m};
|
||||
goog.math.sum=function(a){return goog.array.reduce(arguments,function(a,c){return a+c},0)};goog.math.average=function(a){return goog.math.sum.apply(null,arguments)/arguments.length};goog.math.sampleVariance=function(a){var b=arguments.length;if(2>b)return 0;var c=goog.math.average.apply(null,arguments);return goog.math.sum.apply(null,goog.array.map(arguments,function(a){return Math.pow(a-c,2)}))/(b-1)};goog.math.standardDeviation=function(a){return Math.sqrt(goog.math.sampleVariance.apply(null,arguments))};
|
||||
goog.math.isInt=function(a){return isFinite(a)&&0==a%1};goog.math.isFiniteNumber=function(a){return isFinite(a)&&!isNaN(a)};goog.math.isNegativeZero=function(a){return 0==a&&0>1/a};goog.math.log10Floor=function(a){if(0<a){var b=Math.round(Math.log(a)*Math.LOG10E);return b-(parseFloat("1e"+b)>a?1:0)}return 0==a?-Infinity:NaN};goog.math.safeFloor=function(a,b){goog.asserts.assert(!goog.isDef(b)||0<b);return Math.floor(a+(b||2E-15))};
|
||||
goog.math.safeCeil=function(a,b){goog.asserts.assert(!goog.isDef(b)||0<b);return Math.ceil(a-(b||2E-15))};goog.labs={};goog.labs.userAgent={};goog.labs.userAgent.util={};goog.labs.userAgent.util.getNativeUserAgentString_=function(){var a=goog.labs.userAgent.util.getNavigator_();return a&&(a=a.userAgent)?a:""};goog.labs.userAgent.util.getNavigator_=function(){return goog.global.navigator};goog.labs.userAgent.util.userAgent_=goog.labs.userAgent.util.getNativeUserAgentString_();goog.labs.userAgent.util.setUserAgent=function(a){goog.labs.userAgent.util.userAgent_=a||goog.labs.userAgent.util.getNativeUserAgentString_()};
|
||||
goog.labs.userAgent.util.getUserAgent=function(){return goog.labs.userAgent.util.userAgent_};goog.labs.userAgent.util.matchUserAgent=function(a){var b=goog.labs.userAgent.util.getUserAgent();return goog.string.contains(b,a)};goog.labs.userAgent.util.matchUserAgentIgnoreCase=function(a){var b=goog.labs.userAgent.util.getUserAgent();return goog.string.caseInsensitiveContains(b,a)};
|
||||
goog.labs.userAgent.util.extractVersionTuples=function(a){for(var b=RegExp("(\\w[\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g"),c=[],d;d=b.exec(a);)c.push([d[1],d[2],d[3]||void 0]);return c};goog.object={};goog.object.forEach=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};goog.object.filter=function(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d};goog.object.map=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d};goog.object.some=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1};goog.object.every=function(a,b,c){for(var d in a)if(!b.call(c,a[d],d,a))return!1;return!0};
|
||||
goog.object.getCount=function(a){var b=0,c;for(c in a)b++;return b};goog.object.getAnyKey=function(a){for(var b in a)return b};goog.object.getAnyValue=function(a){for(var b in a)return a[b]};goog.object.contains=function(a,b){return goog.object.containsValue(a,b)};goog.object.getValues=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};goog.object.getKeys=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b};
|
||||
goog.object.getValueByKeys=function(a,b){for(var c=goog.isArrayLike(b),d=c?b:arguments,c=c?0:1;c<d.length&&(a=a[d[c]],goog.isDef(a));c++);return a};goog.object.containsKey=function(a,b){return null!==a&&b in a};goog.object.containsValue=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1};goog.object.findKey=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};goog.object.findValue=function(a,b,c){return(b=goog.object.findKey(a,b,c))&&a[b]};
|
||||
goog.object.isEmpty=function(a){for(var b in a)return!1;return!0};goog.object.clear=function(a){for(var b in a)delete a[b]};goog.object.remove=function(a,b){var c;(c=b in a)&&delete a[b];return c};goog.object.add=function(a,b,c){if(null!==a&&b in a)throw Error('The object already contains the key "'+b+'"');goog.object.set(a,b,c)};goog.object.get=function(a,b,c){return null!==a&&b in a?a[b]:c};goog.object.set=function(a,b,c){a[b]=c};
|
||||
goog.object.setIfUndefined=function(a,b,c){return b in a?a[b]:a[b]=c};goog.object.setWithReturnValueIfNotSet=function(a,b,c){if(b in a)return a[b];c=c();return a[b]=c};goog.object.equals=function(a,b){for(var c in a)if(!(c in b)||a[c]!==b[c])return!1;for(c in b)if(!(c in a))return!1;return!0};goog.object.clone=function(a){var b={},c;for(c in a)b[c]=a[c];return b};
|
||||
goog.labs.userAgent.util.extractVersionTuples=function(a){for(var b=RegExp("(\\w[\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g"),c=[],d;d=b.exec(a);)c.push([d[1],d[2],d[3]||void 0]);return c};goog.object={};goog.object.is=function(a,b){return a===b?0!==a||1/a===1/b:a!==a&&b!==b};goog.object.forEach=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};goog.object.filter=function(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d};goog.object.map=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d};goog.object.some=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1};
|
||||
goog.object.every=function(a,b,c){for(var d in a)if(!b.call(c,a[d],d,a))return!1;return!0};goog.object.getCount=function(a){var b=0,c;for(c in a)b++;return b};goog.object.getAnyKey=function(a){for(var b in a)return b};goog.object.getAnyValue=function(a){for(var b in a)return a[b]};goog.object.contains=function(a,b){return goog.object.containsValue(a,b)};goog.object.getValues=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b};
|
||||
goog.object.getKeys=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b};goog.object.getValueByKeys=function(a,b){for(var c=goog.isArrayLike(b),d=c?b:arguments,c=c?0:1;c<d.length&&(a=a[d[c]],goog.isDef(a));c++);return a};goog.object.containsKey=function(a,b){return null!==a&&b in a};goog.object.containsValue=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1};goog.object.findKey=function(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d};
|
||||
goog.object.findValue=function(a,b,c){return(b=goog.object.findKey(a,b,c))&&a[b]};goog.object.isEmpty=function(a){for(var b in a)return!1;return!0};goog.object.clear=function(a){for(var b in a)delete a[b]};goog.object.remove=function(a,b){var c;(c=b in a)&&delete a[b];return c};goog.object.add=function(a,b,c){if(null!==a&&b in a)throw Error('The object already contains the key "'+b+'"');goog.object.set(a,b,c)};goog.object.get=function(a,b,c){return null!==a&&b in a?a[b]:c};
|
||||
goog.object.set=function(a,b,c){a[b]=c};goog.object.setIfUndefined=function(a,b,c){return b in a?a[b]:a[b]=c};goog.object.setWithReturnValueIfNotSet=function(a,b,c){if(b in a)return a[b];c=c();return a[b]=c};goog.object.equals=function(a,b){for(var c in a)if(!(c in b)||a[c]!==b[c])return!1;for(c in b)if(!(c in a))return!1;return!0};goog.object.clone=function(a){var b={},c;for(c in a)b[c]=a[c];return b};
|
||||
goog.object.unsafeClone=function(a){var b=goog.typeOf(a);if("object"==b||"array"==b){if(goog.isFunction(a.clone))return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=goog.object.unsafeClone(a[c]);return b}return a};goog.object.transpose=function(a){var b={},c;for(c in a)b[a[c]]=c;return b};goog.object.PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
|
||||
goog.object.extend=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<goog.object.PROTOTYPE_FIELDS_.length;f++)c=goog.object.PROTOTYPE_FIELDS_[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};
|
||||
goog.object.create=function(a){var b=arguments.length;if(1==b&&goog.isArray(arguments[0]))return goog.object.create.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c};goog.object.createSet=function(a){var b=arguments.length;if(1==b&&goog.isArray(arguments[0]))return goog.object.createSet.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};
|
||||
goog.object.createImmutableView=function(a){var b=a;Object.isFrozen&&!Object.isFrozen(a)&&(b=Object.create(a),Object.freeze(b));return b};goog.object.isImmutableView=function(a){return!!Object.isFrozen&&Object.isFrozen(a)};goog.labs.userAgent.browser={};goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")||goog.labs.userAgent.util.matchUserAgent("OPR")};goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")};goog.labs.userAgent.browser.matchEdge_=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")};goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")};
|
||||
goog.object.createImmutableView=function(a){var b=a;Object.isFrozen&&!Object.isFrozen(a)&&(b=Object.create(a),Object.freeze(b));return b};goog.object.isImmutableView=function(a){return!!Object.isFrozen&&Object.isFrozen(a)};goog.labs.userAgent.browser={};goog.labs.userAgent.browser.matchOpera_=function(){return goog.labs.userAgent.util.matchUserAgent("Opera")};goog.labs.userAgent.browser.matchIE_=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")};goog.labs.userAgent.browser.matchEdge_=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")};goog.labs.userAgent.browser.matchFirefox_=function(){return goog.labs.userAgent.util.matchUserAgent("Firefox")};
|
||||
goog.labs.userAgent.browser.matchSafari_=function(){return goog.labs.userAgent.util.matchUserAgent("Safari")&&!(goog.labs.userAgent.browser.matchChrome_()||goog.labs.userAgent.browser.matchCoast_()||goog.labs.userAgent.browser.matchOpera_()||goog.labs.userAgent.browser.matchEdge_()||goog.labs.userAgent.browser.isSilk()||goog.labs.userAgent.util.matchUserAgent("Android"))};goog.labs.userAgent.browser.matchCoast_=function(){return goog.labs.userAgent.util.matchUserAgent("Coast")};
|
||||
goog.labs.userAgent.browser.matchIosWebview_=function(){return(goog.labs.userAgent.util.matchUserAgent("iPad")||goog.labs.userAgent.util.matchUserAgent("iPhone"))&&!goog.labs.userAgent.browser.matchSafari_()&&!goog.labs.userAgent.browser.matchChrome_()&&!goog.labs.userAgent.browser.matchCoast_()&&goog.labs.userAgent.util.matchUserAgent("AppleWebKit")};
|
||||
goog.labs.userAgent.browser.matchChrome_=function(){return(goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS"))&&!goog.labs.userAgent.browser.matchOpera_()&&!goog.labs.userAgent.browser.matchEdge_()};goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return goog.labs.userAgent.util.matchUserAgent("Android")&&!(goog.labs.userAgent.browser.isChrome()||goog.labs.userAgent.browser.isFirefox()||goog.labs.userAgent.browser.isOpera()||goog.labs.userAgent.browser.isSilk())};
|
||||
goog.labs.userAgent.browser.matchChrome_=function(){return(goog.labs.userAgent.util.matchUserAgent("Chrome")||goog.labs.userAgent.util.matchUserAgent("CriOS"))&&!goog.labs.userAgent.browser.matchEdge_()};goog.labs.userAgent.browser.matchAndroidBrowser_=function(){return goog.labs.userAgent.util.matchUserAgent("Android")&&!(goog.labs.userAgent.browser.isChrome()||goog.labs.userAgent.browser.isFirefox()||goog.labs.userAgent.browser.isOpera()||goog.labs.userAgent.browser.isSilk())};
|
||||
goog.labs.userAgent.browser.isOpera=goog.labs.userAgent.browser.matchOpera_;goog.labs.userAgent.browser.isIE=goog.labs.userAgent.browser.matchIE_;goog.labs.userAgent.browser.isEdge=goog.labs.userAgent.browser.matchEdge_;goog.labs.userAgent.browser.isFirefox=goog.labs.userAgent.browser.matchFirefox_;goog.labs.userAgent.browser.isSafari=goog.labs.userAgent.browser.matchSafari_;goog.labs.userAgent.browser.isCoast=goog.labs.userAgent.browser.matchCoast_;goog.labs.userAgent.browser.isIosWebview=goog.labs.userAgent.browser.matchIosWebview_;
|
||||
goog.labs.userAgent.browser.isChrome=goog.labs.userAgent.browser.matchChrome_;goog.labs.userAgent.browser.isAndroidBrowser=goog.labs.userAgent.browser.matchAndroidBrowser_;goog.labs.userAgent.browser.isSilk=function(){return goog.labs.userAgent.util.matchUserAgent("Silk")};
|
||||
goog.labs.userAgent.browser.getVersion=function(){function a(a){a=goog.array.find(a,d);return c[a]||""}var b=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(b);var b=goog.labs.userAgent.util.extractVersionTuples(b),c={};goog.array.forEach(b,function(a){c[a[0]]=a[1]});var d=goog.partial(goog.object.containsKey,c);return goog.labs.userAgent.browser.isOpera()?a(["Version","Opera","OPR"]):goog.labs.userAgent.browser.isEdge()?
|
||||
a(["Edge"]):goog.labs.userAgent.browser.isChrome()?a(["Chrome","CriOS"]):(b=b[2])&&b[1]||""};goog.labs.userAgent.browser.isVersionOrHigher=function(a){return 0<=goog.string.compareVersions(goog.labs.userAgent.browser.getVersion(),a)};
|
||||
goog.labs.userAgent.browser.getVersion=function(){function a(a){a=goog.array.find(a,d);return c[a]||""}var b=goog.labs.userAgent.util.getUserAgent();if(goog.labs.userAgent.browser.isIE())return goog.labs.userAgent.browser.getIEVersion_(b);var b=goog.labs.userAgent.util.extractVersionTuples(b),c={};goog.array.forEach(b,function(a){c[a[0]]=a[1]});var d=goog.partial(goog.object.containsKey,c);return goog.labs.userAgent.browser.isOpera()?a(["Version","Opera"]):goog.labs.userAgent.browser.isEdge()?a(["Edge"]):
|
||||
goog.labs.userAgent.browser.isChrome()?a(["Chrome","CriOS"]):(b=b[2])&&b[1]||""};goog.labs.userAgent.browser.isVersionOrHigher=function(a){return 0<=goog.string.compareVersions(goog.labs.userAgent.browser.getVersion(),a)};
|
||||
goog.labs.userAgent.browser.getIEVersion_=function(a){var b=/rv: *([\d\.]*)/.exec(a);if(b&&b[1])return b[1];var b="",c=/MSIE +([\d\.]+)/.exec(a);if(c&&c[1])if(a=/Trident\/(\d.\d)/.exec(a),"7.0"==c[1])if(a&&a[1])switch(a[1]){case "4.0":b="8.0";break;case "5.0":b="9.0";break;case "6.0":b="10.0";break;case "7.0":b="11.0"}else b="7.0";else b=c[1];return b};goog.labs.userAgent.engine={};goog.labs.userAgent.engine.isPresto=function(){return goog.labs.userAgent.util.matchUserAgent("Presto")};goog.labs.userAgent.engine.isTrident=function(){return goog.labs.userAgent.util.matchUserAgent("Trident")||goog.labs.userAgent.util.matchUserAgent("MSIE")};goog.labs.userAgent.engine.isEdge=function(){return goog.labs.userAgent.util.matchUserAgent("Edge")};
|
||||
goog.labs.userAgent.engine.isWebKit=function(){return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit")&&!goog.labs.userAgent.engine.isEdge()};goog.labs.userAgent.engine.isGecko=function(){return goog.labs.userAgent.util.matchUserAgent("Gecko")&&!goog.labs.userAgent.engine.isWebKit()&&!goog.labs.userAgent.engine.isTrident()&&!goog.labs.userAgent.engine.isEdge()};
|
||||
goog.labs.userAgent.engine.getVersion=function(){var a=goog.labs.userAgent.util.getUserAgent();if(a){var a=goog.labs.userAgent.util.extractVersionTuples(a),b=goog.labs.userAgent.engine.getEngineTuple_(a);if(b)return"Gecko"==b[0]?goog.labs.userAgent.engine.getVersionForKey_(a,"Firefox"):b[1];var a=a[0],c;if(a&&(c=a[2])&&(c=/Trident\/([^\s;]+)/.exec(c)))return c[1]}return""};
|
||||
@@ -129,10 +133,10 @@ goog.labs.userAgent.platform.getVersion=function(){var a=goog.labs.userAgent.uti
|
||||
b=(a=b.exec(a))&&a[1]):goog.labs.userAgent.platform.isChromeOS()&&(b=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/,b=(a=b.exec(a))&&a[1]);return b||""};goog.labs.userAgent.platform.isVersionOrHigher=function(a){return 0<=goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(),a)};goog.userAgent={};goog.userAgent.ASSUME_IE=!1;goog.userAgent.ASSUME_EDGE=!1;goog.userAgent.ASSUME_GECKO=!1;goog.userAgent.ASSUME_WEBKIT=!1;goog.userAgent.ASSUME_MOBILE_WEBKIT=!1;goog.userAgent.ASSUME_OPERA=!1;goog.userAgent.ASSUME_ANY_VERSION=!1;goog.userAgent.BROWSER_KNOWN_=goog.userAgent.ASSUME_IE||goog.userAgent.ASSUME_EDGE||goog.userAgent.ASSUME_GECKO||goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_OPERA;goog.userAgent.getUserAgentString=function(){return goog.labs.userAgent.util.getUserAgent()};
|
||||
goog.userAgent.getNavigator=function(){return goog.global.navigator||null};goog.userAgent.OPERA=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_OPERA:goog.labs.userAgent.browser.isOpera();goog.userAgent.IE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_IE:goog.labs.userAgent.browser.isIE();goog.userAgent.EDGE=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_EDGE:goog.labs.userAgent.engine.isEdge();goog.userAgent.EDGE_OR_IE=goog.userAgent.EDGE||goog.userAgent.IE;
|
||||
goog.userAgent.GECKO=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_GECKO:goog.labs.userAgent.engine.isGecko();goog.userAgent.WEBKIT=goog.userAgent.BROWSER_KNOWN_?goog.userAgent.ASSUME_WEBKIT||goog.userAgent.ASSUME_MOBILE_WEBKIT:goog.labs.userAgent.engine.isWebKit();goog.userAgent.isMobile_=function(){return goog.userAgent.WEBKIT&&goog.labs.userAgent.util.matchUserAgent("Mobile")};goog.userAgent.MOBILE=goog.userAgent.ASSUME_MOBILE_WEBKIT||goog.userAgent.isMobile_();goog.userAgent.SAFARI=goog.userAgent.WEBKIT;
|
||||
goog.userAgent.determinePlatform_=function(){var a=goog.userAgent.getNavigator();return a&&a.platform||""};goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_();goog.userAgent.ASSUME_MAC=!1;goog.userAgent.ASSUME_WINDOWS=!1;goog.userAgent.ASSUME_LINUX=!1;goog.userAgent.ASSUME_X11=!1;goog.userAgent.ASSUME_ANDROID=!1;goog.userAgent.ASSUME_IPHONE=!1;goog.userAgent.ASSUME_IPAD=!1;
|
||||
goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD;goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh();goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows();
|
||||
goog.userAgent.determinePlatform_=function(){var a=goog.userAgent.getNavigator();return a&&a.platform||""};goog.userAgent.PLATFORM=goog.userAgent.determinePlatform_();goog.userAgent.ASSUME_MAC=!1;goog.userAgent.ASSUME_WINDOWS=!1;goog.userAgent.ASSUME_LINUX=!1;goog.userAgent.ASSUME_X11=!1;goog.userAgent.ASSUME_ANDROID=!1;goog.userAgent.ASSUME_IPHONE=!1;goog.userAgent.ASSUME_IPAD=!1;goog.userAgent.ASSUME_IPOD=!1;
|
||||
goog.userAgent.PLATFORM_KNOWN_=goog.userAgent.ASSUME_MAC||goog.userAgent.ASSUME_WINDOWS||goog.userAgent.ASSUME_LINUX||goog.userAgent.ASSUME_X11||goog.userAgent.ASSUME_ANDROID||goog.userAgent.ASSUME_IPHONE||goog.userAgent.ASSUME_IPAD||goog.userAgent.ASSUME_IPOD;goog.userAgent.MAC=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_MAC:goog.labs.userAgent.platform.isMacintosh();goog.userAgent.WINDOWS=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_WINDOWS:goog.labs.userAgent.platform.isWindows();
|
||||
goog.userAgent.isLegacyLinux_=function(){return goog.labs.userAgent.platform.isLinux()||goog.labs.userAgent.platform.isChromeOS()};goog.userAgent.LINUX=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_LINUX:goog.userAgent.isLegacyLinux_();goog.userAgent.isX11_=function(){var a=goog.userAgent.getNavigator();return!!a&&goog.string.contains(a.appVersion||"","X11")};goog.userAgent.X11=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_X11:goog.userAgent.isX11_();
|
||||
goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid();goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone();goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad();
|
||||
goog.userAgent.ANDROID=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_ANDROID:goog.labs.userAgent.platform.isAndroid();goog.userAgent.IPHONE=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPHONE:goog.labs.userAgent.platform.isIphone();goog.userAgent.IPAD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPAD:goog.labs.userAgent.platform.isIpad();goog.userAgent.IPOD=goog.userAgent.PLATFORM_KNOWN_?goog.userAgent.ASSUME_IPOD:goog.labs.userAgent.platform.isIpod();
|
||||
goog.userAgent.determineVersion_=function(){var a="",b=goog.userAgent.getVersionRegexResult_();b&&(a=b?b[1]:"");return goog.userAgent.IE&&(b=goog.userAgent.getDocumentMode_(),null!=b&&b>parseFloat(a))?String(b):a};
|
||||
goog.userAgent.getVersionRegexResult_=function(){var a=goog.userAgent.getUserAgentString();if(goog.userAgent.GECKO)return/rv\:([^\);]+)(\)|;)/.exec(a);if(goog.userAgent.EDGE)return/Edge\/([\d\.]+)/.exec(a);if(goog.userAgent.IE)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(goog.userAgent.WEBKIT)return/WebKit\/(\S+)/.exec(a);if(goog.userAgent.OPERA)return/(?:Version)[ \/]?(\S+)/.exec(a)};goog.userAgent.getDocumentMode_=function(){var a=goog.global.document;return a?a.documentMode:void 0};
|
||||
goog.userAgent.VERSION=goog.userAgent.determineVersion_();goog.userAgent.compare=function(a,b){return goog.string.compareVersions(a,b)};goog.userAgent.isVersionOrHigherCache_={};goog.userAgent.isVersionOrHigher=function(a){return goog.userAgent.ASSUME_ANY_VERSION||goog.userAgent.isVersionOrHigherCache_[a]||(goog.userAgent.isVersionOrHigherCache_[a]=0<=goog.string.compareVersions(goog.userAgent.VERSION,a))};goog.userAgent.isVersion=goog.userAgent.isVersionOrHigher;
|
||||
@@ -207,9 +211,7 @@ goog.dom.safe.setAnchorHref=function(a,b){var c;c=b instanceof goog.html.SafeUrl
|
||||
goog.dom.safe.setIframeSrc=function(a,b){a.src=goog.html.TrustedResourceUrl.unwrap(b)};
|
||||
goog.dom.safe.setLinkHrefAndRel=function(a,b,c){a.rel=c;goog.string.caseInsensitiveContains(c,"stylesheet")?(goog.asserts.assert(b instanceof goog.html.TrustedResourceUrl,'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'),a.href=goog.html.TrustedResourceUrl.unwrap(b)):a.href=b instanceof goog.html.TrustedResourceUrl?goog.html.TrustedResourceUrl.unwrap(b):b instanceof goog.html.SafeUrl?goog.html.SafeUrl.unwrap(b):goog.html.SafeUrl.sanitize(b).getTypedStringValue()};
|
||||
goog.dom.safe.setObjectData=function(a,b){a.data=goog.html.TrustedResourceUrl.unwrap(b)};goog.dom.safe.setScriptSrc=function(a,b){a.src=goog.html.TrustedResourceUrl.unwrap(b)};goog.dom.safe.setLocationHref=function(a,b){var c;c=b instanceof goog.html.SafeUrl?b:goog.html.SafeUrl.sanitize(b);a.href=goog.html.SafeUrl.unwrap(c)};
|
||||
goog.dom.safe.openInWindow=function(a,b,c,d,e){a=a instanceof goog.html.SafeUrl?a:goog.html.SafeUrl.sanitize(a);return(b||window).open(goog.html.SafeUrl.unwrap(a),c?goog.string.Const.unwrap(c):"",d,e)};goog.html.legacyconversions={};goog.html.legacyconversions.safeHtmlFromString=function(a){goog.html.legacyconversions.reportCallback_();return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(a,null)};goog.html.legacyconversions.safeStyleFromString=function(a){goog.html.legacyconversions.reportCallback_();return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a)};
|
||||
goog.html.legacyconversions.safeStyleSheetFromString=function(a){goog.html.legacyconversions.reportCallback_();return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)};goog.html.legacyconversions.safeUrlFromString=function(a){goog.html.legacyconversions.reportCallback_();return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};goog.html.legacyconversions.trustedResourceUrlFromString=function(a){goog.html.legacyconversions.reportCallback_();return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(a)};
|
||||
goog.html.legacyconversions.reportCallback_=goog.nullFunction;goog.html.legacyconversions.setReportCallback=function(a){goog.html.legacyconversions.reportCallback_=a};goog.math.Coordinate=function(a,b){this.x=goog.isDef(a)?a:0;this.y=goog.isDef(b)?b:0};goog.math.Coordinate.prototype.clone=function(){return new goog.math.Coordinate(this.x,this.y)};goog.DEBUG&&(goog.math.Coordinate.prototype.toString=function(){return"("+this.x+", "+this.y+")"});goog.math.Coordinate.equals=function(a,b){return a==b?!0:a&&b?a.x==b.x&&a.y==b.y:!1};goog.math.Coordinate.distance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};
|
||||
goog.dom.safe.openInWindow=function(a,b,c,d,e){a=a instanceof goog.html.SafeUrl?a:goog.html.SafeUrl.sanitize(a);return(b||window).open(goog.html.SafeUrl.unwrap(a),c?goog.string.Const.unwrap(c):"",d,e)};goog.math.Coordinate=function(a,b){this.x=goog.isDef(a)?a:0;this.y=goog.isDef(b)?b:0};goog.math.Coordinate.prototype.clone=function(){return new goog.math.Coordinate(this.x,this.y)};goog.DEBUG&&(goog.math.Coordinate.prototype.toString=function(){return"("+this.x+", "+this.y+")"});goog.math.Coordinate.equals=function(a,b){return a==b?!0:a&&b?a.x==b.x&&a.y==b.y:!1};goog.math.Coordinate.distance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};
|
||||
goog.math.Coordinate.magnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)};goog.math.Coordinate.azimuth=function(a){return goog.math.angle(0,0,a.x,a.y)};goog.math.Coordinate.squaredDistance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d};goog.math.Coordinate.difference=function(a,b){return new goog.math.Coordinate(a.x-b.x,a.y-b.y)};goog.math.Coordinate.sum=function(a,b){return new goog.math.Coordinate(a.x+b.x,a.y+b.y)};
|
||||
goog.math.Coordinate.prototype.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};goog.math.Coordinate.prototype.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};goog.math.Coordinate.prototype.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
|
||||
goog.math.Coordinate.prototype.translate=function(a,b){a instanceof goog.math.Coordinate?(this.x+=a.x,this.y+=a.y):(this.x+=Number(a),goog.isNumber(b)&&(this.y+=b));return this};goog.math.Coordinate.prototype.scale=function(a,b){var c=goog.isNumber(b)?b:a;this.x*=a;this.y*=c;return this};goog.math.Coordinate.prototype.rotateRadians=function(a,b){var c=b||new goog.math.Coordinate(0,0),d=this.x,e=this.y,f=Math.cos(a),g=Math.sin(a);this.x=(d-c.x)*f-(e-c.y)*g+c.x;this.y=(d-c.x)*g+(e-c.y)*f+c.y};
|
||||
@@ -219,7 +221,7 @@ goog.math.Size.prototype.fitsInside=function(a){return this.width<=a.width&&this
|
||||
goog.math.Size.prototype.scaleToCover=function(a){a=this.aspectRatio()<=a.aspectRatio()?a.width/this.width:a.height/this.height;return this.scale(a)};goog.math.Size.prototype.scaleToFit=function(a){a=this.aspectRatio()>a.aspectRatio()?a.width/this.width:a.height/this.height;return this.scale(a)};goog.dom.ASSUME_QUIRKS_MODE=!1;goog.dom.ASSUME_STANDARDS_MODE=!1;goog.dom.COMPAT_MODE_KNOWN_=goog.dom.ASSUME_QUIRKS_MODE||goog.dom.ASSUME_STANDARDS_MODE;goog.dom.getDomHelper=function(a){return a?new goog.dom.DomHelper(goog.dom.getOwnerDocument(a)):goog.dom.defaultDomHelper_||(goog.dom.defaultDomHelper_=new goog.dom.DomHelper)};goog.dom.getDocument=function(){return document};goog.dom.getElement=function(a){return goog.dom.getElementHelper_(document,a)};
|
||||
goog.dom.getElementHelper_=function(a,b){return goog.isString(b)?a.getElementById(b):b};goog.dom.getRequiredElement=function(a){return goog.dom.getRequiredElementHelper_(document,a)};goog.dom.getRequiredElementHelper_=function(a,b){goog.asserts.assertString(b);var c=goog.dom.getElementHelper_(a,b);return c=goog.asserts.assertElement(c,"No element found with id: "+b)};goog.dom.$=goog.dom.getElement;
|
||||
goog.dom.getElementsByTagNameAndClass=function(a,b,c){return goog.dom.getElementsByTagNameAndClass_(document,a,b,c)};goog.dom.getElementsByClass=function(a,b){var c=b||document;return goog.dom.canUseQuerySelector_(c)?c.querySelectorAll("."+a):goog.dom.getElementsByTagNameAndClass_(document,"*",a,b)};
|
||||
goog.dom.getElementByClass=function(a,b){var c=b||document,d=null;return(d=c.getElementsByClassName?c.getElementsByClassName(a)[0]:goog.dom.canUseQuerySelector_(c)?c.querySelector("."+a):goog.dom.getElementsByTagNameAndClass_(document,"*",a,b)[0])||null};goog.dom.getRequiredElementByClass=function(a,b){var c=goog.dom.getElementByClass(a,b);return goog.asserts.assert(c,"No element found with className: "+a)};goog.dom.canUseQuerySelector_=function(a){return!(!a.querySelectorAll||!a.querySelector)};
|
||||
goog.dom.getElementByClass=function(a,b){var c=b||document;return(c.getElementsByClassName?c.getElementsByClassName(a)[0]:goog.dom.canUseQuerySelector_(c)?c.querySelector("."+a):goog.dom.getElementsByTagNameAndClass_(document,"*",a,b)[0])||null};goog.dom.getRequiredElementByClass=function(a,b){var c=goog.dom.getElementByClass(a,b);return goog.asserts.assert(c,"No element found with className: "+a)};goog.dom.canUseQuerySelector_=function(a){return!(!a.querySelectorAll||!a.querySelector)};
|
||||
goog.dom.getElementsByTagNameAndClass_=function(a,b,c,d){a=d||a;b=b&&"*"!=b?b.toUpperCase():"";if(goog.dom.canUseQuerySelector_(a)&&(b||c))return a.querySelectorAll(b+(c?"."+c:""));if(c&&a.getElementsByClassName){a=a.getElementsByClassName(c);if(b){d={};for(var e=0,f=0,g;g=a[f];f++)b==g.nodeName&&(d[e++]=g);d.length=e;return d}return a}a=a.getElementsByTagName(b||"*");if(c){d={};for(f=e=0;g=a[f];f++)b=g.className,"function"==typeof b.split&&goog.array.contains(b.split(/\s+/),c)&&(d[e++]=g);d.length=
|
||||
e;return d}return a};goog.dom.$$=goog.dom.getElementsByTagNameAndClass;goog.dom.setProperties=function(a,b){goog.object.forEach(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:goog.dom.DIRECT_ATTRIBUTE_MAP_.hasOwnProperty(d)?a.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[d],b):goog.string.startsWith(d,"aria-")||goog.string.startsWith(d,"data-")?a.setAttribute(d,b):a[d]=b})};
|
||||
goog.dom.DIRECT_ATTRIBUTE_MAP_={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};goog.dom.getViewportSize=function(a){return goog.dom.getViewportSize_(a||window)};goog.dom.getViewportSize_=function(a){a=a.document;a=goog.dom.isCss1CompatMode_(a)?a.documentElement:a.body;return new goog.math.Size(a.clientWidth,a.clientHeight)};
|
||||
@@ -229,8 +231,8 @@ goog.dom.getDocumentScroll=function(){return goog.dom.getDocumentScroll_(documen
|
||||
goog.dom.getDocumentScrollElement_=function(a){return a.scrollingElement?a.scrollingElement:!goog.userAgent.WEBKIT&&goog.dom.isCss1CompatMode_(a)?a.documentElement:a.body||a.documentElement};goog.dom.getWindow=function(a){return a?goog.dom.getWindow_(a):window};goog.dom.getWindow_=function(a){return a.parentWindow||a.defaultView};goog.dom.createDom=function(a,b,c){return goog.dom.createDom_(document,arguments)};
|
||||
goog.dom.createDom_=function(a,b){var c=b[0],d=b[1];if(!goog.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',goog.string.htmlEscape(d.name),'"');if(d.type){c.push(' type="',goog.string.htmlEscape(d.type),'"');var e={};goog.object.extend(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(goog.isString(d)?c.className=d:goog.isArray(d)?c.className=d.join(" "):goog.dom.setProperties(c,d));2<b.length&&goog.dom.append_(a,
|
||||
c,b,2);return c};goog.dom.append_=function(a,b,c,d){function e(c){c&&b.appendChild(goog.isString(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var f=c[d];goog.isArrayLike(f)&&!goog.dom.isNodeLike(f)?goog.array.forEach(goog.dom.isNodeList(f)?goog.array.toArray(f):f,e):e(f)}};goog.dom.$dom=goog.dom.createDom;goog.dom.createElement=function(a){return document.createElement(a)};goog.dom.createTextNode=function(a){return document.createTextNode(String(a))};
|
||||
goog.dom.createTable=function(a,b,c){return goog.dom.createTable_(document,a,b,!!c)};goog.dom.createTable_=function(a,b,c,d){for(var e=a.createElement(goog.dom.TagName.TABLE),f=e.appendChild(a.createElement(goog.dom.TagName.TBODY)),g=0;g<b;g++){for(var h=a.createElement(goog.dom.TagName.TR),k=0;k<c;k++){var l=a.createElement(goog.dom.TagName.TD);d&&goog.dom.setTextContent(l,goog.string.Unicode.NBSP);h.appendChild(l)}f.appendChild(h)}return e};
|
||||
goog.dom.safeHtmlToNode=function(a){return goog.dom.safeHtmlToNode_(document,a)};goog.dom.safeHtmlToNode_=function(a,b){var c=a.createElement(goog.dom.TagName.DIV);goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT?(goog.dom.safe.setInnerHtml(c,goog.html.SafeHtml.concat(goog.html.SafeHtml.BR,b)),c.removeChild(c.firstChild)):goog.dom.safe.setInnerHtml(c,b);return goog.dom.childrenToNode_(a,c)};goog.dom.htmlToDocumentFragment=function(a){return goog.dom.safeHtmlToNode_(document,goog.html.legacyconversions.safeHtmlFromString(a))};
|
||||
goog.dom.createTable=function(a,b,c){return goog.dom.createTable_(document,a,b,!!c)};goog.dom.createTable_=function(a,b,c,d){for(var e=a.createElement(goog.dom.TagName.TABLE),f=e.appendChild(a.createElement(goog.dom.TagName.TBODY)),g=0;g<b;g++){for(var h=a.createElement(goog.dom.TagName.TR),k=0;k<c;k++){var m=a.createElement(goog.dom.TagName.TD);d&&goog.dom.setTextContent(m,goog.string.Unicode.NBSP);h.appendChild(m)}f.appendChild(h)}return e};
|
||||
goog.dom.safeHtmlToNode=function(a){return goog.dom.safeHtmlToNode_(document,a)};goog.dom.safeHtmlToNode_=function(a,b){var c=a.createElement(goog.dom.TagName.DIV);goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT?(goog.dom.safe.setInnerHtml(c,goog.html.SafeHtml.concat(goog.html.SafeHtml.BR,b)),c.removeChild(c.firstChild)):goog.dom.safe.setInnerHtml(c,b);return goog.dom.childrenToNode_(a,c)};
|
||||
goog.dom.childrenToNode_=function(a,b){if(1==b.childNodes.length)return b.removeChild(b.firstChild);for(var c=a.createDocumentFragment();b.firstChild;)c.appendChild(b.firstChild);return c};goog.dom.isCss1CompatMode=function(){return goog.dom.isCss1CompatMode_(document)};goog.dom.isCss1CompatMode_=function(a){return goog.dom.COMPAT_MODE_KNOWN_?goog.dom.ASSUME_STANDARDS_MODE:"CSS1Compat"==a.compatMode};goog.dom.canHaveChildren=function(a){if(a.nodeType!=goog.dom.NodeType.ELEMENT)return!1;switch(a.tagName){case goog.dom.TagName.APPLET:case goog.dom.TagName.AREA:case goog.dom.TagName.BASE:case goog.dom.TagName.BR:case goog.dom.TagName.COL:case goog.dom.TagName.COMMAND:case goog.dom.TagName.EMBED:case goog.dom.TagName.FRAME:case goog.dom.TagName.HR:case goog.dom.TagName.IMG:case goog.dom.TagName.INPUT:case goog.dom.TagName.IFRAME:case goog.dom.TagName.ISINDEX:case goog.dom.TagName.KEYGEN:case goog.dom.TagName.LINK:case goog.dom.TagName.NOFRAMES:case goog.dom.TagName.NOSCRIPT:case goog.dom.TagName.META:case goog.dom.TagName.OBJECT:case goog.dom.TagName.PARAM:case goog.dom.TagName.SCRIPT:case goog.dom.TagName.SOURCE:case goog.dom.TagName.STYLE:case goog.dom.TagName.TRACK:case goog.dom.TagName.WBR:return!1}return!0};
|
||||
goog.dom.appendChild=function(a,b){a.appendChild(b)};goog.dom.append=function(a,b){goog.dom.append_(goog.dom.getOwnerDocument(a),a,arguments,1)};goog.dom.removeChildren=function(a){for(var b;b=a.firstChild;)a.removeChild(b)};goog.dom.insertSiblingBefore=function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b)};goog.dom.insertSiblingAfter=function(a,b){b.parentNode&&b.parentNode.insertBefore(a,b.nextSibling)};goog.dom.insertChildAt=function(a,b,c){a.insertBefore(b,a.childNodes[c]||null)};
|
||||
goog.dom.removeNode=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null};goog.dom.replaceNode=function(a,b){var c=b.parentNode;c&&c.replaceChild(a,b)};goog.dom.flattenElement=function(a){var b,c=a.parentNode;if(c&&c.nodeType!=goog.dom.NodeType.DOCUMENT_FRAGMENT){if(a.removeNode)return a.removeNode(!1);for(;b=a.firstChild;)c.insertBefore(b,a);return goog.dom.removeNode(a)}};
|
||||
@@ -260,15 +262,17 @@ goog.dom.DomHelper=function(a){this.document_=a||goog.global.document||document}
|
||||
goog.dom.DomHelper.prototype.getRequiredElement=function(a){return goog.dom.getRequiredElementHelper_(this.document_,a)};goog.dom.DomHelper.prototype.$=goog.dom.DomHelper.prototype.getElement;goog.dom.DomHelper.prototype.getElementsByTagNameAndClass=function(a,b,c){return goog.dom.getElementsByTagNameAndClass_(this.document_,a,b,c)};goog.dom.DomHelper.prototype.getElementsByClass=function(a,b){return goog.dom.getElementsByClass(a,b||this.document_)};
|
||||
goog.dom.DomHelper.prototype.getElementByClass=function(a,b){return goog.dom.getElementByClass(a,b||this.document_)};goog.dom.DomHelper.prototype.getRequiredElementByClass=function(a,b){return goog.dom.getRequiredElementByClass(a,b||this.document_)};goog.dom.DomHelper.prototype.$$=goog.dom.DomHelper.prototype.getElementsByTagNameAndClass;goog.dom.DomHelper.prototype.setProperties=goog.dom.setProperties;goog.dom.DomHelper.prototype.getViewportSize=function(a){return goog.dom.getViewportSize(a||this.getWindow())};
|
||||
goog.dom.DomHelper.prototype.getDocumentHeight=function(){return goog.dom.getDocumentHeight_(this.getWindow())};goog.dom.DomHelper.prototype.createDom=function(a,b,c){return goog.dom.createDom_(this.document_,arguments)};goog.dom.DomHelper.prototype.$dom=goog.dom.DomHelper.prototype.createDom;goog.dom.DomHelper.prototype.createElement=function(a){return this.document_.createElement(a)};goog.dom.DomHelper.prototype.createTextNode=function(a){return this.document_.createTextNode(String(a))};
|
||||
goog.dom.DomHelper.prototype.createTable=function(a,b,c){return goog.dom.createTable_(this.document_,a,b,!!c)};goog.dom.DomHelper.prototype.safeHtmlToNode=function(a){return goog.dom.safeHtmlToNode_(this.document_,a)};goog.dom.DomHelper.prototype.htmlToDocumentFragment=function(a){return goog.dom.safeHtmlToNode_(this.document_,goog.html.legacyconversions.safeHtmlFromString(a))};goog.dom.DomHelper.prototype.isCss1CompatMode=function(){return goog.dom.isCss1CompatMode_(this.document_)};
|
||||
goog.dom.DomHelper.prototype.getWindow=function(){return goog.dom.getWindow_(this.document_)};goog.dom.DomHelper.prototype.getDocumentScrollElement=function(){return goog.dom.getDocumentScrollElement_(this.document_)};goog.dom.DomHelper.prototype.getDocumentScroll=function(){return goog.dom.getDocumentScroll_(this.document_)};goog.dom.DomHelper.prototype.getActiveElement=function(a){return goog.dom.getActiveElement(a||this.document_)};goog.dom.DomHelper.prototype.appendChild=goog.dom.appendChild;
|
||||
goog.dom.DomHelper.prototype.append=goog.dom.append;goog.dom.DomHelper.prototype.canHaveChildren=goog.dom.canHaveChildren;goog.dom.DomHelper.prototype.removeChildren=goog.dom.removeChildren;goog.dom.DomHelper.prototype.insertSiblingBefore=goog.dom.insertSiblingBefore;goog.dom.DomHelper.prototype.insertSiblingAfter=goog.dom.insertSiblingAfter;goog.dom.DomHelper.prototype.insertChildAt=goog.dom.insertChildAt;goog.dom.DomHelper.prototype.removeNode=goog.dom.removeNode;
|
||||
goog.dom.DomHelper.prototype.replaceNode=goog.dom.replaceNode;goog.dom.DomHelper.prototype.flattenElement=goog.dom.flattenElement;goog.dom.DomHelper.prototype.getChildren=goog.dom.getChildren;goog.dom.DomHelper.prototype.getFirstElementChild=goog.dom.getFirstElementChild;goog.dom.DomHelper.prototype.getLastElementChild=goog.dom.getLastElementChild;goog.dom.DomHelper.prototype.getNextElementSibling=goog.dom.getNextElementSibling;goog.dom.DomHelper.prototype.getPreviousElementSibling=goog.dom.getPreviousElementSibling;
|
||||
goog.dom.DomHelper.prototype.getNextNode=goog.dom.getNextNode;goog.dom.DomHelper.prototype.getPreviousNode=goog.dom.getPreviousNode;goog.dom.DomHelper.prototype.isNodeLike=goog.dom.isNodeLike;goog.dom.DomHelper.prototype.isElement=goog.dom.isElement;goog.dom.DomHelper.prototype.isWindow=goog.dom.isWindow;goog.dom.DomHelper.prototype.getParentElement=goog.dom.getParentElement;goog.dom.DomHelper.prototype.contains=goog.dom.contains;goog.dom.DomHelper.prototype.compareNodeOrder=goog.dom.compareNodeOrder;
|
||||
goog.dom.DomHelper.prototype.findCommonAncestor=goog.dom.findCommonAncestor;goog.dom.DomHelper.prototype.getOwnerDocument=goog.dom.getOwnerDocument;goog.dom.DomHelper.prototype.getFrameContentDocument=goog.dom.getFrameContentDocument;goog.dom.DomHelper.prototype.getFrameContentWindow=goog.dom.getFrameContentWindow;goog.dom.DomHelper.prototype.setTextContent=goog.dom.setTextContent;goog.dom.DomHelper.prototype.getOuterHtml=goog.dom.getOuterHtml;goog.dom.DomHelper.prototype.findNode=goog.dom.findNode;
|
||||
goog.dom.DomHelper.prototype.findNodes=goog.dom.findNodes;goog.dom.DomHelper.prototype.isFocusableTabIndex=goog.dom.isFocusableTabIndex;goog.dom.DomHelper.prototype.setFocusableTabIndex=goog.dom.setFocusableTabIndex;goog.dom.DomHelper.prototype.isFocusable=goog.dom.isFocusable;goog.dom.DomHelper.prototype.getTextContent=goog.dom.getTextContent;goog.dom.DomHelper.prototype.getNodeTextLength=goog.dom.getNodeTextLength;goog.dom.DomHelper.prototype.getNodeTextOffset=goog.dom.getNodeTextOffset;
|
||||
goog.dom.DomHelper.prototype.getNodeAtOffset=goog.dom.getNodeAtOffset;goog.dom.DomHelper.prototype.isNodeList=goog.dom.isNodeList;goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass=goog.dom.getAncestorByTagNameAndClass;goog.dom.DomHelper.prototype.getAncestorByClass=goog.dom.getAncestorByClass;goog.dom.DomHelper.prototype.getAncestor=goog.dom.getAncestor;goog.dom.vendor={};goog.dom.vendor.getVendorJsPrefix=function(){return goog.userAgent.WEBKIT?"Webkit":goog.userAgent.GECKO?"Moz":goog.userAgent.IE?"ms":goog.userAgent.OPERA?"O":null};goog.dom.vendor.getVendorPrefix=function(){return goog.userAgent.WEBKIT?"-webkit":goog.userAgent.GECKO?"-moz":goog.userAgent.IE?"-ms":goog.userAgent.OPERA?"-o":null};
|
||||
goog.dom.vendor.getPrefixedPropertyName=function(a,b){if(b&&a in b)return a;var c=goog.dom.vendor.getVendorJsPrefix();return c?(c=c.toLowerCase(),c+=goog.string.toTitleCase(a),!goog.isDef(b)||c in b?c:null):null};goog.dom.vendor.getPrefixedEventType=function(a){return((goog.dom.vendor.getVendorJsPrefix()||"")+a).toLowerCase()};goog.math.Box=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d};goog.math.Box.boundingBox=function(a){for(var b=new goog.math.Box(arguments[0].y,arguments[0].x,arguments[0].y,arguments[0].x),c=1;c<arguments.length;c++)b.expandToIncludeCoordinate(arguments[c]);return b};goog.math.Box.prototype.getWidth=function(){return this.right-this.left};goog.math.Box.prototype.getHeight=function(){return this.bottom-this.top};
|
||||
goog.dom.DomHelper.prototype.createTable=function(a,b,c){return goog.dom.createTable_(this.document_,a,b,!!c)};goog.dom.DomHelper.prototype.safeHtmlToNode=function(a){return goog.dom.safeHtmlToNode_(this.document_,a)};goog.dom.DomHelper.prototype.isCss1CompatMode=function(){return goog.dom.isCss1CompatMode_(this.document_)};goog.dom.DomHelper.prototype.getWindow=function(){return goog.dom.getWindow_(this.document_)};goog.dom.DomHelper.prototype.getDocumentScrollElement=function(){return goog.dom.getDocumentScrollElement_(this.document_)};
|
||||
goog.dom.DomHelper.prototype.getDocumentScroll=function(){return goog.dom.getDocumentScroll_(this.document_)};goog.dom.DomHelper.prototype.getActiveElement=function(a){return goog.dom.getActiveElement(a||this.document_)};goog.dom.DomHelper.prototype.appendChild=goog.dom.appendChild;goog.dom.DomHelper.prototype.append=goog.dom.append;goog.dom.DomHelper.prototype.canHaveChildren=goog.dom.canHaveChildren;goog.dom.DomHelper.prototype.removeChildren=goog.dom.removeChildren;
|
||||
goog.dom.DomHelper.prototype.insertSiblingBefore=goog.dom.insertSiblingBefore;goog.dom.DomHelper.prototype.insertSiblingAfter=goog.dom.insertSiblingAfter;goog.dom.DomHelper.prototype.insertChildAt=goog.dom.insertChildAt;goog.dom.DomHelper.prototype.removeNode=goog.dom.removeNode;goog.dom.DomHelper.prototype.replaceNode=goog.dom.replaceNode;goog.dom.DomHelper.prototype.flattenElement=goog.dom.flattenElement;goog.dom.DomHelper.prototype.getChildren=goog.dom.getChildren;
|
||||
goog.dom.DomHelper.prototype.getFirstElementChild=goog.dom.getFirstElementChild;goog.dom.DomHelper.prototype.getLastElementChild=goog.dom.getLastElementChild;goog.dom.DomHelper.prototype.getNextElementSibling=goog.dom.getNextElementSibling;goog.dom.DomHelper.prototype.getPreviousElementSibling=goog.dom.getPreviousElementSibling;goog.dom.DomHelper.prototype.getNextNode=goog.dom.getNextNode;goog.dom.DomHelper.prototype.getPreviousNode=goog.dom.getPreviousNode;
|
||||
goog.dom.DomHelper.prototype.isNodeLike=goog.dom.isNodeLike;goog.dom.DomHelper.prototype.isElement=goog.dom.isElement;goog.dom.DomHelper.prototype.isWindow=goog.dom.isWindow;goog.dom.DomHelper.prototype.getParentElement=goog.dom.getParentElement;goog.dom.DomHelper.prototype.contains=goog.dom.contains;goog.dom.DomHelper.prototype.compareNodeOrder=goog.dom.compareNodeOrder;goog.dom.DomHelper.prototype.findCommonAncestor=goog.dom.findCommonAncestor;goog.dom.DomHelper.prototype.getOwnerDocument=goog.dom.getOwnerDocument;
|
||||
goog.dom.DomHelper.prototype.getFrameContentDocument=goog.dom.getFrameContentDocument;goog.dom.DomHelper.prototype.getFrameContentWindow=goog.dom.getFrameContentWindow;goog.dom.DomHelper.prototype.setTextContent=goog.dom.setTextContent;goog.dom.DomHelper.prototype.getOuterHtml=goog.dom.getOuterHtml;goog.dom.DomHelper.prototype.findNode=goog.dom.findNode;goog.dom.DomHelper.prototype.findNodes=goog.dom.findNodes;goog.dom.DomHelper.prototype.isFocusableTabIndex=goog.dom.isFocusableTabIndex;
|
||||
goog.dom.DomHelper.prototype.setFocusableTabIndex=goog.dom.setFocusableTabIndex;goog.dom.DomHelper.prototype.isFocusable=goog.dom.isFocusable;goog.dom.DomHelper.prototype.getTextContent=goog.dom.getTextContent;goog.dom.DomHelper.prototype.getNodeTextLength=goog.dom.getNodeTextLength;goog.dom.DomHelper.prototype.getNodeTextOffset=goog.dom.getNodeTextOffset;goog.dom.DomHelper.prototype.getNodeAtOffset=goog.dom.getNodeAtOffset;goog.dom.DomHelper.prototype.isNodeList=goog.dom.isNodeList;
|
||||
goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass=goog.dom.getAncestorByTagNameAndClass;goog.dom.DomHelper.prototype.getAncestorByClass=goog.dom.getAncestorByClass;goog.dom.DomHelper.prototype.getAncestor=goog.dom.getAncestor;goog.dom.vendor={};goog.dom.vendor.getVendorJsPrefix=function(){return goog.userAgent.WEBKIT?"Webkit":goog.userAgent.GECKO?"Moz":goog.userAgent.IE?"ms":goog.userAgent.OPERA?"O":null};goog.dom.vendor.getVendorPrefix=function(){return goog.userAgent.WEBKIT?"-webkit":goog.userAgent.GECKO?"-moz":goog.userAgent.IE?"-ms":goog.userAgent.OPERA?"-o":null};
|
||||
goog.dom.vendor.getPrefixedPropertyName=function(a,b){if(b&&a in b)return a;var c=goog.dom.vendor.getVendorJsPrefix();return c?(c=c.toLowerCase(),c+=goog.string.toTitleCase(a),!goog.isDef(b)||c in b?c:null):null};goog.dom.vendor.getPrefixedEventType=function(a){return((goog.dom.vendor.getVendorJsPrefix()||"")+a).toLowerCase()};goog.html.legacyconversions={};goog.html.legacyconversions.safeHtmlFromString=function(a){goog.html.legacyconversions.reportCallback_();return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(a,null)};goog.html.legacyconversions.safeStyleFromString=function(a){goog.html.legacyconversions.reportCallback_();return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a)};
|
||||
goog.html.legacyconversions.safeStyleSheetFromString=function(a){goog.html.legacyconversions.reportCallback_();return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a)};goog.html.legacyconversions.safeUrlFromString=function(a){goog.html.legacyconversions.reportCallback_();return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a)};goog.html.legacyconversions.trustedResourceUrlFromString=function(a){goog.html.legacyconversions.reportCallback_();return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(a)};
|
||||
goog.html.legacyconversions.reportCallback_=goog.nullFunction;goog.html.legacyconversions.setReportCallback=function(a){goog.html.legacyconversions.reportCallback_=a};goog.math.Box=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d};goog.math.Box.boundingBox=function(a){for(var b=new goog.math.Box(arguments[0].y,arguments[0].x,arguments[0].y,arguments[0].x),c=1;c<arguments.length;c++)b.expandToIncludeCoordinate(arguments[c]);return b};goog.math.Box.prototype.getWidth=function(){return this.right-this.left};goog.math.Box.prototype.getHeight=function(){return this.bottom-this.top};
|
||||
goog.math.Box.prototype.clone=function(){return new goog.math.Box(this.top,this.right,this.bottom,this.left)};goog.DEBUG&&(goog.math.Box.prototype.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"});goog.math.Box.prototype.contains=function(a){return goog.math.Box.contains(this,a)};
|
||||
goog.math.Box.prototype.expand=function(a,b,c,d){goog.isObject(a)?(this.top-=a.top,this.right+=a.right,this.bottom+=a.bottom,this.left-=a.left):(this.top-=a,this.right+=Number(b),this.bottom+=Number(c),this.left-=Number(d));return this};goog.math.Box.prototype.expandToInclude=function(a){this.left=Math.min(this.left,a.left);this.top=Math.min(this.top,a.top);this.right=Math.max(this.right,a.right);this.bottom=Math.max(this.bottom,a.bottom)};
|
||||
goog.math.Box.prototype.expandToIncludeCoordinate=function(a){this.top=Math.min(this.top,a.y);this.right=Math.max(this.right,a.x);this.bottom=Math.max(this.bottom,a.y);this.left=Math.min(this.left,a.x)};goog.math.Box.equals=function(a,b){return a==b?!0:a&&b?a.top==b.top&&a.right==b.right&&a.bottom==b.bottom&&a.left==b.left:!1};
|
||||
@@ -313,7 +317,7 @@ goog.style.getBounds=function(a){var b=goog.style.getPageOffset(a);a=goog.style.
|
||||
goog.style.getOpacity=function(a){goog.asserts.assert(a);var b=a.style;a="";"opacity"in b?a=b.opacity:"MozOpacity"in b?a=b.MozOpacity:"filter"in b&&(b=b.filter.match(/alpha\(opacity=([\d.]+)\)/))&&(a=String(b[1]/100));return""==a?a:Number(a)};goog.style.setOpacity=function(a,b){goog.asserts.assert(a);var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity="+100*Number(b)+")")};
|
||||
goog.style.setTransparentBackgroundImage=function(a,b){var c=a.style;goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?c.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+b+'", sizingMethod="crop")':(c.backgroundImage="url("+b+")",c.backgroundPosition="top left",c.backgroundRepeat="no-repeat")};goog.style.clearTransparentBackgroundImage=function(a){a=a.style;"filter"in a?a.filter="":a.backgroundImage="none"};
|
||||
goog.style.showElement=function(a,b){goog.style.setElementShown(a,b)};goog.style.setElementShown=function(a,b){a.style.display=b?"":"none"};goog.style.isElementShown=function(a){return"none"!=a.style.display};goog.style.installStyles=function(a,b){return goog.style.installSafeStyleSheet(goog.html.legacyconversions.safeStyleSheetFromString(a),b)};
|
||||
goog.style.installSafeStyleSheet=function(a,b){var c=goog.dom.getDomHelper(b),d=null,e=c.getDocument();goog.userAgent.IE&&e.createStyleSheet?(d=e.createStyleSheet(),goog.style.setSafeStyleSheet(d,a)):(e=c.getElementsByTagNameAndClass(goog.dom.TagName.HEAD)[0],e||(d=c.getElementsByTagNameAndClass(goog.dom.TagName.BODY)[0],e=c.createDom(goog.dom.TagName.HEAD),d.parentNode.insertBefore(e,d)),d=c.createDom(goog.dom.TagName.STYLE),goog.style.setSafeStyleSheet(d,a),c.appendChild(e,d));return d};
|
||||
goog.style.installSafeStyleSheet=function(a,b){var c=goog.dom.getDomHelper(b),d,e=c.getDocument();goog.userAgent.IE&&e.createStyleSheet?(d=e.createStyleSheet(),goog.style.setSafeStyleSheet(d,a)):(e=c.getElementsByTagNameAndClass(goog.dom.TagName.HEAD)[0],e||(d=c.getElementsByTagNameAndClass(goog.dom.TagName.BODY)[0],e=c.createDom(goog.dom.TagName.HEAD),d.parentNode.insertBefore(e,d)),d=c.createDom(goog.dom.TagName.STYLE),goog.style.setSafeStyleSheet(d,a),c.appendChild(e,d));return d};
|
||||
goog.style.uninstallStyles=function(a){goog.dom.removeNode(a.ownerNode||a.owningElement||a)};goog.style.setStyles=function(a,b){goog.style.setSafeStyleSheet(a,goog.html.legacyconversions.safeStyleSheetFromString(b))};goog.style.setSafeStyleSheet=function(a,b){var c=goog.html.SafeStyleSheet.unwrap(b);goog.userAgent.IE&&goog.isDef(a.cssText)?a.cssText=c:goog.dom.setTextContent(a,c)};
|
||||
goog.style.setPreWrap=function(a){a=a.style;goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?(a.whiteSpace="pre",a.wordWrap="break-word"):a.whiteSpace=goog.userAgent.GECKO?"-moz-pre-wrap":"pre-wrap"};goog.style.setInlineBlock=function(a){a=a.style;a.position="relative";goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("8")?(a.zoom="1",a.display="inline"):a.display="inline-block"};goog.style.isRightToLeft=function(a){return"rtl"==goog.style.getStyle_(a,"direction")};
|
||||
goog.style.unselectableStyle_=goog.userAgent.GECKO?"MozUserSelect":goog.userAgent.WEBKIT||goog.userAgent.EDGE?"WebkitUserSelect":null;goog.style.isUnselectable=function(a){return goog.style.unselectableStyle_?"none"==a.style[goog.style.unselectableStyle_].toLowerCase():goog.userAgent.IE||goog.userAgent.OPERA?"on"==a.getAttribute("unselectable"):!1};
|
||||
@@ -346,11 +350,11 @@ goog.Disposable.prototype.registerDisposable=function(a){this.addOnDisposeCallba
|
||||
goog.Disposable.isDisposed=function(a){return a&&"function"==typeof a.isDisposed?a.isDisposed():!1};goog.dispose=function(a){a&&"function"==typeof a.dispose&&a.dispose()};goog.disposeAll=function(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];goog.isArrayLike(d)?goog.disposeAll.apply(null,d):goog.dispose(d)}};goog.events.EventId=function(a){this.id=a};goog.events.EventId.prototype.toString=function(){return this.id};goog.events.Event=function(a,b){this.type=a instanceof goog.events.EventId?String(a):a;this.currentTarget=this.target=b;this.defaultPrevented=this.propagationStopped_=!1;this.returnValue_=!0};goog.events.Event.prototype.stopPropagation=function(){this.propagationStopped_=!0};goog.events.Event.prototype.preventDefault=function(){this.defaultPrevented=!0;this.returnValue_=!1};goog.events.Event.stopPropagation=function(a){a.stopPropagation()};goog.events.Event.preventDefault=function(a){a.preventDefault()};goog.events.getVendorPrefixedName_=function(a){return goog.userAgent.WEBKIT?"webkit"+a:goog.userAgent.OPERA?"o"+a.toLowerCase():a.toLowerCase()};
|
||||
goog.events.EventType={CLICK:"click",RIGHTCLICK:"rightclick",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",SELECTSTART:"selectstart",WHEEL:"wheel",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",BLUR:"blur",FOCUS:"focus",DEACTIVATE:"deactivate",FOCUSIN:goog.userAgent.IE?"focusin":"DOMFocusIn",FOCUSOUT:goog.userAgent.IE?"focusout":"DOMFocusOut",CHANGE:"change",RESET:"reset",
|
||||
SELECT:"select",SUBMIT:"submit",INPUT:"input",PROPERTYCHANGE:"propertychange",DRAGSTART:"dragstart",DRAG:"drag",DRAGENTER:"dragenter",DRAGOVER:"dragover",DRAGLEAVE:"dragleave",DROP:"drop",DRAGEND:"dragend",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel",BEFOREUNLOAD:"beforeunload",CONSOLEMESSAGE:"consolemessage",CONTEXTMENU:"contextmenu",DOMCONTENTLOADED:"DOMContentLoaded",ERROR:"error",HELP:"help",LOAD:"load",LOSECAPTURE:"losecapture",ORIENTATIONCHANGE:"orientationchange",
|
||||
READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",UNLOAD:"unload",HASHCHANGE:"hashchange",PAGEHIDE:"pagehide",PAGESHOW:"pageshow",POPSTATE:"popstate",COPY:"copy",PASTE:"paste",CUT:"cut",BEFORECOPY:"beforecopy",BEFORECUT:"beforecut",BEFOREPASTE:"beforepaste",ONLINE:"online",OFFLINE:"offline",MESSAGE:"message",CONNECT:"connect",ANIMATIONSTART:goog.events.getVendorPrefixedName_("AnimationStart"),ANIMATIONEND:goog.events.getVendorPrefixedName_("AnimationEnd"),ANIMATIONITERATION:goog.events.getVendorPrefixedName_("AnimationIteration"),
|
||||
TRANSITIONEND:goog.events.getVendorPrefixedName_("TransitionEnd"),POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTERCANCEL:"pointercancel",POINTERMOVE:"pointermove",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",MSGESTURECHANGE:"MSGestureChange",MSGESTUREEND:"MSGestureEnd",MSGESTUREHOLD:"MSGestureHold",MSGESTURESTART:"MSGestureStart",MSGESTURETAP:"MSGestureTap",
|
||||
MSGOTPOINTERCAPTURE:"MSGotPointerCapture",MSINERTIASTART:"MSInertiaStart",MSLOSTPOINTERCAPTURE:"MSLostPointerCapture",MSPOINTERCANCEL:"MSPointerCancel",MSPOINTERDOWN:"MSPointerDown",MSPOINTERENTER:"MSPointerEnter",MSPOINTERHOVER:"MSPointerHover",MSPOINTERLEAVE:"MSPointerLeave",MSPOINTERMOVE:"MSPointerMove",MSPOINTEROUT:"MSPointerOut",MSPOINTEROVER:"MSPointerOver",MSPOINTERUP:"MSPointerUp",TEXT:"text",TEXTINPUT:"textInput",COMPOSITIONSTART:"compositionstart",COMPOSITIONUPDATE:"compositionupdate",COMPOSITIONEND:"compositionend",
|
||||
EXIT:"exit",LOADABORT:"loadabort",LOADCOMMIT:"loadcommit",LOADREDIRECT:"loadredirect",LOADSTART:"loadstart",LOADSTOP:"loadstop",RESPONSIVE:"responsive",SIZECHANGED:"sizechanged",UNRESPONSIVE:"unresponsive",VISIBILITYCHANGE:"visibilitychange",STORAGE:"storage",DOMSUBTREEMODIFIED:"DOMSubtreeModified",DOMNODEINSERTED:"DOMNodeInserted",DOMNODEREMOVED:"DOMNodeRemoved",DOMNODEREMOVEDFROMDOCUMENT:"DOMNodeRemovedFromDocument",DOMNODEINSERTEDINTODOCUMENT:"DOMNodeInsertedIntoDocument",DOMATTRMODIFIED:"DOMAttrModified",
|
||||
DOMCHARACTERDATAMODIFIED:"DOMCharacterDataModified",BEFOREPRINT:"beforeprint",AFTERPRINT:"afterprint"};goog.events.BrowserEvent=function(a,b){goog.events.Event.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.platformModifierKey=!1;this.event_=null;a&&this.init(a,b)};goog.inherits(goog.events.BrowserEvent,goog.events.Event);
|
||||
READYSTATECHANGE:"readystatechange",RESIZE:"resize",SCROLL:"scroll",TIMEUPDATE:"timeupdate",UNLOAD:"unload",HASHCHANGE:"hashchange",PAGEHIDE:"pagehide",PAGESHOW:"pageshow",POPSTATE:"popstate",COPY:"copy",PASTE:"paste",CUT:"cut",BEFORECOPY:"beforecopy",BEFORECUT:"beforecut",BEFOREPASTE:"beforepaste",ONLINE:"online",OFFLINE:"offline",MESSAGE:"message",CONNECT:"connect",ANIMATIONSTART:goog.events.getVendorPrefixedName_("AnimationStart"),ANIMATIONEND:goog.events.getVendorPrefixedName_("AnimationEnd"),
|
||||
ANIMATIONITERATION:goog.events.getVendorPrefixedName_("AnimationIteration"),TRANSITIONEND:goog.events.getVendorPrefixedName_("TransitionEnd"),POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTERCANCEL:"pointercancel",POINTERMOVE:"pointermove",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",MSGESTURECHANGE:"MSGestureChange",MSGESTUREEND:"MSGestureEnd",MSGESTUREHOLD:"MSGestureHold",
|
||||
MSGESTURESTART:"MSGestureStart",MSGESTURETAP:"MSGestureTap",MSGOTPOINTERCAPTURE:"MSGotPointerCapture",MSINERTIASTART:"MSInertiaStart",MSLOSTPOINTERCAPTURE:"MSLostPointerCapture",MSPOINTERCANCEL:"MSPointerCancel",MSPOINTERDOWN:"MSPointerDown",MSPOINTERENTER:"MSPointerEnter",MSPOINTERHOVER:"MSPointerHover",MSPOINTERLEAVE:"MSPointerLeave",MSPOINTERMOVE:"MSPointerMove",MSPOINTEROUT:"MSPointerOut",MSPOINTEROVER:"MSPointerOver",MSPOINTERUP:"MSPointerUp",TEXT:"text",TEXTINPUT:"textInput",COMPOSITIONSTART:"compositionstart",
|
||||
COMPOSITIONUPDATE:"compositionupdate",COMPOSITIONEND:"compositionend",EXIT:"exit",LOADABORT:"loadabort",LOADCOMMIT:"loadcommit",LOADREDIRECT:"loadredirect",LOADSTART:"loadstart",LOADSTOP:"loadstop",RESPONSIVE:"responsive",SIZECHANGED:"sizechanged",UNRESPONSIVE:"unresponsive",VISIBILITYCHANGE:"visibilitychange",STORAGE:"storage",DOMSUBTREEMODIFIED:"DOMSubtreeModified",DOMNODEINSERTED:"DOMNodeInserted",DOMNODEREMOVED:"DOMNodeRemoved",DOMNODEREMOVEDFROMDOCUMENT:"DOMNodeRemovedFromDocument",DOMNODEINSERTEDINTODOCUMENT:"DOMNodeInsertedIntoDocument",
|
||||
DOMATTRMODIFIED:"DOMAttrModified",DOMCHARACTERDATAMODIFIED:"DOMCharacterDataModified",BEFOREPRINT:"beforeprint",AFTERPRINT:"afterprint"};goog.events.BrowserEvent=function(a,b){goog.events.Event.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.platformModifierKey=!1;this.event_=null;a&&this.init(a,b)};goog.inherits(goog.events.BrowserEvent,goog.events.Event);
|
||||
goog.events.BrowserEvent.MouseButton={LEFT:0,MIDDLE:1,RIGHT:2};goog.events.BrowserEvent.IEButtonMap=[1,4,2];
|
||||
goog.events.BrowserEvent.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;e?goog.userAgent.GECKO&&(goog.reflect.canAccessProperty(e,"nodeName")||(e=null)):c==goog.events.EventType.MOUSEOVER?e=a.fromElement:c==goog.events.EventType.MOUSEOUT&&(e=a.toElement);this.relatedTarget=e;goog.isNull(d)?(this.offsetX=goog.userAgent.WEBKIT||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=
|
||||
goog.userAgent.WEBKIT||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=
|
||||
@@ -391,7 +395,7 @@ goog.async.nextTick.getSetImmediateEmulator_=function(){var a=goog.global.Messag
|
||||
b.location.protocol+"//"+b.location.host,a=goog.bind(function(a){if(("*"==d||a.origin==d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!goog.labs.userAgent.browser.isIE()){var b=new a,c={},d=c;b.port1.onmessage=function(){if(goog.isDef(c.next)){c=c.next;var a=c.cb;c.cb=null;a()}};return function(a){d.next={cb:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&
|
||||
"onreadystatechange"in document.createElement(goog.dom.TagName.SCRIPT)?function(a){var b=document.createElement(goog.dom.TagName.SCRIPT);b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){goog.global.setTimeout(a,0)}};goog.async.nextTick.wrapCallback_=goog.functions.identity;goog.debug.entryPointRegistry.register(function(a){goog.async.nextTick.wrapCallback_=a});goog.async.run=function(a,b){goog.async.run.schedule_||goog.async.run.initializeRunner_();goog.async.run.workQueueScheduled_||(goog.async.run.schedule_(),goog.async.run.workQueueScheduled_=!0);goog.async.run.workQueue_.add(a,b)};goog.async.run.initializeRunner_=function(){if(goog.global.Promise&&goog.global.Promise.resolve){var a=goog.global.Promise.resolve(void 0);goog.async.run.schedule_=function(){a.then(goog.async.run.processWorkQueue)}}else goog.async.run.schedule_=function(){goog.async.nextTick(goog.async.run.processWorkQueue)}};
|
||||
goog.async.run.forceNextTick=function(a){goog.async.run.schedule_=function(){goog.async.nextTick(goog.async.run.processWorkQueue);a&&a(goog.async.run.processWorkQueue)}};goog.async.run.workQueueScheduled_=!1;goog.async.run.workQueue_=new goog.async.WorkQueue;goog.DEBUG&&(goog.async.run.resetQueue=function(){goog.async.run.workQueueScheduled_=!1;goog.async.run.workQueue_=new goog.async.WorkQueue});
|
||||
goog.async.run.processWorkQueue=function(){for(var a=null;a=goog.async.run.workQueue_.remove();){try{a.fn.call(a.scope)}catch(b){goog.async.throwException(b)}goog.async.run.workQueue_.returnUnused(a)}goog.async.run.workQueueScheduled_=!1};goog.promise={};goog.promise.Resolver=function(){};goog.Promise=function(a,b){this.state_=goog.Promise.State_.PENDING;this.result_=void 0;this.callbackEntriesTail_=this.callbackEntries_=this.parent_=null;this.executing_=!1;0<goog.Promise.UNHANDLED_REJECTION_DELAY?this.unhandledRejectionId_=0:0==goog.Promise.UNHANDLED_REJECTION_DELAY&&(this.hadUnhandledRejection_=!1);goog.Promise.LONG_STACK_TRACES&&(this.stack_=[],this.addStackTrace_(Error("created")),this.currentStep_=0);if(a!=goog.nullFunction)try{var c=this;a.call(b,function(a){c.resolve_(goog.Promise.State_.FULFILLED,
|
||||
goog.async.run.processWorkQueue=function(){for(var a;a=goog.async.run.workQueue_.remove();){try{a.fn.call(a.scope)}catch(b){goog.async.throwException(b)}goog.async.run.workQueue_.returnUnused(a)}goog.async.run.workQueueScheduled_=!1};goog.promise={};goog.promise.Resolver=function(){};goog.Promise=function(a,b){this.state_=goog.Promise.State_.PENDING;this.result_=void 0;this.callbackEntriesTail_=this.callbackEntries_=this.parent_=null;this.executing_=!1;0<goog.Promise.UNHANDLED_REJECTION_DELAY?this.unhandledRejectionId_=0:0==goog.Promise.UNHANDLED_REJECTION_DELAY&&(this.hadUnhandledRejection_=!1);goog.Promise.LONG_STACK_TRACES&&(this.stack_=[],this.addStackTrace_(Error("created")),this.currentStep_=0);if(a!=goog.nullFunction)try{var c=this;a.call(b,function(a){c.resolve_(goog.Promise.State_.FULFILLED,
|
||||
a)},function(a){if(goog.DEBUG&&!(a instanceof goog.Promise.CancellationError))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}c.resolve_(goog.Promise.State_.REJECTED,a)})}catch(d){this.resolve_(goog.Promise.State_.REJECTED,d)}};goog.Promise.LONG_STACK_TRACES=!1;goog.Promise.UNHANDLED_REJECTION_DELAY=0;goog.Promise.State_={PENDING:0,BLOCKED:1,FULFILLED:2,REJECTED:3};
|
||||
goog.Promise.CallbackEntry_=function(){this.next=this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};goog.Promise.CallbackEntry_.prototype.reset=function(){this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};goog.Promise.DEFAULT_MAX_UNUSED=100;goog.Promise.freelist_=new goog.async.FreeList(function(){return new goog.Promise.CallbackEntry_},function(a){a.reset()},goog.Promise.DEFAULT_MAX_UNUSED);
|
||||
goog.Promise.getCallbackEntry_=function(a,b,c){var d=goog.Promise.freelist_.get();d.onFulfilled=a;d.onRejected=b;d.context=c;return d};goog.Promise.returnEntry_=function(a){goog.Promise.freelist_.put(a)};goog.Promise.resolve=function(a){if(a instanceof goog.Promise)return a;var b=new goog.Promise(goog.nullFunction);b.resolve_(goog.Promise.State_.FULFILLED,a);return b};goog.Promise.reject=function(a){return new goog.Promise(function(b,c){c(a)})};
|
||||
@@ -411,7 +415,7 @@ goog.Promise.prototype.resolve_=function(a,b){this.state_==goog.Promise.State_.P
|
||||
goog.Promise.maybeThen_=function(a,b,c,d){if(a instanceof goog.Promise)return a.thenVoid(b,c,d),!0;if(goog.Thenable.isImplementedBy(a))return a.then(b,c,d),!0;if(goog.isObject(a))try{var e=a.then;if(goog.isFunction(e))return goog.Promise.tryThen_(a,e,b,c,d),!0}catch(f){return c.call(d,f),!0}return!1};goog.Promise.tryThen_=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},h=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,h)}catch(k){h(k)}};
|
||||
goog.Promise.prototype.scheduleCallbacks_=function(){this.executing_||(this.executing_=!0,goog.async.run(this.executeCallbacks_,this))};goog.Promise.prototype.hasEntry_=function(){return!!this.callbackEntries_};goog.Promise.prototype.queueEntry_=function(a){goog.asserts.assert(null!=a.onFulfilled);this.callbackEntriesTail_?this.callbackEntriesTail_.next=a:this.callbackEntries_=a;this.callbackEntriesTail_=a};
|
||||
goog.Promise.prototype.popEntry_=function(){var a=null;this.callbackEntries_&&(a=this.callbackEntries_,this.callbackEntries_=a.next,a.next=null);this.callbackEntries_||(this.callbackEntriesTail_=null);null!=a&&goog.asserts.assert(null!=a.onFulfilled);return a};goog.Promise.prototype.removeEntryAfter_=function(a){goog.asserts.assert(this.callbackEntries_);goog.asserts.assert(null!=a);a.next==this.callbackEntriesTail_&&(this.callbackEntriesTail_=a);a.next=a.next.next};
|
||||
goog.Promise.prototype.executeCallbacks_=function(){for(var a=null;a=this.popEntry_();)goog.Promise.LONG_STACK_TRACES&&this.currentStep_++,this.executeCallback_(a,this.state_,this.result_);this.executing_=!1};
|
||||
goog.Promise.prototype.executeCallbacks_=function(){for(var a;a=this.popEntry_();)goog.Promise.LONG_STACK_TRACES&&this.currentStep_++,this.executeCallback_(a,this.state_,this.result_);this.executing_=!1};
|
||||
goog.Promise.prototype.executeCallback_=function(a,b,c){b==goog.Promise.State_.REJECTED&&a.onRejected&&!a.always&&this.removeUnhandledRejection_();if(a.child)a.child.parent_=null,goog.Promise.invokeCallback_(a,b,c);else try{a.always?a.onFulfilled.call(a.context):goog.Promise.invokeCallback_(a,b,c)}catch(d){goog.Promise.handleRejection_.call(null,d)}goog.Promise.returnEntry_(a)};
|
||||
goog.Promise.invokeCallback_=function(a,b,c){b==goog.Promise.State_.FULFILLED?a.onFulfilled.call(a.context,c):a.onRejected&&a.onRejected.call(a.context,c)};goog.Promise.prototype.addStackTrace_=function(a){if(goog.Promise.LONG_STACK_TRACES&&goog.isString(a.stack)){var b=a.stack.split("\n",4)[3];a=a.message;a+=Array(11-a.length).join(" ");this.stack_.push(a+b)}};
|
||||
goog.Promise.prototype.appendLongStack_=function(a){if(goog.Promise.LONG_STACK_TRACES&&a&&goog.isString(a.stack)&&this.stack_.length){for(var b=["Promise trace:"],c=this;c;c=c.parent_){for(var d=this.currentStep_;0<=d;d--)b.push(c.stack_[d]);b.push("Value: ["+(c.state_==goog.Promise.State_.REJECTED?"REJECTED":"FULFILLED")+"] <"+String(c.result_)+">")}a.stack+="\n\n"+b.join("\n")}};
|
||||
@@ -520,8 +524,8 @@ goog.ui.ContainerRenderer.prototype.getClassNames=function(a){var b=this.getCssC
|
||||
goog.ui.ControlRenderer.TOGGLE_ARIA_STATE_MAP_=goog.object.create(goog.a11y.aria.Role.BUTTON,goog.a11y.aria.State.PRESSED,goog.a11y.aria.Role.CHECKBOX,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.MENU_ITEM,goog.a11y.aria.State.SELECTED,goog.a11y.aria.Role.MENU_ITEM_CHECKBOX,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.MENU_ITEM_RADIO,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.RADIO,goog.a11y.aria.State.CHECKED,goog.a11y.aria.Role.TAB,goog.a11y.aria.State.SELECTED,goog.a11y.aria.Role.TREEITEM,
|
||||
goog.a11y.aria.State.SELECTED);goog.ui.ControlRenderer.prototype.getAriaRole=function(){};goog.ui.ControlRenderer.prototype.createDom=function(a){return a.getDomHelper().createDom(goog.dom.TagName.DIV,this.getClassNames(a).join(" "),a.getContent())};goog.ui.ControlRenderer.prototype.getContentElement=function(a){return a};
|
||||
goog.ui.ControlRenderer.prototype.enableClassName=function(a,b,c){if(a=a.getElement?a.getElement():a){var d=[b];goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("7")&&(d=this.getAppliedCombinedClassNames_(goog.dom.classlist.get(a),b),d.push(b));goog.dom.classlist.enableAll(a,d,c)}};goog.ui.ControlRenderer.prototype.enableExtraClassName=function(a,b,c){this.enableClassName(a,b,c)};goog.ui.ControlRenderer.prototype.canDecorate=function(a){return!0};
|
||||
goog.ui.ControlRenderer.prototype.decorate=function(a,b){b.id&&a.setId(b.id);var c=this.getContentElement(b);c&&c.firstChild?a.setContentInternal(c.firstChild.nextSibling?goog.array.clone(c.childNodes):c.firstChild):a.setContentInternal(null);var d=0,e=this.getCssClass(),f=this.getStructuralCssClass(),g=!1,h=!1,k=!1,l=goog.array.toArray(goog.dom.classlist.get(b));goog.array.forEach(l,function(a){g||a!=e?h||a!=f?d|=this.getStateFromClass(a):h=!0:(g=!0,f==e&&(h=!0));this.getStateFromClass(a)==goog.ui.Component.State.DISABLED&&
|
||||
(goog.asserts.assertElement(c),goog.dom.isFocusableTabIndex(c)&&goog.dom.setFocusableTabIndex(c,!1))},this);a.setStateInternal(d);g||(l.push(e),f==e&&(h=!0));h||l.push(f);var n=a.getExtraClassNames();n&&l.push.apply(l,n);if(goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("7")){var m=this.getAppliedCombinedClassNames_(l);0<m.length&&(l.push.apply(l,m),k=!0)}g&&h&&!n&&!k||goog.dom.classlist.set(b,l.join(" "));return b};
|
||||
goog.ui.ControlRenderer.prototype.decorate=function(a,b){b.id&&a.setId(b.id);var c=this.getContentElement(b);c&&c.firstChild?a.setContentInternal(c.firstChild.nextSibling?goog.array.clone(c.childNodes):c.firstChild):a.setContentInternal(null);var d=0,e=this.getCssClass(),f=this.getStructuralCssClass(),g=!1,h=!1,k=!1,m=goog.array.toArray(goog.dom.classlist.get(b));goog.array.forEach(m,function(a){g||a!=e?h||a!=f?d|=this.getStateFromClass(a):h=!0:(g=!0,f==e&&(h=!0));this.getStateFromClass(a)==goog.ui.Component.State.DISABLED&&
|
||||
(goog.asserts.assertElement(c),goog.dom.isFocusableTabIndex(c)&&goog.dom.setFocusableTabIndex(c,!1))},this);a.setStateInternal(d);g||(m.push(e),f==e&&(h=!0));h||m.push(f);var n=a.getExtraClassNames();n&&m.push.apply(m,n);if(goog.userAgent.IE&&!goog.userAgent.isVersionOrHigher("7")){var l=this.getAppliedCombinedClassNames_(m);0<l.length&&(m.push.apply(m,l),k=!0)}g&&h&&!n&&!k||goog.dom.classlist.set(b,m.join(" "));return b};
|
||||
goog.ui.ControlRenderer.prototype.initializeDom=function(a){a.isRightToLeft()&&this.setRightToLeft(a.getElement(),!0);a.isEnabled()&&this.setFocusable(a,a.isVisible())};goog.ui.ControlRenderer.prototype.setAriaRole=function(a,b){var c=b||this.getAriaRole();if(c){goog.asserts.assert(a,"The element passed as a first parameter cannot be null.");var d=goog.a11y.aria.getRole(a);c!=d&&goog.a11y.aria.setRole(a,c)}};
|
||||
goog.ui.ControlRenderer.prototype.setAriaStates=function(a,b){goog.asserts.assert(a);goog.asserts.assert(b);var c=a.getAriaLabel();goog.isDefAndNotNull(c)&&this.setAriaLabel(b,c);a.isVisible()||goog.a11y.aria.setState(b,goog.a11y.aria.State.HIDDEN,!a.isVisible());a.isEnabled()||this.updateAriaState(b,goog.ui.Component.State.DISABLED,!a.isEnabled());a.isSupportedState(goog.ui.Component.State.SELECTED)&&this.updateAriaState(b,goog.ui.Component.State.SELECTED,a.isSelected());a.isSupportedState(goog.ui.Component.State.CHECKED)&&
|
||||
this.updateAriaState(b,goog.ui.Component.State.CHECKED,a.isChecked());a.isSupportedState(goog.ui.Component.State.OPENED)&&this.updateAriaState(b,goog.ui.Component.State.OPENED,a.isOpen())};goog.ui.ControlRenderer.prototype.setAriaLabel=function(a,b){goog.a11y.aria.setLabel(a,b)};goog.ui.ControlRenderer.prototype.setAllowTextSelection=function(a,b){goog.style.setUnselectable(a,!b,!goog.userAgent.IE&&!goog.userAgent.OPERA)};
|
||||
@@ -645,7 +649,7 @@ goog.color.isValidColor=function(a){var b=goog.color.prependHashIfNecessaryHelpe
|
||||
goog.color.normalizeHex=function(a){if(!goog.color.isValidHexColor_(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(goog.color.hexTripletRe_,"#$1$1$2$2$3$3"));return a.toLowerCase()};goog.color.hexToRgb=function(a){a=goog.color.normalizeHex(a);var b=parseInt(a.substr(1,2),16),c=parseInt(a.substr(3,2),16);a=parseInt(a.substr(5,2),16);return[b,c,a]};
|
||||
goog.color.rgbToHex=function(a,b,c){a=Number(a);b=Number(b);c=Number(c);if(a!=(a&255)||b!=(b&255)||c!=(c&255))throw Error('"('+a+","+b+","+c+'") is not a valid RGB color');a=goog.color.prependZeroIfNecessaryHelper(a.toString(16));b=goog.color.prependZeroIfNecessaryHelper(b.toString(16));c=goog.color.prependZeroIfNecessaryHelper(c.toString(16));return"#"+a+b+c};goog.color.rgbArrayToHex=function(a){return goog.color.rgbToHex(a[0],a[1],a[2])};
|
||||
goog.color.rgbToHsl=function(a,b,c){a/=255;b/=255;c/=255;var d=Math.max(a,b,c),e=Math.min(a,b,c),f=0,g=0,h=.5*(d+e);d!=e&&(d==a?f=60*(b-c)/(d-e):d==b?f=60*(c-a)/(d-e)+120:d==c&&(f=60*(a-b)/(d-e)+240),g=0<h&&.5>=h?(d-e)/(2*h):(d-e)/(2-2*h));return[Math.round(f+360)%360,g,h]};goog.color.rgbArrayToHsl=function(a){return goog.color.rgbToHsl(a[0],a[1],a[2])};goog.color.hueToRgb_=function(a,b,c){0>c?c+=1:1<c&&--c;return 1>6*c?a+6*(b-a)*c:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a};
|
||||
goog.color.hslToRgb=function(a,b,c){var d=0,e=0,f=0;a/=360;if(0==b)d=e=f=255*c;else var g=f=0,g=.5>c?c*(1+b):c+b-b*c,f=2*c-g,d=255*goog.color.hueToRgb_(f,g,a+1/3),e=255*goog.color.hueToRgb_(f,g,a),f=255*goog.color.hueToRgb_(f,g,a-1/3);return[Math.round(d),Math.round(e),Math.round(f)]};goog.color.hslArrayToRgb=function(a){return goog.color.hslToRgb(a[0],a[1],a[2])};goog.color.validHexColorRe_=/^#(?:[0-9a-f]{3}){1,2}$/i;goog.color.isValidHexColor_=function(a){return goog.color.validHexColorRe_.test(a)};
|
||||
goog.color.hslToRgb=function(a,b,c){a/=360;if(0==b)c=b=a=255*c;else{var d,e;e=.5>c?c*(1+b):c+b-b*c;d=2*c-e;c=255*goog.color.hueToRgb_(d,e,a+1/3);b=255*goog.color.hueToRgb_(d,e,a);a=255*goog.color.hueToRgb_(d,e,a-1/3)}return[Math.round(c),Math.round(b),Math.round(a)]};goog.color.hslArrayToRgb=function(a){return goog.color.hslToRgb(a[0],a[1],a[2])};goog.color.validHexColorRe_=/^#(?:[0-9a-f]{3}){1,2}$/i;goog.color.isValidHexColor_=function(a){return goog.color.validHexColorRe_.test(a)};
|
||||
goog.color.normalizedHexColorRe_=/^#[0-9a-f]{6}$/;goog.color.isNormalizedHexColor_=function(a){return goog.color.normalizedHexColorRe_.test(a)};goog.color.rgbColorRe_=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;goog.color.isValidRgbColor_=function(a){var b=a.match(goog.color.rgbColorRe_);if(b){a=Number(b[1]);var c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};
|
||||
goog.color.prependZeroIfNecessaryHelper=function(a){return 1==a.length?"0"+a:a};goog.color.prependHashIfNecessaryHelper=function(a){return"#"==a.charAt(0)?a:"#"+a};goog.color.rgbStyle_=function(a){return"rgb("+a.join(",")+")"};
|
||||
goog.color.hsvToRgb=function(a,b,c){var d=0,e=0,f=0;if(0==b)f=e=d=c;else{var g=Math.floor(a/60),h=a/60-g;a=c*(1-b);var k=c*(1-b*h);b=c*(1-b*(1-h));switch(g){case 1:d=k;e=c;f=a;break;case 2:d=a;e=c;f=b;break;case 3:d=a;e=k;f=c;break;case 4:d=b;e=a;f=c;break;case 5:d=c;e=a;f=k;break;case 6:case 0:d=c,e=b,f=a}}return[Math.floor(d),Math.floor(e),Math.floor(f)]};
|
||||
@@ -743,10 +747,10 @@ goog.structs.Map.prototype.toObject=function(){this.cleanupKeysArray_();for(var
|
||||
goog.structs.Map.prototype.__iterator__=function(a){this.cleanupKeysArray_();var b=0,c=this.version_,d=this,e=new goog.iter.Iterator;e.next=function(){if(c!=d.version_)throw Error("The map has changed since the iterator was created");if(b>=d.keys_.length)throw goog.iter.StopIteration;var e=d.keys_[b++];return a?e:d.map_[e]};return e};goog.structs.Map.hasKey_=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};goog.structs.Set=function(a){this.map_=new goog.structs.Map;a&&this.addAll(a)};goog.structs.Set.getKey_=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+goog.getUid(a):b.substr(0,1)+a};goog.structs.Set.prototype.getCount=function(){return this.map_.getCount()};goog.structs.Set.prototype.add=function(a){this.map_.set(goog.structs.Set.getKey_(a),a)};goog.structs.Set.prototype.addAll=function(a){a=goog.structs.getValues(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};
|
||||
goog.structs.Set.prototype.removeAll=function(a){a=goog.structs.getValues(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};goog.structs.Set.prototype.remove=function(a){return this.map_.remove(goog.structs.Set.getKey_(a))};goog.structs.Set.prototype.clear=function(){this.map_.clear()};goog.structs.Set.prototype.isEmpty=function(){return this.map_.isEmpty()};goog.structs.Set.prototype.contains=function(a){return this.map_.containsKey(goog.structs.Set.getKey_(a))};
|
||||
goog.structs.Set.prototype.containsAll=function(a){return goog.structs.every(a,this.contains,this)};goog.structs.Set.prototype.intersection=function(a){var b=new goog.structs.Set;a=goog.structs.getValues(a);for(var c=0;c<a.length;c++){var d=a[c];this.contains(d)&&b.add(d)}return b};goog.structs.Set.prototype.difference=function(a){var b=this.clone();b.removeAll(a);return b};goog.structs.Set.prototype.getValues=function(){return this.map_.getValues()};goog.structs.Set.prototype.clone=function(){return new goog.structs.Set(this)};
|
||||
goog.structs.Set.prototype.equals=function(a){return this.getCount()==goog.structs.getCount(a)&&this.isSubsetOf(a)};goog.structs.Set.prototype.isSubsetOf=function(a){var b=goog.structs.getCount(a);if(this.getCount()>b)return!1;!(a instanceof goog.structs.Set)&&5<b&&(a=new goog.structs.Set(a));return goog.structs.every(this,function(b){return goog.structs.contains(a,b)})};goog.structs.Set.prototype.__iterator__=function(a){return this.map_.__iterator__(!1)};goog.debug.LOGGING_ENABLED=goog.DEBUG;goog.debug.FORCE_SLOPPY_STACKS=!1;goog.debug.catchErrors=function(a,b,c){c=c||goog.global;var d=c.onerror,e=!!b;goog.userAgent.WEBKIT&&!goog.userAgent.isVersionOrHigher("535.3")&&(e=!e);c.onerror=function(b,c,h,k,l){d&&d(b,c,h,k,l);a({message:b,fileName:c,line:h,col:k,error:l});return e}};
|
||||
goog.structs.Set.prototype.equals=function(a){return this.getCount()==goog.structs.getCount(a)&&this.isSubsetOf(a)};goog.structs.Set.prototype.isSubsetOf=function(a){var b=goog.structs.getCount(a);if(this.getCount()>b)return!1;!(a instanceof goog.structs.Set)&&5<b&&(a=new goog.structs.Set(a));return goog.structs.every(this,function(b){return goog.structs.contains(a,b)})};goog.structs.Set.prototype.__iterator__=function(a){return this.map_.__iterator__(!1)};goog.debug.LOGGING_ENABLED=goog.DEBUG;goog.debug.FORCE_SLOPPY_STACKS=!1;goog.debug.catchErrors=function(a,b,c){c=c||goog.global;var d=c.onerror,e=!!b;goog.userAgent.WEBKIT&&!goog.userAgent.isVersionOrHigher("535.3")&&(e=!e);c.onerror=function(b,c,h,k,m){d&&d(b,c,h,k,m);a({message:b,fileName:c,line:h,col:k,error:m});return e}};
|
||||
goog.debug.expose=function(a,b){if("undefined"==typeof a)return"undefined";if(null==a)return"NULL";var c=[],d;for(d in a)if(b||!goog.isFunction(a[d])){var e=d+" = ";try{e+=a[d]}catch(f){e+="*** "+f+" ***"}c.push(e)}return c.join("\n")};
|
||||
goog.debug.deepExpose=function(a,b){var c=[],d=function(a,f,g){var h=f+" ";g=new goog.structs.Set(g);try{if(goog.isDef(a))if(goog.isNull(a))c.push("NULL");else if(goog.isString(a))c.push('"'+a.replace(/\n/g,"\n"+f)+'"');else if(goog.isFunction(a))c.push(String(a).replace(/\n/g,"\n"+f));else if(goog.isObject(a))if(g.contains(a))c.push("*** reference loop detected ***");else{g.add(a);c.push("{");for(var k in a)if(b||!goog.isFunction(a[k]))c.push("\n"),c.push(h),c.push(k+" = "),d(a[k],h,g);c.push("\n"+
|
||||
f+"}")}else c.push(a);else c.push("undefined")}catch(l){c.push("*** "+l+" ***")}};d(a,"",new goog.structs.Set);return c.join("")};goog.debug.exposeArray=function(a){for(var b=[],c=0;c<a.length;c++)goog.isArray(a[c])?b.push(goog.debug.exposeArray(a[c])):b.push(a[c]);return"[ "+b.join(", ")+" ]"};goog.debug.exposeException=function(a,b){var c=goog.debug.exposeExceptionAsHtml(a,b);return goog.html.SafeHtml.unwrap(c)};
|
||||
f+"}")}else c.push(a);else c.push("undefined")}catch(m){c.push("*** "+m+" ***")}};d(a,"",new goog.structs.Set);return c.join("")};goog.debug.exposeArray=function(a){for(var b=[],c=0;c<a.length;c++)goog.isArray(a[c])?b.push(goog.debug.exposeArray(a[c])):b.push(a[c]);return"[ "+b.join(", ")+" ]"};goog.debug.exposeException=function(a,b){var c=goog.debug.exposeExceptionAsHtml(a,b);return goog.html.SafeHtml.unwrap(c)};
|
||||
goog.debug.exposeExceptionAsHtml=function(a,b){try{var c=goog.debug.normalizeErrorObject(a),d=goog.debug.createViewSourceUrl_(c.fileName);return goog.html.SafeHtml.concat(goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Message: "+c.message+"\nUrl: "),goog.html.SafeHtml.create("a",{href:d,target:"_new"},c.fileName),goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("\nLine: "+c.lineNumber+"\n\nBrowser stack:\n"+c.stack+"-> [end]\n\nJS stack traversal:\n"+goog.debug.getStacktrace(b)+
|
||||
"-> "))}catch(e){return goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Exception trying to expose exception! You win, we lose. "+e)}};
|
||||
goog.debug.createViewSourceUrl_=function(a){goog.isDefAndNotNull(a)||(a="");if(!/^https?:\/\//i.test(a))return goog.html.SafeUrl.fromConstant(goog.string.Const.from("sanitizedviewsrc"));a=goog.html.SafeUrl.sanitize(a);return goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("view-source scheme plus HTTP/HTTPS URL"),"view-source:"+goog.html.SafeUrl.unwrap(a))};
|
||||
@@ -790,7 +794,7 @@ goog.ui.tree.BaseNode.prototype.enterDocument=function(){goog.ui.tree.BaseNode.s
|
||||
goog.ui.tree.BaseNode.prototype.addChildAt=function(a,b,c){goog.asserts.assert(!a.getParent());goog.asserts.assertInstanceof(a,goog.ui.tree.BaseNode);c=this.getChildAt(b-1);var d=this.getChildAt(b);goog.ui.tree.BaseNode.superClass_.addChildAt.call(this,a,b);a.previousSibling_=c;a.nextSibling_=d;c?c.nextSibling_=a:this.firstChild_=a;d?d.previousSibling_=a:this.lastChild_=a;(b=this.getTree())&&a.setTreeInternal(b);a.setDepth_(this.getDepth()+1);if(this.getElement()&&(this.updateExpandIcon(),this.getExpanded())){b=
|
||||
this.getChildrenElement();a.getElement()||a.createDom();var e=a.getElement(),f=d&&d.getElement();b.insertBefore(e,f);this.isInDocument()&&a.enterDocument();d||(c?c.updateExpandIcon():(goog.style.setElementShown(b,!0),this.setExpanded(this.getExpanded())))}};goog.ui.tree.BaseNode.prototype.add=function(a,b){goog.asserts.assert(!b||b.getParent()==this,"Can only add nodes before siblings");a.getParent()&&a.getParent().removeChild(a);this.addChildAt(a,b?this.indexOfChild(b):this.getChildCount());return a};
|
||||
goog.ui.tree.BaseNode.prototype.removeChild=function(a,b){var c=this.getTree(),d=c?c.getSelectedItem():null;if(d==a||a.contains(d))c.hasFocus()?(this.select(),goog.Timer.callOnce(this.onTimeoutSelect_,10,this)):this.select();goog.ui.tree.BaseNode.superClass_.removeChild.call(this,a);this.lastChild_==a&&(this.lastChild_=a.previousSibling_);this.firstChild_==a&&(this.firstChild_=a.nextSibling_);a.previousSibling_&&(a.previousSibling_.nextSibling_=a.nextSibling_);a.nextSibling_&&(a.nextSibling_.previousSibling_=
|
||||
a.previousSibling_);d=a.isLastSibling();a.tree=null;a.depth_=-1;if(c&&(c.removeNode(this),this.isInDocument())){c=this.getChildrenElement();if(a.isInDocument()){var e=a.getElement();c.removeChild(e);a.exitDocument()}d&&(d=this.getLastChild())&&d.updateExpandIcon();this.hasChildren()||(c.style.display="none",this.updateExpandIcon(),this.updateIcon_())}return a};goog.ui.tree.BaseNode.prototype.remove=goog.ui.tree.BaseNode.prototype.removeChild;goog.ui.tree.BaseNode.prototype.onTimeoutSelect_=function(){this.select()};
|
||||
a.previousSibling_);d=a.isLastSibling();a.tree=null;a.depth_=-1;if(c&&(c.removeNode(a),this.isInDocument())){c=this.getChildrenElement();if(a.isInDocument()){var e=a.getElement();c.removeChild(e);a.exitDocument()}d&&(d=this.getLastChild())&&d.updateExpandIcon();this.hasChildren()||(c.style.display="none",this.updateExpandIcon(),this.updateIcon_())}return a};goog.ui.tree.BaseNode.prototype.remove=goog.ui.tree.BaseNode.prototype.removeChild;goog.ui.tree.BaseNode.prototype.onTimeoutSelect_=function(){this.select()};
|
||||
goog.ui.tree.BaseNode.prototype.getDepth=function(){var a=this.depth_;0>a&&(a=this.computeDepth_(),this.setDepth_(a));return a};goog.ui.tree.BaseNode.prototype.computeDepth_=function(){var a=this.getParent();return a?a.getDepth()+1:0};goog.ui.tree.BaseNode.prototype.setDepth_=function(a){if(a!=this.depth_){this.depth_=a;var b=this.getRowElement();if(b){var c=this.getPixelIndent_()+"px";this.isRightToLeft()?b.style.paddingRight=c:b.style.paddingLeft=c}this.forEachChild(function(b){b.setDepth_(a+1)})}};
|
||||
goog.ui.tree.BaseNode.prototype.contains=function(a){for(;a;){if(a==this)return!0;a=a.getParent()}return!1};goog.ui.tree.BaseNode.EMPTY_CHILDREN_=[];goog.ui.tree.BaseNode.prototype.getChildren=function(){var a=[];this.forEachChild(function(b){a.push(b)});return a};goog.ui.tree.BaseNode.prototype.getFirstChild=function(){return this.getChildAt(0)};goog.ui.tree.BaseNode.prototype.getLastChild=function(){return this.getChildAt(this.getChildCount()-1)};
|
||||
goog.ui.tree.BaseNode.prototype.getPreviousSibling=function(){return this.previousSibling_};goog.ui.tree.BaseNode.prototype.getNextSibling=function(){return this.nextSibling_};goog.ui.tree.BaseNode.prototype.isLastSibling=function(){return!this.nextSibling_};goog.ui.tree.BaseNode.prototype.isSelected=function(){return this.selected_};goog.ui.tree.BaseNode.prototype.select=function(){var a=this.getTree();a&&a.setSelectedItem(this)};goog.ui.tree.BaseNode.prototype.deselect=goog.nullFunction;
|
||||
@@ -832,7 +836,8 @@ goog.structs.Trie.prototype.remove=function(a){for(var b=this,c=[],d=0;d<a.lengt
|
||||
goog.structs.Trie.prototype.isEmpty=function(){return void 0===this.value_&&goog.object.isEmpty(this.childNodes_)};goog.ui.tree.TypeAhead=function(){this.nodeMap_=new goog.structs.Trie;this.buffer_="";this.matchingNodes_=this.matchingLabels_=null;this.matchingNodeIndex_=this.matchingLabelIndex_=0};goog.ui.tree.TypeAhead.Offset={DOWN:1,UP:-1};
|
||||
goog.ui.tree.TypeAhead.prototype.handleNavigation=function(a){var b=!1;switch(a.keyCode){case goog.events.KeyCodes.DOWN:case goog.events.KeyCodes.UP:a.ctrlKey&&(this.jumpTo_(a.keyCode==goog.events.KeyCodes.DOWN?goog.ui.tree.TypeAhead.Offset.DOWN:goog.ui.tree.TypeAhead.Offset.UP),b=!0);break;case goog.events.KeyCodes.BACKSPACE:a=this.buffer_.length-1;b=!0;0<a?(this.buffer_=this.buffer_.substring(0,a),this.jumpToLabel_(this.buffer_)):0==a?this.buffer_="":b=!1;break;case goog.events.KeyCodes.ESC:this.buffer_=
|
||||
"",b=!0}return b};goog.ui.tree.TypeAhead.prototype.handleTypeAheadChar=function(a){var b=!1;a.ctrlKey||a.altKey||(a=String.fromCharCode(a.charCode||a.keyCode).toLowerCase(),goog.string.isUnicodeChar(a)&&(" "!=a||this.buffer_)&&(this.buffer_+=a,b=this.jumpToLabel_(this.buffer_)));return b};
|
||||
goog.ui.tree.TypeAhead.prototype.setNodeInMap=function(a){var b=a.getText();if(b&&!goog.string.isEmptyOrWhitespace(goog.string.makeSafe(b))){var b=b.toLowerCase(),c=this.nodeMap_.get(b);c?c.push(a):this.nodeMap_.set(b,[a])}};goog.ui.tree.TypeAhead.prototype.removeNodeFromMap=function(a){var b=a.getText();if(b&&!goog.string.isEmptyOrWhitespace(goog.string.makeSafe(b))){var b=b.toLowerCase(),c=this.nodeMap_.get(b);c&&(goog.array.remove(c,a),c.length&&this.nodeMap_.remove(b))}};
|
||||
goog.ui.tree.TypeAhead.prototype.setNodeInMap=function(a){var b=a.getText();if(b&&!goog.string.isEmptyOrWhitespace(goog.string.makeSafe(b))){var b=b.toLowerCase(),c=this.nodeMap_.get(b);c?c.push(a):this.nodeMap_.set(b,[a])}};
|
||||
goog.ui.tree.TypeAhead.prototype.removeNodeFromMap=function(a){var b=a.getText();if(b&&!goog.string.isEmptyOrWhitespace(goog.string.makeSafe(b))){var b=b.toLowerCase(),c=this.nodeMap_.get(b);if(c){for(var d=a.getChildCount(),e=0;e<d;e++)this.removeNodeFromMap(a.getChildAt(e));goog.array.remove(c,a);c.length||this.nodeMap_.remove(b)}}};
|
||||
goog.ui.tree.TypeAhead.prototype.jumpToLabel_=function(a){var b=!1;(a=this.nodeMap_.getKeys(a))&&a.length&&(this.matchingLabelIndex_=this.matchingNodeIndex_=0,b=this.nodeMap_.get(a[0]),b=this.selectMatchingNode_(b))&&(this.matchingLabels_=a);return b};
|
||||
goog.ui.tree.TypeAhead.prototype.jumpTo_=function(a){var b=!1,c=this.matchingLabels_;if(c){var b=null,d=!1;if(this.matchingNodes_){var e=this.matchingNodeIndex_+a;0<=e&&e<this.matchingNodes_.length?(this.matchingNodeIndex_=e,b=this.matchingNodes_):d=!0}b||(e=this.matchingLabelIndex_+a,0<=e&&e<c.length&&(this.matchingLabelIndex_=e),c.length>this.matchingLabelIndex_&&(b=this.nodeMap_.get(c[this.matchingLabelIndex_])),b&&b.length&&d&&(this.matchingNodeIndex_=a==goog.ui.tree.TypeAhead.Offset.UP?b.length-
|
||||
1:0));if(b=this.selectMatchingNode_(b))this.matchingLabels_=c}return b};goog.ui.tree.TypeAhead.prototype.selectMatchingNode_=function(a){var b;a&&(this.matchingNodeIndex_<a.length&&(b=a[this.matchingNodeIndex_],this.matchingNodes_=a),b&&(b.reveal(),b.select()));return!!b};goog.ui.tree.TypeAhead.prototype.clear=function(){this.buffer_=""};goog.ui.tree.TreeControl=function(a,b,c){goog.ui.tree.BaseNode.call(this,a,b,c);this.setExpandedInternal(!0);this.setSelectedInternal(!0);this.selectedItem_=this;this.typeAhead_=new goog.ui.tree.TypeAhead;this.focusHandler_=this.keyHandler_=null;this.logger_=goog.log.getLogger("this");this.focused_=!1;this.focusedNode_=null;this.showRootLines_=this.showRootNode_=this.showExpandIcons_=this.showLines_=!0;if(goog.userAgent.IE)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(d){goog.log.warning(this.logger_,
|
||||
@@ -851,7 +856,7 @@ goog.ui.tree.TreeControl.prototype.enterDocument=function(){goog.ui.tree.TreeCon
|
||||
goog.ui.tree.TreeControl.prototype.attachEvents_=function(){var a=this.getElement();a.tabIndex=0;var b=this.keyHandler_=new goog.events.KeyHandler(a),c=this.focusHandler_=new goog.events.FocusHandler(a);this.getHandler().listen(c,goog.events.FocusHandler.EventType.FOCUSOUT,this.handleBlur_).listen(c,goog.events.FocusHandler.EventType.FOCUSIN,this.handleFocus_).listen(b,goog.events.KeyHandler.EventType.KEY,this.handleKeyEvent).listen(a,goog.events.EventType.MOUSEDOWN,this.handleMouseEvent_).listen(a,
|
||||
goog.events.EventType.CLICK,this.handleMouseEvent_).listen(a,goog.events.EventType.DBLCLICK,this.handleMouseEvent_)};goog.ui.tree.TreeControl.prototype.detachEvents_=function(){this.keyHandler_.dispose();this.keyHandler_=null;this.focusHandler_.dispose();this.focusHandler_=null};
|
||||
goog.ui.tree.TreeControl.prototype.handleMouseEvent_=function(a){goog.log.fine(this.logger_,"Received event "+a.type);var b=this.getNodeFromEvent_(a);if(b)switch(a.type){case goog.events.EventType.MOUSEDOWN:b.onMouseDown(a);break;case goog.events.EventType.CLICK:b.onClick_(a);break;case goog.events.EventType.DBLCLICK:b.onDoubleClick_(a)}};
|
||||
goog.ui.tree.TreeControl.prototype.handleKeyEvent=function(a){var b=!1;(b=this.typeAhead_.handleNavigation(a)||this.selectedItem_&&this.selectedItem_.onKeyDown(a)||this.typeAhead_.handleTypeAheadChar(a))&&a.preventDefault();return b};goog.ui.tree.TreeControl.prototype.getNodeFromEvent_=function(a){var b=null;for(a=a.target;null!=a;){if(b=goog.ui.tree.BaseNode.allNodes[a.id])return b;if(a==this.getElement())break;a=a.parentNode}return null};
|
||||
goog.ui.tree.TreeControl.prototype.handleKeyEvent=function(a){var b;(b=this.typeAhead_.handleNavigation(a)||this.selectedItem_&&this.selectedItem_.onKeyDown(a)||this.typeAhead_.handleTypeAheadChar(a))&&a.preventDefault();return b};goog.ui.tree.TreeControl.prototype.getNodeFromEvent_=function(a){for(var b=a.target;null!=b;){if(a=goog.ui.tree.BaseNode.allNodes[b.id])return a;if(b==this.getElement())break;b=b.parentNode}return null};
|
||||
goog.ui.tree.TreeControl.prototype.createNode=function(a){return new goog.ui.tree.TreeNode(a||goog.html.SafeHtml.EMPTY,this.getConfig(),this.getDomHelper())};goog.ui.tree.TreeControl.prototype.setNode=function(a){this.typeAhead_.setNodeInMap(a)};goog.ui.tree.TreeControl.prototype.removeNode=function(a){this.typeAhead_.removeNodeFromMap(a)};goog.ui.tree.TreeControl.prototype.clearTypeAhead=function(){this.typeAhead_.clear()};goog.ui.tree.TreeControl.defaultConfig=goog.ui.tree.BaseNode.defaultConfig;
|
||||
// Copyright 2013 Google Inc. Apache License 2.0
|
||||
var Blockly={Blocks:{}};
|
||||
@@ -880,8 +885,8 @@ this.width_+Blockly.BlockSvg.SEP_SPACE_X+Blockly.Scrollbar.scrollbarThickness&&(
|
||||
Blockly.Bubble.prototype.positionBubble_=function(){var a=this.anchorXY_.x,a=this.workspace_.RTL?a-(this.relativeLeft_+this.width_):a+this.relativeLeft_;this.bubbleGroup_.setAttribute("transform","translate("+a+","+(this.relativeTop_+this.anchorXY_.y)+")")};Blockly.Bubble.prototype.getBubbleSize=function(){return{width:this.width_,height:this.height_}};
|
||||
Blockly.Bubble.prototype.setBubbleSize=function(a,b){var c=2*Blockly.Bubble.BORDER_WIDTH;a=Math.max(a,c+45);b=Math.max(b,c+20);this.width_=a;this.height_=b;this.bubbleBack_.setAttribute("width",a);this.bubbleBack_.setAttribute("height",b);this.resizeGroup_&&(this.workspace_.RTL?this.resizeGroup_.setAttribute("transform","translate("+2*Blockly.Bubble.BORDER_WIDTH+","+(b-c)+") scale(-1 1)"):this.resizeGroup_.setAttribute("transform","translate("+(a-c)+","+(b-c)+")"));this.rendered_&&(this.autoLayout_&&
|
||||
this.layoutBubble_(),this.positionBubble_(),this.renderArrow_());this.resizeCallback_&&this.resizeCallback_()};
|
||||
Blockly.Bubble.prototype.renderArrow_=function(){var a=[],b=this.width_/2,c=this.height_/2,d=-this.relativeLeft_,e=-this.relativeTop_;if(b==d&&c==e)a.push("M "+b+","+c);else{e-=c;d-=b;this.workspace_.RTL&&(d*=-1);var f=Math.sqrt(e*e+d*d),g=Math.acos(d/f);0>e&&(g=2*Math.PI-g);var h=g+Math.PI/2;h>2*Math.PI&&(h-=2*Math.PI);var k=Math.sin(h),l=Math.cos(h),n=this.getBubbleSize(),h=(n.width+n.height)/Blockly.Bubble.ARROW_THICKNESS,h=Math.min(h,n.width,n.height)/2,n=1-Blockly.Bubble.ANCHOR_RADIUS/f,d=b+
|
||||
n*d,e=c+n*e,n=b+h*l,m=c+h*k,b=b-h*l,c=c-h*k,k=g+this.arrow_radians_;k>2*Math.PI&&(k-=2*Math.PI);g=Math.sin(k)*f/Blockly.Bubble.ARROW_BEND;f=Math.cos(k)*f/Blockly.Bubble.ARROW_BEND;a.push("M"+n+","+m);a.push("C"+(n+f)+","+(m+g)+" "+d+","+e+" "+d+","+e);a.push("C"+d+","+e+" "+(b+f)+","+(c+g)+" "+b+","+c)}a.push("z");this.bubbleArrow_.setAttribute("d",a.join(" "))};Blockly.Bubble.prototype.setColour=function(a){this.bubbleBack_.setAttribute("fill",a);this.bubbleArrow_.setAttribute("fill",a)};
|
||||
Blockly.Bubble.prototype.renderArrow_=function(){var a=[],b=this.width_/2,c=this.height_/2,d=-this.relativeLeft_,e=-this.relativeTop_;if(b==d&&c==e)a.push("M "+b+","+c);else{e-=c;d-=b;this.workspace_.RTL&&(d*=-1);var f=Math.sqrt(e*e+d*d),g=Math.acos(d/f);0>e&&(g=2*Math.PI-g);var h=g+Math.PI/2;h>2*Math.PI&&(h-=2*Math.PI);var k=Math.sin(h),m=Math.cos(h),n=this.getBubbleSize(),h=(n.width+n.height)/Blockly.Bubble.ARROW_THICKNESS,h=Math.min(h,n.width,n.height)/2,n=1-Blockly.Bubble.ANCHOR_RADIUS/f,d=b+
|
||||
n*d,e=c+n*e,n=b+h*m,l=c+h*k,b=b-h*m,c=c-h*k,k=g+this.arrow_radians_;k>2*Math.PI&&(k-=2*Math.PI);g=Math.sin(k)*f/Blockly.Bubble.ARROW_BEND;f=Math.cos(k)*f/Blockly.Bubble.ARROW_BEND;a.push("M"+n+","+l);a.push("C"+(n+f)+","+(l+g)+" "+d+","+e+" "+d+","+e);a.push("C"+d+","+e+" "+(b+f)+","+(c+g)+" "+b+","+c)}a.push("z");this.bubbleArrow_.setAttribute("d",a.join(" "))};Blockly.Bubble.prototype.setColour=function(a){this.bubbleBack_.setAttribute("fill",a);this.bubbleArrow_.setAttribute("fill",a)};
|
||||
Blockly.Bubble.prototype.dispose=function(){Blockly.Bubble.unbindDragEvents_();goog.dom.removeNode(this.bubbleGroup_);this.shape_=this.content_=this.workspace_=this.resizeGroup_=this.bubbleBack_=this.bubbleArrow_=this.bubbleGroup_=null};Blockly.Icon=function(a){this.block_=a};Blockly.Icon.prototype.collapseHidden=!0;Blockly.Icon.prototype.SIZE=17;Blockly.Icon.prototype.bubble_=null;Blockly.Icon.prototype.iconXY_=null;Blockly.Icon.prototype.createIcon=function(){this.iconGroup_||(this.iconGroup_=Blockly.createSvgElement("g",{"class":"blocklyIconGroup"},null),this.drawIcon_(this.iconGroup_),this.block_.getSvgRoot().appendChild(this.iconGroup_),Blockly.bindEvent_(this.iconGroup_,"mouseup",this,this.iconClick_),this.updateEditable())};
|
||||
Blockly.Icon.prototype.dispose=function(){goog.dom.removeNode(this.iconGroup_);this.iconGroup_=null;this.setVisible(!1);this.block_=null};Blockly.Icon.prototype.updateEditable=function(){this.block_.isInFlyout||!this.block_.isEditable()?Blockly.addClass_(this.iconGroup_,"blocklyIconGroupReadonly"):Blockly.removeClass_(this.iconGroup_,"blocklyIconGroupReadonly")};Blockly.Icon.prototype.isVisible=function(){return!!this.bubble_};
|
||||
Blockly.Icon.prototype.iconClick_=function(a){Blockly.dragMode_!=Blockly.DRAG_FREE&&(this.block_.isInFlyout||Blockly.isRightButton(a)||this.setVisible(!this.isVisible()))};Blockly.Icon.prototype.updateColour=function(){this.isVisible()&&this.bubble_.setColour(this.block_.getColour())};
|
||||
@@ -934,7 +939,7 @@ Blockly.Tooltip.showPid_=setTimeout(Blockly.Tooltip.show_,Blockly.Tooltip.HOVER_
|
||||
Blockly.Tooltip.show_=function(){Blockly.Tooltip.poisonedElement_=Blockly.Tooltip.element_;if(Blockly.Tooltip.DIV){goog.dom.removeChildren(Blockly.Tooltip.DIV);for(var a=Blockly.Tooltip.element_.tooltip;goog.isFunction(a);)a=a();for(var a=Blockly.Tooltip.wrap_(a,Blockly.Tooltip.LIMIT),a=a.split("\n"),b=0;b<a.length;b++){var c=document.createElement("div");c.appendChild(document.createTextNode(a[b]));Blockly.Tooltip.DIV.appendChild(c)}a=Blockly.Tooltip.element_.RTL;b=goog.dom.getViewportSize();Blockly.Tooltip.DIV.style.direction=
|
||||
a?"rtl":"ltr";Blockly.Tooltip.DIV.style.display="block";Blockly.Tooltip.visible=!0;var c=Blockly.Tooltip.lastX_,c=a?c-(Blockly.Tooltip.OFFSET_X+Blockly.Tooltip.DIV.offsetWidth):c+Blockly.Tooltip.OFFSET_X,d=Blockly.Tooltip.lastY_+Blockly.Tooltip.OFFSET_Y;d+Blockly.Tooltip.DIV.offsetHeight>b.height+window.scrollY&&(d-=Blockly.Tooltip.DIV.offsetHeight+2*Blockly.Tooltip.OFFSET_Y);a?c=Math.max(Blockly.Tooltip.MARGINS-window.scrollX,c):c+Blockly.Tooltip.DIV.offsetWidth>b.width+window.scrollX-2*Blockly.Tooltip.MARGINS&&
|
||||
(c=b.width-Blockly.Tooltip.DIV.offsetWidth-2*Blockly.Tooltip.MARGINS);Blockly.Tooltip.DIV.style.top=d+"px";Blockly.Tooltip.DIV.style.left=c+"px"}};
|
||||
Blockly.Tooltip.wrap_=function(a,b){if(a.length<=b)return a;for(var c=a.trim().split(/\s+/),d=0;d<c.length;d++)c[d].length>b&&(b=c[d].length);var e,d=-Infinity,f,g=1;do{e=d;f=a;for(var h=[],k=c.length/g,l=1,d=0;d<c.length-1;d++)l<(d+1.5)/k?(l++,h[d]=!0):h[d]=!1;h=Blockly.Tooltip.wrapMutate_(c,h,b);d=Blockly.Tooltip.wrapScore_(c,h,b);a=Blockly.Tooltip.wrapToText_(c,h);g++}while(d>e);return f};
|
||||
Blockly.Tooltip.wrap_=function(a,b){if(a.length<=b)return a;for(var c=a.trim().split(/\s+/),d=0;d<c.length;d++)c[d].length>b&&(b=c[d].length);var e,d=-Infinity,f,g=1;do{e=d;f=a;for(var h=[],k=c.length/g,m=1,d=0;d<c.length-1;d++)m<(d+1.5)/k?(m++,h[d]=!0):h[d]=!1;h=Blockly.Tooltip.wrapMutate_(c,h,b);d=Blockly.Tooltip.wrapScore_(c,h,b);a=Blockly.Tooltip.wrapToText_(c,h);g++}while(d>e);return f};
|
||||
Blockly.Tooltip.wrapScore_=function(a,b,c){for(var d=[0],e=[],f=0;f<a.length;f++)d[d.length-1]+=a[f].length,!0===b[f]?(d.push(0),e.push(a[f].charAt(a[f].length-1))):!1===b[f]&&d[d.length-1]++;a=Math.max.apply(Math,d);for(f=b=0;f<d.length;f++)b-=2*Math.pow(Math.abs(c-d[f]),1.5),b-=Math.pow(a-d[f],1.5),-1!=".?!".indexOf(e[f])?b+=c/3:-1!=",;)]}".indexOf(e[f])&&(b+=c/4);1<d.length&&d[d.length-1]<=d[d.length-2]&&(b+=.5);return b};
|
||||
Blockly.Tooltip.wrapMutate_=function(a,b,c){for(var d=Blockly.Tooltip.wrapScore_(a,b,c),e,f=0;f<b.length-1;f++)if(b[f]!=b[f+1]){var g=[].concat(b);g[f]=!g[f];g[f+1]=!g[f+1];var h=Blockly.Tooltip.wrapScore_(a,g,c);h>d&&(d=h,e=g)}return e?Blockly.Tooltip.wrapMutate_(a,e,c):b};Blockly.Tooltip.wrapToText_=function(a,b){for(var c=[],d=0;d<a.length;d++)c.push(a[d]),void 0!==b[d]&&c.push(b[d]?"\n":" ");return c.join("")};Blockly.FieldLabel=function(a,b){this.size_=new goog.math.Size(0,17.5);this.class_=b;this.setValue(a)};goog.inherits(Blockly.FieldLabel,Blockly.Field);Blockly.FieldLabel.prototype.EDITABLE=!1;
|
||||
Blockly.FieldLabel.prototype.init=function(){this.textElement_||(this.textElement_=Blockly.createSvgElement("text",{"class":"blocklyText",y:this.size_.height-5},null),this.class_&&Blockly.addClass_(this.textElement_,this.class_),this.visible_||(this.textElement_.style.display="none"),this.sourceBlock_.getSvgRoot().appendChild(this.textElement_),this.textElement_.tooltip=this.sourceBlock_,Blockly.Tooltip.bindMouseEvents(this.textElement_),this.updateTextNode_())};
|
||||
@@ -945,13 +950,13 @@ Blockly.Input.prototype.setVisible=function(a){var b=[];if(this.visible_==a)retu
|
||||
Blockly.Input.prototype.setAlign=function(a){this.align=a;this.sourceBlock_.rendered&&this.sourceBlock_.render();return this};Blockly.Input.prototype.init=function(){if(this.sourceBlock_.workspace.rendered)for(var a=0;a<this.fieldRow.length;a++)this.fieldRow[a].init()};Blockly.Input.prototype.dispose=function(){for(var a=0,b;b=this.fieldRow[a];a++)b.dispose();this.connection&&this.connection.dispose();this.sourceBlock_=null};Blockly.ConnectionDB=function(){};Blockly.ConnectionDB.prototype=[];Blockly.ConnectionDB.constructor=Blockly.ConnectionDB;Blockly.ConnectionDB.prototype.addConnection=function(a){if(a.inDB_)throw"Connection already in database.";if(!a.getSourceBlock().isInFlyout){var b=this.findPositionForConnection_(a);this.splice(b,0,a);a.inDB_=!0}};
|
||||
Blockly.ConnectionDB.prototype.findConnection=function(a){if(!this.length)return-1;var b=this.findPositionForConnection_(a);if(b>=this.length)return-1;for(var c=a.y_,d=b;0<=d&&this[d].y_==c;){if(this[d]==a)return d;d--}for(;b<this.length&&this[b].y_==c;){if(this[b]==a)return b;b++}return-1};
|
||||
Blockly.ConnectionDB.prototype.findPositionForConnection_=function(a){if(!this.length)return 0;for(var b=0,c=this.length;b<c;){var d=Math.floor((b+c)/2);if(this[d].y_<a.y_)b=d+1;else if(this[d].y_>a.y_)c=d;else{b=d;break}}return b};Blockly.ConnectionDB.prototype.removeConnection_=function(a){if(!a.inDB_)throw"Connection not in database.";var b=this.findConnection(a);if(-1==b)throw"Unable to find connection in connectionDB.";a.inDB_=!1;this.splice(b,1)};
|
||||
Blockly.ConnectionDB.prototype.getNeighbours=function(a,b){function c(a){var c=e-d[a].x_,g=f-d[a].y_;Math.sqrt(c*c+g*g)<=b&&l.push(d[a]);return g<b}for(var d=this,e=a.x_,f=a.y_,g=0,h=d.length-2,k=h;g<k;)d[k].y_<f?g=k:h=k,k=Math.floor((g+h)/2);var l=[],h=g=k;if(d.length){for(;0<=g&&c(g);)g--;do h++;while(h<d.length&&c(h))}return l};Blockly.ConnectionDB.prototype.isInYRange_=function(a,b,c){return Math.abs(this[a].y_-b)<=c};
|
||||
Blockly.ConnectionDB.prototype.getNeighbours=function(a,b){function c(a){var c=e-d[a].x_,g=f-d[a].y_;Math.sqrt(c*c+g*g)<=b&&m.push(d[a]);return g<b}for(var d=this,e=a.x_,f=a.y_,g=0,h=d.length-2,k=h;g<k;)d[k].y_<f?g=k:h=k,k=Math.floor((g+h)/2);var m=[],h=g=k;if(d.length){for(;0<=g&&c(g);)g--;do h++;while(h<d.length&&c(h))}return m};Blockly.ConnectionDB.prototype.isInYRange_=function(a,b,c){return Math.abs(this[a].y_-b)<=c};
|
||||
Blockly.ConnectionDB.prototype.searchForClosest=function(a,b,c){if(!this.length)return{connection:null,radius:b};var d=a.y_,e=a.x_;a.x_=e+c.x;a.y_=d+c.y;var f=this.findPositionForConnection_(a);c=null;for(var g=b,h,k=f-1;0<=k&&this.isInYRange_(k,a.y_,b);)h=this[k],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),k--;for(;f<this.length&&this.isInYRange_(f,a.y_,b);)h=this[f],a.isConnectionAllowed(h,g)&&(c=h,g=h.distanceFrom(a)),f++;a.x_=e;a.y_=d;return{connection:c,radius:g}};
|
||||
Blockly.ConnectionDB.init=function(a){var b=[];b[Blockly.INPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.OUTPUT_VALUE]=new Blockly.ConnectionDB;b[Blockly.NEXT_STATEMENT]=new Blockly.ConnectionDB;b[Blockly.PREVIOUS_STATEMENT]=new Blockly.ConnectionDB;a.connectionDBList=b};
|
||||
// Copyright 2016 Google Inc. Apache License 2.0
|
||||
Blockly.Options=function(a){var b=!!a.readOnly;if(b)var c=null,d=!1,e=!1,f=!1,g=!1,h=!1,k=!1;else c=Blockly.Options.parseToolboxTree(a.toolbox),d=!(!c||!c.getElementsByTagName("category").length),e=a.trashcan,void 0===e&&(e=d),f=a.collapse,void 0===f&&(f=d),g=a.comments,void 0===g&&(g=d),h=a.disable,void 0===h&&(h=d),k=a.sounds,void 0===k&&(k=!0);var l=!!a.rtl,n=a.horizontalLayout;void 0===n&&(n=!1);var m=a.toolboxPosition,m="end"===m?!1:!0,m=n?m?Blockly.TOOLBOX_AT_TOP:Blockly.TOOLBOX_AT_BOTTOM:m==
|
||||
l?Blockly.TOOLBOX_AT_RIGHT:Blockly.TOOLBOX_AT_LEFT,q=a.scrollbars;void 0===q&&(q=d);var p=a.css;void 0===p&&(p=!0);var r="https://blockly-demo.appspot.com/static/media/";a.media?r=a.media:a.path&&(r=a.path+"media/");this.RTL=l;this.collapse=f;this.comments=g;this.disable=h;this.readOnly=b;this.maxBlocks=a.maxBlocks||Infinity;this.pathToMedia=r;this.hasCategories=d;this.hasScrollbars=q;this.hasTrashcan=e;this.hasSounds=k;this.hasCss=p;this.horizontalLayout=n;this.languageTree=c;this.gridOptions=Blockly.Options.parseGridOptions_(a);
|
||||
this.zoomOptions=Blockly.Options.parseZoomOptions_(a);this.toolboxPosition=m};Blockly.Options.prototype.parentWorkspace=null;Blockly.Options.prototype.setMetrics=function(a){};Blockly.Options.prototype.getMetrics=function(){return null};
|
||||
Blockly.Options=function(a){var b=!!a.readOnly;if(b)var c=null,d=!1,e=!1,f=!1,g=!1,h=!1,k=!1;else c=Blockly.Options.parseToolboxTree(a.toolbox),d=!(!c||!c.getElementsByTagName("category").length),e=a.trashcan,void 0===e&&(e=d),f=a.collapse,void 0===f&&(f=d),g=a.comments,void 0===g&&(g=d),h=a.disable,void 0===h&&(h=d),k=a.sounds,void 0===k&&(k=!0);var m=!!a.rtl,n=a.horizontalLayout;void 0===n&&(n=!1);var l=a.toolboxPosition,l="end"===l?!1:!0,l=n?l?Blockly.TOOLBOX_AT_TOP:Blockly.TOOLBOX_AT_BOTTOM:l==
|
||||
m?Blockly.TOOLBOX_AT_RIGHT:Blockly.TOOLBOX_AT_LEFT,q=a.scrollbars;void 0===q&&(q=d);var p=a.css;void 0===p&&(p=!0);var r="https://blockly-demo.appspot.com/static/media/";a.media?r=a.media:a.path&&(r=a.path+"media/");this.RTL=m;this.collapse=f;this.comments=g;this.disable=h;this.readOnly=b;this.maxBlocks=a.maxBlocks||Infinity;this.pathToMedia=r;this.hasCategories=d;this.hasScrollbars=q;this.hasTrashcan=e;this.hasSounds=k;this.hasCss=p;this.horizontalLayout=n;this.languageTree=c;this.gridOptions=Blockly.Options.parseGridOptions_(a);
|
||||
this.zoomOptions=Blockly.Options.parseZoomOptions_(a);this.toolboxPosition=l};Blockly.Options.prototype.parentWorkspace=null;Blockly.Options.prototype.setMetrics=function(){};Blockly.Options.prototype.getMetrics=function(){return null};
|
||||
Blockly.Options.parseZoomOptions_=function(a){a=a.zoom||{};var b={};b.controls=void 0===a.controls?!1:!!a.controls;b.wheel=void 0===a.wheel?!1:!!a.wheel;b.startScale=void 0===a.startScale?1:parseFloat(a.startScale);b.maxScale=void 0===a.maxScale?3:parseFloat(a.maxScale);b.minScale=void 0===a.minScale?.3:parseFloat(a.minScale);b.scaleSpeed=void 0===a.scaleSpeed?1.2:parseFloat(a.scaleSpeed);return b};
|
||||
Blockly.Options.parseGridOptions_=function(a){a=a.grid||{};var b={};b.spacing=parseFloat(a.spacing)||0;b.colour=a.colour||"#888";b.length=parseFloat(a.length)||1;b.snap=0<b.spacing&&!!a.snap;return b};Blockly.Options.parseToolboxTree=function(a){a?("string"!=typeof a&&("undefined"==typeof XSLTProcessor&&a.outerHTML?a=a.outerHTML:a instanceof Element||(a=null)),"string"==typeof a&&(a=Blockly.Xml.textToDom(a))):a=null;return a};Blockly.ScrollbarPair=function(a){this.workspace_=a;this.hScroll=new Blockly.Scrollbar(a,!0,!0);this.vScroll=new Blockly.Scrollbar(a,!1,!0);this.corner_=Blockly.createSvgElement("rect",{height:Blockly.Scrollbar.scrollbarThickness,width:Blockly.Scrollbar.scrollbarThickness,"class":"blocklyScrollbarBackground"},null);Blockly.Scrollbar.insertAfter_(this.corner_,a.getBubbleCanvas())};Blockly.ScrollbarPair.prototype.oldHostMetrics_=null;
|
||||
Blockly.ScrollbarPair.prototype.dispose=function(){goog.dom.removeNode(this.corner_);this.oldHostMetrics_=this.workspace_=this.corner_=null;this.hScroll.dispose();this.hScroll=null;this.vScroll.dispose();this.vScroll=null};
|
||||
@@ -959,10 +964,11 @@ Blockly.ScrollbarPair.prototype.resize=function(){var a=this.workspace_.getMetri
|
||||
this.oldHostMetrics_.contentHeight==a.contentHeight&&this.oldHostMetrics_.viewTop==a.viewTop&&this.oldHostMetrics_.contentTop==a.contentTop||(c=!0)):c=b=!0;b&&this.hScroll.resize(a);c&&this.vScroll.resize(a);this.oldHostMetrics_&&this.oldHostMetrics_.viewWidth==a.viewWidth&&this.oldHostMetrics_.absoluteLeft==a.absoluteLeft||this.corner_.setAttribute("x",this.vScroll.xCoordinate);this.oldHostMetrics_&&this.oldHostMetrics_.viewHeight==a.viewHeight&&this.oldHostMetrics_.absoluteTop==a.absoluteTop||this.corner_.setAttribute("y",
|
||||
this.hScroll.yCoordinate);this.oldHostMetrics_=a}};Blockly.ScrollbarPair.prototype.set=function(a,b){var c={},d=a*this.hScroll.ratio_,e=b*this.vScroll.ratio_,f=parseFloat(this.hScroll.svgBackground_.getAttribute("width")),g=parseFloat(this.vScroll.svgBackground_.getAttribute("height"));c.x=this.getRatio_(d,f);c.y=this.getRatio_(e,g);this.workspace_.setMetrics(c);this.hScroll.svgKnob_.setAttribute("x",d);this.vScroll.svgKnob_.setAttribute("y",e)};
|
||||
Blockly.ScrollbarPair.prototype.getRatio_=function(a,b){var c=a/b;return isNaN(c)?0:c};
|
||||
Blockly.Scrollbar=function(a,b,c){this.workspace_=a;this.pair_=c||!1;this.horizontal_=b;this.createDom_();b?(this.svgBackground_.setAttribute("height",Blockly.Scrollbar.scrollbarThickness),this.svgKnob_.setAttribute("height",Blockly.Scrollbar.scrollbarThickness-5),this.svgKnob_.setAttribute("y",2.5)):(this.svgBackground_.setAttribute("width",Blockly.Scrollbar.scrollbarThickness),this.svgKnob_.setAttribute("width",Blockly.Scrollbar.scrollbarThickness-5),this.svgKnob_.setAttribute("x",2.5));this.onMouseDownBarWrapper_=
|
||||
Blockly.bindEvent_(this.svgBackground_,"mousedown",this,this.onMouseDownBar_);this.onMouseDownKnobWrapper_=Blockly.bindEvent_(this.svgKnob_,"mousedown",this,this.onMouseDownKnob_)};Blockly.Scrollbar.scrollbarThickness=15;goog.events.BrowserFeature.TOUCH_ENABLED&&(Blockly.Scrollbar.scrollbarThickness=25);
|
||||
Blockly.Scrollbar=function(a,b,c){this.workspace_=a;this.pair_=c||!1;this.horizontal_=b;this.oldHostMetrics_={};this.createDom_();b?(this.svgBackground_.setAttribute("height",Blockly.Scrollbar.scrollbarThickness),this.svgKnob_.setAttribute("height",Blockly.Scrollbar.scrollbarThickness-5),this.svgKnob_.setAttribute("y",2.5)):(this.svgBackground_.setAttribute("width",Blockly.Scrollbar.scrollbarThickness),this.svgKnob_.setAttribute("width",Blockly.Scrollbar.scrollbarThickness-5),this.svgKnob_.setAttribute("x",
|
||||
2.5));this.onMouseDownBarWrapper_=Blockly.bindEvent_(this.svgBackground_,"mousedown",this,this.onMouseDownBar_);this.onMouseDownKnobWrapper_=Blockly.bindEvent_(this.svgKnob_,"mousedown",this,this.onMouseDownKnob_)};Blockly.Scrollbar.scrollbarThickness=15;goog.events.BrowserFeature.TOUCH_ENABLED&&(Blockly.Scrollbar.scrollbarThickness=25);
|
||||
Blockly.Scrollbar.metricsAreEquivalent_=function(a,b){return a&&b&&a.viewWidth==b.viewWidth&&a.viewHeight==b.viewHeight&&a.viewLeft==b.viewLeft&&a.viewTop==b.viewTop&&a.absoluteTop==b.absoluteTop&&a.absoluteLeft==b.absoluteLeft&&a.contentWidth==b.contentWidth&&a.contentHeight==b.contentHeight&&a.contentLeft==b.contentLeft&&a.contentTop==b.contentTop?!0:!1};
|
||||
Blockly.Scrollbar.prototype.dispose=function(){this.onMouseUpKnob_();Blockly.unbindEvent_(this.onMouseDownBarWrapper_);this.onMouseDownBarWrapper_=null;Blockly.unbindEvent_(this.onMouseDownKnobWrapper_);this.onMouseDownKnobWrapper_=null;goog.dom.removeNode(this.svgGroup_);this.workspace_=this.svgKnob_=this.svgBackground_=this.svgGroup_=null};
|
||||
Blockly.Scrollbar.prototype.resize=function(a){if(!a&&(a=this.workspace_.getMetrics(),!a))return;this.horizontal_?this.resizeHorizontal_(a):this.resizeVertical_(a);this.onScroll_()};
|
||||
Blockly.Scrollbar.prototype.resize=function(a){if(!a&&(a=this.workspace_.getMetrics(),!a))return;Blockly.Scrollbar.metricsAreEquivalent_(a,this.oldHostMetrics_)||(this.oldHostMetrics_=a,this.horizontal_?this.resizeHorizontal_(a):this.resizeVertical_(a),this.onScroll_())};
|
||||
Blockly.Scrollbar.prototype.resizeHorizontal_=function(a){var b=a.viewWidth-1;this.pair_?b-=Blockly.Scrollbar.scrollbarThickness:this.setVisible(b<a.contentWidth);this.ratio_=b/a.contentWidth;if(-Infinity===this.ratio_||Infinity===this.ratio_||isNaN(this.ratio_))this.ratio_=0;var c=(a.viewLeft-a.contentLeft)*this.ratio_;this.svgKnob_.setAttribute("width",Math.max(0,a.viewWidth*this.ratio_));this.xCoordinate=a.absoluteLeft+.5;this.pair_&&this.workspace_.RTL&&(this.xCoordinate+=Blockly.Scrollbar.scrollbarThickness);
|
||||
this.yCoordinate=a.absoluteTop+a.viewHeight-Blockly.Scrollbar.scrollbarThickness-.5;this.svgGroup_.setAttribute("transform","translate("+this.xCoordinate+","+this.yCoordinate+")");this.svgBackground_.setAttribute("width",Math.max(0,b));this.svgKnob_.setAttribute("x",this.constrainKnob_(c))};
|
||||
Blockly.Scrollbar.prototype.resizeVertical_=function(a){var b=a.viewHeight-1;this.pair_?b-=Blockly.Scrollbar.scrollbarThickness:this.setVisible(b<a.contentHeight);this.ratio_=b/a.contentHeight;if(-Infinity===this.ratio_||Infinity===this.ratio_||isNaN(this.ratio_))this.ratio_=0;var c=(a.viewTop-a.contentTop)*this.ratio_;this.svgKnob_.setAttribute("height",Math.max(0,a.viewHeight*this.ratio_));this.xCoordinate=a.absoluteLeft+.5;this.workspace_.RTL||(this.xCoordinate+=a.viewWidth-Blockly.Scrollbar.scrollbarThickness-
|
||||
@@ -998,7 +1004,7 @@ Blockly.Xml.domToWorkspace=function(a,b){if(a instanceof Blockly.Workspace){var
|
||||
10);isNaN(k)||isNaN(g)||h.moveBy(b.RTL?d-k:k,g)}}e||Blockly.Events.setGroup(!1);Blockly.Field.stopCache()};
|
||||
Blockly.Xml.domToBlock=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToBlock, swap the arguments.")}Blockly.Events.disable();var d=Blockly.Xml.domToBlockHeadless_(a,b);if(b.rendered){d.setConnectionsHidden(!0);for(var c=d.getDescendants(),e=c.length-1;0<=e;e--)c[e].initSvg();for(e=c.length-1;0<=e;e--)c[e].render(!1);setTimeout(function(){d.workspace&&d.setConnectionsHidden(!1)},1);d.updateDisabled();Blockly.asyncSvgResize(b)}Blockly.Events.enable();
|
||||
Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.Create(d));return d};
|
||||
Blockly.Xml.domToBlockHeadless_=function(a,b){var c=null,d=a.getAttribute("type");if(!d)throw"Block type unspecified: \n"+a.outerHTML;for(var e=a.getAttribute("id"),c=b.newBlock(d,e),f=null,e=0,g;g=a.childNodes[e];e++)if(3!=g.nodeType){for(var h=f=null,k=0,l;l=g.childNodes[k];k++)1==l.nodeType&&("block"==l.nodeName.toLowerCase()?f=l:"shadow"==l.nodeName.toLowerCase()&&(h=l));!f&&h&&(f=h);k=g.getAttribute("name");switch(g.nodeName.toLowerCase()){case "mutation":c.domToMutation&&(c.domToMutation(g),
|
||||
Blockly.Xml.domToBlockHeadless_=function(a,b){var c=null,d=a.getAttribute("type");if(!d)throw"Block type unspecified: \n"+a.outerHTML;for(var e=a.getAttribute("id"),c=b.newBlock(d,e),f=null,e=0,g;g=a.childNodes[e];e++)if(3!=g.nodeType){for(var h=f=null,k=0,m;m=g.childNodes[k];k++)1==m.nodeType&&("block"==m.nodeName.toLowerCase()?f=m:"shadow"==m.nodeName.toLowerCase()&&(h=m));!f&&h&&(f=h);k=g.getAttribute("name");switch(g.nodeName.toLowerCase()){case "mutation":c.domToMutation&&(c.domToMutation(g),
|
||||
c.initSvg&&c.initSvg());break;case "comment":c.setCommentText(g.textContent);var n=g.getAttribute("pinned");n&&!c.isInFlyout&&setTimeout(function(){c.comment&&c.comment.setVisible&&c.comment.setVisible("true"==n)},1);f=parseInt(g.getAttribute("w"),10);g=parseInt(g.getAttribute("h"),10);!isNaN(f)&&!isNaN(g)&&c.comment&&c.comment.setVisible&&c.comment.setBubbleSize(f,g);break;case "data":c.data=g.textContent;break;case "title":case "field":f=c.getField(k);if(!f){console.warn("Ignoring non-existent field "+
|
||||
k+" in block "+d);break}f.setValue(g.textContent);break;case "value":case "statement":g=c.getInput(k);if(!g){console.warn("Ignoring non-existent input "+k+" in block "+d);break}h&&g.connection.setShadowDom(h);if(f)if(f=Blockly.Xml.domToBlockHeadless_(f,b),f.outputConnection)g.connection.connect(f.outputConnection);else if(f.previousConnection)g.connection.connect(f.previousConnection);else throw"Child block does not have output or previous statement.";break;case "next":h&&c.nextConnection&&c.nextConnection.setShadowDom(h);
|
||||
if(f){if(!c.nextConnection)throw"Next statement does not exist.";if(c.nextConnection.isConnected())throw"Next statement is already connected.";f=Blockly.Xml.domToBlockHeadless_(f,b);if(!f.previousConnection)throw"Next block does not have previous statement.";c.nextConnection.connect(f.previousConnection)}break;default:console.warn("Ignoring unknown tag: "+g.nodeName)}}(d=a.getAttribute("inline"))&&c.setInputsInline("true"==d);(d=a.getAttribute("disabled"))&&c.setDisabled("true"==d);(d=a.getAttribute("deletable"))&&
|
||||
@@ -1015,7 +1021,7 @@ Blockly.ZoomControls.prototype.position=function(){var a=this.workspace_.getMetr
|
||||
a.absoluteTop-this.HEIGHT_-this.bottom_,a.toolboxPosition==Blockly.TOOLBOX_AT_BOTTOM&&(this.top_-=a.flyoutHeight),this.svgGroup_.setAttribute("transform","translate("+this.left_+","+this.top_+")"))};
|
||||
// Copyright 2014 Google Inc. Apache License 2.0
|
||||
Blockly.WorkspaceSvg=function(a){Blockly.WorkspaceSvg.superClass_.constructor.call(this,a);this.getMetrics=a.getMetrics;this.setMetrics=a.setMetrics;Blockly.ConnectionDB.init(this);this.SOUNDS_=Object.create(null)};goog.inherits(Blockly.WorkspaceSvg,Blockly.Workspace);Blockly.WorkspaceSvg.prototype.rendered=!0;Blockly.WorkspaceSvg.prototype.isFlyout=!1;Blockly.WorkspaceSvg.prototype.isScrolling=!1;Blockly.WorkspaceSvg.prototype.scrollX=0;Blockly.WorkspaceSvg.prototype.scrollY=0;
|
||||
Blockly.WorkspaceSvg.prototype.startScrollX=0;Blockly.WorkspaceSvg.prototype.startScrollY=0;Blockly.WorkspaceSvg.prototype.dragDeltaXY_=null;Blockly.WorkspaceSvg.prototype.scale=1;Blockly.WorkspaceSvg.prototype.trashcan=null;Blockly.WorkspaceSvg.prototype.scrollbar=null;
|
||||
Blockly.WorkspaceSvg.prototype.startScrollX=0;Blockly.WorkspaceSvg.prototype.startScrollY=0;Blockly.WorkspaceSvg.prototype.dragDeltaXY_=null;Blockly.WorkspaceSvg.prototype.scale=1;Blockly.WorkspaceSvg.prototype.trashcan=null;Blockly.WorkspaceSvg.prototype.scrollbar=null;Blockly.WorkspaceSvg.prototype.lastSound_=null;
|
||||
Blockly.WorkspaceSvg.prototype.createDom=function(a){this.svgGroup_=Blockly.createSvgElement("g",{"class":"blocklyWorkspace"},null);a&&(this.svgBackground_=Blockly.createSvgElement("rect",{height:"100%",width:"100%","class":a},this.svgGroup_),"blocklyMainBackground"==a&&(this.svgBackground_.style.fill="url(#"+this.options.gridPattern.id+")"));this.svgBlockCanvas_=Blockly.createSvgElement("g",{"class":"blocklyBlockCanvas"},this.svgGroup_,this);this.svgBubbleCanvas_=Blockly.createSvgElement("g",{"class":"blocklyBubbleCanvas"},
|
||||
this.svgGroup_,this);a=Blockly.Scrollbar.scrollbarThickness;this.options.hasTrashcan&&(a=this.addTrashcan_(a));this.options.zoomOptions&&this.options.zoomOptions.controls&&(a=this.addZoomControls_(a));Blockly.bindEvent_(this.svgGroup_,"mousedown",this,this.onMouseDown_);var b=this;Blockly.bindEvent_(this.svgGroup_,"touchstart",null,function(a){Blockly.longStart_(a,b)});this.options.zoomOptions&&this.options.zoomOptions.wheel&&Blockly.bindEvent_(this.svgGroup_,"wheel",this,this.onMouseWheel_);this.options.hasCategories?
|
||||
this.toolbox_=new Blockly.Toolbox(this):this.options.languageTree&&this.addFlyout_();this.updateGridPattern_();return this.svgGroup_};
|
||||
@@ -1038,11 +1044,11 @@ a.preventDefault())};Blockly.WorkspaceSvg.prototype.startDrag=function(a,b){var
|
||||
Blockly.WorkspaceSvg.prototype.onMouseWheel_=function(a){Blockly.terminateDrag_();var b=0<a.deltaY?-1:1,c=Blockly.mouseToSvg(a,this.getParentSvg());this.zoom(c.x,c.y,b);a.preventDefault()};
|
||||
Blockly.WorkspaceSvg.prototype.getBlocksBoundingBox=function(){var a=this.getTopBlocks();if(!a.length)return{x:0,y:0,width:0,height:0};for(var b=a[0].getBoundingRectangle(),c=1;c<a.length;c++){var d=a[c].getBoundingRectangle();d.topLeft.x<b.topLeft.x&&(b.topLeft.x=d.topLeft.x);d.bottomRight.x>b.bottomRight.x&&(b.bottomRight.x=d.bottomRight.x);d.topLeft.y<b.topLeft.y&&(b.topLeft.y=d.topLeft.y);d.bottomRight.y>b.bottomRight.y&&(b.bottomRight.y=d.bottomRight.y)}return{x:b.topLeft.x,y:b.topLeft.y,width:b.bottomRight.x-
|
||||
b.topLeft.x,height:b.bottomRight.y-b.topLeft.y}};Blockly.WorkspaceSvg.prototype.cleanUp_=function(){Blockly.Events.setGroup(!0);for(var a=this.getTopBlocks(!0),b=0,c=0,d;d=a[c];c++){var e=d.getRelativeToSurfaceXY();d.moveBy(-e.x,b-e.y);d.snapToGrid();b=d.getRelativeToSurfaceXY().y+d.getHeightWidth().height+Blockly.BlockSvg.MIN_BLOCK_Y}Blockly.Events.setGroup(!1);Blockly.asyncSvgResize(this)};
|
||||
Blockly.WorkspaceSvg.prototype.showContextMenu_=function(a){function b(a){if(a.isDeletable())m=m.concat(a.getDescendants());else{a=a.getChildren();for(var c=0;c<a.length;c++)b(a[c])}}function c(){Blockly.Events.setGroup(f);var a=m.shift();a&&(a.workspace?(a.dispose(!1,!0),setTimeout(c,10)):c());Blockly.Events.setGroup(!1)}if(!this.options.readOnly&&!this.isFlyout){var d=[],e=this.getTopBlocks(!0),f=Blockly.genUid(),g={};g.text=Blockly.Msg.UNDO;g.enabled=0<this.undoStack_.length;g.callback=this.undo.bind(this,
|
||||
!1);d.push(g);g={};g.text=Blockly.Msg.REDO;g.enabled=0<this.redoStack_.length;g.callback=this.undo.bind(this,!0);d.push(g);this.scrollbar&&(g={},g.text=Blockly.Msg.CLEAN_UP,g.enabled=1<e.length,g.callback=this.cleanUp_.bind(this),d.push(g));if(this.options.collapse){for(var h=g=!1,k=0;k<e.length;k++)for(var l=e[k];l;)l.isCollapsed()?g=!0:h=!0,l=l.getNextBlock();var n=function(a){for(var b=0,c=0;c<e.length;c++)for(var d=e[c];d;)setTimeout(d.setCollapsed.bind(d,a),b),d=d.getNextBlock(),b+=10},h={enabled:h};
|
||||
h.text=Blockly.Msg.COLLAPSE_ALL;h.callback=function(){n(!0)};d.push(h);g={enabled:g};g.text=Blockly.Msg.EXPAND_ALL;g.callback=function(){n(!1)};d.push(g)}for(var m=[],k=0;k<e.length;k++)b(e[k]);g={text:1==m.length?Blockly.Msg.DELETE_BLOCK:Blockly.Msg.DELETE_X_BLOCKS.replace("%1",String(m.length)),enabled:0<m.length,callback:function(){(2>m.length||window.confirm(Blockly.Msg.DELETE_ALL_BLOCKS.replace("%1",String(m.length))))&&c()}};d.push(g);Blockly.ContextMenu.show(a,d,this.RTL)}};
|
||||
Blockly.WorkspaceSvg.prototype.showContextMenu_=function(a){function b(a){if(a.isDeletable())l=l.concat(a.getDescendants());else{a=a.getChildren();for(var c=0;c<a.length;c++)b(a[c])}}function c(){Blockly.Events.setGroup(f);var a=l.shift();a&&(a.workspace?(a.dispose(!1,!0),setTimeout(c,10)):c());Blockly.Events.setGroup(!1)}if(!this.options.readOnly&&!this.isFlyout){var d=[],e=this.getTopBlocks(!0),f=Blockly.genUid(),g={};g.text=Blockly.Msg.UNDO;g.enabled=0<this.undoStack_.length;g.callback=this.undo.bind(this,
|
||||
!1);d.push(g);g={};g.text=Blockly.Msg.REDO;g.enabled=0<this.redoStack_.length;g.callback=this.undo.bind(this,!0);d.push(g);this.scrollbar&&(g={},g.text=Blockly.Msg.CLEAN_UP,g.enabled=1<e.length,g.callback=this.cleanUp_.bind(this),d.push(g));if(this.options.collapse){for(var h=g=!1,k=0;k<e.length;k++)for(var m=e[k];m;)m.isCollapsed()?g=!0:h=!0,m=m.getNextBlock();var n=function(a){for(var b=0,c=0;c<e.length;c++)for(var d=e[c];d;)setTimeout(d.setCollapsed.bind(d,a),b),d=d.getNextBlock(),b+=10},h={enabled:h};
|
||||
h.text=Blockly.Msg.COLLAPSE_ALL;h.callback=function(){n(!0)};d.push(h);g={enabled:g};g.text=Blockly.Msg.EXPAND_ALL;g.callback=function(){n(!1)};d.push(g)}for(var l=[],k=0;k<e.length;k++)b(e[k]);g={text:1==l.length?Blockly.Msg.DELETE_BLOCK:Blockly.Msg.DELETE_X_BLOCKS.replace("%1",String(l.length)),enabled:0<l.length,callback:function(){(2>l.length||window.confirm(Blockly.Msg.DELETE_ALL_BLOCKS.replace("%1",String(l.length))))&&c()}};d.push(g);Blockly.ContextMenu.show(a,d,this.RTL)}};
|
||||
Blockly.WorkspaceSvg.prototype.loadAudio_=function(a,b){if(a.length){try{var c=new window.Audio}catch(h){return}for(var d,e=0;e<a.length;e++){var f=a[e],g=f.match(/\.(\w+)$/);if(g&&c.canPlayType("audio/"+g[1])){d=new window.Audio(f);break}}d&&d.play&&(this.SOUNDS_[b]=d)}};Blockly.WorkspaceSvg.prototype.preloadAudio_=function(){for(var a in this.SOUNDS_){var b=this.SOUNDS_[a];b.volume=.01;b.play();b.pause();if(goog.userAgent.IPAD||goog.userAgent.IPHONE)break}};
|
||||
Blockly.WorkspaceSvg.prototype.playAudio=function(a,b){var c=this.SOUNDS_[a];c?(c=goog.userAgent.DOCUMENT_MODE&&9===goog.userAgent.DOCUMENT_MODE||goog.userAgent.IPAD||goog.userAgent.ANDROID?c:c.cloneNode(),c.volume=void 0===b?1:b,c.play()):this.options.parentWorkspace&&this.options.parentWorkspace.playAudio(a,b)};
|
||||
Blockly.WorkspaceSvg.prototype.playAudio=function(a,b){var c=this.SOUNDS_[a];if(c){var d=new Date;d-this.lastSound_<Blockly.SOUND_LIMIT||(this.lastSound_=d,c=goog.userAgent.DOCUMENT_MODE&&9===goog.userAgent.DOCUMENT_MODE||goog.userAgent.IPAD||goog.userAgent.ANDROID?c:c.cloneNode(),c.volume=void 0===b?1:b,c.play())}else this.options.parentWorkspace&&this.options.parentWorkspace.playAudio(a,b)};
|
||||
Blockly.WorkspaceSvg.prototype.updateToolbox=function(a){if(a=Blockly.Options.parseToolboxTree(a)){if(!this.options.languageTree)throw"Existing toolbox is null. Can't create new toolbox.";if(a.getElementsByTagName("category").length){if(!this.toolbox_)throw"Existing toolbox has no categories. Can't change mode.";this.options.languageTree=a;this.toolbox_.populate_(a);this.toolbox_.addColour_()}else{if(!this.flyout_)throw"Existing toolbox has categories. Can't change mode.";this.options.languageTree=
|
||||
a;this.flyout_.show(a.childNodes)}}else if(this.options.languageTree)throw"Can't nullify an existing toolbox.";};Blockly.WorkspaceSvg.prototype.markFocused=function(){this.options.parentWorkspace?this.options.parentWorkspace.markFocused():Blockly.mainWorkspace=this};
|
||||
Blockly.WorkspaceSvg.prototype.zoom=function(a,b,c){var d=this.options.zoomOptions.scaleSpeed,e=this.getMetrics(),f=this.getParentSvg().createSVGPoint();f.x=a;f.y=b;f=f.matrixTransform(this.getCanvas().getCTM().inverse());a=f.x;b=f.y;f=this.getCanvas();d=1==c?d:1/d;c=this.scale*d;c>this.options.zoomOptions.maxScale?d=this.options.zoomOptions.maxScale/this.scale:c<this.options.zoomOptions.minScale&&(d=this.options.zoomOptions.minScale/this.scale);this.scale!=c&&(this.scrollbar&&(a=f.getCTM().translate(a*
|
||||
@@ -1154,8 +1160,9 @@ Blockly.DRAG_FREE){b=goog.math.Coordinate.difference(b,this.dragStartXY_);d=this
|
||||
(e=k.connection,f=h,g=k.radius)}Blockly.highlightedConnection_&&Blockly.highlightedConnection_!=e&&(Blockly.highlightedConnection_.unhighlight(),Blockly.highlightedConnection_=null,Blockly.localConnection_=null);e&&e!=Blockly.highlightedConnection_&&(e.highlight(),Blockly.highlightedConnection_=e,Blockly.localConnection_=f);this.isDeletable()&&this.workspace.isDeleteArea(a)}a.stopPropagation();a.preventDefault()}};
|
||||
Blockly.BlockSvg.prototype.updateMovable=function(){this.isMovable()?Blockly.addClass_(this.svgGroup_,"blocklyDraggable"):Blockly.removeClass_(this.svgGroup_,"blocklyDraggable")};Blockly.BlockSvg.prototype.setMovable=function(a){Blockly.BlockSvg.superClass_.setMovable.call(this,a);this.updateMovable()};Blockly.BlockSvg.prototype.setEditable=function(a){Blockly.BlockSvg.superClass_.setEditable.call(this,a);if(this.rendered){a=this.getIcons();for(var b=0;b<a.length;b++)a[b].updateEditable()}};
|
||||
Blockly.BlockSvg.prototype.setShadow=function(a){Blockly.BlockSvg.superClass_.setShadow.call(this,a);this.updateColour()};Blockly.BlockSvg.prototype.getSvgRoot=function(){return this.svgGroup_};
|
||||
Blockly.BlockSvg.prototype.dispose=function(a,b){Blockly.Field.startCache();Blockly.selected==this&&(this.unselect(),Blockly.terminateDrag_());Blockly.ContextMenu.currentBlock==this&&Blockly.ContextMenu.hide();b&&this.rendered&&(this.unplug(a),this.disposeUiEffect());this.rendered=!1;Blockly.Events.disable();for(var c=this.getIcons(),d=0;d<c.length;d++)c[d].dispose();Blockly.Events.enable();Blockly.BlockSvg.superClass_.dispose.call(this,a);goog.dom.removeNode(this.svgGroup_);this.svgPathDark_=this.svgPathLight_=
|
||||
this.svgPath_=this.svgGroup_=null;Blockly.Field.stopCache()};Blockly.BlockSvg.prototype.disposeUiEffect=function(){this.workspace.playAudio("delete");var a=Blockly.getSvgXY_(this.svgGroup_,this.workspace),b=this.svgGroup_.cloneNode(!0);b.translateX_=a.x;b.translateY_=a.y;b.setAttribute("transform","translate("+b.translateX_+","+b.translateY_+")");this.workspace.getParentSvg().appendChild(b);b.bBox_=b.getBBox();Blockly.BlockSvg.disposeUiStep_(b,this.RTL,new Date,this.workspace.scale)};
|
||||
Blockly.BlockSvg.prototype.dispose=function(a,b){Blockly.Tooltip.hide();Blockly.Field.startCache();Blockly.selected==this&&(this.unselect(),Blockly.terminateDrag_());Blockly.ContextMenu.currentBlock==this&&Blockly.ContextMenu.hide();b&&this.rendered&&(this.unplug(a),this.disposeUiEffect());this.rendered=!1;Blockly.Events.disable();for(var c=this.getIcons(),d=0;d<c.length;d++)c[d].dispose();Blockly.Events.enable();Blockly.BlockSvg.superClass_.dispose.call(this,a);goog.dom.removeNode(this.svgGroup_);
|
||||
this.svgPathDark_=this.svgPathLight_=this.svgPath_=this.svgGroup_=null;Blockly.Field.stopCache()};
|
||||
Blockly.BlockSvg.prototype.disposeUiEffect=function(){this.workspace.playAudio("delete");var a=Blockly.getSvgXY_(this.svgGroup_,this.workspace),b=this.svgGroup_.cloneNode(!0);b.translateX_=a.x;b.translateY_=a.y;b.setAttribute("transform","translate("+b.translateX_+","+b.translateY_+")");this.workspace.getParentSvg().appendChild(b);b.bBox_=b.getBBox();Blockly.BlockSvg.disposeUiStep_(b,this.RTL,new Date,this.workspace.scale)};
|
||||
Blockly.BlockSvg.disposeUiStep_=function(a,b,c,d){var e=(new Date-c)/150;1<e?goog.dom.removeNode(a):(a.setAttribute("transform","translate("+(a.translateX_+(b?-1:1)*a.bBox_.width*d/2*e)+","+(a.translateY_+a.bBox_.height*d*e)+") scale("+(1-e)*d+")"),setTimeout(function(){Blockly.BlockSvg.disposeUiStep_(a,b,c,d)},10))};
|
||||
Blockly.BlockSvg.prototype.connectionUiEffect=function(){this.workspace.playAudio("click");if(!(1>this.workspace.scale)){var a=Blockly.getSvgXY_(this.svgGroup_,this.workspace);this.outputConnection?(a.x+=(this.RTL?3:-3)*this.workspace.scale,a.y+=13*this.workspace.scale):this.previousConnection&&(a.x+=(this.RTL?-23:23)*this.workspace.scale,a.y+=3*this.workspace.scale);a=Blockly.createSvgElement("circle",{cx:a.x,cy:a.y,r:0,fill:"none",stroke:"#888","stroke-width":10},this.workspace.getParentSvg());
|
||||
Blockly.BlockSvg.connectionUiStep_(a,new Date,this.workspace.scale)}};Blockly.BlockSvg.connectionUiStep_=function(a,b,c){var d=(new Date-b)/150;1<d?goog.dom.removeNode(a):(a.setAttribute("r",25*d*c),a.style.opacity=1-d,Blockly.BlockSvg.disconnectUiStop_.pid_=setTimeout(function(){Blockly.BlockSvg.connectionUiStep_(a,b,c)},10))};
|
||||
@@ -1183,29 +1190,29 @@ Blockly.BlockSvg.INNER_TOP_LEFT_CORNER_HIGHLIGHT_RTL="a "+Blockly.BlockSvg.CORNE
|
||||
Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_LTR="a "+(Blockly.BlockSvg.CORNER_RADIUS+.5)+","+(Blockly.BlockSvg.CORNER_RADIUS+.5)+" 0 0,0 "+(Blockly.BlockSvg.CORNER_RADIUS-Blockly.BlockSvg.DISTANCE_45_OUTSIDE)+","+(Blockly.BlockSvg.DISTANCE_45_OUTSIDE+.5);
|
||||
Blockly.BlockSvg.prototype.render=function(a){Blockly.Field.startCache();this.rendered=!0;var b=Blockly.BlockSvg.SEP_SPACE_X;this.RTL&&(b=-b);for(var c=this.getIcons(),d=0;d<c.length;d++)b=c[d].renderIcon(b);b+=this.RTL?Blockly.BlockSvg.SEP_SPACE_X:-Blockly.BlockSvg.SEP_SPACE_X;c=this.renderCompute_(b);this.renderDraw_(b,c);!1!==a&&((a=this.getParent())?a.render(!0):Blockly.asyncSvgResize(this.workspace));Blockly.Field.stopCache()};
|
||||
Blockly.BlockSvg.prototype.renderFields_=function(a,b,c){c+=Blockly.BlockSvg.INLINE_PADDING_Y;this.RTL&&(b=-b);for(var d=0,e;e=a[d];d++){var f=e.getSvgRoot();f&&(this.RTL?(b-=e.renderSep+e.renderWidth,f.setAttribute("transform","translate("+b+","+c+")"),e.renderWidth&&(b-=Blockly.BlockSvg.SEP_SPACE_X)):(f.setAttribute("transform","translate("+(b+e.renderSep)+","+c+")"),e.renderWidth&&(b+=e.renderSep+e.renderWidth+Blockly.BlockSvg.SEP_SPACE_X)))}return this.RTL?-b:b};
|
||||
Blockly.BlockSvg.prototype.renderCompute_=function(a){var b=this.inputList,c=[];c.rightEdge=a+2*Blockly.BlockSvg.SEP_SPACE_X;if(this.previousConnection||this.nextConnection)c.rightEdge=Math.max(c.rightEdge,Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.SEP_SPACE_X);for(var d=0,e=0,f=!1,g=!1,h=!1,k=void 0,l=this.getInputsInline()&&!this.isCollapsed(),n=0,m;m=b[n];n++)if(m.isVisible()){var q;l&&k&&k!=Blockly.NEXT_STATEMENT&&m.type!=Blockly.NEXT_STATEMENT?q=c[c.length-1]:(k=m.type,q=[],q.type=l&&m.type!=
|
||||
Blockly.NEXT_STATEMENT?Blockly.BlockSvg.INLINE:m.type,q.height=0,c.push(q));q.push(m);m.renderHeight=Blockly.BlockSvg.MIN_BLOCK_Y;m.renderWidth=l&&m.type==Blockly.INPUT_VALUE?Blockly.BlockSvg.TAB_WIDTH+1.25*Blockly.BlockSvg.SEP_SPACE_X:0;if(m.connection&&m.connection.isConnected()){var p=m.connection.targetBlock().getHeightWidth();m.renderHeight=Math.max(m.renderHeight,p.height);m.renderWidth=Math.max(m.renderWidth,p.width)}l||n!=b.length-1?!l&&m.type==Blockly.INPUT_VALUE&&b[n+1]&&b[n+1].type==Blockly.NEXT_STATEMENT&&
|
||||
m.renderHeight--:m.renderHeight--;q.height=Math.max(q.height,m.renderHeight);m.fieldWidth=0;1==c.length&&(m.fieldWidth+=this.RTL?-a:a);for(var p=!1,r=0,t;t=m.fieldRow[r];r++){0!=r&&(m.fieldWidth+=Blockly.BlockSvg.SEP_SPACE_X);var u=t.getSize();t.renderWidth=u.width;t.renderSep=p&&t.EDITABLE?Blockly.BlockSvg.SEP_SPACE_X:0;m.fieldWidth+=t.renderWidth+t.renderSep;q.height=Math.max(q.height,u.height);p=t.EDITABLE}q.type!=Blockly.BlockSvg.INLINE&&(q.type==Blockly.NEXT_STATEMENT?(g=!0,e=Math.max(e,m.fieldWidth)):
|
||||
(q.type==Blockly.INPUT_VALUE?f=!0:q.type==Blockly.DUMMY_INPUT&&(h=!0),d=Math.max(d,m.fieldWidth)))}for(a=0;q=c[a];a++)if(q.thicker=!1,q.type==Blockly.BlockSvg.INLINE)for(b=0;m=q[b];b++)if(m.type==Blockly.INPUT_VALUE){q.height+=2*Blockly.BlockSvg.INLINE_PADDING_Y;q.thicker=!0;break}c.statementEdge=2*Blockly.BlockSvg.SEP_SPACE_X+e;g&&(c.rightEdge=Math.max(c.rightEdge,c.statementEdge+Blockly.BlockSvg.NOTCH_WIDTH));f?c.rightEdge=Math.max(c.rightEdge,d+2*Blockly.BlockSvg.SEP_SPACE_X+Blockly.BlockSvg.TAB_WIDTH):
|
||||
Blockly.BlockSvg.prototype.renderCompute_=function(a){var b=this.inputList,c=[];c.rightEdge=a+2*Blockly.BlockSvg.SEP_SPACE_X;if(this.previousConnection||this.nextConnection)c.rightEdge=Math.max(c.rightEdge,Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.SEP_SPACE_X);for(var d=0,e=0,f=!1,g=!1,h=!1,k=void 0,m=this.getInputsInline()&&!this.isCollapsed(),n=0,l;l=b[n];n++)if(l.isVisible()){var q;m&&k&&k!=Blockly.NEXT_STATEMENT&&l.type!=Blockly.NEXT_STATEMENT?q=c[c.length-1]:(k=l.type,q=[],q.type=m&&l.type!=
|
||||
Blockly.NEXT_STATEMENT?Blockly.BlockSvg.INLINE:l.type,q.height=0,c.push(q));q.push(l);l.renderHeight=Blockly.BlockSvg.MIN_BLOCK_Y;l.renderWidth=m&&l.type==Blockly.INPUT_VALUE?Blockly.BlockSvg.TAB_WIDTH+1.25*Blockly.BlockSvg.SEP_SPACE_X:0;if(l.connection&&l.connection.isConnected()){var p=l.connection.targetBlock().getHeightWidth();l.renderHeight=Math.max(l.renderHeight,p.height);l.renderWidth=Math.max(l.renderWidth,p.width)}m||n!=b.length-1?!m&&l.type==Blockly.INPUT_VALUE&&b[n+1]&&b[n+1].type==Blockly.NEXT_STATEMENT&&
|
||||
l.renderHeight--:l.renderHeight--;q.height=Math.max(q.height,l.renderHeight);l.fieldWidth=0;1==c.length&&(l.fieldWidth+=this.RTL?-a:a);for(var p=!1,r=0,t;t=l.fieldRow[r];r++){0!=r&&(l.fieldWidth+=Blockly.BlockSvg.SEP_SPACE_X);var u=t.getSize();t.renderWidth=u.width;t.renderSep=p&&t.EDITABLE?Blockly.BlockSvg.SEP_SPACE_X:0;l.fieldWidth+=t.renderWidth+t.renderSep;q.height=Math.max(q.height,u.height);p=t.EDITABLE}q.type!=Blockly.BlockSvg.INLINE&&(q.type==Blockly.NEXT_STATEMENT?(g=!0,e=Math.max(e,l.fieldWidth)):
|
||||
(q.type==Blockly.INPUT_VALUE?f=!0:q.type==Blockly.DUMMY_INPUT&&(h=!0),d=Math.max(d,l.fieldWidth)))}for(a=0;q=c[a];a++)if(q.thicker=!1,q.type==Blockly.BlockSvg.INLINE)for(b=0;l=q[b];b++)if(l.type==Blockly.INPUT_VALUE){q.height+=2*Blockly.BlockSvg.INLINE_PADDING_Y;q.thicker=!0;break}c.statementEdge=2*Blockly.BlockSvg.SEP_SPACE_X+e;g&&(c.rightEdge=Math.max(c.rightEdge,c.statementEdge+Blockly.BlockSvg.NOTCH_WIDTH));f?c.rightEdge=Math.max(c.rightEdge,d+2*Blockly.BlockSvg.SEP_SPACE_X+Blockly.BlockSvg.TAB_WIDTH):
|
||||
h&&(c.rightEdge=Math.max(c.rightEdge,d+2*Blockly.BlockSvg.SEP_SPACE_X));c.hasValue=f;c.hasStatement=g;c.hasDummy=h;return c};
|
||||
Blockly.BlockSvg.prototype.renderDraw_=function(a,b){this.startHat_=!1;this.height=0;if(this.outputConnection)this.squareBottomLeftCorner_=this.squareTopLeftCorner_=!0;else{this.squareBottomLeftCorner_=this.squareTopLeftCorner_=!1;if(this.previousConnection){var c=this.previousConnection.targetBlock();c&&c.getNextBlock()==this&&(this.squareTopLeftCorner_=!0)}else Blockly.BlockSvg.START_HAT&&(this.startHat_=this.squareTopLeftCorner_=!0,this.height+=Blockly.BlockSvg.START_HAT_HEIGHT,b.rightEdge=Math.max(b.rightEdge,
|
||||
100));this.getNextBlock()&&(this.squareBottomLeftCorner_=!0)}var d=this.getRelativeToSurfaceXY(),e=[],f=[],c=[],g=[];this.renderDrawTop_(e,c,d,b.rightEdge);var h=this.renderDrawRight_(e,c,f,g,d,b,a);this.renderDrawBottom_(e,c,d,h);this.renderDrawLeft_(e,c,d,h);d=e.join(" ")+"\n"+f.join(" ");this.svgPath_.setAttribute("d",d);this.svgPathDark_.setAttribute("d",d);d=c.join(" ")+"\n"+g.join(" ");this.svgPathLight_.setAttribute("d",d);this.RTL&&(this.svgPath_.setAttribute("transform","scale(-1 1)"),this.svgPathLight_.setAttribute("transform",
|
||||
100));this.getNextBlock()&&(this.squareBottomLeftCorner_=!0)}var d=this.getRelativeToSurfaceXY(),e=[],f=[],c=[],g=[];this.renderDrawTop_(e,c,d,b.rightEdge);var h=this.renderDrawRight_(e,c,f,g,d,b,a);this.renderDrawBottom_(e,c,d,h);this.renderDrawLeft_(e,c,d);d=e.join(" ")+"\n"+f.join(" ");this.svgPath_.setAttribute("d",d);this.svgPathDark_.setAttribute("d",d);d=c.join(" ")+"\n"+g.join(" ");this.svgPathLight_.setAttribute("d",d);this.RTL&&(this.svgPath_.setAttribute("transform","scale(-1 1)"),this.svgPathLight_.setAttribute("transform",
|
||||
"scale(-1 1)"),this.svgPathDark_.setAttribute("transform","translate(1,1) scale(-1 1)"))};
|
||||
Blockly.BlockSvg.prototype.renderDrawTop_=function(a,b,c,d){this.squareTopLeftCorner_?(a.push("m 0,0"),b.push("m 0.5,0.5"),this.startHat_&&(a.push(Blockly.BlockSvg.START_HAT_PATH),b.push(this.RTL?Blockly.BlockSvg.START_HAT_HIGHLIGHT_RTL:Blockly.BlockSvg.START_HAT_HIGHLIGHT_LTR))):(a.push(Blockly.BlockSvg.TOP_LEFT_CORNER_START),b.push(this.RTL?Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_RTL:Blockly.BlockSvg.TOP_LEFT_CORNER_START_HIGHLIGHT_LTR),a.push(Blockly.BlockSvg.TOP_LEFT_CORNER),b.push(Blockly.BlockSvg.TOP_LEFT_CORNER_HIGHLIGHT));
|
||||
this.previousConnection&&(a.push("H",Blockly.BlockSvg.NOTCH_WIDTH-15),b.push("H",Blockly.BlockSvg.NOTCH_WIDTH-15),a.push(Blockly.BlockSvg.NOTCH_PATH_LEFT),b.push(Blockly.BlockSvg.NOTCH_PATH_LEFT_HIGHLIGHT),this.previousConnection.moveTo(c.x+(this.RTL?-Blockly.BlockSvg.NOTCH_WIDTH:Blockly.BlockSvg.NOTCH_WIDTH),c.y));a.push("H",d);b.push("H",d-.5);this.width=d};
|
||||
Blockly.BlockSvg.prototype.renderDrawRight_=function(a,b,c,d,e,f,g){for(var h,k=0,l,n,m=0,q;q=f[m];m++){h=Blockly.BlockSvg.SEP_SPACE_X;0==m&&(h+=this.RTL?-g:g);b.push("M",f.rightEdge-.5+","+(k+.5));if(this.isCollapsed()){var p=q[0];l=k;this.renderFields_(p.fieldRow,h,l);a.push(Blockly.BlockSvg.JAGGED_TEETH);b.push("h 8");p=q.height-Blockly.BlockSvg.JAGGED_TEETH_HEIGHT;a.push("v",p);this.RTL&&(b.push("v 3.9 l 7.2,3.4 m -14.5,8.9 l 7.3,3.5"),b.push("v",p-.7));this.width+=Blockly.BlockSvg.JAGGED_TEETH_WIDTH}else if(q.type==
|
||||
Blockly.BlockSvg.INLINE){for(var r=0;p=q[r];r++)l=k,q.thicker&&(l+=Blockly.BlockSvg.INLINE_PADDING_Y),h=this.renderFields_(p.fieldRow,h,l),p.type!=Blockly.DUMMY_INPUT&&(h+=p.renderWidth+Blockly.BlockSvg.SEP_SPACE_X),p.type==Blockly.INPUT_VALUE&&(c.push("M",h-Blockly.BlockSvg.SEP_SPACE_X+","+(k+Blockly.BlockSvg.INLINE_PADDING_Y)),c.push("h",Blockly.BlockSvg.TAB_WIDTH-2-p.renderWidth),c.push(Blockly.BlockSvg.TAB_PATH_DOWN),c.push("v",p.renderHeight+1-Blockly.BlockSvg.TAB_HEIGHT),c.push("h",p.renderWidth+
|
||||
Blockly.BlockSvg.prototype.renderDrawRight_=function(a,b,c,d,e,f,g){for(var h,k=0,m,n,l=0,q;q=f[l];l++){h=Blockly.BlockSvg.SEP_SPACE_X;0==l&&(h+=this.RTL?-g:g);b.push("M",f.rightEdge-.5+","+(k+.5));if(this.isCollapsed()){var p=q[0];m=k;this.renderFields_(p.fieldRow,h,m);a.push(Blockly.BlockSvg.JAGGED_TEETH);b.push("h 8");p=q.height-Blockly.BlockSvg.JAGGED_TEETH_HEIGHT;a.push("v",p);this.RTL&&(b.push("v 3.9 l 7.2,3.4 m -14.5,8.9 l 7.3,3.5"),b.push("v",p-.7));this.width+=Blockly.BlockSvg.JAGGED_TEETH_WIDTH}else if(q.type==
|
||||
Blockly.BlockSvg.INLINE){for(var r=0;p=q[r];r++)m=k,q.thicker&&(m+=Blockly.BlockSvg.INLINE_PADDING_Y),h=this.renderFields_(p.fieldRow,h,m),p.type!=Blockly.DUMMY_INPUT&&(h+=p.renderWidth+Blockly.BlockSvg.SEP_SPACE_X),p.type==Blockly.INPUT_VALUE&&(c.push("M",h-Blockly.BlockSvg.SEP_SPACE_X+","+(k+Blockly.BlockSvg.INLINE_PADDING_Y)),c.push("h",Blockly.BlockSvg.TAB_WIDTH-2-p.renderWidth),c.push(Blockly.BlockSvg.TAB_PATH_DOWN),c.push("v",p.renderHeight+1-Blockly.BlockSvg.TAB_HEIGHT),c.push("h",p.renderWidth+
|
||||
2-Blockly.BlockSvg.TAB_WIDTH),c.push("z"),this.RTL?(d.push("M",h-Blockly.BlockSvg.SEP_SPACE_X-2.5+Blockly.BlockSvg.TAB_WIDTH-p.renderWidth+","+(k+Blockly.BlockSvg.INLINE_PADDING_Y+.5)),d.push(Blockly.BlockSvg.TAB_PATH_DOWN_HIGHLIGHT_RTL),d.push("v",p.renderHeight-Blockly.BlockSvg.TAB_HEIGHT+2.5),d.push("h",p.renderWidth-Blockly.BlockSvg.TAB_WIDTH+2)):(d.push("M",h-Blockly.BlockSvg.SEP_SPACE_X+.5+","+(k+Blockly.BlockSvg.INLINE_PADDING_Y+.5)),d.push("v",p.renderHeight+1),d.push("h",Blockly.BlockSvg.TAB_WIDTH-
|
||||
2-p.renderWidth),d.push("M",h-p.renderWidth-Blockly.BlockSvg.SEP_SPACE_X+.9+","+(k+Blockly.BlockSvg.INLINE_PADDING_Y+Blockly.BlockSvg.TAB_HEIGHT-.7)),d.push("l",.46*Blockly.BlockSvg.TAB_WIDTH+",-2.1")),l=this.RTL?e.x-h-Blockly.BlockSvg.TAB_WIDTH+Blockly.BlockSvg.SEP_SPACE_X+p.renderWidth+1:e.x+h+Blockly.BlockSvg.TAB_WIDTH-Blockly.BlockSvg.SEP_SPACE_X-p.renderWidth-1,n=e.y+k+Blockly.BlockSvg.INLINE_PADDING_Y+1,p.connection.moveTo(l,n),p.connection.isConnected()&&p.connection.tighten_());h=Math.max(h,
|
||||
f.rightEdge);this.width=Math.max(this.width,h);a.push("H",h);b.push("H",h-.5);a.push("v",q.height);this.RTL&&b.push("v",q.height-1)}else q.type==Blockly.INPUT_VALUE?(p=q[0],l=k,p.align!=Blockly.ALIGN_LEFT&&(r=f.rightEdge-p.fieldWidth-Blockly.BlockSvg.TAB_WIDTH-2*Blockly.BlockSvg.SEP_SPACE_X,p.align==Blockly.ALIGN_RIGHT?h+=r:p.align==Blockly.ALIGN_CENTRE&&(h+=r/2)),this.renderFields_(p.fieldRow,h,l),a.push(Blockly.BlockSvg.TAB_PATH_DOWN),r=q.height-Blockly.BlockSvg.TAB_HEIGHT,a.push("v",r),this.RTL?
|
||||
(b.push(Blockly.BlockSvg.TAB_PATH_DOWN_HIGHLIGHT_RTL),b.push("v",r+.5)):(b.push("M",f.rightEdge-5+","+(k+Blockly.BlockSvg.TAB_HEIGHT-.7)),b.push("l",.46*Blockly.BlockSvg.TAB_WIDTH+",-2.1")),l=e.x+(this.RTL?-f.rightEdge-1:f.rightEdge+1),n=e.y+k,p.connection.moveTo(l,n),p.connection.isConnected()&&(p.connection.tighten_(),this.width=Math.max(this.width,f.rightEdge+p.connection.targetBlock().getHeightWidth().width-Blockly.BlockSvg.TAB_WIDTH+1))):q.type==Blockly.DUMMY_INPUT?(p=q[0],l=k,p.align!=Blockly.ALIGN_LEFT&&
|
||||
(r=f.rightEdge-p.fieldWidth-2*Blockly.BlockSvg.SEP_SPACE_X,f.hasValue&&(r-=Blockly.BlockSvg.TAB_WIDTH),p.align==Blockly.ALIGN_RIGHT?h+=r:p.align==Blockly.ALIGN_CENTRE&&(h+=r/2)),this.renderFields_(p.fieldRow,h,l),a.push("v",q.height),this.RTL&&b.push("v",q.height-1)):q.type==Blockly.NEXT_STATEMENT&&(p=q[0],0==m&&(a.push("v",Blockly.BlockSvg.SEP_SPACE_Y),this.RTL&&b.push("v",Blockly.BlockSvg.SEP_SPACE_Y-1),k+=Blockly.BlockSvg.SEP_SPACE_Y),l=k,p.align!=Blockly.ALIGN_LEFT&&(r=f.statementEdge-p.fieldWidth-
|
||||
2*Blockly.BlockSvg.SEP_SPACE_X,p.align==Blockly.ALIGN_RIGHT?h+=r:p.align==Blockly.ALIGN_CENTRE&&(h+=r/2)),this.renderFields_(p.fieldRow,h,l),h=f.statementEdge+Blockly.BlockSvg.NOTCH_WIDTH,a.push("H",h),a.push(Blockly.BlockSvg.INNER_TOP_LEFT_CORNER),a.push("v",q.height-2*Blockly.BlockSvg.CORNER_RADIUS),a.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER),a.push("H",f.rightEdge),this.RTL?(b.push("M",h-Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.DISTANCE_45_OUTSIDE+","+(k+Blockly.BlockSvg.DISTANCE_45_OUTSIDE)),
|
||||
b.push(Blockly.BlockSvg.INNER_TOP_LEFT_CORNER_HIGHLIGHT_RTL),b.push("v",q.height-2*Blockly.BlockSvg.CORNER_RADIUS),b.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_RTL)):(b.push("M",h-Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.DISTANCE_45_OUTSIDE+","+(k+q.height-Blockly.BlockSvg.DISTANCE_45_OUTSIDE)),b.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_LTR)),b.push("H",f.rightEdge-.5),l=e.x+(this.RTL?-h:h+1),n=e.y+k+1,p.connection.moveTo(l,n),p.connection.isConnected()&&(p.connection.tighten_(),
|
||||
this.width=Math.max(this.width,f.statementEdge+p.connection.targetBlock().getHeightWidth().width)),m==f.length-1||f[m+1].type==Blockly.NEXT_STATEMENT)&&(a.push("v",Blockly.BlockSvg.SEP_SPACE_Y),this.RTL&&b.push("v",Blockly.BlockSvg.SEP_SPACE_Y-1),k+=Blockly.BlockSvg.SEP_SPACE_Y);k+=q.height}f.length||(k=Blockly.BlockSvg.MIN_BLOCK_Y,a.push("V",k),this.RTL&&b.push("V",k-1));return k};
|
||||
2-p.renderWidth),d.push("M",h-p.renderWidth-Blockly.BlockSvg.SEP_SPACE_X+.9+","+(k+Blockly.BlockSvg.INLINE_PADDING_Y+Blockly.BlockSvg.TAB_HEIGHT-.7)),d.push("l",.46*Blockly.BlockSvg.TAB_WIDTH+",-2.1")),m=this.RTL?e.x-h-Blockly.BlockSvg.TAB_WIDTH+Blockly.BlockSvg.SEP_SPACE_X+p.renderWidth+1:e.x+h+Blockly.BlockSvg.TAB_WIDTH-Blockly.BlockSvg.SEP_SPACE_X-p.renderWidth-1,n=e.y+k+Blockly.BlockSvg.INLINE_PADDING_Y+1,p.connection.moveTo(m,n),p.connection.isConnected()&&p.connection.tighten_());h=Math.max(h,
|
||||
f.rightEdge);this.width=Math.max(this.width,h);a.push("H",h);b.push("H",h-.5);a.push("v",q.height);this.RTL&&b.push("v",q.height-1)}else q.type==Blockly.INPUT_VALUE?(p=q[0],m=k,p.align!=Blockly.ALIGN_LEFT&&(r=f.rightEdge-p.fieldWidth-Blockly.BlockSvg.TAB_WIDTH-2*Blockly.BlockSvg.SEP_SPACE_X,p.align==Blockly.ALIGN_RIGHT?h+=r:p.align==Blockly.ALIGN_CENTRE&&(h+=r/2)),this.renderFields_(p.fieldRow,h,m),a.push(Blockly.BlockSvg.TAB_PATH_DOWN),r=q.height-Blockly.BlockSvg.TAB_HEIGHT,a.push("v",r),this.RTL?
|
||||
(b.push(Blockly.BlockSvg.TAB_PATH_DOWN_HIGHLIGHT_RTL),b.push("v",r+.5)):(b.push("M",f.rightEdge-5+","+(k+Blockly.BlockSvg.TAB_HEIGHT-.7)),b.push("l",.46*Blockly.BlockSvg.TAB_WIDTH+",-2.1")),m=e.x+(this.RTL?-f.rightEdge-1:f.rightEdge+1),n=e.y+k,p.connection.moveTo(m,n),p.connection.isConnected()&&(p.connection.tighten_(),this.width=Math.max(this.width,f.rightEdge+p.connection.targetBlock().getHeightWidth().width-Blockly.BlockSvg.TAB_WIDTH+1))):q.type==Blockly.DUMMY_INPUT?(p=q[0],m=k,p.align!=Blockly.ALIGN_LEFT&&
|
||||
(r=f.rightEdge-p.fieldWidth-2*Blockly.BlockSvg.SEP_SPACE_X,f.hasValue&&(r-=Blockly.BlockSvg.TAB_WIDTH),p.align==Blockly.ALIGN_RIGHT?h+=r:p.align==Blockly.ALIGN_CENTRE&&(h+=r/2)),this.renderFields_(p.fieldRow,h,m),a.push("v",q.height),this.RTL&&b.push("v",q.height-1)):q.type==Blockly.NEXT_STATEMENT&&(p=q[0],0==l&&(a.push("v",Blockly.BlockSvg.SEP_SPACE_Y),this.RTL&&b.push("v",Blockly.BlockSvg.SEP_SPACE_Y-1),k+=Blockly.BlockSvg.SEP_SPACE_Y),m=k,p.align!=Blockly.ALIGN_LEFT&&(r=f.statementEdge-p.fieldWidth-
|
||||
2*Blockly.BlockSvg.SEP_SPACE_X,p.align==Blockly.ALIGN_RIGHT?h+=r:p.align==Blockly.ALIGN_CENTRE&&(h+=r/2)),this.renderFields_(p.fieldRow,h,m),h=f.statementEdge+Blockly.BlockSvg.NOTCH_WIDTH,a.push("H",h),a.push(Blockly.BlockSvg.INNER_TOP_LEFT_CORNER),a.push("v",q.height-2*Blockly.BlockSvg.CORNER_RADIUS),a.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER),a.push("H",f.rightEdge),this.RTL?(b.push("M",h-Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.DISTANCE_45_OUTSIDE+","+(k+Blockly.BlockSvg.DISTANCE_45_OUTSIDE)),
|
||||
b.push(Blockly.BlockSvg.INNER_TOP_LEFT_CORNER_HIGHLIGHT_RTL),b.push("v",q.height-2*Blockly.BlockSvg.CORNER_RADIUS),b.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_RTL)):(b.push("M",h-Blockly.BlockSvg.NOTCH_WIDTH+Blockly.BlockSvg.DISTANCE_45_OUTSIDE+","+(k+q.height-Blockly.BlockSvg.DISTANCE_45_OUTSIDE)),b.push(Blockly.BlockSvg.INNER_BOTTOM_LEFT_CORNER_HIGHLIGHT_LTR)),b.push("H",f.rightEdge-.5),m=e.x+(this.RTL?-h:h+1),n=e.y+k+1,p.connection.moveTo(m,n),p.connection.isConnected()&&(p.connection.tighten_(),
|
||||
this.width=Math.max(this.width,f.statementEdge+p.connection.targetBlock().getHeightWidth().width)),l==f.length-1||f[l+1].type==Blockly.NEXT_STATEMENT)&&(a.push("v",Blockly.BlockSvg.SEP_SPACE_Y),this.RTL&&b.push("v",Blockly.BlockSvg.SEP_SPACE_Y-1),k+=Blockly.BlockSvg.SEP_SPACE_Y);k+=q.height}f.length||(k=Blockly.BlockSvg.MIN_BLOCK_Y,a.push("V",k),this.RTL&&b.push("V",k-1));return k};
|
||||
Blockly.BlockSvg.prototype.renderDrawBottom_=function(a,b,c,d){this.height+=d+1;this.nextConnection&&(a.push("H",Blockly.BlockSvg.NOTCH_WIDTH+(this.RTL?.5:-.5)+" "+Blockly.BlockSvg.NOTCH_PATH_RIGHT),this.nextConnection.moveTo(this.RTL?c.x-Blockly.BlockSvg.NOTCH_WIDTH:c.x+Blockly.BlockSvg.NOTCH_WIDTH,c.y+d+1),this.nextConnection.isConnected()&&this.nextConnection.tighten_(),this.height+=4);this.squareBottomLeftCorner_?(a.push("H 0"),this.RTL||b.push("M","0.5,"+(d-.5))):(a.push("H",Blockly.BlockSvg.CORNER_RADIUS),
|
||||
a.push("a",Blockly.BlockSvg.CORNER_RADIUS+","+Blockly.BlockSvg.CORNER_RADIUS+" 0 0,1 -"+Blockly.BlockSvg.CORNER_RADIUS+",-"+Blockly.BlockSvg.CORNER_RADIUS),this.RTL||(b.push("M",Blockly.BlockSvg.DISTANCE_45_INSIDE+","+(d-Blockly.BlockSvg.DISTANCE_45_INSIDE)),b.push("A",Blockly.BlockSvg.CORNER_RADIUS-.5+","+(Blockly.BlockSvg.CORNER_RADIUS-.5)+" 0 0,1 0.5,"+(d-Blockly.BlockSvg.CORNER_RADIUS))))};
|
||||
Blockly.BlockSvg.prototype.renderDrawLeft_=function(a,b,c,d){this.outputConnection?(this.outputConnection.moveTo(c.x,c.y),a.push("V",Blockly.BlockSvg.TAB_HEIGHT),a.push("c 0,-10 -"+Blockly.BlockSvg.TAB_WIDTH+",8 -"+Blockly.BlockSvg.TAB_WIDTH+",-7.5 s "+Blockly.BlockSvg.TAB_WIDTH+",2.5 "+Blockly.BlockSvg.TAB_WIDTH+",-7.5"),this.RTL?(b.push("M",-.25*Blockly.BlockSvg.TAB_WIDTH+",8.4"),b.push("l",-.45*Blockly.BlockSvg.TAB_WIDTH+",-2.1")):(b.push("V",Blockly.BlockSvg.TAB_HEIGHT-1.5),b.push("m",-.92*Blockly.BlockSvg.TAB_WIDTH+
|
||||
Blockly.BlockSvg.prototype.renderDrawLeft_=function(a,b,c){this.outputConnection?(this.outputConnection.moveTo(c.x,c.y),a.push("V",Blockly.BlockSvg.TAB_HEIGHT),a.push("c 0,-10 -"+Blockly.BlockSvg.TAB_WIDTH+",8 -"+Blockly.BlockSvg.TAB_WIDTH+",-7.5 s "+Blockly.BlockSvg.TAB_WIDTH+",2.5 "+Blockly.BlockSvg.TAB_WIDTH+",-7.5"),this.RTL?(b.push("M",-.25*Blockly.BlockSvg.TAB_WIDTH+",8.4"),b.push("l",-.45*Blockly.BlockSvg.TAB_WIDTH+",-2.1")):(b.push("V",Blockly.BlockSvg.TAB_HEIGHT-1.5),b.push("m",-.92*Blockly.BlockSvg.TAB_WIDTH+
|
||||
",-0.5 q "+-.19*Blockly.BlockSvg.TAB_WIDTH+",-5.5 0,-11"),b.push("m",.92*Blockly.BlockSvg.TAB_WIDTH+",1 V 0.5 H 1")),this.width+=Blockly.BlockSvg.TAB_WIDTH):this.RTL||(this.squareTopLeftCorner_?b.push("V",.5):b.push("V",Blockly.BlockSvg.CORNER_RADIUS));a.push("z")};Blockly.Events={};Blockly.Events.group_="";Blockly.Events.recordUndo=!0;Blockly.Events.disabled_=0;Blockly.Events.CREATE="create";Blockly.Events.DELETE="delete";Blockly.Events.CHANGE="change";Blockly.Events.MOVE="move";Blockly.Events.UI="ui";Blockly.Events.FIRE_QUEUE_=[];Blockly.Events.fire=function(a){Blockly.Events.isEnabled()&&(Blockly.Events.FIRE_QUEUE_.length||setTimeout(Blockly.Events.fireNow_,0),Blockly.Events.FIRE_QUEUE_.push(a))};
|
||||
Blockly.Events.fireNow_=function(){for(var a=Blockly.Events.filter(Blockly.Events.FIRE_QUEUE_,!0),b=Blockly.Events.FIRE_QUEUE_.length=0,c;c=a[b];b++){var d=Blockly.Workspace.getById(c.workspaceId);d&&d.fireChangeListener(c)}};
|
||||
Blockly.Events.filter=function(a,b){var c=goog.array.clone(a);b||c.reverse();for(var d=0,e;e=c[d];d++)for(var f=d+1,g;g=c[f];f++)e.type==g.type&&e.blockId==g.blockId&&e.workspaceId==g.workspaceId&&(e.type==Blockly.Events.MOVE?(e.newParentId=g.newParentId,e.newInputName=g.newInputName,e.newCoordinate=g.newCoordinate,c.splice(f,1),f--):e.type==Blockly.Events.CHANGE&&e.element==g.element&&e.name==g.name?(e.newValue=g.newValue,c.splice(f,1),f--):e.type!=Blockly.Events.UI||"click"!=g.element||"commentOpen"!=
|
||||
@@ -1215,9 +1222,9 @@ Blockly.Events.fromJson=function(a,b){var c;switch(a.type){case Blockly.Events.C
|
||||
Blockly.Events.Abstract=function(a){a&&(this.blockId=a.id,this.workspaceId=a.workspace.id);this.group=Blockly.Events.group_;this.recordUndo=Blockly.Events.recordUndo};Blockly.Events.Abstract.prototype.toJson=function(){var a={type:this.type,blockId:this.blockId};this.group&&(a.group=this.group);return a};Blockly.Events.Abstract.prototype.fromJson=function(a){this.blockId=a.blockId;this.group=a.group};Blockly.Events.Abstract.prototype.isNull=function(){return!1};
|
||||
Blockly.Events.Abstract.prototype.run=function(a){};Blockly.Events.Create=function(a){a&&(Blockly.Events.Create.superClass_.constructor.call(this,a),this.xml=Blockly.Xml.blockToDomWithXY(a),this.ids=Blockly.Events.getDescendantIds_(a))};goog.inherits(Blockly.Events.Create,Blockly.Events.Abstract);Blockly.Events.Create.prototype.type=Blockly.Events.CREATE;
|
||||
Blockly.Events.Create.prototype.toJson=function(){var a=Blockly.Events.Create.superClass_.toJson.call(this);a.xml=Blockly.Xml.domToText(this.xml);a.ids=this.ids;return a};Blockly.Events.Create.prototype.fromJson=function(a){Blockly.Events.Create.superClass_.fromJson.call(this,a);this.xml=Blockly.Xml.textToDom("<xml>"+a.xml+"</xml>").firstChild;this.ids=a.ids};
|
||||
Blockly.Events.Create.prototype.run=function(a){var b=Blockly.Workspace.getById(this.workspaceId);if(a)a=goog.dom.createDom("xml"),a.appendChild(this.xml),Blockly.Xml.domToWorkspace(a,b);else{a=0;for(var c;c=this.ids[a];a++){var d=b.getBlockById(c);d?d.dispose(!1,!0):c==this.blockId&&console.warn("Can't uncreate non-existant block: "+c)}}};
|
||||
Blockly.Events.Create.prototype.run=function(a){var b=Blockly.Workspace.getById(this.workspaceId);if(a)a=goog.dom.createDom("xml"),a.appendChild(this.xml),Blockly.Xml.domToWorkspace(a,b);else{a=0;for(var c;c=this.ids[a];a++){var d=b.getBlockById(c);d?d.dispose(!1,!1):c==this.blockId&&console.warn("Can't uncreate non-existant block: "+c)}}};
|
||||
Blockly.Events.Delete=function(a){if(a){if(a.getParent())throw"Connected blocks cannot be deleted.";Blockly.Events.Delete.superClass_.constructor.call(this,a);this.oldXml=Blockly.Xml.blockToDomWithXY(a);this.ids=Blockly.Events.getDescendantIds_(a)}};goog.inherits(Blockly.Events.Delete,Blockly.Events.Abstract);Blockly.Events.Delete.prototype.type=Blockly.Events.DELETE;Blockly.Events.Delete.prototype.toJson=function(){var a=Blockly.Events.Delete.superClass_.toJson.call(this);a.ids=this.ids;return a};
|
||||
Blockly.Events.Delete.prototype.fromJson=function(a){Blockly.Events.Delete.superClass_.fromJson.call(this,a);this.ids=a.ids};Blockly.Events.Delete.prototype.run=function(a){var b=Blockly.Workspace.getById(this.workspaceId);if(a){a=0;for(var c;c=this.ids[a];a++){var d=b.getBlockById(c);d?d.dispose(!1,!0):c==this.blockId&&console.warn("Can't delete non-existant block: "+c)}}else a=goog.dom.createDom("xml"),a.appendChild(this.oldXml),Blockly.Xml.domToWorkspace(a,b)};
|
||||
Blockly.Events.Delete.prototype.fromJson=function(a){Blockly.Events.Delete.superClass_.fromJson.call(this,a);this.ids=a.ids};Blockly.Events.Delete.prototype.run=function(a){var b=Blockly.Workspace.getById(this.workspaceId);if(a){a=0;for(var c;c=this.ids[a];a++){var d=b.getBlockById(c);d?d.dispose(!1,!1):c==this.blockId&&console.warn("Can't delete non-existant block: "+c)}}else a=goog.dom.createDom("xml"),a.appendChild(this.oldXml),Blockly.Xml.domToWorkspace(a,b)};
|
||||
Blockly.Events.Change=function(a,b,c,d,e){a&&(Blockly.Events.Change.superClass_.constructor.call(this,a),this.element=b,this.name=c,this.oldValue=d,this.newValue=e)};goog.inherits(Blockly.Events.Change,Blockly.Events.Abstract);Blockly.Events.Change.prototype.type=Blockly.Events.CHANGE;Blockly.Events.Change.prototype.toJson=function(){var a=Blockly.Events.Change.superClass_.toJson.call(this);a.element=this.element;this.name&&(a.name=this.name);a.newValue=this.newValue;return a};
|
||||
Blockly.Events.Change.prototype.fromJson=function(a){Blockly.Events.Change.superClass_.fromJson.call(this,a);this.element=a.element;this.name=a.name;this.newValue=a.newValue};Blockly.Events.Change.prototype.isNull=function(){return this.oldValue==this.newValue};
|
||||
Blockly.Events.Change.prototype.run=function(a){var b=Blockly.Workspace.getById(this.workspaceId).getBlockById(this.blockId);if(b)switch(b.mutator&&b.mutator.setVisible(!1),a=a?this.newValue:this.oldValue,this.element){case "field":(b=b.getField(this.name))?b.setValue(a):console.warn("Can't set non-existant field: "+this.name);break;case "comment":b.setCommentText(a||null);break;case "collapsed":b.setCollapsed(a);break;case "disabled":b.setDisabled(a);break;case "inline":b.setInputsInline(a);break;
|
||||
@@ -1289,7 +1296,7 @@ Blockly.Names.prototype.getName=function(a,b){var c=a.toLowerCase()+"_"+b,d=b==B
|
||||
Blockly.Names.prototype.safeName_=function(a){a?(a=encodeURI(a.replace(/ /g,"_")).replace(/[^\w]/g,"_"),-1!="0123456789".indexOf(a[0])&&(a="my_"+a)):a="unnamed";return a};Blockly.Names.equals=function(a,b){return a.toLowerCase()==b.toLowerCase()};Blockly.Procedures={};Blockly.Procedures.NAME_TYPE="PROCEDURE";Blockly.Procedures.allProcedures=function(a){a=a.getAllBlocks();for(var b=[],c=[],d=0;d<a.length;d++)if(a[d].getProcedureDef){var e=a[d].getProcedureDef();e&&(e[2]?b.push(e):c.push(e))}c.sort(Blockly.Procedures.procTupleComparator_);b.sort(Blockly.Procedures.procTupleComparator_);return[c,b]};Blockly.Procedures.procTupleComparator_=function(a,b){return a[0].toLowerCase().localeCompare(b[0].toLowerCase())};
|
||||
Blockly.Procedures.findLegalName=function(a,b){if(b.isInFlyout)return a;for(;!Blockly.Procedures.isLegalName(a,b.workspace,b);){var c=a.match(/^(.*?)(\d+)$/);a=c?c[1]+(parseInt(c[2],10)+1):a+"2"}return a};Blockly.Procedures.isLegalName=function(a,b,c){b=b.getAllBlocks();for(var d=0;d<b.length;d++)if(b[d]!=c&&b[d].getProcedureDef){var e=b[d].getProcedureDef();if(Blockly.Names.equals(e[0],a))return!1}return!0};
|
||||
Blockly.Procedures.rename=function(a){a=a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"");a=Blockly.Procedures.findLegalName(a,this.sourceBlock_);for(var b=this.sourceBlock_.workspace.getAllBlocks(),c=0;c<b.length;c++)b[c].renameProcedure&&b[c].renameProcedure(this.text_,a);return a};
|
||||
Blockly.Procedures.flyoutCategory=function(a){function b(a,b){for(var d=0;d<a.length;d++){var h=a[d][0],k=a[d][1],l=goog.dom.createDom("block");l.setAttribute("type",b);l.setAttribute("gap",16);var n=goog.dom.createDom("mutation");n.setAttribute("name",h);l.appendChild(n);for(h=0;h<k.length;h++){var m=goog.dom.createDom("arg");m.setAttribute("name",k[h]);n.appendChild(m)}c.push(l)}}var c=[];if(Blockly.Blocks.procedures_defnoreturn){var d=goog.dom.createDom("block");d.setAttribute("type","procedures_defnoreturn");
|
||||
Blockly.Procedures.flyoutCategory=function(a){function b(a,b){for(var d=0;d<a.length;d++){var h=a[d][0],k=a[d][1],m=goog.dom.createDom("block");m.setAttribute("type",b);m.setAttribute("gap",16);var n=goog.dom.createDom("mutation");n.setAttribute("name",h);m.appendChild(n);for(h=0;h<k.length;h++){var l=goog.dom.createDom("arg");l.setAttribute("name",k[h]);n.appendChild(l)}c.push(m)}}var c=[];if(Blockly.Blocks.procedures_defnoreturn){var d=goog.dom.createDom("block");d.setAttribute("type","procedures_defnoreturn");
|
||||
d.setAttribute("gap",16);c.push(d)}Blockly.Blocks.procedures_defreturn&&(d=goog.dom.createDom("block"),d.setAttribute("type","procedures_defreturn"),d.setAttribute("gap",16),c.push(d));Blockly.Blocks.procedures_ifreturn&&(d=goog.dom.createDom("block"),d.setAttribute("type","procedures_ifreturn"),d.setAttribute("gap",16),c.push(d));c.length&&c[c.length-1].setAttribute("gap",24);a=Blockly.Procedures.allProcedures(a);b(a[0],"procedures_callnoreturn");b(a[1],"procedures_callreturn");return c};
|
||||
Blockly.Procedures.getCallers=function(a,b){for(var c=[],d=b.getAllBlocks(),e=0;e<d.length;e++)if(d[e].getProcedureCall){var f=d[e].getProcedureCall();f&&Blockly.Names.equals(f,a)&&c.push(d[e])}return c};Blockly.Procedures.disposeCallers=function(a,b){for(var c=Blockly.Procedures.getCallers(a,b),d=0;d<c.length;d++)c[d].dispose(!0,!1)};
|
||||
Blockly.Procedures.mutateCallers=function(a){var b=Blockly.Events.recordUndo,c=a.getProcedureDef()[0],d=a.mutationToDom(!0);a=Blockly.Procedures.getCallers(c,a.workspace);for(var c=0,e;e=a[c];c++){var f=e.mutationToDom(),f=f&&Blockly.Xml.domToText(f);e.domToMutation(d);var g=e.mutationToDom(),g=g&&Blockly.Xml.domToText(g);f!=g&&(Blockly.Events.recordUndo=!1,Blockly.Events.fire(new Blockly.Events.Change(e,"mutation",null,f,g)),Blockly.Events.recordUndo=b)}};
|
||||
@@ -1311,7 +1318,7 @@ Blockly.Flyout.prototype.setBackgroundPathHorizontal_=function(a,b){var c=this.t
|
||||
Blockly.Flyout.prototype.wheel_=function(a){var b=this.horizontalLayout_?a.deltaX:a.deltaY;if(b){goog.userAgent.GECKO&&(b*=10);var c=this.getMetrics_(),b=this.horizontalLayout_?c.viewLeft+b:c.viewTop+b,b=Math.min(b,this.horizontalLayout_?c.contentWidth-c.viewWidth:c.contentHeight-c.viewHeight),b=Math.max(b,0);this.scrollbar_.set(b)}a.preventDefault();a.stopPropagation()};Blockly.Flyout.prototype.isVisible=function(){return this.svgGroup_&&"block"==this.svgGroup_.style.display};
|
||||
Blockly.Flyout.prototype.hide=function(){if(this.isVisible()){this.svgGroup_.style.display="none";for(var a=0,b;b=this.listeners_[a];a++)Blockly.unbindEvent_(b);this.listeners_.length=0;this.reflowWrapper_&&(this.workspace_.removeChangeListener(this.reflowWrapper_),this.reflowWrapper_=null)}};
|
||||
Blockly.Flyout.prototype.show=function(a){this.hide();this.clearOldBlocks_();a==Blockly.Variables.NAME_TYPE?a=Blockly.Variables.flyoutCategory(this.workspace_.targetWorkspace):a==Blockly.Procedures.NAME_TYPE&&(a=Blockly.Procedures.flyoutCategory(this.workspace_.targetWorkspace));this.svgGroup_.style.display="block";for(var b=[],c=[],d=this.permanentlyDisabled_.length=0,e;e=a[d];d++)if(e.tagName&&"BLOCK"==e.tagName.toUpperCase()){var f=Blockly.Xml.domToBlock(e,this.workspace_);f.disabled&&this.permanentlyDisabled_.push(f);
|
||||
b.push(f);e=parseInt(e.getAttribute("gap"),10);c.push(isNaN(e)?3*this.MARGIN:e)}this.layoutBlocks_(b,c);this.listeners_.push(Blockly.bindEvent_(this.svgBackground_,"mouseover",this,function(a){a=this.workspace_.getTopBlocks(!1);for(var b=0,c;c=a[b];b++)c.removeSelect()}));this.horizontalLayout_?this.height_=0:this.width_=0;this.reflow();this.offsetHorizontalRtlBlocks(this.workspace_.getTopBlocks(!1));this.filterForCapacity_();Blockly.svgResize(this.workspace_);this.reflowWrapper_=this.reflow.bind(this);
|
||||
b.push(f);e=parseInt(e.getAttribute("gap"),10);c.push(isNaN(e)?3*this.MARGIN:e)}this.layoutBlocks_(b,c);this.listeners_.push(Blockly.bindEvent_(this.svgBackground_,"mouseover",this,function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)c.removeSelect()}));this.horizontalLayout_?this.height_=0:this.width_=0;this.reflow();this.offsetHorizontalRtlBlocks(this.workspace_.getTopBlocks(!1));this.filterForCapacity_();Blockly.svgResize(this.workspace_);this.reflowWrapper_=this.reflow.bind(this);
|
||||
this.workspace_.addChangeListener(this.reflowWrapper_)};
|
||||
Blockly.Flyout.prototype.layoutBlocks_=function(a,b){for(var c=this.MARGIN*this.workspace_.scale,d=this.RTL?c:c+Blockly.BlockSvg.TAB_WIDTH,e=0,f;f=a[e];e++){for(var g=f.getDescendants(),h=0,k;k=g[h];h++)k.isInFlyout=!0;f.render();g=f.getSvgRoot();h=f.getHeightWidth();k=f.outputConnection?Blockly.BlockSvg.TAB_WIDTH:0;this.horizontalLayout_&&(d+=k);f.moveBy(this.horizontalLayout_&&this.RTL?-d:d,c);this.horizontalLayout_?d+=h.width+b[e]-k:c+=h.height+b[e];h=Blockly.createSvgElement("rect",{"fill-opacity":0},
|
||||
null);h.tooltip=f;Blockly.Tooltip.bindMouseEvents(h);this.workspace_.getCanvas().insertBefore(h,f.getSvgRoot());f.flyoutRect_=h;this.buttons_[e]=h;this.addBlockListeners_(g,f,h)}};Blockly.Flyout.prototype.clearOldBlocks_=function(){for(var a=this.workspace_.getTopBlocks(!1),b=0,c;c=a[b];b++)c.workspace==this.workspace_&&c.dispose(!1,!1);for(a=0;b=this.buttons_[a];a++)goog.dom.removeNode(b);this.buttons_.length=0};
|
||||
@@ -1341,8 +1348,8 @@ toolboxPosition:a.options.toolboxPosition});goog.dom.insertSiblingAfter(this.fly
|
||||
this.position()};Blockly.Toolbox.prototype.dispose=function(){this.flyout_.dispose();this.tree_.dispose();goog.dom.removeNode(this.HtmlDiv);this.lastCategory_=this.workspace_=null};Blockly.Toolbox.prototype.getWidth=function(){return this.width};Blockly.Toolbox.prototype.getHeight=function(){return this.height};
|
||||
Blockly.Toolbox.prototype.position=function(){var a=this.HtmlDiv;if(a){var b=this.workspace_.getParentSvg(),c=goog.style.getPageOffset(b),b=Blockly.svgSize(b);this.horizontalLayout_?(a.style.left=c.x+"px",a.style.height="auto",a.style.width=b.width+"px",this.height=a.offsetHeight,a.style.top=this.toolboxPosition==Blockly.TOOLBOX_AT_TOP?c.y+"px":c.y+b.height-a.offsetHeight+"px"):(a.style.left=this.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT?c.x+b.width-a.offsetWidth+"px":c.x+"px",a.style.height=b.height+
|
||||
"px",a.style.top=c.y+"px",this.width=a.offsetWidth,this.toolboxPosition==Blockly.TOOLBOX_AT_LEFT&&--this.width);this.flyout_.position()}};
|
||||
Blockly.Toolbox.prototype.populate_=function(a){function b(a,g,h){for(var k=null,l=0,n;n=a.childNodes[l];l++)if(n.tagName)switch(n.tagName.toUpperCase()){case "CATEGORY":k=c.createNode(n.getAttribute("name"));k.blocks=[];g.add(k);var m=n.getAttribute("custom");m?k.blocks=m:b(n,k,h);m=n.getAttribute("colour");goog.isString(m)?(m.match(/^#[0-9a-fA-F]{6}$/)?k.hexColour=m:k.hexColour=Blockly.hueToRgb(m),e=!0):k.hexColour="";"true"==n.getAttribute("expanded")?(k.blocks.length&&c.setSelectedItem(k),k.setExpanded(!0)):
|
||||
k.setExpanded(!1);k=n;break;case "SEP":k&&("CATEGORY"==k.tagName.toUpperCase()?g.add(new Blockly.Toolbox.TreeSeparator(d.treeSeparatorConfig_)):(n=parseFloat(n.getAttribute("gap")),isNaN(n)||(m=parseFloat(k.getAttribute("gap")),n=isNaN(m)?n:m+n,k.setAttribute("gap",n))));break;case "BLOCK":case "SHADOW":g.blocks.push(n),k=n}}var c=this.tree_,d=this;c.removeChildren();c.blocks=[];var e=!1;b(a,this.tree_,this.workspace_.options.pathToMedia);this.hasColours_=e;if(c.blocks.length)throw"Toolbox cannot have both blocks and categories in the root level.";
|
||||
Blockly.Toolbox.prototype.populate_=function(a){function b(a,g,h){for(var k=null,m=0,n;n=a.childNodes[m];m++)if(n.tagName)switch(n.tagName.toUpperCase()){case "CATEGORY":k=c.createNode(n.getAttribute("name"));k.blocks=[];g.add(k);var l=n.getAttribute("custom");l?k.blocks=l:b(n,k,h);l=n.getAttribute("colour");goog.isString(l)?(l.match(/^#[0-9a-fA-F]{6}$/)?k.hexColour=l:k.hexColour=Blockly.hueToRgb(l),e=!0):k.hexColour="";"true"==n.getAttribute("expanded")?(k.blocks.length&&c.setSelectedItem(k),k.setExpanded(!0)):
|
||||
k.setExpanded(!1);k=n;break;case "SEP":k&&("CATEGORY"==k.tagName.toUpperCase()?g.add(new Blockly.Toolbox.TreeSeparator(d.treeSeparatorConfig_)):(n=parseFloat(n.getAttribute("gap")),isNaN(n)||(l=parseFloat(k.getAttribute("gap")),n=isNaN(l)?n:l+n,k.setAttribute("gap",n))));break;case "BLOCK":case "SHADOW":g.blocks.push(n),k=n}}var c=this.tree_,d=this;c.removeChildren();c.blocks=[];var e=!1;b(a,this.tree_,this.workspace_.options.pathToMedia);this.hasColours_=e;if(c.blocks.length)throw"Toolbox cannot have both blocks and categories in the root level.";
|
||||
Blockly.asyncSvgResize(this.workspace_)};Blockly.Toolbox.prototype.addColour_=function(a){a=(a||this.tree_).getChildren();for(var b=0,c;c=a[b];b++){var d=c.getRowElement();if(d){var e=this.hasColours_?"8px solid "+(c.hexColour||"#ddd"):"none";this.workspace_.RTL?d.style.borderRight=e:d.style.borderLeft=e}this.addColour_(c)}};Blockly.Toolbox.prototype.clearSelection=function(){this.tree_.setSelectedItem(null)};
|
||||
Blockly.Toolbox.prototype.getClientRect=function(){var a=this.HtmlDiv.getBoundingClientRect(),b=a.left,c=a.top,d=a.width,a=a.height;return this.toolboxPosition==Blockly.TOOLBOX_AT_LEFT?new goog.math.Rect(-1E7,-1E7,1E7+b+d,2E7):this.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT?new goog.math.Rect(b,-1E7,1E7+d,2E7):this.toolboxPosition==Blockly.TOOLBOX_AT_TOP?new goog.math.Rect(-1E7,-1E7,2E7,1E7+c+a):new goog.math.Rect(0,c,2E7,1E7+d)};
|
||||
Blockly.Toolbox.TreeControl=function(a,b){this.toolbox_=a;goog.ui.tree.TreeControl.call(this,goog.html.SafeHtml.EMPTY,b)};goog.inherits(Blockly.Toolbox.TreeControl,goog.ui.tree.TreeControl);Blockly.Toolbox.TreeControl.prototype.enterDocument=function(){Blockly.Toolbox.TreeControl.superClass_.enterDocument.call(this);if(goog.events.BrowserFeature.TOUCH_ENABLED){var a=this.getElement();Blockly.bindEvent_(a,goog.events.EventType.TOUCHSTART,this,this.handleTouchEvent_)}};
|
||||
@@ -1373,14 +1380,15 @@ Blockly.Css.CONTENT=[".blocklySvg {","background-color: #fff;","outline: none;",
|
||||
"position: absolute;","right: 0;","text-align: right;","}",".blocklyWidgetDiv .goog-menuitem-rtl .goog-menuitem-accel {","left: 0;","right: auto;","text-align: left;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-hint {","text-decoration: underline;","}",".blocklyWidgetDiv .goog-menuitem-mnemonic-separator {","color: #999;","font-size: 12px;","padding-left: 4px;","}",".blocklyWidgetDiv .goog-menuseparator {","border-top: 1px solid #ccc;","margin: 4px 0;","padding: 0;","}",""];Blockly.WidgetDiv={};Blockly.WidgetDiv.DIV=null;Blockly.WidgetDiv.owner_=null;Blockly.WidgetDiv.dispose_=null;Blockly.WidgetDiv.createDom=function(){Blockly.WidgetDiv.DIV||(Blockly.WidgetDiv.DIV=goog.dom.createDom("div","blocklyWidgetDiv"),document.body.appendChild(Blockly.WidgetDiv.DIV))};
|
||||
Blockly.WidgetDiv.show=function(a,b,c){Blockly.WidgetDiv.hide();Blockly.WidgetDiv.owner_=a;Blockly.WidgetDiv.dispose_=c;a=goog.style.getViewportPageOffset(document);Blockly.WidgetDiv.DIV.style.top=a.y+"px";Blockly.WidgetDiv.DIV.style.direction=b?"rtl":"ltr";Blockly.WidgetDiv.DIV.style.display="block"};
|
||||
Blockly.WidgetDiv.hide=function(){Blockly.WidgetDiv.owner_&&(Blockly.WidgetDiv.owner_=null,Blockly.WidgetDiv.DIV.style.display="none",Blockly.WidgetDiv.DIV.style.left="",Blockly.WidgetDiv.DIV.style.top="",Blockly.WidgetDiv.DIV.style.height="",Blockly.WidgetDiv.dispose_&&Blockly.WidgetDiv.dispose_(),Blockly.WidgetDiv.dispose_=null,goog.dom.removeChildren(Blockly.WidgetDiv.DIV))};Blockly.WidgetDiv.isVisible=function(){return!!Blockly.WidgetDiv.owner_};
|
||||
Blockly.WidgetDiv.hideIfOwner=function(a){Blockly.WidgetDiv.owner_==a&&Blockly.WidgetDiv.hide()};Blockly.WidgetDiv.position=function(a,b,c,d,e){b<d.y&&(b=d.y);e?a>c.width+d.x&&(a=c.width+d.x):a<d.x&&(a=d.x);Blockly.WidgetDiv.DIV.style.left=a+"px";Blockly.WidgetDiv.DIV.style.top=b+"px";Blockly.WidgetDiv.DIV.style.height=c.height-b+d.y+"px"};Blockly.constants={};Blockly.DRAG_RADIUS=5;Blockly.SNAP_RADIUS=20;Blockly.BUMP_DELAY=250;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.SVG_NS="http://www.w3.org/2000/svg";Blockly.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;Blockly.ALIGN_CENTRE=0;
|
||||
Blockly.ALIGN_RIGHT=1;Blockly.DRAG_NONE=0;Blockly.DRAG_STICKY=1;Blockly.DRAG_FREE=2;Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.TOOLBOX_AT_TOP=0;Blockly.TOOLBOX_AT_BOTTOM=1;Blockly.TOOLBOX_AT_LEFT=2;Blockly.TOOLBOX_AT_RIGHT=3;Blockly.inject=function(a,b){goog.isString(a)&&(a=document.getElementById(a)||document.querySelector(a));if(!goog.dom.contains(document,a))throw"Error: container is not in current document.";var c=new Blockly.Options(b||{}),d=Blockly.createDom_(a,c),c=Blockly.createMainWorkspace_(d,c);Blockly.init_(c);c.markFocused();Blockly.bindEvent_(d,"focus",c,c.markFocused);return c};
|
||||
Blockly.WidgetDiv.hideIfOwner=function(a){Blockly.WidgetDiv.owner_==a&&Blockly.WidgetDiv.hide()};Blockly.WidgetDiv.position=function(a,b,c,d,e){b<d.y&&(b=d.y);e?a>c.width+d.x&&(a=c.width+d.x):a<d.x&&(a=d.x);Blockly.WidgetDiv.DIV.style.left=a+"px";Blockly.WidgetDiv.DIV.style.top=b+"px";Blockly.WidgetDiv.DIV.style.height=c.height-b+d.y+"px"};Blockly.constants={};Blockly.DRAG_RADIUS=5;Blockly.SNAP_RADIUS=20;Blockly.BUMP_DELAY=250;Blockly.COLLAPSE_CHARS=30;Blockly.LONGPRESS=750;Blockly.SOUND_LIMIT=100;Blockly.HSV_SATURATION=.45;Blockly.HSV_VALUE=.65;Blockly.SPRITE={width:96,height:124,url:"sprites.png"};Blockly.SVG_NS="http://www.w3.org/2000/svg";Blockly.HTML_NS="http://www.w3.org/1999/xhtml";Blockly.INPUT_VALUE=1;Blockly.OUTPUT_VALUE=2;Blockly.NEXT_STATEMENT=3;Blockly.PREVIOUS_STATEMENT=4;Blockly.DUMMY_INPUT=5;Blockly.ALIGN_LEFT=-1;
|
||||
Blockly.ALIGN_CENTRE=0;Blockly.ALIGN_RIGHT=1;Blockly.DRAG_NONE=0;Blockly.DRAG_STICKY=1;Blockly.DRAG_FREE=2;Blockly.OPPOSITE_TYPE=[];Blockly.OPPOSITE_TYPE[Blockly.INPUT_VALUE]=Blockly.OUTPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.OUTPUT_VALUE]=Blockly.INPUT_VALUE;Blockly.OPPOSITE_TYPE[Blockly.NEXT_STATEMENT]=Blockly.PREVIOUS_STATEMENT;Blockly.OPPOSITE_TYPE[Blockly.PREVIOUS_STATEMENT]=Blockly.NEXT_STATEMENT;Blockly.TOOLBOX_AT_TOP=0;Blockly.TOOLBOX_AT_BOTTOM=1;Blockly.TOOLBOX_AT_LEFT=2;
|
||||
Blockly.TOOLBOX_AT_RIGHT=3;Blockly.inject=function(a,b){goog.isString(a)&&(a=document.getElementById(a)||document.querySelector(a));if(!goog.dom.contains(document,a))throw"Error: container is not in current document.";var c=new Blockly.Options(b||{}),d=Blockly.createDom_(a,c),c=Blockly.createMainWorkspace_(d,c);Blockly.init_(c);c.markFocused();Blockly.bindEvent_(d,"focus",c,c.markFocused);return c};
|
||||
Blockly.createDom_=function(a,b){a.setAttribute("dir","LTR");goog.ui.Component.setDefaultRightToLeft(b.RTL);Blockly.Css.inject(b.hasCss,b.pathToMedia);var c=Blockly.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:html":"http://www.w3.org/1999/xhtml","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1","class":"blocklySvg"},a),d=Blockly.createSvgElement("defs",{},c),e=String(Math.random()).substring(2),f=Blockly.createSvgElement("filter",{id:"blocklyEmbossFilter"+e},d);Blockly.createSvgElement("feGaussianBlur",
|
||||
{"in":"SourceAlpha",stdDeviation:1,result:"blur"},f);var g=Blockly.createSvgElement("feSpecularLighting",{"in":"blur",surfaceScale:1,specularConstant:.5,specularExponent:10,"lighting-color":"white",result:"specOut"},f);Blockly.createSvgElement("fePointLight",{x:-5E3,y:-1E4,z:2E4},g);Blockly.createSvgElement("feComposite",{"in":"specOut",in2:"SourceAlpha",operator:"in",result:"specOut"},f);Blockly.createSvgElement("feComposite",{"in":"SourceGraphic",in2:"specOut",operator:"arithmetic",k1:0,k2:1,k3:1,
|
||||
k4:0},f);b.embossFilterId=f.id;f=Blockly.createSvgElement("pattern",{id:"blocklyDisabledPattern"+e,patternUnits:"userSpaceOnUse",width:10,height:10},d);Blockly.createSvgElement("rect",{width:10,height:10,fill:"#aaa"},f);Blockly.createSvgElement("path",{d:"M 0 0 L 10 10 M 10 0 L 0 10",stroke:"#cc0"},f);b.disabledPatternId=f.id;d=Blockly.createSvgElement("pattern",{id:"blocklyGridPattern"+e,patternUnits:"userSpaceOnUse"},d);0<b.gridOptions.length&&0<b.gridOptions.spacing&&(Blockly.createSvgElement("line",
|
||||
{stroke:b.gridOptions.colour},d),1<b.gridOptions.length&&Blockly.createSvgElement("line",{stroke:b.gridOptions.colour},d));b.gridPattern=d;return c};
|
||||
Blockly.createMainWorkspace_=function(a,b){b.parentWorkspace=null;b.getMetrics=Blockly.getMainWorkspaceMetrics_;b.setMetrics=Blockly.setMainWorkspaceMetrics_;var c=new Blockly.WorkspaceSvg(b);c.scale=b.zoomOptions.startScale;a.appendChild(c.createDom("blocklyMainBackground"));c.translate(0,0);c.markFocused();b.readOnly||b.hasScrollbars||c.addChangeListener(function(){if(Blockly.dragMode_==Blockly.DRAG_NONE){var a=c.getMetrics(),e=a.viewLeft+a.absoluteLeft,f=a.viewTop+a.absoluteTop;if(a.contentTop<
|
||||
f||a.contentTop+a.contentHeight>a.viewHeight+f||a.contentLeft<(b.RTL?a.viewLeft:e)||a.contentLeft+a.contentWidth>(b.RTL?a.viewWidth:a.viewWidth+e))for(var g=c.getTopBlocks(!1),h=0,k;k=g[h];h++){var l=k.getRelativeToSurfaceXY(),n=k.getHeightWidth(),m=f+25-n.height-l.y;0<m&&k.moveBy(0,m);m=f+a.viewHeight-25-l.y;0>m&&k.moveBy(0,m);m=25+e-l.x-(b.RTL?0:n.width);0<m&&k.moveBy(m,0);l=e+a.viewWidth-25-l.x+(b.RTL?n.width:0);0>l&&k.moveBy(l,0)}}});Blockly.svgResize(c);Blockly.WidgetDiv.createDom();Blockly.Tooltip.createDom();
|
||||
f||a.contentTop+a.contentHeight>a.viewHeight+f||a.contentLeft<(b.RTL?a.viewLeft:e)||a.contentLeft+a.contentWidth>(b.RTL?a.viewWidth:a.viewWidth+e))for(var g=c.getTopBlocks(!1),h=0,k;k=g[h];h++){var m=k.getRelativeToSurfaceXY(),n=k.getHeightWidth(),l=f+25-n.height-m.y;0<l&&k.moveBy(0,l);l=f+a.viewHeight-25-m.y;0>l&&k.moveBy(0,l);l=25+e-m.x-(b.RTL?0:n.width);0<l&&k.moveBy(l,0);m=e+a.viewWidth-25-m.x+(b.RTL?n.width:0);0>m&&k.moveBy(m,0)}}});Blockly.svgResize(c);Blockly.WidgetDiv.createDom();Blockly.Tooltip.createDom();
|
||||
return c};
|
||||
Blockly.init_=function(a){var b=a.options,c=a.getParentSvg();Blockly.bindEvent_(c,"contextmenu",null,function(a){Blockly.isTargetInput_(a)||a.preventDefault()});Blockly.bindEvent_(window,"resize",null,function(){Blockly.hideChaff(!0);Blockly.asyncSvgResize(a)});Blockly.inject.bindDocumentEvents_();b.languageTree&&(a.toolbox_?a.toolbox_.init(a):a.flyout_&&(a.flyout_.init(a),a.flyout_.show(b.languageTree.childNodes),a.flyout_.scrollToStart(),a.scrollX=a.flyout_.width_,b.toolboxPosition==Blockly.TOOLBOX_AT_RIGHT&&(a.scrollX*=
|
||||
-1),a.translate(a.scrollX,0)));b.hasScrollbars&&(a.scrollbar=new Blockly.ScrollbarPair(a),a.scrollbar.resize());b.hasSounds&&Blockly.inject.loadSounds_(b.pathToMedia,a)};
|
||||
|
||||
+13
-11
@@ -618,17 +618,19 @@ Blockly.Blocks['lists_getSublist'] = {
|
||||
}
|
||||
var menu = new Blockly.FieldDropdown(this['WHERE_OPTIONS_' + n],
|
||||
function(value) {
|
||||
var newAt = (value == 'FROM_START') || (value == 'FROM_END');
|
||||
// The 'isAt' variable is available due to this function being a closure.
|
||||
if (newAt != isAt) {
|
||||
var block = this.sourceBlock_;
|
||||
block.updateAt_(n, newAt);
|
||||
// This menu has been destroyed and replaced. Update the replacement.
|
||||
block.setFieldValue(value, 'WHERE' + n);
|
||||
return null;
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
var newAt = (value == 'FROM_START') || (value == 'FROM_END');
|
||||
// The 'isAt' variable is available due to this function being a
|
||||
// closure.
|
||||
if (newAt != isAt) {
|
||||
var block = this.sourceBlock_;
|
||||
block.updateAt_(n, newAt);
|
||||
// This menu has been destroyed and replaced.
|
||||
// Update the replacement.
|
||||
block.setFieldValue(value, 'WHERE' + n);
|
||||
return null;
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
this.getInput('AT' + n)
|
||||
.appendField(menu, 'WHERE' + n);
|
||||
if (n == 1) {
|
||||
|
||||
+17
-15
@@ -271,21 +271,23 @@ Blockly.Blocks['logic_compare'] = {
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
init: function() {
|
||||
var OPERATORS = this.RTL ? [
|
||||
['=', 'EQ'],
|
||||
['\u2260', 'NEQ'],
|
||||
['>', 'LT'],
|
||||
['\u2265', 'LTE'],
|
||||
['<', 'GT'],
|
||||
['\u2264', 'GTE']
|
||||
] : [
|
||||
['=', 'EQ'],
|
||||
['\u2260', 'NEQ'],
|
||||
['<', 'LT'],
|
||||
['\u2264', 'LTE'],
|
||||
['>', 'GT'],
|
||||
['\u2265', 'GTE']
|
||||
];
|
||||
var rtlOperators = [
|
||||
['=', 'EQ'],
|
||||
['\u2260', 'NEQ'],
|
||||
['>', 'LT'],
|
||||
['\u2265', 'LTE'],
|
||||
['<', 'GT'],
|
||||
['\u2264', 'GTE']
|
||||
];
|
||||
var ltrOperators = [
|
||||
['=', 'EQ'],
|
||||
['\u2260', 'NEQ'],
|
||||
['<', 'LT'],
|
||||
['\u2264', 'LTE'],
|
||||
['>', 'GT'],
|
||||
['\u2265', 'GTE']
|
||||
];
|
||||
var OPERATORS = this.RTL ? rtlOperators : ltrOperators;
|
||||
this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL);
|
||||
this.setColour(Blockly.Blocks.logic.HUE);
|
||||
this.setOutput(true, 'Boolean');
|
||||
|
||||
@@ -64,7 +64,7 @@ Blockly.Blocks['procedures_defnoreturn'] = {
|
||||
* inconsistent as a result of the XML loading.
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
validate: function () {
|
||||
validate: function() {
|
||||
var name = Blockly.Procedures.findLegalName(
|
||||
this.getFieldValue('NAME'), this);
|
||||
this.setFieldValue(name, 'NAME');
|
||||
|
||||
+14
-11
@@ -498,17 +498,20 @@ Blockly.Blocks['text_getSubstring'] = {
|
||||
}
|
||||
var menu = new Blockly.FieldDropdown(this['WHERE_OPTIONS_' + n],
|
||||
function(value) {
|
||||
var newAt = (value == 'FROM_START') || (value == 'FROM_END');
|
||||
// The 'isAt' variable is available due to this function being a closure.
|
||||
if (newAt != isAt) {
|
||||
var block = this.sourceBlock_;
|
||||
block.updateAt_(n, newAt);
|
||||
// This menu has been destroyed and replaced. Update the replacement.
|
||||
block.setFieldValue(value, 'WHERE' + n);
|
||||
return null;
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
var newAt = (value == 'FROM_START') || (value == 'FROM_END');
|
||||
// The 'isAt' variable is available due to this function being a
|
||||
// closure.
|
||||
if (newAt != isAt) {
|
||||
var block = this.sourceBlock_;
|
||||
block.updateAt_(n, newAt);
|
||||
// This menu has been destroyed and replaced.
|
||||
// Update the replacement.
|
||||
block.setFieldValue(value, 'WHERE' + n);
|
||||
return null;
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
|
||||
this.getInput('AT' + n)
|
||||
.appendField(menu, 'WHERE' + n);
|
||||
if (n == 1) {
|
||||
|
||||
@@ -46,8 +46,8 @@ compose:function(a){var b=a.nextConnection.targetBlock();this.elseCount_=this.el
|
||||
Blockly.Blocks.controls_if_if={init:function(){this.setColour(Blockly.Blocks.logic.HUE);this.appendDummyInput().appendField(Blockly.Msg.CONTROLS_IF_IF_TITLE_IF);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.CONTROLS_IF_IF_TOOLTIP);this.contextMenu=!1}};
|
||||
Blockly.Blocks.controls_if_elseif={init:function(){this.setColour(Blockly.Blocks.logic.HUE);this.appendDummyInput().appendField(Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF);this.setPreviousStatement(!0);this.setNextStatement(!0);this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP);this.contextMenu=!1}};
|
||||
Blockly.Blocks.controls_if_else={init:function(){this.setColour(Blockly.Blocks.logic.HUE);this.appendDummyInput().appendField(Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE);this.setPreviousStatement(!0);this.setTooltip(Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP);this.contextMenu=!1}};
|
||||
Blockly.Blocks.logic_compare={init:function(){var a=this.RTL?[["=","EQ"],["\u2260","NEQ"],[">","LT"],["\u2265","LTE"],["<","GT"],["\u2264","GTE"]]:[["=","EQ"],["\u2260","NEQ"],["<","LT"],["\u2264","LTE"],[">","GT"],["\u2265","GTE"]];this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.setOutput(!0,"Boolean");this.appendValueInput("A");this.appendValueInput("B").appendField(new Blockly.FieldDropdown(a),"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a=
|
||||
b.getFieldValue("OP");return{EQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[a]});this.prevBlocks_=[null,null]},onchange:function(a){var b=this.getInputTargetBlock("A"),c=this.getInputTargetBlock("B");if(b&&c&&!b.outputConnection.checkType_(c.outputConnection)){Blockly.Events.setGroup(a.group);for(a=0;a<
|
||||
Blockly.Blocks.logic_compare={init:function(){var a=[["=","EQ"],["\u2260","NEQ"],[">","LT"],["\u2265","LTE"],["<","GT"],["\u2264","GTE"]],b=[["=","EQ"],["\u2260","NEQ"],["<","LT"],["\u2264","LTE"],[">","GT"],["\u2265","GTE"]],a=this.RTL?a:b;this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.setOutput(!0,"Boolean");this.appendValueInput("A");this.appendValueInput("B").appendField(new Blockly.FieldDropdown(a),"OP");this.setInputsInline(!0);var c=this;this.setTooltip(function(){var a=
|
||||
c.getFieldValue("OP");return{EQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ,NEQ:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ,LT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT,LTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE,GT:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT,GTE:Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE}[a]});this.prevBlocks_=[null,null]},onchange:function(a){var b=this.getInputTargetBlock("A"),c=this.getInputTargetBlock("B");if(b&&c&&!b.outputConnection.checkType_(c.outputConnection)){Blockly.Events.setGroup(a.group);for(a=0;a<
|
||||
this.prevBlocks_.length;a++){var d=this.prevBlocks_[a];if(d===b||d===c)d.unplug(),d.bumpNeighbours_()}Blockly.Events.setGroup(!1)}this.prevBlocks_[0]=b;this.prevBlocks_[1]=c}};
|
||||
Blockly.Blocks.logic_operation={init:function(){var a=[[Blockly.Msg.LOGIC_OPERATION_AND,"AND"],[Blockly.Msg.LOGIC_OPERATION_OR,"OR"]];this.setHelpUrl(Blockly.Msg.LOGIC_OPERATION_HELPURL);this.setColour(Blockly.Blocks.logic.HUE);this.setOutput(!0,"Boolean");this.appendValueInput("A").setCheck("Boolean");this.appendValueInput("B").setCheck("Boolean").appendField(new Blockly.FieldDropdown(a),"OP");this.setInputsInline(!0);var b=this;this.setTooltip(function(){var a=b.getFieldValue("OP");return{AND:Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND,
|
||||
OR:Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR}[a]})}};Blockly.Blocks.logic_negate={init:function(){this.jsonInit({message0:Blockly.Msg.LOGIC_NEGATE_TITLE,args0:[{type:"input_value",name:"BOOL",check:"Boolean"}],output:"Boolean",colour:Blockly.Blocks.logic.HUE,tooltip:Blockly.Msg.LOGIC_NEGATE_TOOLTIP,helpUrl:Blockly.Msg.LOGIC_NEGATE_HELPURL})}};
|
||||
|
||||
@@ -303,6 +303,7 @@ Blockly.BlockSvg.prototype.render = function(opt_bubble) {
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.renderFields_ =
|
||||
function(fieldList, cursorX, cursorY) {
|
||||
/* eslint-disable indent */
|
||||
cursorY += Blockly.BlockSvg.INLINE_PADDING_Y;
|
||||
if (this.RTL) {
|
||||
cursorX = -cursorX;
|
||||
@@ -329,7 +330,7 @@ Blockly.BlockSvg.prototype.renderFields_ =
|
||||
}
|
||||
}
|
||||
return this.RTL ? -cursorX : cursorX;
|
||||
};
|
||||
}; /* eslint-enable indent */
|
||||
|
||||
/**
|
||||
* Computes the height and widths for each row and field.
|
||||
@@ -502,7 +503,7 @@ Blockly.BlockSvg.prototype.renderDraw_ = function(iconWidth, inputRows) {
|
||||
var prevBlock = this.previousConnection.targetBlock();
|
||||
if (prevBlock && prevBlock.getNextBlock() == this) {
|
||||
this.squareTopLeftCorner_ = true;
|
||||
}
|
||||
}
|
||||
} else if (Blockly.BlockSvg.START_HAT) {
|
||||
// No output or previous connection.
|
||||
this.squareTopLeftCorner_ = true;
|
||||
@@ -534,7 +535,7 @@ Blockly.BlockSvg.prototype.renderDraw_ = function(iconWidth, inputRows) {
|
||||
var cursorY = this.renderDrawRight_(steps, highlightSteps, inlineSteps,
|
||||
highlightInlineSteps, connectionsXY, inputRows, iconWidth);
|
||||
this.renderDrawBottom_(steps, highlightSteps, connectionsXY, cursorY);
|
||||
this.renderDrawLeft_(steps, highlightSteps, connectionsXY, cursorY);
|
||||
this.renderDrawLeft_(steps, highlightSteps, connectionsXY);
|
||||
|
||||
var pathString = steps.join(' ') + '\n' + inlineSteps.join(' ');
|
||||
this.svgPath_.setAttribute('d', pathString);
|
||||
@@ -559,6 +560,7 @@ Blockly.BlockSvg.prototype.renderDraw_ = function(iconWidth, inputRows) {
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.renderDrawTop_ =
|
||||
function(steps, highlightSteps, connectionsXY, rightEdge) {
|
||||
/* eslint-disable indent */
|
||||
// Position the cursor at the top-left starting point.
|
||||
if (this.squareTopLeftCorner_) {
|
||||
steps.push('m 0,0');
|
||||
@@ -595,7 +597,7 @@ Blockly.BlockSvg.prototype.renderDrawTop_ =
|
||||
steps.push('H', rightEdge);
|
||||
highlightSteps.push('H', rightEdge - 0.5);
|
||||
this.width = rightEdge;
|
||||
};
|
||||
}; /* eslint-enable indent */
|
||||
|
||||
/**
|
||||
* Render the right edge of the block.
|
||||
@@ -871,6 +873,7 @@ Blockly.BlockSvg.prototype.renderDrawRight_ = function(steps, highlightSteps,
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.renderDrawBottom_ =
|
||||
function(steps, highlightSteps, connectionsXY, cursorY) {
|
||||
/* eslint-disable indent */
|
||||
this.height += cursorY + 1; // Add one for the shadow.
|
||||
if (this.nextConnection) {
|
||||
steps.push('H', (Blockly.BlockSvg.NOTCH_WIDTH + (this.RTL ? 0.5 : - 0.5)) +
|
||||
@@ -910,18 +913,18 @@ Blockly.BlockSvg.prototype.renderDrawBottom_ =
|
||||
'0.5,' + (cursorY - Blockly.BlockSvg.CORNER_RADIUS));
|
||||
}
|
||||
}
|
||||
};
|
||||
}; /* eslint-enable indent */
|
||||
|
||||
/**
|
||||
* Render the left edge of the block.
|
||||
* @param {!Array.<string>} steps Path of block outline.
|
||||
* @param {!Array.<string>} highlightSteps Path of block highlights.
|
||||
* @param {!Object} connectionsXY Location of block.
|
||||
* @param {number} cursorY Height of block.
|
||||
* @private
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.renderDrawLeft_ =
|
||||
function(steps, highlightSteps, connectionsXY, cursorY) {
|
||||
function(steps, highlightSteps, connectionsXY) {
|
||||
/* eslint-disable indent */
|
||||
if (this.outputConnection) {
|
||||
// Create output connection.
|
||||
this.outputConnection.moveTo(connectionsXY.x, connectionsXY.y);
|
||||
@@ -951,4 +954,4 @@ Blockly.BlockSvg.prototype.renderDrawLeft_ =
|
||||
}
|
||||
}
|
||||
steps.push('z');
|
||||
};
|
||||
}; /* eslint-enable indent */
|
||||
|
||||
+9
-7
@@ -263,14 +263,14 @@ Blockly.BlockSvg.terminateDrag_ = function() {
|
||||
// Ensure that any stap and bump are part of this move's event group.
|
||||
var group = Blockly.Events.getGroup();
|
||||
setTimeout(function() {
|
||||
Blockly.Events.setGroup(group);
|
||||
selected.snapToGrid();
|
||||
Blockly.Events.setGroup(false);
|
||||
Blockly.Events.setGroup(group);
|
||||
selected.snapToGrid();
|
||||
Blockly.Events.setGroup(false);
|
||||
}, Blockly.BUMP_DELAY / 2);
|
||||
setTimeout(function() {
|
||||
Blockly.Events.setGroup(group);
|
||||
selected.bumpNeighbours_();
|
||||
Blockly.Events.setGroup(false);
|
||||
Blockly.Events.setGroup(group);
|
||||
selected.bumpNeighbours_();
|
||||
Blockly.Events.setGroup(false);
|
||||
}, Blockly.BUMP_DELAY);
|
||||
// Fire an event to allow scrollbars to resize.
|
||||
Blockly.asyncSvgResize(this.workspace);
|
||||
@@ -982,6 +982,7 @@ Blockly.BlockSvg.prototype.getSvgRoot = function() {
|
||||
* @param {boolean} animate If true, show a disposal animation and sound.
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.dispose = function(healStack, animate) {
|
||||
Blockly.Tooltip.hide();
|
||||
Blockly.Field.startCache();
|
||||
// If this block is being dragged, unlink the mouse events.
|
||||
if (Blockly.selected == this) {
|
||||
@@ -1460,6 +1461,7 @@ Blockly.BlockSvg.prototype.setColour = function(colour) {
|
||||
*/
|
||||
Blockly.BlockSvg.prototype.setPreviousStatement =
|
||||
function(newBoolean, opt_check) {
|
||||
/* eslint-disable indent */
|
||||
Blockly.BlockSvg.superClass_.setPreviousStatement.call(this, newBoolean,
|
||||
opt_check);
|
||||
|
||||
@@ -1467,7 +1469,7 @@ Blockly.BlockSvg.prototype.setPreviousStatement =
|
||||
this.render();
|
||||
this.bumpNeighbours_();
|
||||
}
|
||||
};
|
||||
}; /* eslint-enable indent */
|
||||
|
||||
/**
|
||||
* Set whether another block can chain onto the bottom of this block.
|
||||
|
||||
+3
-3
@@ -340,9 +340,9 @@ Blockly.longPid_ = 0;
|
||||
Blockly.longStart_ = function(e, uiObject) {
|
||||
Blockly.longStop_();
|
||||
Blockly.longPid_ = setTimeout(function() {
|
||||
e.button = 2; // Simulate a right button click.
|
||||
uiObject.onMouseDown_(e);
|
||||
}, Blockly.LONGPRESS);
|
||||
e.button = 2; // Simulate a right button click.
|
||||
uiObject.onMouseDown_(e);
|
||||
}, Blockly.LONGPRESS);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -111,6 +111,7 @@ Blockly.ConnectionDB.prototype.findConnection = function(conn) {
|
||||
*/
|
||||
Blockly.ConnectionDB.prototype.findPositionForConnection_ =
|
||||
function(connection) {
|
||||
/* eslint-disable indent */
|
||||
if (!this.length) {
|
||||
return 0;
|
||||
}
|
||||
@@ -128,7 +129,7 @@ Blockly.ConnectionDB.prototype.findPositionForConnection_ =
|
||||
}
|
||||
}
|
||||
return pointerMin;
|
||||
};
|
||||
}; /* eslint-enable indent */
|
||||
|
||||
/**
|
||||
* Remove a connection from the database. Must already exist in DB.
|
||||
|
||||
@@ -52,6 +52,12 @@ Blockly.COLLAPSE_CHARS = 30;
|
||||
*/
|
||||
Blockly.LONGPRESS = 750;
|
||||
|
||||
/**
|
||||
* Prevent a sound from playing if another sound preceded it within this many
|
||||
* miliseconds.
|
||||
*/
|
||||
Blockly.SOUND_LIMIT = 100;
|
||||
|
||||
/**
|
||||
* The richness of block colours, regardless of the hue.
|
||||
* Must be in the range of 0 (inclusive) to 1 (exclusive).
|
||||
|
||||
+2
-2
@@ -393,7 +393,7 @@ Blockly.Events.Create.prototype.run = function(forward) {
|
||||
for (var i = 0, id; id = this.ids[i]; i++) {
|
||||
var block = workspace.getBlockById(id);
|
||||
if (block) {
|
||||
block.dispose(false, true);
|
||||
block.dispose(false, false);
|
||||
} else if (id == this.blockId) {
|
||||
// Only complain about root-level block.
|
||||
console.warn("Can't uncreate non-existant block: " + id);
|
||||
@@ -456,7 +456,7 @@ Blockly.Events.Delete.prototype.run = function(forward) {
|
||||
for (var i = 0, id; id = this.ids[i]; i++) {
|
||||
var block = workspace.getBlockById(id);
|
||||
if (block) {
|
||||
block.dispose(false, true);
|
||||
block.dispose(false, false);
|
||||
} else if (id == this.blockId) {
|
||||
// Only complain about root-level block.
|
||||
console.warn("Can't delete non-existant block: " + id);
|
||||
|
||||
+16
-12
@@ -324,29 +324,31 @@ Blockly.Flyout.prototype.position = function() {
|
||||
if (!this.isVisible()) {
|
||||
return;
|
||||
}
|
||||
var metrics = this.targetWorkspace_.getMetrics();
|
||||
if (!metrics) {
|
||||
var targetWorkspaceMetrics = this.targetWorkspace_.getMetrics();
|
||||
if (!targetWorkspaceMetrics) {
|
||||
// Hidden components will return null.
|
||||
return;
|
||||
}
|
||||
var edgeWidth = this.horizontalLayout_ ? metrics.viewWidth : this.width_;
|
||||
var edgeWidth = this.horizontalLayout_ ?
|
||||
targetWorkspaceMetrics.viewWidth : this.width_;
|
||||
edgeWidth -= this.CORNER_RADIUS;
|
||||
if (this.toolboxPosition_ == Blockly.TOOLBOX_AT_RIGHT) {
|
||||
edgeWidth *= -1;
|
||||
}
|
||||
|
||||
this.setBackgroundPath_(edgeWidth,
|
||||
this.horizontalLayout_ ? this.height_ : metrics.viewHeight);
|
||||
this.horizontalLayout_ ? this.height_ :
|
||||
targetWorkspaceMetrics.viewHeight);
|
||||
|
||||
var x = metrics.absoluteLeft;
|
||||
var x = targetWorkspaceMetrics.absoluteLeft;
|
||||
if (this.toolboxPosition_ == Blockly.TOOLBOX_AT_RIGHT) {
|
||||
x += metrics.viewWidth;
|
||||
x += targetWorkspaceMetrics.viewWidth;
|
||||
x -= this.width_;
|
||||
}
|
||||
|
||||
var y = metrics.absoluteTop;
|
||||
var y = targetWorkspaceMetrics.absoluteTop;
|
||||
if (this.toolboxPosition_ == Blockly.TOOLBOX_AT_BOTTOM) {
|
||||
y += metrics.viewHeight;
|
||||
y += targetWorkspaceMetrics.viewHeight;
|
||||
y -= this.height_;
|
||||
}
|
||||
|
||||
@@ -355,9 +357,9 @@ Blockly.Flyout.prototype.position = function() {
|
||||
// Record the height for Blockly.Flyout.getMetrics_, or width if the layout is
|
||||
// horizontal.
|
||||
if (this.horizontalLayout_) {
|
||||
this.width_ = metrics.viewWidth;
|
||||
this.width_ = targetWorkspaceMetrics.viewWidth;
|
||||
} else {
|
||||
this.height_ = metrics.viewHeight;
|
||||
this.height_ = targetWorkspaceMetrics.viewHeight;
|
||||
}
|
||||
|
||||
// Update the scrollbar (if one exists).
|
||||
@@ -426,6 +428,7 @@ Blockly.Flyout.prototype.setBackgroundPathVertical_ = function(width, height) {
|
||||
*/
|
||||
Blockly.Flyout.prototype.setBackgroundPathHorizontal_ =
|
||||
function(width, height) {
|
||||
/* eslint-disable indent */
|
||||
var atTop = this.toolboxPosition_ == Blockly.TOOLBOX_AT_TOP;
|
||||
// Start at top left.
|
||||
var path = ['M 0,' + (atTop ? 0 : this.CORNER_RADIUS)];
|
||||
@@ -458,7 +461,7 @@ Blockly.Flyout.prototype.setBackgroundPathHorizontal_ =
|
||||
path.push('z');
|
||||
}
|
||||
this.svgBackground_.setAttribute('d', path.join(' '));
|
||||
};
|
||||
}; /* eslint-enable indent */
|
||||
|
||||
/**
|
||||
* Scroll the flyout to the top.
|
||||
@@ -568,12 +571,13 @@ Blockly.Flyout.prototype.show = function(xmlList) {
|
||||
|
||||
// IE 11 is an incompetant browser that fails to fire mouseout events.
|
||||
// When the mouse is over the background, deselect all blocks.
|
||||
var deselectAll = function(e) {
|
||||
var deselectAll = function() {
|
||||
var topBlocks = this.workspace_.getTopBlocks(false);
|
||||
for (var i = 0, block; block = topBlocks[i]; i++) {
|
||||
block.removeSelect();
|
||||
}
|
||||
};
|
||||
|
||||
this.listeners_.push(Blockly.bindEvent_(this.svgBackground_, 'mouseover',
|
||||
this, deselectAll));
|
||||
|
||||
|
||||
+3
-3
@@ -306,9 +306,9 @@ Blockly.Mutator.prototype.workspaceChanged_ = function() {
|
||||
// Ensure that any bump is part of this mutation's event group.
|
||||
var group = Blockly.Events.getGroup();
|
||||
setTimeout(function() {
|
||||
Blockly.Events.setGroup(group);
|
||||
block.bumpNeighbours_();
|
||||
Blockly.Events.setGroup(false);
|
||||
Blockly.Events.setGroup(group);
|
||||
block.bumpNeighbours_();
|
||||
Blockly.Events.setGroup(false);
|
||||
}, Blockly.BUMP_DELAY);
|
||||
}
|
||||
if (block.rendered) {
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ Blockly.Options.prototype.parentWorkspace = null;
|
||||
* If set, sets the translation of the workspace to match the scrollbars.
|
||||
* No-op if unset.
|
||||
*/
|
||||
Blockly.Options.prototype.setMetrics = function(translation) { return; };
|
||||
Blockly.Options.prototype.setMetrics = function() { return; };
|
||||
|
||||
/**
|
||||
* Return an object with the metrics required to size the workspace, or null
|
||||
|
||||
@@ -164,10 +164,7 @@ Blockly.RenderedConnection.prototype.closest = function(maxLimit, dx, dy) {
|
||||
Blockly.RenderedConnection.prototype.highlight = function() {
|
||||
var steps;
|
||||
if (this.type == Blockly.INPUT_VALUE || this.type == Blockly.OUTPUT_VALUE) {
|
||||
var tabWidth = this.sourceBlock_.RTL ? -Blockly.BlockSvg.TAB_WIDTH :
|
||||
Blockly.BlockSvg.TAB_WIDTH;
|
||||
steps = 'm 0,0 ' + Blockly.BlockSvg.TAB_PATH_DOWN + ' v 5';
|
||||
|
||||
} else {
|
||||
steps = 'm -20,0 h 5 ' + Blockly.BlockSvg.NOTCH_PATH_LEFT + ' h 5';
|
||||
}
|
||||
|
||||
@@ -190,6 +190,7 @@ Blockly.Scrollbar = function(workspace, horizontal, opt_pair) {
|
||||
this.workspace_ = workspace;
|
||||
this.pair_ = opt_pair || false;
|
||||
this.horizontal_ = horizontal;
|
||||
this.oldHostMetrics_ = {};
|
||||
|
||||
this.createDom_();
|
||||
|
||||
@@ -223,6 +224,35 @@ if (goog.events.BrowserFeature.TOUCH_ENABLED) {
|
||||
Blockly.Scrollbar.scrollbarThickness = 25;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {!Object} first An object containing computed measurements of a
|
||||
* workspace.
|
||||
* @param {!Object} second Another object containing computed measurements of a
|
||||
* workspace.
|
||||
* @return {boolean} Whether the two sets of metrics are equivalent.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Scrollbar.metricsAreEquivalent_ = function(first, second) {
|
||||
if (!(first && second)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (first.viewWidth != second.viewWidth ||
|
||||
first.viewHeight != second.viewHeight ||
|
||||
first.viewLeft != second.viewLeft ||
|
||||
first.viewTop != second.viewTop ||
|
||||
first.absoluteTop != second.absoluteTop ||
|
||||
first.absoluteLeft != second.absoluteLeft ||
|
||||
first.contentWidth != second.contentWidth ||
|
||||
first.contentHeight != second.contentHeight ||
|
||||
first.contentLeft != second.contentLeft ||
|
||||
first.contentTop != second.contentTop) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Dispose of this scrollbar.
|
||||
* Unlink from all DOM elements to prevent memory leaks.
|
||||
@@ -257,6 +287,13 @@ Blockly.Scrollbar.prototype.resize = function(opt_metrics) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Blockly.Scrollbar.metricsAreEquivalent_(hostMetrics,
|
||||
this.oldHostMetrics_)) {
|
||||
return;
|
||||
}
|
||||
this.oldHostMetrics_ = hostMetrics;
|
||||
|
||||
/* hostMetrics is an object with the following properties.
|
||||
* .viewHeight: Height of the visible rectangle,
|
||||
* .viewWidth: Width of the visible rectangle,
|
||||
|
||||
@@ -583,6 +583,9 @@ Blockly.Toolbox.TreeNode.prototype.onDoubleClick_ = function(e) {
|
||||
|
||||
/**
|
||||
* A blank separator node in the tree.
|
||||
* @param {Object=} config The configuration for the tree. See
|
||||
* goog.ui.tree.TreeControl.DefaultConfig. If not specified, a default config
|
||||
* will be used.
|
||||
* @constructor
|
||||
* @extends {Blockly.Toolbox.TreeNode}
|
||||
*/
|
||||
|
||||
+4
-4
@@ -167,10 +167,10 @@ Blockly.Tooltip.onMouseOut_ = function(e) {
|
||||
// event and kill it if a mouseOver is received immediately.
|
||||
// This way the task only fully executes if mousing into the void.
|
||||
Blockly.Tooltip.mouseOutPid_ = setTimeout(function() {
|
||||
Blockly.Tooltip.element_ = null;
|
||||
Blockly.Tooltip.poisonedElement_ = null;
|
||||
Blockly.Tooltip.hide();
|
||||
}, 1);
|
||||
Blockly.Tooltip.element_ = null;
|
||||
Blockly.Tooltip.poisonedElement_ = null;
|
||||
Blockly.Tooltip.hide();
|
||||
}, 1);
|
||||
clearTimeout(Blockly.Tooltip.showPid_);
|
||||
};
|
||||
|
||||
|
||||
+28
-13
@@ -131,6 +131,13 @@ Blockly.WorkspaceSvg.prototype.trashcan = null;
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.scrollbar = null;
|
||||
|
||||
/**
|
||||
* Time that the last sound was played.
|
||||
* @type {Date}
|
||||
* @private
|
||||
*/
|
||||
Blockly.WorkspaceSvg.prototype.lastSound_ = null;
|
||||
|
||||
/**
|
||||
* Create the workspace DOM elements.
|
||||
* @param {string=} opt_backgroundClass Either 'blocklyMainBackground' or
|
||||
@@ -283,7 +290,7 @@ Blockly.WorkspaceSvg.prototype.addFlyout_ = function() {
|
||||
parentWorkspace: this,
|
||||
RTL: this.RTL,
|
||||
horizontalLayout: this.horizontalLayout,
|
||||
toolboxPosition: this.options.toolboxPosition,
|
||||
toolboxPosition: this.options.toolboxPosition
|
||||
};
|
||||
/** @type {Blockly.Flyout} */
|
||||
this.flyout_ = new Blockly.Flyout(workspaceOptions);
|
||||
@@ -813,18 +820,7 @@ Blockly.WorkspaceSvg.prototype.showContextMenu_ = function(e) {
|
||||
for (var i = 0; i < topBlocks.length; i++) {
|
||||
addDeletableBlocks(topBlocks[i]);
|
||||
}
|
||||
var deleteOption = {
|
||||
text: deleteList.length == 1 ? Blockly.Msg.DELETE_BLOCK :
|
||||
Blockly.Msg.DELETE_X_BLOCKS.replace('%1', String(deleteList.length)),
|
||||
enabled: deleteList.length > 0,
|
||||
callback: function() {
|
||||
if (deleteList.length < 2 ||
|
||||
window.confirm(Blockly.Msg.DELETE_ALL_BLOCKS.replace('%1',
|
||||
String(deleteList.length)))) {
|
||||
deleteNext();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function deleteNext() {
|
||||
Blockly.Events.setGroup(eventGroup);
|
||||
var block = deleteList.shift();
|
||||
@@ -838,6 +834,19 @@ Blockly.WorkspaceSvg.prototype.showContextMenu_ = function(e) {
|
||||
}
|
||||
Blockly.Events.setGroup(false);
|
||||
}
|
||||
|
||||
var deleteOption = {
|
||||
text: deleteList.length == 1 ? Blockly.Msg.DELETE_BLOCK :
|
||||
Blockly.Msg.DELETE_X_BLOCKS.replace('%1', String(deleteList.length)),
|
||||
enabled: deleteList.length > 0,
|
||||
callback: function() {
|
||||
if (deleteList.length < 2 ||
|
||||
window.confirm(Blockly.Msg.DELETE_ALL_BLOCKS.replace('%1',
|
||||
String(deleteList.length)))) {
|
||||
deleteNext();
|
||||
}
|
||||
}
|
||||
};
|
||||
menuOptions.push(deleteOption);
|
||||
|
||||
Blockly.ContextMenu.show(e, menuOptions, this.RTL);
|
||||
@@ -904,6 +913,12 @@ Blockly.WorkspaceSvg.prototype.preloadAudio_ = function() {
|
||||
Blockly.WorkspaceSvg.prototype.playAudio = function(name, opt_volume) {
|
||||
var sound = this.SOUNDS_[name];
|
||||
if (sound) {
|
||||
// Don't play one sound on top of another.
|
||||
var now = new Date();
|
||||
if (now - this.lastSound_ < Blockly.SOUND_LIMIT) {
|
||||
return;
|
||||
}
|
||||
this.lastSound_ = now;
|
||||
var mySound;
|
||||
var ie9 = goog.userAgent.DOCUMENT_MODE &&
|
||||
goog.userAgent.DOCUMENT_MODE === 9;
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@
|
||||
Blockly.Dart=new Blockly.Generator("Dart");Blockly.Dart.addReservedWords("assert,break,case,catch,class,const,continue,default,do,else,enum,extends,false,final,finally,for,if,in,is,new,null,rethrow,return,super,switch,this,throw,true,try,var,void,while,with,print,identityHashCode,identical,BidirectionalIterator,Comparable,double,Function,int,Invocation,Iterable,Iterator,List,Map,Match,num,Pattern,RegExp,Set,StackTrace,String,StringSink,Type,bool,DateTime,Deprecated,Duration,Expando,Null,Object,RuneIterator,Runes,Stopwatch,StringBuffer,Symbol,Uri,Comparator,AbstractClassInstantiationError,ArgumentError,AssertionError,CastError,ConcurrentModificationError,CyclicInitializationError,Error,Exception,FallThroughError,FormatException,IntegerDivisionByZeroException,NoSuchMethodError,NullThrownError,OutOfMemoryError,RangeError,StackOverflowError,StateError,TypeError,UnimplementedError,UnsupportedError");
|
||||
Blockly.Dart.ORDER_ATOMIC=0;Blockly.Dart.ORDER_UNARY_POSTFIX=1;Blockly.Dart.ORDER_UNARY_PREFIX=2;Blockly.Dart.ORDER_MULTIPLICATIVE=3;Blockly.Dart.ORDER_ADDITIVE=4;Blockly.Dart.ORDER_SHIFT=5;Blockly.Dart.ORDER_BITWISE_AND=6;Blockly.Dart.ORDER_BITWISE_XOR=7;Blockly.Dart.ORDER_BITWISE_OR=8;Blockly.Dart.ORDER_RELATIONAL=9;Blockly.Dart.ORDER_EQUALITY=10;Blockly.Dart.ORDER_LOGICAL_AND=11;Blockly.Dart.ORDER_LOGICAL_OR=12;Blockly.Dart.ORDER_CONDITIONAL=13;Blockly.Dart.ORDER_CASCADE=14;
|
||||
Blockly.Dart.ORDER_ASSIGNMENT=15;Blockly.Dart.ORDER_NONE=99;
|
||||
Blockly.Dart.init=function(a){Blockly.Dart.definitions_=Object.create(null);Blockly.Dart.functionNames_=Object.create(null);Blockly.Dart.variableDB_?Blockly.Dart.variableDB_.reset():Blockly.Dart.variableDB_=new Blockly.Names(Blockly.Dart.RESERVED_WORDS_);var b=[];a=Blockly.Variables.allVariables(a);for(var c=0;c<a.length;c++)b[c]="var "+Blockly.Dart.variableDB_.getName(a[c],Blockly.Variables.NAME_TYPE)+";";Blockly.Dart.definitions_.variables=b.join("\n")};
|
||||
Blockly.Dart.init=function(a){Blockly.Dart.definitions_=Object.create(null);Blockly.Dart.functionNames_=Object.create(null);Blockly.Dart.variableDB_?Blockly.Dart.variableDB_.reset():Blockly.Dart.variableDB_=new Blockly.Names(Blockly.Dart.RESERVED_WORDS_);var b=[];a=Blockly.Variables.allVariables(a);if(a.length){for(var c=0;c<a.length;c++)b[c]=Blockly.Dart.variableDB_.getName(a[c],Blockly.Variables.NAME_TYPE);Blockly.Dart.definitions_.variables="var "+b.join(", ")+";"}};
|
||||
Blockly.Dart.finish=function(a){a&&(a=Blockly.Dart.prefixLines(a,Blockly.Dart.INDENT));a="main() {\n"+a+"}";var b=[],c=[],d;for(d in Blockly.Dart.definitions_){var e=Blockly.Dart.definitions_[d];e.match(/^import\s/)?b.push(e):c.push(e)}delete Blockly.Dart.definitions_;delete Blockly.Dart.functionNames_;Blockly.Dart.variableDB_.reset();return(b.join("\n")+"\n\n"+c.join("\n\n")).replace(/\n\n+/g,"\n\n").replace(/\n*$/,"\n\n\n")+a};Blockly.Dart.scrubNakedValue=function(a){return a+";\n"};
|
||||
Blockly.Dart.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/\$/g,"\\$").replace(/'/g,"\\'");return"'"+a+"'"};
|
||||
Blockly.Dart.scrub_=function(a,b){var c="";if(!a.outputConnection||!a.outputConnection.targetConnection){var d=a.getCommentText();d&&(c+=Blockly.Dart.prefixLines(d,"// ")+"\n");for(var e=0;e<a.inputList.length;e++)a.inputList[e].type==Blockly.INPUT_VALUE&&(d=a.inputList[e].connection.targetBlock())&&(d=Blockly.Dart.allNestedComments(d))&&(c+=Blockly.Dart.prefixLines(d,"// "))}e=a.nextConnection&&a.nextConnection.targetBlock();e=Blockly.Dart.blockToCode(e);return c+b+e};Blockly.Dart.colour={};Blockly.Dart.addReservedWords("Math");Blockly.Dart.colour_picker=function(a){return["'"+a.getFieldValue("COLOUR")+"'",Blockly.Dart.ORDER_ATOMIC]};
|
||||
@@ -24,8 +24,8 @@ Blockly.Dart.lists_getIndex=function(a){var b=a.getFieldValue("MODE")||"GET",c=a
|
||||
if("REMOVE"==b)return d+";\n"}}else if("RANDOM"==c){Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;";c=Blockly.Dart.provideFunction_("lists_get_random_item",["dynamic "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(List myList, bool remove) {"," int x = new Math.Random().nextInt(myList.length);"," if (remove) {"," return myList.removeAt(x);"," } else {"," return myList[x];"," }","}"]);d=c+"("+a+", "+("GET"!=b)+")";if("GET"==b||"GET_REMOVE"==b)return[d,Blockly.Dart.ORDER_UNARY_POSTFIX];
|
||||
if("REMOVE"==b)return d+";\n"}throw"Unhandled combination (lists_getIndex).";};
|
||||
Blockly.Dart.lists_setIndex=function(a){function b(){if(c.match(/^\w+$/))return"";var a=Blockly.Dart.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),b="List "+a+" = "+c+";\n";c=a;return b}var c=Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_UNARY_POSTFIX)||"[]",d=a.getFieldValue("MODE")||"GET",e=a.getFieldValue("WHERE")||"FROM_START",f=Blockly.Dart.valueToCode(a,"AT",Blockly.Dart.ORDER_ADDITIVE)||"1";a=Blockly.Dart.valueToCode(a,"TO",Blockly.Dart.ORDER_ASSIGNMENT)||"null";
|
||||
if("FIRST"==e){if("SET"==d)return c+"[0] = "+a+";\n";if("INSERT"==d)return c+".insert(0, "+a+");\n"}else if("LAST"==e){if("SET"==d)return e=b(),e+(c+"["+c+".length - 1] = "+a+";\n");if("INSERT"==d)return c+".add("+a+");\n"}else if("FROM_START"==e){f=Blockly.isNumber(f)?parseInt(f,10)-1:f+" - 1";if("SET"==d)return c+"["+f+"] = "+a+";\n";if("INSERT"==d)return c+".insert("+f+", "+a+");\n"}else if("FROM_END"==e){e=b();if("SET"==d)return e+=c+"["+c+".length - "+f+"] = "+a+";\n";if("INSERT"==d)return e+=
|
||||
c+".insert("+c+".length - "+f+", "+a+");\n"}else if("RANDOM"==e){Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;";e=b();f=Blockly.Dart.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);e+="int "+f+" = new Math.Random().nextInt("+c+".length);";if("SET"==d)return e+=c+"["+f+"] = "+a+";\n";if("INSERT"==d)return e+=c+".insert("+f+", "+a+");\n"}throw"Unhandled combination (lists_setIndex).";};
|
||||
if("FIRST"==e){if("SET"==d)return c+"[0] = "+a+";\n";if("INSERT"==d)return c+".insert(0, "+a+");\n"}else if("LAST"==e){if("SET"==d)return e=b(),e+(c+"["+c+".length - 1] = "+a+";\n");if("INSERT"==d)return c+".add("+a+");\n"}else if("FROM_START"==e){f=Blockly.isNumber(f)?parseInt(f,10)-1:f+" - 1";if("SET"==d)return c+"["+f+"] = "+a+";\n";if("INSERT"==d)return c+".insert("+f+", "+a+");\n"}else if("FROM_END"==e){e=b();if("SET"==d)return e+(c+"["+c+".length - "+f+"] = "+a+";\n");if("INSERT"==d)return e+
|
||||
(c+".insert("+c+".length - "+f+", "+a+");\n")}else if("RANDOM"==e){Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;";e=b();f=Blockly.Dart.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);e+="int "+f+" = new Math.Random().nextInt("+c+".length);";if("SET"==d)return e+(c+"["+f+"] = "+a+";\n");if("INSERT"==d)return e+(c+".insert("+f+", "+a+");\n")}throw"Unhandled combination (lists_setIndex).";};
|
||||
Blockly.Dart.lists_getSublist=function(a){var b=Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_UNARY_POSTFIX)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Dart.valueToCode(a,"AT1",Blockly.Dart.ORDER_NONE)||"1";a=Blockly.Dart.valueToCode(a,"AT2",Blockly.Dart.ORDER_NONE)||"1";("FIRST"==c||"FROM_START"==c&&Blockly.isNumber(e))&&("LAST"==d||"FROM_START"==d&&Blockly.isNumber(a))?(e="FIRST"==c?0:parseInt(e,10)-1,"LAST"==d?b=b+".sublist("+e+")":(a=parseInt(a,10),b=b+".sublist("+
|
||||
e+", "+a+")")):b=Blockly.Dart.provideFunction_("lists_get_sublist",["List "+Blockly.Dart.FUNCTION_NAME_PLACEHOLDER_+"(list, where1, at1, where2, at2) {"," int getAt(where, at) {"," if (where == 'FROM_START') {"," at--;"," } else if (where == 'FROM_END') {"," at = list.length - at;"," } else if (where == 'FIRST') {"," at = 0;"," } else if (where == 'LAST') {"," at = list.length - 1;"," } else {"," throw 'Unhandled option (lists_getSublist).';"," }"," return at;",
|
||||
" }"," at1 = getAt(where1, at1);"," at2 = getAt(where2, at2) + 1;"," return list.sublist(at1, at2);","}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+a+")";return[b,Blockly.Dart.ORDER_UNARY_POSTFIX]};
|
||||
@@ -39,7 +39,7 @@ Blockly.Dart.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Nu
|
||||
return a+("for (int "+d+" = 0; "+d+" < "+e+"; "+d+"++) {\n"+c+"}\n")};Blockly.Dart.controls_repeat=Blockly.Dart.controls_repeat_ext;Blockly.Dart.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Dart.valueToCode(a,"BOOL",b?Blockly.Dart.ORDER_UNARY_PREFIX:Blockly.Dart.ORDER_NONE)||"false",d=Blockly.Dart.statementToCode(a,"DO"),d=Blockly.Dart.addLoopTrap(d,a.id);b&&(c="!"+c);return"while ("+c+") {\n"+d+"}\n"};
|
||||
Blockly.Dart.controls_for=function(a){var b=Blockly.Dart.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Dart.valueToCode(a,"FROM",Blockly.Dart.ORDER_ASSIGNMENT)||"0",d=Blockly.Dart.valueToCode(a,"TO",Blockly.Dart.ORDER_ASSIGNMENT)||"0",e=Blockly.Dart.valueToCode(a,"BY",Blockly.Dart.ORDER_ASSIGNMENT)||"1",f=Blockly.Dart.statementToCode(a,"DO"),f=Blockly.Dart.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.Dart.variableDB_.getDistinctName(b+"_start",Blockly.Variables.NAME_TYPE),a+="var "+g+" = "+c+";\n"),c=d,d.match(/^\w+$/)||Blockly.isNumber(d)||(c=Blockly.Dart.variableDB_.getDistinctName(b+"_end",Blockly.Variables.NAME_TYPE),a+="var "+c+" = "+d+";\n"),d=Blockly.Dart.variableDB_.getDistinctName(b+
|
||||
"_inc",Blockly.Variables.NAME_TYPE),a+="num "+d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("("+e+").abs();\n"),a+="if ("+g+" > "+c+") {\n",a+=Blockly.Dart.INDENT+d+" = -"+d+";\n",a+="}\n",a+="for ("+b+" = "+g+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+") {\n"+f+"}\n";return a};
|
||||
"_inc",Blockly.Variables.NAME_TYPE),a+="num "+d+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+";\n"):a+("("+e+").abs();\n"),a=a+("if ("+g+" > "+c+") {\n")+(Blockly.Dart.INDENT+d+" = -"+d+";\n"),a+="}\n",a+="for ("+b+" = "+g+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+") {\n"+f+"}\n";return a};
|
||||
Blockly.Dart.controls_forEach=function(a){var b=Blockly.Dart.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Dart.valueToCode(a,"LIST",Blockly.Dart.ORDER_ASSIGNMENT)||"[]",d=Blockly.Dart.statementToCode(a,"DO"),d=Blockly.Dart.addLoopTrap(d,a.id);return"for (var "+b+" in "+c+") {\n"+d+"}\n"};
|
||||
Blockly.Dart.controls_flow_statements=function(a){switch(a.getFieldValue("FLOW")){case "BREAK":return"break;\n";case "CONTINUE":return"continue;\n"}throw"Unknown flow statement.";};Blockly.Dart.math={};Blockly.Dart.addReservedWords("Math");Blockly.Dart.math_number=function(a){a=parseFloat(a.getFieldValue("NUM"));var b;Infinity==a?(a="double.INFINITY",b=Blockly.Dart.ORDER_UNARY_POSTFIX):-Infinity==a?(a="-double.INFINITY",b=Blockly.Dart.ORDER_UNARY_PREFIX):b=0>a?Blockly.Dart.ORDER_UNARY_PREFIX:Blockly.Dart.ORDER_ATOMIC;return[a,b]};
|
||||
Blockly.Dart.math_arithmetic=function(a){var b={ADD:[" + ",Blockly.Dart.ORDER_ADDITIVE],MINUS:[" - ",Blockly.Dart.ORDER_ADDITIVE],MULTIPLY:[" * ",Blockly.Dart.ORDER_MULTIPLICATIVE],DIVIDE:[" / ",Blockly.Dart.ORDER_MULTIPLICATIVE],POWER:[null,Blockly.Dart.ORDER_NONE]}[a.getFieldValue("OP")],c=b[0],b=b[1],d=Blockly.Dart.valueToCode(a,"A",b)||"0";a=Blockly.Dart.valueToCode(a,"B",b)||"0";return c?[d+c+a,b]:(Blockly.Dart.definitions_.import_dart_math="import 'dart:math' as Math;",["Math.pow("+d+", "+a+
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,327 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Accessible Blockly Demo</title>
|
||||
|
||||
<!-- Load Blockly -->
|
||||
<script src="../../blockly_compressed.js"></script>
|
||||
<script src="../../blocks_compressed.js"></script>
|
||||
<script src="../../javascript_compressed.js"></script>
|
||||
<script src="../../msg/js/en.js"></script>
|
||||
<script src="../../msg/messages.js"></script>
|
||||
<script src="../../accessible/messages.js"></script>
|
||||
|
||||
<!-- Load accessibleBlockly -->
|
||||
<script src="../../accessible/libs/es6-shim.min.js"></script>
|
||||
<script src="../../accessible/libs/angular2-polyfills.min.js"></script>
|
||||
<script src="../../accessible/libs/Rx.umd.min.js"></script>
|
||||
<script src="../../accessible/libs/angular2-all.umd.min.js"></script>
|
||||
<script src="../../accessible/utils.service.js"></script>
|
||||
<script src="../../accessible/clipboard.service.js"></script>
|
||||
<script src="../../accessible/tree.service.js"></script>
|
||||
<script src="../../accessible/fieldview.component.js"></script>
|
||||
<script src="../../accessible/workspace_treeview.component.js"></script>
|
||||
<script src="../../accessible/toolbox_treeview.component.js"></script>
|
||||
<script src="../../accessible/toolboxview.component.js"></script>
|
||||
<script src="../../accessible/workspaceview.component.js"></script>
|
||||
<script src="../../accessible/appview.component.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../../media/accessible.css">
|
||||
<style>
|
||||
body {
|
||||
background-color: #fff;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
h1 {
|
||||
font-weight: normal;
|
||||
font-size: 140%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1><a href="https://developers.google.com/blockly/">Blockly</a> >
|
||||
<a href="../index.html">Demos</a> > Accessible Blockly</h1>
|
||||
|
||||
<p>This is a simple demo of a version of Blockly designed for screen readers.</p>
|
||||
|
||||
<!--
|
||||
<p>→ More info on <a href="https://developers.google.com/blockly/">accessible Blockly</a>…</p>
|
||||
-->
|
||||
|
||||
<blockly-app></blockly-app>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
ng.platform.browser.bootstrap(blocklyApp.AppView);
|
||||
});
|
||||
</script>
|
||||
|
||||
<xml id="blockly-toolbox-xml" style="display: none">
|
||||
<category name="Logic" colour="210">
|
||||
<block type="controls_if"></block>
|
||||
<block type="logic_compare"></block>
|
||||
<block type="logic_operation"></block>
|
||||
<block type="logic_negate"></block>
|
||||
<block type="logic_boolean"></block>
|
||||
<block type="logic_null" disabled="true"></block>
|
||||
<block type="logic_ternary"></block>
|
||||
</category>
|
||||
<category name="Loops" colour="120">
|
||||
<block type="controls_repeat_ext">
|
||||
<value name="TIMES">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">10</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="controls_repeat" disabled="true"></block>
|
||||
<block type="controls_whileUntil"></block>
|
||||
<block type="controls_for">
|
||||
<value name="FROM">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">10</field>
|
||||
</shadow>
|
||||
</value>
|
||||
<value name="BY">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="controls_forEach"></block>
|
||||
<block type="controls_flow_statements"></block>
|
||||
</category>
|
||||
<category name="Math" colour="230">
|
||||
<block type="math_number" gap="32"></block>
|
||||
<block type="math_arithmetic">
|
||||
<value name="A">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
<value name="B">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="math_single">
|
||||
<value name="NUM">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">9</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="math_trig">
|
||||
<value name="NUM">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">45</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="math_constant"></block>
|
||||
<block type="math_number_property">
|
||||
<value name="NUMBER_TO_CHECK">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">0</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="math_change">
|
||||
<value name="DELTA">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="math_round">
|
||||
<value name="NUM">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">3.1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="math_on_list"></block>
|
||||
<block type="math_modulo">
|
||||
<value name="DIVIDEND">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">64</field>
|
||||
</shadow>
|
||||
</value>
|
||||
<value name="DIVISOR">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">10</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="math_constrain">
|
||||
<value name="VALUE">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">50</field>
|
||||
</shadow>
|
||||
</value>
|
||||
<value name="LOW">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
<value name="HIGH">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">100</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="math_random_int">
|
||||
<value name="FROM">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
<value name="TO">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">100</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="math_random_float"></block>
|
||||
</category>
|
||||
<category name="Text" colour="160">
|
||||
<block type="text"></block>
|
||||
<block type="text_join"></block>
|
||||
<block type="text_append">
|
||||
<value name="TEXT">
|
||||
<shadow type="text"></shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="text_length">
|
||||
<value name="VALUE">
|
||||
<shadow type="text">
|
||||
<field name="TEXT">abc</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="text_isEmpty">
|
||||
<value name="VALUE">
|
||||
<shadow type="text">
|
||||
<field name="TEXT"></field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="text_indexOf">
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">text</field>
|
||||
</block>
|
||||
</value>
|
||||
<value name="FIND">
|
||||
<shadow type="text">
|
||||
<field name="TEXT">abc</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="text_charAt">
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">text</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
<block type="text_getSubstring">
|
||||
<value name="STRING">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">text</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
<block type="text_changeCase">
|
||||
<value name="TEXT">
|
||||
<shadow type="text">
|
||||
<field name="TEXT">abc</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="text_trim">
|
||||
<value name="TEXT">
|
||||
<shadow type="text">
|
||||
<field name="TEXT">abc</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="text_print">
|
||||
<value name="TEXT">
|
||||
<shadow type="text">
|
||||
<field name="TEXT">abc</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="text_prompt_ext">
|
||||
<value name="TEXT">
|
||||
<shadow type="text">
|
||||
<field name="TEXT">abc</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
</category>
|
||||
<category name="Lists" colour="260">
|
||||
<block type="lists_create_with">
|
||||
<mutation items="0"></mutation>
|
||||
</block>
|
||||
<block type="lists_create_with"></block>
|
||||
<block type="lists_repeat">
|
||||
<value name="NUM">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">5</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="lists_length"></block>
|
||||
<block type="lists_isEmpty"></block>
|
||||
<block type="lists_indexOf">
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">list</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
<block type="lists_getIndex">
|
||||
<value name="VALUE">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">list</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
<block type="lists_setIndex">
|
||||
<value name="LIST">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">list</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
<block type="lists_getSublist">
|
||||
<value name="LIST">
|
||||
<block type="variables_get">
|
||||
<field name="VAR">list</field>
|
||||
</block>
|
||||
</value>
|
||||
</block>
|
||||
<block type="lists_split">
|
||||
<value name="DELIM">
|
||||
<shadow type="text">
|
||||
<field name="TEXT">,</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
</category>
|
||||
<sep></sep>
|
||||
<category name="Variables" colour="330" custom="VARIABLE"></category>
|
||||
<category name="Functions" colour="290" custom="PROCEDURE"></category>
|
||||
</xml>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+24
-12
@@ -136,18 +136,6 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="plane/index.html">
|
||||
<img src="plane/icon.png" height=80 width=100>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<div><a href="plane/index.html">Plane</a></div>
|
||||
<div>Using Closure Templates to support 35 languages.</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="storage/index.html">
|
||||
@@ -172,6 +160,30 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="accessible/index.html">
|
||||
<img src="accessible/icon.png" height=80 width=100>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<div><a href="accessible/index.html">Accessible Blockly</a></div>
|
||||
<div>Version of Blockly accessible to screen readers.</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="plane/index.html">
|
||||
<img src="plane/icon.png" height=80 width=100>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<div><a href="plane/index.html">Plane</a></div>
|
||||
<div>Using Closure Templates to support 35 languages.</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="code/index.html">
|
||||
|
||||
@@ -7,8 +7,8 @@ Blockly.JavaScript=new Blockly.Generator("JavaScript");Blockly.JavaScript.addRes
|
||||
Blockly.JavaScript.ORDER_ATOMIC=0;Blockly.JavaScript.ORDER_MEMBER=1;Blockly.JavaScript.ORDER_NEW=1;Blockly.JavaScript.ORDER_FUNCTION_CALL=2;Blockly.JavaScript.ORDER_INCREMENT=3;Blockly.JavaScript.ORDER_DECREMENT=3;Blockly.JavaScript.ORDER_LOGICAL_NOT=4;Blockly.JavaScript.ORDER_BITWISE_NOT=4;Blockly.JavaScript.ORDER_UNARY_PLUS=4;Blockly.JavaScript.ORDER_UNARY_NEGATION=4;Blockly.JavaScript.ORDER_TYPEOF=4;Blockly.JavaScript.ORDER_VOID=4;Blockly.JavaScript.ORDER_DELETE=4;
|
||||
Blockly.JavaScript.ORDER_MULTIPLICATION=5;Blockly.JavaScript.ORDER_DIVISION=5;Blockly.JavaScript.ORDER_MODULUS=5;Blockly.JavaScript.ORDER_ADDITION=6;Blockly.JavaScript.ORDER_SUBTRACTION=6;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;
|
||||
Blockly.JavaScript.ORDER_LOGICAL_AND=13;Blockly.JavaScript.ORDER_LOGICAL_OR=14;Blockly.JavaScript.ORDER_CONDITIONAL=15;Blockly.JavaScript.ORDER_ASSIGNMENT=16;Blockly.JavaScript.ORDER_COMMA=17;Blockly.JavaScript.ORDER_NONE=99;
|
||||
Blockly.JavaScript.init=function(a){Blockly.JavaScript.definitions_=Object.create(null);Blockly.JavaScript.functionNames_=Object.create(null);Blockly.JavaScript.variableDB_?Blockly.JavaScript.variableDB_.reset():Blockly.JavaScript.variableDB_=new Blockly.Names(Blockly.JavaScript.RESERVED_WORDS_);var b=[];a=Blockly.Variables.allVariables(a);for(var c=0;c<a.length;c++)b[c]="var "+Blockly.JavaScript.variableDB_.getName(a[c],Blockly.Variables.NAME_TYPE)+";";Blockly.JavaScript.definitions_.variables=b.join("\n")};
|
||||
Blockly.JavaScript.finish=function(a){var b=[],c;for(c in Blockly.JavaScript.definitions_)b.push(Blockly.JavaScript.definitions_[c]);delete Blockly.JavaScript.definitions_;delete Blockly.JavaScript.functionNames_;Blockly.JavaScript.variableDB_.reset();return b.join("\n\n")+"\n\n\n"+a};Blockly.JavaScript.scrubNakedValue=function(a){return a+";\n"};Blockly.JavaScript.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,"\\'");return"'"+a+"'"};
|
||||
Blockly.JavaScript.init=function(a){Blockly.JavaScript.definitions_=Object.create(null);Blockly.JavaScript.functionNames_=Object.create(null);Blockly.JavaScript.variableDB_?Blockly.JavaScript.variableDB_.reset():Blockly.JavaScript.variableDB_=new Blockly.Names(Blockly.JavaScript.RESERVED_WORDS_);var b=[];a=Blockly.Variables.allVariables(a);if(a.length){for(var c=0;c<a.length;c++)b[c]=Blockly.JavaScript.variableDB_.getName(a[c],Blockly.Variables.NAME_TYPE);Blockly.JavaScript.definitions_.variables=
|
||||
"var "+b.join(", ")+";"}};Blockly.JavaScript.finish=function(a){var b=[],c;for(c in Blockly.JavaScript.definitions_)b.push(Blockly.JavaScript.definitions_[c]);delete Blockly.JavaScript.definitions_;delete Blockly.JavaScript.functionNames_;Blockly.JavaScript.variableDB_.reset();return b.join("\n\n")+"\n\n\n"+a};Blockly.JavaScript.scrubNakedValue=function(a){return a+";\n"};Blockly.JavaScript.quote_=function(a){a=a.replace(/\\/g,"\\\\").replace(/\n/g,"\\\n").replace(/'/g,"\\'");return"'"+a+"'"};
|
||||
Blockly.JavaScript.scrub_=function(a,b){var c="";if(!a.outputConnection||!a.outputConnection.targetConnection){var d=a.getCommentText();d&&(c+=Blockly.JavaScript.prefixLines(d,"// ")+"\n");for(var e=0;e<a.inputList.length;e++)a.inputList[e].type==Blockly.INPUT_VALUE&&(d=a.inputList[e].connection.targetBlock())&&(d=Blockly.JavaScript.allNestedComments(d))&&(c+=Blockly.JavaScript.prefixLines(d,"// "))}e=a.nextConnection&&a.nextConnection.targetBlock();e=Blockly.JavaScript.blockToCode(e);return c+b+
|
||||
e};Blockly.JavaScript.colour={};Blockly.JavaScript.colour_picker=function(a){return["'"+a.getFieldValue("COLOUR")+"'",Blockly.JavaScript.ORDER_ATOMIC]};Blockly.JavaScript.colour_random=function(a){return[Blockly.JavaScript.provideFunction_("colour_random",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"() {"," var num = Math.floor(Math.random() * Math.pow(2, 24));"," return '#' + ('00000' + num.toString(16)).substr(-6);","}"])+"()",Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
Blockly.JavaScript.colour_rgb=function(a){var b=Blockly.JavaScript.valueToCode(a,"RED",Blockly.JavaScript.ORDER_COMMA)||0,c=Blockly.JavaScript.valueToCode(a,"GREEN",Blockly.JavaScript.ORDER_COMMA)||0;a=Blockly.JavaScript.valueToCode(a,"BLUE",Blockly.JavaScript.ORDER_COMMA)||0;return[Blockly.JavaScript.provideFunction_("colour_rgb",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(r, g, b) {"," r = Math.max(Math.min(Number(r), 100), 0) * 2.55;"," g = Math.max(Math.min(Number(g), 100), 0) * 2.55;",
|
||||
@@ -24,8 +24,8 @@ b)return[a+".slice(-1)[0]",Blockly.JavaScript.ORDER_MEMBER];if("GET_REMOVE"==b)r
|
||||
Blockly.JavaScript.ORDER_FUNCTION_CALL];if("GET_REMOVE"==b||"REMOVE"==b){c=Blockly.JavaScript.provideFunction_("lists_remove_from_end",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+"(list, x) {"," x = list.length - x;"," return list.splice(x, 1)[0];","}"]);d=c+"("+a+", "+d+")";if("GET_REMOVE"==b)return[d,Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==b)return d+";\n"}}else if("RANDOM"==c){c=Blockly.JavaScript.provideFunction_("lists_get_random_item",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+
|
||||
"(list, remove) {"," var x = Math.floor(Math.random() * list.length);"," if (remove) {"," return list.splice(x, 1)[0];"," } else {"," return list[x];"," }","}"]);d=c+"("+a+", "+("GET"!=b)+")";if("GET"==b||"GET_REMOVE"==b)return[d,Blockly.JavaScript.ORDER_FUNCTION_CALL];if("REMOVE"==b)return d+";\n"}throw"Unhandled combination (lists_getIndex).";};
|
||||
Blockly.JavaScript.lists_setIndex=function(a){function b(){if(c.match(/^\w+$/))return"";var a=Blockly.JavaScript.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),b="var "+a+" = "+c+";\n";c=a;return b}var c=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_MEMBER)||"[]",d=a.getFieldValue("MODE")||"GET",e=a.getFieldValue("WHERE")||"FROM_START",f=Blockly.JavaScript.valueToCode(a,"AT",Blockly.JavaScript.ORDER_NONE)||"1";a=Blockly.JavaScript.valueToCode(a,"TO",Blockly.JavaScript.ORDER_ASSIGNMENT)||
|
||||
"null";if("FIRST"==e){if("SET"==d)return c+"[0] = "+a+";\n";if("INSERT"==d)return c+".unshift("+a+");\n"}else if("LAST"==e){if("SET"==d)return e=b(),e+(c+"["+c+".length - 1] = "+a+";\n");if("INSERT"==d)return c+".push("+a+");\n"}else if("FROM_START"==e){f=Blockly.isNumber(f)?parseFloat(f)-1:f+" - 1";if("SET"==d)return c+"["+f+"] = "+a+";\n";if("INSERT"==d)return c+".splice("+f+", 0, "+a+");\n"}else if("FROM_END"==e){e=b();if("SET"==d)return e+=c+"["+c+".length - "+f+"] = "+a+";\n";if("INSERT"==d)return e+=
|
||||
c+".splice("+c+".length - "+f+", 0, "+a+");\n"}else if("RANDOM"==e){e=b();f=Blockly.JavaScript.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);e+="var "+f+" = Math.floor(Math.random() * "+c+".length);\n";if("SET"==d)return e+=c+"["+f+"] = "+a+";\n";if("INSERT"==d)return e+=c+".splice("+f+", 0, "+a+");\n"}throw"Unhandled combination (lists_setIndex).";};
|
||||
"null";if("FIRST"==e){if("SET"==d)return c+"[0] = "+a+";\n";if("INSERT"==d)return c+".unshift("+a+");\n"}else if("LAST"==e){if("SET"==d)return e=b(),e+(c+"["+c+".length - 1] = "+a+";\n");if("INSERT"==d)return c+".push("+a+");\n"}else if("FROM_START"==e){f=Blockly.isNumber(f)?parseFloat(f)-1:f+" - 1";if("SET"==d)return c+"["+f+"] = "+a+";\n";if("INSERT"==d)return c+".splice("+f+", 0, "+a+");\n"}else if("FROM_END"==e){e=b();if("SET"==d)return e+(c+"["+c+".length - "+f+"] = "+a+";\n");if("INSERT"==d)return e+
|
||||
(c+".splice("+c+".length - "+f+", 0, "+a+");\n")}else if("RANDOM"==e){e=b();f=Blockly.JavaScript.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);e+="var "+f+" = Math.floor(Math.random() * "+c+".length);\n";if("SET"==d)return e+(c+"["+f+"] = "+a+";\n");if("INSERT"==d)return e+(c+".splice("+f+", 0, "+a+");\n")}throw"Unhandled combination (lists_setIndex).";};
|
||||
Blockly.JavaScript.lists_getSublist=function(a){var b=Blockly.JavaScript.valueToCode(a,"LIST",Blockly.JavaScript.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.JavaScript.valueToCode(a,"AT1",Blockly.JavaScript.ORDER_NONE)||"1";a=Blockly.JavaScript.valueToCode(a,"AT2",Blockly.JavaScript.ORDER_NONE)||"1";return["FIRST"==c&&"LAST"==d?b+".concat()":Blockly.JavaScript.provideFunction_("lists_get_sublist",["function "+Blockly.JavaScript.FUNCTION_NAME_PLACEHOLDER_+
|
||||
"(list, where1, at1, where2, at2) {"," function getAt(where, at) {"," if (where == 'FROM_START') {"," at--;"," } else if (where == 'FROM_END') {"," at = list.length - at;"," } else if (where == 'FIRST') {"," at = 0;"," } else if (where == 'LAST') {"," at = list.length - 1;"," } else {"," throw 'Unhandled option (lists_getSublist).';"," }"," return at;"," }"," at1 = getAt(where1, at1);"," at2 = getAt(where2, at2) + 1;"," return list.slice(at1, at2);",
|
||||
"}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+a+")",Blockly.JavaScript.ORDER_FUNCTION_CALL]};
|
||||
@@ -42,7 +42,7 @@ a+="var "+e+" = "+b+";\n");return a+("for (var "+d+" = 0; "+d+" < "+e+"; "+d+"++
|
||||
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+="if ("+g+" > "+c+") {\n",a+=Blockly.JavaScript.INDENT+d+" = -"+d+";\n",a+="}\n",a+="for ("+b+" = "+g+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+") {\n"+f+"}\n";return a};
|
||||
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+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+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+
|
||||
"_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]};
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ Blockly.Lua.logic_boolean=function(a){return["TRUE"==a.getFieldValue("BOOL")?"tr
|
||||
Blockly.Lua.controls_repeat_ext=function(a){var b=Blockly.Lua.valueToCode(a,"TIMES",Blockly.Lua.ORDER_NONE)||"0",b=Blockly.isNumber(b)?parseInt(b,10):"math.floor("+b+")";a=Blockly.Lua.statementToCode(a,"DO")||"\n";a=Blockly.Lua.addContinueLabel(a);return"for "+Blockly.Lua.variableDB_.getDistinctName("count",Blockly.Variables.NAME_TYPE)+" = 1, "+b+" do\n"+a+"end\n"};
|
||||
Blockly.Lua.controls_whileUntil=function(a){var b="UNTIL"==a.getFieldValue("MODE"),c=Blockly.Lua.valueToCode(a,"BOOL",b?Blockly.Lua.ORDER_UNARY:Blockly.Lua.ORDER_NONE)||"false",d=Blockly.Lua.statementToCode(a,"DO")||"\n",d=Blockly.Lua.addLoopTrap(d,a.id),d=Blockly.Lua.addContinueLabel(d);b&&(c="not "+c);return"while "+c+" do\n"+d+"end\n"};
|
||||
Blockly.Lua.controls_for=function(a){var b=Blockly.Lua.variableDB_.getName(a.getFieldValue("VAR"),Blockly.Variables.NAME_TYPE),c=Blockly.Lua.valueToCode(a,"FROM",Blockly.Lua.ORDER_NONE)||"0",d=Blockly.Lua.valueToCode(a,"TO",Blockly.Lua.ORDER_NONE)||"0",e=Blockly.Lua.valueToCode(a,"BY",Blockly.Lua.ORDER_NONE)||"1",f=Blockly.Lua.statementToCode(a,"DO")||"\n",f=Blockly.Lua.addLoopTrap(f,a.id),f=Blockly.Lua.addContinueLabel(f);a="";var g;Blockly.isNumber(c)&&Blockly.isNumber(d)&&Blockly.isNumber(e)?(g=
|
||||
parseFloat(c)<=parseFloat(d),e=Math.abs(parseFloat(e)),g=(g?"":"-")+e):(a="",g=Blockly.Lua.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),a+=g+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+"\n"):a+("math.abs("+e+")\n"),a=a+("if ("+c+") > ("+d+") then\n")+(Blockly.Lua.INDENT+g+" = -"+g+"\n"),a+="end\n");a+="for "+b+" = "+c+", "+d+", "+g;return a+=" do\n"+f+"end\n"};
|
||||
parseFloat(c)<=parseFloat(d),e=Math.abs(parseFloat(e)),g=(g?"":"-")+e):(a="",g=Blockly.Lua.variableDB_.getDistinctName(b+"_inc",Blockly.Variables.NAME_TYPE),a+=g+" = ",a=Blockly.isNumber(e)?a+(Math.abs(e)+"\n"):a+("math.abs("+e+")\n"),a=a+("if ("+c+") > ("+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]};
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
.blocklyTable {
|
||||
vertical-align: top;
|
||||
}
|
||||
.blocklyTree .blocklyActiveDescendant > label,
|
||||
.blocklyTree .blocklyActiveDescendant > div > label,
|
||||
.blocklyActiveDescendant > button,
|
||||
.blocklyActiveDescendant > input {
|
||||
outline: 2px dotted #00f;
|
||||
}
|
||||
+3
-3
@@ -143,11 +143,11 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Задае элемэнт у
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Задае элемэнт у пазначанай пазыцыі ў сьпісе. №1 — першы элемэнт.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Задае апошні элемэнт у сьпісе.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Задае выпадковы элемэнт у сьпісе.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "сартаваць %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Сартаваць копію сьпісу.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
|
||||
+2
-2
@@ -146,9 +146,9 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Establece un elemento aleatori
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascendente";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descendente";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "tipo %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "orden %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Ordenar una copia de una lista.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alfabético, ignorar tamaño";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alfabético, ignorar mayúscula/minúscula";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numérico";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alfabético";
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "अंकीय";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
|
||||
+2
-2
@@ -144,8 +144,8 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "リスト内の指定さ
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "リスト内の最後の項目を設定します。";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "リスト内にランダムなアイテムを設定します。";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "昇順";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "降順";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
|
||||
+29
-29
@@ -50,9 +50,9 @@ Blockly.Msg.CONTROLS_IF_MSG_ELSE = "아니라면";
|
||||
Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "다른 경우";
|
||||
Blockly.Msg.CONTROLS_IF_MSG_IF = "만약";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "조건식의 계산 결과가 참이면, 명령을 실행합니다.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "조건식의 계산 결과가 참이면, 첫번째 블럭의 명령을 실행하고, 그렇지 않으면 두번째 블럭의 명령을 실행합니다.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "첫번째 조건식의 계산 결과가 참이면, 첫번째 블럭의 명령을 실행하고, 두번째 조건식의 계산 결과가 참이면, 두번째 블럭의 명령을 실행합니다.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "첫번째 조건식의 계산 결과가 참이면, 첫번째 블럭의 명령을 실행하고, 두번째 조건식의 계산 결과가 참이면, 두번째 블럭의 명령을 실행하고, ... , 어떤 조건식의 계산 결과도 참이 아니면, 마지막 블럭의 명령을 실행합니다.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "조건식의 계산 결과가 참이면, 첫 번째 블럭의 명령을 실행하고, 그렇지 않으면 두 번째 블럭의 명령을 실행합니다.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "첫 번째 조건식의 계산 결과가 참이면, 첫 번째 블럭의 명령을 실행하고, 두 번째 조건식의 계산 결과가 참이면, 두 번째 블럭의 명령을 실행합니다.";
|
||||
Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "첫 번째 조건식의 계산 결과가 참이면, 첫 번째 블럭의 명령을 실행하고, 두 번째 조건식의 계산 결과가 참이면, 두 번째 블럭의 명령을 실행하고, ... , 어떤 조건식의 계산 결과도 참이 아니면, 마지막 블럭의 명령을 실행합니다.";
|
||||
Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://ko.wikipedia.org/wiki/For_루프";
|
||||
Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "하기";
|
||||
Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1회 반복";
|
||||
@@ -81,29 +81,29 @@ Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "리스트 블럭의 내용을
|
||||
Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "리스트 만들기";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "아이템을 리스트에 추가합니다.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "원하는 아이템 갯수로 리스트를 생성합니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FIRST = "첫번째";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "원하는 수의 항목들로 목록을 생성합니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FIRST = "첫 번째";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "마지막 번째 위치부터, # 번째";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#";
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET = "아이템 가져오기";
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET = "가져오기";
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "잘라 내기";
|
||||
Blockly.Msg.LISTS_GET_INDEX_LAST = "마지막";
|
||||
Blockly.Msg.LISTS_GET_INDEX_RANDOM = "임의로";
|
||||
Blockly.Msg.LISTS_GET_INDEX_REMOVE = "삭제";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TAIL = "";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "첫 번째 아이템을 찾아 돌려줍니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_END = "특정 위치의 아이템을 찾아 돌려줍니다. #1 은 마지막 아이템.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_START = "특정 위치의 아이템을 찾아 돌려줍니다. #1 은 첫번째 아이템.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_END = "목록의 특정 위치의 항목을 반환합니다. #1은 마지막 항목입니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_START = "목록에서 특정 위치의 항목을 반환합니다. #1은 첫 번째 항목입니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "마지막 아이템을 찾아 돌려줍니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "리스트의 아이템들 중, 랜덤으로 선택해 돌려줍니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "첫 번째 아이템을 찾아내 돌려주고, 그 아이템을 리스트에서 삭제합니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_END = "특정 위치의 아이템을 찾아내 돌려주고, 그 아이템을 리스트에서 삭제합니다. #1 는 마지막 아이템.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_START = "특정 위치의 아이템을 찾아내 돌려주고, 그 아이템을 리스트에서 삭제합니다. #1 는 첫번째 아이템.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_END = "목록의 특정 위치의 항목을 제거하고 반환합니다. #1는 마지막 항목입니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_START = "목록의 특정 위치에 있는 항목을 제거하고 반환합니다. #1는 첫 번째 항목입니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "마지막 아이템을 찾아내 돌려주고, 그 아이템을 리스트에서 삭제합니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "목록에서 임의 위치의 아이템을 찾아내 삭제하고 돌려줍니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "리스트에서 첫 번째 아이템을 삭제합니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_END = "특정 위치의 아이템을 찾아내 삭제합니다. #1 는 마지막 아이템.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_START = "특정 위치의 아이템을 찾아내 삭제합니다. #1 는 첫번째 아이템.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_END = "목록의 특정 위치의 항목을 제거합니다. #1는 마지막 항목입니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_START = "목록에서 특정 위치의 항목을 삭제합니다. #1는 첫 번째 항목입니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "리스트에서 마지막 아이템을 찾아 삭제합니다.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "리스트에서 랜덤하게 아이템을 삭제합니다.";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "끝에서부터 # 번째로";
|
||||
@@ -125,7 +125,7 @@ Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1이 비어 있습니다";
|
||||
Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "목록이 비었을 때 참을 반환합니다.";
|
||||
Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of";
|
||||
Blockly.Msg.LISTS_LENGTH_TITLE = "%1의 길이";
|
||||
Blockly.Msg.LISTS_LENGTH_TOOLTIP = "리스트에 포함되어있는, 아이템 갯수를 돌려줍니다.";
|
||||
Blockly.Msg.LISTS_LENGTH_TOOLTIP = "목록의 길이를 반환합니다.";
|
||||
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with";
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "%1 을 %2 번 넣어, 리스트 생성";
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "원하는 값을, 원하는 갯수 만큼 넣어, 새로운 리스트를 생성합니다.";
|
||||
@@ -133,24 +133,24 @@ Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Li
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "에";
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "에서 원하는 위치에 삽입";
|
||||
Blockly.Msg.LISTS_SET_INDEX_SET = "에서 설정";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "아이템을 리스트의 첫번째 위치에 삽입합니다.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "항목을 목록의 처음 위치에 삽입합니다.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_END = "아이템을 리스트의 특정 위치에 삽입합니다. 마지막 아이템은 #1.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_START = "아이템을 리스트의 특정 위치에 삽입합니다. 첫번째 아이템은 #1.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_START = "목록의 특정 위치에 항목을 삽입합니다. 첫 번째 항목은 #1입니다.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "리스트의 마지막에 아이템을 추가합니다.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "목록에서 임의 위치에 아이템을 삽입합니다.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "첫 번째 위치의 아이템으로 설정합니다.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "특정 번째 위치의 아이템으로 설정합니다. #1 는 마지막 아이템.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "특정 번째 위치의 아이템으로 설정합니다. #1 는 첫번째 아이템.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "목록의 특정 위치의 항목으로 설정합니다. #1는 마지막 항목입니다.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "목록의 특정 위치에 있는 항목으로 설정합니다. #1는 첫 번째 항목입니다.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "마지막 아이템으로 설정합니다.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "목록에서 임의 위치의 아이템을 설정합니다.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "오름차순";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "내림차순";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "정렬 %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "목록의 사본을 정렬합니다.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "알파벳순 (대소문자 구분 안 함)";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "숫자순";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "알파벳순";
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "텍스트에서 목록 만들기";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "목록에서 텍스트 만들기";
|
||||
@@ -220,7 +220,7 @@ Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "최대값";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "중간값";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "최소값";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "가장 여러 개 있는 값";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "목록의 임의 아이템";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "목록의 임의 항목";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "표준 편차";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "합";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "리스트에 들어있는 수(값)들에 대해, 산술 평균(arithmetic mean) 한 값을 돌려줍니다.";
|
||||
@@ -291,13 +291,13 @@ Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "실행 후, 결과 값을 돌려주
|
||||
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "경고: 이 함수에는, 같은 이름을 사용하는 매개 변수들이 있습니다.";
|
||||
Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "함수 정의 찾기";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "값이 참이라면, 두번째 값을 반환합니다.";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "값이 참이라면, 두 번째 값을 반환합니다.";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "경고: 이 블럭은, 함수 정의 블럭 안에서만 사용할 수 있습니다.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "매개 변수:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "함수에 값을 더합니다.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "매개 변수들";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "이 함수를 추가, 삭제, 혹은 재정렬합니다.";
|
||||
Blockly.Msg.REDO = "Redo"; // untranslated
|
||||
Blockly.Msg.REDO = "다시 시도";
|
||||
Blockly.Msg.REMOVE_COMMENT = "내용 제거";
|
||||
Blockly.Msg.RENAME_VARIABLE = "변수 이름 바꾸기:";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "'%1' 변수 이름을 바꾸기:";
|
||||
@@ -319,7 +319,7 @@ Blockly.Msg.TEXT_CHARAT_LAST = "에서, 마지막 문자 얻기";
|
||||
Blockly.Msg.TEXT_CHARAT_RANDOM = "에서, 랜덤하게 한 문자 얻기";
|
||||
Blockly.Msg.TEXT_CHARAT_TAIL = "";
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "특정 번째 위치에서, 문자를 얻어내 돌려줍니다.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "문장을 만들 조각 아이템";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "텍스트에 항목을 추가합니다.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "가입";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "이 문장 블럭의 구성을 추가, 삭제, 재구성 합니다.";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "끝에서부터 # 번째 문자까지";
|
||||
|
||||
+2
-2
@@ -149,8 +149,8 @@ Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeresch";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetesch";
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
|
||||
+8
-8
@@ -143,14 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Stelt het item op een opgege
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Stelt het item op de opgegeven positie in de lijst in. Item 1 is het eerste item.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Stelt het laatste item van een lijst in.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Stelt een willekeurig item uit de lijst in.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "oplopend";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "aflopend";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sorteer %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sorteer een kopie van een lijst.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alfabetisch, negeer zaak";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numerieke";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "in alfabetische volgorde";
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "lijst maken van tekst";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "tekst maken van lijst";
|
||||
|
||||
+4
-4
@@ -145,12 +145,12 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "A fissa l'ùltim element an na l
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "A fissa n'element a l'ancàpit an na lista.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "chërsent";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "calant";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "ordiné %1 %2 %3";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Ordiné na còpia ëd na lista.";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alfabétich, ignorand ël caràter minùscol o majùscol";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numérich";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alfabétich";
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "fé na lista da 'n test";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "fé 'n test da na lista";
|
||||
|
||||
+190
-190
@@ -74,92 +74,92 @@ Blockly.Msg.EXTERNAL_INPUTS = "ಬಾಹ್ಯೊ ಪರಿಕರೊ";
|
||||
Blockly.Msg.HELP = "ಸಹಾಯೊ";
|
||||
Blockly.Msg.INLINE_INPUTS = "ಉಳಸಾಲ್ದ ಉಳಪರಿಪು";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "create empty list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "list"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this list block."; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "ಕಾಲಿ ಪಟ್ಟಿನ್ ಸ್ರಿಸ್ಟಿಸಲೆ";
|
||||
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "ಒಂಜಿ ಪಟ್ಟಿ, ೦ದ ಉದ್ದೊ, ಒವ್ವೇ ಅಂಕಿಅಂಸೊ ಇದ್ಯಾಂತಿನ ದಾಖಲೆ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "ಪಟ್ಟಿ";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "ಸೇರಯರ, ದೆತ್ತ್ ಪಾಡೆರೆ ಅತ್ತಂಡ ಈ ಪಟ್ಯೊಲೆನ್ ತಡೆದ್ ಪತ್ತ್ದ್ ಇಬಾಗೊ ಮಲ್ಪುಲೆ.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "create list with"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the list."; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Create a list with any number of items."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_FIRST = "first"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# from end"; // untranslated
|
||||
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "ಜತೆ ಪಟ್ಟಿನ್ ರಚಿಸಲೆ";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "ಪಟ್ಟಿಡ್ ಕೆಲವು ಅಂಸೊಲೆನ್ ಸೇರಲೆ.";
|
||||
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "ಒವ್ವೇ ಸಂಖ್ಯೆದ ಪಟ್ಟಿಲೆ ಅಂಸೊದೊಟ್ಟುಗೆ ರಚಿಸಲೆ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FIRST = "ಸುರುತ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# ಅಕೇರಿಡ್ದ್";
|
||||
Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET = "get"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_LAST = "last"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_RANDOM = "random"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_REMOVE = "remove"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET = "ದೆತೊನು";
|
||||
Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "ದೆತೊನಿಯರ ಬುಕ್ಕೊ ದೆಪ್ಪೆರೆ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_LAST = "ಕಡೆತ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_RANDOM = "ಗೊತ್ತು ಗುರಿದಾಂತಿನ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_REMOVE = "ದೆಪ್ಪುಲೆ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TAIL = ""; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "Returns the first item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_END = "Returns the item at the specified position in a list. #1 is the last item."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_START = "Returns the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "Returns the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "Returns a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "Removes and returns the first item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_END = "Removes and returns the item at the specified position in a list. #1 is the last item."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_START = "Removes and returns the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "Removes and returns the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "Removes and returns a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "Removes the first item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_END = "Removes the item at the specified position in a list. #1 is the last item."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_START = "Removes the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "Removes the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "Removes a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "to # from end"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "to #"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "to last"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "ಸುರುತ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_END = "ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡುಪ್ಪುನ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ಪಿರಕೊರು #1 ಸುರುತ ಅಂಸೊ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_START = "ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡುಪ್ಪುನ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ಪಿರಕೊರು #1 ಸುರುತ ಅಂಸೊ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "ಅಕೇರಿದ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "ಗೊತ್ತುಗುರಿದಾಂತಿನ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "ಸುರುತ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ದೆಪ್ಪು ಅತ್ತಂಡ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_END = "ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡುಪ್ಪುನ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ದೆಪ್ಪು ಅತ್ತಂಡ ಪಿರಕೊರು #1 ಅಕೇರಿದ ಅಂಸೊ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_START = "ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡುಪ್ಪುನ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ದೆಪ್ಪು ಅತ್ತಂಡ ಪಿರಕೊರು #1 ಸುರುತ ಅಂಸೊ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "ಅಕೇರಿದ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ದೆಪ್ಪು ಅತ್ತಂಡ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "ಗೊತ್ತುಗುರಿದಾಂತಿನ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ದೆಪ್ಪು ಅತ್ತಂಡ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "ಸುರುತ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ದೆಪ್ಪು.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_END = "ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡುಪ್ಪುನ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ದೆಪ್ಪು #1 ಅಕೇರಿದ ಅಂಸೊ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_START = "ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡುಪ್ಪುನ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ದೆಪ್ಪುಲೆ #1 ಸುರುತ ಅಂಸೊ";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "ಅಕೇರಿದ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ದೆಪ್ಪು.";
|
||||
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "ಗೊತ್ತುಗುರಿದಾಂತಿನ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ದೆಪ್ಪು.";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "ಡ್ದ್ # ಅಕೇರಿಗ್";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "ಡ್ದ್";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "ಅಕೇರಿಡ್ದ್";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "get sub-list from first"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "get sub-list from # from end"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "get sub-list from #"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "ಉಪ-ಪಟ್ಯೊನು ಸುರುಡ್ದು ದೆತೊನು";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "ಉಪ-ಪಟ್ಯೊನು ದೆತೊನು#ಅಕೇರಿಡ್ದ್";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "ಉಪ-ಪಟ್ಯೊನು ದೆತೊನು#";
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_TAIL = ""; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "Creates a copy of the specified portion of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated
|
||||
Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "ಪಟ್ಯೊದ ನಿರ್ದಿಷ್ಟ ಬಾಗೊದ ಪ್ರತಿನ್ ಸ್ರಸ್ಟಿಸವುಂಡು.";
|
||||
Blockly.Msg.LISTS_INDEX_OF_FIRST = "ದುಂಬು ಕರಿನ ಪಟ್ಯೊನು ನಾಡ್ಲೆ";
|
||||
Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the list. Returns 0 if item is not found."; // untranslated
|
||||
Blockly.Msg.LISTS_INLIST = "in list"; // untranslated
|
||||
Blockly.Msg.LISTS_INDEX_OF_LAST = "ಅಕೆರಿಗ್ ಕರಿನ ಪಟ್ಯೊನು ನಾಡ್ಲೆ";
|
||||
Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "ಸುರುತ ಪಟ್ಯೊದ ಸೂಚ್ಯಿ/ಅಕೇರಿಟ್ ಸಂಭವಿಸವುನ ಸುರುತ ಪಟ್ಟಯೊದುಲಯಿದ ರಡ್ಡನೆ ಪಟ್ಯೊನು ಪಿರಕೊರು. ೦ ಪಟ್ಯೊ ತಿಕಂದಿತ್ತ್ಂಡ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.LISTS_INLIST = "ಪಟ್ಟಿಡ್";
|
||||
Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated
|
||||
Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 is empty"; // untranslated
|
||||
Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "Returns true if the list is empty."; // untranslated
|
||||
Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 ಕಾಲಿ";
|
||||
Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "ಪಟ್ಯೊ ಕಾಲಿ ಪನ್ಪುನವು ಸತ್ಯೊ ಆಂಡ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated
|
||||
Blockly.Msg.LISTS_LENGTH_TITLE = "length of %1"; // untranslated
|
||||
Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Returns the length of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_LENGTH_TITLE = "೧% ಉದ್ದೊ";
|
||||
Blockly.Msg.LISTS_LENGTH_TOOLTIP = "ಪಟ್ಟಿದ ಉದ್ದೊನು ಪಿರಕೊರು.";
|
||||
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "create list with item %1 repeated %2 times"; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Creates a list consisting of the given value repeated the specified number of times."; // untranslated
|
||||
Blockly.Msg.LISTS_REPEAT_TITLE = "%1 ಪಿರೊರ %2 ಕಾಲೊಡು ಪಟ್ಟಿಲೆನ ಅಂಸೊನು ರಚಿಸಲೆ.";
|
||||
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "ಕೊರ್ನ ಮೌಲ್ಯಡು ನಿರ್ದಿಷ್ಟ ಕಾಲೊಡು ಪಿರೊತ ಪಟ್ಟಿನ್ ರಚಿಸಲೆ.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "as"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "insert at"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_SET = "set"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Inserts the item at the start of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_END = "Inserts the item at the specified position in a list. #1 is the last item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_START = "Inserts the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Append the item to the end of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Inserts the item randomly in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Sets the first item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Sets the item at the specified position in a list. #1 is the last item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Sets the item at the specified position in a list. #1 is the first item."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "ಅಂಚ";
|
||||
Blockly.Msg.LISTS_SET_INDEX_INSERT = "ಸೇರಲ";
|
||||
Blockly.Msg.LISTS_SET_INDEX_SET = "ಮಾಲ್ಪು";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "ಸುರುತ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ಸೇರಲ.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_END = "ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡುಪ್ಪುನ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ಸೇರಲ #1 ಅಕೇರಿತ ಅಂಸೊ";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_START = "ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡುಪ್ಪುನ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ಸೇರಲ #1 ಸುರುತ ಅಂಸೊ";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "ಪಟ್ಟಿದ ಅಕೇರಿಗ್ ಈ ಅಂಸೊಲೆನ್ ಸೇರಲ.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "ಪಟ್ಟಿಗ್ ಗೊತ್ತುಗುರಿದಾಂತೆ ಅಂಸೊಲೆನ್ ಸೇರಲ.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "ಸುರುತ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ಮಾಲ್ಪು.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡುಪ್ಪುನ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ಮಾಲ್ಪು #1 ಅಕೇರಿತ ಅಂಸೊ";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡುಪ್ಪುನ ಅಂಸೊಲೆ ಪಟ್ಟಿನ್ ಮಾಲ್ಪು #1 ಸುರುತ ಅಂಸೊ";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "ಅಕೇರಿದ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ಮಾಲ್ಪು.";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "ಗೊತ್ತುಗುರಿದಾಂತಿನ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ಮಾಲ್ಪು.";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ಮಿತ್ತ್ ಪೋಪುನೆ";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "ತಿರ್ತ್ ಪೋಪುನೆ";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "%1 %2 %3 ಇಂಗಡಿಪು";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "ಪಟ್ಟಿಲೆ ಪ್ರತಿನ್ ಇಂಗಡಿಪುಲೆ";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "ಅಕ್ಷರೊಲು, ಸಂದರ್ಭೊಡು ನಿರ್ಲಕ್ಷಿಸಲೆ";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "ಸಂಕೇತೊ";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "ಅಕ್ಷರೊಲು";
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, separated by a delimiter."; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "ಪಟ್ಯೊಲೆ ಪಟ್ಟಿನ್ ತಯಾರ್ ಮಲ್ಪುಲೆ";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "ಪಟ್ಟಿದ ಪಟ್ಯೊನು ತಯಾರ್ ಮಲ್ಪುಲೆ";
|
||||
Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "ಒಂಜಿ ಗ್ರಂತೊಡ್ದು ಒಂಜಿ ಪಟ್ಯೊದ ಪಟ್ಟಿಗ್ ಸೇರಾದ್, ಮಿತಿಸೂಚಕೊದ ಮೂಲಕೊ ಬೇತೆ ಮಲ್ಪುಲೆ.";
|
||||
Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "ಗ್ರಂತೊಲೆನ ಪಟ್ಟಿಡ್ದ್ ಪಟ್ಯೊಲೆನ್ ಬೇತೆ ಮಾಲ್ತ್ಂಡ,ಪ್ರತಿ ಮಿತಿಸೂಚಕೊಡು ಬೇತೆ ಆಪುಂಡು.";
|
||||
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "ಮಿತಿಸೂಚಕೊದ ಒಟ್ಟುಗು";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "ಸುಲ್ಲು";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Returns either true or false."; // untranslated
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "ಪೂರ ಸತ್ಯೊ ಅತ್ತಂಡ ಸುಲ್ಲು ಆಂಡ ಪಿರಕೊರು";
|
||||
Blockly.Msg.LOGIC_BOOLEAN_TRUE = "ಸತ್ಯೊ";
|
||||
Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)"; // untranslated
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "ರಡ್ಡ್ ಅತ್ತಂದೆ ಬೇತೆ ಸೂಚನೆಲು ನಿಜೊಕ್ಕುಲಾ ಸಮೊ ಇತ್ತ್ಂಡ ಪಿರ ಕೊರ್ಲೆ.";
|
||||
@@ -169,8 +169,8 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "ಸುರುತ ಅತ್ತಂದೆ
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "ಸುರುತ ಅತ್ತಂದೆ ರಡ್ಡನೆದ ಸೂಚನೆ ನಿಜೊಕ್ಕುಲಾ ದಿಂಜ ಎಲ್ಯೆ ಅತ್ತಂಡ ಸಮೊ ಆದಿತ್ತ್ಂಡ ಪಿರ ಕೊರ್ಲೆ";
|
||||
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "ರಡ್ಡ್ ಅತ್ತಂದೆ ಬೇತೆ ಸೂಚನೆಲು ನಿಜೊಕ್ಕುಲಾ ಸಮೊ ಆತಿಜಂಡ ಪಿರ ಕೊರ್ಲೆ";
|
||||
Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated
|
||||
Blockly.Msg.LOGIC_NEGATE_TITLE = "not %1"; // untranslated
|
||||
Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Returns true if the input is false. Returns false if the input is true."; // untranslated
|
||||
Blockly.Msg.LOGIC_NEGATE_TITLE = "%1 ಇದ್ದಿ";
|
||||
Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "ನಿಜವಾದ್ ಇನ್ಪುಟ್ ಸುಲ್ಲಾದಿತ್ತ್ಂಡ ಪಿರಕೊರು. ನಿಜವಾದ್ ಸುಲ್ಲು ಇನ್ಪುಟ್ ಇತ್ತ್ಂಡ ಪಿರಕೊರು";
|
||||
Blockly.Msg.LOGIC_NULL = "ಸೊನ್ನೆ";
|
||||
Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated
|
||||
Blockly.Msg.LOGIC_NULL_TOOLTIP = "ಸೊನ್ನೆನ್ ಪರಿಕೊರ್ಪುಂಡು";
|
||||
@@ -178,200 +178,200 @@ Blockly.Msg.LOGIC_OPERATION_AND = "ಬುಕ್ಕೊ";
|
||||
Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated
|
||||
Blockly.Msg.LOGIC_OPERATION_OR = "ಅತ್ತಂಡ";
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "ರಡ್ಡ್ ಸೂಚನೆಲಾ ನಿಜೊ ಆದಿತ್ತ್ಂಡ ನಿಜವಾತ್ ಪಿರಕೊರ್ಲೆ";
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Return true if at least one of the inputs is true."; // untranslated
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "ನಿಜವಾದ್ಲ ಒಂಜಿವೇಳೆ ಇನ್ಪುಟ್ ಒಂತೆ ನಿಜವಾದಿತ್ತ್ಂಡ ಪಿರಕೊರು";
|
||||
Blockly.Msg.LOGIC_TERNARY_CONDITION = "ಪರೀಕ್ಷೆ";
|
||||
Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "ಒಂಜಿ ವೇಲೆ ಸುಳ್ಳು";
|
||||
Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "ಒಂಜಿ ವೇಲೆ ಸತ್ಯೊ";
|
||||
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated
|
||||
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "ಪರೀಕ್ಷೆದ ಸ್ಥಿತಿನ್ ಪರಿಶೀಲನೆ ಮಲ್ಲಪುಲೆ. ಪರಿಸ್ಥಿತಿ ನಿಜವಾದಿತ್ತ್ಂಡ, ನಿಜವಾಯಿನ ಮೌಲ್ಯೊನು ಪಿರಕೊರ್ಲೆ; ಅತ್ತಂಡ ತಪ್ಪು ಮೌಲ್ಯೊನೇ ಪಿರ ಕೊರ್ಲೆ.";
|
||||
Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Return the product of the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to the power of the second number."; // untranslated
|
||||
Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/ಅಂಕಗಣಿತ";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "ಸಂಖ್ಯೆದ ಮೊತ್ತನ್ ಪಿರ ಕೊರು.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "ಸಂಖ್ಯೆದ ಭಾಗಲಬ್ದೊನು ಪಿರ ಕೊರು.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "ಸಂಖ್ಯೆದ ವ್ಯತ್ಯಾಸೊನು ಪರಕೊರು.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "ಸಂಖ್ಯೆದ ಉತ್ಪನ್ನೊನು ಪಿರ ಕೊರು.";
|
||||
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "ಒಂಜನೆ ಸಂಖ್ಯೆದ ಶಕ್ತಿನ್ ರಡ್ಡನೆ ಸಂಖ್ಯೆಡ್ದ್ ಪಿರ ಹೆಚ್ಚಿಗೆ ಮಲ್ಪುಲೆ.";
|
||||
Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated
|
||||
Blockly.Msg.MATH_CHANGE_TITLE = "change %1 by %2"; // untranslated
|
||||
Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated
|
||||
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity)."; // untranslated
|
||||
Blockly.Msg.MATH_CHANGE_TITLE = "%1 ಡ್ದ್ %2 ಬದಲಾಯಿಸವೊಲಿ";
|
||||
Blockly.Msg.MATH_CHANGE_TOOLTIP = "'%1' ಬದಲ್ ಮಲ್ಪುನಂಚಿನ ಒಂಜಿ ನಂಬರ್ನ್ ಸೇರಾವು";
|
||||
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/ಗಣಿತ_ನಿರಂತರ";
|
||||
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "ಸಾಮಾನ್ಯವಾದ್ ಒಂಜಿ ಸ್ಥಿರವಾದಿತ್ತ್ಂಡ ಪಿರಕೊರು: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity).";
|
||||
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated
|
||||
Blockly.Msg.MATH_CONSTRAIN_TITLE = " %1 ಕಮ್ಮಿ %2 ಜಾಸ್ತಿ %3 ಕಡ್ಡಾಯ ಮಲ್ಪು";
|
||||
Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "ನಿಗದಿತ ನಿಯಮೊಗು ನಡುಟು ದಿಂಜ ನಿರ್ಬಂದೊ(ಸೇರ್ನಂಚ)";
|
||||
Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated
|
||||
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "is divisible by"; // untranslated
|
||||
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "ಭಾಗಿಸವೊಲಿಯ";
|
||||
Blockly.Msg.MATH_IS_EVEN = "ಸಮೊ ಆತ್ಂಡ್";
|
||||
Blockly.Msg.MATH_IS_NEGATIVE = "ರುನೊ ಆತ್ಂಡ್";
|
||||
Blockly.Msg.MATH_IS_ODD = "ಬೆಸೊ ಆತ್ಂಡ್";
|
||||
Blockly.Msg.MATH_IS_POSITIVE = "ಗುನೊ ಆತ್ಂಡ್";
|
||||
Blockly.Msg.MATH_IS_PRIME = "ಎಡ್ಡೆ ಆತ್ಂಡ್";
|
||||
Blockly.Msg.MATH_IS_TOOLTIP = "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false."; // untranslated
|
||||
Blockly.Msg.MATH_IS_TOOLTIP = "ಒಂಜಿ ವೇಲ್ಯೊ ಸಂಖ್ಯೆ ಸರಿ, ಬೆಸ, ಅವಿಭಾಜ್ಯ, ಇಡೀ, ಕೂಡಬುನ, ಕಲೆವುನ, ಅತ್ತಂಡ ನಿರ್ದಿಷ್ಟ ಸಂಖ್ಯೆಡ್ದ್ ಭಾಗಿಸವುಂಡಂದ್ ಪರಿಶೀಲಿಸ. ಸರಿ ಅತ್ತಂಡ ತಪ್ಪುನು ಪಿರಕೊರು.";
|
||||
Blockly.Msg.MATH_IS_WHOLE = "ಮಾಂತ ಆತ್ಂಡ್";
|
||||
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated
|
||||
Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; // untranslated
|
||||
Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated
|
||||
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/ಮೋಡ್ಯುಲೊ_ಒಪರೇಶನ್";
|
||||
Blockly.Msg.MATH_MODULO_TITLE = " %1 ÷ %2 ಒರಿನ ಬಾಗೊ";
|
||||
Blockly.Msg.MATH_MODULO_TOOLTIP = "ರಡ್ಡ್ ಸಂಖ್ಯೆದ ಇಬಾಗೊಡ್ದು ಒರಿನ ಬಾಗೊನು ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated
|
||||
Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; // untranslated
|
||||
Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/ಸಂಖ್ಯೆ";
|
||||
Blockly.Msg.MATH_NUMBER_TOOLTIP = "ಅ ನಂಬ್ರೊ";
|
||||
Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "ಸರಾಸರಿ ಪಟ್ಟಿ";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "max of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "median of list"; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "ಪಟ್ಟಿನ್ ಮಿಸ್ರೊ ಮಲ್ಪು";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "ನಡುತ ಪಟ್ಟಿ";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "ಕಿನ್ಯ ಪಟ್ಟಿ";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "ಪಟ್ಟಿದ ಇದಾನೊಲು";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "ಗೊತ್ತುಗುರಿ ದಾಂತಿನ ಅಂಸೊದ ಪಟ್ಟಿ";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "ಕಬರ್ ಪಟ್ಟಿದ ಪ್ರಮಾನೊ";
|
||||
Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "ಒಟ್ಟು ಕೂಡಯಿನಾ ಪಟ್ಟಿ";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "ಪಟ್ಟಿಡುಪ್ಪುನ ಸರ್ವಸಾಧಾರಣ ಬಿಲೆನ್ ಪಿರಕೋರ್ಲೆ";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Return the smallest number in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Return a list of the most common item(s) in the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Return a random element from the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Return the standard deviation of the list."; // untranslated
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "ಪಟ್ಟಿದಾ ಮಲ್ಲ ಸಂಕ್ಯೆನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "ಪಟ್ಟಿದಾ ನಡುತ ಸಂಕ್ಯೆನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "ಪಟ್ಟಿದಾ ಕಿನ್ಯ ಸಂಕ್ಯೆನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "ಪಟ್ಟಿದ ಸಾಮಾನ್ಯೊ ಅಂಸೊಲೆನ ಪಟ್ಟಿನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "ಪಟ್ಟಿದ ಗೊತ್ತು ಗುರಿದಾಂತಿನ ಅಂಸೊಲೆನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "ಪಟ್ಟಿದ ಗುಣಮಟ್ಟೊದ ವರ್ಗೀಕರಣೊನು ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "ಪಟ್ಟಿದಾ ಮಾಂತ ಸಂಕ್ಯೆಲೆನ್ ಪಿರಕೊರ್ಲೆ";
|
||||
Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/ರಾಂಡಮ್_ನಂಬರ್_ಜನರೇಶನ್";
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "ಗೊತ್ತುಗುರಿ ದಾಂತಿನ ಬಾಗೊ";
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated
|
||||
Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated
|
||||
Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "0.0 (ಸೇರ್ನಂಚಿನ) and 1.0 (ಸೇರಂದಿನಂಚಿನ) ನಡುತ ಗೊತ್ತು ಗುರಿದಾಂತಿನ ಬಾಗೊನು ಪಿರಕೊರು.";
|
||||
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/ರಾಂಡಮ್_ನಂಬರ್_ಜನರೇಶನ್";
|
||||
Blockly.Msg.MATH_RANDOM_INT_TITLE = " %1 ಡ್ದ್ %2 ಯಾದೃಚ್ಛಿಕ ಪೂರ್ಣಾಂಕೊ";
|
||||
Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "ರಡ್ಡ್ ನಿಗದಿತ ನಿಯಮೊದ ನಡುತ ಯಾದೃಚ್ಛಿಕ ಪೂರ್ಣಾಂಕೊನು ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/ಪೂರ್ಣಾಂಕೊ";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "ಸುತ್ತು";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "ಸುತ್ತು ಕಡಮೆ";
|
||||
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "ಮುಗಿಪುನ ಸಮಯೊ";
|
||||
Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated
|
||||
Blockly.Msg.MATH_ROUND_TOOLTIP = "ಸಂಖ್ಯೆನ್ ಮಿತ್ತ್ ಅತ್ತಂಡ ತಿರ್ತ್ ರೌಂಡ್ ಮಲ್ಪು";
|
||||
Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/ವರ್ಗೊಮೂಲೊ";
|
||||
Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "ಸಂಪೂರ್ನೊ";
|
||||
Blockly.Msg.MATH_SINGLE_OP_ROOT = "ವರ್ಗಮೂಲೊ";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Return the base 10 logarithm of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Return the negation of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "ಸಂಖ್ಯೆದ ಸರಿಯಾಯಿನ ಮೌಲ್ಯೊನು ಕೊರು";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "ಸಂಖ್ಯೆದ ಇ ಗ್ ಅಧಿಕಾರೊನು ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "ಸಂಖ್ಯೆದ ನಿಜವಾಯಿನ ಕ್ರಮಾವಳಿನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "ಸಂಖ್ಯೆದ ೧೦ ಮೂಲೊ ಕ್ರಮಾವಳಿನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "ಸಂಖ್ಯೆದ ನಿರಾಕರಣೆನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "ಸಂಖ್ಯೆದ ೧೦ಗ್ ಅಧಿಕಾರೊನು ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "ಸಂಖ್ಯೆದ ವರ್ಗಮೂಲೊನು ಪಿರ ಕೊರು.";
|
||||
Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/ತ್ರಿಕೋನಮಿತಿದ_ಕಾರ್ಯೊಲು";
|
||||
Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "Return the cosine of a degree (not radian)."; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Return the sine of a degree (not radian)."; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Return the tangent of a degree (not radian)."; // untranslated
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "ಸಂಖ್ಯೆದ ಆರ್ಕ್ಕೊಸಿನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "ಪದವಿದ ಆರ್ಕ್ಸೈನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "ಸಂಖ್ಯೆದ ಆರ್ಕ್ಟ್ಯಾಂಜೆಂಟ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "ಪದವಿದ ಸಹ ಚಿಹ್ನೆನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "ಪದವಿದ ಚಿಹ್ನೆನ್ ಪಿರಕೊರು";
|
||||
Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "ಪದವಿದ ಸ್ಪರ್ಶಕೊನು ಪಿರಕೊರು";
|
||||
Blockly.Msg.ME = "ಯಾನ್";
|
||||
Blockly.Msg.NEW_VARIABLE = "ಪೊಸ ಬದಲಾವಣೆ";
|
||||
Blockly.Msg.NEW_VARIABLE_TITLE = "ಪುದರ್ದ ಪೊಸ ಬದಲಾವಣೆ:";
|
||||
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "allow statements"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "with:"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Run the user-defined function '%1'."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Run the user-defined function '%1' and use its output."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "with:"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_CREATE_DO = "Create '%1'"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "Describe this function..."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "ಹೇಳಿಕೆಗ್ ಅವಕಾಸೊ";
|
||||
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "ಜೊತೆ:";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/ಪ್ರೊಸಿಜರ್_%28ಕಂಪ್ಯೂಟರ್_ಸೈನ್ಸ್%29";
|
||||
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "'%1' ಬಳಕೆದಾರೆರೆ ಕಾರ್ಯೊನು ನಡಪಾಲೆ.";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/ಪ್ರೊಸಿಜರ್_%28ಕಂಪ್ಯೂಟರ್_ಸೈನ್ಸ್%29";
|
||||
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = " '%1' ಬಳಕೆದಾರೆರೆ ಕಾರ್ಯೊನು ನಡಪಾಲೆ ಬುಕ್ಕೊ ಅಯಿತ ಉತ್ಪಾದನೆನ್ ಉಪಯೋಗಿಸಲೆ.";
|
||||
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "ಜೊತೆ:";
|
||||
Blockly.Msg.PROCEDURES_CREATE_DO = " '%1'ನ್ ರಚಿಸಲೆ";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "ಈ ಕಾರ್ಯೊನು ಇವರಿಸಲೆ...";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_DO = ""; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "do something"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "to"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "Creates a function with no output."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "ಎಂಚಿನಾಂಡಲ ಮಲ್ಪು";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "ಇಂದೆಕ್";
|
||||
Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "ಉತ್ಪಾದನೆ ದಾಂತಿನ ಕಾರ್ಯೊನು ಸ್ರಿಸ್ಟಿಸಲೆ.";
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "return"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "Creates a function with an output."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Warning: This function has duplicate parameters."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "Highlight function definition"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "ಪಿರಪೋ";
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "ಉತ್ಪಾದನೆ ದಾಂತಿನ ಕಾರ್ಯೊನು ಸ್ರಿಸ್ಟಿಸಲೆ.";
|
||||
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "ಎಚ್ಚರಿಕೆ: ಈ ಕಾರ್ಯೊ ನಕಲಿ ಮಾನದಂಡೊನು ಹೊಂದ್ದ್ಂಡ್.";
|
||||
Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "ದೇರ್ತ್ ತೋಜುನ ಕಾರ್ಯೊದ ವ್ಯಾಕ್ಯಾನೊ";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "If a value is true, then return a second value."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Warning: This block may be used only within a function definition."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "input name:"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated
|
||||
Blockly.Msg.REDO = "Redo"; // untranslated
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "ಮೌಲ್ಯೊ ಸತ್ಯೊ ಆಯಿನೆಡ್ದ್ ಬುಕ್ಕೊನೆ ರಡ್ಡನೆ ಮೌಲ್ಯೊನು ಪಿರಕೊರು.";
|
||||
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "ಎಚ್ಚರಿಕೆ:ವ್ಯಾಕ್ಯಾನೊದ ಕಾರ್ಯೊನು ತಡೆ ಮಲ್ಪೆರೆ ಮಾತ್ರೊ ಇಂದೆತ ಉಪಯೊಗ.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "ಉಲಪರಿಪುದ ಪುದರ್:";
|
||||
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "ಕಾರ್ಯೊದ ಉಲಪರಿಪುನು ಸೇರಲೆ.";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "ಉಲಪರಿಪು";
|
||||
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "ಸೇರಯರ, ದೆತ್ತ್ ಪಾಡೆರೆ ಅತ್ತಂಡ ಪಿರಕೋರಿಕೆದ ಉಲಪರಿಪುದ ಕಾರ್ಯೊನು ಮಲ್ಪುಲೆ.";
|
||||
Blockly.Msg.REDO = "ಪಿರವುದಂಚ";
|
||||
Blockly.Msg.REMOVE_COMMENT = "ಟಿಪ್ಪಣಿನ್ ದೆತ್ತ್ಪಾಡ್ಲೆ";
|
||||
Blockly.Msg.RENAME_VARIABLE = "ಬದಲಾವಣೆ ಆಯಿನ ಪುದರ್ನ್ ನಾನೊರೊ ಪನ್ಲೆ";
|
||||
Blockly.Msg.RENAME_VARIABLE_TITLE = "ನಾನೊರೊ ಪುದರ್ ಬದಲಾವಣೆ ಆಯಿನ ಮಾಂತ '% 1':";
|
||||
Blockly.Msg.TEXT_APPEND_APPENDTEXT = "ಪಟ್ಯೊನು ಸೇರವೆ";
|
||||
Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
|
||||
Blockly.Msg.TEXT_APPEND_TO = "ಇಂದೆಕ್";
|
||||
Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated
|
||||
Blockly.Msg.TEXT_APPEND_TOOLTIP = "%1 ಬದಲಾಪುನ ಕೆಲವು ಪಟ್ಯೊಲೆನ್ ಸೇರಾವೊಂಡು.";
|
||||
Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "to lower case"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "to UPPER CASE"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; // untranslated
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "ಎಲ್ಯ ಅಕ್ಷರೊಗು";
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "ತರೆಬರವುಗು";
|
||||
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "ಮಲ್ಲ ಅಕ್ಷರೊಗು";
|
||||
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "ಪಟ್ಯೊದ ಒಂಜಿ ನಕಲ್ನ್ ಬೇತೆ ಸಮಯೊಡು ಪಿರಕೊರು";
|
||||
Blockly.Msg.TEXT_CHARAT_FIRST = "ಸುರುಡ್ದ್ ಅಕ್ಷರೊನು ನಟೊನ್ಲ";
|
||||
Blockly.Msg.TEXT_CHARAT_FROM_END = "ಅಕ್ಷರೊ ನಟೊನ್#ಅಕೇರಿಡ್ದ್";
|
||||
Blockly.Msg.TEXT_CHARAT_FROM_START = "ಅಕ್ಸರೊನು ದೆತೊನುಲೆ#";
|
||||
Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "ಪಟ್ಯೊಡು";
|
||||
Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_RANDOM = "get random letter"; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_LAST = "ಅಕೇರಿದ ಅಕ್ಷರೊನು ನಟೊನ್ಲ";
|
||||
Blockly.Msg.TEXT_CHARAT_RANDOM = "ಗೊತ್ತುಗುರಿದಾಂತಿ ಅಕ್ಷರೊನು ನಟೊನ್ಲ";
|
||||
Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated
|
||||
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "ಅಕ್ಷರೊನು ನಿರ್ದಿಷ್ಟ ಜಾಗೆಡ್ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "ಪಟ್ಯೊಡು ಅಂಸೊಲೆನ್ ಸೇರಲೆ";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "ಸೇರೊಲಿ";
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; // untranslated
|
||||
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "ಸೇರಯರ, ದೆತ್ತ್ ಪಾಡೆರೆ ಅತ್ತಂಡ ಈ ಪಟ್ಯೊಲೆನ್ ತಡೆದ್ ಪತ್ತ್ದ್ ಪಿರ ರಚಿಸಯರ ಇಬಾಗೊ ಮಲ್ಪುಲೆ.";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "ಅಕ್ಷರೊಗು#ಅಕೇರಿಡ್ದ್";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "ಅಕ್ಷರೊಗು#";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "ಅಕೇರಿದ ಅಕ್ಷರೊಗು";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in text"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "ಪಟ್ಯೊಡು";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "ಉಪ ವಾಕ್ಯೊಡ್ದು ಸುರುತ ಅಕ್ಷರೊನು ನಟೊನ್ಲ";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "ಉಪ ವಾಕ್ಯೊಡ್ದು ಅಕ್ಷರೊನು ನಟೊನ್ಲ#ಅಕೇರಿಡ್ದ್";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "ಉಪ ವಾಕ್ಯೊಡ್ದು ಅಕ್ಷರೊನು ನಟೊನ್ಲ";
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated
|
||||
Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "ಪಟ್ಯೊನು ನಿರ್ದಿಷ್ಟ ಬಾಗೊಡು ಪಿರಕೊರು";
|
||||
Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "ಪಟ್ಯೊಡು";
|
||||
Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "ಸುರುಟು ಸಂಭವಿಸಯಿನ ಪಟ್ಯೊನು ನಾಡ್ಲ";
|
||||
Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "ದುಂಬು ಕರಿನ ಪಟ್ಯೊನು ನಾಡ್ಲೆ";
|
||||
Blockly.Msg.TEXT_INDEXOF_TAIL = ""; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurrence of the first text in the second text. Returns 0 if text is not found."; // untranslated
|
||||
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "ಸುರುತ ಪಟ್ಯೊದ ಸೂಚ್ಯಿ/ಅಕೇರಿಟ್ ಸಂಭವಿಸವುನ ಸುರುತ ಪಟ್ಟಯೊದುಲಯಿದ ರಡ್ಡನೆ ಪಟ್ಯೊನು ಪಿರಕೊರು. ೦ ಪಟ್ಯೊ ತಿಕಂದಿತ್ತ್ಂಡ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated
|
||||
Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 ಕಾಲಿ";
|
||||
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated
|
||||
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "ಕೊರ್ನ ಪಟ್ಯೊ ಕಾಲಿಂದ್ ಸತ್ಯೊ ಆಂಡ ಪಿರಕೊರು";
|
||||
Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "ಪಟ್ಯೊನು ರಚನೆ ಮಲ್ಪು";
|
||||
Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated
|
||||
Blockly.Msg.TEXT_JOIN_TOOLTIP = "ಒವ್ವೇ ಸಂಖ್ಯೆದ ಪಟ್ಯೊದ ತುಂಡುಲೆನ್ ಒಟ್ಟೂಗೆ ಸೇರಯರ ರಚಿಸಲೆ";
|
||||
Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
|
||||
Blockly.Msg.TEXT_LENGTH_TITLE = "೧% ಉದ್ದೊ";
|
||||
Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated
|
||||
Blockly.Msg.TEXT_LENGTH_TOOLTIP = "ಕೊರ್ನ ಪಟ್ಯೊದ ಅಕ್ಷರೊಲೆನ(ಅಂತರೊಲು ಸೇರ್ನಂಚ) ಸಂಖ್ಯೆನ್ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated
|
||||
Blockly.Msg.TEXT_PRINT_TITLE = "print %1"; // untranslated
|
||||
Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated
|
||||
Blockly.Msg.TEXT_PRINT_TITLE = "%1 ಮುದ್ರಿತ";
|
||||
Blockly.Msg.TEXT_PRINT_TOOLTIP = "ನಿರ್ದಿಷ್ಟ ಪಟ್ಯೊ, ಸಂಖ್ಯೆ ಅತ್ತಂಡ ಬೇತೆ ಮೌಲ್ಯೊನು ಮುದ್ರಿಸಲೆ.";
|
||||
Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "prompt for text with message"; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; // untranslated
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "ದಿಂಜ ಬಳಕೆದಾರೆರೆನ್ ಕೇನುಂಡು.";
|
||||
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "ಕೆಲವು ಪಟ್ಯೊದ ಬಳಕೆದಾರೆರೆನ್ ಕೇನುಂಡು.";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "ಸಂಖ್ಯೆದೊಟ್ಟುಗೆ ಸಂದೇಸೊನು ಕೇನುಂಡು";
|
||||
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "ಪಟ್ಯೊದೊಟ್ಟುಗೆ ಸಂದೇಸೊನು ಕೇನುಂಡು.";
|
||||
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/ಸ್ಟ್ರಿಂಗ್_(ಕಂಪ್ಯೂಟರ್_ಸೈನ್ಸ್)";
|
||||
Blockly.Msg.TEXT_TEXT_TOOLTIP = "ಒಂಜಿ ಅಕ್ಷರೊ, ಪದೊ ಅತ್ತಂಡ ಪಾಟೊದ ಒಂಜಿ ಸಾಲ್";
|
||||
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side of"; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "ರಡ್ಡ್ ಬರಿತ ಜಾಗೆನ್ಲ ಕತ್ತೆರಿಪುಲೆ.";
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "ಎಡತ ಬರಿತ ಜಾಗೆನ್ ಕತ್ತೆರಿಪುಲೆ.";
|
||||
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "ಬಲತ ಬರಿತ ಜಾಗೆನ್ ಕತ್ತೆರಿಪುಲೆ.";
|
||||
Blockly.Msg.TEXT_TRIM_TOOLTIP = "ಒಂಜಿ ಅತ್ತಂಡ ರಡ್ಡ್ ಕೊಡಿಡ್ದ್ ದೆತ್ತ್ನ ಕಅಲಿ ಪಟ್ಯೊದ ಪ್ರತಿನ್ ಪಿರಕೊರು.";
|
||||
Blockly.Msg.TODAY = "ಇನಿ";
|
||||
Blockly.Msg.UNDO = "Undo"; // untranslated
|
||||
Blockly.Msg.UNDO = "ದುಂಬುದಲೆಕೊ";
|
||||
Blockly.Msg.VARIABLES_DEFAULT_NAME = "ವಸ್ತು";
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; // untranslated
|
||||
Blockly.Msg.VARIABLES_GET_CREATE_SET = "'%1' ರಚನೆ ಮಲ್ಪುಲೆ";
|
||||
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
|
||||
Blockly.Msg.VARIABLES_GET_TOOLTIP = "Returns the value of this variable."; // untranslated
|
||||
Blockly.Msg.VARIABLES_SET = "set %1 to %2"; // untranslated
|
||||
Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; // untranslated
|
||||
Blockly.Msg.VARIABLES_GET_TOOLTIP = "ಈ ವ್ಯತ್ಯಯೊದ ಮೌಲ್ಯೊನು ಪಿರಕೊರು.";
|
||||
Blockly.Msg.VARIABLES_SET = "%1 ಡ್ದು %2 ಮಲ್ಪುಲೆ";
|
||||
Blockly.Msg.VARIABLES_SET_CREATE_GET = "'%1' ರಚನೆ ಮಲ್ಪುಲೆ";
|
||||
Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
|
||||
Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated
|
||||
Blockly.Msg.VARIABLES_SET_TOOLTIP = "ಉಲಯಿ ಬರ್ಪುನವು ಸಮಪಾಲ್ ಇಪ್ಪುನಂಚ ವ್ಯತ್ಯಾಸೊ ಮಾಲ್ಪು";
|
||||
Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE;
|
||||
Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF;
|
||||
Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
|
||||
|
||||
+8
-8
@@ -143,14 +143,14 @@ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "設定在列表中的指定
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "設定在列表中的指定位置的項目。#1 是第一個項目。";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "設定列表中的最後一個項目";
|
||||
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "設定列表中隨機的一個項目";
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "升冪排序";
|
||||
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "降冪排序";
|
||||
Blockly.Msg.LISTS_SORT_TITLE = "依%1%2%3排序";
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = "排序清單的複製內容";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "依字母排序並忽略大小寫";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "依數字排序";
|
||||
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "依字母排序";
|
||||
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
|
||||
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "從文本製作列表";
|
||||
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "從列表拆出文本";
|
||||
|
||||
+1
-1
@@ -977,7 +977,7 @@ Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = 'Creates a copy of the specified portion
|
||||
|
||||
/// url - Information describing sorting a list.
|
||||
Blockly.Msg.LISTS_SORT_HELPURL = 'https://github.com/google/blockly/wiki/Lists#sorting-a-list';
|
||||
/// Sort as type %1 (numeric or alphabetic) in order %2 (ascending or descending) a list of items %3.
|
||||
/// Sort as type %1 (numeric or alphabetic) in order %2 (ascending or descending) a list of items %3.\n{{Identical|Sort}}
|
||||
Blockly.Msg.LISTS_SORT_TITLE = 'sort %1 %2 %3';
|
||||
/// tooltip - See [https://github.com/google/blockly/wiki/Lists#sorting-a-list].
|
||||
Blockly.Msg.LISTS_SORT_TOOLTIP = 'Sort a copy of a list.';
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ Blockly.PHP.provideFunction_("lists_get_remove_random_item",["function "+Blockly
|
||||
Blockly.PHP.lists_setIndex=function(a){var b=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_MEMBER)||"array()",c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.PHP.valueToCode(a,"AT",Blockly.PHP.ORDER_NONE)||"1";a=Blockly.PHP.valueToCode(a,"TO",Blockly.PHP.ORDER_ASSIGNMENT)||"null";if("FIRST"==d){if("SET"==c)return b+"[0] = "+a+";\n";if("INSERT"==c)return"array_unshift("+b+", "+a+");\n"}else if("LAST"==d){if("SET"==c)return c=Blockly.PHP.provideFunction_("lists_set_last_item",["function "+
|
||||
Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $value) {"," $list[count($list) - 1] = $value;","}"]),c+"("+b+", "+a+");\n";if("INSERT"==c)return"array_push("+b+", "+a+");\n"}else if("FROM_START"==d){e=Blockly.isNumber(e)?parseFloat(e)-1:e+" - 1";if("SET"==c)return b+"["+e+"] = "+a+";\n";if("INSERT"==c)return"array_splice("+b+", "+e+", 0, "+a+");\n"}else if("FROM_END"==d){if("SET"==c)return c=Blockly.PHP.provideFunction_("lists_set_from_end",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"(&$list, $at, $value) {",
|
||||
" $list[count($list) - $at] = $value;","}"]),c+"("+b+", "+e+", "+a+");\n";if("INSERT"==c)return c=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);","}"]),c+"("+b+", "+e+", "+a+");\n"}else if("RANDOM"==d){b.match(/^\w+$/)?e="":(e=Blockly.PHP.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),d=e+" = &"+b+";\n",b=e,e=d);d=Blockly.PHP.variableDB_.getDistinctName("tmp_x",
|
||||
Blockly.Variables.NAME_TYPE);e+=d+" = rand(0, count("+b+")-1);\n";if("SET"==c)return e+(b+"["+d+"] = "+a+";\n");if("INSERT"==c)return e+="array_splice("+b+", "+d+", 0, "+a+");\n"}throw"Unhandled combination (lists_setIndex).";};
|
||||
Blockly.Variables.NAME_TYPE);e+=d+" = rand(0, count("+b+")-1);\n";if("SET"==c)return e+(b+"["+d+"] = "+a+";\n");if("INSERT"==c)return e+("array_splice("+b+", "+d+", 0, "+a+");\n")}throw"Unhandled combination (lists_setIndex).";};
|
||||
Blockly.PHP.lists_getSublist=function(a){var b=Blockly.PHP.valueToCode(a,"LIST",Blockly.PHP.ORDER_MEMBER)||"array()",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.PHP.valueToCode(a,"AT1",Blockly.PHP.ORDER_NONE)||"1";a=Blockly.PHP.valueToCode(a,"AT2",Blockly.PHP.ORDER_NONE)||"1";return["FIRST"==c&&"LAST"==d?b:Blockly.PHP.provideFunction_("lists_get_sublist",["function "+Blockly.PHP.FUNCTION_NAME_PLACEHOLDER_+"($list, $where1, $at1, $where2, $at2) {"," if ($where2 == 'FROM_START') {",
|
||||
" $at2--;"," } else if ($where2 == 'FROM_END') {"," $at2 = $at2 - $at1;"," } else if ($where2 == 'FIRST') {"," $at2 = 0;"," } else if ($where2 == 'LAST') {"," $at2 = count($list);"," } else {"," throw 'Unhandled option (lists_getSublist).';"," }"," if ($where1 == 'FROM_START') {"," $at1--;"," } else if ($where1 == 'FROM_END') {"," $at1 = count($list) - $at1;"," } else if ($where1 == 'FIRST') {"," $at1 = 0;"," } else if ($where1 == 'LAST') {"," $at1 = count($list) - 1;",
|
||||
" } else {"," throw 'Unhandled option (lists_getSublist).';"," }"," return array_slice($list, $at1, $at2);","}"])+"("+b+", '"+c+"', "+e+", '"+d+"', "+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
@@ -40,7 +40,7 @@ Blockly.PHP.controls_repeat_ext=function(a){var b=a.getField("TIMES")?String(Num
|
||||
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+="if ("+f+" > "+c+") {\n",a+=Blockly.PHP.INDENT+d+" = -"+d+";\n",a+="}\n",a+="for ("+b+" = "+f+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+b+" += "+d+") {\n"+g+"}\n";return a};
|
||||
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+";\n "+d+" >= 0 ? "+b+" <= "+c+" : "+b+" >= "+c+";\n "+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_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:[null,Blockly.PHP.ORDER_COMMA]}[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 c?[d+c+a,b]:["pow("+d+", "+a+")",Blockly.PHP.ORDER_FUNCTION_CALL]};
|
||||
|
||||
@@ -24,7 +24,7 @@ if("REMOVE"==b)return c+"\n"}else if("RANDOM"==c){Blockly.Python.definitions_.im
|
||||
};
|
||||
Blockly.Python.lists_setIndex=function(a){var b=Blockly.Python.valueToCode(a,"LIST",Blockly.Python.ORDER_MEMBER)||"[]",c=a.getFieldValue("MODE")||"GET",d=a.getFieldValue("WHERE")||"FROM_START",e=Blockly.Python.valueToCode(a,"AT",Blockly.Python.ORDER_NONE)||"1";a=Blockly.Python.valueToCode(a,"TO",Blockly.Python.ORDER_NONE)||"None";if("FIRST"==d){if("SET"==c)return b+"[0] = "+a+"\n";if("INSERT"==c)return b+".insert(0, "+a+")\n"}else if("LAST"==d){if("SET"==c)return b+"[-1] = "+a+"\n";if("INSERT"==c)return b+
|
||||
".append("+a+")\n"}else if("FROM_START"==d){e=Blockly.isNumber(e)?parseInt(e,10)-1:"int("+e+" - 1)";if("SET"==c)return b+"["+e+"] = "+a+"\n";if("INSERT"==c)return b+".insert("+e+", "+a+")\n"}else if("FROM_END"==d){if("SET"==c)return b+"[-"+e+"] = "+a+"\n";if("INSERT"==c)return b+".insert(-"+e+", "+a+")\n"}else if("RANDOM"==d){Blockly.Python.definitions_.import_random="import random";b.match(/^\w+$/)?d="":(d=Blockly.Python.variableDB_.getDistinctName("tmp_list",Blockly.Variables.NAME_TYPE),e=d+" = "+
|
||||
b+"\n",b=d,d=e);e=Blockly.Python.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);d+=e+" = int(random.random() * len("+b+"))\n";if("SET"==c)return d+(b+"["+e+"] = "+a+"\n");if("INSERT"==c)return d+=b+".insert("+e+", "+a+")\n"}throw"Unhandled combination (lists_setIndex).";};
|
||||
b+"\n",b=d,d=e);e=Blockly.Python.variableDB_.getDistinctName("tmp_x",Blockly.Variables.NAME_TYPE);d+=e+" = int(random.random() * len("+b+"))\n";if("SET"==c)return d+(b+"["+e+"] = "+a+"\n");if("INSERT"==c)return d+(b+".insert("+e+", "+a+")\n")}throw"Unhandled combination (lists_setIndex).";};
|
||||
Blockly.Python.lists_getSublist=function(a){var b=Blockly.Python.valueToCode(a,"LIST",Blockly.Python.ORDER_MEMBER)||"[]",c=a.getFieldValue("WHERE1"),d=a.getFieldValue("WHERE2"),e=Blockly.Python.valueToCode(a,"AT1",Blockly.Python.ORDER_ADDITIVE)||"1";a=Blockly.Python.valueToCode(a,"AT2",Blockly.Python.ORDER_ADDITIVE)||"1";"FIRST"==c||"FROM_START"==c&&"1"==e?e="":"FROM_START"==c?e=Blockly.isNumber(e)?parseInt(e,10)-1:"int("+e+" - 1)":"FROM_END"==c&&(e=Blockly.isNumber(e)?-parseInt(e,10):"-int("+e+")");
|
||||
"LAST"==d||"FROM_END"==d&&"1"==a?a="":"FROM_START"==c?a=Blockly.isNumber(a)?parseInt(a,10):"int("+a+")":"FROM_END"==c&&(Blockly.isNumber(a)?(a=1-parseInt(a,10),0==a&&(a="")):(Blockly.Python.definitions_.import_sys="import sys",a="int(1 - "+a+") or sys.maxsize"));return[b+"["+e+" : "+a+"]",Blockly.Python.ORDER_MEMBER]};
|
||||
Blockly.Python.lists_sort=function(a){var b=Blockly.Python.valueToCode(a,"LIST",Blockly.Python.ORDER_MEMBER)||"[]",c=a.getFieldValue("TYPE");a="1"===a.getFieldValue("DIRECTION")?"False":"True";return[Blockly.Python.provideFunction_("lists_sort",["def "+Blockly.Python.FUNCTION_NAME_PLACEHOLDER_+"(listv, type, reversev):"," def tryfloat(s):"," try:"," return float(s)"," except:"," return 0"," keyFuncts = {",' "NUMERIC": tryfloat,',' "TEXT": str,',' "IGNORE_CASE": lambda s: str(s).lower()',
|
||||
|
||||
Reference in New Issue
Block a user