aboutsummaryrefslogtreecommitdiffstats
path: root/api/build
diff options
context:
space:
mode:
Diffstat (limited to 'api/build')
-rw-r--r--api/build/app.css34
-rw-r--r--api/build/app.js3123
-rw-r--r--api/build/enyo.js2967
3 files changed, 3121 insertions, 3003 deletions
diff --git a/api/build/app.css b/api/build/app.css
index 38eb282..10b0da4 100644
--- a/api/build/app.css
+++ b/api/build/app.css
@@ -1,5 +1,5 @@
-/* /home/enyojs/git/api-tool/enyo/tools/../../lib/layout/fittable/source/FittableLayout.css */
+/* /Users/bencombee/git/enyojs/api-tool/enyo/tools/../../lib/layout/fittable/source/FittableLayout.css */
.enyo-fittable-rows-layout {
position: relative;
@@ -71,7 +71,7 @@
margin-bottom: 0 !important;
}
-/* /home/enyojs/git/api-tool/enyo/tools/../../lib/layout/list/source/List.css */
+/* /Users/bencombee/git/enyojs/api-tool/enyo/tools/../../lib/layout/list/source/List.css */
.enyo-list {
position: relative;
@@ -89,7 +89,7 @@
right: 0;
}
-/* /home/enyojs/git/api-tool/enyo/tools/../../lib/layout/list/source/PulldownList.css */
+/* /Users/bencombee/git/enyojs/api-tool/enyo/tools/../../lib/layout/list/source/PulldownList.css */
.enyo-list-pulldown {
position: absolute;
@@ -152,7 +152,7 @@
-ms-transform: rotate(180deg);
}
-/* /home/enyojs/git/api-tool/enyo/tools/../../lib/layout/panels/source/arrangers/Arranger.css */
+/* /Users/bencombee/git/enyojs/api-tool/enyo/tools/../../lib/layout/panels/source/arrangers/Arranger.css */
.enyo-arranger {
position: relative;
@@ -185,7 +185,7 @@
}
-/* /home/enyojs/git/api-tool/enyo/tools/../../lib/layout/panels/source/Panels.css */
+/* /Users/bencombee/git/enyojs/api-tool/enyo/tools/../../lib/layout/panels/source/Panels.css */
.enyo-panels {
}
@@ -200,7 +200,7 @@
}
}
-/* /home/enyojs/git/api-tool/enyo/tools/../../lib/layout/tree/source/Node.css */
+/* /Users/bencombee/git/enyojs/api-tool/enyo/tools/../../lib/layout/tree/source/Node.css */
.enyo-node {
cursor: default;
@@ -615,7 +615,7 @@
outline: none;
cursor: pointer;
background-color: transparent;
- font-size: 16px;
+ font-size: 120%;
box-shadow: none;
/* FIXME: hack for styling reset on Android */
/* -webkit-appearance: caret;*/
@@ -629,29 +629,33 @@
}
#app_left {
- width: 300px;
+ width: 350px;
border: 1px solid orange;
}
#app_left_tabs {
background: #eee;
+ font-size: 120%;
}
#app_kinds {
padding: 8px;
+ font-size: 140%;
}
#app_index {
padding: 8px;
- font-size: smaller;
+ font-size: 120%;
}
#app_modules {
padding: 8px;
+ font-size: 140%;
}
#app_packages {
padding: 8px;
+ font-size: 140%;
}
#app_doc {
@@ -767,7 +771,7 @@ published {
}
kind {
- font-size: x-large;
+ font-size: 130%;
font-weight: bold;
display: block;
}
@@ -775,11 +779,17 @@ kind {
package {
color: black;
background-color: #B0E0E6;
- font-size: 10pt;
+ font-size: 90%;
padding: 3pt;
float: right;
}
+moduleName {
+ font-size: 130%;
+ font-weight: bold;
+ display: block;
+}
+
superkind {
color: #555;
display: block;
@@ -820,7 +830,7 @@ column {
divider {
display: block;
color: #0D0D0D;
- font-size: 18px;
+ font-size: 120%;
font-weight: bold;
margin-left: -1px;
margin-top: 1em;
diff --git a/api/build/app.js b/api/build/app.js
index d24f8a0..acf74e0 100644
--- a/api/build/app.js
+++ b/api/build/app.js
@@ -1,7 +1,7 @@
// minifier: path aliases
-enyo.path.addPaths({layout: "/home/enyojs/git/api-tool/enyo/tools/../../lib/layout/"});
+enyo.path.addPaths({layout: "/Users/bencombee/git/enyojs/api-tool/enyo/tools/../../lib/layout/"});
// FittableLayout.js
@@ -9,69 +9,38 @@ enyo.kind({
name: "enyo.FittableLayout",
kind: "Layout",
calcFitIndex: function() {
-for (var a = 0, b = this.container.children, c; c = b[a]; a++) if (c.fit && c.showing) return a;
+for (var e = 0, t = this.container.children, n; n = t[e]; e++) if (n.fit && n.showing) return e;
},
getFitControl: function() {
-var a = this.container.children, b = a[this.fitIndex];
-return b && b.fit && b.showing || (this.fitIndex = this.calcFitIndex(), b = a[this.fitIndex]), b;
+var e = this.container.children, t = e[this.fitIndex];
+return t && t.fit && t.showing || (this.fitIndex = this.calcFitIndex(), t = e[this.fitIndex]), t;
},
getLastControl: function() {
-var a = this.container.children, b = a.length - 1, c = a[b];
-while ((c = a[b]) && !c.showing) b--;
-return c;
+var e = this.container.children, t = e.length - 1, n = e[t];
+while ((n = e[t]) && !n.showing) t--;
+return n;
},
-_reflow: function(a, b, c, d) {
+_reflow: function(e, t, n, r) {
this.container.addRemoveClass("enyo-stretch", !this.container.noStretch);
-var e = this.getFitControl();
-if (!e) return;
-var f = 0, g = 0, h = 0, i, j = this.container.hasNode();
-j && (i = enyo.FittableLayout.calcPaddingExtents(j), f = j[b] - (i[c] + i[d]));
-var k = e.getBounds();
-g = k[c] - (i && i[c] || 0);
-var l = this.getLastControl();
-if (l) {
-var m = enyo.FittableLayout.getComputedStyleValue(l.hasNode(), "margin", d) || 0;
-if (l != e) {
-var n = l.getBounds(), o = k[c] + k[a], p = n[c] + n[a] + m;
-h = p - o;
-} else h = m;
-}
-var q = f - (g + h);
-e.applyStyle(a, q + "px");
+var i = this.getFitControl();
+if (!i) return;
+var s = 0, o = 0, u = 0, a, f = this.container.hasNode();
+f && (a = enyo.dom.calcPaddingExtents(f), s = f[t] - (a[n] + a[r]));
+var l = i.getBounds();
+o = l[n] - (a && a[n] || 0);
+var c = this.getLastControl();
+if (c) {
+var h = enyo.dom.getComputedBoxValue(c.hasNode(), "margin", r) || 0;
+if (c != i) {
+var p = c.getBounds(), d = l[n] + l[e], v = p[n] + p[e] + h;
+u = v - d;
+} else u = h;
+}
+var m = s - (o + u);
+i.applyStyle(e, m + "px");
},
reflow: function() {
this.orient == "h" ? this._reflow("width", "clientWidth", "left", "right") : this._reflow("height", "clientHeight", "top", "bottom");
-},
-statics: {
-_ieCssToPixelValue: function(a, b) {
-var c = b, d = a.style, e = d.left, f = a.runtimeStyle && a.runtimeStyle.left;
-return f && (a.runtimeStyle.left = a.currentStyle.left), d.left = c, c = d.pixelLeft, d.left = e, f && (d.runtimeStyle.left = f), c;
-},
-_pxMatch: /px/i,
-getComputedStyleValue: function(a, b, c, d) {
-var e = d || enyo.dom.getComputedStyle(a);
-if (e) return parseInt(e.getPropertyValue(b + "-" + c));
-if (a && a.currentStyle) {
-var f = a.currentStyle[b + enyo.cap(c)];
-return f.match(this._pxMatch) || (f = this._ieCssToPixelValue(a, f)), parseInt(f);
-}
-return 0;
-},
-calcBoxExtents: function(a, b) {
-var c = enyo.dom.getComputedStyle(a);
-return {
-top: this.getComputedStyleValue(a, b, "top", c),
-right: this.getComputedStyleValue(a, b, "right", c),
-bottom: this.getComputedStyleValue(a, b, "bottom", c),
-left: this.getComputedStyleValue(a, b, "left", c)
-};
-},
-calcPaddingExtents: function(a) {
-return this.calcBoxExtents(a, "padding");
-},
-calcMarginExtents: function(a) {
-return this.calcBoxExtents(a, "margin");
-}
}
}), enyo.kind({
name: "enyo.FittableColumnsLayout",
@@ -108,7 +77,9 @@ name: "enyo.FlyweightRepeater",
published: {
count: 0,
multiSelect: !1,
-toggleSelected: !1
+toggleSelected: !1,
+clientClasses: "",
+clientStyle: ""
},
events: {
onSetupItem: ""
@@ -123,77 +94,83 @@ name: "client"
rowOffset: 0,
bottomUp: !1,
create: function() {
-this.inherited(arguments), this.multiSelectChanged();
+this.inherited(arguments), this.multiSelectChanged(), this.clientClassesChanged(), this.clientStyleChanged();
},
multiSelectChanged: function() {
this.$.selection.setMulti(this.multiSelect);
},
-setupItem: function(a) {
+clientClassesChanged: function() {
+this.$.client.setClasses(this.clientClasses);
+},
+clientStyleChanged: function() {
+this.$.client.setStyle(this.clientStyle);
+},
+setupItem: function(e) {
this.doSetupItem({
-index: a,
-selected: this.isSelected(a)
+index: e,
+selected: this.isSelected(e)
});
},
generateChildHtml: function() {
-var a = "";
+var e = "";
this.index = null;
-for (var b = 0, c = 0; b < this.count; b++) c = this.rowOffset + (this.bottomUp ? this.count - b - 1 : b), this.setupItem(c), this.$.client.setAttribute("index", c), a += this.inherited(arguments), this.$.client.teardownRender();
-return a;
+for (var t = 0, n = 0; t < this.count; t++) n = this.rowOffset + (this.bottomUp ? this.count - t - 1 : t), this.setupItem(n), this.$.client.setAttribute("index", n), e += this.inherited(arguments), this.$.client.teardownRender();
+return e;
},
-previewDomEvent: function(a) {
-var b = this.index = this.rowForEvent(a);
-a.rowIndex = a.index = b, a.flyweight = this;
+previewDomEvent: function(e) {
+var t = this.index = this.rowForEvent(e);
+e.rowIndex = e.index = t, e.flyweight = this;
},
-decorateEvent: function(a, b, c) {
-var d = b && b.index != null ? b.index : this.index;
-b && d != null && (b.index = d, b.flyweight = this), this.inherited(arguments);
+decorateEvent: function(e, t, n) {
+var r = t && t.index != null ? t.index : this.index;
+t && r != null && (t.index = r, t.flyweight = this), this.inherited(arguments);
},
-tap: function(a, b) {
-this.toggleSelected ? this.$.selection.toggle(b.index) : this.$.selection.select(b.index);
+tap: function(e, t) {
+this.toggleSelected ? this.$.selection.toggle(t.index) : this.$.selection.select(t.index);
},
-selectDeselect: function(a, b) {
-this.renderRow(b.key);
+selectDeselect: function(e, t) {
+this.renderRow(t.key);
},
getSelection: function() {
return this.$.selection;
},
-isSelected: function(a) {
-return this.getSelection().isSelected(a);
+isSelected: function(e) {
+return this.getSelection().isSelected(e);
},
-renderRow: function(a) {
-var b = this.fetchRowNode(a);
-b && (this.setupItem(a), b.innerHTML = this.$.client.generateChildHtml(), this.$.client.teardownChildren());
+renderRow: function(e) {
+var t = this.fetchRowNode(e);
+t && (this.setupItem(e), t.innerHTML = this.$.client.generateChildHtml(), this.$.client.teardownChildren());
},
-fetchRowNode: function(a) {
+fetchRowNode: function(e) {
if (this.hasNode()) {
-var b = this.node.querySelectorAll('[index="' + a + '"]');
-return b && b[0];
+var t = this.node.querySelectorAll('[index="' + e + '"]');
+return t && t[0];
}
},
-rowForEvent: function(a) {
-var b = a.target, c = this.hasNode().id;
-while (b && b.parentNode && b.id != c) {
-var d = b.getAttribute && b.getAttribute("index");
-if (d !== null) return Number(d);
-b = b.parentNode;
+rowForEvent: function(e) {
+var t = e.target, n = this.hasNode().id;
+while (t && t.parentNode && t.id != n) {
+var r = t.getAttribute && t.getAttribute("index");
+if (r !== null) return Number(r);
+t = t.parentNode;
}
return -1;
},
-prepareRow: function(a) {
-var b = this.fetchRowNode(a);
-enyo.FlyweightRepeater.claimNode(this.$.client, b);
+prepareRow: function(e) {
+var t = this.fetchRowNode(e);
+enyo.FlyweightRepeater.claimNode(this.$.client, t);
},
lockRow: function() {
this.$.client.teardownChildren();
},
-performOnRow: function(a, b, c) {
-b && (this.prepareRow(a), enyo.call(c || null, b), this.lockRow());
+performOnRow: function(e, t, n) {
+t && (this.prepareRow(e), enyo.call(n || null, t), this.lockRow());
},
statics: {
-claimNode: function(a, b) {
-var c = b && b.querySelectorAll("#" + a.id);
-c = c && c[0], a.generated = Boolean(c || !a.tag), a.node = c, a.node && a.rendered();
-for (var d = 0, e = a.children, f; f = e[d]; d++) this.claimNode(f, b);
+claimNode: function(e, t) {
+var n = t && t.querySelectorAll("#" + e.id);
+n = n && n[0], e.generated = Boolean(n || !e.tag), e.node = n, e.node && e.rendered();
+for (var r = 0, i = e.children, s; s = i[r]; r++) this.claimNode(s, t);
}
}
});
@@ -266,63 +243,63 @@ this.hasNode() && this.updateMetrics();
},
updateMetrics: function() {
this.defaultPageHeight = this.rowsPerPage * (this.rowHeight || 100), this.pageCount = Math.ceil(this.count / this.rowsPerPage), this.portSize = 0;
-for (var a = 0; a < this.pageCount; a++) this.portSize += this.getPageHeight(a);
+for (var e = 0; e < this.pageCount; e++) this.portSize += this.getPageHeight(e);
this.adjustPortSize();
},
-generatePage: function(a, b) {
-this.page = a;
-var c = this.$.generator.rowOffset = this.rowsPerPage * this.page, d = this.$.generator.count = Math.min(this.count - c, this.rowsPerPage), e = this.$.generator.generateChildHtml();
-b.setContent(e);
-var f = b.getBounds().height;
-!this.rowHeight && f > 0 && (this.rowHeight = Math.floor(f / d), this.updateMetrics());
+generatePage: function(e, t) {
+this.page = e;
+var n = this.$.generator.rowOffset = this.rowsPerPage * this.page, r = this.$.generator.count = Math.min(this.count - n, this.rowsPerPage), i = this.$.generator.generateChildHtml();
+t.setContent(i);
+var s = t.getBounds().height;
+!this.rowHeight && s > 0 && (this.rowHeight = Math.floor(s / r), this.updateMetrics());
if (!this.fixedHeight) {
-var g = this.getPageHeight(a);
-g != f && f > 0 && (this.pageHeights[a] = f, this.portSize += f - g);
+var o = this.getPageHeight(e);
+o != s && s > 0 && (this.pageHeights[e] = s, this.portSize += s - o);
}
},
-update: function(a) {
-var b = !1, c = this.positionToPageInfo(a), d = c.pos + this.scrollerHeight / 2, e = Math.floor(d / Math.max(c.height, this.scrollerHeight) + .5) + c.no, f = e % 2 == 0 ? e : e - 1;
-this.p0 != f && this.isPageInRange(f) && (this.generatePage(f, this.$.page0), this.positionPage(f, this.$.page0), this.p0 = f, b = !0), f = e % 2 == 0 ? Math.max(1, e - 1) : e, this.p1 != f && this.isPageInRange(f) && (this.generatePage(f, this.$.page1), this.positionPage(f, this.$.page1), this.p1 = f, b = !0), b && !this.fixedHeight && (this.adjustBottomPage(), this.adjustPortSize());
+update: function(e) {
+var t = !1, n = this.positionToPageInfo(e), r = n.pos + this.scrollerHeight / 2, i = Math.floor(r / Math.max(n.height, this.scrollerHeight) + .5) + n.no, s = i % 2 == 0 ? i : i - 1;
+this.p0 != s && this.isPageInRange(s) && (this.generatePage(s, this.$.page0), this.positionPage(s, this.$.page0), this.p0 = s, t = !0), s = i % 2 == 0 ? Math.max(1, i - 1) : i, this.p1 != s && this.isPageInRange(s) && (this.generatePage(s, this.$.page1), this.positionPage(s, this.$.page1), this.p1 = s, t = !0), t && !this.fixedHeight && (this.adjustBottomPage(), this.adjustPortSize());
},
-updateForPosition: function(a) {
-this.update(this.calcPos(a));
+updateForPosition: function(e) {
+this.update(this.calcPos(e));
},
-calcPos: function(a) {
-return this.bottomUp ? this.portSize - this.scrollerHeight - a : a;
+calcPos: function(e) {
+return this.bottomUp ? this.portSize - this.scrollerHeight - e : e;
},
adjustBottomPage: function() {
-var a = this.p0 >= this.p1 ? this.$.page0 : this.$.page1;
-this.positionPage(a.pageNo, a);
+var e = this.p0 >= this.p1 ? this.$.page0 : this.$.page1;
+this.positionPage(e.pageNo, e);
},
adjustPortSize: function() {
this.scrollerHeight = this.getBounds().height;
-var a = Math.max(this.scrollerHeight, this.portSize);
-this.$.port.applyStyle("height", a + "px");
-},
-positionPage: function(a, b) {
-b.pageNo = a;
-var c = this.pageToPosition(a);
-b.applyStyle(this.pageBound, c + "px");
-},
-pageToPosition: function(a) {
-var b = 0, c = a;
-while (c > 0) c--, b += this.getPageHeight(c);
-return b;
-},
-positionToPageInfo: function(a) {
-var b = -1, c = this.calcPos(a), d = this.defaultPageHeight;
-while (c >= 0) b++, d = this.getPageHeight(b), c -= d;
+var e = Math.max(this.scrollerHeight, this.portSize);
+this.$.port.applyStyle("height", e + "px");
+},
+positionPage: function(e, t) {
+t.pageNo = e;
+var n = this.pageToPosition(e);
+t.applyStyle(this.pageBound, n + "px");
+},
+pageToPosition: function(e) {
+var t = 0, n = e;
+while (n > 0) n--, t += this.getPageHeight(n);
+return t;
+},
+positionToPageInfo: function(e) {
+var t = -1, n = this.calcPos(e), r = this.defaultPageHeight;
+while (n >= 0) t++, r = this.getPageHeight(t), n -= r;
return {
-no: b,
-height: d,
-pos: c + d
+no: t,
+height: r,
+pos: n + r
};
},
-isPageInRange: function(a) {
-return a == Math.max(0, Math.min(this.pageCount - 1, a));
+isPageInRange: function(e) {
+return e == Math.max(0, Math.min(this.pageCount - 1, e));
},
-getPageHeight: function(a) {
-return this.pageHeights[a] || this.defaultPageHeight;
+getPageHeight: function(e) {
+return this.pageHeights[e] || this.defaultPageHeight;
},
invalidatePages: function() {
this.p0 = this.p1 = null, this.$.page0.setContent(""), this.$.page1.setContent("");
@@ -330,32 +307,32 @@ this.p0 = this.p1 = null, this.$.page0.setContent(""), this.$.page1.setContent("
invalidateMetrics: function() {
this.pageHeights = [], this.rowHeight = 0, this.updateMetrics();
},
-scroll: function(a, b) {
-var c = this.inherited(arguments);
-return this.update(this.getScrollTop()), c;
+scroll: function(e, t) {
+var n = this.inherited(arguments);
+return this.update(this.getScrollTop()), n;
},
scrollToBottom: function() {
this.update(this.getScrollBounds().maxTop), this.inherited(arguments);
},
-setScrollTop: function(a) {
-this.update(a), this.inherited(arguments), this.twiddle();
+setScrollTop: function(e) {
+this.update(e), this.inherited(arguments), this.twiddle();
},
getScrollPosition: function() {
return this.calcPos(this.getScrollTop());
},
-setScrollPosition: function(a) {
-this.setScrollTop(this.calcPos(a));
+setScrollPosition: function(e) {
+this.setScrollTop(this.calcPos(e));
},
-scrollToRow: function(a) {
-var b = Math.floor(a / this.rowsPerPage), c = a % this.rowsPerPage, d = this.pageToPosition(b);
-this.updateForPosition(d), d = this.pageToPosition(b), this.setScrollPosition(d);
-if (b == this.p0 || b == this.p1) {
-var e = this.$.generator.fetchRowNode(a);
-if (e) {
-var f = e.offsetTop;
-this.bottomUp && (f = this.getPageHeight(b) - e.offsetHeight - f);
-var g = this.getScrollPosition() + f;
-this.setScrollPosition(g);
+scrollToRow: function(e) {
+var t = Math.floor(e / this.rowsPerPage), n = e % this.rowsPerPage, r = this.pageToPosition(t);
+this.updateForPosition(r), r = this.pageToPosition(t), this.setScrollPosition(r);
+if (t == this.p0 || t == this.p1) {
+var i = this.$.generator.fetchRowNode(e);
+if (i) {
+var s = i.offsetTop;
+this.bottomUp && (s = this.getPageHeight(t) - i.offsetHeight - s);
+var o = this.getScrollPosition() + s;
+this.setScrollPosition(o);
}
}
},
@@ -374,30 +351,30 @@ this.getSelection().clear(), this.invalidateMetrics(), this.invalidatePages(), t
getSelection: function() {
return this.$.generator.getSelection();
},
-select: function(a, b) {
-return this.getSelection().select(a, b);
+select: function(e, t) {
+return this.getSelection().select(e, t);
},
-isSelected: function(a) {
-return this.$.generator.isSelected(a);
+isSelected: function(e) {
+return this.$.generator.isSelected(e);
},
-renderRow: function(a) {
-this.$.generator.renderRow(a);
+renderRow: function(e) {
+this.$.generator.renderRow(e);
},
-prepareRow: function(a) {
-this.$.generator.prepareRow(a);
+prepareRow: function(e) {
+this.$.generator.prepareRow(e);
},
lockRow: function() {
this.$.generator.lockRow();
},
-performOnRow: function(a, b, c) {
-this.$.generator.performOnRow(a, b, c);
+performOnRow: function(e, t, n) {
+this.$.generator.performOnRow(e, t, n);
},
-animateFinish: function(a) {
+animateFinish: function(e) {
return this.twiddle(), !0;
},
twiddle: function() {
-var a = this.getStrategy();
-enyo.call(a, "twiddle");
+var e = this.getStrategy();
+enyo.call(e, "twiddle");
}
});
@@ -425,7 +402,6 @@ onPullComplete: ""
},
handlers: {
onScrollStart: "scrollStartHandler",
-onScroll: "scrollHandler",
onScrollStop: "scrollStopHandler",
ondragfinish: "dragfinish"
},
@@ -436,36 +412,37 @@ pullingIconClass: "enyo-puller-arrow enyo-puller-arrow-down",
pulledIconClass: "enyo-puller-arrow enyo-puller-arrow-up",
loadingIconClass: "",
create: function() {
-var a = {
+var e = {
kind: "Puller",
showing: !1,
text: this.loadingMessage,
iconClass: this.loadingIconClass,
onCreate: "setPully"
};
-this.listTools.splice(0, 0, a), this.inherited(arguments), this.setPulling();
+this.listTools.splice(0, 0, e), this.inherited(arguments), this.setPulling();
},
initComponents: function() {
this.createChrome(this.pulldownTools), this.accel = enyo.dom.canAccelerate(), this.translation = this.accel ? "translate3d" : "translate", this.inherited(arguments);
},
-setPully: function(a, b) {
-this.pully = b.originator;
+setPully: function(e, t) {
+this.pully = t.originator;
},
scrollStartHandler: function() {
this.firedPullStart = !1, this.firedPull = !1, this.firedPullCancel = !1;
},
-scrollHandler: function(a) {
+scroll: function(e, t) {
+var n = this.inherited(arguments);
this.completingPull && this.pully.setShowing(!1);
-var b = this.getStrategy().$.scrollMath, c = b.y;
-b.isInOverScroll() && c > 0 && (enyo.dom.transformValue(this.$.pulldown, this.translation, "0," + c + "px" + (this.accel ? ",0" : "")), this.firedPullStart || (this.firedPullStart = !0, this.pullStart(), this.pullHeight = this.$.pulldown.getBounds().height), c > this.pullHeight && !this.firedPull && (this.firedPull = !0, this.firedPullCancel = !1, this.pull()), this.firedPull && !this.firedPullCancel && c < this.pullHeight && (this.firedPullCancel = !0, this.firedPull = !1, this.pullCancel()));
+var r = this.getStrategy().$.scrollMath, i = r.y;
+return r.isInOverScroll() && i > 0 && (enyo.dom.transformValue(this.$.pulldown, this.translation, "0," + i + "px" + (this.accel ? ",0" : "")), this.firedPullStart || (this.firedPullStart = !0, this.pullStart(), this.pullHeight = this.$.pulldown.getBounds().height), i > this.pullHeight && !this.firedPull && (this.firedPull = !0, this.firedPullCancel = !1, this.pull()), this.firedPull && !this.firedPullCancel && i < this.pullHeight && (this.firedPullCancel = !0, this.firedPull = !1, this.pullCancel())), n;
},
scrollStopHandler: function() {
this.completingPull && (this.completingPull = !1, this.doPullComplete());
},
dragfinish: function() {
if (this.firedPull) {
-var a = this.getStrategy().$.scrollMath;
-a.setScrollY(a.y - this.pullHeight), this.pullRelease();
+var e = this.getStrategy().$.scrollMath;
+e.setScrollY(e.y - this.pullHeight), this.pullRelease();
}
},
completePull: function() {
@@ -565,22 +542,22 @@ this.inherited(arguments), this.updateDragScalar();
},
canModifyUnit: function() {
if (!this.canTransform) {
-var a = this.getInitialStyleValue(this.hasNode(), this.boundary);
-a.match(/px/i) && this.unit === "%" && (this.unitModifier = this.getBounds()[this.dimension]);
+var e = this.getInitialStyleValue(this.hasNode(), this.boundary);
+e.match(/px/i) && this.unit === "%" && (this.unitModifier = this.getBounds()[this.dimension]);
}
},
-getInitialStyleValue: function(a, b) {
-var c = enyo.dom.getComputedStyle(a);
-return c ? c.getPropertyValue(b) : a && a.currentStyle ? a.currentStyle[b] : "0";
+getInitialStyleValue: function(e, t) {
+var n = enyo.dom.getComputedStyle(e);
+return n ? n.getPropertyValue(t) : e && e.currentStyle ? e.currentStyle[t] : "0";
},
-updateBounds: function(a, b) {
-var c = {};
-c[this.boundary] = a, this.setBounds(c, this.unit), this.setInlineStyles(a, b);
+updateBounds: function(e, t) {
+var n = {};
+n[this.boundary] = e, this.setBounds(n, this.unit), this.setInlineStyles(e, t);
},
updateDragScalar: function() {
if (this.unit == "%") {
-var a = this.getBounds()[this.dimension];
-this.kDragScalar = a ? 100 / a : 1, this.canTransform || this.updateBounds(this.value, 100);
+var e = this.getBounds()[this.dimension];
+this.kDragScalar = e ? 100 / e : 1, this.canTransform || this.updateBounds(this.value, 100);
}
},
transformChanged: function() {
@@ -590,16 +567,16 @@ acceleratedChanged: function() {
enyo.platform.android > 2 || enyo.dom.accelerate(this, this.accelerated);
},
axisChanged: function() {
-var a = this.axis == "h";
-this.dragMoveProp = a ? "dx" : "dy", this.shouldDragProp = a ? "horizontal" : "vertical", this.transform = a ? "translateX" : "translateY", this.dimension = a ? "width" : "height", this.boundary = a ? "left" : "top";
+var e = this.axis == "h";
+this.dragMoveProp = e ? "dx" : "dy", this.shouldDragProp = e ? "horizontal" : "vertical", this.transform = e ? "translateX" : "translateY", this.dimension = e ? "width" : "height", this.boundary = e ? "left" : "top";
},
-setInlineStyles: function(a, b) {
-var c = {};
-this.unitModifier ? (c[this.boundary] = this.percentToPixels(a, this.unitModifier), c[this.dimension] = this.unitModifier, this.setBounds(c)) : (b ? c[this.dimension] = b : c[this.boundary] = a, this.setBounds(c, this.unit));
+setInlineStyles: function(e, t) {
+var n = {};
+this.unitModifier ? (n[this.boundary] = this.percentToPixels(e, this.unitModifier), n[this.dimension] = this.unitModifier, this.setBounds(n)) : (t ? n[this.dimension] = t : n[this.boundary] = e, this.setBounds(n, this.unit));
},
-valueChanged: function(a) {
-var b = this.value;
-this.isOob(b) && !this.isAnimating() && (this.value = this.overMoving ? this.dampValue(b) : this.clampValue(b)), enyo.platform.android > 2 && (this.value ? (a === 0 || a === undefined) && enyo.dom.accelerate(this, this.accelerated) : enyo.dom.accelerate(this, !1)), this.canTransform ? enyo.dom.transformValue(this, this.transform, this.value + this.unit) : this.setInlineStyles(this.value, !1), this.doChange();
+valueChanged: function(e) {
+var t = this.value;
+this.isOob(t) && !this.isAnimating() && (this.value = this.overMoving ? this.dampValue(t) : this.clampValue(t)), enyo.platform.android > 2 && (this.value ? (e === 0 || e === undefined) && enyo.dom.accelerate(this, this.accelerated) : enyo.dom.accelerate(this, !1)), this.canTransform ? enyo.dom.transformValue(this, this.transform, this.value + this.unit) : this.setInlineStyles(this.value, !1), this.doChange();
},
getAnimator: function() {
return this.$.animator;
@@ -616,58 +593,58 @@ return this.min;
calcMax: function() {
return this.max;
},
-clampValue: function(a) {
-var b = this.calcMin(), c = this.calcMax();
-return Math.max(b, Math.min(a, c));
+clampValue: function(e) {
+var t = this.calcMin(), n = this.calcMax();
+return Math.max(t, Math.min(e, n));
},
-dampValue: function(a) {
-return this.dampBound(this.dampBound(a, this.min, 1), this.max, -1);
+dampValue: function(e) {
+return this.dampBound(this.dampBound(e, this.min, 1), this.max, -1);
},
-dampBound: function(a, b, c) {
-var d = a;
-return d * c < b * c && (d = b + (d - b) / 4), d;
+dampBound: function(e, t, n) {
+var r = e;
+return r * n < t * n && (r = t + (r - t) / 4), r;
},
-percentToPixels: function(a, b) {
-return Math.floor(b / 100 * a);
+percentToPixels: function(e, t) {
+return Math.floor(t / 100 * e);
},
-pixelsToPercent: function(a) {
-var b = this.unitModifier ? this.getBounds()[this.dimension] : this.container.getBounds()[this.dimension];
-return a / b * 100;
+pixelsToPercent: function(e) {
+var t = this.unitModifier ? this.getBounds()[this.dimension] : this.container.getBounds()[this.dimension];
+return e / t * 100;
},
-shouldDrag: function(a) {
-return this.draggable && a[this.shouldDragProp];
+shouldDrag: function(e) {
+return this.draggable && e[this.shouldDragProp];
},
-isOob: function(a) {
-return a > this.calcMax() || a < this.calcMin();
+isOob: function(e) {
+return e > this.calcMax() || e < this.calcMin();
},
-dragstart: function(a, b) {
-if (this.shouldDrag(b)) return b.preventDefault(), this.$.animator.stop(), b.dragInfo = {}, this.dragging = !0, this.drag0 = this.value, this.dragd0 = 0, this.preventDragPropagation;
+dragstart: function(e, t) {
+if (this.shouldDrag(t)) return t.preventDefault(), this.$.animator.stop(), t.dragInfo = {}, this.dragging = !0, this.drag0 = this.value, this.dragd0 = 0, this.preventDragPropagation;
},
-drag: function(a, b) {
+drag: function(e, t) {
if (this.dragging) {
-b.preventDefault();
-var c = this.canTransform ? b[this.dragMoveProp] * this.kDragScalar : this.pixelsToPercent(b[this.dragMoveProp]), d = this.drag0 + c, e = c - this.dragd0;
-return this.dragd0 = c, e && (b.dragInfo.minimizing = e < 0), this.setValue(d), this.preventDragPropagation;
+t.preventDefault();
+var n = this.canTransform ? t[this.dragMoveProp] * this.kDragScalar : this.pixelsToPercent(t[this.dragMoveProp]), r = this.drag0 + n, i = n - this.dragd0;
+return this.dragd0 = n, i && (t.dragInfo.minimizing = i < 0), this.setValue(r), this.preventDragPropagation;
}
},
-dragfinish: function(a, b) {
-if (this.dragging) return this.dragging = !1, this.completeDrag(b), b.preventTap(), this.preventDragPropagation;
+dragfinish: function(e, t) {
+if (this.dragging) return this.dragging = !1, this.completeDrag(t), t.preventTap(), this.preventDragPropagation;
},
-completeDrag: function(a) {
-this.value !== this.calcMax() && this.value != this.calcMin() && this.animateToMinMax(a.dragInfo.minimizing);
+completeDrag: function(e) {
+this.value !== this.calcMax() && this.value != this.calcMin() && this.animateToMinMax(e.dragInfo.minimizing);
},
isAnimating: function() {
return this.$.animator.isAnimating();
},
-play: function(a, b) {
+play: function(e, t) {
this.$.animator.play({
-startValue: a,
-endValue: b,
+startValue: e,
+endValue: t,
node: this.hasNode()
});
},
-animateTo: function(a) {
-this.play(this.value, a);
+animateTo: function(e) {
+this.play(this.value, e);
},
animateToMin: function() {
this.animateTo(this.calcMin());
@@ -675,14 +652,14 @@ this.animateTo(this.calcMin());
animateToMax: function() {
this.animateTo(this.calcMax());
},
-animateToMinMax: function(a) {
-a ? this.animateToMin() : this.animateToMax();
+animateToMinMax: function(e) {
+e ? this.animateToMin() : this.animateToMax();
},
-animatorStep: function(a) {
-return this.setValue(a.value), !0;
+animatorStep: function(e) {
+return this.setValue(e.value), !0;
},
-animatorComplete: function(a) {
-return this.doAnimateFinish(a), !0;
+animatorComplete: function(e) {
+return this.doAnimateFinish(e), !0;
},
toggleMinMax: function() {
this.animateToMinMax(!this.isAtMin());
@@ -701,91 +678,92 @@ dragDirectionProp: "xDirection",
canDragProp: "horizontal",
incrementalPoints: !1,
destroy: function() {
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) c._arranger = null;
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) n._arranger = null;
this.inherited(arguments);
},
-arrange: function(a, b) {},
+arrange: function(e, t) {},
size: function() {},
start: function() {
-var a = this.container.fromIndex, b = this.container.toIndex, c = this.container.transitionPoints = [ a ];
+var e = this.container.fromIndex, t = this.container.toIndex, n = this.container.transitionPoints = [ e ];
if (this.incrementalPoints) {
-var d = Math.abs(b - a) - 2, e = a;
-while (d >= 0) e += b < a ? -1 : 1, c.push(e), d--;
+var r = Math.abs(t - e) - 2, i = e;
+while (r >= 0) i += t < e ? -1 : 1, n.push(i), r--;
}
-c.push(this.container.toIndex);
+n.push(this.container.toIndex);
},
finish: function() {},
-canDragEvent: function(a) {
-return a[this.canDragProp];
+canDragEvent: function(e) {
+return e[this.canDragProp];
},
-calcDragDirection: function(a) {
-return a[this.dragDirectionProp];
+calcDragDirection: function(e) {
+return e[this.dragDirectionProp];
},
-calcDrag: function(a) {
-return a[this.dragProp];
+calcDrag: function(e) {
+return e[this.dragProp];
},
-drag: function(a, b, c, d, e) {
-var f = this.measureArrangementDelta(-a, b, c, d, e);
-return f;
+drag: function(e, t, n, r, i) {
+var s = this.measureArrangementDelta(-e, t, n, r, i);
+return s;
},
-measureArrangementDelta: function(a, b, c, d, e) {
-var f = this.calcArrangementDifference(b, c, d, e), g = f ? a / Math.abs(f) : 0;
-return g *= this.container.fromIndex > this.container.toIndex ? -1 : 1, g;
+measureArrangementDelta: function(e, t, n, r, i) {
+var s = this.calcArrangementDifference(t, n, r, i), o = s ? e / Math.abs(s) : 0;
+return o *= this.container.fromIndex > this.container.toIndex ? -1 : 1, o;
},
-calcArrangementDifference: function(a, b, c, d) {},
-_arrange: function(a) {
-var b = this.getOrderedControls(a);
-this.arrange(b, a);
+calcArrangementDifference: function(e, t, n, r) {},
+_arrange: function(e) {
+this.containerBounds || this.reflow();
+var t = this.getOrderedControls(e);
+this.arrange(t, e);
},
-arrangeControl: function(a, b) {
-a._arranger = enyo.mixin(a._arranger || {}, b);
+arrangeControl: function(e, t) {
+e._arranger = enyo.mixin(e._arranger || {}, t);
},
flow: function() {
this.c$ = [].concat(this.container.getPanels()), this.controlsIndex = 0;
-for (var a = 0, b = this.container.getPanels(), c; c = b[a]; a++) {
-enyo.dom.accelerate(c, this.accelerated);
+for (var e = 0, t = this.container.getPanels(), n; n = t[e]; e++) {
+enyo.dom.accelerate(n, this.accelerated);
if (enyo.platform.safari) {
-var d = c.children;
-for (var e = 0, f; f = d[e]; e++) enyo.dom.accelerate(f, this.accelerated);
+var r = n.children;
+for (var i = 0, s; s = r[i]; i++) enyo.dom.accelerate(s, this.accelerated);
}
}
},
reflow: function() {
-var a = this.container.hasNode();
-this.containerBounds = a ? {
-width: a.clientWidth,
-height: a.clientHeight
+var e = this.container.hasNode();
+this.containerBounds = e ? {
+width: e.clientWidth,
+height: e.clientHeight
} : {}, this.size();
},
flowArrangement: function() {
-var a = this.container.arrangement;
-if (a) for (var b = 0, c = this.container.getPanels(), d; d = c[b]; b++) this.flowControl(d, a[b]);
+var e = this.container.arrangement;
+if (e) for (var t = 0, n = this.container.getPanels(), r; r = n[t]; t++) this.flowControl(r, e[t]);
},
-flowControl: function(a, b) {
-enyo.Arranger.positionControl(a, b);
-var c = b.opacity;
-c != null && enyo.Arranger.opacifyControl(a, c);
+flowControl: function(e, t) {
+enyo.Arranger.positionControl(e, t);
+var n = t.opacity;
+n != null && enyo.Arranger.opacifyControl(e, n);
},
-getOrderedControls: function(a) {
-var b = Math.floor(a), c = b - this.controlsIndex, d = c > 0, e = this.c$ || [];
-for (var f = 0; f < Math.abs(c); f++) d ? e.push(e.shift()) : e.unshift(e.pop());
-return this.controlsIndex = b, e;
+getOrderedControls: function(e) {
+var t = Math.floor(e), n = t - this.controlsIndex, r = n > 0, i = this.c$ || [];
+for (var s = 0; s < Math.abs(n); s++) r ? i.push(i.shift()) : i.unshift(i.pop());
+return this.controlsIndex = t, i;
},
statics: {
-positionControl: function(a, b, c) {
-var d = c || "px";
+positionControl: function(e, t, n) {
+var r = n || "px";
if (!this.updating) if (enyo.dom.canTransform() && !enyo.platform.android) {
-var e = b.left, f = b.top, e = enyo.isString(e) ? e : e && e + d, f = enyo.isString(f) ? f : f && f + d;
-enyo.dom.transform(a, {
-translateX: e || null,
-translateY: f || null
+var i = t.left, s = t.top, i = enyo.isString(i) ? i : i && i + r, s = enyo.isString(s) ? s : s && s + r;
+enyo.dom.transform(e, {
+translateX: i || null,
+translateY: s || null
});
-} else a.setBounds(b, c);
+} else e.setBounds(t, n);
},
-opacifyControl: function(a, b) {
-var c = b;
-c = c > .99 ? 1 : c < .01 ? 0 : c, enyo.platform.ie < 9 ? a.applyStyle("filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + c * 100 + ")") : a.applyStyle("opacity", c);
+opacifyControl: function(e, t) {
+var n = t;
+n = n > .99 ? 1 : n < .01 ? 0 : n, enyo.platform.ie < 9 ? e.applyStyle("filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + n * 100 + ")") : e.applyStyle("opacity", n);
}
}
});
@@ -796,30 +774,30 @@ enyo.kind({
name: "enyo.CardArranger",
kind: "Arranger",
layoutClass: "enyo-arranger enyo-arranger-fit",
-calcArrangementDifference: function(a, b, c, d) {
+calcArrangementDifference: function(e, t, n, r) {
return this.containerBounds.width;
},
-arrange: function(a, b) {
-for (var c = 0, d, e, f; d = a[c]; c++) f = c == 0 ? 1 : 0, this.arrangeControl(d, {
-opacity: f
+arrange: function(e, t) {
+for (var n = 0, r, i, s; r = e[n]; n++) s = n == 0 ? 1 : 0, this.arrangeControl(r, {
+opacity: s
});
},
start: function() {
this.inherited(arguments);
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) {
-var d = c.showing;
-c.setShowing(b == this.container.fromIndex || b == this.container.toIndex), c.showing && !d && c.resized();
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) {
+var r = n.showing;
+n.setShowing(t == this.container.fromIndex || t == this.container.toIndex), n.showing && !r && n.resized();
}
},
finish: function() {
this.inherited(arguments);
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) c.setShowing(b == this.container.toIndex);
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) n.setShowing(t == this.container.toIndex);
},
destroy: function() {
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) enyo.Arranger.opacifyControl(c, 1), c.showing || c.setShowing(!0);
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) enyo.Arranger.opacifyControl(n, 1), n.showing || n.setShowing(!0);
this.inherited(arguments);
}
});
@@ -830,28 +808,28 @@ enyo.kind({
name: "enyo.CardSlideInArranger",
kind: "CardArranger",
start: function() {
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) {
-var d = c.showing;
-c.setShowing(b == this.container.fromIndex || b == this.container.toIndex), c.showing && !d && c.resized();
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) {
+var r = n.showing;
+n.setShowing(t == this.container.fromIndex || t == this.container.toIndex), n.showing && !r && n.resized();
}
-var e = this.container.fromIndex, b = this.container.toIndex;
-this.container.transitionPoints = [ b + "." + e + ".s", b + "." + e + ".f" ];
+var i = this.container.fromIndex, t = this.container.toIndex;
+this.container.transitionPoints = [ t + "." + i + ".s", t + "." + i + ".f" ];
},
finish: function() {
this.inherited(arguments);
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) c.setShowing(b == this.container.toIndex);
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) n.setShowing(t == this.container.toIndex);
},
-arrange: function(a, b) {
-var c = b.split("."), d = c[0], e = c[1], f = c[2] == "s", g = this.containerBounds.width;
-for (var h = 0, i = this.container.getPanels(), j, k; j = i[h]; h++) k = g, e == h && (k = f ? 0 : -g), d == h && (k = f ? g : 0), e == h && e == d && (k = 0), this.arrangeControl(j, {
-left: k
+arrange: function(e, t) {
+var n = t.split("."), r = n[0], i = n[1], s = n[2] == "s", o = this.containerBounds.width;
+for (var u = 0, a = this.container.getPanels(), f, l; f = a[u]; u++) l = o, i == u && (l = s ? 0 : -o), r == u && (l = s ? o : 0), i == u && i == r && (l = 0), this.arrangeControl(f, {
+left: l
});
},
destroy: function() {
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) enyo.Arranger.positionControl(c, {
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) enyo.Arranger.positionControl(n, {
left: null
});
this.inherited(arguments);
@@ -864,61 +842,61 @@ enyo.kind({
name: "enyo.CarouselArranger",
kind: "Arranger",
size: function() {
-var a = this.container.getPanels(), b = this.containerPadding = this.container.hasNode() ? enyo.FittableLayout.calcPaddingExtents(this.container.node) : {}, c = this.containerBounds;
-c.height -= b.top + b.bottom, c.width -= b.left + b.right;
-var d;
-for (var e = 0, f = 0, g, h; h = a[e]; e++) g = enyo.FittableLayout.calcMarginExtents(h.hasNode()), h.width = h.getBounds().width, h.marginWidth = g.right + g.left, f += (h.fit ? 0 : h.width) + h.marginWidth, h.fit && (d = h);
-if (d) {
-var i = c.width - f;
-d.width = i >= 0 ? i : d.width;
-}
-for (var e = 0, j = b.left, g, h; h = a[e]; e++) h.setBounds({
-top: b.top,
-bottom: b.bottom,
-width: h.fit ? h.width : null
+var e = this.container.getPanels(), t = this.containerPadding = this.container.hasNode() ? enyo.dom.calcPaddingExtents(this.container.node) : {}, n = this.containerBounds;
+n.height -= t.top + t.bottom, n.width -= t.left + t.right;
+var r;
+for (var i = 0, s = 0, o, u; u = e[i]; i++) o = enyo.dom.calcMarginExtents(u.hasNode()), u.width = u.getBounds().width, u.marginWidth = o.right + o.left, s += (u.fit ? 0 : u.width) + u.marginWidth, u.fit && (r = u);
+if (r) {
+var a = n.width - s;
+r.width = a >= 0 ? a : r.width;
+}
+for (var i = 0, f = t.left, o, u; u = e[i]; i++) u.setBounds({
+top: t.top,
+bottom: t.bottom,
+width: u.fit ? u.width : null
});
},
-arrange: function(a, b) {
-this.container.wrap ? this.arrangeWrap(a, b) : this.arrangeNoWrap(a, b);
-},
-arrangeNoWrap: function(a, b) {
-var c = this.container.getPanels(), d = this.container.clamp(b), e = this.containerBounds.width;
-for (var f = d, g = 0, h; h = c[f]; f++) {
-g += h.width + h.marginWidth;
-if (g > e) break;
-}
-var i = e - g, j = 0;
-if (i > 0) {
-var k = d;
-for (var f = d - 1, l = 0, h; h = c[f]; f--) {
-l += h.width + h.marginWidth;
-if (i - l <= 0) {
-j = i - l, d = f;
+arrange: function(e, t) {
+this.container.wrap ? this.arrangeWrap(e, t) : this.arrangeNoWrap(e, t);
+},
+arrangeNoWrap: function(e, t) {
+var n = this.container.getPanels(), r = this.container.clamp(t), i = this.containerBounds.width;
+for (var s = r, o = 0, u; u = n[s]; s++) {
+o += u.width + u.marginWidth;
+if (o > i) break;
+}
+var a = i - o, f = 0;
+if (a > 0) {
+var l = r;
+for (var s = r - 1, c = 0, u; u = n[s]; s--) {
+c += u.width + u.marginWidth;
+if (a - c <= 0) {
+f = a - c, r = s;
break;
}
}
}
-for (var f = 0, m = this.containerPadding.left + j, n, h; h = c[f]; f++) n = h.width + h.marginWidth, f < d ? this.arrangeControl(h, {
-left: -n
-}) : (this.arrangeControl(h, {
-left: Math.floor(m)
-}), m += n);
+for (var s = 0, h = this.containerPadding.left + f, p, u; u = n[s]; s++) p = u.width + u.marginWidth, s < r ? this.arrangeControl(u, {
+left: -p
+}) : (this.arrangeControl(u, {
+left: Math.floor(h)
+}), h += p);
},
-arrangeWrap: function(a, b) {
-for (var c = 0, d = this.containerPadding.left, e, f; f = a[c]; c++) this.arrangeControl(f, {
-left: d
-}), d += f.width + f.marginWidth;
+arrangeWrap: function(e, t) {
+for (var n = 0, r = this.containerPadding.left, i, s; s = e[n]; n++) this.arrangeControl(s, {
+left: r
+}), r += s.width + s.marginWidth;
},
-calcArrangementDifference: function(a, b, c, d) {
-var e = Math.abs(a % this.c$.length);
-return b[e].left - d[e].left;
+calcArrangementDifference: function(e, t, n, r) {
+var i = Math.abs(e % this.c$.length);
+return t[i].left - r[i].left;
},
destroy: function() {
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) enyo.Arranger.positionControl(c, {
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) enyo.Arranger.positionControl(n, {
left: null,
top: null
-}), c.applyStyle("top", null), c.applyStyle("bottom", null), c.applyStyle("left", null), c.applyStyle("width", null);
+}), n.applyStyle("top", null), n.applyStyle("bottom", null), n.applyStyle("left", null), n.applyStyle("width", null);
this.inherited(arguments);
}
});
@@ -932,36 +910,36 @@ size: function() {
this.clearLastSize(), this.inherited(arguments);
},
clearLastSize: function() {
-for (var a = 0, b = this.container.getPanels(), c; c = b[a]; a++) c._fit && a != b.length - 1 && (c.applyStyle("width", null), c._fit = null);
-},
-arrange: function(a, b) {
-var c = this.container.getPanels();
-for (var d = 0, e = this.containerPadding.left, f, g; g = c[d]; d++) this.arrangeControl(g, {
-left: e
-}), d >= b && (e += g.width + g.marginWidth), d == c.length - 1 && b < 0 && this.arrangeControl(g, {
-left: e - b
+for (var e = 0, t = this.container.getPanels(), n; n = t[e]; e++) n._fit && e != t.length - 1 && (n.applyStyle("width", null), n._fit = null);
+},
+arrange: function(e, t) {
+var n = this.container.getPanels();
+for (var r = 0, i = this.containerPadding.left, s, o; o = n[r]; r++) this.arrangeControl(o, {
+left: i
+}), r >= t && (i += o.width + o.marginWidth), r == n.length - 1 && t < 0 && this.arrangeControl(o, {
+left: i - t
});
},
-calcArrangementDifference: function(a, b, c, d) {
-var e = this.container.getPanels().length - 1;
-return Math.abs(d[e].left - b[e].left);
+calcArrangementDifference: function(e, t, n, r) {
+var i = this.container.getPanels().length - 1;
+return Math.abs(r[i].left - t[i].left);
},
-flowControl: function(a, b) {
+flowControl: function(e, t) {
this.inherited(arguments);
if (this.container.realtimeFit) {
-var c = this.container.getPanels(), d = c.length - 1, e = c[d];
-a == e && this.fitControl(a, b.left);
+var n = this.container.getPanels(), r = n.length - 1, i = n[r];
+e == i && this.fitControl(e, t.left);
}
},
finish: function() {
this.inherited(arguments);
if (!this.container.realtimeFit && this.containerBounds) {
-var a = this.container.getPanels(), b = this.container.arrangement, c = a.length - 1, d = a[c];
-this.fitControl(d, b[c].left);
+var e = this.container.getPanels(), t = this.container.arrangement, n = e.length - 1, r = e[n];
+this.fitControl(r, t[n].left);
}
},
-fitControl: function(a, b) {
-a._fit = !0, a.applyStyle("width", this.containerBounds.width - b + "px"), a.resized();
+fitControl: function(e, t) {
+e._fit = !0, e.applyStyle("width", this.containerBounds.width - t + "px"), e.resized();
}
});
@@ -978,23 +956,34 @@ constructor: function() {
this.inherited(arguments), this.margin = this.container.margin != null ? this.container.margin : this.margin;
},
size: function() {
-var a = this.container.getPanels(), b = this.containerBounds[this.axisSize], c = b - this.margin - this.margin;
-for (var d = 0, e, f; f = a[d]; d++) e = {}, e[this.axisSize] = c, e[this.offAxisSize] = "100%", f.setBounds(e);
+var e = this.container.getPanels(), t = this.containerBounds[this.axisSize], n = t - this.margin - this.margin;
+for (var r = 0, i, s; s = e[r]; r++) i = {}, i[this.axisSize] = n, i[this.offAxisSize] = "100%", s.setBounds(i);
},
-arrange: function(a, b) {
-var c = Math.floor(this.container.getPanels().length / 2), d = this.getOrderedControls(Math.floor(b) - c), e = this.containerBounds[this.axisSize] - this.margin - this.margin, f = this.margin - e * c, g = (d.length - 1) / 2;
-for (var h = 0, i, j, k; i = d[h]; h++) j = {}, j[this.axisPosition] = f, j.opacity = h == 0 || h == d.length - 1 ? 0 : 1, this.arrangeControl(i, j), f += e;
+start: function() {
+this.inherited(arguments);
+var e = this.container.fromIndex, t = this.container.toIndex, n = this.getOrderedControls(t), r = Math.floor(n.length / 2);
+for (var i = 0, s; s = n[i]; i++) e > t ? i == n.length - r ? s.applyStyle("z-index", 0) : s.applyStyle("z-index", 1) : i == n.length - 1 - r ? s.applyStyle("z-index", 0) : s.applyStyle("z-index", 1);
+},
+arrange: function(e, t) {
+if (this.container.getPanels().length == 1) {
+var n = {};
+n[this.axisPosition] = this.margin, this.arrangeControl(this.container.getPanels()[0], n);
+return;
+}
+var r = Math.floor(this.container.getPanels().length / 2), i = this.getOrderedControls(Math.floor(t) - r), s = this.containerBounds[this.axisSize] - this.margin - this.margin, o = this.margin - s * r;
+for (var u = 0, a, n, f; a = i[u]; u++) n = {}, n[this.axisPosition] = o, this.arrangeControl(a, n), o += s;
},
-calcArrangementDifference: function(a, b, c, d) {
-var e = Math.abs(a % this.c$.length);
-return b[e][this.axisPosition] - d[e][this.axisPosition];
+calcArrangementDifference: function(e, t, n, r) {
+if (this.container.getPanels().length == 1) return 0;
+var i = Math.abs(e % this.c$.length);
+return t[i][this.axisPosition] - r[i][this.axisPosition];
},
destroy: function() {
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) enyo.Arranger.positionControl(c, {
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) enyo.Arranger.positionControl(n, {
left: null,
top: null
-}), enyo.Arranger.opacifyControl(c, 1), c.applyStyle("left", null), c.applyStyle("top", null), c.applyStyle("height", null), c.applyStyle("width", null);
+}), enyo.Arranger.opacifyControl(n, 1), n.applyStyle("left", null), n.applyStyle("top", null), n.applyStyle("height", null), n.applyStyle("width", null);
this.inherited(arguments);
}
}), enyo.kind({
@@ -1012,36 +1001,36 @@ kind: "Arranger",
incrementalPoints: !0,
inc: 20,
size: function() {
-var a = this.container.getPanels(), b = this.containerBounds, c = this.controlWidth = b.width / 3, d = this.controlHeight = b.height / 3;
-for (var e = 0, f; f = a[e]; e++) f.setBounds({
-width: c,
-height: d
+var e = this.container.getPanels(), t = this.containerBounds, n = this.controlWidth = t.width / 3, r = this.controlHeight = t.height / 3;
+for (var i = 0, s; s = e[i]; i++) s.setBounds({
+width: n,
+height: r
});
},
-arrange: function(a, b) {
-var c = this.inc;
-for (var d = 0, e = a.length, f; f = a[d]; d++) {
-var g = Math.cos(d / e * 2 * Math.PI) * d * c + this.controlWidth, h = Math.sin(d / e * 2 * Math.PI) * d * c + this.controlHeight;
-this.arrangeControl(f, {
-left: g,
-top: h
+arrange: function(e, t) {
+var n = this.inc;
+for (var r = 0, i = e.length, s; s = e[r]; r++) {
+var o = Math.cos(r / i * 2 * Math.PI) * r * n + this.controlWidth, u = Math.sin(r / i * 2 * Math.PI) * r * n + this.controlHeight;
+this.arrangeControl(s, {
+left: o,
+top: u
});
}
},
start: function() {
this.inherited(arguments);
-var a = this.getOrderedControls(this.container.toIndex);
-for (var b = 0, c; c = a[b]; b++) c.applyStyle("z-index", a.length - b);
+var e = this.getOrderedControls(this.container.toIndex);
+for (var t = 0, n; n = e[t]; t++) n.applyStyle("z-index", e.length - t);
},
-calcArrangementDifference: function(a, b, c, d) {
+calcArrangementDifference: function(e, t, n, r) {
return this.controlWidth;
},
destroy: function() {
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) c.applyStyle("z-index", null), enyo.Arranger.positionControl(c, {
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) n.applyStyle("z-index", null), enyo.Arranger.positionControl(n, {
left: null,
top: null
-}), c.applyStyle("left", null), c.applyStyle("top", null), c.applyStyle("height", null), c.applyStyle("width", null);
+}), n.applyStyle("left", null), n.applyStyle("top", null), n.applyStyle("height", null), n.applyStyle("width", null);
this.inherited(arguments);
}
}), enyo.kind({
@@ -1051,31 +1040,31 @@ incrementalPoints: !0,
colWidth: 100,
colHeight: 100,
size: function() {
-var a = this.container.getPanels(), b = this.colWidth, c = this.colHeight;
-for (var d = 0, e; e = a[d]; d++) e.setBounds({
-width: b,
-height: c
+var e = this.container.getPanels(), t = this.colWidth, n = this.colHeight;
+for (var r = 0, i; i = e[r]; r++) i.setBounds({
+width: t,
+height: n
});
},
-arrange: function(a, b) {
-var c = this.colWidth, d = this.colHeight, e = Math.floor(this.containerBounds.width / c), f;
-for (var g = 0, h = 0; h < a.length; g++) for (var i = 0; i < e && (f = a[h]); i++, h++) this.arrangeControl(f, {
-left: c * i,
-top: d * g
+arrange: function(e, t) {
+var n = this.colWidth, r = this.colHeight, i = Math.max(1, Math.floor(this.containerBounds.width / n)), s;
+for (var o = 0, u = 0; u < e.length; o++) for (var a = 0; a < i && (s = e[u]); a++, u++) this.arrangeControl(s, {
+left: n * a,
+top: r * o
});
},
-flowControl: function(a, b) {
-this.inherited(arguments), enyo.Arranger.opacifyControl(a, b.top % this.colHeight != 0 ? .25 : 1);
+flowControl: function(e, t) {
+this.inherited(arguments), enyo.Arranger.opacifyControl(e, t.top % this.colHeight !== 0 ? .25 : 1);
},
-calcArrangementDifference: function(a, b, c, d) {
+calcArrangementDifference: function(e, t, n, r) {
return this.colWidth;
},
destroy: function() {
-var a = this.container.getPanels();
-for (var b = 0, c; c = a[b]; b++) enyo.Arranger.positionControl(c, {
+var e = this.container.getPanels();
+for (var t = 0, n; n = e[t]; t++) enyo.Arranger.positionControl(n, {
left: null,
top: null
-}), c.applyStyle("left", null), c.applyStyle("top", null), c.applyStyle("height", null), c.applyStyle("width", null);
+}), n.applyStyle("left", null), n.applyStyle("top", null), n.applyStyle("height", null), n.applyStyle("width", null);
this.inherited(arguments);
}
});
@@ -1109,7 +1098,7 @@ onEnd: "completed"
} ],
fraction: 0,
create: function() {
-this.transitionPoints = [], this.inherited(arguments), this.arrangerKindChanged(), this.avoidFitChanged(), this.indexChanged();
+this.transitionPoints = [], this.inherited(arguments), this.arrangerKindChanged(), this.narrowFitChanged(), this.indexChanged();
},
initComponents: function() {
this.createChrome(this.tools), this.inherited(arguments);
@@ -1117,11 +1106,11 @@ this.createChrome(this.tools), this.inherited(arguments);
arrangerKindChanged: function() {
this.setLayoutKind(this.arrangerKind);
},
-avoidFitChanged: function() {
+narrowFitChanged: function() {
this.addRemoveClass("enyo-panels-fit-narrow", this.narrowFit);
},
-removeControl: function(a) {
-this.inherited(arguments), this.controls.length > 1 && this.isPanel(a) && (this.setIndex(Math.max(this.index - 1, 0)), this.flow(), this.reflow());
+removeControl: function(e) {
+this.inherited(arguments), this.controls.length > 1 && this.isPanel(e) && (this.setIndex(Math.max(this.index - 1, 0)), this.flow(), this.reflow());
},
isPanel: function() {
return !0;
@@ -1133,21 +1122,21 @@ reflow: function() {
this.arrangements = [], this.inherited(arguments), this.refresh();
},
getPanels: function() {
-var a = this.controlParent || this;
-return a.children;
+var e = this.controlParent || this;
+return e.children;
},
getActive: function() {
-var a = this.getPanels();
-return a[this.index];
+var e = this.getPanels();
+return e[this.index];
},
getAnimator: function() {
return this.$.animator;
},
-setIndex: function(a) {
-this.setPropertyValue("index", a, "indexChanged");
+setIndex: function(e) {
+this.setPropertyValue("index", e, "indexChanged");
},
-setIndexDirect: function(a) {
-this.setIndex(a), this.completed();
+setIndexDirect: function(e) {
+this.setIndex(e), this.completed();
},
previous: function() {
this.setIndex(this.index - 1);
@@ -1155,54 +1144,54 @@ this.setIndex(this.index - 1);
next: function() {
this.setIndex(this.index + 1);
},
-clamp: function(a) {
-var b = this.getPanels().length - 1;
-return this.wrap ? a : Math.max(0, Math.min(a, b));
+clamp: function(e) {
+var t = this.getPanels().length - 1;
+return this.wrap ? e : Math.max(0, Math.min(e, t));
},
-indexChanged: function(a) {
-this.lastIndex = a, this.index = this.clamp(this.index), this.dragging || (this.$.animator.isAnimating() && this.completed(), this.$.animator.stop(), this.hasNode() && (this.animate ? (this.startTransition(), this.$.animator.play({
+indexChanged: function(e) {
+this.lastIndex = e, this.index = this.clamp(this.index), this.dragging || (this.$.animator.isAnimating() && this.completed(), this.$.animator.stop(), this.hasNode() && (this.animate ? (this.startTransition(), this.$.animator.play({
startValue: this.fraction
})) : this.refresh()));
},
-step: function(a) {
-this.fraction = a.value, this.stepTransition();
+step: function(e) {
+this.fraction = e.value, this.stepTransition();
},
completed: function() {
this.$.animator.isAnimating() && this.$.animator.stop(), this.fraction = 1, this.stepTransition(), this.finishTransition();
},
-dragstart: function(a, b) {
-if (this.draggable && this.layout && this.layout.canDragEvent(b)) return b.preventDefault(), this.dragstartTransition(b), this.dragging = !0, this.$.animator.stop(), !0;
+dragstart: function(e, t) {
+if (this.draggable && this.layout && this.layout.canDragEvent(t)) return t.preventDefault(), this.dragstartTransition(t), this.dragging = !0, this.$.animator.stop(), !0;
},
-drag: function(a, b) {
-this.dragging && (b.preventDefault(), this.dragTransition(b));
+drag: function(e, t) {
+this.dragging && (t.preventDefault(), this.dragTransition(t));
},
-dragfinish: function(a, b) {
-this.dragging && (this.dragging = !1, b.preventTap(), this.dragfinishTransition(b));
+dragfinish: function(e, t) {
+this.dragging && (this.dragging = !1, t.preventTap(), this.dragfinishTransition(t));
},
-dragstartTransition: function(a) {
+dragstartTransition: function(e) {
if (!this.$.animator.isAnimating()) {
-var b = this.fromIndex = this.index;
-this.toIndex = b - (this.layout ? this.layout.calcDragDirection(a) : 0);
-} else this.verifyDragTransition(a);
+var t = this.fromIndex = this.index;
+this.toIndex = t - (this.layout ? this.layout.calcDragDirection(e) : 0);
+} else this.verifyDragTransition(e);
this.fromIndex = this.clamp(this.fromIndex), this.toIndex = this.clamp(this.toIndex), this.fireTransitionStart(), this.layout && this.layout.start();
},
-dragTransition: function(a) {
-var b = this.layout ? this.layout.calcDrag(a) : 0, c = this.transitionPoints, d = c[0], e = c[c.length - 1], f = this.fetchArrangement(d), g = this.fetchArrangement(e), h = this.layout ? this.layout.drag(b, d, f, e, g) : 0, i = b && !h;
-!i, this.fraction += h;
-var j = this.fraction;
-if (j > 1 || j < 0 || i) (j > 0 || i) && this.dragfinishTransition(a), this.dragstartTransition(a), this.fraction = 0;
+dragTransition: function(e) {
+var t = this.layout ? this.layout.calcDrag(e) : 0, n = this.transitionPoints, r = n[0], i = n[n.length - 1], s = this.fetchArrangement(r), o = this.fetchArrangement(i), u = this.layout ? this.layout.drag(t, r, s, i, o) : 0, a = t && !u;
+a, this.fraction += u;
+var f = this.fraction;
+if (f > 1 || f < 0 || a) (f > 0 || a) && this.dragfinishTransition(e), this.dragstartTransition(e), this.fraction = 0;
this.stepTransition();
},
-dragfinishTransition: function(a) {
-this.verifyDragTransition(a), this.setIndex(this.toIndex), this.dragging && this.fireTransitionFinish();
+dragfinishTransition: function(e) {
+this.verifyDragTransition(e), this.setIndex(this.toIndex), this.dragging && this.fireTransitionFinish();
},
-verifyDragTransition: function(a) {
-var b = this.layout ? this.layout.calcDragDirection(a) : 0, c = Math.min(this.fromIndex, this.toIndex), d = Math.max(this.fromIndex, this.toIndex);
-if (b > 0) {
-var e = c;
-c = d, d = e;
+verifyDragTransition: function(e) {
+var t = this.layout ? this.layout.calcDragDirection(e) : 0, n = Math.min(this.fromIndex, this.toIndex), r = Math.max(this.fromIndex, this.toIndex);
+if (t > 0) {
+var i = n;
+n = r, r = i;
}
-c != this.fromIndex && (this.fraction = 1 - this.fraction), this.fromIndex = c, this.toIndex = d;
+n != this.fromIndex && (this.fraction = 1 - this.fraction), this.fromIndex = n, this.toIndex = r;
},
refresh: function() {
this.$.animator.isAnimating() && this.$.animator.stop(), this.startTransition(), this.fraction = 1, this.stepTransition(), this.finishTransition();
@@ -1214,48 +1203,48 @@ finishTransition: function() {
this.layout && this.layout.finish(), this.transitionPoints = [], this.fraction = 0, this.fromIndex = this.toIndex = null, this.fireTransitionFinish();
},
fireTransitionStart: function() {
-var a = this.startTransitionInfo;
-this.hasNode() && (!a || a.fromIndex != this.fromIndex || a.toIndex != this.toIndex) && (this.startTransitionInfo = {
+var e = this.startTransitionInfo;
+this.hasNode() && (!e || e.fromIndex != this.fromIndex || e.toIndex != this.toIndex) && (this.startTransitionInfo = {
fromIndex: this.fromIndex,
toIndex: this.toIndex
}, this.doTransitionStart(enyo.clone(this.startTransitionInfo)));
},
fireTransitionFinish: function() {
-var a = this.finishTransitionInfo;
-this.hasNode() && (!a || a.fromIndex != this.lastIndex || a.toIndex != this.index) && (this.finishTransitionInfo = {
+var e = this.finishTransitionInfo;
+this.hasNode() && (!e || e.fromIndex != this.lastIndex || e.toIndex != this.index) && (this.finishTransitionInfo = {
fromIndex: this.lastIndex,
toIndex: this.index
}, this.doTransitionFinish(enyo.clone(this.finishTransitionInfo))), this.lastIndex = this.index;
},
stepTransition: function() {
if (this.hasNode()) {
-var a = this.transitionPoints, b = (this.fraction || 0) * (a.length - 1), c = Math.floor(b);
-b -= c;
-var d = a[c], e = a[c + 1], f = this.fetchArrangement(d), g = this.fetchArrangement(e);
-this.arrangement = f && g ? enyo.Panels.lerp(f, g, b) : f || g, this.arrangement && this.layout && this.layout.flowArrangement();
+var e = this.transitionPoints, t = (this.fraction || 0) * (e.length - 1), n = Math.floor(t);
+t -= n;
+var r = e[n], i = e[n + 1], s = this.fetchArrangement(r), o = this.fetchArrangement(i);
+this.arrangement = s && o ? enyo.Panels.lerp(s, o, t) : s || o, this.arrangement && this.layout && this.layout.flowArrangement();
}
},
-fetchArrangement: function(a) {
-return a != null && !this.arrangements[a] && this.layout && (this.layout._arrange(a), this.arrangements[a] = this.readArrangement(this.getPanels())), this.arrangements[a];
+fetchArrangement: function(e) {
+return e != null && !this.arrangements[e] && this.layout && (this.layout._arrange(e), this.arrangements[e] = this.readArrangement(this.getPanels())), this.arrangements[e];
},
-readArrangement: function(a) {
-var b = [];
-for (var c = 0, d = a, e; e = d[c]; c++) b.push(enyo.clone(e._arranger));
-return b;
+readArrangement: function(e) {
+var t = [];
+for (var n = 0, r = e, i; i = r[n]; n++) t.push(enyo.clone(i._arranger));
+return t;
},
statics: {
isScreenNarrow: function() {
return enyo.dom.getWindowWidth() <= 800;
},
-lerp: function(a, b, c) {
-var d = [];
-for (var e = 0, f = enyo.keys(a), g; g = f[e]; e++) d.push(this.lerpObject(a[g], b[g], c));
-return d;
+lerp: function(e, t, n) {
+var r = [];
+for (var i = 0, s = enyo.keys(e), o; o = s[i]; i++) r.push(this.lerpObject(e[o], t[o], n));
+return r;
},
-lerpObject: function(a, b, c) {
-var d = enyo.clone(a), e, f;
-if (b) for (var g in a) e = a[g], f = b[g], e != f && (d[g] = e - (e - f) * c);
-return d;
+lerpObject: function(e, t, n) {
+var r = enyo.clone(e), i, s;
+if (t) for (var o in e) i = e[o], s = t[o], i != s && (r[o] = i - (i - s) * n);
+return r;
}
}
});
@@ -1333,22 +1322,22 @@ this.addRemoveClass("enyo-selected", this.selected);
rendered: function() {
this.inherited(arguments), this.expandable && !this.expanded && this.quickCollapse();
},
-addNodes: function(a) {
+addNodes: function(e) {
this.destroyClientControls();
-for (var b = 0, c; c = a[b]; b++) this.createComponent(c);
+for (var t = 0, n; n = e[t]; t++) this.createComponent(n);
this.$.client.render();
},
-addTextNodes: function(a) {
+addTextNodes: function(e) {
this.destroyClientControls();
-for (var b = 0, c; c = a[b]; b++) this.createComponent({
-content: c
+for (var t = 0, n; n = e[t]; t++) this.createComponent({
+content: n
});
this.$.client.render();
},
-tap: function(a, b) {
-return this.onlyIconExpands ? b.target == this.$.icon.hasNode() ? this.toggleExpanded() : this.doNodeTap() : (this.toggleExpanded(), this.doNodeTap()), !0;
+tap: function(e, t) {
+return this.onlyIconExpands ? t.target == this.$.icon.hasNode() ? this.toggleExpanded() : this.doNodeTap() : (this.toggleExpanded(), this.doNodeTap()), !0;
},
-dblclick: function(a, b) {
+dblclick: function(e, t) {
return this.doNodeDblClick(), !0;
},
toggleExpanded: function() {
@@ -1356,16 +1345,16 @@ this.setExpanded(!this.expanded);
},
quickCollapse: function() {
this.removeClass("enyo-animate"), this.$.box.applyStyle("height", "0");
-var a = this.$.client.getBounds().height;
+var e = this.$.client.getBounds().height;
this.$.client.setBounds({
-top: -a
+top: -e
});
},
_expand: function() {
this.addClass("enyo-animate");
-var a = this.$.client.getBounds().height;
+var e = this.$.client.getBounds().height;
this.$.box.setBounds({
-height: a
+height: e
}), this.$.client.setBounds({
top: 0
}), setTimeout(enyo.bind(this, function() {
@@ -1374,21 +1363,21 @@ this.expanded && (this.removeClass("enyo-animate"), this.$.box.applyStyle("heigh
},
_collapse: function() {
this.removeClass("enyo-animate");
-var a = this.$.client.getBounds().height;
+var e = this.$.client.getBounds().height;
this.$.box.setBounds({
-height: a
+height: e
}), setTimeout(enyo.bind(this, function() {
this.addClass("enyo-animate"), this.$.box.applyStyle("height", "0"), this.$.client.setBounds({
-top: -a
+top: -e
});
}), 25);
},
-expandedChanged: function(a) {
+expandedChanged: function(e) {
if (!this.expandable) this.expanded = !1; else {
-var b = {
+var t = {
expanded: this.expanded
};
-this.doExpand(b), b.wait || this.effectExpanded();
+this.doExpand(t), t.wait || this.effectExpanded();
}
},
effectExpanded: function() {
@@ -1399,53 +1388,53 @@ this.$.client && (this.expanded ? this._expand() : this._collapse());
// runtime-machine.js
runtimeMachine = {
-_head: function(a, b, c) {
+_head: function(e, t, n) {
this._inflight = !0;
-var d = document.createElement(a);
-for (var e in b) d.setAttribute(e, b[e]);
-return c && (d.innerText = c), this._headElt || (this._headElt = document.getElementsByTagName("head")[0]), this._headElt.appendChild(d), d;
+var r = document.createElement(e);
+for (var i in t) r.setAttribute(i, t[i]);
+return n && (r.innerText = n), this._headElt || (this._headElt = document.getElementsByTagName("head")[0]), this._headElt.appendChild(r), r;
},
-sheet: function(a) {
+sheet: function(e) {
this._head("link", {
type: "text/css",
media: "screen",
rel: "stylesheet",
-href: a
+href: e
});
},
-inject: function(a) {
+inject: function(e) {
this._head("script", {
type: "text/javascript"
-}, a);
+}, e);
},
_scripts: [],
-script: function(a) {
-this._inflight ? this._scripts.push(a) : this._script(a);
+script: function(e) {
+this._inflight ? this._scripts.push(e) : this._script(e);
},
-_require: function(a) {},
-_script: function(a) {
+_require: function(e) {},
+_script: function(e) {
this._inflight = !0;
-var b = this._head("script", {
+var t = this._head("script", {
type: "text/javascript",
-src: a
-}), c = this;
-enyo.platform.ie && enyo.platform.ie <= 8 ? b.onreadystatechange = function() {
-if (b.readyState === "complete" || b.readyState === "loaded") b.onreadystatechange = "", c._loaded(a);
-} : (b.onload = function() {
-c._loaded(a);
-}, b.onerror = function() {
-c._error(a);
+src: e
+}), n = this;
+enyo.platform.ie && enyo.platform.ie <= 8 ? t.onreadystatechange = function() {
+if (t.readyState === "complete" || t.readyState === "loaded") t.onreadystatechange = "", n._loaded(e);
+} : (t.onload = function() {
+n._loaded(e);
+}, t.onerror = function() {
+n._error(e);
});
},
_continue: function() {
this._inflight = !1;
-var a = this._scripts.pop();
-a && this._script(a);
+var e = this._scripts.pop();
+e && this._script(e);
},
-_loaded: function(a) {
+_loaded: function(e) {
this._continue();
},
-_error: function(a) {
+_error: function(e) {
this._continue();
}
};
@@ -1462,15 +1451,15 @@ events: {
onProgress: "",
onFinish: ""
},
-walk: function(a) {
+walk: function(e) {
this.loader = new enyo.loaderFactory(runtimeMachine), this.loader.loadScript = function() {}, this.loader.loadSheet = function() {}, this.loader.verbose = this.verbose, this.loader.report = enyo.bind(this, "walkReport"), this.loader.finish = enyo.bind(this, "walkFinish"), enyo.loader = this.loader;
-var b = enyo.path.rewrite(a);
-return enyo.asyncMethod(enyo.loader, "load", b), this.async = new enyo.Async;
+var t = enyo.path.rewrite(e);
+return enyo.asyncMethod(enyo.loader, "load", t), this.async = new enyo.Async;
},
-walkReport: function(a, b) {
+walkReport: function(e, t) {
this.doProgress({
-action: a,
-name: b
+action: e,
+name: t
});
},
walkFinish: function() {
@@ -1487,24 +1476,24 @@ modules: this.modules
enyo.kind({
name: "Reader",
kind: enyo.Async,
-go: function(a) {
-return this.modules = a.modules, this.moduleIndex = 0, enyo.asyncMethod(this, "nextModule"), this;
+go: function(e) {
+return this.modules = e.modules, this.moduleIndex = 0, enyo.asyncMethod(this, "nextModule"), this;
},
nextModule: function() {
-var a = this.modules[this.moduleIndex++];
-a ? this.loadModule(a) : this.modulesFinished();
+var e = this.modules[this.moduleIndex++];
+e ? this.loadModule(e) : this.modulesFinished();
},
-loadModule: function(a) {
+loadModule: function(e) {
enyo.xhr.request({
-url: a.path,
-callback: enyo.bind(this, "moduleLoaded", a)
+url: e.path,
+callback: enyo.bind(this, "moduleLoaded", e)
});
},
-moduleLoaded: function(a, b) {
-this.addModule(a, b), this.nextModule();
+moduleLoaded: function(e, t) {
+this.addModule(e, t), this.nextModule();
},
-addModule: function(a, b) {
-b && b.length && (a.code = b);
+addModule: function(e, t) {
+t && t.length && (e.code = t);
},
modulesFinished: function() {
this.respond({
@@ -1520,8 +1509,8 @@ name: "Iterator",
kind: null,
i: -1,
nodes: null,
-constructor: function(a) {
-this.stream = a;
+constructor: function(e) {
+this.stream = e;
},
next: function() {
return this.i++, this._read();
@@ -1529,7 +1518,7 @@ return this.i++, this._read();
prev: function() {
return this.i--, this._read();
},
-_read: function(a) {
+_read: function(e) {
return this.past = this.stream[this.i - 1], this.value = this.stream[this.i], this.future = this.stream[this.i + 1], this.value;
}
});
@@ -1539,43 +1528,43 @@ return this.past = this.stream[this.i - 1], this.value = this.stream[this.i], th
enyo.kind({
name: "AbstractLexer",
kind: null,
-constructor: function(a) {
-if (a) return this.start(a), this.finish(), this.r;
+constructor: function(e) {
+if (e) return this.start(e), this.finish(), this.r;
},
p0: 0,
p: 0,
-start: function(a) {
-this.s = a, this.l = this.s.length, this.r = [], this.d = "", this.p0 = 0, this.p = 0, this.n = 0, this.analyze();
+start: function(e) {
+this.s = e, this.l = this.s.length, this.r = [], this.d = "", this.p0 = 0, this.p = 0, this.n = 0, this.analyze();
},
-search: function(a) {
-var b = a.global ? a : new RegExp(a.source, "g");
-return b.lastIndex = this.p, this.m = b.exec(this.s), this.p = this.m ? this.m.index : -1, b.lastIndex != this.p0 && (this.d = this.s.charAt(this.p));
+search: function(e) {
+var t = e.global ? e : new RegExp(e.source, "g");
+return t.lastIndex = this.p, this.m = t.exec(this.s), this.p = this.m ? this.m.index : -1, t.lastIndex != this.p0 && (this.d = this.s.charAt(this.p));
},
-lookahead: function(a) {
-return this.s.charAt(this.p + a);
+lookahead: function(e) {
+return this.s.charAt(this.p + e);
},
getToken: function() {
return this.s.slice(this.p0, this.p);
},
-tokenize: function(a) {
-this.p += a || 0;
+tokenize: function(e) {
+this.p += e || 0;
},
-pushToken: function(a, b, c) {
-this.tokenize(b);
-var d = this.getToken();
-if (!d && !c) return {};
-var e = (d.match(/\n/g) || []).length, f = {
-kind: a,
-token: d,
+pushToken: function(e, t, n) {
+this.tokenize(t);
+var r = this.getToken();
+if (!r && !n) return {};
+var i = (r.match(/\n/g) || []).length, s = {
+kind: e,
+token: r,
start: this.p0,
end: this.p,
line: this.n,
-height: e
+height: i
};
-return this.r.push(f), this.n += e, this.p0 = this.p, f;
+return this.r.push(s), this.n += i, this.p0 = this.p, s;
},
-tossToken: function(a) {
-this.tokenize(a), this.p0 = this.p;
+tossToken: function(e) {
+this.tokenize(e), this.p0 = this.p;
},
finish: function() {
this.pushToken("gah");
@@ -1586,23 +1575,23 @@ kind: AbstractLexer,
symbols: "(){}[];,:<>+-=*/&",
operators: [ "++", "--", "+=", "-=", "==", "!=", "<=", ">=", "===", "&&", "||", '"', "'" ],
keywords: [ "function", "new", "return", "if", "else", "while", "do", "break", "continue", "switch", "case", "var" ],
-constructor: function(a) {
+constructor: function(e) {
return this.buildPattern(), this.inherited(arguments);
},
buildPattern: function() {
-var a = '"(?:\\\\"|[^"])*?"', b = "'(?:\\\\'|[^'])*?'", c = a + "|" + b, d = "\\b(?:" + this.keywords.join("|") + ")\\b", e = "[\\" + this.symbols.split("").join("\\") + "]", f = [];
-for (var g = 0, h; h = this.operators[g]; g++) f.push("\\" + h.split("").join("\\"));
-f = f.join("|"), e = f + "|" + e;
-var i = [ '\\\\"|\\\\/', c, d, "\\/\\/", "\\/\\*", e, "\\s" ];
-this.matchers = [ "doSymbol", "doString", "doKeyword", "doLineComment", "doCComment", "doSymbol", "doWhitespace" ], this.pattern = "(" + i.join(")|(") + ")";
+var e = '"(?:\\\\"|[^"])*?"', t = "'(?:\\\\'|[^'])*?'", n = e + "|" + t, r = "\\b(?:" + this.keywords.join("|") + ")\\b", i = "[\\" + this.symbols.split("").join("\\") + "]", s = [];
+for (var o = 0, u; u = this.operators[o]; o++) s.push("\\" + u.split("").join("\\"));
+s = s.join("|"), i = s + "|" + i;
+var a = [ '\\\\"|\\\\/', n, r, "\\/\\/", "\\/\\*", i, "\\s" ];
+this.matchers = [ "doSymbol", "doString", "doKeyword", "doLineComment", "doCComment", "doSymbol", "doWhitespace" ], this.pattern = "(" + a.join(")|(") + ")";
},
analyze: function() {
-var a = new RegExp(this.pattern, "gi");
-while (this.search(a)) this.pushToken("identifier"), this.process(this.matchers), this.pushToken("identifier");
+var e = new RegExp(this.pattern, "gi");
+while (this.search(e)) this.pushToken("identifier"), this.process(this.matchers), this.pushToken("identifier");
},
-process: function(a) {
-for (var b = 0, c; c = a[b]; b++) if (this.m[b + 1] && this[c]) {
-this[c].apply(this);
+process: function(e) {
+for (var t = 0, n; n = e[t]; t++) if (this.m[t + 1] && this[n]) {
+this[n].apply(this);
return;
}
this.doSymbol();
@@ -1615,13 +1604,13 @@ this.tokenize(2);
},
doLiteral: function() {
this.tossToken(1);
-var a = this.d, b = new RegExp("\\" + a + "|\\\\", "g");
-while (this.search(b)) switch (this.d) {
+var e = this.d, t = new RegExp("\\" + e + "|\\\\", "g");
+while (this.search(t)) switch (this.d) {
case "\\":
this.doEscape();
break;
default:
-this.pushToken("literal", 0, !0).delimiter = a, this.tossToken(1);
+this.pushToken("literal", 0, !0).delimiter = e, this.tossToken(1);
return;
}
},
@@ -1636,8 +1625,8 @@ this.tokenize(2), this.search(/[\r\n]/g) && this.tokenize(0), this.pushToken("co
},
doCComment: function() {
this.tokenize(2);
-var a = 1;
-while (a && this.search(/\/\*|\*\//g)) a += this.d == "/" ? 1 : this.d == "*" ? -1 : 0, this.tokenize(2);
+var e = 1;
+while (e && this.search(/\/\*|\*\//g)) e += this.d == "/" ? 1 : this.d == "*" ? -1 : 0, this.tokenize(2);
this.pushToken("comment");
},
doString: function() {
@@ -1650,73 +1639,73 @@ this.pushToken("string", this.m[0].length);
enyo.kind({
name: "Parser",
kind: null,
-constructor: function(a) {
-return this.parse(a);
-},
-parse: function(a) {
-var b = [], c = new Iterator(a);
-while (c.next()) c.value.kind !== "ws" && b.push(c.value);
-var c = new Iterator(b);
-return this.walk(c);
-},
-combine: function(a) {
-var b = "";
-for (var c = 0, d; d = a[c]; c++) b += d.token;
-return b;
-},
-walk: function(a, b) {
-var c = [], d;
+constructor: function(e) {
+return this.parse(e);
+},
+parse: function(e) {
+var t = [], n = new Iterator(e);
+while (n.next()) n.value.kind !== "ws" && t.push(n.value);
+var n = new Iterator(t);
+return this.walk(n);
+},
+combine: function(e) {
+var t = "";
+for (var n = 0, r; r = e[n]; n++) t += r.token;
+return t;
+},
+walk: function(e, t) {
+var n = [], r;
try {
-while (a.next()) {
-d = a.value;
-if (d.kind == "ws") continue;
-if (d.kind == "comment") d.kind = "comment"; else if (b == "array") {
-if (d.kind == "terminal") continue;
-a.prev(), d = {
+while (e.next()) {
+r = e.value;
+if (r.kind == "ws") continue;
+if (r.kind == "comment") r.kind = "comment"; else if (t == "array") {
+if (r.kind == "terminal") continue;
+e.prev(), r = {
kind: "element",
token: "expr",
-children: this.walk(a, "expression")
+children: this.walk(e, "expression")
};
-if (a.value && a.value.token == "]") return c.push(d), c;
-} else if (d.token == "[") d.kind = "array", d.children = this.walk(a, d.kind); else {
-if (b == "expression" && d.token == "]") return c;
-if (d.token == "var") d.kind = "var", d.children = this.walk(a, "expression"); else {
-if (d.kind == "terminal" && (b == "expression" || b == "var")) return c;
-if (d.kind == "terminal") continue;
-if (d.token == "{") {
-d.kind = "block", d.children = this.walk(a, d.kind);
-if (b == "expression" || b == "function") return c.push(d), c;
+if (e.value && e.value.token == "]") return r.children.length && n.push(r), n;
+} else if (r.token == "[") r.kind = "array", r.children = this.walk(e, r.kind), e.value ? r.end = e.value.end : console.log("No end token for array?"); else {
+if (t == "expression" && r.token == "]") return n;
+if (r.token == "var") r.kind = "var", r.children = this.walk(e, "expression"); else {
+if (r.kind == "terminal" && (t == "expression" || t == "var")) return n;
+if (r.kind == "terminal") continue;
+if (r.token == "{") {
+r.kind = "block", r.children = this.walk(e, r.kind), e.value ? r.end = e.value.end : console.log("No end token for block?");
+if (t == "expression" || t == "function") return n.push(r), n;
} else {
-if (b == "expression" && (d.token == "}" || d.token == ")")) return a.prev(), c;
-if (b == "block" && d.token == "}") return c;
-if (d.token == "=" || d.token == ":" && b != "expression") {
-var e = c.pop();
-e.kind == "identifier" ? (e.op = d.token, e.kind = "assignment", e.children = this.walk(a, "expression"), a.value && a.value.kind == "terminal" && a.prev(), d = e) : c.push(e);
-} else if (d.token == "(") d.kind = "association", d.children = this.walk(a, d.kind); else {
-if (b == "association" && d.token == ")") return c;
-if (d.token == "function") {
-d.kind = "function", d.children = this.walk(a, d.kind);
-if (b !== "expression" && d.children && d.children.length && d.children[0].kind == "identifier") {
-d.name = d.children[0].token, d.children.shift();
-var f = {
+if (t == "expression" && (r.token == "}" || r.token == ")")) return e.prev(), n;
+if (t == "block" && r.token == "}") return n;
+if (r.token == "=" || r.token == ":" && t != "expression") {
+var i = n.pop();
+i.kind == "identifier" ? (i.op = r.token, i.kind = "assignment", i.children = this.walk(e, "expression"), e.value && e.value.kind == "terminal" && e.prev(), r = i) : n.push(i);
+} else if (r.token == "(") r.kind = "association", r.children = this.walk(e, r.kind); else {
+if (t == "association" && r.token == ")") return n;
+if (r.token == "function") {
+r.kind = "function", r.children = this.walk(e, r.kind);
+if (t !== "expression" && r.children && r.children.length && r.children[0].kind == "identifier") {
+r.name = r.children[0].token, r.children.shift();
+var s = {
kind: "assignment",
-token: d.name,
-children: [ d ]
+token: r.name,
+children: [ r ]
};
-d = f;
+r = s;
}
-if (b == "expression" || b == "function") return c.push(d), c;
+if (t == "expression" || t == "function") return n.push(r), n;
}
}
}
}
}
-c.push(d);
+n.push(r);
}
-} catch (g) {
-console.error(g);
+} catch (o) {
+console.error(o);
}
-return c;
+return n;
}
});
@@ -1726,148 +1715,148 @@ enyo.kind({
name: "Documentor",
kind: null,
group: "public",
-constructor: function(a) {
-return this.comment = [], this.parse(a);
-},
-parse: function(a) {
-var b = new Iterator(a);
-return this.walk(b);
-},
-walk: function(a, b) {
-var c = [], d, e;
-while (a.next()) {
-d = a.value;
-if (d.kind == "comment") this.cook_comment(d.token); else if (d.token == "enyo.kind" && a.future.kind == "association") e = this.cook_kind(a); else if (d.kind == "assignment") e = this.cook_assignment(a); else if (d.kind == "association" && d.children && d.children.length == 1 && d.children[0].kind == "function") {
-var f = d.children[0];
-if (f.children && f.children.length == 2) {
-var g = f.children[1], h = this.walk(new Iterator(g.children));
-c = c.concat(h);
-}
-a.next();
-}
-e && (c.push(e), e = null);
-}
-return c;
-},
-cook_kind: function(a) {
-var b = function(a, b) {
-var c = Documentor.indexByName(a, b), d;
-return c >= 0 && (d = a[c], a.splice(d, 1)), d && d.value && d.value.length && d.value[0].token;
-}, c = this.make("kind", a.value);
-a.next();
-var d = a.value.children;
-return d && d[0] && d[0].kind == "block" && (c.properties = this.cook_block(d[0].children), c.name = Documentor.stripQuotes(b(c.properties, "name") || ""), c.superkind = Documentor.stripQuotes(b(c.properties, "kind") || "enyo.Control"), c.superkind == "null" && (c.superkind = null)), c;
-},
-cook_block: function(a) {
-var b = [];
-for (var c = 0, d; d = a[c]; c++) if (d.kind == "comment") this.cook_comment(d.token); else if (d.kind == "assignment") {
-var e = this.make("property", d);
-d.children && (e.value = [ this.walkValue(new Iterator(d.children)) ]), b.push(e);
-}
-return b;
-},
-walkValue: function(a, b) {
-while (a.next()) {
-var c = a.value, d;
-if (c.kind != "comment") {
-if (c.kind == "block") return d = this.make("block", c), d.properties = this.cook_block(c.children), d;
-if (c.kind == "array") return this.cook_array(a);
-if (c.kind == "function") return this.cook_function(a);
-d = this.make("expression", c);
-var e = c.token;
-while (a.next()) e += a.value.token;
-return d.token = e, d;
-}
-this.cook_comment(c.token);
-}
-},
-cook_function: function(a) {
-var b = a.value, c = this.make("expression", b);
-return c.arguments = enyo.map(b.children[0].children, function(a) {
-return a.token;
-}), c;
-},
-cook_array: function(a) {
-var b = a.value, c = this.make("array", b), d = b.children;
-if (d) {
-var e = [];
-for (var f = 0, g, h; g = d[f]; f++) h = this.walkValue(new Iterator(g.children)), h && e.push(h);
-c.properties = e;
-}
-return c;
-},
-cook_assignment: function(a) {
-var b = a.value, c = this.make("global", b);
-return b.children && (b.children[0] && b.children[0].token == "function" && (c.type = "function"), c.value = [ this.walkValue(new Iterator(b.children)) ]), c;
-},
-make: function(a, b) {
+constructor: function(e) {
+return this.comment = [], this.parse(e);
+},
+parse: function(e) {
+var t = new Iterator(e);
+return this.walk(t);
+},
+walk: function(e, t) {
+var n = [], r, i;
+while (e.next()) {
+r = e.value;
+if (r.kind == "comment") this.cook_comment(r.token); else if (r.token == "enyo.kind" && e.future.kind == "association") i = this.cook_kind(e); else if (r.kind == "assignment") i = this.cook_assignment(e); else if (r.kind == "association" && r.children && r.children.length == 1 && r.children[0].kind == "function") {
+var s = r.children[0];
+if (s.children && s.children.length == 2) {
+var o = s.children[1], u = this.walk(new Iterator(o.children));
+n = n.concat(u);
+}
+e.next();
+}
+i && (n.push(i), i = null);
+}
+return n;
+},
+cook_kind: function(e) {
+var t = function(e, t) {
+var n = Documentor.indexByName(e, t), r;
+return n >= 0 && (r = e[n], e.splice(r, 1)), r && r.value && r.value.length && r.value[0].token;
+}, n = this.make("kind", e.value);
+e.next();
+var r = e.value.children;
+return r && r[0] && r[0].kind == "block" && (n.properties = this.cook_block(r[0].children), n.name = Documentor.stripQuotes(t(n.properties, "name") || ""), n.superkind = Documentor.stripQuotes(t(n.properties, "kind") || "enyo.Control"), n.superkind == "null" && (n.superkind = null)), n;
+},
+cook_block: function(e) {
+var t = [];
+for (var n = 0, r; r = e[n]; n++) if (r.kind == "comment") this.cook_comment(r.token); else if (r.kind == "assignment") {
+var i = this.make("property", r);
+r.children && (i.value = [ this.walkValue(new Iterator(r.children)) ]), t.push(i);
+}
+return t;
+},
+walkValue: function(e, t) {
+while (e.next()) {
+var n = e.value, r;
+if (n.kind != "comment") {
+if (n.kind == "block") return r = this.make("block", n), r.properties = this.cook_block(n.children), r;
+if (n.kind == "array") return this.cook_array(e);
+if (n.kind == "function") return this.cook_function(e);
+r = this.make("expression", n);
+var i = n.token;
+while (e.next()) i += e.value.token;
+return r.token = i, r;
+}
+this.cook_comment(n.token);
+}
+},
+cook_function: function(e) {
+var t = e.value, n = this.make("expression", t);
+return n.arguments = enyo.map(t.children[0].children, function(e) {
+return e.token;
+}), n;
+},
+cook_array: function(e) {
+var t = e.value, n = this.make("array", t), r = t.children;
+if (r) {
+var i = [];
+for (var s = 0, o, u; o = r[s]; s++) o.children && (u = this.walkValue(new Iterator(o.children)), u && i.push(u));
+n.properties = i;
+}
+return n;
+},
+cook_assignment: function(e) {
+var t = e.value, n = this.make("global", t);
+return t.children && (t.children[0] && t.children[0].token == "function" && (n.type = "function"), n.value = [ this.walkValue(new Iterator(t.children)) ]), n;
+},
+make: function(e, t) {
return {
-line: b.line,
-start: b.start,
-end: b.end,
-height: b.height,
-token: b.token,
-name: b.token,
-type: a,
+line: t.line,
+start: t.start,
+end: t.end,
+height: t.height,
+token: t.token,
+name: t.token,
+type: e,
group: this.group,
comment: this.consumeComment()
};
},
commentRx: /\/\*\*([\s\S]*)\*\/|\/\/\*(.*)/m,
-cook_comment: function(a) {
-var b = a.match(this.commentRx);
-if (b) {
-b = b[1] ? b[1] : b[2];
-var c = this.extractPragmas(b);
-this.honorPragmas(c);
-}
-},
-extractPragmas: function(a) {
-var b = /^[*\s]*@[\S\s]*/g, c = [], d = a;
-return d.length && (d = a.replace(b, function(a) {
-var b = a.slice(2);
-return c.push(b), "";
-}), d.length && this.comment.push(d)), c;
-},
-honorPragmas: function(a) {
-var b = {
+cook_comment: function(e) {
+var t = e.match(this.commentRx);
+if (t) {
+t = t[1] ? t[1] : t[2];
+var n = this.extractPragmas(t);
+this.honorPragmas(n);
+}
+},
+extractPragmas: function(e) {
+var t = /^[*\s]*@[\S\s]*/g, n = [], r = e;
+return r.length && (r = e.replace(t, function(e) {
+var t = e.slice(2);
+return n.push(t), "";
+}), r.length && this.comment.push(r)), n;
+},
+honorPragmas: function(e) {
+var t = {
"protected": 1,
"public": 1
};
-for (var c = 0, d; d = a[c]; c++) b[d] && (this.group = d);
+for (var n = 0, r; r = e[n]; n++) t[r] && (this.group = r);
},
consumeComment: function() {
-var a = this.comment.join(" ");
+var e = this.comment.join(" ");
this.comment = [];
-var b = Documentor.removeIndent(a);
-return b;
+var t = Documentor.removeIndent(e);
+return t;
},
statics: {
-indexByProperty: function(a, b, c) {
-for (var d = 0, e; e = a[d]; d++) if (e[b] == c) return d;
+indexByProperty: function(e, t, n) {
+for (var r = 0, i; i = e[r]; r++) if (i[t] == n) return r;
return -1;
},
-findByProperty: function(a, b, c) {
-return a[this.indexByProperty(a, b, c)];
+findByProperty: function(e, t, n) {
+return e[this.indexByProperty(e, t, n)];
},
-indexByName: function(a, b) {
-return this.indexByProperty(a, "name", b);
+indexByName: function(e, t) {
+return this.indexByProperty(e, "name", t);
},
-findByName: function(a, b) {
-return a[this.indexByName(a, b)];
+findByName: function(e, t) {
+return e[this.indexByName(e, t)];
},
-stripQuotes: function(a) {
-var b = a.charAt(0), c = b == '"' || b == "'" ? 1 : 0, d = a.charAt(a.length - 1), e = d == '"' || d == "'" ? -1 : 0;
-return c || e ? a.slice(c, e) : a;
+stripQuotes: function(e) {
+var t = e.charAt(0), n = t == '"' || t == "'" ? 1 : 0, r = e.charAt(e.length - 1), i = r == '"' || r == "'" ? -1 : 0;
+return n || i ? e.slice(n, i) : e;
},
-removeIndent: function(a) {
-var b = 0, c = a.split(/\r?\n/), d, e;
-for (d = 0; (e = c[d]) != null; d++) if (e.length > 0) {
-b = e.search(/\S/), b < 0 && (b = e.length);
+removeIndent: function(e) {
+var t = 0, n = e.split(/\r?\n/), r, i;
+for (r = 0; (i = n[r]) != null; r++) if (i.length > 0) {
+t = i.search(/\S/), t < 0 && (t = i.length);
break;
}
-if (b) for (d = 0; (e = c[d]) != null; d++) c[d] = e.slice(b);
-return c.join("\n");
+if (t) for (r = 0; (i = n[r]) != null; r++) n[r] = i.slice(t);
+return n.join("\n");
}
}
});
@@ -1881,95 +1870,97 @@ group: "public",
constructor: function() {
this.objects = [];
},
-findByName: function(a) {
-return Documentor.findByProperty(this.objects, "name", a);
+findByName: function(e) {
+return Documentor.findByProperty(this.objects, "name", e);
},
-findByTopic: function(a) {
-return Documentor.findByProperty(this.objects, "topic", a);
+findByTopic: function(e) {
+return Documentor.findByProperty(this.objects, "topic", e);
},
-addModules: function(a) {
-enyo.forEach(a, this.addModule, this), this.objects.sort(Indexer.nameCompare);
+addModules: function(e) {
+enyo.forEach(e, this.addModule, this), this.objects.sort(Indexer.nameCompare);
},
-addModule: function(a) {
-this.indexModule(a), this.mergeModule(a);
+addModule: function(e) {
+this.indexModule(e), this.mergeModule(e);
},
-mergeModule: function(a) {
-this.objects.push(a), this.objects = this.objects.concat(a.objects), enyo.forEach(a.objects, this.mergeProperties, this);
+mergeModule: function(e) {
+this.objects.push(e), this.objects = this.objects.concat(e.objects), enyo.forEach(e.objects, this.mergeProperties, this);
},
-mergeProperties: function(a) {
-a.properties ? this.objects = this.objects.concat(a.properties) : a.value && a.value[0] && a.value[0].properties && (this.objects = this.objects.concat(a.value[0].properties));
+mergeProperties: function(e) {
+e.properties ? this.objects = this.objects.concat(e.properties) : e.value && e.value[0] && e.value[0].properties && (this.objects = this.objects.concat(e.value[0].properties));
},
-indexModule: function(a) {
-a.type = "module", a.name = a.name || a.rawPath, a.objects = new Documentor(new Parser(new Lexer(a.code))), this.indexObjects(a);
+indexModule: function(e) {
+e.type = "module", e.name = e.name || e.rawPath, e.objects = new Documentor(new Parser(new Lexer(e.code))), this.indexObjects(e);
},
-indexObjects: function(a) {
-enyo.forEach(a.objects, function(b) {
-b.module = a, this.indexObject(b);
+indexObjects: function(e) {
+enyo.forEach(e.objects, function(t) {
+t.module = e, this.indexObject(t);
}, this);
},
-indexObject: function(a) {
-switch (a.type) {
+indexObject: function(e) {
+switch (e.type) {
case "kind":
-this.indexKind(a);
+this.indexKind(e);
}
-this.indexProperties(a);
+this.indexProperties(e);
},
-indexProperties: function(a) {
-var b = a.properties || a.value && a.value[0] && a.value[0].properties;
-enyo.forEach(b, function(b) {
-b.object = a, b.topic = b.object.name ? b.object.name + "::" + b.name : b.name;
+indexProperties: function(e) {
+var t = e.properties || e.value && e.value[0] && e.value[0].properties;
+enyo.forEach(t, function(t) {
+t.object = e, t.topic = t.object.name ? t.object.name + "::" + t.name : t.name;
}, this);
},
-indexKind: function(a) {
-this.listComponents(a), this.indexInheritance(a);
+indexKind: function(e) {
+this.listComponents(e), this.indexInheritance(e);
},
-indexInheritance: function(a) {
-a.superkinds = this.listSuperkinds(a), a.allProperties = this.listInheritedProperties(a);
+indexInheritance: function(e) {
+e.superkinds = this.listSuperkinds(e), e.allProperties = this.listInheritedProperties(e);
},
-listSuperkinds: function(a) {
-var b = [], c;
-while (a && a.superkind) c = a.superkind, a = this.findByName(c), a || (a = this.findByName("enyo." + c), a && (c = "enyo." + c)), b.push(c);
-return b;
+listSuperkinds: function(e) {
+var t = [], n;
+while (e && e.superkind) n = e.superkind, e = this.findByName(n), e || (e = this.findByName("enyo." + n), e && (n = "enyo." + n)), t.push(n);
+return t;
},
-listInheritedProperties: function(a) {
-var b = [], c = {};
-for (var d = a.superkinds.length - 1, e; e = a.superkinds[d]; d--) {
-var f = this.findByName(e);
-f && this.mergeInheritedProperties(f.properties, c, b);
+listInheritedProperties: function(e) {
+var t = [], n = {};
+for (var r = e.superkinds.length - 1, i; i = e.superkinds[r]; r--) {
+var s = this.findByName(i);
+s && this.mergeInheritedProperties(s.properties, n, t);
}
-return this.mergeInheritedProperties(a.properties, c, b), b.sort(Indexer.nameCompare), b;
+return this.mergeInheritedProperties(e.properties, n, t), t.sort(Indexer.nameCompare), t;
},
-mergeInheritedProperties: function(a, b, c) {
-for (var d = 0, e; e = a[d]; d++) {
-var f = b.hasOwnProperty(e.name) && b[e.name];
-f ? (e.overrides = f, c[enyo.indexOf(f, c)] = e) : c.push(e), b[e.name] = e;
+mergeInheritedProperties: function(e, t, n) {
+for (var r = 0, i; i = e[r]; r++) {
+var s = t.hasOwnProperty(i.name) && t[i.name];
+s ? (i.overrides = s, n[enyo.indexOf(s, n)] = i) : n.push(i), t[i.name] = i;
}
},
-listComponents: function(a) {
-a.components = this._listComponents(a, [], {});
+listComponents: function(e) {
+e.components = this._listComponents(e, [], {});
+var t = Documentor.findByName(e.properties, "components");
+t && t.value && (e.componentsBlockStart = t.value[0].start, e.componentsBlockEnd = t.value[0].end);
},
-_listComponents: function(a, b, c) {
-var d = Documentor.findByName(a.properties, "components");
-if (d && d.value && d.value.length) {
-var e = d.value[0].properties;
-for (var f = 0, g; g = e[f]; f++) {
-var h = Documentor.findByName(g.properties, "name");
-h && (h = Documentor.stripQuotes(h.value[0].token || ""));
-var i = Documentor.findByName(g.properties, "kind");
-i = Documentor.stripQuotes(i && i.value[0].token || "Control");
-if (!h) {
-var j = i.split(".").pop();
-h = enyo.uncap(j), c[h] ? h += ++c[h] : c[h] = 1;
+_listComponents: function(e, t, n) {
+var r = Documentor.findByName(e.properties, "components");
+if (r && r.value && r.value.length) {
+var i = r.value[0].properties;
+for (var s = 0, o; o = i[s]; s++) {
+var u = Documentor.findByName(o.properties, "name");
+u && (u = Documentor.stripQuotes(u.value[0].token || ""));
+var a = Documentor.findByName(o.properties, "kind");
+a = Documentor.stripQuotes(a && a.value[0].token || "Control");
+if (!u) {
+var f = a.split(".").pop();
+u = enyo.uncap(f), n[u] ? u += ++n[u] : n[u] = 1;
}
-g.kind = i, g.name = h, b.push(g), this._listComponents(g, b, c);
+o.kind = a, o.name = u, t.push(o), this._listComponents(o, t, n);
}
}
-return b;
+return t;
},
statics: {
-nameCompare: function(a, b) {
-var c = a.name.toLowerCase(), d = b.name.toLowerCase();
-return c < d ? -1 : c > d ? 1 : 0;
+nameCompare: function(e, t) {
+var n = e.name.toLowerCase(), r = t.name.toLowerCase();
+return n < r ? -1 : n > r ? 1 : 0;
}
}
});
@@ -1985,32 +1976,32 @@ onIndexReady: ""
create: function() {
this.index = new Indexer, this.inherited(arguments);
},
-analyze: function(a) {
-this.walk(a);
+analyze: function(e) {
+this.walk(e);
},
-walk: function(a) {
-var b = [], c, d = function(e, f) {
-if (f) {
-for (var g = 0; g < f.modules.length; ++g) f.modules[g].label = c;
-b = b.concat(f.modules);
+walk: function(e) {
+var t = [], n, r = function(i, s) {
+if (s) {
+for (var o = 0; o < s.modules.length; ++o) s.modules[o].label = n;
+t = t.concat(s.modules);
}
-var h = a.shift(), i = "";
-h ? (enyo.isString(h) || (c = h.label, h = h.path), (new Walker).walk(h).response(this, d)) : this.walkFinished(b);
+var u = e.shift(), a = "";
+u ? (enyo.isString(u) || (n = u.label, u = u.path), (new Walker).walk(u).response(this, r)) : this.walkFinished(t);
};
-d.call(this);
+r.call(this);
},
-walkFinished: function(a) {
-this.read(a);
+walkFinished: function(e) {
+this.read(e);
},
-read: function(a) {
+read: function(e) {
(new Reader).go({
-modules: a
-}).response(this, function(a, b) {
-this.indexModules(b.modules);
+modules: e
+}).response(this, function(e, t) {
+this.indexModules(t.modules);
});
},
-indexModules: function(a) {
-this.index.addModules(a), this.doIndexReady();
+indexModules: function(e) {
+this.index.addModules(e), this.doIndexReady();
}
});
@@ -2019,175 +2010,175 @@ this.index.addModules(a), this.doIndexReady();
var Showdown = {};
Showdown.converter = function() {
-var a, b, c, d = 0;
-this.makeHtml = function(d) {
-return a = new Array, b = new Array, c = new Array, d = d.replace(/~/g, "~T"), d = d.replace(/\$/g, "~D"), d = d.replace(/\r\n/g, "\n"), d = d.replace(/\r/g, "\n"), d = "\n\n" + d + "\n\n", d = E(d), d = d.replace(/^[ \t]+$/mg, ""), d = f(d), d = e(d), d = h(d), d = C(d), d = d.replace(/~D/g, "$$"), d = d.replace(/~T/g, "~"), d;
+var e, t, n, r = 0;
+this.makeHtml = function(r) {
+return e = new Array, t = new Array, n = new Array, r = r.replace(/~/g, "~T"), r = r.replace(/\$/g, "~D"), r = r.replace(/\r\n/g, "\n"), r = r.replace(/\r/g, "\n"), r = "\n\n" + r + "\n\n", r = O(r), r = r.replace(/^[ \t]+$/mg, ""), r = s(r), r = i(r), r = u(r), r = L(r), r = r.replace(/~D/g, "$$"), r = r.replace(/~T/g, "~"), r;
};
-var e = function(c) {
-var c = c.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm, function(c, d, e, f, g) {
-return d = d.toLowerCase(), a[d] = y(e), f ? f + g : (g && (b[d] = g.replace(/"/g, "&quot;")), "");
+var i = function(n) {
+var n = n.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|\Z)/gm, function(n, r, i, s, o) {
+return r = r.toLowerCase(), e[r] = T(i), s ? s + o : (o && (t[r] = o.replace(/"/g, "&quot;")), "");
});
-return c;
-}, f = function(a) {
-a = a.replace(/\n/g, "\n\n");
-var b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del", c = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math";
-return a = a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm, g), a = a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm, g), a = a.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, g), a = a.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g, g), a = a.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, g), a = a.replace(/\n\n/g, "\n"), a;
-}, g = function(a, b) {
-var d = b;
-return d = d.replace(/\n\n/g, "\n"), d = d.replace(/^\n/, ""), d = d.replace(/\n+$/g, ""), d = "\n\n~K" + (c.push(d) - 1) + "K\n\n", d;
-}, h = function(a) {
-a = o(a);
-var b = s("<hr />");
-return a = a.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, b), a = a.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm, b), a = a.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm, b), a = q(a), a = r(a), a = w(a), a = f(a), a = x(a), a;
-}, i = function(a) {
-return a = t(a), a = j(a), a = z(a), a = m(a), a = k(a), a = A(a), a = y(a), a = v(a), a = a.replace(/ +\n/g, " <br />\n"), a;
-}, j = function(a) {
-var b = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;
-return a = a.replace(b, function(a) {
-var b = a.replace(/(.)<\/?code>(?=.)/g, "$1`");
-return b = F(b, "\\`*_"), b;
-}), a;
-}, k = function(a) {
-return a = a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, l), a = a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, l), a = a.replace(/(\[([^\[\]]+)\])()()()()()/g, l), a;
-}, l = function(c, d, e, f, g, h, i, j) {
-j == undefined && (j = "");
-var k = d, l = e, m = f.toLowerCase(), n = g, o = j;
-if (n == "") {
-m == "" && (m = l.toLowerCase().replace(/ ?\n/g, " ")), n = "#" + m;
-if (a[m] != undefined) n = a[m], b[m] != undefined && (o = b[m]); else {
-if (!(k.search(/\(\s*\)$/m) > -1)) return k;
-n = "";
-}
-}
-n = F(n, "*_");
-var p = '<a href="' + n + '"';
-return o != "" && (o = o.replace(/"/g, "&quot;"), o = F(o, "*_"), p += ' title="' + o + '"'), p += ">" + l + "</a>", p;
-}, m = function(a) {
-return a = a.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, n), a = a.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, n), a;
-}, n = function(c, d, e, f, g, h, i, j) {
-var k = d, l = e, m = f.toLowerCase(), n = g, o = j;
-o || (o = "");
-if (n == "") {
-m == "" && (m = l.toLowerCase().replace(/ ?\n/g, " ")), n = "#" + m;
-if (a[m] == undefined) return k;
-n = a[m], b[m] != undefined && (o = b[m]);
-}
-l = l.replace(/"/g, "&quot;"), n = F(n, "*_");
-var p = '<img src="' + n + '" alt="' + l + '"';
-return o = o.replace(/"/g, "&quot;"), o = F(o, "*_"), p += ' title="' + o + '"', p += " />", p;
-}, o = function(a) {
-return a = a.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm, function(a, b) {
-return s("<h1>" + i(b) + "</h1>");
-}), a = a.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm, function(a, b) {
-return s("<h2>" + i(b) + "</h2>");
-}), a = a.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm, function(a, b, c) {
-var d = b.length;
-return s("<h" + d + ">" + i(c) + "</h" + d + ">");
-}), a;
-}, p, q = function(a) {
-a += "~0";
-var b = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
-return d ? a = a.replace(b, function(a, b, c) {
-var d = b, e = c.search(/[*+-]/g) > -1 ? "ul" : "ol";
-d = d.replace(/\n{2,}/g, "\n\n\n");
-var f = p(d);
-return f = f.replace(/\s+$/, ""), f = "<" + e + ">" + f + "</" + e + ">\n", f;
-}) : (b = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g, a = a.replace(b, function(a, b, c, d) {
-var e = b, f = c, g = d.search(/[*+-]/g) > -1 ? "ul" : "ol", f = f.replace(/\n{2,}/g, "\n\n\n"), h = p(f);
-return h = e + "<" + g + ">\n" + h + "</" + g + ">\n", h;
-})), a = a.replace(/~0/, ""), a;
+return n;
+}, s = function(e) {
+e = e.replace(/\n/g, "\n\n");
+var t = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del", n = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math";
+return e = e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm, o), e = e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm, o), e = e.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, o), e = e.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g, o), e = e.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, o), e = e.replace(/\n\n/g, "\n"), e;
+}, o = function(e, t) {
+var r = t;
+return r = r.replace(/\n\n/g, "\n"), r = r.replace(/^\n/, ""), r = r.replace(/\n+$/g, ""), r = "\n\n~K" + (n.push(r) - 1) + "K\n\n", r;
+}, u = function(e) {
+e = d(e);
+var t = y("<hr />");
+return e = e.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, t), e = e.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm, t), e = e.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm, t), e = m(e), e = g(e), e = S(e), e = s(e), e = x(e), e;
+}, a = function(e) {
+return e = b(e), e = f(e), e = N(e), e = h(e), e = l(e), e = C(e), e = T(e), e = E(e), e = e.replace(/ +\n/g, " <br />\n"), e;
+}, f = function(e) {
+var t = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;
+return e = e.replace(t, function(e) {
+var t = e.replace(/(.)<\/?code>(?=.)/g, "$1`");
+return t = M(t, "\\`*_"), t;
+}), e;
+}, l = function(e) {
+return e = e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, c), e = e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, c), e = e.replace(/(\[([^\[\]]+)\])()()()()()/g, c), e;
+}, c = function(n, r, i, s, o, u, a, f) {
+f == undefined && (f = "");
+var l = r, c = i, h = s.toLowerCase(), p = o, d = f;
+if (p == "") {
+h == "" && (h = c.toLowerCase().replace(/ ?\n/g, " ")), p = "#" + h;
+if (e[h] != undefined) p = e[h], t[h] != undefined && (d = t[h]); else {
+if (!(l.search(/\(\s*\)$/m) > -1)) return l;
+p = "";
+}
+}
+p = M(p, "*_");
+var v = '<a href="' + p + '"';
+return d != "" && (d = d.replace(/"/g, "&quot;"), d = M(d, "*_"), v += ' title="' + d + '"'), v += ">" + c + "</a>", v;
+}, h = function(e) {
+return e = e.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, p), e = e.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, p), e;
+}, p = function(n, r, i, s, o, u, a, f) {
+var l = r, c = i, h = s.toLowerCase(), p = o, d = f;
+d || (d = "");
+if (p == "") {
+h == "" && (h = c.toLowerCase().replace(/ ?\n/g, " ")), p = "#" + h;
+if (e[h] == undefined) return l;
+p = e[h], t[h] != undefined && (d = t[h]);
+}
+c = c.replace(/"/g, "&quot;"), p = M(p, "*_");
+var v = '<img src="' + p + '" alt="' + c + '"';
+return d = d.replace(/"/g, "&quot;"), d = M(d, "*_"), v += ' title="' + d + '"', v += " />", v;
+}, d = function(e) {
+return e = e.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm, function(e, t) {
+return y("<h1>" + a(t) + "</h1>");
+}), e = e.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm, function(e, t) {
+return y("<h2>" + a(t) + "</h2>");
+}), e = e.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm, function(e, t, n) {
+var r = t.length;
+return y("<h" + r + ">" + a(n) + "</h" + r + ">");
+}), e;
+}, v, m = function(e) {
+e += "~0";
+var t = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
+return r ? e = e.replace(t, function(e, t, n) {
+var r = t, i = n.search(/[*+-]/g) > -1 ? "ul" : "ol";
+r = r.replace(/\n{2,}/g, "\n\n\n");
+var s = v(r);
+return s = s.replace(/\s+$/, ""), s = "<" + i + ">" + s + "</" + i + ">\n", s;
+}) : (t = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g, e = e.replace(t, function(e, t, n, r) {
+var i = t, s = n, o = r.search(/[*+-]/g) > -1 ? "ul" : "ol", s = s.replace(/\n{2,}/g, "\n\n\n"), u = v(s);
+return u = i + "<" + o + ">\n" + u + "</" + o + ">\n", u;
+})), e = e.replace(/~0/, ""), e;
};
-p = function(a) {
-return d++, a = a.replace(/\n{2,}$/, "\n"), a += "~0", a = a.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm, function(a, b, c, d, e) {
-var f = e, g = b, j = c;
-return g || f.search(/\n{2,}/) > -1 ? f = h(D(f)) : (f = q(D(f)), f = f.replace(/\n$/, ""), f = i(f)), "<li>" + f + "</li>\n";
-}), a = a.replace(/~0/g, ""), d--, a;
+v = function(e) {
+return r++, e = e.replace(/\n{2,}$/, "\n"), e += "~0", e = e.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm, function(e, t, n, r, i) {
+var s = i, o = t, f = n;
+return o || s.search(/\n{2,}/) > -1 ? s = u(A(s)) : (s = m(A(s)), s = s.replace(/\n$/, ""), s = a(s)), "<li>" + s + "</li>\n";
+}), e = e.replace(/~0/g, ""), r--, e;
};
-var r = function(a) {
-return a += "~0", a = a.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g, function(a, b, c) {
-var d = b, e = c;
-return d = u(D(d)), d = E(d), d = d.replace(/^\n+/g, ""), d = d.replace(/\n+$/g, ""), d = "<pre><code>" + d + "\n</code></pre>", s(d) + e;
-}), a = a.replace(/~0/, ""), a;
-}, s = function(a) {
-return a = a.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (c.push(a) - 1) + "K\n\n";
-}, t = function(a) {
-return a = a.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(a, b, c, d, e) {
-var f = d;
-return f = f.replace(/^([ \t]*)/g, ""), f = f.replace(/[ \t]*$/g, ""), f = u(f), b + "<code>" + f + "</code>";
-}), a;
-}, u = function(a) {
-return a = a.replace(/&/g, "&amp;"), a = a.replace(/</g, "&lt;"), a = a.replace(/>/g, "&gt;"), a = F(a, "*_{}[]\\", !1), a;
-}, v = function(a) {
-return a = a.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, "<strong>$2</strong>"), a = a.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, "<em>$2</em>"), a;
-}, w = function(a) {
-return a = a.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm, function(a, b) {
-var c = b;
-return c = c.replace(/^[ \t]*>[ \t]?/gm, "~0"), c = c.replace(/~0/g, ""), c = c.replace(/^[ \t]+$/gm, ""), c = h(c), c = c.replace(/(^|\n)/g, "$1 "), c = c.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm, function(a, b) {
-var c = b;
-return c = c.replace(/^ /mg, "~0"), c = c.replace(/~0/g, ""), c;
-}), s("<blockquote>\n" + c + "\n</blockquote>");
-}), a;
-}, x = function(a) {
-a = a.replace(/^\n+/g, ""), a = a.replace(/\n+$/g, "");
-var b = a.split(/\n{2,}/g), d = new Array, e = b.length;
-for (var f = 0; f < e; f++) {
-var g = b[f];
-g.search(/~K(\d+)K/g) >= 0 ? d.push(g) : g.search(/\S/) >= 0 && (g = i(g), g = g.replace(/^([ \t]*)/g, "<p>"), g += "</p>", d.push(g));
-}
-e = d.length;
-for (var f = 0; f < e; f++) while (d[f].search(/~K(\d+)K/) >= 0) {
-var h = c[RegExp.$1];
-h = h.replace(/\$/g, "$$$$"), d[f] = d[f].replace(/~K\d+K/, h);
-}
-return d.join("\n\n");
-}, y = function(a) {
-return a = a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&amp;"), a = a.replace(/<(?![a-z\/?\$!])/gi, "&lt;"), a;
-}, z = function(a) {
-return a = a.replace(/\\(\\)/g, G), a = a.replace(/\\([`*_{}\[\]()>#+-.!])/g, G), a;
-}, A = function(a) {
-return a = a.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi, '<a href="$1">$1</a>'), a = a.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi, function(a, b) {
-return B(C(b));
-}), a;
-}, B = function(a) {
-function b(a) {
-var b = "0123456789ABCDEF", c = a.charCodeAt(0);
-return b.charAt(c >> 4) + b.charAt(c & 15);
-}
-var c = [ function(a) {
-return "&#" + a.charCodeAt(0) + ";";
-}, function(a) {
-return "&#x" + b(a) + ";";
-}, function(a) {
-return a;
+var g = function(e) {
+return e += "~0", e = e.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g, function(e, t, n) {
+var r = t, i = n;
+return r = w(A(r)), r = O(r), r = r.replace(/^\n+/g, ""), r = r.replace(/\n+$/g, ""), r = "<pre><code>" + r + "\n</code></pre>", y(r) + i;
+}), e = e.replace(/~0/, ""), e;
+}, y = function(e) {
+return e = e.replace(/(^\n+|\n+$)/g, ""), "\n\n~K" + (n.push(e) - 1) + "K\n\n";
+}, b = function(e) {
+return e = e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(e, t, n, r, i) {
+var s = r;
+return s = s.replace(/^([ \t]*)/g, ""), s = s.replace(/[ \t]*$/g, ""), s = w(s), t + "<code>" + s + "</code>";
+}), e;
+}, w = function(e) {
+return e = e.replace(/&/g, "&amp;"), e = e.replace(/</g, "&lt;"), e = e.replace(/>/g, "&gt;"), e = M(e, "*_{}[]\\", !1), e;
+}, E = function(e) {
+return e = e.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g, "<strong>$2</strong>"), e = e.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g, "<em>$2</em>"), e;
+}, S = function(e) {
+return e = e.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm, function(e, t) {
+var n = t;
+return n = n.replace(/^[ \t]*>[ \t]?/gm, "~0"), n = n.replace(/~0/g, ""), n = n.replace(/^[ \t]+$/gm, ""), n = u(n), n = n.replace(/(^|\n)/g, "$1 "), n = n.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm, function(e, t) {
+var n = t;
+return n = n.replace(/^ /mg, "~0"), n = n.replace(/~0/g, ""), n;
+}), y("<blockquote>\n" + n + "\n</blockquote>");
+}), e;
+}, x = function(e) {
+e = e.replace(/^\n+/g, ""), e = e.replace(/\n+$/g, "");
+var t = e.split(/\n{2,}/g), r = new Array, i = t.length;
+for (var s = 0; s < i; s++) {
+var o = t[s];
+o.search(/~K(\d+)K/g) >= 0 ? r.push(o) : o.search(/\S/) >= 0 && (o = a(o), o = o.replace(/^([ \t]*)/g, "<p>"), o += "</p>", r.push(o));
+}
+i = r.length;
+for (var s = 0; s < i; s++) while (r[s].search(/~K(\d+)K/) >= 0) {
+var u = n[RegExp.$1];
+u = u.replace(/\$/g, "$$$$"), r[s] = r[s].replace(/~K\d+K/, u);
+}
+return r.join("\n\n");
+}, T = function(e) {
+return e = e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&amp;"), e = e.replace(/<(?![a-z\/?\$!])/gi, "&lt;"), e;
+}, N = function(e) {
+return e = e.replace(/\\(\\)/g, _), e = e.replace(/\\([`*_{}\[\]()>#+-.!])/g, _), e;
+}, C = function(e) {
+return e = e.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi, '<a href="$1">$1</a>'), e = e.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi, function(e, t) {
+return k(L(t));
+}), e;
+}, k = function(e) {
+function t(e) {
+var t = "0123456789ABCDEF", n = e.charCodeAt(0);
+return t.charAt(n >> 4) + t.charAt(n & 15);
+}
+var n = [ function(e) {
+return "&#" + e.charCodeAt(0) + ";";
+}, function(e) {
+return "&#x" + t(e) + ";";
+}, function(e) {
+return e;
} ];
-return a = "mailto:" + a, a = a.replace(/./g, function(a) {
-if (a == "@") a = c[Math.floor(Math.random() * 2)](a); else if (a != ":") {
-var b = Math.random();
-a = b > .9 ? c[2](a) : b > .45 ? c[1](a) : c[0](a);
-}
-return a;
-}), a = '<a href="' + a + '">' + a + "</a>", a = a.replace(/">.+:/g, '">'), a;
-}, C = function(a) {
-return a = a.replace(/~E(\d+)E/g, function(a, b) {
-var c = parseInt(b);
-return String.fromCharCode(c);
-}), a;
-}, D = function(a) {
-return a = a.replace(/^(\t|[ ]{1,4})/gm, "~0"), a = a.replace(/~0/g, ""), a;
-}, E = function(a) {
-return a = a.replace(/\t(?=\t)/g, " "), a = a.replace(/\t/g, "~A~B"), a = a.replace(/~B(.+?)~A/g, function(a, b, c) {
-var d = b, e = 4 - d.length % 4;
-for (var f = 0; f < e; f++) d += " ";
-return d;
-}), a = a.replace(/~A/g, " "), a = a.replace(/~B/g, ""), a;
-}, F = function(a, b, c) {
-var d = "([" + b.replace(/([\[\]\\])/g, "\\$1") + "])";
-c && (d = "\\\\" + d);
-var e = new RegExp(d, "g");
-return a = a.replace(e, G), a;
-}, G = function(a, b) {
-var c = b.charCodeAt(0);
-return "~E" + c + "E";
+return e = "mailto:" + e, e = e.replace(/./g, function(e) {
+if (e == "@") e = n[Math.floor(Math.random() * 2)](e); else if (e != ":") {
+var t = Math.random();
+e = t > .9 ? n[2](e) : t > .45 ? n[1](e) : n[0](e);
+}
+return e;
+}), e = '<a href="' + e + '">' + e + "</a>", e = e.replace(/">.+:/g, '">'), e;
+}, L = function(e) {
+return e = e.replace(/~E(\d+)E/g, function(e, t) {
+var n = parseInt(t);
+return String.fromCharCode(n);
+}), e;
+}, A = function(e) {
+return e = e.replace(/^(\t|[ ]{1,4})/gm, "~0"), e = e.replace(/~0/g, ""), e;
+}, O = function(e) {
+return e = e.replace(/\t(?=\t)/g, " "), e = e.replace(/\t/g, "~A~B"), e = e.replace(/~B(.+?)~A/g, function(e, t, n) {
+var r = t, i = 4 - r.length % 4;
+for (var s = 0; s < i; s++) r += " ";
+return r;
+}), e = e.replace(/~A/g, " "), e = e.replace(/~B/g, ""), e;
+}, M = function(e, t, n) {
+var r = "([" + t.replace(/([\[\]\\])/g, "\\$1") + "])";
+n && (r = "\\\\" + r);
+var i = new RegExp(r, "g");
+return e = e.replace(i, _), e;
+}, _ = function(e, t) {
+var n = t.charCodeAt(0);
+return "~E" + n + "E";
};
};
@@ -2198,208 +2189,208 @@ var XRegExp;
if (XRegExp) throw Error("can't load XRegExp twice in the same frame");
(function() {
-function a(a, c) {
-if (!XRegExp.isRegExp(a)) throw TypeError("type RegExp expected");
-var d = a._xregexp;
-return a = XRegExp(a.source, b(a) + (c || "")), d && (a._xregexp = {
-source: d.source,
-captureNames: d.captureNames ? d.captureNames.slice(0) : null
-}), a;
-}
-function b(a) {
-return (a.global ? "g" : "") + (a.ignoreCase ? "i" : "") + (a.multiline ? "m" : "") + (a.extended ? "x" : "") + (a.sticky ? "y" : "");
-}
-function c(a, b, c, d) {
-var e = i.length, f, g, j;
-h = !0;
+function e(e, n) {
+if (!XRegExp.isRegExp(e)) throw TypeError("type RegExp expected");
+var r = e._xregexp;
+return e = XRegExp(e.source, t(e) + (n || "")), r && (e._xregexp = {
+source: r.source,
+captureNames: r.captureNames ? r.captureNames.slice(0) : null
+}), e;
+}
+function t(e) {
+return (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.extended ? "x" : "") + (e.sticky ? "y" : "");
+}
+function n(e, t, n, r) {
+var i = a.length, s, o, f;
+u = !0;
try {
-while (e--) {
-j = i[e];
-if (c & j.scope && (!j.trigger || j.trigger.call(d))) {
-j.pattern.lastIndex = b, g = j.pattern.exec(a);
-if (g && g.index === b) {
-f = {
-output: j.handler.call(d, g, c),
-match: g
+while (i--) {
+f = a[i];
+if (n & f.scope && (!f.trigger || f.trigger.call(r))) {
+f.pattern.lastIndex = t, o = f.pattern.exec(e);
+if (o && o.index === t) {
+s = {
+output: f.handler.call(r, o, n),
+match: o
};
break;
}
}
}
-} catch (k) {
-throw k;
+} catch (l) {
+throw l;
} finally {
-h = !1;
+u = !1;
}
-return f;
+return s;
}
-function d(a, b, c) {
-if (Array.prototype.indexOf) return a.indexOf(b, c);
-for (var d = c || 0; d < a.length; d++) if (a[d] === b) return d;
+function r(e, t, n) {
+if (Array.prototype.indexOf) return e.indexOf(t, n);
+for (var r = n || 0; r < e.length; r++) if (e[r] === t) return r;
return -1;
}
-XRegExp = function(b, d) {
-var e = [], g = XRegExp.OUTSIDE_CLASS, i = 0, k, l, m, n, p;
-if (XRegExp.isRegExp(b)) {
-if (d !== undefined) throw TypeError("can't supply flags when constructing one RegExp from another");
-return a(b);
+XRegExp = function(t, r) {
+var i = [], o = XRegExp.OUTSIDE_CLASS, a = 0, l, c, h, p, v;
+if (XRegExp.isRegExp(t)) {
+if (r !== undefined) throw TypeError("can't supply flags when constructing one RegExp from another");
+return e(t);
}
-if (h) throw Error("can't call the XRegExp constructor within token definition functions");
-d = d || "", k = {
+if (u) throw Error("can't call the XRegExp constructor within token definition functions");
+r = r || "", l = {
hasNamedCapture: !1,
captureNames: [],
-hasFlag: function(a) {
-return d.indexOf(a) > -1;
+hasFlag: function(e) {
+return r.indexOf(e) > -1;
},
-setFlag: function(a) {
-d += a;
+setFlag: function(e) {
+r += e;
}
};
-while (i < b.length) l = c(b, i, g, k), l ? (e.push(l.output), i += l.match[0].length || 1) : (m = j.exec.call(o[g], b.slice(i))) ? (e.push(m[0]), i += m[0].length) : (n = b.charAt(i), n === "[" ? g = XRegExp.INSIDE_CLASS : n === "]" && (g = XRegExp.OUTSIDE_CLASS), e.push(n), i++);
-return p = RegExp(e.join(""), j.replace.call(d, f, "")), p._xregexp = {
-source: b,
-captureNames: k.hasNamedCapture ? k.captureNames : null
-}, p;
+while (a < t.length) c = n(t, a, o, l), c ? (i.push(c.output), a += c.match[0].length || 1) : (h = f.exec.call(d[o], t.slice(a))) ? (i.push(h[0]), a += h[0].length) : (p = t.charAt(a), p === "[" ? o = XRegExp.INSIDE_CLASS : p === "]" && (o = XRegExp.OUTSIDE_CLASS), i.push(p), a++);
+return v = RegExp(i.join(""), f.replace.call(r, s, "")), v._xregexp = {
+source: t,
+captureNames: l.hasNamedCapture ? l.captureNames : null
+}, v;
}, XRegExp.version = "1.5.0", XRegExp.INSIDE_CLASS = 1, XRegExp.OUTSIDE_CLASS = 2;
-var e = /\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g, f = /[^gimy]+|([\s\S])(?=[\s\S]*\1)/g, g = /^(?:[?*+]|{\d+(?:,\d*)?})\??/, h = !1, i = [], j = {
+var i = /\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g, s = /[^gimy]+|([\s\S])(?=[\s\S]*\1)/g, o = /^(?:[?*+]|{\d+(?:,\d*)?})\??/, u = !1, a = [], f = {
exec: RegExp.prototype.exec,
test: RegExp.prototype.test,
match: String.prototype.match,
replace: String.prototype.replace,
split: String.prototype.split
-}, k = j.exec.call(/()??/, "")[1] === undefined, l = function() {
-var a = /^/g;
-return j.test.call(a, ""), !a.lastIndex;
-}(), m = function() {
-var a = /x/g;
-return j.replace.call("x", a, ""), !a.lastIndex;
-}(), n = RegExp.prototype.sticky !== undefined, o = {};
-o[XRegExp.INSIDE_CLASS] = /^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/, o[XRegExp.OUTSIDE_CLASS] = /^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/, XRegExp.addToken = function(b, c, d, e) {
-i.push({
-pattern: a(b, "g" + (n ? "y" : "")),
-handler: c,
-scope: d || XRegExp.OUTSIDE_CLASS,
-trigger: e || null
+}, l = f.exec.call(/()??/, "")[1] === undefined, c = function() {
+var e = /^/g;
+return f.test.call(e, ""), !e.lastIndex;
+}(), h = function() {
+var e = /x/g;
+return f.replace.call("x", e, ""), !e.lastIndex;
+}(), p = RegExp.prototype.sticky !== undefined, d = {};
+d[XRegExp.INSIDE_CLASS] = /^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/, d[XRegExp.OUTSIDE_CLASS] = /^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/, XRegExp.addToken = function(t, n, r, i) {
+a.push({
+pattern: e(t, "g" + (p ? "y" : "")),
+handler: n,
+scope: r || XRegExp.OUTSIDE_CLASS,
+trigger: i || null
});
-}, XRegExp.cache = function(a, b) {
-var c = a + "/" + (b || "");
-return XRegExp.cache[c] || (XRegExp.cache[c] = XRegExp(a, b));
-}, XRegExp.copyAsGlobal = function(b) {
-return a(b, "g");
-}, XRegExp.escape = function(a) {
-return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
-}, XRegExp.execAt = function(b, c, d, e) {
-c = a(c, "g" + (e && n ? "y" : "")), c.lastIndex = d = d || 0;
-var f = c.exec(b);
-return e ? f && f.index === d ? f : null : f;
+}, XRegExp.cache = function(e, t) {
+var n = e + "/" + (t || "");
+return XRegExp.cache[n] || (XRegExp.cache[n] = XRegExp(e, t));
+}, XRegExp.copyAsGlobal = function(t) {
+return e(t, "g");
+}, XRegExp.escape = function(e) {
+return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+}, XRegExp.execAt = function(t, n, r, i) {
+n = e(n, "g" + (i && p ? "y" : "")), n.lastIndex = r = r || 0;
+var s = n.exec(t);
+return i ? s && s.index === r ? s : null : s;
}, XRegExp.freezeTokens = function() {
XRegExp.addToken = function() {
throw Error("can't run addToken after freezeTokens");
};
-}, XRegExp.isRegExp = function(a) {
-return Object.prototype.toString.call(a) === "[object RegExp]";
-}, XRegExp.iterate = function(b, c, d, e) {
-var f = a(c, "g"), g = -1, h;
-while (h = f.exec(b)) d.call(e, h, ++g, b, f), f.lastIndex === h.index && f.lastIndex++;
-c.global && (c.lastIndex = 0);
-}, XRegExp.matchChain = function(b, c) {
-return function d(b, e) {
-var f = c[e].regex ? c[e] : {
-regex: c[e]
-}, g = a(f.regex, "g"), h = [], i;
-for (i = 0; i < b.length; i++) XRegExp.iterate(b[i], g, function(a) {
-h.push(f.backref ? a[f.backref] || "" : a[0]);
+}, XRegExp.isRegExp = function(e) {
+return Object.prototype.toString.call(e) === "[object RegExp]";
+}, XRegExp.iterate = function(t, n, r, i) {
+var s = e(n, "g"), o = -1, u;
+while (u = s.exec(t)) r.call(i, u, ++o, t, s), s.lastIndex === u.index && s.lastIndex++;
+n.global && (n.lastIndex = 0);
+}, XRegExp.matchChain = function(t, n) {
+return function r(t, i) {
+var s = n[i].regex ? n[i] : {
+regex: n[i]
+}, o = e(s.regex, "g"), u = [], a;
+for (a = 0; a < t.length; a++) XRegExp.iterate(t[a], o, function(e) {
+u.push(s.backref ? e[s.backref] || "" : e[0]);
});
-return e === c.length - 1 || !h.length ? h : d(h, e + 1);
-}([ b ], 0);
-}, RegExp.prototype.apply = function(a, b) {
-return this.exec(b[0]);
-}, RegExp.prototype.call = function(a, b) {
-return this.exec(b);
-}, RegExp.prototype.exec = function(a) {
-var c = j.exec.apply(this, arguments), e, f;
-if (c) {
-!k && c.length > 1 && d(c, "") > -1 && (f = RegExp(this.source, j.replace.call(b(this), "g", "")), j.replace.call(a.slice(c.index), f, function() {
-for (var a = 1; a < arguments.length - 2; a++) arguments[a] === undefined && (c[a] = undefined);
+return i === n.length - 1 || !u.length ? u : r(u, i + 1);
+}([ t ], 0);
+}, RegExp.prototype.apply = function(e, t) {
+return this.exec(t[0]);
+}, RegExp.prototype.call = function(e, t) {
+return this.exec(t);
+}, RegExp.prototype.exec = function(e) {
+var n = f.exec.apply(this, arguments), i, s;
+if (n) {
+!l && n.length > 1 && r(n, "") > -1 && (s = RegExp(this.source, f.replace.call(t(this), "g", "")), f.replace.call(e.slice(n.index), s, function() {
+for (var e = 1; e < arguments.length - 2; e++) arguments[e] === undefined && (n[e] = undefined);
}));
-if (this._xregexp && this._xregexp.captureNames) for (var g = 1; g < c.length; g++) e = this._xregexp.captureNames[g - 1], e && (c[e] = c[g]);
-!l && this.global && !c[0].length && this.lastIndex > c.index && this.lastIndex--;
-}
-return c;
-}, l || (RegExp.prototype.test = function(a) {
-var b = j.exec.call(this, a);
-return b && this.global && !b[0].length && this.lastIndex > b.index && this.lastIndex--, !!b;
-}), String.prototype.match = function(a) {
-XRegExp.isRegExp(a) || (a = RegExp(a));
-if (a.global) {
-var b = j.match.apply(this, arguments);
-return a.lastIndex = 0, b;
-}
-return a.exec(this);
-}, String.prototype.replace = function(a, b) {
-var c = XRegExp.isRegExp(a), f, g, h;
-return c && typeof b.valueOf() == "string" && b.indexOf("${") === -1 && m ? j.replace.apply(this, arguments) : (c ? a._xregexp && (f = a._xregexp.captureNames) : a += "", typeof b == "function" ? g = j.replace.call(this, a, function() {
-if (f) {
+if (this._xregexp && this._xregexp.captureNames) for (var o = 1; o < n.length; o++) i = this._xregexp.captureNames[o - 1], i && (n[i] = n[o]);
+!c && this.global && !n[0].length && this.lastIndex > n.index && this.lastIndex--;
+}
+return n;
+}, c || (RegExp.prototype.test = function(e) {
+var t = f.exec.call(this, e);
+return t && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--, !!t;
+}), String.prototype.match = function(e) {
+XRegExp.isRegExp(e) || (e = RegExp(e));
+if (e.global) {
+var t = f.match.apply(this, arguments);
+return e.lastIndex = 0, t;
+}
+return e.exec(this);
+}, String.prototype.replace = function(e, t) {
+var n = XRegExp.isRegExp(e), s, o, u;
+return n && typeof t.valueOf() == "string" && t.indexOf("${") === -1 && h ? f.replace.apply(this, arguments) : (n ? e._xregexp && (s = e._xregexp.captureNames) : e += "", typeof t == "function" ? o = f.replace.call(this, e, function() {
+if (s) {
arguments[0] = new String(arguments[0]);
-for (var d = 0; d < f.length; d++) f[d] && (arguments[0][f[d]] = arguments[d + 1]);
+for (var r = 0; r < s.length; r++) s[r] && (arguments[0][s[r]] = arguments[r + 1]);
}
-return c && a.global && (a.lastIndex = arguments[arguments.length - 2] + arguments[0].length), b.apply(null, arguments);
-}) : (h = this + "", g = j.replace.call(h, a, function() {
-var a = arguments;
-return j.replace.call(b, e, function(b, c, e) {
-if (!c) {
-var g = +e;
-return g <= a.length - 3 ? a[g] : (g = f ? d(f, e) : -1, g > -1 ? a[g + 1] : b);
+return n && e.global && (e.lastIndex = arguments[arguments.length - 2] + arguments[0].length), t.apply(null, arguments);
+}) : (u = this + "", o = f.replace.call(u, e, function() {
+var e = arguments;
+return f.replace.call(t, i, function(t, n, i) {
+if (!n) {
+var o = +i;
+return o <= e.length - 3 ? e[o] : (o = s ? r(s, i) : -1, o > -1 ? e[o + 1] : t);
}
-switch (c) {
+switch (n) {
case "$":
return "$";
case "&":
-return a[0];
+return e[0];
case "`":
-return a[a.length - 1].slice(0, a[a.length - 2]);
+return e[e.length - 1].slice(0, e[e.length - 2]);
case "'":
-return a[a.length - 1].slice(a[a.length - 2] + a[0].length);
+return e[e.length - 1].slice(e[e.length - 2] + e[0].length);
default:
-var h = "";
-c = +c;
-if (!c) return b;
-while (c > a.length - 3) h = String.prototype.slice.call(c, -1) + h, c = Math.floor(c / 10);
-return (c ? a[c] || "" : "$") + h;
+var u = "";
+n = +n;
+if (!n) return t;
+while (n > e.length - 3) u = String.prototype.slice.call(n, -1) + u, n = Math.floor(n / 10);
+return (n ? e[n] || "" : "$") + u;
}
});
-})), c && a.global && (a.lastIndex = 0), g);
-}, String.prototype.split = function(a, b) {
-if (!XRegExp.isRegExp(a)) return j.split.apply(this, arguments);
-var c = this + "", d = [], e = 0, f, g;
-if (b === undefined || +b < 0) b = Infinity; else {
-b = Math.floor(+b);
-if (!b) return [];
-}
-a = XRegExp.copyAsGlobal(a);
-while (f = a.exec(c)) {
-if (a.lastIndex > e) {
-d.push(c.slice(e, f.index)), f.length > 1 && f.index < c.length && Array.prototype.push.apply(d, f.slice(1)), g = f[0].length, e = a.lastIndex;
-if (d.length >= b) break;
-}
-a.lastIndex === f.index && a.lastIndex++;
-}
-return e === c.length ? (!j.test.call(a, "") || g) && d.push("") : d.push(c.slice(e)), d.length > b ? d.slice(0, b) : d;
-}, XRegExp.addToken(/\(\?#[^)]*\)/, function(a) {
-return j.test.call(g, a.input.slice(a.index + a[0].length)) ? "" : "(?:)";
+})), n && e.global && (e.lastIndex = 0), o);
+}, String.prototype.split = function(e, t) {
+if (!XRegExp.isRegExp(e)) return f.split.apply(this, arguments);
+var n = this + "", r = [], i = 0, s, o;
+if (t === undefined || +t < 0) t = Infinity; else {
+t = Math.floor(+t);
+if (!t) return [];
+}
+e = XRegExp.copyAsGlobal(e);
+while (s = e.exec(n)) {
+if (e.lastIndex > i) {
+r.push(n.slice(i, s.index)), s.length > 1 && s.index < n.length && Array.prototype.push.apply(r, s.slice(1)), o = s[0].length, i = e.lastIndex;
+if (r.length >= t) break;
+}
+e.lastIndex === s.index && e.lastIndex++;
+}
+return i === n.length ? (!f.test.call(e, "") || o) && r.push("") : r.push(n.slice(i)), r.length > t ? r.slice(0, t) : r;
+}, XRegExp.addToken(/\(\?#[^)]*\)/, function(e) {
+return f.test.call(o, e.input.slice(e.index + e[0].length)) ? "" : "(?:)";
}), XRegExp.addToken(/\((?!\?)/, function() {
return this.captureNames.push(null), "(";
-}), XRegExp.addToken(/\(\?<([$\w]+)>/, function(a) {
-return this.captureNames.push(a[1]), this.hasNamedCapture = !0, "(";
-}), XRegExp.addToken(/\\k<([\w$]+)>/, function(a) {
-var b = d(this.captureNames, a[1]);
-return b > -1 ? "\\" + (b + 1) + (isNaN(a.input.charAt(a.index + a[0].length)) ? "" : "(?:)") : a[0];
-}), XRegExp.addToken(/\[\^?]/, function(a) {
-return a[0] === "[]" ? "\\b\\B" : "[\\s\\S]";
-}), XRegExp.addToken(/^\(\?([imsx]+)\)/, function(a) {
-return this.setFlag(a[1]), "";
-}), XRegExp.addToken(/(?:\s+|#.*)+/, function(a) {
-return j.test.call(g, a.input.slice(a.index + a[0].length)) ? "" : "(?:)";
+}), XRegExp.addToken(/\(\?<([$\w]+)>/, function(e) {
+return this.captureNames.push(e[1]), this.hasNamedCapture = !0, "(";
+}), XRegExp.addToken(/\\k<([\w$]+)>/, function(e) {
+var t = r(this.captureNames, e[1]);
+return t > -1 ? "\\" + (t + 1) + (isNaN(e.input.charAt(e.index + e[0].length)) ? "" : "(?:)") : e[0];
+}), XRegExp.addToken(/\[\^?]/, function(e) {
+return e[0] === "[]" ? "\\b\\B" : "[\\s\\S]";
+}), XRegExp.addToken(/^\(\?([imsx]+)\)/, function(e) {
+return this.setFlag(e[1]), "";
+}), XRegExp.addToken(/(?:\s+|#.*)+/, function(e) {
+return f.test.call(o, e.input.slice(e.index + e[0].length)) ? "" : "(?:)";
}, XRegExp.OUTSIDE_CLASS, function() {
return this.hasFlag("x");
}), XRegExp.addToken(/\./, function() {
@@ -2410,116 +2401,116 @@ return this.hasFlag("s");
})();
var SyntaxHighlighter = function() {
-function a(a) {
-return a.split("\n");
+function e(e) {
+return e.split("\n");
}
-function b(a, b, c) {
-c = Math.max(c || 0, 0);
-for (var d = c; d < a.length; d++) if (a[d] == b) return d;
+function t(e, t, n) {
+n = Math.max(n || 0, 0);
+for (var r = n; r < e.length; r++) if (e[r] == t) return r;
return -1;
}
-function c(a, b) {
-var c = {}, d;
-for (d in a) c[d] = a[d];
-for (d in b) c[d] = b[d];
-return c;
+function n(e, t) {
+var n = {}, r;
+for (r in e) n[r] = e[r];
+for (r in t) n[r] = t[r];
+return n;
}
-function d(a) {
-var b = {
+function r(e) {
+var t = {
"true": !0,
"false": !1
-}[a];
-return b == null ? a : b;
-}
-function e(b, c) {
-var d = a(b);
-for (var e = 0; e < d.length; e++) d[e] = c(d[e], e);
-return d.join("\n");
-}
-function f(a) {
-return a.replace(/^[ ]*[\n]+|[\n]*[ ]*$/g, "");
-}
-function g(a, b) {
-return a == null || a.length == 0 || a == "\n" ? a : (a = a.replace(/</g, "&lt;"), a = a.replace(/ {2,}/g, function(a) {
-var b = "";
-for (var c = 0; c < a.length - 1; c++) b += q.config.space;
-return b + " ";
-}), b != null && (a = e(a, function(a) {
-if (a.length == 0) return "";
-var c = "";
-return a = a.replace(/^(&nbsp;| )+/, function(a) {
-return c = a, "";
-}), a.length == 0 ? c : c + '<code class="' + b + '">' + a + "</code>";
-})), a);
-}
-function h(a, b) {
-var c = a.toString();
-while (c.length < b) c = "0" + c;
-return c;
-}
-function i(a, b) {
-var c = "";
-for (var d = 0; d < b; d++) c += " ";
-return a.replace(/\t/g, c);
-}
-function j(b, c) {
-function d(a, b, c) {
-return a.substr(0, b) + h.substr(0, c) + a.substr(b + 1, a.length);
-}
-var f = a(b), g = " ", h = "";
-for (var i = 0; i < 50; i++) h += " ";
-return b = e(b, function(a) {
-if (a.indexOf(g) == -1) return a;
-var b = 0;
-while ((b = a.indexOf(g)) != -1) {
-var e = c - b % c;
-a = d(a, b, e);
-}
-return a;
-}), b;
-}
-function k(a) {
-var b = /<br\s*\/?>|&lt;br\s*\/?&gt;/gi;
-return a = a.replace(b, "\n"), q.config.stripBrs == 1 && (a = a.replace(b, "")), a;
-}
-function l(a) {
-return a.replace(/^\s+|\s+$/g, "");
-}
-function m(b) {
-var c = a(k(b)), d = new Array, e = /^\s*/, f = 1e3;
-for (var g = 0; g < c.length && f > 0; g++) {
-var h = c[g];
-if (l(h).length == 0) continue;
-var i = e.exec(h);
-if (i == null) return b;
-f = Math.min(i[0].length, f);
-}
-if (f > 0) for (var g = 0; g < c.length; g++) c[g] = c[g].substr(f);
-return c.join("\n");
-}
-function n(a, b) {
-return a.index < b.index ? -1 : a.index > b.index ? 1 : a.length < b.length ? -1 : a.length > b.length ? 1 : 0;
-}
-function o(a, b) {
-function c(a, b) {
-return a[0];
-}
-var d = 0, e = null, f = [], g = b.func ? b.func : c;
-while ((e = b.regex.exec(a)) != null) {
-var h = g(e, b);
-typeof h == "string" && (h = [ new q.Match(h, e.index, b.css) ]), f = f.concat(h);
-}
-return f;
-}
-function p(a) {
-var b = /(.*)((&gt;|&lt;).*)/;
-return a.replace(q.regexLib.url, function(a) {
-var c = "", d = null;
-if (d = b.exec(a)) a = d[1], c = d[2];
-return '<a href="' + a + '">' + a + "</a>" + c;
+}[e];
+return t == null ? e : t;
+}
+function i(t, n) {
+var r = e(t);
+for (var i = 0; i < r.length; i++) r[i] = n(r[i], i);
+return r.join("\n");
+}
+function s(e) {
+return e.replace(/^[ ]*[\n]+|[\n]*[ ]*$/g, "");
+}
+function o(e, t) {
+return e == null || e.length == 0 || e == "\n" ? e : (e = e.replace(/</g, "&lt;"), e = e.replace(/ {2,}/g, function(e) {
+var t = "";
+for (var n = 0; n < e.length - 1; n++) t += m.config.space;
+return t + " ";
+}), t != null && (e = i(e, function(e) {
+if (e.length == 0) return "";
+var n = "";
+return e = e.replace(/^(&nbsp;| )+/, function(e) {
+return n = e, "";
+}), e.length == 0 ? n : n + '<code class="' + t + '">' + e + "</code>";
+})), e);
+}
+function u(e, t) {
+var n = e.toString();
+while (n.length < t) n = "0" + n;
+return n;
+}
+function a(e, t) {
+var n = "";
+for (var r = 0; r < t; r++) n += " ";
+return e.replace(/\t/g, n);
+}
+function f(t, n) {
+function r(e, t, n) {
+return e.substr(0, t) + u.substr(0, n) + e.substr(t + 1, e.length);
+}
+var s = e(t), o = " ", u = "";
+for (var a = 0; a < 50; a++) u += " ";
+return t = i(t, function(e) {
+if (e.indexOf(o) == -1) return e;
+var t = 0;
+while ((t = e.indexOf(o)) != -1) {
+var i = n - t % n;
+e = r(e, t, i);
+}
+return e;
+}), t;
+}
+function l(e) {
+var t = /<br\s*\/?>|&lt;br\s*\/?&gt;/gi;
+return e = e.replace(t, "\n"), m.config.stripBrs == 1 && (e = e.replace(t, "")), e;
+}
+function c(e) {
+return e.replace(/^\s+|\s+$/g, "");
+}
+function h(t) {
+var n = e(l(t)), r = new Array, i = /^\s*/, s = 1e3;
+for (var o = 0; o < n.length && s > 0; o++) {
+var u = n[o];
+if (c(u).length == 0) continue;
+var a = i.exec(u);
+if (a == null) return t;
+s = Math.min(a[0].length, s);
+}
+if (s > 0) for (var o = 0; o < n.length; o++) n[o] = n[o].substr(s);
+return n.join("\n");
+}
+function p(e, t) {
+return e.index < t.index ? -1 : e.index > t.index ? 1 : e.length < t.length ? -1 : e.length > t.length ? 1 : 0;
+}
+function d(e, t) {
+function n(e, t) {
+return e[0];
+}
+var r = 0, i = null, s = [], o = t.func ? t.func : n;
+while ((i = t.regex.exec(e)) != null) {
+var u = o(i, t);
+typeof u == "string" && (u = [ new m.Match(u, i.index, t.css) ]), s = s.concat(u);
+}
+return s;
+}
+function v(e) {
+var t = /(.*)((&gt;|&lt;).*)/;
+return e.replace(m.regexLib.url, function(e) {
+var n = "", r = null;
+if (r = t.exec(e)) e = r[1], n = r[2];
+return '<a href="' + e + '">' + e + "</a>" + n;
});
}
-var q = {
+var m = {
defaults: {
"class-name": "",
"first-line": 1,
@@ -2564,122 +2555,122 @@ right: /(&lt;|<)\/\s*script\s*(&gt;|>)/gi
}
}
};
-return q.Match = function(a, b, c) {
-this.value = a, this.index = b, this.length = a.length, this.css = c, this.brushName = null;
-}, q.Match.prototype.toString = function() {
+return m.Match = function(e, t, n) {
+this.value = e, this.index = t, this.length = e.length, this.css = n, this.brushName = null;
+}, m.Match.prototype.toString = function() {
return this.value;
-}, q.Highlighter = function() {}, q.Highlighter.prototype = {
-getParam: function(a, b) {
-var c = this.params[a];
-return d(c == null ? b : c);
-},
-create: function(a) {
-return document.createElement(a);
-},
-findMatches: function(a, b) {
-var c = [];
-if (a != null) for (var d = 0; d < a.length; d++) typeof a[d] == "object" && (c = c.concat(o(b, a[d])));
-return this.removeNestedMatches(c.sort(n));
-},
-removeNestedMatches: function(a) {
-for (var b = 0; b < a.length; b++) {
-if (a[b] === null) continue;
-var c = a[b], d = c.index + c.length;
-for (var e = b + 1; e < a.length && a[b] !== null; e++) {
-var f = a[e];
-if (f === null) continue;
-if (f.index > d) break;
-f.index == c.index && f.length > c.length ? a[b] = null : f.index >= c.index && f.index < d && (a[e] = null);
-}
-}
-return a;
-},
-figureOutLineNumbers: function(a) {
-var b = [], c = parseInt(this.getParam("first-line"));
-return e(a, function(a, d) {
-b.push(d + c);
-}), b;
-},
-isLineHighlighted: function(a) {
-var c = this.getParam("highlight", []);
-return typeof c != "object" && c.push == null && (c = [ c ]), b(c, a.toString()) != -1;
-},
-getLineHtml: function(a, b, c) {
-var d = [ "line", "number" + b, "index" + a, "alt" + (b % 2 == 0 ? 1 : 2).toString() ];
-return this.isLineHighlighted(b) && d.push("highlighted"), b == 0 && d.push("break"), '<div class="' + d.join(" ") + '">' + c + "</div>";
-},
-getLineNumbersHtml: function(b, c) {
-var d = "", e = a(b).length, f = parseInt(this.getParam("first-line")), g = this.getParam("pad-line-numbers");
-g == 1 ? g = (f + e - 1).toString().length : isNaN(g) == 1 && (g = 0);
-for (var i = 0; i < e; i++) {
-var j = c ? c[i] : f + i, b = j == 0 ? q.config.space : h(j, g);
-d += this.getLineHtml(i, j, b);
-}
-return d;
-},
-getCodeLinesHtml: function(b, c) {
-b = l(b);
-var d = a(b), e = this.getParam("pad-line-numbers"), f = parseInt(this.getParam("first-line")), b = "", g = this.getParam("brush");
-for (var h = 0; h < d.length; h++) {
-var i = d[h], j = /^(&nbsp;|\s)+/.exec(i), k = null, m = c ? c[h] : f + h;
-j != null && (k = j[0].toString(), i = i.substr(k.length), k = k.replace(" ", q.config.space)), i = l(i), i.length == 0 && (i = q.config.space), b += this.getLineHtml(h, m, (k != null ? '<code class="' + g + ' spaces">' + k + "</code>" : "") + i);
-}
-return b;
-},
-getMatchesHtml: function(a, b) {
-function c(a) {
-var b = a ? a.brushName || f : f;
-return b ? b + " " : "";
-}
-var d = 0, e = "", f = this.getParam("brush", "");
-for (var h = 0; h < b.length; h++) {
-var i = b[h], j;
-if (i === null || i.length === 0) continue;
-j = c(i), e += g(a.substr(d, i.index - d), j + "plain") + g(i.value, j + i.css), d = i.index + i.length + (i.offset || 0);
-}
-return e += g(a.substr(d), c() + "plain"), e;
-},
-getHtml: function(a) {
-var b = "", c = [ "syntaxhighlighter" ], d, e, g;
-return className = "syntaxhighlighter", (gutter = this.getParam("gutter")) == 0 && c.push("nogutter"), c.push(this.getParam("class-name")), c.push(this.getParam("brush")), a = f(a).replace(/\r/g, " "), d = this.getParam("tab-size"), a = this.getParam("smart-tabs") == 1 ? j(a, d) : i(a, d), a = m(a), gutter && (g = this.figureOutLineNumbers(a)), e = this.findMatches(this.regexList, a), b = this.getMatchesHtml(a, e), b = this.getCodeLinesHtml(b, g), this.getParam("auto-links") && (b = p(b)), typeof navigator != "undefined" && navigator.userAgent && navigator.userAgent.match(/MSIE/) && c.push("ie"), b = '<div class="' + c.join(" ") + '">' + '<table border="0" cellpadding="0" cellspacing="0">' + "<tbody>" + "<tr>" + (gutter ? '<td class="gutter">' + this.getLineNumbersHtml(a) + "</td>" : "") + '<td class="code">' + '<div class="container">' + b + "</div>" + "</td>" + "</tr>" + "</tbody>" + "</table>" + "</div>", b;
-},
-init: function(a) {
-this.params = c(q.defaults, a || {});
-},
-getKeywords: function(a) {
-return a = a.replace(/^\s+|\s+$/g, "").replace(/\s+/g, "|"), "\\b(?:" + a + ")\\b";
-}
-}, q;
+}, m.Highlighter = function() {}, m.Highlighter.prototype = {
+getParam: function(e, t) {
+var n = this.params[e];
+return r(n == null ? t : n);
+},
+create: function(e) {
+return document.createElement(e);
+},
+findMatches: function(e, t) {
+var n = [];
+if (e != null) for (var r = 0; r < e.length; r++) typeof e[r] == "object" && (n = n.concat(d(t, e[r])));
+return this.removeNestedMatches(n.sort(p));
+},
+removeNestedMatches: function(e) {
+for (var t = 0; t < e.length; t++) {
+if (e[t] === null) continue;
+var n = e[t], r = n.index + n.length;
+for (var i = t + 1; i < e.length && e[t] !== null; i++) {
+var s = e[i];
+if (s === null) continue;
+if (s.index > r) break;
+s.index == n.index && s.length > n.length ? e[t] = null : s.index >= n.index && s.index < r && (e[i] = null);
+}
+}
+return e;
+},
+figureOutLineNumbers: function(e) {
+var t = [], n = parseInt(this.getParam("first-line"));
+return i(e, function(e, r) {
+t.push(r + n);
+}), t;
+},
+isLineHighlighted: function(e) {
+var n = this.getParam("highlight", []);
+return typeof n != "object" && n.push == null && (n = [ n ]), t(n, e.toString()) != -1;
+},
+getLineHtml: function(e, t, n) {
+var r = [ "line", "number" + t, "index" + e, "alt" + (t % 2 == 0 ? 1 : 2).toString() ];
+return this.isLineHighlighted(t) && r.push("highlighted"), t == 0 && r.push("break"), '<div class="' + r.join(" ") + '">' + n + "</div>";
+},
+getLineNumbersHtml: function(t, n) {
+var r = "", i = e(t).length, s = parseInt(this.getParam("first-line")), o = this.getParam("pad-line-numbers");
+o == 1 ? o = (s + i - 1).toString().length : isNaN(o) == 1 && (o = 0);
+for (var a = 0; a < i; a++) {
+var f = n ? n[a] : s + a, t = f == 0 ? m.config.space : u(f, o);
+r += this.getLineHtml(a, f, t);
+}
+return r;
+},
+getCodeLinesHtml: function(t, n) {
+t = c(t);
+var r = e(t), i = this.getParam("pad-line-numbers"), s = parseInt(this.getParam("first-line")), t = "", o = this.getParam("brush");
+for (var u = 0; u < r.length; u++) {
+var a = r[u], f = /^(&nbsp;|\s)+/.exec(a), l = null, h = n ? n[u] : s + u;
+f != null && (l = f[0].toString(), a = a.substr(l.length), l = l.replace(" ", m.config.space)), a = c(a), a.length == 0 && (a = m.config.space), t += this.getLineHtml(u, h, (l != null ? '<code class="' + o + ' spaces">' + l + "</code>" : "") + a);
+}
+return t;
+},
+getMatchesHtml: function(e, t) {
+function n(e) {
+var t = e ? e.brushName || s : s;
+return t ? t + " " : "";
+}
+var r = 0, i = "", s = this.getParam("brush", "");
+for (var u = 0; u < t.length; u++) {
+var a = t[u], f;
+if (a === null || a.length === 0) continue;
+f = n(a), i += o(e.substr(r, a.index - r), f + "plain") + o(a.value, f + a.css), r = a.index + a.length + (a.offset || 0);
+}
+return i += o(e.substr(r), n() + "plain"), i;
+},
+getHtml: function(e) {
+var t = "", n = [ "syntaxhighlighter" ], r, i, o;
+return className = "syntaxhighlighter", (gutter = this.getParam("gutter")) == 0 && n.push("nogutter"), n.push(this.getParam("class-name")), n.push(this.getParam("brush")), e = s(e).replace(/\r/g, " "), r = this.getParam("tab-size"), e = this.getParam("smart-tabs") == 1 ? f(e, r) : a(e, r), e = h(e), gutter && (o = this.figureOutLineNumbers(e)), i = this.findMatches(this.regexList, e), t = this.getMatchesHtml(e, i), t = this.getCodeLinesHtml(t, o), this.getParam("auto-links") && (t = v(t)), typeof navigator != "undefined" && navigator.userAgent && navigator.userAgent.match(/MSIE/) && n.push("ie"), t = '<div class="' + n.join(" ") + '">' + '<table border="0" cellpadding="0" cellspacing="0">' + "<tbody>" + "<tr>" + (gutter ? '<td class="gutter">' + this.getLineNumbersHtml(e) + "</td>" : "") + '<td class="code">' + '<div class="container">' + t + "</div>" + "</td>" + "</tr>" + "</tbody>" + "</table>" + "</div>", t;
+},
+init: function(e) {
+this.params = n(m.defaults, e || {});
+},
+getKeywords: function(e) {
+return e = e.replace(/^\s+|\s+$/g, "").replace(/\s+/g, "|"), "\\b(?:" + e + ")\\b";
+}
+}, m;
}();
(function() {
-function a() {
-var a = "break case catch continue default delete do else false for function if in instanceof new null return super switch this throw true try typeof var while with", b = SyntaxHighlighter.regexLib;
+function e() {
+var e = "break case catch continue default delete do else false for function if in instanceof new null return super switch this throw true try typeof var while with", t = SyntaxHighlighter.regexLib;
this.regexList = [ {
-regex: b.multiLineDoubleQuotedString,
+regex: t.multiLineDoubleQuotedString,
css: "string"
}, {
-regex: b.multiLineSingleQuotedString,
+regex: t.multiLineSingleQuotedString,
css: "string"
}, {
-regex: b.singleLineCComments,
+regex: t.singleLineCComments,
css: "comments"
}, {
-regex: b.multiLineCComments,
+regex: t.multiLineCComments,
css: "comments"
}, {
regex: /\s*#.*/gm,
css: "preprocessor"
}, {
-regex: new RegExp(this.getKeywords(a), "gm"),
+regex: new RegExp(this.getKeywords(e), "gm"),
css: "keyword"
} ];
}
-a.prototype = new SyntaxHighlighter.Highlighter, a.aliases = [ "js", "jscript", "javascript" ], SyntaxHighlighter.brushes.JScript = a;
+e.prototype = new SyntaxHighlighter.Highlighter, e.aliases = [ "js", "jscript", "javascript" ], SyntaxHighlighter.brushes.JScript = e;
})(), function() {
-var a = new SyntaxHighlighter.brushes.JScript;
-a.init({}), syntaxHighlight = function(b) {
-return a.getHtml(b);
+var e = new SyntaxHighlighter.brushes.JScript;
+e.init({}), syntaxHighlight = function(t) {
+return e.getHtml(t);
};
}();
@@ -2690,97 +2681,110 @@ name: "Presentor",
kind: null,
showInherited: !1,
showProtected: !1,
-getByType: function(a, b) {
-var c = [];
-for (var d = 0, e; e = a[d]; d++) e.type == b && c.push(e);
-return c;
+getByType: function(e, t) {
+var n = [];
+for (var r = 0, i; i = e[r]; r++) i.type == t && n.push(i);
+return n;
},
-presentObject: function(a) {
-switch (a.type) {
+presentObject: function(e) {
+switch (e.type) {
case "module":
-return this.presentObjects(a.objects);
+return this.presentObjects(e.objects);
case "kind":
-return this.presentKind(a);
+return this.presentKind(e);
case "function":
case "global":
-return this.presentProperty(a);
+return this.presentProperty(e);
}
},
-presentObjects: function(a) {
-var b = this.groupFilter(a), c = "", d, e, f = this.getByType(b, "kind");
-if (f.length) {
-c += "<h3>Kinds</h3>";
-for (d = 0; e = f[d]; d++) c += "<kind>" + e.name + "</kind><br/>", c += this.presentComment(e.comment);
+presentObjects: function(e) {
+var t = this.groupFilter(e), n = "", r, i, s = this.getByType(t, "kind");
+if (s.length) {
+n += "<h3>Kinds</h3>";
+for (r = 0; i = s[r]; r++) n += "<kind>" + i.name + "</kind><br/>", n += this.presentComment(i.comment);
+}
+s = this.getByType(t, "function");
+if (s.length) {
+n += "<h3>Functions</h3>";
+for (r = 0; i = s[r]; r++) n += this.presentComment(i.comment), i.group && (n += "<" + i.group + ">" + i.group + "</" + i.group + ">"), n += "<i>name:</i> <label>" + i.name + "(<arguments>" + i.value[0].arguments.join(", ") + "</arguments>)</label><br/>";
}
-f = this.getByType(b, "function"), c += "<h3>Functions</h3>";
-for (d = 0; e = f[d]; d++) c += this.presentComment(e.comment), e.group && (c += "<" + e.group + ">" + e.group + "</" + e.group + ">"), c += "<i>name:</i> <label>" + e.name + "(<arguments>" + e.value[0].arguments.join(", ") + "</arguments>)</label><br/>";
-c += "<h3>Variables</h3>", f = this.getByType(b, "global");
-for (d = 0; e = f[d]; d++) c += this.presentComment(e.comment), e.group && (c += "<" + e.group + ">" + e.group + "</" + e.group + ">"), c += "<label>" + e.name + "</label> = ", c += this.presentExpression(e.value[0]), c += "<br/>";
-return c;
+s = this.getByType(t, "global");
+if (s.length) {
+n += "<h3>Variables</h3>";
+for (r = 0; i = s[r]; r++) n += this.presentComment(i.comment), i.group && (n += "<" + i.group + ">" + i.group + "</" + i.group + ">"), n += "<label>" + i.name + "</label> = ", n += this.presentExpression(i.value[0]), n += "<br/>";
+}
+return n;
},
-presentComment: function(a) {
-return a ? "<comment>" + this.markupToHtml(a) + "</comment>" : "";
+presentComment: function(e) {
+return e ? "<comment>" + this.markupToHtml(e) + "</comment>" : "";
},
-presentKind: function(a) {
-return this.presentKindHeader(a) + this.presentKindSummary(a) + this.presentKindProperties(a);
+presentKind: function(e) {
+return this.presentKindHeader(e) + this.presentKindSummary(e) + this.presentKindProperties(e);
},
-presentKindHeader: function(a) {
-var b = "";
-return a.module && a.module.label && (b += "<package>" + a.module.label + "</package>"), b += "<kind>" + a.name + "</kind>", a.superkinds.length && (b += '<div style="padding: 4px 0px;">', b += a.name, enyo.forEach(a.superkinds, function(a) {
-b += " :: <a href=#" + a + ">" + a + "</a>";
-}), b += "</div>"), b;
+presentKindHeader: function(e) {
+var t = "";
+return e.module && e.module.label && (t += "<package>" + e.module.label + "</package>"), t += "<kind>" + e.name + "</kind>", e.superkinds.length && (t += '<div style="padding: 4px 0px;">', t += e.name, enyo.forEach(e.superkinds, function(e) {
+t += " :: <a href=#" + e + ">" + e + "</a>";
+}), t += "</div>"), t;
},
-presentKindSummary: function(a) {
-var b = "";
-return a.comment && (b += "<h3>Summary</h3>" + this.presentComment(a.comment)), b;
+presentKindSummary: function(e) {
+var t = "";
+return e.comment && (t += "<h3>Summary</h3>" + this.presentComment(e.comment)), t;
},
-presentKindProperties: function(a) {
-return this.presentProperties(this.showInherited ? a.allProperties : a.properties, a);
+presentKindProperties: function(e) {
+return this.presentProperties(this.showInherited ? e.allProperties : e.properties, e);
},
-groupFilter: function(a) {
-return enyo.filter(a, function(a) {
-return a.name[0] !== "_" && (a.group == "public" || this.showProtected && a.group == "protected");
+groupFilter: function(e) {
+return enyo.filter(e, function(e) {
+return e.name[0] !== "_" && (e.group == "public" || this.showProtected && e.group == "protected");
}, this);
},
-presentProperties: function(a, b) {
-var c = this.groupFilter(a), d = "";
-for (var e = 0, f; f = c[e]; e++) d += this.presentProperty(f, b);
-return d;
-},
-presentProperty: function(a, b) {
-var c = "", d = a;
-c += '<a name="' + d.name + '"></a>', d.group && (c += "<" + d.group + ">" + d.group + "</" + d.group + ">");
-var e = d.name;
-return d.object && b && b != d.object && (e = "<prototype>" + d.object.name + "::</prototype>" + e), c += "<label>" + e + "</label>: ", d.value && d.value[0] && d.value[0].token == "function" ? c += "function(<arguments>" + d.value[0].arguments.join(", ") + "</arguments>)<br/>" : c += this.presentValue(d), c += this.presentComment(d.comment), c += "<hr/>", c;
-},
-presentValue: function(a) {
-var b, c = a.value;
-return !c || !c[0] ? b = a.token : b = this.presentExpression(c[0]), b += "</br>", b;
-},
-presentExpression: function(a) {
-var b = a;
-return b.comment ? this.presentComment(b.comment) : b.type == "block" ? "{<blockquote><br/>" + this.presentBlock(b) + "</blockquote>}" : b.type == "array" ? "[<blockquote>" + this.presentArray(b) + "</blockquote>]" : b.token;
-},
-presentBlock: function(a) {
-return this.presentProperties(a.properties);
-},
-presentArray: function(a) {
-var b = "", c = a.properties;
-for (var d = 0, e; e = c[d]; d++) b += "<i>" + d + "</i>: " + this.presentExpression(e);
-return b;
-},
-presentColumns: function(a, b, c) {
-var d = this.groupFilter(a), e = "";
-b && (e = b.name + "::");
-var f = c || 4, g = [], h = "";
-for (var i = 0, j = 0, k = 0; p = d[i]; i++) h += '<a href="#' + e + p.name + '">' + p.name + "</a><br/>", ++k == f && (g.push(h), h = "", k = 0);
-return h && g.push(h), h = g.length ? "<column>" + g.join("</column><column>") + "</column>" : "", h;
-},
-markupToHtml: function(a) {
-var b = Presentor.showdown.makeHtml(a || "");
-return b = b.replace(/<pre><code>([\s\S]*?)<\/code><\/pre>/gm, function(a, b) {
-return "<pre>" + syntaxHighlight(b) + "</pre>";
-}), b;
+presentProperties: function(e, t) {
+var n = this.groupFilter(e), r = "";
+for (var i = 0, s; s = n[i]; i++) r += this.presentProperty(s, t);
+return r;
+},
+presentProperty: function(e, t) {
+var n = "", r = e;
+n += '<a name="' + r.name + '"></a>', r.group && (n += "<" + r.group + ">" + r.group + "</" + r.group + ">");
+var i = r.name;
+return r.object && t && t != r.object && (i = "<prototype>" + r.object.name + "::</prototype>" + i), n += "<label>" + i + "</label>: ", r.value && r.value[0] && r.value[0].token == "function" ? n += "function(<arguments>" + r.value[0].arguments.join(", ") + "</arguments>)<br/>" : n += this.presentValue(r), n += this.presentComment(r.comment), n += "<hr/>", n;
+},
+presentValue: function(e) {
+var t, n = e.value;
+return !n || !n[0] ? t = e.token : t = this.presentExpression(n[0]), t += "</br>", t;
+},
+presentExpression: function(e) {
+var t = e;
+return t.comment ? this.presentComment(t.comment) : t.type == "block" ? "{<blockquote><br/>" + this.presentBlock(t) + "</blockquote>}" : t.type == "array" ? "[<blockquote>" + this.presentArray(t) + "</blockquote>]" : t.token;
+},
+presentBlock: function(e) {
+return this.presentProperties(e.properties);
+},
+presentArray: function(e) {
+var t = "", n = e.properties;
+for (var r = 0, i; i = n[r]; r++) t += "<i>" + r + "</i>: " + this.presentExpression(i);
+return t;
+},
+presentColumns: function(e, t, n) {
+var r = this.groupFilter(e), i = "";
+t && (i = t.name + "::");
+var s = n || 4, o = [], u = "";
+for (var a = 0, f = 0, l = 0; p = r[a]; a++) u += '<a href="#' + i + p.name + '">' + p.name + "</a><br/>", ++l == s && (o.push(u), u = "", l = 0);
+return u && o.push(u), u = o.length ? "<column>" + o.join("</column><column>") + "</column>" : "", u;
+},
+markupToHtml: function(e) {
+var t = Presentor.showdown.makeHtml(e || "");
+return t = t.replace(/<pre><code>([\s\S]*?)<\/code><\/pre>/gm, function(e, t) {
+return "<pre>" + syntaxHighlight(t) + "</pre>";
+}), t;
+},
+inlineProperties: function(e, t) {
+var n = [], r = function(e) {
+e.parentHash = s.name;
+};
+for (var i = 0, s; s = e[i]; i++) t[s.name] ? s.value && s.value[0] && s.value[0].properties && (enyo.forEach(s.value[0].properties, r), n = n.concat(s.value[0].properties)) : n.push(s);
+return n;
},
statics: {
showdown: new Showdown.converter
@@ -2827,15 +2831,15 @@ kind: "Button",
content: "Save",
ontap: "save"
} ],
-openWithPackages: function(a) {
-this.show(), this.pkgs = a, this.load();
+openWithPackages: function(e) {
+this.show(), this.pkgs = e, this.load();
},
load: function() {
this.$.repeater.setCount(this.pkgs.length);
},
-setupItem: function(a, b) {
-var c = this.pkgs[b.index];
-return b.item.$.name.setValue(c.name), b.item.$.path.setValue(c.path), !0;
+setupItem: function(e, t) {
+var n = this.pkgs[t.index];
+return t.item.$.name.setValue(n.name), t.item.$.path.setValue(n.path), !0;
},
newPkg: function() {
this.pkgs.push({
@@ -2843,20 +2847,20 @@ name: "",
path: ""
}), this.load();
},
-deletePkg: function(a, b) {
-this.pkgs.splice(b.index, 1), this.load();
+deletePkg: function(e, t) {
+this.pkgs.splice(t.index, 1), this.load();
},
save: function() {
-var a = [];
-for (var b = 0, c; c = this.$.repeater.getClientControls()[b]; b++) {
-var d = c.$.name.getValue(), e = c.$.path.getValue();
-d && e && a.push({
-name: d,
-path: e
+var e = [];
+for (var t = 0, n; n = this.$.repeater.getClientControls()[t]; t++) {
+var r = n.$.name.getValue(), i = n.$.path.getValue();
+r && i && e.push({
+name: r,
+path: i
});
}
this.doSave({
-pkgs: a
+pkgs: e
}), this.hide();
}
});
@@ -2874,12 +2878,18 @@ onchange: "cbChange"
} ]
} ]
}, {
+name: "version",
+style: "padding-top: 20px"
+}, {
kind: "PackagesEditor",
modal: !0,
centered: !0,
floating: !0,
onSave: "savePackages"
} ],
+published: {
+version: ""
+},
events: {
onPackagesChange: "",
onLoaded: ""
@@ -2887,30 +2897,37 @@ onLoaded: ""
handlers: {
onSetupItem: "setupItem"
},
+create: function() {
+this.inherited(arguments), this.versionChanged();
+},
+versionChanged: function() {
+this.$.version.setContent("Content Version: " + this.version);
+},
fetchPackageData: function() {
(new enyo.Ajax({
url: "assets/manifest.json"
-})).response(this, function(a, b) {
-this.gotPackageData(b);
+})).response(this, function(e, t) {
+this.setVersion(t.version), this.gotPackageData(t.packages);
}).go();
},
-gotPackageData: function(a) {
-this.pkgs = a, this.$.repeater.setCount(this.pkgs.length), this.doLoaded({
-packages: this.pkgs
+gotPackageData: function(e) {
+this.pkgs = e, this.$.repeater.setCount(this.pkgs.length), this.doLoaded({
+packages: this.pkgs,
+version: this.version
});
},
loadPackageData: function() {
this.pkgs ? this.gotPackageData(this.pkgs) : this.fetchPackageData();
},
savePackageData: function() {},
-setupItem: function(a, b) {
-var c = this.pkgs[b.index], d = b.item.$.checkbox;
-d.setContent(c.name), d.setChecked(!c.disabled);
-},
-cbChange: function(a, b) {
-var c = b.index, d = this.pkgs[c];
-d && (d.disabled = !a.getChecked(), this.savePackageData()), this.doPackagesChange({
-pkg: d
+setupItem: function(e, t) {
+var n = this.pkgs[t.index], r = t.item.$.checkbox;
+r.setContent(n.name), r.setChecked(!n.disabled);
+},
+cbChange: function(e, t) {
+var n = t.index, r = this.pkgs[n];
+r && (r.disabled = !e.getChecked(), this.savePackageData()), this.doPackagesChange({
+pkg: r
});
}
});
@@ -2933,19 +2950,19 @@ fit: !0
create: function() {
this.inherited(arguments), this.selectTab(0);
},
-addControl: function(a) {
-a.isChrome || (a.addClass("enyo-fit"), a.showing = !1, this.$.tabs.createComponent({
-content: a.tabName || a.name,
+addControl: function(e) {
+e.isChrome || (e.addClass("enyo-fit"), e.showing = !1, this.$.tabs.createComponent({
+content: e.tabName || e.name,
ontap: "tabTap",
owner: this
})), this.inherited(arguments);
},
-selectTab: function(a) {
-this.$.tabs.getControls()[a].setActive(!0);
-for (var b = 0, c = this.getClientControls(), d; d = c[b]; b++) d.setShowing(b == a);
+selectTab: function(e) {
+this.$.tabs.getControls()[e].setActive(!0);
+for (var t = 0, n = this.getClientControls(), r; r = n[t]; t++) r.setShowing(t == e);
},
-tabTap: function(a) {
-this.selectTab(a.indexInContainer());
+tabTap: function(e) {
+this.selectTab(e.indexInContainer());
}
});
@@ -3077,120 +3094,124 @@ this.inherited(arguments), window.onhashchange = enyo.bind(this, "hashChange"),
loadPackages: function() {
this.index = this.$.analyzer.index = new Indexer, this.$.packages.loadPackageData();
},
-packagesLoaded: function(a, b) {
-var c = [];
-return enyo.forEach(b.packages, function(a) {
-a.disabled || c.push({
-path: a.path,
-label: a.name
+packagesLoaded: function(e, t) {
+document.title = "Enyo API Viewer (" + t.version + ")";
+var n = [];
+return enyo.forEach(t.packages, function(e) {
+e.disabled || n.push({
+path: e.path,
+label: e.name
});
-}), this.walk(c), !0;
+}), this.walk(n), !0;
},
-walk: function(a) {
-this.walking = !0, this.$.indexBusy.show(), this.$.analyzer.walk(a);
+walk: function(e) {
+this.walking = !0, this.$.indexBusy.show(), this.$.analyzer.walk(e);
},
indexReady: function() {
this.presentKinds(), this.presentModules(), this.presentIndex(), this.$.indexBusy.hide(), this.walking = !1, this.hashChange();
},
-indexalize: function(a, b, c) {
-var d = a ? enyo.filter(this.index.objects, a, this) : this.index.objects;
-d = this.nameFilter(d);
-var e = "", f;
-for (var g = 0, h; h = d[g]; g++) {
-var i = c(h).divider;
-i && f != i && (f = i, e += "<divider>" + i + "</divider>"), e += enyo.macroize(b, c(h));
+indexalize: function(e, t, n) {
+var r = e ? enyo.filter(this.index.objects, e, this) : this.index.objects;
+r = this.nameFilter(r);
+var i = "", s;
+for (var o = 0, u; u = r[o]; o++) {
+var a = n(u).divider;
+a && s != a && (s = a, i += "<divider>" + a + "</divider>"), i += enyo.macroize(t, n(u));
}
-return e;
+return i;
},
-nameFilter: function(a) {
-return enyo.filter(a, function(a) {
-return a.name && a.name[0] !== "_";
+nameFilter: function(e) {
+return enyo.filter(e, function(e) {
+return e.name && e.name[0] !== "_";
});
},
-presentFilteredIndex: function(a) {
-var b = '<a href="#{$link}"><prototype>{$object}</prototype><topic>{$topic}</topic>{$module}</a><br/>', c = function(a) {
+presentFilteredIndex: function(e) {
+var t = '<a href="#{$link}"><prototype>{$object}</prototype><topic>{$topic}</topic>{$module}</a><br/>', n = function(e) {
return {
-link: a.topic || a.name,
-topic: a.name,
-divider: a.name[0].toUpperCase(),
-object: a.object && a.object.name ? a.object.name + "::" : "",
-module: !a.object && a.module && a.module.name ? " [" + a.module.name + "]" : ""
+link: e.topic || e.name,
+topic: e.name,
+divider: e.name[0].toUpperCase(),
+object: e.object && e.object.name ? e.object.name + "::" : "",
+module: !e.object && e.module && e.module.name ? " [" + e.module.name + "]" : ""
};
};
-this.$.index.setContent(this.indexalize(a, b, c));
+this.$.index.setContent(this.indexalize(e, t, n));
},
presentIndex: function() {
-var a = function(a) {
-return a.name !== "published" && (a.group == "public" || a.group == "published");
+var e = function(e) {
+return e.name !== "published" && (e.group == "public" || e.group == "published");
};
-this.presentFilteredIndex(a);
+this.presentFilteredIndex(e);
},
presentModules: function() {
-var a = function(a) {
-return a.type == "module";
-}, b = '<a href="#{$link}"><topic>{$topic}</topic></a><br/>', c = function(a) {
+var e = function(e) {
+return e.type == "module";
+}, t = '<a href="#{$link}"><topic>{$topic}</topic></a><br/>', n = function(e) {
return {
-link: a.topic || a.name,
-topic: a.name,
-divider: a.name[0].toUpperCase()
+link: e.topic || e.name,
+topic: e.name,
+divider: e.name[0].toUpperCase()
};
};
-this.$.modules.setContent(this.indexalize(a, b, c));
+this.$.modules.setContent(this.indexalize(e, t, n));
},
presentKinds: function() {
-var a = function(a) {
-return a.type == "kind" && a.group == "public";
-}, b = '<a href="#{$link}"><topic>{$topic}</topic></a><br/>', c = function(a) {
+var e = function(e) {
+return e.type == "kind" && e.group == "public";
+}, t = '<a href="#{$link}"><topic>{$topic}</topic></a><br/>', n = function(e) {
return {
-link: a.topic || a.name,
-topic: a.name,
-divider: a.name.split(".")[0]
+link: e.topic || e.name,
+topic: e.name,
+divider: e.name.split(".")[0]
};
};
-this.$.kinds.setContent(this.indexalize(a, b, c));
+this.$.kinds.setContent(this.indexalize(e, t, n));
},
-presentObject: function(a) {
-switch (a && a.type) {
-case "kind":
-this.presentKind(a);
-break;
-default:
-this.$.header.setContent(""), this.$.toc.setContent(""), this.$.doc.reflow();
-var b = "";
-a && (b = this.presentor.presentObject(a)), this.$.body.setContent(b);
+presentObject: function(e) {
+if (!e || !e.type) return;
+if (e.type === "kind") {
+this.$.header.show(), this.presentKind(e);
+return;
}
-},
-presentKind: function(a) {
-this.$.header.setContent(this.presentor.presentKindHeader(a));
-var b = this.presentor.showInherited ? a.allProperties : a.properties;
-b.sort(Indexer.nameCompare);
-var c = this.presentor.presentColumns(b, a);
-this.$.toc.setContent(c);
-var d = this.presentor.presentKindSummary(a), b = this.presentor.presentKindProperties(a);
-b && (d += "<h3>Properties</h3>" + b), this.$.body.setContent(d), this.$.doc.reflow();
-},
-presentModule: function(a) {
-this.presentObject(a);
-},
-moduleTap: function(a) {
-this.presentModule(a.object);
-},
-objectTap: function(a) {
-this.presentObject(a.object);
-},
-hashChange: function(a) {
+e.type === "module" ? (this.$.header.show(), this.$.header.setContent("<moduleName>" + e.name + "</moduleName>")) : (this.$.header.hide(), this.$.header.setContent("")), this.$.toc.setContent(""), this.$.doc.reflow();
+var t = "";
+e && (t = this.presentor.presentObject(e)), this.$.body.setContent(t);
+},
+presentKind: function(e) {
+this.$.header.setContent(this.presentor.presentKindHeader(e));
+var t = this.presentor.showInherited ? e.allProperties : e.properties;
+t = this.presentor.inlineProperties(t, {
+published: 1,
+statics: 1,
+events: 1
+}), t.sort(Indexer.nameCompare);
+var n = this.presentor.presentColumns(t, e);
+this.$.toc.setContent(n);
+var r = this.presentor.presentKindSummary(e), i = this.presentor.presentKindProperties(e);
+i && (r += "<h3>Properties</h3>" + i), this.$.body.setContent(r), this.$.doc.reflow();
+},
+presentModule: function(e) {
+this.presentObject(e);
+},
+moduleTap: function(e) {
+this.presentModule(e.object);
+},
+objectTap: function(e) {
+this.presentObject(e.object);
+},
+hashChange: function(e) {
this.selectTopic(this.getHashTopic());
},
getHashTopic: function() {
return window.location.hash.slice(1);
},
-selectTopic: function(a) {
-this.topic = a;
-var b = a.split("::"), c = b.shift(), d = b.shift(), e = this.index.findByName(c) || this.index.findByName("enyo." + c);
-this.topicObject != e && (this.presentObject(e), this.topicObject = e, this.$.body.container.setScrollTop(0));
-if (d) {
-var f = document.getElementsByName(d)[0];
-f && f.scrollIntoView(!0);
+selectTopic: function(e) {
+this.topic = e;
+var t = e.split("::"), n = t.shift(), r = t.shift(), i = this.index.findByName(n) || this.index.findByName("enyo." + n);
+this.topicObject != i && (this.presentObject(i), this.topicObject = i, this.$.body.container.setScrollTop(0));
+if (r) {
+var s = document.getElementsByName(r)[0];
+s && s.scrollIntoView(!0);
}
},
scopeChange: function() {
@@ -3199,13 +3220,13 @@ this.presentor.showInherited = this.$.inheritedCb.getValue(), this.topicObject =
accessChange: function() {
this.presentor.showProtected = this.$.accessCb.getValue(), this.topicObject = null, this.selectTopic(this.topic);
},
-search: function(a, b) {
-this.setSearchString(b.searchString.toLowerCase());
+search: function(e, t) {
+this.setSearchString(t.searchString.toLowerCase());
},
-setSearchString: function(a) {
-var b = function(b) {
-return b.name !== "published" && (b.group == "public" || b.group == "published") && b.name.toLowerCase().indexOf(a) >= 0;
+setSearchString: function(e) {
+var t = function(t) {
+return t.name !== "published" && (t.group == "public" || t.group == "published") && t.name.toLowerCase().indexOf(e) >= 0;
};
-this.presentFilteredIndex(b);
+this.presentFilteredIndex(t);
}
});
diff --git a/api/build/enyo.js b/api/build/enyo.js
index f65fb62..36b630d 100644
--- a/api/build/enyo.js
+++ b/api/build/enyo.js
@@ -2,21 +2,21 @@
// enyo.js
(function() {
-var a = "enyo.js";
-enyo = window.enyo || {}, enyo.locateScript = function(a) {
-var b = document.getElementsByTagName("script");
-for (var c = b.length - 1, d, e, f = a.length; c >= 0 && (d = b[c]); c--) if (!d.located) {
-e = d.getAttribute("src") || "";
-if (e.slice(-f) == a) return d.located = !0, {
-path: e.slice(0, Math.max(0, e.lastIndexOf("/"))),
-node: d
+var e = "enyo.js";
+enyo = window.enyo || {}, enyo.locateScript = function(e) {
+var t = document.getElementsByTagName("script");
+for (var n = t.length - 1, r, i, s = e.length; n >= 0 && (r = t[n]); n--) if (!r.located) {
+i = r.getAttribute("src") || "";
+if (i.slice(-s) == e) return r.located = !0, {
+path: i.slice(0, Math.max(0, i.lastIndexOf("/"))),
+node: r
};
}
}, enyo.args = enyo.args || {};
-var b = enyo.locateScript(a);
-if (b) {
-enyo.args.root = (enyo.args.root || b.path).replace("/source", "");
-for (var c = 0, d; d = b.node.attributes.item(c); c++) enyo.args[d.nodeName] = d.value;
+var t = enyo.locateScript(e);
+if (t) {
+enyo.args.root = (enyo.args.root || t.path).replace("/source", "");
+for (var n = 0, r; r = t.node.attributes.item(n); n++) enyo.args[r.nodeName] = r.value;
}
})();
@@ -25,37 +25,37 @@ for (var c = 0, d; d = b.node.attributes.item(c); c++) enyo.args[d.nodeName] = d
(function() {
enyo = window.enyo || {}, enyo.path = {
paths: {},
-addPath: function(a, b) {
-return this.paths[a] = b;
+addPath: function(e, t) {
+return this.paths[e] = t;
},
-addPaths: function(a) {
-if (a) for (var b in a) this.addPath(b, a[b]);
+addPaths: function(e) {
+if (e) for (var t in e) this.addPath(t, e[t]);
},
-includeTrailingSlash: function(a) {
-return a && a.slice(-1) !== "/" ? a + "/" : a;
+includeTrailingSlash: function(e) {
+return e && e.slice(-1) !== "/" ? e + "/" : e;
},
rewritePattern: /\$([^\/\\]*)(\/)?/g,
-rewrite: function(a) {
-var b, c = this.includeTrailingSlash, d = this.paths, e = function(a, e) {
-return b = !0, c(d[e]) || "";
-}, f = a;
-do b = !1, f = f.replace(this.rewritePattern, e); while (b);
-return f;
-}
-}, enyo.loaderFactory = function(a) {
-this.machine = a, this.packages = [], this.modules = [], this.sheets = [], this.stack = [];
+rewrite: function(e) {
+var t, n = this.includeTrailingSlash, r = this.paths, i = function(e, i) {
+return t = !0, n(r[i]) || "";
+}, s = e;
+do t = !1, s = s.replace(this.rewritePattern, i); while (t);
+return s;
+}
+}, enyo.loaderFactory = function(e) {
+this.machine = e, this.packages = [], this.modules = [], this.sheets = [], this.stack = [];
}, enyo.loaderFactory.prototype = {
packageName: "",
packageFolder: "",
verbose: !1,
-loadScript: function(a) {
-this.machine.script(a);
+loadScript: function(e) {
+this.machine.script(e);
},
-loadSheet: function(a) {
-this.machine.sheet(a);
+loadSheet: function(e) {
+this.machine.sheet(e);
},
-loadPackage: function(a) {
-this.machine.script(a);
+loadPackage: function(e) {
+this.machine.script(e);
},
report: function() {},
load: function() {
@@ -64,77 +64,77 @@ index: 0,
depends: arguments || []
});
},
-more: function(a) {
-if (a && this.continueBlock(a)) return;
-var b = this.stack.pop();
-b ? (this.verbose && console.groupEnd("* finish package (" + (b.packageName || "anon") + ")"), this.packageFolder = b.folder, this.packageName = "", this.more(b)) : this.finish();
+more: function(e) {
+if (e && this.continueBlock(e)) return;
+var t = this.stack.pop();
+t ? (this.verbose && console.groupEnd("* finish package (" + (t.packageName || "anon") + ")"), this.packageFolder = t.folder, this.packageName = "", this.more(t)) : this.finish();
},
finish: function() {
-this.packageFolder = "", this.verbose && console.log("-------------- fini");
+this.packageFolder = "", this.verbose && console.log("-------------- fini"), this.finishCallback && this.finishCallback();
},
-continueBlock: function(a) {
-while (a.index < a.depends.length) {
-var b = a.depends[a.index++];
-if (b) if (typeof b == "string") {
-if (this.require(b, a)) return !0;
-} else enyo.path.addPaths(b);
+continueBlock: function(e) {
+while (e.index < e.depends.length) {
+var t = e.depends[e.index++];
+if (t) if (typeof t == "string") {
+if (this.require(t, e)) return !0;
+} else enyo.path.addPaths(t);
}
},
-require: function(a, b) {
-var c = enyo.path.rewrite(a), d = this.getPathPrefix(a);
-c = d + c;
-if (c.slice(-3) == "css") this.verbose && console.log("+ stylesheet: [" + d + "][" + a + "]"), this.requireStylesheet(c); else {
-if (c.slice(-2) != "js" || c.slice(-10) == "package.js") return this.requirePackage(c, b), !0;
-this.verbose && console.log("+ module: [" + d + "][" + a + "]"), this.requireScript(a, c);
+require: function(e, t) {
+var n = enyo.path.rewrite(e), r = this.getPathPrefix(e);
+n = r + n;
+if (n.slice(-3) == "css") this.verbose && console.log("+ stylesheet: [" + r + "][" + e + "]"), this.requireStylesheet(n); else {
+if (n.slice(-2) != "js" || n.slice(-10) == "package.js") return this.requirePackage(n, t), !0;
+this.verbose && console.log("+ module: [" + r + "][" + e + "]"), this.requireScript(e, n);
}
},
-getPathPrefix: function(a) {
-var b = a.slice(0, 1);
-return b != "/" && b != "\\" && b != "$" && a.slice(0, 5) != "http:" ? this.packageFolder : "";
+getPathPrefix: function(e) {
+var t = e.slice(0, 1);
+return t != "/" && t != "\\" && t != "$" && e.slice(0, 5) != "http:" ? this.packageFolder : "";
},
-requireStylesheet: function(a) {
-this.sheets.push(a), this.loadSheet(a);
+requireStylesheet: function(e) {
+this.sheets.push(e), this.loadSheet(e);
},
-requireScript: function(a, b) {
+requireScript: function(e, t) {
this.modules.push({
packageName: this.packageName,
-rawPath: a,
-path: b
-}), this.loadScript(b);
-},
-decodePackagePath: function(a) {
-var b = "", c = "", d = "", e = "package.js", f = a.replace(/\\/g, "/").replace(/\/\//g, "/").replace(/:\//, "://").split("/");
-if (f.length) {
-var g = f.pop() || f.pop() || "";
-g.slice(-e.length) !== e ? f.push(g) : e = g, d = f.join("/"), d = d ? d + "/" : "", e = d + e;
-for (var h = f.length - 1; h >= 0; h--) if (f[h] == "source") {
-f.splice(h, 1);
+rawPath: e,
+path: t
+}), this.loadScript(t);
+},
+decodePackagePath: function(e) {
+var t = "", n = "", r = "", i = "package.js", s = e.replace(/\\/g, "/").replace(/\/\//g, "/").replace(/:\//, "://").split("/");
+if (s.length) {
+var o = s.pop() || s.pop() || "";
+o.slice(-i.length) !== i ? s.push(o) : i = o, r = s.join("/"), r = r ? r + "/" : "", i = r + i;
+for (var u = s.length - 1; u >= 0; u--) if (s[u] == "source") {
+s.splice(u, 1);
break;
}
-c = f.join("/");
-for (var h = f.length - 1, i; i = f[h]; h--) if (i == "lib" || i == "enyo") {
-f = f.slice(h + 1);
+n = s.join("/");
+for (var u = s.length - 1, a; a = s[u]; u--) if (a == "lib" || a == "enyo") {
+s = s.slice(u + 1);
break;
}
-for (var h = f.length - 1, i; i = f[h]; h--) (i == ".." || i == ".") && f.splice(h, 1);
-b = f.join("-");
+for (var u = s.length - 1, a; a = s[u]; u--) (a == ".." || a == ".") && s.splice(u, 1);
+t = s.join("-");
}
return {
-alias: b,
-target: c,
-folder: d,
-manifest: e
+alias: t,
+target: n,
+folder: r,
+manifest: i
};
},
-aliasPackage: function(a) {
-var b = this.decodePackagePath(a);
-this.manifest = b.manifest, b.alias && (enyo.path.addPath(b.alias, b.target), this.packageName = b.alias, this.packages.push({
-name: b.alias,
-folder: b.folder
-})), this.packageFolder = b.folder;
+aliasPackage: function(e) {
+var t = this.decodePackagePath(e);
+this.manifest = t.manifest, t.alias && (enyo.path.addPath(t.alias, t.target), this.packageName = t.alias, this.packages.push({
+name: t.alias,
+folder: t.folder
+})), this.packageFolder = t.folder;
},
-requirePackage: function(a, b) {
-b.folder = this.packageFolder, this.aliasPackage(a), b.packageName = this.packageName, this.stack.push(b), this.report("loading package", this.packageName), this.verbose && console.group("* start package [" + this.packageName + "]"), this.loadPackage(this.manifest);
+requirePackage: function(e, t) {
+t.folder = this.packageFolder, this.aliasPackage(e), t.packageName = this.packageName, this.stack.push(t), this.report("loading package", this.packageName), this.verbose && console.group("* start package [" + this.packageName + "]"), this.loadPackage(this.manifest);
}
};
})();
@@ -142,23 +142,45 @@ b.folder = this.packageFolder, this.aliasPackage(a), b.packageName = this.packag
// boot.js
enyo.machine = {
-sheet: function(a) {
-document.write('<link href="' + a + '" media="screen" rel="stylesheet" type="text/css" />');
+sheet: function(e) {
+if (!enyo.runtimeLoading) document.write('<link href="' + e + '" media="screen" rel="stylesheet" type="text/css" />'); else {
+var t = document.createElement("link");
+t.href = e, t.media = "screen", t.rel = "stylesheet", t.type = "text/css", document.getElementsByTagName("head")[0].appendChild(t);
+}
},
-script: function(a, b, c) {
-document.write('<script src="' + a + '"' + (b ? ' onload="' + b + '"' : "") + (c ? ' onerror="' + c + '"' : "") + "></scri" + "pt>");
+script: function(e, t, n) {
+if (!enyo.runtimeLoading) document.write('<script src="' + e + '"' + (t ? ' onload="' + t + '"' : "") + (n ? ' onerror="' + n + '"' : "") + "></scri" + "pt>"); else {
+var r = document.createElement("script");
+r.src = e, r.onLoad = t, r.onError = n, document.getElementsByTagName("head")[0].appendChild(r);
+}
},
-inject: function(a) {
-document.write('<script type="text/javascript">' + a + "</script>");
+inject: function(e) {
+document.write('<script type="text/javascript">' + e + "</script>");
}
}, enyo.loader = new enyo.loaderFactory(enyo.machine), enyo.depends = function() {
-var a = enyo.loader;
-if (!a.packageFolder) {
-var b = enyo.locateScript("package.js");
-b && b.path && (a.aliasPackage(b.path), a.packageFolder = b.path + "/");
+var e = enyo.loader;
+if (!e.packageFolder) {
+var t = enyo.locateScript("package.js");
+t && t.path && (e.aliasPackage(t.path), e.packageFolder = t.path + "/");
+}
+e.load.apply(e, arguments);
+}, function() {
+function n(r) {
+r && r();
+if (t.length) {
+var i = t.shift(), s = i[0], o = e.isArray(s) ? s : [ s ], u = i[1];
+e.loader.finishCallback = function() {
+n(function() {
+u && u(s);
+});
+}, e.loader.packageFolder = "./", e.depends.apply(this, o);
+} else e.runtimeLoading = !1, e.loader.finishCallback = null, e.loader.packageFolder = "";
}
-a.load.apply(a, arguments);
-}, enyo.path.addPaths({
+var e = window.enyo, t = [];
+e.load = function(r, i) {
+t.push(arguments), e.runtimeLoading || (e.runtimeLoading = !0, n());
+};
+}(), enyo.path.addPaths({
enyo: enyo.args.root,
lib: "$enyo/../lib"
});
@@ -172,22 +194,22 @@ log: 20,
warn: 10,
error: 0
},
-shouldLog: function(a) {
-var b = parseInt(this.levels[a], 0);
-return b <= this.level;
+shouldLog: function(e) {
+var t = parseInt(this.levels[e], 0);
+return t <= this.level;
},
-_log: function(a, b) {
-var c = enyo.isArray(b) ? b : enyo.cloneArray(b);
-enyo.dumbConsole && (c = [ c.join(" ") ]);
-var d = console[a];
-d && d.apply ? d.apply(console, c) : console.log.apply ? console.log.apply(console, c) : console.log(c.join(" "));
+_log: function(e, t) {
+var n = enyo.isArray(t) ? t : enyo.cloneArray(t);
+enyo.dumbConsole && (n = [ n.join(" ") ]);
+var r = console[e];
+r && r.apply ? r.apply(console, n) : console.log.apply ? console.log.apply(console, n) : console.log(n.join(" "));
},
-log: function(a, b) {
-window.console && this.shouldLog(a) && this._log(a, b);
+log: function(e, t) {
+window.console && this.shouldLog(e) && this._log(e, t);
}
-}, enyo.setLogLevel = function(a) {
-var b = parseInt(a, 0);
-isFinite(b) && (enyo.logging.level = b);
+}, enyo.setLogLevel = function(e) {
+var t = parseInt(e, 0);
+isFinite(t) && (enyo.logging.level = t);
}, enyo.log = function() {
enyo.logging.log("log", arguments);
}, enyo.warn = function() {
@@ -199,244 +221,250 @@ enyo.logging.log("error", arguments);
// lang.js
(function() {
-enyo.global = this, enyo._getProp = function(a, b, c) {
-var d = c || enyo.global;
-for (var e = 0, f; d && (f = a[e]); e++) d = f in d ? d[f] : b ? d[f] = {} : undefined;
-return d;
-}, enyo.setObject = function(a, b, c) {
-var d = a.split("."), e = d.pop(), f = enyo._getProp(d, !0, c);
-return f && e ? f[e] = b : undefined;
-}, enyo.getObject = function(a, b, c) {
-return enyo._getProp(a.split("."), b, c);
-}, enyo.irand = function(a) {
-return Math.floor(Math.random() * a);
-}, enyo.cap = function(a) {
-return a.slice(0, 1).toUpperCase() + a.slice(1);
-}, enyo.uncap = function(a) {
-return a.slice(0, 1).toLowerCase() + a.slice(1);
-}, enyo.format = function(a) {
-var b = /\%./g, c = 0, d = a, e = arguments, f = function(a) {
-return e[++c];
+enyo.global = this, enyo._getProp = function(e, t, n) {
+var r = n || enyo.global;
+for (var i = 0, s; r && (s = e[i]); i++) r = s in r ? r[s] : t ? r[s] = {} : undefined;
+return r;
+}, enyo.setObject = function(e, t, n) {
+var r = e.split("."), i = r.pop(), s = enyo._getProp(r, !0, n);
+return s && i ? s[i] = t : undefined;
+}, enyo.getObject = function(e, t, n) {
+return enyo._getProp(e.split("."), t, n);
+}, enyo.irand = function(e) {
+return Math.floor(Math.random() * e);
+}, enyo.cap = function(e) {
+return e.slice(0, 1).toUpperCase() + e.slice(1);
+}, enyo.uncap = function(e) {
+return e.slice(0, 1).toLowerCase() + e.slice(1);
+}, enyo.format = function(e) {
+var t = /\%./g, n = 0, r = e, i = arguments, s = function(e) {
+return i[++n];
};
-return d.replace(b, f);
+return r.replace(t, s);
};
-var a = Object.prototype.toString;
-enyo.isString = function(b) {
-return a.call(b) === "[object String]";
-}, enyo.isFunction = function(b) {
-return a.call(b) === "[object Function]";
-}, enyo.isArray = Array.isArray || function(b) {
-return a.call(b) === "[object Array]";
-}, enyo.indexOf = function(a, b, c) {
-if (b.indexOf) return b.indexOf(a, c);
-if (c) {
-c < 0 && (c = 0);
-if (c > b.length) return -1;
-}
-for (var d = c || 0, e = b.length, f; (f = b[d]) || d < e; d++) if (f == a) return d;
+var e = Object.prototype.toString;
+enyo.isString = function(t) {
+return e.call(t) === "[object String]";
+}, enyo.isFunction = function(t) {
+return e.call(t) === "[object Function]";
+}, enyo.isArray = Array.isArray || function(t) {
+return e.call(t) === "[object Array]";
+}, enyo.indexOf = function(e, t, n) {
+if (t.indexOf) return t.indexOf(e, n);
+if (n) {
+n < 0 && (n = 0);
+if (n > t.length) return -1;
+}
+for (var r = n || 0, i = t.length, s; (s = t[r]) || r < i; r++) if (s == e) return r;
return -1;
-}, enyo.remove = function(a, b) {
-var c = enyo.indexOf(a, b);
-c >= 0 && b.splice(c, 1);
-}, enyo.forEach = function(a, b, c) {
-if (a) {
-var d = c || this;
-if (enyo.isArray(a) && a.forEach) a.forEach(b, d); else {
-var e = Object(a), f = e.length >>> 0;
-for (var g = 0; g < f; g++) g in e && b.call(d, e[g], g, e);
-}
-}
-}, enyo.map = function(a, b, c) {
-var d = c || this;
-if (enyo.isArray(a) && a.map) return a.map(b, d);
-var e = [], f = function(a, c, f) {
-e.push(b.call(d, a, c, f));
+}, enyo.remove = function(e, t) {
+var n = enyo.indexOf(e, t);
+n >= 0 && t.splice(n, 1);
+}, enyo.forEach = function(e, t, n) {
+if (e) {
+var r = n || this;
+if (enyo.isArray(e) && e.forEach) e.forEach(t, r); else {
+var i = Object(e), s = i.length >>> 0;
+for (var o = 0; o < s; o++) o in i && t.call(r, i[o], o, i);
+}
+}
+}, enyo.map = function(e, t, n) {
+var r = n || this;
+if (enyo.isArray(e) && e.map) return e.map(t, r);
+var i = [], s = function(e, n, s) {
+i.push(t.call(r, e, n, s));
};
-return enyo.forEach(a, f, d), e;
-}, enyo.filter = function(a, b, c) {
-var d = c || this;
-if (enyo.isArray(a) && a.filter) return a.filter(b, d);
-var e = [], f = function(a, c, f) {
-var g = a;
-b.call(d, a, c, f) && e.push(g);
+return enyo.forEach(e, s, r), i;
+}, enyo.filter = function(e, t, n) {
+var r = n || this;
+if (enyo.isArray(e) && e.filter) return e.filter(t, r);
+var i = [], s = function(e, n, s) {
+var o = e;
+t.call(r, e, n, s) && i.push(o);
};
-return enyo.forEach(a, f, d), e;
-}, enyo.keys = Object.keys || function(a) {
-var b = [], c = Object.prototype.hasOwnProperty;
-for (var d in a) c.call(a, d) && b.push(d);
+return enyo.forEach(e, s, r), i;
+}, enyo.keys = Object.keys || function(e) {
+var t = [], n = Object.prototype.hasOwnProperty;
+for (var r in e) n.call(e, r) && t.push(r);
if (!{
toString: null
}.propertyIsEnumerable("toString")) {
-var e = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ];
-for (var f = 0, g; g = e[f]; f++) c.call(a, g) && b.push(g);
-}
-return b;
-}, enyo.cloneArray = function(a, b, c) {
-var d = c || [];
-for (var e = b || 0, f = a.length; e < f; e++) d.push(a[e]);
-return d;
-}, enyo.toArray = enyo.cloneArray, enyo.clone = function(a) {
-return enyo.isArray(a) ? enyo.cloneArray(a) : enyo.mixin({}, a);
+var i = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor" ];
+for (var s = 0, o; o = i[s]; s++) n.call(e, o) && t.push(o);
+}
+return t;
+}, enyo.cloneArray = function(e, t, n) {
+var r = n || [];
+for (var i = t || 0, s = e.length; i < s; i++) r.push(e[i]);
+return r;
+}, enyo.toArray = enyo.cloneArray, enyo.clone = function(e) {
+return enyo.isArray(e) ? enyo.cloneArray(e) : enyo.mixin({}, e);
};
-var b = {};
-enyo.mixin = function(a, c) {
-a = a || {};
-if (c) {
-var d, e, f;
-for (d in c) e = c[d], b[d] !== e && (a[d] = e);
-}
-return a;
-}, enyo.bind = function(a, b) {
-b || (b = a, a = null), a = a || enyo.global;
-if (enyo.isString(b)) {
-if (!a[b]) throw [ 'enyo.bind: scope["', b, '"] is null (scope="', a, '")' ].join("");
-b = a[b];
-}
-if (enyo.isFunction(b)) {
-var c = enyo.cloneArray(arguments, 2);
-return b.bind ? b.bind.apply(b, [ a ].concat(c)) : function() {
-var d = enyo.cloneArray(arguments);
-return b.apply(a, c.concat(d));
+var t = {};
+enyo.mixin = function(e, n) {
+e = e || {};
+if (n) {
+var r, i, s;
+for (r in n) i = n[r], t[r] !== i && (e[r] = i);
+}
+return e;
+}, enyo.bind = function(e, t) {
+t || (t = e, e = null), e = e || enyo.global;
+if (enyo.isString(t)) {
+if (!e[t]) throw [ 'enyo.bind: scope["', t, '"] is null (scope="', e, '")' ].join("");
+t = e[t];
+}
+if (enyo.isFunction(t)) {
+var n = enyo.cloneArray(arguments, 2);
+return t.bind ? t.bind.apply(t, [ e ].concat(n)) : function() {
+var r = enyo.cloneArray(arguments);
+return t.apply(e, n.concat(r));
};
}
-throw [ 'enyo.bind: scope["', b, '"] is not a function (scope="', a, '")' ].join("");
-}, enyo.asyncMethod = function(a, b) {
+throw [ 'enyo.bind: scope["', t, '"] is not a function (scope="', e, '")' ].join("");
+}, enyo.asyncMethod = function(e, t) {
return setTimeout(enyo.bind.apply(enyo, arguments), 1);
-}, enyo.call = function(a, b, c) {
-var d = a || this;
-if (b) {
-var e = d[b] || b;
-if (e && e.apply) return e.apply(d, c || []);
+}, enyo.call = function(e, t, n) {
+var r = e || this;
+if (t) {
+var i = r[t] || t;
+if (i && i.apply) return i.apply(r, n || []);
}
}, enyo.now = Date.now || function() {
return (new Date).getTime();
-}, enyo.nop = function() {}, enyo.nob = {}, enyo.nar = [], enyo.instance = function() {}, enyo.setPrototype || (enyo.setPrototype = function(a, b) {
-a.prototype = b;
-}), enyo.delegate = function(a) {
-return enyo.setPrototype(enyo.instance, a), new enyo.instance;
+}, enyo.nop = function() {}, enyo.nob = {}, enyo.nar = [], enyo.instance = function() {}, enyo.setPrototype || (enyo.setPrototype = function(e, t) {
+e.prototype = t;
+}), enyo.delegate = function(e) {
+return enyo.setPrototype(enyo.instance, e), new enyo.instance;
};
})();
// job.js
-enyo.job = function(a, b, c) {
-enyo.job.stop(a), enyo.job._jobs[a] = setTimeout(function() {
-enyo.job.stop(a), b();
-}, c);
-}, enyo.job.stop = function(a) {
-enyo.job._jobs[a] && (clearTimeout(enyo.job._jobs[a]), delete enyo.job._jobs[a]);
+enyo.job = function(e, t, n) {
+enyo.job.stop(e), enyo.job._jobs[e] = setTimeout(function() {
+enyo.job.stop(e), t();
+}, n);
+}, enyo.job.stop = function(e) {
+enyo.job._jobs[e] && (clearTimeout(enyo.job._jobs[e]), delete enyo.job._jobs[e]);
}, enyo.job._jobs = {};
// macroize.js
-enyo.macroize = function(a, b, c) {
-var d, e, f = a, g = c || enyo.macroize.pattern, h = function(a, c) {
-return d = enyo.getObject(c, !1, b), d === undefined || d === null ? "{$" + c + "}" : (e = !0, d);
-}, i = 0;
+enyo.macroize = function(e, t, n) {
+var r, i, s = e, o = n || enyo.macroize.pattern, u = function(e, n) {
+return r = enyo.getObject(n, !1, t), r === undefined || r === null ? "{$" + n + "}" : (i = !0, r);
+}, a = 0;
do {
-e = !1, f = f.replace(g, h);
-if (++i >= 20) throw "enyo.macroize: recursion too deep";
-} while (e);
-return f;
-}, enyo.quickMacroize = function(a, b, c) {
-var d, e, f = a, g = c || enyo.macroize.pattern, h = function(a, c) {
-return c in b ? d = b[c] : d = enyo.getObject(c, !1, b), d === undefined || d === null ? "{$" + c + "}" : d;
+i = !1, s = s.replace(o, u);
+if (++a >= 20) throw "enyo.macroize: recursion too deep";
+} while (i);
+return s;
+}, enyo.quickMacroize = function(e, t, n) {
+var r, i, s = e, o = n || enyo.macroize.pattern, u = function(e, n) {
+return n in t ? r = t[n] : r = enyo.getObject(n, !1, t), r === undefined || r === null ? "{$" + n + "}" : r;
};
-return f = f.replace(g, h), f;
+return s = s.replace(o, u), s;
}, enyo.macroize.pattern = /\{\$([^{}]*)\}/g;
// animation.js
(function() {
-var a = Math.round(1e3 / 60), b = [ "webkit", "moz", "ms", "o", "" ], c = "requestAnimationFrame", d = "cancel" + enyo.cap(c), e = function(b) {
-return window.setTimeout(b, a);
-}, f = function(a) {
-return window.clearTimeout(a);
+var e = Math.round(1e3 / 60), t = [ "webkit", "moz", "ms", "o", "" ], n = "requestAnimationFrame", r = "cancel" + enyo.cap(n), i = function(t) {
+return window.setTimeout(t, e);
+}, s = function(e) {
+return window.clearTimeout(e);
};
-for (var g = 0, h = b.length, i, j, k; (i = b[g]) || g < h; g++) {
-j = i ? i + enyo.cap(d) : d, k = i ? i + enyo.cap(c) : c;
-if (window[j]) {
-f = window[j], e = window[k], i == "webkit" && f(e(enyo.nop));
+for (var o = 0, u = t.length, a, f, l; (a = t[o]) || o < u; o++) {
+f = a ? a + enyo.cap(r) : r, l = a ? a + enyo.cap(n) : n;
+if (window[f]) {
+s = window[f], i = window[l], a == "webkit" && s(i(enyo.nop));
break;
}
}
-enyo.requestAnimationFrame = function(a, b) {
-return e(a, b);
-}, enyo.cancelRequestAnimationFrame = function(a) {
-return f(a);
+enyo.requestAnimationFrame = function(e, t) {
+return i(e, t);
+}, enyo.cancelRequestAnimationFrame = function(e) {
+return s(e);
};
})(), enyo.easing = {
-cubicIn: function(a) {
-return Math.pow(a, 3);
+cubicIn: function(e) {
+return Math.pow(e, 3);
},
-cubicOut: function(a) {
-return Math.pow(a - 1, 3) + 1;
+cubicOut: function(e) {
+return Math.pow(e - 1, 3) + 1;
},
-expoOut: function(a) {
-return a == 1 ? 1 : -1 * Math.pow(2, -10 * a) + 1;
+expoOut: function(e) {
+return e == 1 ? 1 : -1 * Math.pow(2, -10 * e) + 1;
},
-quadInOut: function(a) {
-return a *= 2, a < 1 ? Math.pow(a, 2) / 2 : -1 * (--a * (a - 2) - 1) / 2;
+quadInOut: function(e) {
+return e *= 2, e < 1 ? Math.pow(e, 2) / 2 : -1 * (--e * (e - 2) - 1) / 2;
},
-linear: function(a) {
-return a;
+linear: function(e) {
+return e;
}
-}, enyo.easedLerp = function(a, b, c, d) {
-var e = (enyo.now() - a) / b;
-return d ? e >= 1 ? 0 : 1 - c(1 - e) : e >= 1 ? 1 : c(e);
+}, enyo.easedLerp = function(e, t, n, r) {
+var i = (enyo.now() - e) / t;
+return r ? i >= 1 ? 0 : 1 - n(1 - i) : i >= 1 ? 1 : n(i);
};
// Oop.js
-enyo.kind = function(a) {
+enyo.kind = function(e) {
enyo._kindCtors = {};
-var b = a.name || "";
-delete a.name;
-var c = "kind" in a, d = a.kind;
-delete a.kind;
-var e = enyo.constructorForKind(d), f = e && e.prototype || null;
-if (c && d !== null && e == null) throw "enyo.kind: Attempt to subclass an undefined kind. Check dependencies for [" + b + "].";
-var g = enyo.kind.makeCtor();
-return a.hasOwnProperty("constructor") && (a._constructor = a.constructor, delete a.constructor), enyo.setPrototype(g, f ? enyo.delegate(f) : {}), enyo.mixin(g.prototype, a), g.prototype.kindName = b, g.prototype.base = e, g.prototype.ctor = g, enyo.forEach(enyo.kind.features, function(b) {
-b(g, a);
-}), enyo.setObject(b, g), g;
+var t = e.name || "";
+delete e.name;
+var n = "kind" in e, r = e.kind;
+delete e.kind;
+var i = enyo.constructorForKind(r), s = i && i.prototype || null;
+if (n && r === undefined || i === undefined) throw "enyo.kind: Attempt to subclass an undefined kind. Check dependencies for [" + (t || "<unnamed>") + "].";
+var o = enyo.kind.makeCtor();
+return e.hasOwnProperty("constructor") && (e._constructor = e.constructor, delete e.constructor), enyo.setPrototype(o, s ? enyo.delegate(s) : {}), enyo.mixin(o.prototype, e), o.prototype.kindName = t, o.prototype.base = i, o.prototype.ctor = o, enyo.forEach(enyo.kind.features, function(t) {
+t(o, e);
+}), enyo.setObject(t, o), o;
+}, enyo.singleton = function(e, t) {
+var n = e.name;
+delete e.name;
+var r = enyo.kind(e);
+enyo.setObject(n, new r, t);
}, enyo.kind.makeCtor = function() {
return function() {
-var a;
-this._constructor && (a = this._constructor.apply(this, arguments)), this.constructed && this.constructed.apply(this, arguments);
-if (a) return a;
+if (!(this instanceof arguments.callee)) throw "enyo.kind: constructor called directly, not using 'new'";
+var e;
+this._constructor && (e = this._constructor.apply(this, arguments)), this.constructed && this.constructed.apply(this, arguments);
+if (e) return e;
};
-}, enyo.kind.defaultNamespace = "enyo", enyo.kind.features = [], enyo.kind.features.push(function(a, b) {
-var c = a.prototype;
-c.inherited || (c.inherited = enyo.kind.inherited);
-if (c.base) for (var d in b) {
-var e = b[d];
-enyo.isFunction(e) && (e._inherited = c.base.prototype[d] || enyo.nop, e.nom = c.kindName + "." + d + "()");
-}
-}), enyo.kind.inherited = function(a, b) {
-return a.callee._inherited.apply(this, b || a);
-}, enyo.kind.features.push(function(a, b) {
-enyo.mixin(a, enyo.kind.statics), b.statics && (enyo.mixin(a, b.statics), delete a.prototype.statics);
-var c = a.prototype.base;
-while (c) c.subclass(a, b), c = c.prototype.base;
+}, enyo.kind.defaultNamespace = "enyo", enyo.kind.features = [], enyo.kind.features.push(function(e, t) {
+var n = e.prototype;
+n.inherited || (n.inherited = enyo.kind.inherited);
+if (n.base) for (var r in t) {
+var i = t[r];
+enyo.isFunction(i) && (i._inherited = n.base.prototype[r] || enyo.nop, i.nom = n.kindName + "." + r + "()");
+}
+}), enyo.kind.inherited = function(e, t) {
+return e.callee._inherited.apply(this, t || e);
+}, enyo.kind.features.push(function(e, t) {
+enyo.mixin(e, enyo.kind.statics), t.statics && (enyo.mixin(e, t.statics), delete e.prototype.statics);
+var n = e.prototype.base;
+while (n) n.subclass(e, t), n = n.prototype.base;
}), enyo.kind.statics = {
-subclass: function(a, b) {},
-extend: function(a) {
-enyo.mixin(this.prototype, a);
-var b = this;
-enyo.forEach(enyo.kind.features, function(c) {
-c(b, a);
+subclass: function(e, t) {},
+extend: function(e) {
+enyo.mixin(this.prototype, e);
+var t = this;
+enyo.forEach(enyo.kind.features, function(n) {
+n(t, e);
});
}
-}, enyo._kindCtors = {}, enyo.constructorForKind = function(a) {
-if (a === null || enyo.isFunction(a)) return a;
-if (a) {
-var b = enyo._kindCtors[a];
-return b ? b : enyo._kindCtors[a] = enyo.Theme[a] || enyo[a] || enyo.getObject(a, !1, enyo) || window[a] || enyo.getObject(a);
+}, enyo._kindCtors = {}, enyo.constructorForKind = function(e) {
+if (e === null || enyo.isFunction(e)) return e;
+if (e) {
+var t = enyo._kindCtors[e];
+return t ? t : enyo._kindCtors[e] = enyo.Theme[e] || enyo[e] || enyo.getObject(e, !1, enyo) || window[e] || enyo.getObject(e);
}
return enyo.defaultCtor;
-}, enyo.Theme = {}, enyo.registerTheme = function(a) {
-enyo.mixin(enyo.Theme, a);
+}, enyo.Theme = {}, enyo.registerTheme = function(e) {
+enyo.mixin(enyo.Theme, e);
};
// Object.js
@@ -447,29 +475,29 @@ kind: null,
constructor: function() {
enyo._objectCount++;
},
-setPropertyValue: function(a, b, c) {
-if (this[c]) {
-var d = this[a];
-this[a] = b, this[c](d);
-} else this[a] = b;
+setPropertyValue: function(e, t, n) {
+if (this[n]) {
+var r = this[e];
+this[e] = t, this[n](r);
+} else this[e] = t;
},
-_setProperty: function(a, b, c) {
-this.setPropertyValue(a, b, this.getProperty(a) !== b && c);
+_setProperty: function(e, t, n) {
+this.setPropertyValue(e, t, this.getProperty(e) !== t && n);
},
-destroyObject: function(a) {
-this[a] && this[a].destroy && this[a].destroy(), this[a] = null;
+destroyObject: function(e) {
+this[e] && this[e].destroy && this[e].destroy(), this[e] = null;
},
-getProperty: function(a) {
-var b = "get" + enyo.cap(a);
-return this[b] ? this[b]() : this[a];
+getProperty: function(e) {
+var t = "get" + enyo.cap(e);
+return this[t] ? this[t]() : this[e];
},
-setProperty: function(a, b) {
-var c = "set" + enyo.cap(a);
-this[c] ? this[c](b) : this._setProperty(a, b, a + "Changed");
+setProperty: function(e, t) {
+var n = "set" + enyo.cap(e);
+this[n] ? this[n](t) : this._setProperty(e, t, e + "Changed");
},
log: function() {
-var a = arguments.callee.caller, b = ((a ? a.nom : "") || "(instance method)") + ":";
-enyo.logging.log("log", [ b ].concat(enyo.cloneArray(arguments)));
+var e = arguments.callee.caller, t = ((e ? e.nom : "") || "(instance method)") + ":";
+enyo.logging.log("log", [ t ].concat(enyo.cloneArray(arguments)));
},
warn: function() {
this._log("warn", arguments);
@@ -477,31 +505,31 @@ this._log("warn", arguments);
error: function() {
this._log("error", arguments);
},
-_log: function(a, b) {
-if (enyo.logging.shouldLog(a)) try {
+_log: function(e, t) {
+if (enyo.logging.shouldLog(e)) try {
throw new Error;
-} catch (c) {
-enyo.logging._log(a, [ b.callee.caller.nom + ": " ].concat(enyo.cloneArray(b))), console.log(c.stack);
-}
-}
-}), enyo._objectCount = 0, enyo.Object.subclass = function(a, b) {
-this.publish(a, b);
-}, enyo.Object.publish = function(a, b) {
-var c = b.published;
-if (c) {
-var d = a.prototype;
-for (var e in c) enyo.Object.addGetterSetter(e, c[e], d);
-}
-}, enyo.Object.addGetterSetter = function(a, b, c) {
-var d = a;
-c[d] = b;
-var e = enyo.cap(d), f = "get" + e;
-c[f] || (c[f] = function() {
-return this[d];
+} catch (n) {
+enyo.logging._log(e, [ t.callee.caller.nom + ": " ].concat(enyo.cloneArray(t))), console.log(n.stack);
+}
+}
+}), enyo._objectCount = 0, enyo.Object.subclass = function(e, t) {
+this.publish(e, t);
+}, enyo.Object.publish = function(e, t) {
+var n = t.published;
+if (n) {
+var r = e.prototype;
+for (var i in n) enyo.Object.addGetterSetter(i, n[i], r);
+}
+}, enyo.Object.addGetterSetter = function(e, t, n) {
+var r = e;
+n[r] = t;
+var i = enyo.cap(r), s = "get" + i;
+n[s] || (n[s] = function() {
+return this[r];
});
-var g = "set" + e, h = d + "Changed";
-c[g] || (c[g] = function(a) {
-this._setProperty(d, a, h);
+var o = "set" + i, u = r + "Changed";
+n[o] || (n[o] = function(e) {
+this._setProperty(r, e, u);
});
};
@@ -526,11 +554,11 @@ return this.kindName;
constructor: function() {
this._componentNameMap = {}, this.$ = {}, this.inherited(arguments);
},
-constructed: function(a) {
-this.importProps(a), this.create();
+constructed: function(e) {
+this.importProps(e), this.create();
},
-importProps: function(a) {
-if (a) for (var b in a) this[b] = a[b];
+importProps: function(e) {
+if (e) for (var t in e) this[t] = e[t];
this.handlers = enyo.mixin(enyo.clone(this.kindHandlers), this.handlers);
},
create: function() {
@@ -539,13 +567,13 @@ this.ownerChanged(), this.initComponents();
initComponents: function() {
this.createChrome(this.kindComponents), this.createClientComponents(this.components);
},
-createChrome: function(a) {
-this.createComponents(a, {
+createChrome: function(e) {
+this.createComponents(e, {
isChrome: !0
});
},
-createClientComponents: function(a) {
-this.createComponents(a, {
+createClientComponents: function(e) {
+this.createComponents(e, {
owner: this.getInstanceOwner()
});
},
@@ -556,119 +584,119 @@ destroy: function() {
this.destroyComponents(), this.setOwner(null), this.destroyed = !0;
},
destroyComponents: function() {
-enyo.forEach(this.getComponents(), function(a) {
-a.destroyed || a.destroy();
+enyo.forEach(this.getComponents(), function(e) {
+e.destroyed || e.destroy();
});
},
makeId: function() {
-var a = "_", b = this.owner && this.owner.getId();
-return this.name ? (b ? b + a : "") + this.name : "";
+var e = "_", t = this.owner && this.owner.getId();
+return this.name ? (t ? t + e : "") + this.name : "";
},
-ownerChanged: function(a) {
-a && a.removeComponent(this), this.owner && this.owner.addComponent(this), this.id || (this.id = this.makeId());
+ownerChanged: function(e) {
+e && e.removeComponent(this), this.owner && this.owner.addComponent(this), this.id || (this.id = this.makeId());
},
-nameComponent: function(a) {
-var b = enyo.Component.prefixFromKindName(a.kindName), c, d = this._componentNameMap[b] || 0;
-do c = b + (++d > 1 ? String(d) : ""); while (this.$[c]);
-return this._componentNameMap[b] = Number(d), a.name = c;
+nameComponent: function(e) {
+var t = enyo.Component.prefixFromKindName(e.kindName), n, r = this._componentNameMap[t] || 0;
+do n = t + (++r > 1 ? String(r) : ""); while (this.$[n]);
+return this._componentNameMap[t] = Number(r), e.name = n;
},
-addComponent: function(a) {
-var b = a.getName();
-b || (b = this.nameComponent(a)), this.$[b] && this.warn('Duplicate component name "' + b + '" in owner "' + this.id + '" violates unique-name-under-owner rule, replacing existing component in the hash and continuing, but this is an error condition and should be fixed.'), this.$[b] = a;
+addComponent: function(e) {
+var t = e.getName();
+t || (t = this.nameComponent(e)), this.$[t] && this.warn('Duplicate component name "' + t + '" in owner "' + this.id + '" violates unique-name-under-owner rule, replacing existing component in the hash and continuing, but this is an error condition and should be fixed.'), this.$[t] = e;
},
-removeComponent: function(a) {
-delete this.$[a.getName()];
+removeComponent: function(e) {
+delete this.$[e.getName()];
},
getComponents: function() {
-var a = [];
-for (var b in this.$) a.push(this.$[b]);
-return a;
+var e = [];
+for (var t in this.$) e.push(this.$[t]);
+return e;
},
-adjustComponentProps: function(a) {
-this.defaultProps && enyo.mixin(a, this.defaultProps), a.kind = a.kind || a.isa || this.defaultKind, a.owner = a.owner || this;
+adjustComponentProps: function(e) {
+this.defaultProps && enyo.mixin(e, this.defaultProps), e.kind = e.kind || e.isa || this.defaultKind, e.owner = e.owner || this;
},
-_createComponent: function(a, b) {
-var c = enyo.mixin(enyo.clone(b), a);
-return this.adjustComponentProps(c), enyo.Component.create(c);
+_createComponent: function(e, t) {
+var n = enyo.mixin(enyo.clone(t), e);
+return this.adjustComponentProps(n), enyo.Component.create(n);
},
-createComponent: function(a, b) {
-return this._createComponent(a, b);
+createComponent: function(e, t) {
+return this._createComponent(e, t);
},
-createComponents: function(a, b) {
-if (a) {
-var c = [];
-for (var d = 0, e; e = a[d]; d++) c.push(this._createComponent(e, b));
-return c;
+createComponents: function(e, t) {
+if (e) {
+var n = [];
+for (var r = 0, i; i = e[r]; r++) n.push(this._createComponent(i, t));
+return n;
}
},
getBubbleTarget: function() {
return this.owner;
},
-bubble: function(a, b, c) {
-var d = b || {};
-return "originator" in d || (d.originator = c || this), this.dispatchBubble(a, d, c);
-},
-dispatchBubble: function(a, b, c) {
-return this.dispatchEvent(a, b, c) ? !0 : this.bubbleUp(a, b, c);
-},
-bubbleUp: function(a, b, c) {
-var d = this.getBubbleTarget();
-return d ? d.dispatchBubble(a, b, this) : !1;
-},
-dispatchEvent: function(a, b, c) {
-this.decorateEvent(a, b, c);
-if (this.handlers[a] && this.dispatch(this.handlers[a], b, c)) return !0;
-if (this[a]) return this.bubbleDelegation(this.owner, this[a], a, b, this);
-},
-decorateEvent: function(a, b, c) {},
-bubbleDelegation: function(a, b, c, d, e) {
-var f = this.getBubbleTarget();
-if (f) return f.delegateEvent(a, b, c, d, e);
-},
-delegateEvent: function(a, b, c, d, e) {
-return this.decorateEvent(c, d, e), a == this ? this.dispatch(b, d, e) : this.bubbleDelegation(a, b, c, d, e);
-},
-dispatch: function(a, b, c) {
-var d = a && this[a];
-if (d) return d.call(this, c || this, b);
-},
-waterfall: function(a, b, c) {
-if (this.dispatchEvent(a, b, c)) return !0;
-this.waterfallDown(a, b, c || this);
-},
-waterfallDown: function(a, b, c) {
-for (var d in this.$) this.$[d].waterfall(a, b, c);
-}
-}), enyo.defaultCtor = enyo.Component, enyo.create = enyo.Component.create = function(a) {
-if (!a.kind && "kind" in a) throw "enyo.create: Attempt to create a null kind. Check dependencies.";
-var b = a.kind || a.isa || enyo.defaultCtor, c = enyo.constructorForKind(b);
-return c || (console.error('no constructor found for kind "' + b + '"'), c = enyo.Component), new c(a);
-}, enyo.Component.subclass = function(a, b) {
-var c = a.prototype;
-b.components && (c.kindComponents = b.components, delete c.components);
-if (b.handlers) {
-var d = c.kindHandlers;
-c.kindHandlers = enyo.mixin(enyo.clone(d), c.handlers), c.handlers = null;
-}
-b.events && this.publishEvents(a, b);
-}, enyo.Component.publishEvents = function(a, b) {
-var c = b.events;
-if (c) {
-var d = a.prototype;
-for (var e in c) this.addEvent(e, c[e], d);
-}
-}, enyo.Component.addEvent = function(a, b, c) {
-var d, e;
-enyo.isString(b) ? (a.slice(0, 2) != "on" && (console.warn("enyo.Component.addEvent: event names must start with 'on'. " + c.kindName + " event '" + a + "' was auto-corrected to 'on" + a + "'."), a = "on" + a), d = b, e = "do" + enyo.cap(a.slice(2))) : (d = b.value, e = b.caller), c[a] = d, c[e] || (c[e] = function(b) {
-return this.bubble(a, b);
+bubble: function(e, t, n) {
+var r = t || {};
+return "originator" in r || (r.originator = n || this), this.dispatchBubble(e, r, n);
+},
+bubbleUp: function(e, t, n) {
+var r = this.getBubbleTarget();
+return r ? r.dispatchBubble(e, t, this) : !1;
+},
+dispatchEvent: function(e, t, n) {
+this.decorateEvent(e, t, n);
+if (this.handlers[e] && this.dispatch(this.handlers[e], t, n)) return !0;
+if (this[e]) return this.bubbleDelegation(this.owner, this[e], e, t, this);
+},
+dispatchBubble: function(e, t, n) {
+return this.dispatchEvent(e, t, n) ? !0 : this.bubbleUp(e, t, n);
+},
+decorateEvent: function(e, t, n) {},
+bubbleDelegation: function(e, t, n, r, i) {
+var s = this.getBubbleTarget();
+if (s) return s.delegateEvent(e, t, n, r, i);
+},
+delegateEvent: function(e, t, n, r, i) {
+return this.decorateEvent(n, r, i), e == this ? this.dispatch(t, r, i) : this.bubbleDelegation(e, t, n, r, i);
+},
+dispatch: function(e, t, n) {
+var r = e && this[e];
+if (r) return r.call(this, n || this, t);
+},
+waterfall: function(e, t, n) {
+if (this.dispatchEvent(e, t, n)) return !0;
+this.waterfallDown(e, t, n || this);
+},
+waterfallDown: function(e, t, n) {
+for (var r in this.$) this.$[r].waterfall(e, t, n);
+}
+}), enyo.defaultCtor = enyo.Component, enyo.create = enyo.Component.create = function(e) {
+if (!e.kind && "kind" in e) throw "enyo.create: Attempt to create a null kind. Check dependencies.";
+var t = e.kind || e.isa || enyo.defaultCtor, n = enyo.constructorForKind(t);
+return n || (console.error('no constructor found for kind "' + t + '"'), n = enyo.Component), new n(e);
+}, enyo.Component.subclass = function(e, t) {
+var n = e.prototype;
+t.components && (n.kindComponents = t.components, delete n.components);
+if (t.handlers) {
+var r = n.kindHandlers;
+n.kindHandlers = enyo.mixin(enyo.clone(r), n.handlers), n.handlers = null;
+}
+t.events && this.publishEvents(e, t);
+}, enyo.Component.publishEvents = function(e, t) {
+var n = t.events;
+if (n) {
+var r = e.prototype;
+for (var i in n) this.addEvent(i, n[i], r);
+}
+}, enyo.Component.addEvent = function(e, t, n) {
+var r, i;
+enyo.isString(t) ? (e.slice(0, 2) != "on" && (console.warn("enyo.Component.addEvent: event names must start with 'on'. " + n.kindName + " event '" + e + "' was auto-corrected to 'on" + e + "'."), e = "on" + e), r = t, i = "do" + enyo.cap(e.slice(2))) : (r = t.value, i = t.caller), n[e] = r, n[i] || (n[i] = function(t) {
+return this.bubble(e, t);
});
-}, enyo.Component.prefixFromKindName = function(a) {
-var b = enyo.Component._kindPrefixi[a];
-if (!b) {
-var c = a.lastIndexOf(".");
-b = c >= 0 ? a.slice(c + 1) : a, b = b.charAt(0).toLowerCase() + b.slice(1), enyo.Component._kindPrefixi[a] = b;
+}, enyo.Component.prefixFromKindName = function(e) {
+var t = enyo.Component._kindPrefixi[e];
+if (!t) {
+var n = e.lastIndexOf(".");
+t = n >= 0 ? e.slice(n + 1) : e, t = t.charAt(0).toLowerCase() + t.slice(1), enyo.Component._kindPrefixi[e] = t;
}
-return b;
+return t;
};
// UiComponent.js
@@ -696,53 +724,53 @@ this.controls = [], this.children = [], this.containerChanged(), this.inherited(
destroy: function() {
this.destroyClientControls(), this.setContainer(null), this.inherited(arguments);
},
-importProps: function(a) {
+importProps: function(e) {
this.inherited(arguments), this.owner || (this.owner = enyo.master);
},
createComponents: function() {
-var a = this.inherited(arguments);
-return this.discoverControlParent(), a;
+var e = this.inherited(arguments);
+return this.discoverControlParent(), e;
},
discoverControlParent: function() {
this.controlParent = this.$[this.controlParentName] || this.controlParent;
},
-adjustComponentProps: function(a) {
-a.container = a.container || this, this.inherited(arguments);
+adjustComponentProps: function(e) {
+e.container = e.container || this, this.inherited(arguments);
},
-containerChanged: function(a) {
-a && a.removeControl(this), this.container && this.container.addControl(this);
+containerChanged: function(e) {
+e && e.removeControl(this), this.container && this.container.addControl(this);
},
-parentChanged: function(a) {
-a && a != this.parent && a.removeChild(this);
+parentChanged: function(e) {
+e && e != this.parent && e.removeChild(this);
},
-isDescendantOf: function(a) {
-var b = this;
-while (b && b != a) b = b.parent;
-return a && b == a;
+isDescendantOf: function(e) {
+var t = this;
+while (t && t != e) t = t.parent;
+return e && t == e;
},
getControls: function() {
return this.controls;
},
getClientControls: function() {
-var a = [];
-for (var b = 0, c = this.controls, d; d = c[b]; b++) d.isChrome || a.push(d);
-return a;
+var e = [];
+for (var t = 0, n = this.controls, r; r = n[t]; t++) r.isChrome || e.push(r);
+return e;
},
destroyClientControls: function() {
-var a = this.getClientControls();
-for (var b = 0, c; c = a[b]; b++) c.destroy();
+var e = this.getClientControls();
+for (var t = 0, n; n = e[t]; t++) n.destroy();
},
-addControl: function(a) {
-this.controls.push(a), this.addChild(a);
+addControl: function(e, t) {
+this.controls.push(e), this.addChild(e, t);
},
-removeControl: function(a) {
-return a.setParent(null), enyo.remove(a, this.controls);
+removeControl: function(e) {
+return e.setParent(null), enyo.remove(e, this.controls);
},
-indexOfControl: function(a) {
-return enyo.indexOf(a, this.controls);
+indexOfControl: function(e) {
+return enyo.indexOf(e, this.controls);
},
-indexOfClientControl: function(a) {
-return enyo.indexOf(a, this.getClientControls());
+indexOfClientControl: function(e) {
+return enyo.indexOf(e, this.getClientControls());
},
indexInContainer: function() {
return this.container.indexOfControl(this);
@@ -750,17 +778,23 @@ return this.container.indexOfControl(this);
clientIndexInContainer: function() {
return this.container.indexOfClientControl(this);
},
-controlAtIndex: function(a) {
-return this.controls[a];
+controlAtIndex: function(e) {
+return this.controls[e];
},
-addChild: function(a) {
-this.controlParent ? this.controlParent.addChild(a) : (a.setParent(this), this.children[this.prepend ? "unshift" : "push"](a));
+addChild: function(e, t) {
+if (this.controlParent) this.controlParent.addChild(e); else {
+e.setParent(this);
+if (t === undefined) this.children[this.prepend ? "unshift" : "push"](e); else if (t === null) this.children.push(e); else {
+var n = this.indexOfChild(t);
+this.children.splice(n, 0, e);
+}
+}
},
-removeChild: function(a) {
-return enyo.remove(a, this.children);
+removeChild: function(e) {
+return enyo.remove(e, this.children);
},
-indexOfChild: function(a) {
-return enyo.indexOf(a, this.children);
+indexOfChild: function(e) {
+return enyo.indexOf(e, this.children);
},
layoutKindChanged: function() {
this.layout && this.layout.destroy(), this.layout = enyo.createFromKind(this.layoutKind, this), this.generated && this.render();
@@ -777,16 +811,16 @@ this.waterfall("onresize", enyo.UiComponent._resizeFlags), this.waterfall("onpos
resizeHandler: function() {
this.reflow();
},
-waterfallDown: function(a, b, c) {
-for (var d in this.$) this.$[d] instanceof enyo.UiComponent || this.$[d].waterfall(a, b, c);
-for (var e = 0, f = this.children, g; g = f[e]; e++) (g.showing || !b || !b.showingOnly) && g.waterfall(a, b, c);
+waterfallDown: function(e, t, n) {
+for (var r in this.$) this.$[r] instanceof enyo.UiComponent || this.$[r].waterfall(e, t, n);
+for (var i = 0, s = this.children, o; o = s[i]; i++) (o.showing || !t || !t.showingOnly) && o.waterfall(e, t, n);
},
getBubbleTarget: function() {
return this.parent;
}
-}), enyo.createFromKind = function(a, b) {
-var c = a && enyo.constructorForKind(a);
-if (c) return new c(b);
+}), enyo.createFromKind = function(e, t) {
+var n = e && enyo.constructorForKind(e);
+if (n) return new n(t);
}, enyo.master = new enyo.Component({
name: "master",
notInstanceOwner: !0,
@@ -797,8 +831,8 @@ getId: function() {
return "";
},
isDescendantOf: enyo.nop,
-bubble: function(a, b, c) {
-a == "onresize" ? (enyo.master.waterfallDown("onresize", this.eventFlags), enyo.master.waterfallDown("onpostresize", this.eventFlags)) : enyo.Signals.send(a, b);
+bubble: function(e, t, n) {
+e == "onresize" ? (enyo.master.waterfallDown("onresize", this.eventFlags), enyo.master.waterfallDown("onpostresize", this.eventFlags)) : enyo.Signals.send(e, t);
}
});
@@ -808,8 +842,8 @@ enyo.kind({
name: "enyo.Layout",
kind: null,
layoutClass: "",
-constructor: function(a) {
-this.container = a, a && a.addClass(this.layoutClass);
+constructor: function(e) {
+this.container = e, e && e.addClass(this.layoutClass);
},
destroy: function() {
this.container && this.container.removeClass(this.layoutClass);
@@ -829,20 +863,20 @@ this.inherited(arguments), enyo.Signals.addListener(this);
destroy: function() {
enyo.Signals.removeListener(this), this.inherited(arguments);
},
-notify: function(a, b) {
-this.dispatchEvent(a, b);
+notify: function(e, t) {
+this.dispatchEvent(e, t);
},
statics: {
listeners: [],
-addListener: function(a) {
-this.listeners.push(a);
+addListener: function(e) {
+this.listeners.push(e);
},
-removeListener: function(a) {
-enyo.remove(a, this.listeners);
+removeListener: function(e) {
+enyo.remove(e, this.listeners);
},
-send: function(a, b) {
-enyo.forEach(this.listeners, function(c) {
-c.notify(a, b);
+send: function(e, t) {
+enyo.forEach(this.listeners, function(n) {
+n.notify(e, t);
});
}
}
@@ -853,14 +887,17 @@ c.notify(a, b);
enyo.kind({
name: "enyo.Async",
kind: enyo.Object,
+published: {
+timeout: 0
+},
failed: !1,
context: null,
constructor: function() {
this.responders = [], this.errorHandlers = [];
},
-accumulate: function(a, b) {
-var c = b.length < 2 ? b[0] : enyo.bind(b[0], b[1]);
-a.push(c);
+accumulate: function(e, t) {
+var n = t.length < 2 ? t[0] : enyo.bind(t[0], t[1]);
+e.push(n);
},
response: function() {
return this.accumulate(this.responders, arguments), this;
@@ -868,21 +905,21 @@ return this.accumulate(this.responders, arguments), this;
error: function() {
return this.accumulate(this.errorHandlers, arguments), this;
},
-route: function(a, b) {
-var c = enyo.bind(this, "respond");
-a.response(function(a, b) {
-c(b);
+route: function(e, t) {
+var n = enyo.bind(this, "respond");
+e.response(function(e, t) {
+n(t);
});
-var d = enyo.bind(this, "fail");
-a.error(function(a, b) {
-d(b);
-}), a.go(b);
+var r = enyo.bind(this, "fail");
+e.error(function(e, t) {
+r(t);
+}), e.go(t);
},
-handle: function(a, b) {
-var c = b.shift();
-if (c) if (c instanceof enyo.Async) this.route(c, a); else {
-var d = enyo.call(this.context || this, c, [ this, a ]);
-d = d !== undefined ? d : a, (this.failed ? this.fail : this.respond).call(this, d);
+handle: function(e, t) {
+var n = t.shift();
+if (n) if (n instanceof enyo.Async) this.route(n, e); else {
+var r = enyo.call(this.context || this, n, [ this, e ]);
+r = r !== undefined ? r : e, (this.failed ? this.fail : this.respond).call(this, r);
}
},
startTimer: function() {
@@ -894,18 +931,18 @@ this.timeoutJob && (this.endTime = enyo.now(), clearTimeout(this.timeoutJob), th
timeoutComplete: function() {
this.timedout = !0, this.fail("timeout");
},
-respond: function(a) {
-this.failed = !1, this.endTimer(), this.handle(a, this.responders);
+respond: function(e) {
+this.failed = !1, this.endTimer(), this.handle(e, this.responders);
},
-fail: function(a) {
-this.failed = !0, this.endTimer(), this.handle(a, this.errorHandlers);
+fail: function(e) {
+this.failed = !0, this.endTimer(), this.handle(e, this.errorHandlers);
},
recover: function() {
this.failed = !1;
},
-go: function(a) {
+go: function(e) {
return enyo.asyncMethod(this, function() {
-this.respond(a);
+this.respond(e);
}), this;
}
});
@@ -913,55 +950,55 @@ this.respond(a);
// json.js
enyo.json = {
-stringify: function(a, b, c) {
-return JSON.stringify(a, b, c);
+stringify: function(e, t, n) {
+return JSON.stringify(e, t, n);
},
-parse: function(a, b) {
-return a ? JSON.parse(a, b) : null;
+parse: function(e, t) {
+return e ? JSON.parse(e, t) : null;
}
};
// cookie.js
-enyo.getCookie = function(a) {
-var b = document.cookie.match(new RegExp("(?:^|; )" + a + "=([^;]*)"));
-return b ? decodeURIComponent(b[1]) : undefined;
-}, enyo.setCookie = function(a, b, c) {
-var d = a + "=" + encodeURIComponent(b), e = c || {}, f = e.expires;
-if (typeof f == "number") {
-var g = new Date;
-g.setTime(g.getTime() + f * 24 * 60 * 60 * 1e3), f = g;
-}
-f && f.toUTCString && (e.expires = f.toUTCString());
-var h, i;
-for (h in e) d += "; " + h, i = e[h], i !== !0 && (d += "=" + i);
-document.cookie = d;
+enyo.getCookie = function(e) {
+var t = document.cookie.match(new RegExp("(?:^|; )" + e + "=([^;]*)"));
+return t ? decodeURIComponent(t[1]) : undefined;
+}, enyo.setCookie = function(e, t, n) {
+var r = e + "=" + encodeURIComponent(t), i = n || {}, s = i.expires;
+if (typeof s == "number") {
+var o = new Date;
+o.setTime(o.getTime() + s * 24 * 60 * 60 * 1e3), s = o;
+}
+s && s.toUTCString && (i.expires = s.toUTCString());
+var u, a;
+for (u in i) r += "; " + u, a = i[u], a !== !0 && (r += "=" + a);
+document.cookie = r;
};
// xhr.js
enyo.xhr = {
-request: function(a) {
-var b = this.getXMLHttpRequest(), c = a.method || "GET", d = "sync" in a ? !a.sync : !0;
-a.username ? b.open(c, enyo.path.rewrite(a.url), d, a.username, a.password) : b.open(c, enyo.path.rewrite(a.url), d), enyo.mixin(b, a.xhrFields), this.makeReadyStateHandler(b, a.callback);
-if (a.headers) for (var e in a.headers) b.setRequestHeader(e, a.headers[e]);
-return b.send(a.body || null), d || b.onreadystatechange(b), b;
-},
-makeReadyStateHandler: function(a, b) {
-a.onreadystatechange = function() {
-a.readyState == 4 && b && b.apply(null, [ a.responseText, a ]);
+request: function(e) {
+var t = this.getXMLHttpRequest(), n = e.method || "GET", r = "sync" in e ? !e.sync : !0;
+e.username ? t.open(n, enyo.path.rewrite(e.url), r, e.username, e.password) : t.open(n, enyo.path.rewrite(e.url), r), enyo.mixin(t, e.xhrFields), this.makeReadyStateHandler(t, e.callback);
+if (e.headers) for (var i in e.headers) t.setRequestHeader(i, e.headers[i]);
+return typeof t.overrideMimeType == "function" && e.mimeType && t.overrideMimeType(e.mimeType), t.send(e.body || null), r || t.onreadystatechange(t), t;
+},
+makeReadyStateHandler: function(e, t) {
+e.onreadystatechange = function() {
+e.readyState == 4 && t && t.apply(null, [ e.responseText, e ]);
};
},
getXMLHttpRequest: function() {
try {
return new XMLHttpRequest;
-} catch (a) {}
+} catch (e) {}
try {
return new ActiveXObject("Msxml2.XMLHTTP");
-} catch (a) {}
+} catch (e) {}
try {
return new ActiveXObject("Microsoft.XMLHTTP");
-} catch (a) {}
+} catch (e) {}
return null;
}
};
@@ -979,7 +1016,8 @@ headers: null,
postBody: "",
username: "",
password: "",
-xhrFields: null
+xhrFields: null,
+mimeType: null
};
// Ajax.js
@@ -988,64 +1026,63 @@ enyo.kind({
name: "enyo.Ajax",
kind: enyo.Async,
published: enyo.AjaxProperties,
-constructor: function(a) {
-enyo.mixin(this, a), this.inherited(arguments);
-},
-go: function(a) {
-return this.startTimer(), this.request(a), this;
-},
-request: function(a) {
-var b = this.url.split("?"), c = b.shift() || "", d = b.join("?").split("&"), e = enyo.isString(a) ? a : enyo.Ajax.objectToQuery(a);
-this.method == "GET" && (e && (d.push(e), e = null), this.cacheBust && d.push(Math.random()));
-var f = [ c, d.join("&") ].join("?"), g = {
-"Content-Type": this.contentType
-};
-enyo.mixin(g, this.headers), this.xhr = enyo.xhr.request({
-url: f,
+constructor: function(e) {
+enyo.mixin(this, e), this.inherited(arguments);
+},
+go: function(e) {
+return this.startTimer(), this.request(e), this;
+},
+request: function(e) {
+var t = this.url.split("?"), n = t.shift() || "", r = t.length ? t.join("?").split("&") : [], i = enyo.isString(e) ? e : enyo.Ajax.objectToQuery(e);
+this.method == "GET" && (i && (r.push(i), i = null), this.cacheBust && !/^file:/i.test(n) && r.push(Math.random()));
+var s = r.length ? [ n, r.join("&") ].join("?") : n, o = {};
+this.method != "GET" && (o["Content-Type"] = this.contentType), enyo.mixin(o, this.headers), this.xhr = enyo.xhr.request({
+url: s,
method: this.method,
callback: enyo.bind(this, "receive"),
-body: this.postBody || e,
-headers: g,
+body: this.postBody || i,
+headers: o,
sync: window.PalmSystem ? !1 : this.sync,
username: this.username,
password: this.password,
-xhrFields: this.xhrFields
+xhrFields: this.xhrFields,
+mimeType: this.mimeType
});
},
-receive: function(a, b) {
-this.destroyed || (this.isFailure(b) ? this.fail(b.status) : this.respond(this.xhrToResponse(b)));
+receive: function(e, t) {
+this.destroyed || (this.isFailure(t) ? this.fail(t.status) : this.respond(this.xhrToResponse(t)));
},
-xhrToResponse: function(a) {
-if (a) return this[(this.handleAs || "text") + "Handler"](a);
+xhrToResponse: function(e) {
+if (e) return this[(this.handleAs || "text") + "Handler"](e);
},
-isFailure: function(a) {
-return a.status !== 0 && (a.status < 200 || a.status >= 300);
+isFailure: function(e) {
+return e.status !== 0 && (e.status < 200 || e.status >= 300);
},
-xmlHandler: function(a) {
-return a.responseXML;
+xmlHandler: function(e) {
+return e.responseXML;
},
-textHandler: function(a) {
-return a.responseText;
+textHandler: function(e) {
+return e.responseText;
},
-jsonHandler: function(a) {
-var b = a.responseText;
+jsonHandler: function(e) {
+var t = e.responseText;
try {
-return b && enyo.json.parse(b);
-} catch (c) {
-return console.warn("Ajax request set to handleAs JSON but data was not in JSON format"), b;
+return t && enyo.json.parse(t);
+} catch (n) {
+return console.warn("Ajax request set to handleAs JSON but data was not in JSON format"), t;
}
},
statics: {
-objectToQuery: function(a) {
-var b = encodeURIComponent, c = [], d = {};
-for (var e in a) {
-var f = a[e];
-if (f != d[e]) {
-var g = b(e) + "=";
-if (enyo.isArray(f)) for (var h = 0; h < f.length; h++) c.push(g + b(f[h])); else c.push(g + b(f));
+objectToQuery: function(e) {
+var t = encodeURIComponent, n = [], r = {};
+for (var i in e) {
+var s = e[i];
+if (s != r[i]) {
+var o = t(i) + "=";
+if (enyo.isArray(s)) for (var u = 0; u < s.length; u++) n.push(o + t(s[u])); else n.push(o + t(s));
}
}
-return c.join("&");
+return n.join("&");
}
}
});
@@ -1065,39 +1102,39 @@ statics: {
nextCallbackID: 0
},
addScriptElement: function() {
-var a = document.createElement("script");
-a.src = this.src, a.async = "async", this.charset && (a.charset = this.charset), a.onerror = enyo.bind(this, function() {
+var e = document.createElement("script");
+e.src = this.src, e.async = "async", this.charset && (e.charset = this.charset), e.onerror = enyo.bind(this, function() {
this.fail(400), this.removeScriptElement();
});
-var b = document.getElementsByTagName("script")[0];
-b.parentNode.insertBefore(a, b), this.scriptTag = a;
+var t = document.getElementsByTagName("script")[0];
+t.parentNode.insertBefore(e, t), this.scriptTag = e;
},
removeScriptElement: function() {
-var a = this.scriptTag;
-this.scriptTag = null, a.onerror = null, a.parentNode && a.parentNode.removeChild(a);
+var e = this.scriptTag;
+this.scriptTag = null, e.onerror = null, e.parentNode && e.parentNode.removeChild(e);
},
-constructor: function(a) {
-enyo.mixin(this, a), this.inherited(arguments);
+constructor: function(e) {
+enyo.mixin(this, e), this.inherited(arguments);
},
-go: function(a) {
-return this.startTimer(), this.jsonp(a), this;
+go: function(e) {
+return this.startTimer(), this.jsonp(e), this;
},
-jsonp: function(a) {
-var b = "enyo_jsonp_callback_" + enyo.JsonpRequest.nextCallbackID++;
-this.src = this.buildUrl(a, b), this.addScriptElement(), window[b] = enyo.bind(this, this.respond);
-var c = enyo.bind(this, function() {
-this.removeScriptElement(), window[b] = null;
+jsonp: function(e) {
+var t = "enyo_jsonp_callback_" + enyo.JsonpRequest.nextCallbackID++;
+this.src = this.buildUrl(e, t), this.addScriptElement(), window[t] = enyo.bind(this, this.respond);
+var n = enyo.bind(this, function() {
+this.removeScriptElement(), window[t] = null;
});
-this.response(c), this.error(c);
+this.response(n), this.error(n);
},
-buildUrl: function(a, b) {
-var c = this.url.split("?"), d = c.shift() || "", e = c.join("?").split("&"), f = this.bodyArgsFromParams(a, b);
-return e.push(f), this.cacheBust && e.push(Math.random()), [ d, e.join("&") ].join("?");
+buildUrl: function(e, t) {
+var n = this.url.split("?"), r = n.shift() || "", i = n.join("?").split("&"), s = this.bodyArgsFromParams(e, t);
+return i.push(s), this.cacheBust && i.push(Math.random()), [ r, i.join("&") ].join("?");
},
-bodyArgsFromParams: function(a, b) {
-if (enyo.isString(a)) return a.replace("=?", "=" + b);
-var c = enyo.mixin({}, a);
-return c[this.callbackName] = b, enyo.Ajax.objectToQuery(c);
+bodyArgsFromParams: function(e, t) {
+if (enyo.isString(e)) return e.replace("=?", "=" + t);
+var n = enyo.mixin({}, e);
+return n[this.callbackName] = t, enyo.Ajax.objectToQuery(n);
}
});
@@ -1119,73 +1156,102 @@ events: {
onResponse: "",
onError: ""
},
-constructor: function(a) {
+constructor: function(e) {
this.inherited(arguments);
},
-send: function(a) {
-return this.jsonp ? this.sendJsonp(a) : this.sendAjax(a);
+send: function(e) {
+return this.jsonp ? this.sendJsonp(e) : this.sendAjax(e);
},
-sendJsonp: function(a) {
-var b = new enyo.JsonpRequest;
-for (var c in {
+sendJsonp: function(e) {
+var t = new enyo.JsonpRequest;
+for (var n in {
url: 1,
callbackName: 1,
charset: 1
-}) b[c] = this[c];
-return this.sendAsync(b, a);
+}) t[n] = this[n];
+return this.sendAsync(t, e);
},
-sendAjax: function(a) {
-var b = new enyo.Ajax;
-for (var c in enyo.AjaxProperties) b[c] = this[c];
-return this.sendAsync(b, a);
+sendAjax: function(e) {
+var t = new enyo.Ajax;
+for (var n in enyo.AjaxProperties) t[n] = this[n];
+return this.sendAsync(t, e);
},
-sendAsync: function(a, b) {
-return a.go(b).response(this, "response").error(this, "error");
+sendAsync: function(e, t) {
+return e.go(t).response(this, "response").error(this, "error");
},
-response: function(a, b) {
+response: function(e, t) {
this.doResponse({
-ajax: a,
-data: b
+ajax: e,
+data: t
});
},
-error: function(a, b) {
+error: function(e, t) {
this.doError({
-ajax: a,
-data: b
+ajax: e,
+data: t
});
}
});
// dom.js
-enyo.requiresWindow = function(a) {
-a();
+enyo.requiresWindow = function(e) {
+e();
}, enyo.dom = {
-byId: function(a, b) {
-return typeof a == "string" ? (b || document).getElementById(a) : a;
+byId: function(e, t) {
+return typeof e == "string" ? (t || document).getElementById(e) : e;
},
-escape: function(a) {
-return a !== null ? String(a).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;") : "";
+escape: function(e) {
+return e !== null ? String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;") : "";
},
-getComputedStyle: function(a) {
-return window.getComputedStyle && a && window.getComputedStyle(a, null);
+getComputedStyle: function(e) {
+return window.getComputedStyle && e && window.getComputedStyle(e, null);
},
-getComputedStyleValue: function(a, b, c) {
-var d = c || this.getComputedStyle(a);
-return d ? d.getPropertyValue(b) : null;
+getComputedStyleValue: function(e, t, n) {
+var r = n || this.getComputedStyle(e);
+return r ? r.getPropertyValue(t) : null;
},
-getFirstElementByTagName: function(a) {
-var b = document.getElementsByTagName(a);
-return b && b[0];
+getFirstElementByTagName: function(e) {
+var t = document.getElementsByTagName(e);
+return t && t[0];
},
applyBodyFit: function() {
-var a = this.getFirstElementByTagName("html");
-a && (a.className += " enyo-document-fit");
-var b = this.getFirstElementByTagName("body");
-b && (b.className += " enyo-body-fit"), enyo.bodyIsFitting = !0;
+var e = this.getFirstElementByTagName("html");
+e && (e.className += " enyo-document-fit");
+var t = this.getFirstElementByTagName("body");
+t && (t.className += " enyo-body-fit"), enyo.bodyIsFitting = !0;
},
getWindowWidth: function() {
return window.innerWidth ? window.innerWidth : document.body && document.body.offsetWidth ? document.body.offsetWidth : document.compatMode == "CSS1Compat" && document.documentElement && document.documentElement.offsetWidth ? document.documentElement.offsetWidth : 320;
+},
+_ieCssToPixelValue: function(e, t) {
+var n = t, r = e.style, i = r.left, s = e.runtimeStyle && e.runtimeStyle.left;
+return s && (e.runtimeStyle.left = e.currentStyle.left), r.left = n, n = r.pixelLeft, r.left = i, s && (r.runtimeStyle.left = s), n;
+},
+_pxMatch: /px/i,
+getComputedBoxValue: function(e, t, n, r) {
+var i = r || this.getComputedStyle(e);
+if (i) return parseInt(i.getPropertyValue(t + "-" + n), 0);
+if (e && e.currentStyle) {
+var s = e.currentStyle[t + enyo.cap(n)];
+return s.match(this._pxMatch) || (s = this._ieCssToPixelValue(e, s)), parseInt(s, 0);
+}
+return 0;
+},
+calcBoxExtents: function(e, t) {
+var n = this.getComputedStyle(e);
+return {
+top: this.getComputedBoxValue(e, t, "top", n),
+right: this.getComputedBoxValue(e, t, "right", n),
+bottom: this.getComputedBoxValue(e, t, "bottom", n),
+left: this.getComputedBoxValue(e, t, "left", n)
+};
+},
+calcPaddingExtents: function(e) {
+return this.calcBoxExtents(e, "padding");
+},
+calcMarginExtents: function(e) {
+return this.calcBoxExtents(e, "margin");
}
};
@@ -1194,38 +1260,38 @@ return window.innerWidth ? window.innerWidth : document.body && document.body.of
(function() {
enyo.dom.calcCanAccelerate = function() {
if (enyo.platform.android <= 2) return !1;
-var a = [ "perspective", "WebkitPerspective", "MozPerspective", "msPerspective", "OPerspective" ];
-for (var b = 0, c; c = a[b]; b++) if (typeof document.body.style[c] != "undefined") return !0;
+var e = [ "perspective", "WebkitPerspective", "MozPerspective", "msPerspective", "OPerspective" ];
+for (var t = 0, n; n = e[t]; t++) if (typeof document.body.style[n] != "undefined") return !0;
return !1;
};
-var a = [ "transform", "-webkit-transform", "-moz-transform", "-ms-transform", "-o-transform" ], b = [ "transform", "webkitTransform", "MozTransform", "msTransform", "OTransform" ];
+var e = [ "transform", "-webkit-transform", "-moz-transform", "-ms-transform", "-o-transform" ], t = [ "transform", "webkitTransform", "MozTransform", "msTransform", "OTransform" ];
enyo.dom.getCssTransformProp = function() {
if (this._cssTransformProp) return this._cssTransformProp;
-var c = enyo.indexOf(this.getStyleTransformProp(), b);
-return this._cssTransformProp = a[c];
+var n = enyo.indexOf(this.getStyleTransformProp(), t);
+return this._cssTransformProp = e[n];
}, enyo.dom.getStyleTransformProp = function() {
if (this._styleTransformProp || !document.body) return this._styleTransformProp;
-for (var a = 0, c; c = b[a]; a++) if (typeof document.body.style[c] != "undefined") return this._styleTransformProp = c;
-}, enyo.dom.domTransformsToCss = function(a) {
-var b, c, d = "";
-for (b in a) c = a[b], c !== null && c !== undefined && c !== "" && (d += b + "(" + c + ") ");
-return d;
-}, enyo.dom.transformsToDom = function(a) {
-var b = this.domTransformsToCss(a.domTransforms), c = a.hasNode() ? a.node.style : null, d = a.domStyles, e = this.getStyleTransformProp(), f = this.getCssTransformProp();
-e && f && (d[f] = b, c ? c[e] = b : a.domStylesChanged());
+for (var e = 0, n; n = t[e]; e++) if (typeof document.body.style[n] != "undefined") return this._styleTransformProp = n;
+}, enyo.dom.domTransformsToCss = function(e) {
+var t, n, r = "";
+for (t in e) n = e[t], n !== null && n !== undefined && n !== "" && (r += t + "(" + n + ") ");
+return r;
+}, enyo.dom.transformsToDom = function(e) {
+var t = this.domTransformsToCss(e.domTransforms), n = e.hasNode() ? e.node.style : null, r = e.domStyles, i = this.getStyleTransformProp(), s = this.getCssTransformProp();
+i && s && (r[s] = t, n ? n[i] = t : e.domStylesChanged());
}, enyo.dom.canTransform = function() {
return Boolean(this.getStyleTransformProp());
}, enyo.dom.canAccelerate = function() {
return this.accelerando !== undefined ? this.accelerando : document.body && (this.accelerando = this.calcCanAccelerate());
-}, enyo.dom.transform = function(a, b) {
-var c = a.domTransforms = a.domTransforms || {};
-enyo.mixin(c, b), this.transformsToDom(a);
-}, enyo.dom.transformValue = function(a, b, c) {
-var d = a.domTransforms = a.domTransforms || {};
-d[b] = c, this.transformsToDom(a);
-}, enyo.dom.accelerate = function(a, b) {
-var c = b == "auto" ? this.canAccelerate() : b;
-this.transformValue(a, "translateZ", c ? 0 : null);
+}, enyo.dom.transform = function(e, t) {
+var n = e.domTransforms = e.domTransforms || {};
+enyo.mixin(n, t), this.transformsToDom(e);
+}, enyo.dom.transformValue = function(e, t, n) {
+var r = e.domTransforms = e.domTransforms || {};
+r[t] = n, this.transformsToDom(e);
+}, enyo.dom.accelerate = function(e, t) {
+var n = t == "auto" ? this.canAccelerate() : t;
+this.transformValue(e, "translateZ", n ? 0 : null);
};
})();
@@ -1258,75 +1324,75 @@ create: function() {
this.initStyles(), this.inherited(arguments), this.showingChanged(), this.addClass(this.kindClasses), this.addClass(this.classes), this.initProps([ "id", "content", "src" ]);
},
destroy: function() {
-this.removeNodeFromDom(), this.inherited(arguments);
+this.removeNodeFromDom(), enyo.Control.unregisterDomEvents(this.id), this.inherited(arguments);
},
-importProps: function(a) {
+importProps: function(e) {
this.inherited(arguments), this.attributes = enyo.mixin(enyo.clone(this.kindAttributes), this.attributes);
},
-initProps: function(a) {
-for (var b = 0, c, d; c = a[b]; b++) this[c] && (d = c + "Changed", this[d] && this[d]());
+initProps: function(e) {
+for (var t = 0, n, r; n = e[t]; t++) this[n] && (r = n + "Changed", this[r] && this[r]());
},
-classesChanged: function(a) {
-this.removeClass(a), this.addClass(this.classes);
+classesChanged: function(e) {
+this.removeClass(e), this.addClass(this.classes);
},
-addChild: function(a) {
-a.addClass(this.controlClasses), this.inherited(arguments);
+addChild: function(e) {
+e.addClass(this.controlClasses), this.inherited(arguments);
},
-removeChild: function(a) {
-this.inherited(arguments), a.removeClass(this.controlClasses);
+removeChild: function(e) {
+this.inherited(arguments), e.removeClass(this.controlClasses);
},
strictlyInternalEvents: {
onenter: 1,
onleave: 1
},
-dispatchEvent: function(a, b, c) {
-return this.strictlyInternalEvents[a] && this.isInternalEvent(b) ? !0 : this.inherited(arguments);
+dispatchEvent: function(e, t, n) {
+return this.strictlyInternalEvents[e] && this.isInternalEvent(t) ? !0 : this.inherited(arguments);
},
-isInternalEvent: function(a) {
-var b = enyo.dispatcher.findDispatchTarget(a.relatedTarget);
-return b && b.isDescendantOf(this);
+isInternalEvent: function(e) {
+var t = enyo.dispatcher.findDispatchTarget(e.relatedTarget);
+return t && t.isDescendantOf(this);
},
hasNode: function() {
return this.generated && (this.node || this.findNodeById());
},
-addContent: function(a) {
-this.setContent(this.content + a);
+addContent: function(e) {
+this.setContent(this.content + e);
},
-getAttribute: function(a) {
-return this.hasNode() ? this.node.getAttribute(a) : this.attributes[a];
+getAttribute: function(e) {
+return this.hasNode() ? this.node.getAttribute(e) : this.attributes[e];
},
-setAttribute: function(a, b) {
-this.attributes[a] = b, this.hasNode() && this.attributeToNode(a, b), this.invalidateTags();
+setAttribute: function(e, t) {
+this.attributes[e] = t, this.hasNode() && this.attributeToNode(e, t), this.invalidateTags();
},
-getNodeProperty: function(a, b) {
-return this.hasNode() ? this.node[a] : b;
+getNodeProperty: function(e, t) {
+return this.hasNode() ? this.node[e] : t;
},
-setNodeProperty: function(a, b) {
-this.hasNode() && (this.node[a] = b);
+setNodeProperty: function(e, t) {
+this.hasNode() && (this.node[e] = t);
},
-setClassAttribute: function(a) {
-this.setAttribute("class", a);
+setClassAttribute: function(e) {
+this.setAttribute("class", e);
},
getClassAttribute: function() {
return this.attributes["class"] || "";
},
-hasClass: function(a) {
-return a && (" " + this.getClassAttribute() + " ").indexOf(" " + a + " ") >= 0;
+hasClass: function(e) {
+return e && (" " + this.getClassAttribute() + " ").indexOf(" " + e + " ") >= 0;
},
-addClass: function(a) {
-if (a && !this.hasClass(a)) {
-var b = this.getClassAttribute();
-this.setClassAttribute(b + (b ? " " : "") + a);
+addClass: function(e) {
+if (e && !this.hasClass(e)) {
+var t = this.getClassAttribute();
+this.setClassAttribute(t + (t ? " " : "") + e);
}
},
-removeClass: function(a) {
-if (a && this.hasClass(a)) {
-var b = this.getClassAttribute();
-b = (" " + b + " ").replace(" " + a + " ", " ").slice(1, -1), this.setClassAttribute(b);
+removeClass: function(e) {
+if (e && this.hasClass(e)) {
+var t = this.getClassAttribute();
+t = (" " + t + " ").replace(" " + e + " ", " ").slice(1, -1), this.setClassAttribute(t);
}
},
-addRemoveClass: function(a, b) {
-this[b ? "addClass" : "removeClass"](a);
+addRemoveClass: function(e, t) {
+this[t ? "addClass" : "removeClass"](e);
},
initStyles: function() {
this.domStyles = this.domStyles || {}, enyo.Control.cssTextToDomStyles(this.kindStyle, this.domStyles), this.domCssText = enyo.Control.domStylesToCssText(this.domStyles);
@@ -1334,14 +1400,14 @@ this.domStyles = this.domStyles || {}, enyo.Control.cssTextToDomStyles(this.kind
styleChanged: function() {
this.invalidateTags(), this.renderStyles();
},
-applyStyle: function(a, b) {
-this.domStyles[a] = b, this.domStylesChanged();
+applyStyle: function(e, t) {
+this.domStyles[e] = t, this.domStylesChanged();
},
-addStyles: function(a) {
-enyo.Control.cssTextToDomStyles(a, this.domStyles), this.domStylesChanged();
+addStyles: function(e) {
+enyo.Control.cssTextToDomStyles(e, this.domStyles), this.domStylesChanged();
},
-getComputedStyleValue: function(a, b) {
-return this.hasNode() ? enyo.dom.getComputedStyleValue(this.node, a) : b;
+getComputedStyleValue: function(e, t) {
+return this.hasNode() ? enyo.dom.getComputedStyleValue(this.node, e) : t;
},
domStylesChanged: function() {
this.domCssText = enyo.Control.domStylesToCssText(this.domStyles), this.invalidateTags(), this.renderStyles();
@@ -1349,6 +1415,9 @@ this.domCssText = enyo.Control.domStylesToCssText(this.domStyles), this.invalida
stylesToNode: function() {
this.node.style.cssText = this.style + (this.style[this.style.length - 1] == ";" ? " " : "; ") + this.domCssText;
},
+setupBodyFitting: function() {
+enyo.dom.applyBodyFit(), this.addClass("enyo-fit enyo-clip");
+},
render: function() {
if (this.parent) {
this.parent.beforeChildRender(this);
@@ -1356,20 +1425,17 @@ if (!this.parent.generated) return this;
}
return this.hasNode() || this.renderNode(), this.hasNode() && (this.renderDom(), this.rendered()), this;
},
-renderInto: function(a) {
+renderInto: function(e) {
this.teardownRender();
-var b = enyo.dom.byId(a);
-return b == document.body ? this.setupBodyFitting() : this.fit && this.addClass("enyo-fit enyo-clip"), b.innerHTML = this.generateHtml(), this.rendered(), this;
+var t = enyo.dom.byId(e);
+return t == document.body ? this.setupBodyFitting() : this.fit && this.addClass("enyo-fit enyo-clip"), t.innerHTML = this.generateHtml(), this.rendered(), this;
},
write: function() {
return this.fit && this.setupBodyFitting(), document.write(this.generateHtml()), this.rendered(), this;
},
-setupBodyFitting: function() {
-enyo.dom.applyBodyFit(), this.addClass("enyo-fit enyo-clip");
-},
rendered: function() {
this.reflow();
-for (var a = 0, b; b = this.children[a]; a++) b.rendered();
+for (var e = 0, t; t = this.children[e]; e++) t.rendered();
},
show: function() {
this.setShowing(!0);
@@ -1378,27 +1444,27 @@ hide: function() {
this.setShowing(!1);
},
getBounds: function() {
-var a = this.node || this.hasNode() || 0;
+var e = this.node || this.hasNode() || 0;
return {
-left: a.offsetLeft,
-top: a.offsetTop,
-width: a.offsetWidth,
-height: a.offsetHeight
+left: e.offsetLeft,
+top: e.offsetTop,
+width: e.offsetWidth,
+height: e.offsetHeight
};
},
-setBounds: function(a, b) {
-var c = this.domStyles, d = b || "px", e = [ "width", "height", "left", "top", "right", "bottom" ];
-for (var f = 0, g, h; h = e[f]; f++) {
-g = a[h];
-if (g || g === 0) c[h] = g + (enyo.isString(g) ? "" : d);
+setBounds: function(e, t) {
+var n = this.domStyles, r = t || "px", i = [ "width", "height", "left", "top", "right", "bottom" ];
+for (var s = 0, o, u; u = i[s]; s++) {
+o = e[u];
+if (o || o === 0) n[u] = o + (enyo.isString(o) ? "" : r);
}
this.domStylesChanged();
},
findNodeById: function() {
return this.id && (this.node = enyo.dom.byId(this.id));
},
-idChanged: function(a) {
-a && enyo.Control.unregisterDomEvents(a), this.setAttribute("id", this.id), this.id && enyo.Control.registerDomEvents(this.id, this);
+idChanged: function(e) {
+e && enyo.Control.unregisterDomEvents(e), this.setAttribute("id", this.id), this.id && enyo.Control.registerDomEvents(this.id, this);
},
contentChanged: function() {
this.hasNode() && this.renderContent();
@@ -1414,50 +1480,50 @@ this.invalidateTags(), this.renderAttributes();
},
generateHtml: function() {
if (this.canGenerate === !1) return "";
-var a = this.generateInnerHtml(), b = this.generateOuterHtml(a);
-return this.generated = !0, b;
+var e = this.generateInnerHtml(), t = this.generateOuterHtml(e);
+return this.generated = !0, t;
},
generateInnerHtml: function() {
return this.flow(), this.children.length ? this.generateChildHtml() : this.allowHtml ? this.content : enyo.Control.escapeHtml(this.content);
},
generateChildHtml: function() {
-var a = "";
-for (var b = 0, c; c = this.children[b]; b++) {
-var d = c.generateHtml();
-c.prepend ? a = d + a : a += d;
+var e = "";
+for (var t = 0, n; n = this.children[t]; t++) {
+var r = n.generateHtml();
+n.prepend ? e = r + e : e += r;
}
-return a;
+return e;
},
-generateOuterHtml: function(a) {
-return this.tag ? (this.tagsValid || this.prepareTags(), this._openTag + a + this._closeTag) : a;
+generateOuterHtml: function(e) {
+return this.tag ? (this.tagsValid || this.prepareTags(), this._openTag + e + this._closeTag) : e;
},
invalidateTags: function() {
this.tagsValid = !1;
},
prepareTags: function() {
-var a = this.domCssText + this.style;
-this._openTag = "<" + this.tag + (a ? ' style="' + a + '"' : "") + enyo.Control.attributesToHtml(this.attributes), enyo.Control.selfClosing[this.tag] ? (this._openTag += "/>", this._closeTag = "") : (this._openTag += ">", this._closeTag = "</" + this.tag + ">"), this.tagsValid = !0;
+var e = this.domCssText + this.style;
+this._openTag = "<" + this.tag + (e ? ' style="' + e + '"' : "") + enyo.Control.attributesToHtml(this.attributes), enyo.Control.selfClosing[this.tag] ? (this._openTag += "/>", this._closeTag = "") : (this._openTag += ">", this._closeTag = "</" + this.tag + ">"), this.tagsValid = !0;
},
-attributeToNode: function(a, b) {
-b === null || b === !1 || b === "" ? this.node.removeAttribute(a) : this.node.setAttribute(a, b);
+attributeToNode: function(e, t) {
+t === null || t === !1 || t === "" ? this.node.removeAttribute(e) : this.node.setAttribute(e, t);
},
attributesToNode: function() {
-for (var a in this.attributes) this.attributeToNode(a, this.attributes[a]);
+for (var e in this.attributes) this.attributeToNode(e, this.attributes[e]);
},
getParentNode: function() {
return this.parentNode || this.parent && this.parent.hasNode();
},
addNodeToParent: function() {
if (this.node) {
-var a = this.getParentNode();
-a && this[this.prepend ? "insertNodeInParent" : "appendNodeToParent"](a);
+var e = this.getParentNode();
+e && this[this.prepend ? "insertNodeInParent" : "appendNodeToParent"](e);
}
},
-appendNodeToParent: function(a) {
-a.appendChild(this.node);
+appendNodeToParent: function(e) {
+e.appendChild(this.node);
},
-insertNodeInParent: function(a, b) {
-a.insertBefore(this.node, b || a.firstChild);
+insertNodeInParent: function(e, t) {
+e.insertBefore(this.node, t || e.firstChild);
},
removeNodeFromDom: function() {
this.hasNode() && this.node.parentNode && this.node.parentNode.removeChild(this.node);
@@ -1466,7 +1532,7 @@ teardownRender: function() {
this.generated && this.teardownChildren(), this.node = null, this.generated = !1;
},
teardownChildren: function() {
-for (var a = 0, b; b = this.children[a]; a++) b.teardownRender();
+for (var e = 0, t; t = this.children[e]; e++) t.teardownRender();
},
renderNode: function() {
this.teardownRender(), this.node = document.createElement(this.tag), this.addNodeToParent(), this.generated = !0;
@@ -1487,8 +1553,8 @@ beforeChildRender: function() {
this.generated && this.flow();
},
syncDisplayToShowing: function() {
-var a = this.domStyles;
-this.showing ? a.display == "none" && this.applyStyle("display", this._displayStyle || "") : (this._displayStyle = a.display == "none" ? "" : a.display, this.applyStyle("display", "none"));
+var e = this.domStyles;
+this.showing ? e.display == "none" && this.applyStyle("display", this._displayStyle || "") : (this._displayStyle = e.display == "none" ? "" : e.display, this.applyStyle("display", "none"));
},
showingChanged: function() {
this.syncDisplayToShowing();
@@ -1496,18 +1562,18 @@ this.syncDisplayToShowing();
getShowing: function() {
return this.showing = this.domStyles.display != "none";
},
-fitChanged: function(a) {
+fitChanged: function(e) {
this.parent.reflow();
},
statics: {
-escapeHtml: function(a) {
-return a != null ? String(a).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;") : "";
+escapeHtml: function(e) {
+return e != null ? String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;") : "";
},
-registerDomEvents: function(a, b) {
-enyo.$[a] = b;
+registerDomEvents: function(e, t) {
+enyo.$[e] = t;
},
-unregisterDomEvents: function(a) {
-enyo.$[a] = null;
+unregisterDomEvents: function(e) {
+enyo.$[e] = null;
},
selfClosing: {
img: 1,
@@ -1528,43 +1594,43 @@ source: 1,
track: 1,
col: 1
},
-cssTextToDomStyles: function(a, b) {
-if (a) {
-var c = a.replace(/; /g, ";").split(";");
-for (var d = 0, e, f, g, h; h = c[d]; d++) e = h.split(":"), f = e.shift(), g = e.join(":"), b[f] = g;
+cssTextToDomStyles: function(e, t) {
+if (e) {
+var n = e.replace(/; /g, ";").split(";");
+for (var r = 0, i, s, o, u; u = n[r]; r++) i = u.split(":"), s = i.shift(), o = i.join(":"), t[s] = o;
}
},
-domStylesToCssText: function(a) {
-var b, c, d = "";
-for (b in a) c = a[b], c !== null && c !== undefined && c !== "" && (d += b + ":" + c + ";");
-return d;
+domStylesToCssText: function(e) {
+var t, n, r = "";
+for (t in e) n = e[t], n !== null && n !== undefined && n !== "" && (r += t + ":" + n + ";");
+return r;
},
-stylesToHtml: function(a) {
-var b = enyo.Control.domStylesToCssText(a);
-return b ? ' style="' + b + '"' : "";
+stylesToHtml: function(e) {
+var t = enyo.Control.domStylesToCssText(e);
+return t ? ' style="' + t + '"' : "";
},
-escapeAttribute: function(a) {
-return enyo.isString(a) ? String(a).replace(/&/g, "&amp;").replace(/\"/g, "&quot;") : a;
+escapeAttribute: function(e) {
+return enyo.isString(e) ? String(e).replace(/&/g, "&amp;").replace(/\"/g, "&quot;") : e;
},
-attributesToHtml: function(a) {
-var b, c, d = "";
-for (b in a) c = a[b], c !== null && c !== !1 && c !== "" && (d += " " + b + '="' + enyo.Control.escapeAttribute(c) + '"');
-return d;
+attributesToHtml: function(e) {
+var t, n, r = "";
+for (t in e) n = e[t], n !== null && n !== !1 && n !== "" && (r += " " + t + '="' + enyo.Control.escapeAttribute(n) + '"');
+return r;
}
}
-}), enyo.defaultCtor = enyo.Control, enyo.Control.subclass = function(a, b) {
-var c = a.prototype;
-if (c.classes) {
-var d = c.kindClasses;
-c.kindClasses = (d ? d + " " : "") + c.classes, c.classes = "";
+}), enyo.defaultCtor = enyo.Control, enyo.Control.subclass = function(e, t) {
+var n = e.prototype;
+if (n.classes) {
+var r = n.kindClasses;
+n.kindClasses = (r ? r + " " : "") + n.classes, n.classes = "";
}
-if (c.style) {
-var e = c.kindStyle;
-c.kindStyle = (e ? e + ";" : "") + c.style, c.style = "";
+if (n.style) {
+var i = n.kindStyle;
+n.kindStyle = (i ? i + ";" : "") + n.style, n.style = "";
}
-if (b.attributes) {
-var f = c.kindAttributes;
-c.kindAttributes = enyo.mixin(enyo.clone(f), c.attributes), c.attributes = null;
+if (t.attributes) {
+var s = n.kindAttributes;
+n.kindAttributes = enyo.mixin(enyo.clone(s), n.attributes), n.attributes = null;
}
};
@@ -1574,7 +1640,10 @@ enyo.platform = {
touch: Boolean("ontouchstart" in window || window.navigator.msPointerEnabled),
gesture: Boolean("ongesturestart" in window || window.navigator.msPointerEnabled)
}, function() {
-var a = navigator.userAgent, b = enyo.platform, c = [ {
+var e = navigator.userAgent, t = enyo.platform, n = [ {
+platform: "androidChrome",
+regex: /Android .* Chrome\/(\d+)[.\d]+/
+}, {
platform: "android",
regex: /Android (\d+)/
}, {
@@ -1593,23 +1662,26 @@ regex: /(?:web|hpw)OS\/(\d+)/
}, {
platform: "safari",
regex: /Version\/(\d+)[.\d]+\s+Safari/
+}, {
+platform: "chrome",
+regex: /Chrome\/(\d+)[.\d]+/
} ];
-for (var d = 0, e, f, g; e = c[d]; d++) {
-f = e.regex.exec(a);
-if (f) {
-e.forceVersion ? g = e.forceVersion : g = Number(f[1]), b[e.platform] = g;
+for (var r = 0, i, s, o; i = n[r]; r++) {
+s = i.regex.exec(e);
+if (s) {
+i.forceVersion ? o = i.forceVersion : o = Number(s[1]), t[i.platform] = o;
break;
}
}
-enyo.dumbConsole = Boolean(b.android || b.ios || b.webos);
+enyo.dumbConsole = Boolean(t.android || t.ios || t.webos);
}();
// phonegap.js
(function() {
if (window.cordova || window.PhoneGap) {
-var a = [ "deviceready", "pause", "resume", "online", "offline", "backbutton", "batterycritical", "batterylow", "batterystatus", "menubutton", "searchbutton", "startcallbutton", "endcallbutton", "volumedownbutton", "volumeupbutton" ];
-for (var b = 0, c; c = a[b]; b++) document.addEventListener(c, enyo.bind(enyo.Signals, "send", "on" + c), !1);
+var e = [ "deviceready", "pause", "resume", "online", "offline", "backbutton", "batterycritical", "batterylow", "batterystatus", "menubutton", "searchbutton", "startcallbutton", "endcallbutton", "volumedownbutton", "volumeupbutton" ];
+for (var t = 0, n; n = e[t]; t++) document.addEventListener(n, enyo.bind(enyo.Signals, "send", "on" + n), !1);
}
})();
@@ -1620,86 +1692,86 @@ events: [ "mousedown", "mouseup", "mouseover", "mouseout", "mousemove", "mousewh
windowEvents: [ "resize", "load", "unload", "message" ],
features: [],
connect: function() {
-var a = enyo.dispatcher;
-for (var b = 0, c; c = a.events[b]; b++) a.listen(document, c);
-for (b = 0, c; c = a.windowEvents[b]; b++) a.listen(window, c);
-},
-listen: function(a, b) {
-var c = enyo.dispatch;
-a.addEventListener ? this.listen = function(a, b) {
-a.addEventListener(b, c, !1);
-} : this.listen = function(a, b, e) {
-a.attachEvent("on" + b, function(a) {
-return a.target = a.srcElement, a.preventDefault || (a.preventDefault = enyo.iePreventDefault), c(a);
+var e = enyo.dispatcher;
+for (var t = 0, n; n = e.events[t]; t++) e.listen(document, n);
+for (t = 0, n; n = e.windowEvents[t]; t++) e.listen(window, n);
+},
+listen: function(e, t) {
+var n = enyo.dispatch;
+e.addEventListener ? this.listen = function(e, t) {
+e.addEventListener(t, n, !1);
+} : this.listen = function(e, t, r) {
+e.attachEvent("on" + t, function(e) {
+return e.target = e.srcElement, e.preventDefault || (e.preventDefault = enyo.iePreventDefault), n(e);
});
-}, this.listen(a, b);
+}, this.listen(e, t);
},
-dispatch: function(a) {
-var b = this.findDispatchTarget(a.target) || this.findDefaultTarget(a);
-a.dispatchTarget = b;
-for (var c = 0, d; d = this.features[c]; c++) if (d.call(this, a) === !0) return;
-b && !a.preventDispatch && this.dispatchBubble(a, b);
+dispatch: function(e) {
+var t = this.findDispatchTarget(e.target) || this.findDefaultTarget(e);
+e.dispatchTarget = t;
+for (var n = 0, r; r = this.features[n]; n++) if (r.call(this, e) === !0) return;
+t && !e.preventDispatch && this.dispatchBubble(e, t);
},
-findDispatchTarget: function(a) {
-var b, c = a;
+findDispatchTarget: function(e) {
+var t, n = e;
try {
-while (c) {
-if (b = enyo.$[c.id]) {
-b.eventNode = c;
+while (n) {
+if (t = enyo.$[n.id]) {
+t.eventNode = n;
break;
}
-c = c.parentNode;
+n = n.parentNode;
}
-} catch (d) {
-console.log(d, c);
+} catch (r) {
+console.log(r, n);
}
-return b;
+return t;
},
-findDefaultTarget: function(a) {
+findDefaultTarget: function(e) {
return enyo.master;
},
-dispatchBubble: function(a, b) {
-return b.bubble("on" + a.type, a, b);
+dispatchBubble: function(e, t) {
+return t.bubble("on" + e.type, e, t);
}
}, enyo.iePreventDefault = function() {
this.returnValue = !1;
-}, enyo.dispatch = function(a) {
-return enyo.dispatcher.dispatch(a);
-}, enyo.bubble = function(a) {
-var b = a || window.event;
-b && (b.target || (b.target = b.srcElement), enyo.dispatch(b));
+}, enyo.dispatch = function(e) {
+return enyo.dispatcher.dispatch(e);
+}, enyo.bubble = function(e) {
+var t = e || window.event;
+t && (t.target || (t.target = t.srcElement), enyo.dispatch(t));
}, enyo.bubbler = "enyo.bubble(arguments[0])", enyo.requiresWindow(enyo.dispatcher.connect);
// preview.js
(function() {
-var a = "previewDomEvent", b = {
-feature: function(a) {
-b.dispatch(a, a.dispatchTarget);
-},
-dispatch: function(b, c) {
-var d = this.buildLineage(c);
-for (var e = 0, f; f = d[e]; e++) if (f[a] && f[a](b) === !0) {
-b.preventDispatch = !0;
+var e = "previewDomEvent", t = {
+feature: function(e) {
+t.dispatch(e, e.dispatchTarget);
+},
+dispatch: function(t, n) {
+var r = this.buildLineage(n);
+for (var i = 0, s; s = r[i]; i++) if (s[e] && s[e](t) === !0) {
+t.preventDispatch = !0;
return;
}
},
-buildLineage: function(a) {
-var b = [], c = a;
-while (c) b.unshift(c), c = c.parent;
-return b;
+buildLineage: function(e) {
+var t = [], n = e;
+while (n) t.unshift(n), n = n.parent;
+return t;
}
};
-enyo.dispatcher.features.push(b.feature);
+enyo.dispatcher.features.push(t.feature);
})();
// modal.js
-enyo.dispatcher.features.push(function(a) {
-var b = a.dispatchTarget, c = this.captureTarget && !this.noCaptureEvents[a.type], d = c && !(b && b.isDescendantOf && b.isDescendantOf(this.captureTarget));
-if (d) {
-var e = a.captureTarget = this.captureTarget, f = this.autoForwardEvents[a.type] || this.forwardEvents;
-this.dispatchBubble(a, e), f || (a.preventDispatch = !0);
+enyo.dispatcher.features.push(function(e) {
+var t = e.dispatchTarget, n = this.captureTarget && !this.noCaptureEvents[e.type], r = n && !(t && t.isDescendantOf && t.isDescendantOf(this.captureTarget));
+if (r) {
+var i = e.captureTarget = this.captureTarget, s = this.autoForwardEvents[e.type] || this.forwardEvents;
+this.dispatchBubble(e, i), s || (e.preventDispatch = !0);
}
}), enyo.mixin(enyo.dispatcher, {
noCaptureEvents: {
@@ -1712,18 +1784,18 @@ leave: 1,
resize: 1
},
captures: [],
-capture: function(a, b) {
-var c = {
-target: a,
-forward: b
+capture: function(e, t) {
+var n = {
+target: e,
+forward: t
};
-this.captures.push(c), this.setCaptureInfo(c);
+this.captures.push(n), this.setCaptureInfo(n);
},
release: function() {
this.captures.pop(), this.setCaptureInfo(this.captures[this.captures.length - 1]);
},
-setCaptureInfo: function(a) {
-this.captureTarget = a && a.target, this.forwardEvents = a && a.forward;
+setCaptureInfo: function(e) {
+this.captureTarget = e && e.target, this.forwardEvents = e && e.forward;
}
});
@@ -1731,331 +1803,338 @@ this.captureTarget = a && a.target, this.forwardEvents = a && a.forward;
enyo.gesture = {
eventProps: [ "target", "relatedTarget", "clientX", "clientY", "pageX", "pageY", "screenX", "screenY", "altKey", "ctrlKey", "metaKey", "shiftKey", "detail", "identifier", "dispatchTarget", "which", "srcEvent" ],
-makeEvent: function(a, b) {
-var c = {
-type: a
+makeEvent: function(e, t) {
+var n = {
+type: e
};
-for (var d = 0, e; e = this.eventProps[d]; d++) c[e] = b[e];
-c.srcEvent = c.srcEvent || b, c.preventDefault = this.preventDefault, c.disablePrevention = this.disablePrevention;
+for (var r = 0, i; i = this.eventProps[r]; r++) n[i] = t[i];
+n.srcEvent = n.srcEvent || t, n.preventDefault = this.preventDefault, n.disablePrevention = this.disablePrevention;
if (enyo.platform.ie) {
-var f = window.event && window.event.button;
-c.which = f & 1 ? 1 : f & 2 ? 2 : f & 4 ? 3 : 0;
+enyo.platform.ie == 8 && n.target && (n.pageX = n.clientX + n.target.scrollLeft, n.pageY = n.clientY + n.target.scrollTop);
+var s = window.event && window.event.button;
+n.which = s & 1 ? 1 : s & 2 ? 2 : s & 4 ? 3 : 0;
}
-return c;
+return n;
},
-down: function(a) {
-var b = this.makeEvent("down", a);
-enyo.dispatch(b), this.downEvent = b;
+down: function(e) {
+var t = this.makeEvent("down", e);
+enyo.dispatch(t), this.downEvent = t;
},
-move: function(a) {
-var b = this.makeEvent("move", a);
-b.dx = b.dy = b.horizontal = b.vertical = 0, b.which && this.downEvent && (b.dx = a.clientX - this.downEvent.clientX, b.dy = a.clientY - this.downEvent.clientY, b.horizontal = Math.abs(b.dx) > Math.abs(b.dy), b.vertical = !b.horizontal), enyo.dispatch(b);
+move: function(e) {
+var t = this.makeEvent("move", e);
+t.dx = t.dy = t.horizontal = t.vertical = 0, t.which && this.downEvent && (t.dx = e.clientX - this.downEvent.clientX, t.dy = e.clientY - this.downEvent.clientY, t.horizontal = Math.abs(t.dx) > Math.abs(t.dy), t.vertical = !t.horizontal), enyo.dispatch(t);
},
-up: function(a) {
-var b = this.makeEvent("up", a), c = !1;
-b.preventTap = function() {
-c = !0;
-}, enyo.dispatch(b), !c && this.downEvent && this.downEvent.which == 1 && this.sendTap(b), this.downEvent = null;
+up: function(e) {
+var t = this.makeEvent("up", e), n = !1;
+t.preventTap = function() {
+n = !0;
+}, enyo.dispatch(t), !n && this.downEvent && this.downEvent.which == 1 && this.sendTap(t), this.downEvent = null;
},
-over: function(a) {
-enyo.dispatch(this.makeEvent("enter", a));
+over: function(e) {
+enyo.dispatch(this.makeEvent("enter", e));
},
-out: function(a) {
-enyo.dispatch(this.makeEvent("leave", a));
+out: function(e) {
+enyo.dispatch(this.makeEvent("leave", e));
},
-sendTap: function(a) {
-var b = this.findCommonAncestor(this.downEvent.target, a.target);
-if (b) {
-var c = this.makeEvent("tap", a);
-c.target = b, enyo.dispatch(c);
+sendTap: function(e) {
+var t = this.findCommonAncestor(this.downEvent.target, e.target);
+if (t) {
+var n = this.makeEvent("tap", e);
+n.target = t, enyo.dispatch(n);
}
},
-findCommonAncestor: function(a, b) {
-var c = b;
-while (c) {
-if (this.isTargetDescendantOf(a, c)) return c;
-c = c.parentNode;
+findCommonAncestor: function(e, t) {
+var n = t;
+while (n) {
+if (this.isTargetDescendantOf(e, n)) return n;
+n = n.parentNode;
}
},
-isTargetDescendantOf: function(a, b) {
-var c = a;
-while (c) {
-if (c == b) return !0;
-c = c.parentNode;
+isTargetDescendantOf: function(e, t) {
+var n = e;
+while (n) {
+if (n == t) return !0;
+n = n.parentNode;
}
}
}, enyo.gesture.preventDefault = function() {
this.srcEvent && this.srcEvent.preventDefault();
}, enyo.gesture.disablePrevention = function() {
this.preventDefault = enyo.nop, this.srcEvent && (this.srcEvent.preventDefault = enyo.nop);
-}, enyo.dispatcher.features.push(function(a) {
-if (enyo.gesture.events[a.type]) return enyo.gesture.events[a.type](a);
+}, enyo.dispatcher.features.push(function(e) {
+if (enyo.gesture.events[e.type]) return enyo.gesture.events[e.type](e);
}), enyo.gesture.events = {
-mousedown: function(a) {
-enyo.gesture.down(a);
+mousedown: function(e) {
+enyo.gesture.down(e);
},
-mouseup: function(a) {
-enyo.gesture.up(a);
+mouseup: function(e) {
+enyo.gesture.up(e);
},
-mousemove: function(a) {
-enyo.gesture.move(a);
+mousemove: function(e) {
+enyo.gesture.move(e);
},
-mouseover: function(a) {
-enyo.gesture.over(a);
+mouseover: function(e) {
+enyo.gesture.over(e);
},
-mouseout: function(a) {
-enyo.gesture.out(a);
+mouseout: function(e) {
+enyo.gesture.out(e);
}
}, enyo.requiresWindow(function() {
-document.addEventListener && document.addEventListener("DOMMouseScroll", function(a) {
-var b = enyo.clone(a);
-b.preventDefault = function() {
-a.preventDefault();
-}, b.type = "mousewheel";
-var c = b.VERTICAL_AXIS == b.axis ? "wheelDeltaY" : "wheelDeltaX";
-b[c] = b.detail * -12, enyo.dispatch(b);
+document.addEventListener && document.addEventListener("DOMMouseScroll", function(e) {
+var t = enyo.clone(e);
+t.preventDefault = function() {
+e.preventDefault();
+}, t.type = "mousewheel";
+var n = t.VERTICAL_AXIS == t.axis ? "wheelDeltaY" : "wheelDeltaX";
+t[n] = t.detail * -12, enyo.dispatch(t);
}, !1);
});
// drag.js
-enyo.dispatcher.features.push(function(a) {
-if (enyo.gesture.drag[a.type]) return enyo.gesture.drag[a.type](a);
+enyo.dispatcher.features.push(function(e) {
+if (enyo.gesture.drag[e.type]) return enyo.gesture.drag[e.type](e);
}), enyo.gesture.drag = {
hysteresisSquared: 16,
holdPulseDelay: 200,
trackCount: 5,
minFlick: .1,
minTrack: 8,
-down: function(a) {
-this.stopDragging(a), this.cancelHold(), this.target = a.target, this.startTracking(a), this.beginHold(a);
+down: function(e) {
+this.stopDragging(e), this.cancelHold(), this.target = e.target, this.startTracking(e), this.beginHold(e);
},
-move: function(a) {
+move: function(e) {
if (this.tracking) {
-this.track(a);
-if (!a.which) {
-this.stopDragging(a), this.cancelHold(), this.tracking = !1;
+this.track(e);
+if (!e.which) {
+this.stopDragging(e), this.cancelHold(), this.tracking = !1;
return;
}
-this.dragEvent ? this.sendDrag(a) : this.dy * this.dy + this.dx * this.dx >= this.hysteresisSquared && (this.sendDragStart(a), this.cancelHold());
+this.dragEvent ? this.sendDrag(e) : this.dy * this.dy + this.dx * this.dx >= this.hysteresisSquared && (this.sendDragStart(e), this.cancelHold());
}
},
-up: function(a) {
-this.endTracking(a), this.stopDragging(a), this.cancelHold();
+up: function(e) {
+this.endTracking(e), this.stopDragging(e), this.cancelHold();
},
-leave: function(a) {
-this.dragEvent && this.sendDragOut(a);
+leave: function(e) {
+this.dragEvent && this.sendDragOut(e);
},
-stopDragging: function(a) {
+stopDragging: function(e) {
if (this.dragEvent) {
-this.sendDrop(a);
-var b = this.sendDragFinish(a);
-return this.dragEvent = null, b;
+this.sendDrop(e);
+var t = this.sendDragFinish(e);
+return this.dragEvent = null, t;
}
},
-makeDragEvent: function(a, b, c, d) {
-var e = Math.abs(this.dx), f = Math.abs(this.dy), g = e > f, h = (g ? f / e : e / f) < .414, i = {
-type: a,
+makeDragEvent: function(e, t, n, r) {
+var i = Math.abs(this.dx), s = Math.abs(this.dy), o = i > s, u = (o ? s / i : i / s) < .414, a = {
+type: e,
dx: this.dx,
dy: this.dy,
ddx: this.dx - this.lastDx,
ddy: this.dy - this.lastDy,
xDirection: this.xDirection,
yDirection: this.yDirection,
-pageX: c.pageX,
-pageY: c.pageY,
-clientX: c.clientX,
-clientY: c.clientY,
-horizontal: g,
-vertical: !g,
-lockable: h,
-target: b,
-dragInfo: d,
-ctrlKey: c.ctrlKey,
-altKey: c.altKey,
-metaKey: c.metaKey,
-shiftKey: c.shiftKey,
-srcEvent: c.srcEvent
+pageX: n.pageX,
+pageY: n.pageY,
+clientX: n.clientX,
+clientY: n.clientY,
+horizontal: o,
+vertical: !o,
+lockable: u,
+target: t,
+dragInfo: r,
+ctrlKey: n.ctrlKey,
+altKey: n.altKey,
+metaKey: n.metaKey,
+shiftKey: n.shiftKey,
+srcEvent: n.srcEvent
};
-return enyo.platform.ie == 8 && i.target && (i.pageX = i.clientX + i.target.scrollLeft, i.pageY = i.clientY + i.target.scrollTop), i.preventDefault = enyo.gesture.preventDefault, i.disablePrevention = enyo.gesture.disablePrevention, i;
-},
-sendDragStart: function(a) {
-this.dragEvent = this.makeDragEvent("dragstart", this.target, a), enyo.dispatch(this.dragEvent);
-},
-sendDrag: function(a) {
-var b = this.makeDragEvent("dragover", a.target, a, this.dragEvent.dragInfo);
-enyo.dispatch(b), b.type = "drag", b.target = this.dragEvent.target, enyo.dispatch(b);
-},
-sendDragFinish: function(a) {
-var b = this.makeDragEvent("dragfinish", this.dragEvent.target, a, this.dragEvent.dragInfo);
-b.preventTap = function() {
-a.preventTap && a.preventTap();
-}, enyo.dispatch(b);
-},
-sendDragOut: function(a) {
-var b = this.makeDragEvent("dragout", a.target, a, this.dragEvent.dragInfo);
-enyo.dispatch(b);
-},
-sendDrop: function(a) {
-var b = this.makeDragEvent("drop", a.target, a, this.dragEvent.dragInfo);
-b.preventTap = function() {
-a.preventTap && a.preventTap();
-}, enyo.dispatch(b);
-},
-startTracking: function(a) {
-this.tracking = !0, this.px0 = a.clientX, this.py0 = a.clientY, this.flickInfo = {
-startEvent: a,
+return enyo.platform.ie == 8 && a.target && (a.pageX = a.clientX + a.target.scrollLeft, a.pageY = a.clientY + a.target.scrollTop), a.preventDefault = enyo.gesture.preventDefault, a.disablePrevention = enyo.gesture.disablePrevention, a;
+},
+sendDragStart: function(e) {
+this.dragEvent = this.makeDragEvent("dragstart", this.target, e), enyo.dispatch(this.dragEvent);
+},
+sendDrag: function(e) {
+var t = this.makeDragEvent("dragover", e.target, e, this.dragEvent.dragInfo);
+enyo.dispatch(t), t.type = "drag", t.target = this.dragEvent.target, enyo.dispatch(t);
+},
+sendDragFinish: function(e) {
+var t = this.makeDragEvent("dragfinish", this.dragEvent.target, e, this.dragEvent.dragInfo);
+t.preventTap = function() {
+e.preventTap && e.preventTap();
+}, enyo.dispatch(t);
+},
+sendDragOut: function(e) {
+var t = this.makeDragEvent("dragout", e.target, e, this.dragEvent.dragInfo);
+enyo.dispatch(t);
+},
+sendDrop: function(e) {
+var t = this.makeDragEvent("drop", e.target, e, this.dragEvent.dragInfo);
+t.preventTap = function() {
+e.preventTap && e.preventTap();
+}, enyo.dispatch(t);
+},
+startTracking: function(e) {
+this.tracking = !0, this.px0 = e.clientX, this.py0 = e.clientY, this.flickInfo = {
+startEvent: e,
moves: []
-}, this.track(a);
-},
-track: function(a) {
-this.lastDx = this.dx, this.lastDy = this.dy, this.dx = a.clientX - this.px0, this.dy = a.clientY - this.py0, this.xDirection = this.calcDirection(this.dx - this.lastDx, 0), this.yDirection = this.calcDirection(this.dy - this.lastDy, 0);
-var b = this.flickInfo;
-b.moves.push({
-x: a.clientX,
-y: a.clientY,
+}, this.track(e);
+},
+track: function(e) {
+this.lastDx = this.dx, this.lastDy = this.dy, this.dx = e.clientX - this.px0, this.dy = e.clientY - this.py0, this.xDirection = this.calcDirection(this.dx - this.lastDx, 0), this.yDirection = this.calcDirection(this.dy - this.lastDy, 0);
+var t = this.flickInfo;
+t.moves.push({
+x: e.clientX,
+y: e.clientY,
t: enyo.now()
-}), b.moves.length > this.trackCount && b.moves.shift();
+}), t.moves.length > this.trackCount && t.moves.shift();
},
-endTracking: function(a) {
+endTracking: function(e) {
this.tracking = !1;
-var b = this.flickInfo, c = b && b.moves;
-if (c && c.length > 1) {
-var d = c[c.length - 1], e = enyo.now();
-for (var f = c.length - 2, g = 0, h = 0, i = 0, j = 0, k = 0, l = 0, m = 0, n; n = c[f]; f--) {
-g = e - n.t, h = (d.x - n.x) / g, i = (d.y - n.y) / g, l = l || (h < 0 ? -1 : h > 0 ? 1 : 0), m = m || (i < 0 ? -1 : i > 0 ? 1 : 0);
-if (h * l > j * l || i * m > k * m) j = h, k = i;
+var t = this.flickInfo, n = t && t.moves;
+if (n && n.length > 1) {
+var r = n[n.length - 1], i = enyo.now();
+for (var s = n.length - 2, o = 0, u = 0, a = 0, f = 0, l = 0, c = 0, h = 0, p; p = n[s]; s--) {
+o = i - p.t, u = (r.x - p.x) / o, a = (r.y - p.y) / o, c = c || (u < 0 ? -1 : u > 0 ? 1 : 0), h = h || (a < 0 ? -1 : a > 0 ? 1 : 0);
+if (u * c > f * c || a * h > l * h) f = u, l = a;
}
-var o = Math.sqrt(j * j + k * k);
-o > this.minFlick && this.sendFlick(b.startEvent, j, k, o);
+var d = Math.sqrt(f * f + l * l);
+d > this.minFlick && this.sendFlick(t.startEvent, f, l, d);
}
this.flickInfo = null;
},
-calcDirection: function(a, b) {
-return a > 0 ? 1 : a < 0 ? -1 : b;
+calcDirection: function(e, t) {
+return e > 0 ? 1 : e < 0 ? -1 : t;
},
-beginHold: function(a) {
-this.holdStart = enyo.now(), this.holdJob = setInterval(enyo.bind(this, "sendHoldPulse", a), this.holdPulseDelay);
+beginHold: function(e) {
+this.holdStart = enyo.now(), this.holdJob = setInterval(enyo.bind(this, "sendHoldPulse", e), this.holdPulseDelay);
},
cancelHold: function() {
clearInterval(this.holdJob), this.holdJob = null, this.sentHold && (this.sentHold = !1, this.sendRelease(this.holdEvent));
},
-sendHoldPulse: function(a) {
-this.sentHold || (this.sentHold = !0, this.sendHold(a));
-var b = enyo.gesture.makeEvent("holdpulse", a);
-b.holdTime = enyo.now() - this.holdStart, enyo.dispatch(b);
+sendHoldPulse: function(e) {
+this.sentHold || (this.sentHold = !0, this.sendHold(e));
+var t = enyo.gesture.makeEvent("holdpulse", e);
+t.holdTime = enyo.now() - this.holdStart, enyo.dispatch(t);
},
-sendHold: function(a) {
-this.holdEvent = a;
-var b = enyo.gesture.makeEvent("hold", a);
-enyo.dispatch(b);
+sendHold: function(e) {
+this.holdEvent = e;
+var t = enyo.gesture.makeEvent("hold", e);
+enyo.dispatch(t);
},
-sendRelease: function(a) {
-var b = enyo.gesture.makeEvent("release", a);
-enyo.dispatch(b);
+sendRelease: function(e) {
+var t = enyo.gesture.makeEvent("release", e);
+enyo.dispatch(t);
},
-sendFlick: function(a, b, c, d) {
-var e = enyo.gesture.makeEvent("flick", a);
-e.xVelocity = b, e.yVelocity = c, e.velocity = d, enyo.dispatch(e);
+sendFlick: function(e, t, n, r) {
+var i = enyo.gesture.makeEvent("flick", e);
+i.xVelocity = t, i.yVelocity = n, i.velocity = r, enyo.dispatch(i);
}
};
// touch.js
enyo.requiresWindow(function() {
-var a = enyo.gesture;
-a.events.touchstart = function(c) {
-a.events = b, a.events.touchstart(c);
+var e = enyo.gesture;
+e.events.touchstart = function(n) {
+e.events = t, e.events.touchstart(n);
};
-var b = {
-touchstart: function(b) {
+var t = {
+touchstart: function(t) {
this.excludedTarget = null;
-var c = this.makeEvent(b);
-a.down(c), c = this.makeEvent(b), this.overEvent = c, a.over(c);
+var n = this.makeEvent(t);
+e.down(n), n = this.makeEvent(t), this.overEvent = n, e.over(n);
},
-touchmove: function(b) {
-var c = a.drag.dragEvent;
-this.excludedTarget = c && c.dragInfo && c.dragInfo.node;
-var d = this.makeEvent(b);
-a.move(d), enyo.bodyIsFitting && b.preventDefault(), this.overEvent && this.overEvent.target != d.target && (this.overEvent.relatedTarget = d.target, d.relatedTarget = this.overEvent.target, a.out(this.overEvent), a.over(d)), this.overEvent = d;
+touchmove: function(t) {
+var n = e.drag.dragEvent;
+this.excludedTarget = n && n.dragInfo && n.dragInfo.node;
+var r = this.makeEvent(t);
+e.move(r), enyo.bodyIsFitting && t.preventDefault(), this.overEvent && this.overEvent.target != r.target && (this.overEvent.relatedTarget = r.target, r.relatedTarget = this.overEvent.target, e.out(this.overEvent), e.over(r)), this.overEvent = r;
},
-touchend: function(b) {
-a.up(this.makeEvent(b)), a.out(this.overEvent);
+touchend: function(t) {
+e.up(this.makeEvent(t)), e.out(this.overEvent);
},
-makeEvent: function(a) {
-var b = enyo.clone(a.changedTouches[0]);
-return b.srcEvent = a, b.target = this.findTarget(b.clientX, b.clientY), b.which = 1, b;
+makeEvent: function(e) {
+var t = enyo.clone(e.changedTouches[0]);
+return t.srcEvent = e, t.target = this.findTarget(t.clientX, t.clientY), t.which = 1, t;
},
-calcNodeOffset: function(a) {
-if (a.getBoundingClientRect) {
-var b = a.getBoundingClientRect();
+calcNodeOffset: function(e) {
+if (e.getBoundingClientRect) {
+var t = e.getBoundingClientRect();
return {
-left: b.left,
-top: b.top,
-width: b.width,
-height: b.height
+left: t.left,
+top: t.top,
+width: t.width,
+height: t.height
};
}
},
-findTarget: function(a, b) {
-return document.elementFromPoint(a, b);
+findTarget: function(e, t) {
+return document.elementFromPoint(e, t);
},
-findTargetTraverse: function(a, b, c) {
-var d = a || document.body, e = this.calcNodeOffset(d);
-if (e && d != this.excludedTarget) {
-var f = b - e.left, g = c - e.top;
-if (f > 0 && g > 0 && f <= e.width && g <= e.height) {
-var h;
-for (var i = d.childNodes, j = i.length - 1, k; k = i[j]; j--) {
-h = this.findTargetTraverse(k, b, c);
-if (h) return h;
+findTargetTraverse: function(e, t, n) {
+var r = e || document.body, i = this.calcNodeOffset(r);
+if (i && r != this.excludedTarget) {
+var s = t - i.left, o = n - i.top;
+if (s > 0 && o > 0 && s <= i.width && o <= i.height) {
+var u;
+for (var a = r.childNodes, f = a.length - 1, l; l = a[f]; f--) {
+u = this.findTargetTraverse(l, t, n);
+if (u) return u;
}
-return d;
+return r;
}
}
},
connect: function() {
-enyo.forEach([ "ontouchstart", "ontouchmove", "ontouchend", "ongesturestart", "ongesturechange", "ongestureend" ], function(a) {
-document[a] = enyo.dispatch;
-}), document.elementFromPoint || (this.findTarget = function(a, b) {
-return this.findTargetTraverse(null, a, b);
+enyo.forEach([ "ontouchstart", "ontouchmove", "ontouchend", "ongesturestart", "ongesturechange", "ongestureend" ], function(e) {
+document[e] = enyo.dispatch;
+});
+if (enyo.platform.androidChrome <= 18) {
+var e = window.devicePixelRatio;
+this.findTarget = function(t, n) {
+return document.elementFromPoint(t * e, n * e);
+};
+} else document.elementFromPoint || (this.findTarget = function(e, t) {
+return this.findTargetTraverse(null, e, t);
});
}
};
-b.connect();
+t.connect();
});
// msevents.js
(function() {
if (window.navigator.msPointerEnabled) {
-var a = [ "MSPointerDown", "MSPointerUp", "MSPointerMove", "MSPointerOver", "MSPointerOut", "MSPointerCancel", "MSGestureTap", "MSGestureDoubleTap", "MSGestureHold", "MSGestureStart", "MSGestureChange", "MSGestureEnd" ];
-enyo.forEach(a, function(a) {
-enyo.dispatcher.listen(document, a);
-}), enyo.dispatcher.features.push(function(a) {
-c[a.type] && c[a.type](a);
+var e = [ "MSPointerDown", "MSPointerUp", "MSPointerMove", "MSPointerOver", "MSPointerOut", "MSPointerCancel", "MSGestureTap", "MSGestureDoubleTap", "MSGestureHold", "MSGestureStart", "MSGestureChange", "MSGestureEnd" ];
+enyo.forEach(e, function(e) {
+enyo.dispatcher.listen(document, e);
+}), enyo.dispatcher.features.push(function(e) {
+n[e.type] && n[e.type](e);
});
}
-var b = function(a, b) {
-var c = enyo.clone(b);
-return enyo.mixin(c, {
-pageX: b.translationX || 0,
-pageY: b.translationY || 0,
-rotation: b.rotation * (180 / Math.PI) || 0,
-type: a,
-srcEvent: b,
+var t = function(e, t) {
+var n = enyo.clone(t);
+return enyo.mixin(n, {
+pageX: t.translationX || 0,
+pageY: t.translationY || 0,
+rotation: t.rotation * (180 / Math.PI) || 0,
+type: e,
+srcEvent: t,
preventDefault: enyo.gesture.preventDefault,
disablePrevention: enyo.gesture.disablePrevention
});
-}, c = {
-MSGestureStart: function(a) {
-enyo.dispatch(b("gesturestart", a));
+}, n = {
+MSGestureStart: function(e) {
+enyo.dispatch(t("gesturestart", e));
},
-MSGestureChange: function(a) {
-enyo.dispatch(b("gesturechange", a));
+MSGestureChange: function(e) {
+enyo.dispatch(t("gesturechange", e));
},
-MSGestureEnd: function(a) {
-enyo.dispatch(b("gestureend", a));
+MSGestureEnd: function(e) {
+enyo.dispatch(t("gestureend", e));
}
};
})();
@@ -2063,94 +2142,94 @@ enyo.dispatch(b("gestureend", a));
// gesture.js
(function() {
-!enyo.platform.gesture && enyo.platform.touch && enyo.dispatcher.features.push(function(c) {
-a[c.type] && b[c.type](c);
+!enyo.platform.gesture && enyo.platform.touch && enyo.dispatcher.features.push(function(n) {
+e[n.type] && t[n.type](n);
});
-var a = {
+var e = {
touchstart: !0,
touchmove: !0,
touchend: !0
-}, b = {
+}, t = {
orderedTouches: [],
gesture: null,
-touchstart: function(a) {
-enyo.forEach(a.changedTouches, function(a) {
-var b = a.identifier;
-enyo.indexOf(b, this.orderedTouches) < 0 && this.orderedTouches.push(b);
+touchstart: function(e) {
+enyo.forEach(e.changedTouches, function(e) {
+var t = e.identifier;
+enyo.indexOf(t, this.orderedTouches) < 0 && this.orderedTouches.push(t);
}, this);
-if (a.touches.length >= 2 && !this.gesture) {
-var b = this.gesturePositions(a);
-this.gesture = this.gestureVector(b), this.gesture.angle = this.gestureAngle(b), this.gesture.scale = 1, this.gesture.rotation = 0;
-var c = this.makeGesture("gesturestart", a, {
+if (e.touches.length >= 2 && !this.gesture) {
+var t = this.gesturePositions(e);
+this.gesture = this.gestureVector(t), this.gesture.angle = this.gestureAngle(t), this.gesture.scale = 1, this.gesture.rotation = 0;
+var n = this.makeGesture("gesturestart", e, {
vector: this.gesture,
scale: 1,
rotation: 0
});
-enyo.dispatch(c);
+enyo.dispatch(n);
}
},
-touchend: function(a) {
-enyo.forEach(a.changedTouches, function(a) {
-enyo.remove(a.identifier, this.orderedTouches);
+touchend: function(e) {
+enyo.forEach(e.changedTouches, function(e) {
+enyo.remove(e.identifier, this.orderedTouches);
}, this);
-if (a.touches.length <= 1 && this.gesture) {
-var b = a.touches[0] || a.changedTouches[a.changedTouches.length - 1];
-enyo.dispatch(this.makeGesture("gestureend", a, {
+if (e.touches.length <= 1 && this.gesture) {
+var t = e.touches[0] || e.changedTouches[e.changedTouches.length - 1];
+enyo.dispatch(this.makeGesture("gestureend", e, {
vector: {
-xcenter: b.pageX,
-ycenter: b.pageY
+xcenter: t.pageX,
+ycenter: t.pageY
},
scale: this.gesture.scale,
rotation: this.gesture.rotation
})), this.gesture = null;
}
},
-touchmove: function(a) {
+touchmove: function(e) {
if (this.gesture) {
-var b = this.makeGesture("gesturechange", a);
-this.gesture.scale = b.scale, this.gesture.rotation = b.rotation, enyo.dispatch(b);
+var t = this.makeGesture("gesturechange", e);
+this.gesture.scale = t.scale, this.gesture.rotation = t.rotation, enyo.dispatch(t);
}
},
-findIdentifiedTouch: function(a, b) {
-for (var c = 0, d; d = a[c]; c++) if (d.identifier === b) return d;
+findIdentifiedTouch: function(e, t) {
+for (var n = 0, r; r = e[n]; n++) if (r.identifier === t) return r;
},
-gesturePositions: function(a) {
-var b = this.findIdentifiedTouch(a.touches, this.orderedTouches[0]), c = this.findIdentifiedTouch(a.touches, this.orderedTouches[this.orderedTouches.length - 1]), d = b.pageX, e = c.pageX, f = b.pageY, g = c.pageY, h = e - d, i = g - f, j = Math.sqrt(h * h + i * i);
+gesturePositions: function(e) {
+var t = this.findIdentifiedTouch(e.touches, this.orderedTouches[0]), n = this.findIdentifiedTouch(e.touches, this.orderedTouches[this.orderedTouches.length - 1]), r = t.pageX, i = n.pageX, s = t.pageY, o = n.pageY, u = i - r, a = o - s, f = Math.sqrt(u * u + a * a);
return {
-x: h,
-y: i,
-h: j,
-fx: d,
-lx: e,
-fy: f,
-ly: g
+x: u,
+y: a,
+h: f,
+fx: r,
+lx: i,
+fy: s,
+ly: o
};
},
-gestureAngle: function(a) {
-var b = a, c = Math.asin(b.y / b.h) * (180 / Math.PI);
-return b.x < 0 && (c = 180 - c), b.x > 0 && b.y < 0 && (c += 360), c;
+gestureAngle: function(e) {
+var t = e, n = Math.asin(t.y / t.h) * (180 / Math.PI);
+return t.x < 0 && (n = 180 - n), t.x > 0 && t.y < 0 && (n += 360), n;
},
-gestureVector: function(a) {
-var b = a;
+gestureVector: function(e) {
+var t = e;
return {
-magnitude: b.h,
-xcenter: Math.abs(Math.round(b.fx + b.x / 2)),
-ycenter: Math.abs(Math.round(b.fy + b.y / 2))
+magnitude: t.h,
+xcenter: Math.abs(Math.round(t.fx + t.x / 2)),
+ycenter: Math.abs(Math.round(t.fy + t.y / 2))
};
},
-makeGesture: function(a, b, c) {
-var d, e, f;
-if (c) d = c.vector, e = c.scale, f = c.rotation; else {
-var g = this.gesturePositions(b);
-d = this.gestureVector(g), e = d.magnitude / this.gesture.magnitude, f = (360 + this.gestureAngle(g) - this.gesture.angle) % 360;
-}
-var h = enyo.clone(b);
-return enyo.mixin(h, {
-type: a,
-scale: e,
-pageX: d.xcenter,
-pageY: d.ycenter,
-rotation: f
+makeGesture: function(e, t, n) {
+var r, i, s;
+if (n) r = n.vector, i = n.scale, s = n.rotation; else {
+var o = this.gesturePositions(t);
+r = this.gestureVector(o), i = r.magnitude / this.gesture.magnitude, s = (360 + this.gestureAngle(o) - this.gesture.angle) % 360;
+}
+var u = enyo.clone(t);
+return enyo.mixin(u, {
+type: e,
+scale: i,
+pageX: r.xcenter,
+pageY: r.ycenter,
+rotation: s
});
}
};
@@ -2190,98 +2269,98 @@ y: 0,
destroy: function() {
this.stop(), this.inherited(arguments);
},
-verlet: function(a) {
-var b = this.x;
-this.x += b - this.x0, this.x0 = b;
-var c = this.y;
-this.y += c - this.y0, this.y0 = c;
+verlet: function(e) {
+var t = this.x;
+this.x += t - this.x0, this.x0 = t;
+var n = this.y;
+this.y += n - this.y0, this.y0 = n;
},
-damping: function(a, b, c, d) {
-var e = .5, f = a - b;
-return Math.abs(f) < e ? b : a * d > b * d ? c * f + b : a;
+damping: function(e, t, n, r) {
+var i = .5, s = e - t;
+return Math.abs(s) < i ? t : e * r > t * r ? n * s + t : e;
},
-boundaryDamping: function(a, b, c, d) {
-return this.damping(this.damping(a, b, d, 1), c, d, -1);
+boundaryDamping: function(e, t, n, r) {
+return this.damping(this.damping(e, t, r, 1), n, r, -1);
},
constrain: function() {
-var a = this.boundaryDamping(this.y, this.topBoundary, this.bottomBoundary, this.kSpringDamping);
-a != this.y && (this.y0 = a - (this.y - this.y0) * this.kSnapFriction, this.y = a);
-var b = this.boundaryDamping(this.x, this.leftBoundary, this.rightBoundary, this.kSpringDamping);
-b != this.x && (this.x0 = b - (this.x - this.x0) * this.kSnapFriction, this.x = b);
+var e = this.boundaryDamping(this.y, this.topBoundary, this.bottomBoundary, this.kSpringDamping);
+e != this.y && (this.y0 = e - (this.y - this.y0) * this.kSnapFriction, this.y = e);
+var t = this.boundaryDamping(this.x, this.leftBoundary, this.rightBoundary, this.kSpringDamping);
+t != this.x && (this.x0 = t - (this.x - this.x0) * this.kSnapFriction, this.x = t);
},
-friction: function(a, b, c) {
-var d = this[a] - this[b], e = Math.abs(d) > this.kFrictionEpsilon ? c : 0;
-this[a] = this[b] + e * d;
+friction: function(e, t, n) {
+var r = this[e] - this[t], i = Math.abs(r) > this.kFrictionEpsilon ? n : 0;
+this[e] = this[t] + i * r;
},
frame: 10,
-simulate: function(a) {
-while (a >= this.frame) a -= this.frame, this.dragging || this.constrain(), this.verlet(), this.friction("y", "y0", this.kFrictionDamping), this.friction("x", "x0", this.kFrictionDamping);
-return a;
+simulate: function(e) {
+while (e >= this.frame) e -= this.frame, this.dragging || this.constrain(), this.verlet(), this.friction("y", "y0", this.kFrictionDamping), this.friction("x", "x0", this.kFrictionDamping);
+return e;
},
animate: function() {
this.stop();
-var a = enyo.now(), b = 0, c, d, e = enyo.bind(this, function() {
-var f = enyo.now();
-this.job = enyo.requestAnimationFrame(e);
-var g = f - a;
-a = f, this.dragging && (this.y0 = this.y = this.uy, this.x0 = this.x = this.ux), b += Math.max(16, g), this.fixedTime && !this.isInOverScroll() && (b = this.interval), b = this.simulate(b), d != this.y || c != this.x ? this.scroll() : this.dragging || (this.stop(!0), this.scroll()), d = this.y, c = this.x;
+var e = enyo.now(), t = 0, n, r, i = enyo.bind(this, function() {
+var s = enyo.now();
+this.job = enyo.requestAnimationFrame(i);
+var o = s - e;
+e = s, this.dragging && (this.y0 = this.y = this.uy, this.x0 = this.x = this.ux), t += Math.max(16, o), this.fixedTime && !this.isInOverScroll() && (t = this.interval), t = this.simulate(t), r != this.y || n != this.x ? this.scroll() : this.dragging || (this.stop(!0), this.scroll()), r = this.y, n = this.x;
});
-this.job = enyo.requestAnimationFrame(e);
+this.job = enyo.requestAnimationFrame(i);
},
start: function() {
this.job || (this.animate(), this.doScrollStart());
},
-stop: function(a) {
-this.job = enyo.cancelRequestAnimationFrame(this.job), a && this.doScrollStop();
+stop: function(e) {
+this.job = enyo.cancelRequestAnimationFrame(this.job), e && this.doScrollStop();
},
stabilize: function() {
this.start();
-var a = Math.min(this.topBoundary, Math.max(this.bottomBoundary, this.y)), b = Math.min(this.leftBoundary, Math.max(this.rightBoundary, this.x));
-this.y = this.y0 = a, this.x = this.x0 = b, this.scroll(), this.stop(!0);
+var e = Math.min(this.topBoundary, Math.max(this.bottomBoundary, this.y)), t = Math.min(this.leftBoundary, Math.max(this.rightBoundary, this.x));
+this.y = this.y0 = e, this.x = this.x0 = t, this.scroll(), this.stop(!0);
},
-startDrag: function(a) {
-this.dragging = !0, this.my = a.pageY, this.py = this.uy = this.y, this.mx = a.pageX, this.px = this.ux = this.x;
+startDrag: function(e) {
+this.dragging = !0, this.my = e.pageY, this.py = this.uy = this.y, this.mx = e.pageX, this.px = this.ux = this.x;
},
-drag: function(a) {
+drag: function(e) {
if (this.dragging) {
-var b = this.vertical ? a.pageY - this.my : 0;
-this.uy = b + this.py, this.uy = this.boundaryDamping(this.uy, this.topBoundary, this.bottomBoundary, this.kDragDamping);
-var c = this.horizontal ? a.pageX - this.mx : 0;
-return this.ux = c + this.px, this.ux = this.boundaryDamping(this.ux, this.leftBoundary, this.rightBoundary, this.kDragDamping), this.start(), !0;
+var t = this.vertical ? e.pageY - this.my : 0;
+this.uy = t + this.py, this.uy = this.boundaryDamping(this.uy, this.topBoundary, this.bottomBoundary, this.kDragDamping);
+var n = this.horizontal ? e.pageX - this.mx : 0;
+return this.ux = n + this.px, this.ux = this.boundaryDamping(this.ux, this.leftBoundary, this.rightBoundary, this.kDragDamping), this.start(), !0;
}
},
-dragDrop: function(a) {
+dragDrop: function(e) {
if (this.dragging && !window.PalmSystem) {
-var b = .5;
-this.y = this.uy, this.y0 = this.y - (this.y - this.y0) * b, this.x = this.ux, this.x0 = this.x - (this.x - this.x0) * b;
+var t = .5;
+this.y = this.uy, this.y0 = this.y - (this.y - this.y0) * t, this.x = this.ux, this.x0 = this.x - (this.x - this.x0) * t;
}
this.dragFinish();
},
dragFinish: function() {
this.dragging = !1;
},
-flick: function(a) {
-var b;
-this.vertical && (b = a.yVelocity > 0 ? Math.min(this.kMaxFlick, a.yVelocity) : Math.max(-this.kMaxFlick, a.yVelocity), this.y = this.y0 + b * this.kFlickScalar), this.horizontal && (b = a.xVelocity > 0 ? Math.min(this.kMaxFlick, a.xVelocity) : Math.max(-this.kMaxFlick, a.xVelocity), this.x = this.x0 + b * this.kFlickScalar), this.start();
+flick: function(e) {
+var t;
+this.vertical && (t = e.yVelocity > 0 ? Math.min(this.kMaxFlick, e.yVelocity) : Math.max(-this.kMaxFlick, e.yVelocity), this.y = this.y0 + t * this.kFlickScalar), this.horizontal && (t = e.xVelocity > 0 ? Math.min(this.kMaxFlick, e.xVelocity) : Math.max(-this.kMaxFlick, e.xVelocity), this.x = this.x0 + t * this.kFlickScalar), this.start();
},
-mousewheel: function(a) {
-var b = this.vertical ? a.wheelDeltaY || a.wheelDelta : 0;
-if (b > 0 && this.y < this.topBoundary || b < 0 && this.y > this.bottomBoundary) return this.stop(!0), this.y = this.y0 = this.y0 + b, this.start(), !0;
+mousewheel: function(e) {
+var t = this.vertical ? e.wheelDeltaY || e.wheelDelta : 0;
+if (t > 0 && this.y < this.topBoundary || t < 0 && this.y > this.bottomBoundary) return this.stop(!0), this.y = this.y0 = this.y0 + t, this.start(), !0;
},
scroll: function() {
this.doScroll();
},
-scrollTo: function(a, b) {
-a !== null && (this.y = this.y0 - (a + this.y0) * (1 - this.kFrictionDamping)), b !== null && (this.x = this.x0 - (b + this.x0) * (1 - this.kFrictionDamping)), this.start();
+scrollTo: function(e, t) {
+e !== null && (this.y = this.y0 - (e + this.y0) * (1 - this.kFrictionDamping)), t !== null && (this.x = this.x0 - (t + this.x0) * (1 - this.kFrictionDamping)), this.start();
},
-setScrollX: function(a) {
-this.x = this.x0 = a;
+setScrollX: function(e) {
+this.x = this.x0 = e;
},
-setScrollY: function(a) {
-this.y = this.y0 = a;
+setScrollY: function(e) {
+this.y = this.y0 = e;
},
-setScrollPosition: function(a) {
-this.setScrollY(a);
+setScrollPosition: function(e) {
+this.setScrollY(e);
},
isScrolling: function() {
return Boolean(this.job);
@@ -2330,33 +2409,33 @@ this.container.applyStyle("overflow-y", this.vertical == "default" ? "auto" : th
maxHeightChanged: function() {
this.container.applyStyle("max-height", this.maxHeight);
},
-scrollTo: function(a, b) {
-this.scrollNode && (this.setScrollLeft(a), this.setScrollTop(b));
+scrollTo: function(e, t) {
+this.scrollNode && (this.setScrollLeft(e), this.setScrollTop(t));
},
-scrollToNode: function(a, b) {
+scrollToNode: function(e, t) {
if (this.scrollNode) {
-var c = this.getScrollBounds(), d = a, e = {
-height: d.offsetHeight,
-width: d.offsetWidth,
+var n = this.getScrollBounds(), r = e, i = {
+height: r.offsetHeight,
+width: r.offsetWidth,
top: 0,
left: 0
};
-while (d && d.parentNode && d.id != this.scrollNode.id) e.top += d.offsetTop, e.left += d.offsetLeft, d = d.parentNode;
-this.setScrollTop(Math.min(c.maxTop, b === !1 ? e.top - c.clientHeight + e.height : e.top)), this.setScrollLeft(Math.min(c.maxLeft, b === !1 ? e.left - c.clientWidth + e.width : e.left));
+while (r && r.parentNode && r.id != this.scrollNode.id) i.top += r.offsetTop, i.left += r.offsetLeft, r = r.parentNode;
+this.setScrollTop(Math.min(n.maxTop, t === !1 ? i.top - n.clientHeight + i.height : i.top)), this.setScrollLeft(Math.min(n.maxLeft, t === !1 ? i.left - n.clientWidth + i.width : i.left));
}
},
-scrollIntoView: function(a, b) {
-a.hasNode() && a.node.scrollIntoView(b);
+scrollIntoView: function(e, t) {
+e.hasNode() && e.node.scrollIntoView(t);
},
-isInView: function(a) {
-var b = this.getScrollBounds(), c = a.offsetTop, d = a.offsetHeight, e = a.offsetLeft, f = a.offsetWidth;
-return c >= b.top && c + d <= b.top + b.clientHeight && e >= b.left && e + f <= b.left + b.clientWidth;
+isInView: function(e) {
+var t = this.getScrollBounds(), n = e.offsetTop, r = e.offsetHeight, i = e.offsetLeft, s = e.offsetWidth;
+return n >= t.top && n + r <= t.top + t.clientHeight && i >= t.left && i + s <= t.left + t.clientWidth;
},
-setScrollTop: function(a) {
-this.scrollTop = a, this.scrollNode && (this.scrollNode.scrollTop = this.scrollTop);
+setScrollTop: function(e) {
+this.scrollTop = e, this.scrollNode && (this.scrollNode.scrollTop = this.scrollTop);
},
-setScrollLeft: function(a) {
-this.scrollLeft = a, this.scrollNode && (this.scrollNode.scrollLeft = this.scrollLeft);
+setScrollLeft: function(e) {
+this.scrollLeft = e, this.scrollNode && (this.scrollNode.scrollLeft = this.scrollLeft);
},
getScrollLeft: function() {
return this.scrollNode ? this.scrollNode.scrollLeft : this.scrollLeft;
@@ -2365,51 +2444,51 @@ getScrollTop: function() {
return this.scrollNode ? this.scrollNode.scrollTop : this.scrollTop;
},
_getScrollBounds: function() {
-var a = this.getScrollSize(), b = this.container.hasNode(), c = {
+var e = this.getScrollSize(), t = this.container.hasNode(), n = {
left: this.getScrollLeft(),
top: this.getScrollTop(),
-clientHeight: b ? b.clientHeight : 0,
-clientWidth: b ? b.clientWidth : 0,
-height: a.height,
-width: a.width
+clientHeight: t ? t.clientHeight : 0,
+clientWidth: t ? t.clientWidth : 0,
+height: e.height,
+width: e.width
};
-return c.maxLeft = Math.max(0, c.width - c.clientWidth), c.maxTop = Math.max(0, c.height - c.clientHeight), c;
+return n.maxLeft = Math.max(0, n.width - n.clientWidth), n.maxTop = Math.max(0, n.height - n.clientHeight), n;
},
getScrollSize: function() {
-var a = this.scrollNode;
+var e = this.scrollNode;
return {
-width: a ? a.scrollWidth : 0,
-height: a ? a.scrollHeight : 0
+width: e ? e.scrollWidth : 0,
+height: e ? e.scrollHeight : 0
};
},
getScrollBounds: function() {
return this._getScrollBounds();
},
calcStartInfo: function() {
-var a = this.getScrollBounds(), b = this.getScrollTop(), c = this.getScrollLeft();
-this.canVertical = a.maxTop > 0 && this.vertical != "hidden", this.canHorizontal = a.maxLeft > 0 && this.horizontal != "hidden", this.startEdges = {
-top: b === 0,
-bottom: b === a.maxTop,
-left: c === 0,
-right: c === a.maxLeft
+var e = this.getScrollBounds(), t = this.getScrollTop(), n = this.getScrollLeft();
+this.canVertical = e.maxTop > 0 && this.vertical != "hidden", this.canHorizontal = e.maxLeft > 0 && this.horizontal != "hidden", this.startEdges = {
+top: t === 0,
+bottom: t === e.maxTop,
+left: n === 0,
+right: n === e.maxLeft
};
},
-shouldDrag: function(a) {
-var b = a.vertical;
-return b && this.canVertical || !b && this.canHorizontal;
+shouldDrag: function(e) {
+var t = e.vertical;
+return t && this.canVertical || !t && this.canHorizontal;
},
-dragstart: function(a, b) {
-this.dragging = this.shouldDrag(b);
+dragstart: function(e, t) {
+this.dragging = this.shouldDrag(t);
if (this.dragging) return this.preventDragPropagation;
},
-dragfinish: function(a, b) {
-this.dragging && (this.dragging = !1, b.preventTap());
+dragfinish: function(e, t) {
+this.dragging && (this.dragging = !1, t.preventTap());
},
-down: function(a, b) {
+down: function(e, t) {
this.calcStartInfo();
},
-move: function(a, b) {
-b.which && (this.canVertical && b.vertical || this.canHorizontal && b.horizontal) && b.disablePrevention();
+move: function(e, t) {
+t.which && (this.canVertical && t.vertical || this.canHorizontal && t.horizontal) && t.disablePrevention();
}
});
@@ -2423,40 +2502,40 @@ cornerSize: 6,
classes: "enyo-thumb",
create: function() {
this.inherited(arguments);
-var a = this.axis == "v";
-this.dimension = a ? "height" : "width", this.offset = a ? "top" : "left", this.translation = a ? "translateY" : "translateX", this.positionMethod = a ? "getScrollTop" : "getScrollLeft", this.sizeDimension = a ? "clientHeight" : "clientWidth", this.addClass("enyo-" + this.axis + "thumb"), this.transform = enyo.dom.canTransform(), enyo.dom.canAccelerate() && enyo.dom.transformValue(this, "translateZ", 0);
+var e = this.axis == "v";
+this.dimension = e ? "height" : "width", this.offset = e ? "top" : "left", this.translation = e ? "translateY" : "translateX", this.positionMethod = e ? "getScrollTop" : "getScrollLeft", this.sizeDimension = e ? "clientHeight" : "clientWidth", this.addClass("enyo-" + this.axis + "thumb"), this.transform = enyo.dom.canTransform(), enyo.dom.canAccelerate() && enyo.dom.transformValue(this, "translateZ", 0);
},
-sync: function(a) {
-this.scrollBounds = a._getScrollBounds(), this.update(a);
+sync: function(e) {
+this.scrollBounds = e._getScrollBounds(), this.update(e);
},
-update: function(a) {
+update: function(e) {
if (this.showing) {
-var b = this.dimension, c = this.offset, d = this.scrollBounds[this.sizeDimension], e = this.scrollBounds[b], f = 0, g = 0, h = 0;
-if (d >= e) {
+var t = this.dimension, n = this.offset, r = this.scrollBounds[this.sizeDimension], i = this.scrollBounds[t], s = 0, o = 0, u = 0;
+if (r >= i) {
this.hide();
return;
}
-a.isOverscrolling() && (h = a.getOverScrollBounds()["over" + c], f = Math.abs(h), g = Math.max(h, 0));
-var i = a[this.positionMethod]() - h, j = d - this.cornerSize, k = Math.floor(d * d / e - f);
-k = Math.max(this.minSize, k);
-var l = Math.floor(j * i / e + g);
-l = Math.max(0, Math.min(j - this.minSize, l)), this.needed = k < d, this.needed && this.hasNode() ? (this._pos !== l && (this._pos = l, this.transform ? enyo.dom.transformValue(this, this.translation, l + "px") : this.axis == "v" ? this.setBounds({
-top: l + "px"
+e.isOverscrolling() && (u = e.getOverScrollBounds()["over" + n], s = Math.abs(u), o = Math.max(u, 0));
+var a = e[this.positionMethod]() - u, f = r - this.cornerSize, l = Math.floor(r * r / i - s);
+l = Math.max(this.minSize, l);
+var c = Math.floor(f * a / i + o);
+c = Math.max(0, Math.min(f - this.minSize, c)), this.needed = l < r, this.needed && this.hasNode() ? (this._pos !== c && (this._pos = c, this.transform ? enyo.dom.transformValue(this, this.translation, c + "px") : this.axis == "v" ? this.setBounds({
+top: c + "px"
}) : this.setBounds({
-left: l + "px"
-})), this._size !== k && (this._size = k, this.node.style[b] = this.domStyles[b] = k + "px")) : this.hide();
+left: c + "px"
+})), this._size !== l && (this._size = l, this.node.style[t] = this.domStyles[t] = l + "px")) : this.hide();
}
},
-setShowing: function(a) {
-if (a && a != this.showing && this.scrollBounds[this.sizeDimension] >= this.scrollBounds[this.dimension]) return;
+setShowing: function(e) {
+if (e && e != this.showing && this.scrollBounds[this.sizeDimension] >= this.scrollBounds[this.dimension]) return;
this.hasNode() && this.cancelDelayHide();
-if (a != this.showing) {
-var b = this.showing;
-this.showing = a, this.showingChanged(b);
+if (e != this.showing) {
+var t = this.showing;
+this.showing = e, this.showingChanged(t);
}
},
-delayHide: function(a) {
-this.showing && enyo.job(this.id + "hide", enyo.bind(this, "hide"), a || 0);
+delayHide: function(e) {
+this.showing && enyo.job(this.id + "hide", enyo.bind(this, "hide"), e || 0);
},
cancelDelayHide: function() {
enyo.job.stop(this.id + "hide");
@@ -2520,8 +2599,8 @@ classes: "enyo-touch-scroller"
} ],
create: function() {
this.inherited(arguments), this.transform = enyo.dom.canTransform(), this.transform || this.overscroll && this.$.client.applyStyle("position", "relative"), this.accel = enyo.dom.canAccelerate();
-var a = "enyo-touch-strategy-container";
-enyo.platform.ios && this.accel && (a += " enyo-composite"), this.scrimChanged(), this.container.addClass(a), this.translation = this.accel ? "translate3d" : "translate";
+var e = "enyo-touch-strategy-container";
+enyo.platform.ios && this.accel && (e += " enyo-composite"), this.scrimChanged(), this.container.addClass(e), this.translation = this.accel ? "translate3d" : "translate";
},
initComponents: function() {
this.createChrome(this.tools), this.inherited(arguments);
@@ -2536,10 +2615,10 @@ scrimChanged: function() {
this.scrim && !this.$.scrim && this.makeScrim(), !this.scrim && this.$.scrim && this.$.scrim.destroy();
},
makeScrim: function() {
-var a = this.controlParent;
-this.controlParent = null, this.createChrome(this.scrimTools), this.controlParent = a;
-var b = this.container.hasNode();
-b && (this.$.scrim.parentNode = b, this.$.scrim.render());
+var e = this.controlParent;
+this.controlParent = null, this.createChrome(this.scrimTools), this.controlParent = e;
+var t = this.container.hasNode();
+t && (this.$.scrim.parentNode = t, this.$.scrim.render());
},
isScrolling: function() {
return this.$.scrollMath.isScrolling();
@@ -2568,8 +2647,8 @@ this.isScrolling() && this.$.scrollMath.stop(!0);
stabilize: function() {
this.$.scrollMath.stabilize();
},
-scrollTo: function(a, b) {
-this.stop(), this.$.scrollMath.scrollTo(b || b === 0 ? b : null, a);
+scrollTo: function(e, t) {
+this.stop(), this.$.scrollMath.scrollTo(t || t === 0 ? t : null, e);
},
scrollIntoView: function() {
this.stop(), this.inherited(arguments);
@@ -2590,82 +2669,85 @@ calcScrollNode: function() {
return this.$.client.hasNode();
},
calcAutoScrolling: function() {
-var a = this.vertical == "auto", b = this.horizontal == "auto" || this.horizontal == "default";
-if ((a || b) && this.scrollNode) {
-var c = this.getScrollBounds();
-a && (this.$.scrollMath.vertical = c.height > c.clientHeight), b && (this.$.scrollMath.horizontal = c.width > c.clientWidth);
+var e = this.vertical == "auto", t = this.horizontal == "auto" || this.horizontal == "default";
+if ((e || t) && this.scrollNode) {
+var n = this.getScrollBounds();
+e && (this.$.scrollMath.vertical = n.height > n.clientHeight), t && (this.$.scrollMath.horizontal = n.width > n.clientWidth);
}
},
-shouldDrag: function(a, b) {
+shouldDrag: function(e, t) {
this.calcAutoScrolling();
-var c = b.vertical, d = this.$.scrollMath.horizontal && !c, e = this.$.scrollMath.vertical && c, f = b.dy < 0, g = b.dx < 0, h = !f && this.startEdges.top || f && this.startEdges.bottom, i = !g && this.startEdges.left || g && this.startEdges.right;
-!b.boundaryDragger && (d || e) && (b.boundaryDragger = this);
-if (!h && e || !i && d) return b.dragger = this, !0;
+var n = t.vertical, r = this.$.scrollMath.horizontal && !n, i = this.$.scrollMath.vertical && n, s = t.dy < 0, o = t.dx < 0, u = !s && this.startEdges.top || s && this.startEdges.bottom, a = !o && this.startEdges.left || o && this.startEdges.right;
+!t.boundaryDragger && (r || i) && (t.boundaryDragger = this);
+if (!u && i || !a && r) return t.dragger = this, !0;
},
-flick: function(a, b) {
-var c = Math.abs(b.xVelocity) > Math.abs(b.yVelocity) ? this.$.scrollMath.horizontal : this.$.scrollMath.vertical;
-if (c && this.dragging) return this.$.scrollMath.flick(b), this.preventDragPropagation;
+flick: function(e, t) {
+var n = Math.abs(t.xVelocity) > Math.abs(t.yVelocity) ? this.$.scrollMath.horizontal : this.$.scrollMath.vertical;
+if (n && this.dragging) return this.$.scrollMath.flick(t), this.preventDragPropagation;
},
-hold: function(a, b) {
-if (this.isScrolling() && !this.isOverscrolling()) return this.$.scrollMath.stop(b), !0;
+hold: function(e, t) {
+if (this.isScrolling() && !this.isOverscrolling()) return this.$.scrollMath.stop(t), !0;
},
-move: function(a, b) {},
-dragstart: function(a, b) {
-this.doShouldDrag(b), this.dragging = b.dragger == this || !b.dragger && b.boundaryDragger == this;
+move: function(e, t) {},
+dragstart: function(e, t) {
+this.doShouldDrag(t), this.dragging = t.dragger == this || !t.dragger && t.boundaryDragger == this;
if (this.dragging) {
-b.preventDefault(), this.syncScrollMath(), this.$.scrollMath.startDrag(b);
+t.preventDefault(), this.syncScrollMath(), this.$.scrollMath.startDrag(t);
if (this.preventDragPropagation) return !0;
}
},
-drag: function(a, b) {
-this.dragging && (b.preventDefault(), this.$.scrollMath.drag(b), this.scrim && this.$.scrim.show());
+drag: function(e, t) {
+this.dragging && (t.preventDefault(), this.$.scrollMath.drag(t), this.scrim && this.$.scrim.show());
},
-dragfinish: function(a, b) {
-this.dragging && (b.preventTap(), this.$.scrollMath.dragFinish(), this.dragging = !1, this.scrim && this.$.scrim.hide());
+dragfinish: function(e, t) {
+this.dragging && (t.preventTap(), this.$.scrollMath.dragFinish(), this.dragging = !1, this.scrim && this.$.scrim.hide());
},
-mousewheel: function(a, b) {
-if (!this.dragging && this.$.scrollMath.mousewheel(b)) return b.preventDefault(), !0;
+mousewheel: function(e, t) {
+if (!this.dragging) {
+this.calcBoundaries(), this.syncScrollMath();
+if (this.$.scrollMath.mousewheel(t)) return t.preventDefault(), !0;
+}
},
-scrollMathStart: function(a) {
+scrollMathStart: function(e) {
this.scrollNode && (this.calcBoundaries(), this.thumb && this.showThumbs());
},
-scrollMathScroll: function(a) {
-this.overscroll ? this.effectScroll(-a.x, -a.y) : this.effectScroll(-Math.min(a.leftBoundary, Math.max(a.rightBoundary, a.x)), -Math.min(a.topBoundary, Math.max(a.bottomBoundary, a.y))), this.thumb && this.updateThumbs();
+scrollMathScroll: function(e) {
+this.overscroll ? this.effectScroll(-e.x, -e.y) : this.effectScroll(-Math.min(e.leftBoundary, Math.max(e.rightBoundary, e.x)), -Math.min(e.topBoundary, Math.max(e.bottomBoundary, e.y))), this.thumb && this.updateThumbs();
},
-scrollMathStop: function(a) {
+scrollMathStop: function(e) {
this.effectScrollStop(), this.thumb && this.delayHideThumbs(100);
},
calcBoundaries: function() {
-var a = this.$.scrollMath, b = this._getScrollBounds();
-a.bottomBoundary = b.clientHeight - b.height, a.rightBoundary = b.clientWidth - b.width;
+var e = this.$.scrollMath, t = this._getScrollBounds();
+e.bottomBoundary = t.clientHeight - t.height, e.rightBoundary = t.clientWidth - t.width;
},
syncScrollMath: function() {
-var a = this.$.scrollMath;
-a.setScrollX(-this.getScrollLeft()), a.setScrollY(-this.getScrollTop());
+var e = this.$.scrollMath;
+e.setScrollX(-this.getScrollLeft()), e.setScrollY(-this.getScrollTop());
},
-effectScroll: function(a, b) {
-this.scrollNode && (this.scrollLeft = this.scrollNode.scrollLeft = a, this.scrollTop = this.scrollNode.scrollTop = b, this.effectOverscroll(Math.round(a), Math.round(b)));
+effectScroll: function(e, t) {
+this.scrollNode && (this.scrollLeft = this.scrollNode.scrollLeft = e, this.scrollTop = this.scrollNode.scrollTop = t, this.effectOverscroll(Math.round(e), Math.round(t)));
},
effectScrollStop: function() {
this.effectOverscroll(null, null);
},
-effectOverscroll: function(a, b) {
-var c = this.scrollNode, d = "0", e = "0", f = this.accel ? ",0" : "";
-b !== null && Math.abs(b - c.scrollTop) > 1 && (e = c.scrollTop - b), a !== null && Math.abs(a - c.scrollLeft) > 1 && (d = c.scrollLeft - a), this.transform ? enyo.dom.transformValue(this.$.client, this.translation, d + "px, " + e + "px" + f) : this.$.client.setBounds({
-left: d + "px",
-top: e + "px"
+effectOverscroll: function(e, t) {
+var n = this.scrollNode, r = "0", i = "0", s = this.accel ? ",0" : "";
+t !== null && Math.abs(t - n.scrollTop) > 1 && (i = n.scrollTop - t), e !== null && Math.abs(e - n.scrollLeft) > 1 && (r = n.scrollLeft - e), this.transform ? enyo.dom.transformValue(this.$.client, this.translation, r + "px, " + i + "px" + s) : this.$.client.setBounds({
+left: r + "px",
+top: i + "px"
});
},
getOverScrollBounds: function() {
-var a = this.$.scrollMath;
+var e = this.$.scrollMath;
return {
-overleft: Math.min(a.leftBoundary - a.x, 0) || Math.max(a.rightBoundary - a.x, 0),
-overtop: Math.min(a.topBoundary - a.y, 0) || Math.max(a.bottomBoundary - a.y, 0)
+overleft: Math.min(e.leftBoundary - e.x, 0) || Math.max(e.rightBoundary - e.x, 0),
+overtop: Math.min(e.topBoundary - e.y, 0) || Math.max(e.bottomBoundary - e.y, 0)
};
},
_getScrollBounds: function() {
-var a = this.inherited(arguments);
-return enyo.mixin(a, this.getOverScrollBounds()), a;
+var e = this.inherited(arguments);
+return enyo.mixin(e, this.getOverScrollBounds()), e;
},
getScrollBounds: function() {
return this.stop(), this.inherited(arguments);
@@ -2685,8 +2767,8 @@ this.syncThumbs(), this.$.vthumb.show(), this.$.hthumb.show();
hideThumbs: function() {
this.$.vthumb.hide(), this.$.hthumb.hide();
},
-delayHideThumbs: function(a) {
-this.$.vthumb.delayHide(a), this.$.hthumb.delayHide(a);
+delayHideThumbs: function(e) {
+this.$.vthumb.delayHide(e), this.$.hthumb.delayHide(e);
}
});
@@ -2707,10 +2789,10 @@ name: "client"
} ],
translateOptimized: !1,
getScrollSize: function() {
-var a = this.$.client.hasNode();
+var e = this.$.client.hasNode();
return {
-width: a ? a.scrollWidth : 0,
-height: a ? a.scrollHeight : 0
+width: e ? e.scrollWidth : 0,
+height: e ? e.scrollHeight : 0
};
},
create: function() {
@@ -2722,24 +2804,24 @@ return this.$.clientContainer.hasNode();
maxHeightChanged: function() {
this.$.client.applyStyle("min-height", this.maxHeight ? null : "100%"), this.$.client.applyStyle("max-height", this.maxHeight), this.$.clientContainer.addRemoveClass("enyo-scrollee-fit", !this.maxHeight);
},
-shouldDrag: function(a, b) {
+shouldDrag: function(e, t) {
return this.stop(), this.calcStartInfo(), this.inherited(arguments);
},
syncScrollMath: function() {
this.translateOptimized || this.inherited(arguments);
},
-setScrollLeft: function(a) {
+setScrollLeft: function(e) {
this.stop();
if (this.translateOptimized) {
-var b = this.$.scrollMath;
-b.setScrollX(-a), b.stabilize();
+var t = this.$.scrollMath;
+t.setScrollX(-e), t.stabilize();
} else this.inherited(arguments);
},
-setScrollTop: function(a) {
+setScrollTop: function(e) {
this.stop();
if (this.translateOptimized) {
-var b = this.$.scrollMath;
-b.setScrollY(-a), b.stabilize();
+var t = this.$.scrollMath;
+t.setScrollY(-e), t.stabilize();
} else this.inherited(arguments);
},
getScrollLeft: function() {
@@ -2748,24 +2830,24 @@ return this.translateOptimized ? this.scrollLeft : this.inherited(arguments);
getScrollTop: function() {
return this.translateOptimized ? this.scrollTop : this.inherited(arguments);
},
-scrollMathStart: function(a) {
+scrollMathStart: function(e) {
this.inherited(arguments), this.scrollStarting = !0, this.startX = 0, this.startY = 0, !this.translateOptimized && this.scrollNode && (this.startX = this.getScrollLeft(), this.startY = this.getScrollTop());
},
-scrollMathScroll: function(a) {
-this.overscroll ? (this.scrollLeft = -a.x, this.scrollTop = -a.y) : (this.scrollLeft = -Math.min(a.leftBoundary, Math.max(a.rightBoundary, a.x)), this.scrollTop = -Math.min(a.topBoundary, Math.max(a.bottomBoundary, a.y))), this.isScrolling() && (this.$.scrollMath.isScrolling() && this.effectScroll(this.startX - this.scrollLeft, this.startY - this.scrollTop), this.thumb && this.updateThumbs());
+scrollMathScroll: function(e) {
+this.overscroll ? (this.scrollLeft = -e.x, this.scrollTop = -e.y) : (this.scrollLeft = -Math.min(e.leftBoundary, Math.max(e.rightBoundary, e.x)), this.scrollTop = -Math.min(e.topBoundary, Math.max(e.bottomBoundary, e.y))), this.isScrolling() && (this.$.scrollMath.isScrolling() && this.effectScroll(this.startX - this.scrollLeft, this.startY - this.scrollTop), this.thumb && this.updateThumbs());
},
-effectScroll: function(a, b) {
-var c = a + "px, " + b + "px" + (this.accel ? ",0" : "");
-enyo.dom.transformValue(this.$.client, this.translation, c);
+effectScroll: function(e, t) {
+var n = e + "px, " + t + "px" + (this.accel ? ",0" : "");
+enyo.dom.transformValue(this.$.client, this.translation, n);
},
effectScrollStop: function() {
if (!this.translateOptimized) {
-var a = "0,0" + (this.accel ? ",0" : ""), b = this.$.scrollMath, c = this._getScrollBounds(), d = Boolean(c.maxTop + b.bottomBoundary || c.maxLeft + b.rightBoundary);
-enyo.dom.transformValue(this.$.client, this.translation, d ? null : a), this.setScrollLeft(this.scrollLeft), this.setScrollTop(this.scrollTop), d && enyo.dom.transformValue(this.$.client, this.translation, a);
+var e = "0,0" + (this.accel ? ",0" : ""), t = this.$.scrollMath, n = this._getScrollBounds(), r = Boolean(n.maxTop + t.bottomBoundary || n.maxLeft + t.rightBoundary);
+enyo.dom.transformValue(this.$.client, this.translation, r ? null : e), this.setScrollLeft(this.scrollLeft), this.setScrollTop(this.scrollTop), r && enyo.dom.transformValue(this.$.client, this.translation, e);
}
},
twiddle: function() {
-this.translateOptimized && (this.scrollNode.scrollTop = 1, this.scrollNode.scrollTop = 0);
+this.translateOptimized && this.scrollNode && (this.scrollNode.scrollTop = 1, this.scrollNode.scrollTop = 0);
},
down: enyo.nop
});
@@ -2811,10 +2893,10 @@ os: "webos",
version: 1e9
} ],
hasTouchScrolling: function() {
-for (var a = 0, b, c; b = this.osInfo[a]; a++) if (enyo.platform[b.os]) return !0;
+for (var e = 0, t, n; t = this.osInfo[e]; e++) if (enyo.platform[t.os]) return !0;
},
hasNativeScrolling: function() {
-for (var a = 0, b, c; b = this.osInfo[a]; a++) if (enyo.platform[b.os] < b.version) return !1;
+for (var e = 0, t, n; t = this.osInfo[e]; e++) if (enyo.platform[t.os] < t.version) return !1;
return !0;
},
getTouchStrategy: function() {
@@ -2825,8 +2907,8 @@ controlParentName: "strategy",
create: function() {
this.inherited(arguments), this.horizontalChanged(), this.verticalChanged();
},
-importProps: function(a) {
-this.inherited(arguments), a && a.strategyKind === undefined && (enyo.Scroller.touchScrolling || this.touch) && (this.strategyKind = enyo.Scroller.getTouchStrategy());
+importProps: function(e) {
+this.inherited(arguments), e && e.strategyKind === undefined && (enyo.Scroller.touchScrolling || this.touch) && (this.strategyKind = enyo.Scroller.getTouchStrategy());
},
initComponents: function() {
this.strategyKindChanged(), this.inherited(arguments);
@@ -2878,11 +2960,11 @@ this.$.strategy.setHorizontal(this.horizontal);
verticalChanged: function() {
this.$.strategy.setVertical(this.vertical);
},
-setScrollLeft: function(a) {
-this.scrollLeft = a, this.$.strategy.setScrollLeft(this.scrollLeft);
+setScrollLeft: function(e) {
+this.scrollLeft = e, this.$.strategy.setScrollLeft(this.scrollLeft);
},
-setScrollTop: function(a) {
-this.scrollTop = a, this.$.strategy.setScrollTop(a);
+setScrollTop: function(e) {
+this.scrollTop = e, this.$.strategy.setScrollTop(e);
},
getScrollLeft: function() {
return this.$.strategy.getScrollLeft();
@@ -2893,32 +2975,32 @@ return this.$.strategy.getScrollTop();
getScrollBounds: function() {
return this.$.strategy.getScrollBounds();
},
-scrollIntoView: function(a, b) {
-this.$.strategy.scrollIntoView(a, b);
+scrollIntoView: function(e, t) {
+this.$.strategy.scrollIntoView(e, t);
},
-scrollTo: function(a, b) {
-this.$.strategy.scrollTo(a, b);
+scrollTo: function(e, t) {
+this.$.strategy.scrollTo(e, t);
},
-scrollToControl: function(a, b) {
-this.scrollToNode(a.hasNode(), b);
+scrollToControl: function(e, t) {
+this.scrollToNode(e.hasNode(), t);
},
-scrollToNode: function(a, b) {
-this.$.strategy.scrollToNode(a, b);
+scrollToNode: function(e, t) {
+this.$.strategy.scrollToNode(e, t);
},
-domScroll: function(a, b) {
-return this.$.strategy.domScroll && b.originator == this && this.$.strategy.scroll(a, b), this.doScroll(b), !0;
+domScroll: function(e, t) {
+return this.$.strategy.domScroll && t.originator == this && this.$.strategy.scroll(e, t), this.doScroll(t), !0;
},
-shouldStopScrollEvent: function(a) {
-return this.preventScrollPropagation && a.originator.owner != this.$.strategy;
+shouldStopScrollEvent: function(e) {
+return this.preventScrollPropagation && e.originator.owner != this.$.strategy;
},
-scrollStart: function(a, b) {
-return this.shouldStopScrollEvent(b);
+scrollStart: function(e, t) {
+return this.shouldStopScrollEvent(t);
},
-scroll: function(a, b) {
-return b.dispatchTarget ? this.preventScrollPropagation && b.originator != this && b.originator.owner != this.$.strategy : this.shouldStopScrollEvent(b);
+scroll: function(e, t) {
+return t.dispatchTarget ? this.preventScrollPropagation && t.originator != this && t.originator.owner != this.$.strategy : this.shouldStopScrollEvent(t);
},
-scrollStop: function(a, b) {
-return this.shouldStopScrollEvent(b);
+scrollStop: function(e, t) {
+return this.shouldStopScrollEvent(t);
},
scrollToTop: function() {
this.setScrollTop(0);
@@ -2933,8 +3015,8 @@ scrollToLeft: function() {
this.setScrollLeft(0);
},
stabilize: function() {
-var a = this.getStrategy();
-a.stabilize && a.stabilize();
+var e = this.getStrategy();
+e.stabilize && e.stabilize();
}
}), enyo.Scroller.hasTouchScrolling() && (enyo.Scroller.prototype.strategyKind = enyo.Scroller.getTouchStrategy());
@@ -2961,8 +3043,8 @@ this.inherited(arguments), this._next = enyo.bind(this, "next");
destroy: function() {
this.stop(), this.inherited(arguments);
},
-play: function(a) {
-return this.stop(), this.reversed = !1, a && enyo.mixin(this, a), this.t0 = this.t1 = enyo.now(), this.value = this.startValue, this.job = !0, this.next(), this;
+play: function(e) {
+return this.stop(), this.reversed = !1, e && enyo.mixin(this, e), this.t0 = this.t1 = enyo.now(), this.value = this.startValue, this.job = !0, this.next(), this;
},
stop: function() {
if (this.isAnimating()) return this.cancel(), this.fire("onStop"), this;
@@ -2970,10 +3052,10 @@ if (this.isAnimating()) return this.cancel(), this.fire("onStop"), this;
reverse: function() {
if (this.isAnimating()) {
this.reversed = !this.reversed;
-var a = this.t1 = enyo.now(), b = a - this.t0;
-this.t0 = a + b - this.duration;
-var c = this.startValue;
-return this.startValue = this.endValue, this.endValue = c, this;
+var e = this.t1 = enyo.now(), t = e - this.t0;
+this.t0 = e + t - this.duration;
+var n = this.startValue;
+return this.startValue = this.endValue, this.endValue = n, this;
}
},
isAnimating: function() {
@@ -2990,12 +3072,12 @@ return this.dt >= this.duration;
},
next: function() {
this.t1 = enyo.now(), this.dt = this.t1 - this.t0;
-var a = this.fraction = enyo.easedLerp(this.t0, this.duration, this.easingFunction, this.reversed);
-this.value = this.startValue + a * (this.endValue - this.startValue), a >= 1 || this.shouldEnd() ? (this.value = this.endValue, this.fraction = 1, this.fire("onStep"), this.fire("onEnd"), this.cancel()) : (this.fire("onStep"), this.requestNext());
+var e = this.fraction = enyo.easedLerp(this.t0, this.duration, this.easingFunction, this.reversed);
+this.value = this.startValue + e * (this.endValue - this.startValue), e >= 1 || this.shouldEnd() ? (this.value = this.endValue, this.fraction = 1, this.fire("onStep"), this.fire("onEnd"), this.cancel()) : (this.fire("onStep"), this.requestNext());
},
-fire: function(a) {
-var b = this[a];
-enyo.isString(b) ? this.bubble(a) : b && b.call(this.context || window, this);
+fire: function(e) {
+var t = this[e];
+enyo.isString(t) ? this.bubble(e) : t && t.call(this.context || window, this);
}
});
@@ -3006,8 +3088,8 @@ name: "enyo.BaseLayout",
kind: enyo.Layout,
layoutClass: "enyo-positioned",
reflow: function() {
-enyo.forEach(this.container.children, function(a) {
-a.fit !== null && a.addRemoveClass("enyo-fit", a.fit);
+enyo.forEach(this.container.children, function(e) {
+e.fit !== null && e.addRemoveClass("enyo-fit", e.fit);
}, this);
}
});
@@ -3074,9 +3156,9 @@ return this.getNodeProperty("value", this.value);
valueChanged: function() {
this.setAttribute("value", this.value), this.setNodeProperty("value", this.value);
},
-iekeyup: function(a, b) {
-var c = enyo.platform.ie, d = b.keyCode;
-(c <= 8 || c == 9 && (d == 8 || d == 46)) && this.bubble("oninput", b);
+iekeyup: function(e, t) {
+var n = enyo.platform.ie, r = t.keyCode;
+(n <= 8 || n == 9 && (r == 8 || r == 46)) && this.bubble("oninput", t);
},
clear: function() {
this.setValue("");
@@ -3109,7 +3191,7 @@ os: "ios",
version: 5
} ],
hasContentEditable: function() {
-for (var a = 0, b, c; b = enyo.RichText.osInfo[a]; a++) if (enyo.platform[b.os] < b.version) return !1;
+for (var e = 0, t, n; t = enyo.RichText.osInfo[e]; e++) if (enyo.platform[t.os] < t.version) return !1;
return !0;
}
},
@@ -3142,16 +3224,16 @@ if (this.hasNode()) return document.activeElement === this.node;
getSelection: function() {
if (this.hasFocus()) return window.getSelection();
},
-removeSelection: function(a) {
-var b = this.getSelection();
-b && b[a ? "collapseToStart" : "collapseToEnd"]();
+removeSelection: function(e) {
+var t = this.getSelection();
+t && t[e ? "collapseToStart" : "collapseToEnd"]();
},
-modifySelection: function(a, b, c) {
-var d = this.getSelection();
-d && d.modify(a || "move", b, c);
+modifySelection: function(e, t, n) {
+var r = this.getSelection();
+r && r.modify(e || "move", t, n);
},
-moveCursor: function(a, b) {
-this.modifySelection("move", a, b);
+moveCursor: function(e, t) {
+this.modifySelection("move", e, t);
},
moveCursorToEnd: function() {
this.moveCursor("forward", "documentboundary");
@@ -3162,10 +3244,10 @@ this.moveCursor("backward", "documentboundary");
selectAll: function() {
this.hasFocus() && document.execCommand("selectAll");
},
-insertAtCursor: function(a) {
+insertAtCursor: function(e) {
if (this.hasFocus()) {
-var b = this.allowHtml ? a : enyo.Control.escapeHtml(a).replace(/\n/g, "<br/>");
-document.execCommand("insertHTML", !1, b);
+var t = this.allowHtml ? e : enyo.Control.escapeHtml(e).replace(/\n/g, "<br/>");
+document.execCommand("insertHTML", !1, t);
}
}
});
@@ -3200,8 +3282,8 @@ this.inherited(arguments), this.selectedChanged();
getSelected: function() {
return Number(this.getNodeProperty("selectedIndex", this.selected));
},
-setSelected: function(a) {
-this.setPropertyValue("selected", Number(a), "selectedChanged");
+setSelected: function(e) {
+this.setPropertyValue("selected", Number(e), "selectedChanged");
},
selectedChanged: function() {
this.setNodeProperty("selectedIndex", this.selected);
@@ -3253,11 +3335,11 @@ active: null
handlers: {
onActivate: "activate"
},
-activate: function(a, b) {
-this.highlander && (b.originator.active ? this.setActive(b.originator) : b.originator == this.active && this.active.setActive(!0));
+activate: function(e, t) {
+this.highlander && (t.originator.active ? this.setActive(t.originator) : t.originator == this.active && this.active.setActive(!0));
},
-activeChanged: function(a) {
-a && (a.setActive(!1), a.removeClass("active")), this.active && this.active.addClass("active");
+activeChanged: function(e) {
+e && (e.setActive(!1), e.removeClass("active")), this.active && this.active.addClass("active");
}
});
@@ -3338,8 +3420,8 @@ this.setNodeProperty("checked", this.checked), this.setAttribute("checked", this
activeChanged: function() {
this.active = Boolean(this.active), this.setChecked(this.active), this.bubble("onActivate");
},
-setValue: function(a) {
-this.setChecked(Boolean(a));
+setValue: function(e) {
+this.setChecked(Boolean(e));
},
getValue: function() {
return this.getChecked();
@@ -3348,8 +3430,8 @@ valueChanged: function() {},
change: function() {
this.setActive(this.getChecked());
},
-click: function(a, b) {
-enyo.platform.ie <= 8 && this.bubble("onchange", b);
+click: function(e, t) {
+enyo.platform.ie <= 8 && this.bubble("onchange", t);
}
});
@@ -3369,41 +3451,41 @@ this.inherited(arguments), this.countChanged();
initComponents: function() {
this.itemComponents = this.components || this.kindComponents, this.components = this.kindComponents = null, this.inherited(arguments);
},
-setCount: function(a) {
-this.setPropertyValue("count", a, "countChanged");
+setCount: function(e) {
+this.setPropertyValue("count", e, "countChanged");
},
countChanged: function() {
this.build();
},
-itemAtIndex: function(a) {
-return this.controlAtIndex(a);
+itemAtIndex: function(e) {
+return this.controlAtIndex(e);
},
build: function() {
this.destroyClientControls();
-for (var a = 0, b; a < this.count; a++) b = this.createComponent({
+for (var e = 0, t; e < this.count; e++) t = this.createComponent({
kind: "enyo.OwnerProxy",
-index: a
-}), b.createComponents(this.itemComponents), this.doSetupItem({
-index: a,
-item: b
+index: e
+}), t.createComponents(this.itemComponents), this.doSetupItem({
+index: e,
+item: t
});
this.render();
},
-renderRow: function(a) {
-var b = this.itemAtIndex(a);
+renderRow: function(e) {
+var t = this.itemAtIndex(e);
this.doSetupItem({
-index: a,
-item: b
+index: e,
+item: t
});
}
}), enyo.kind({
name: "enyo.OwnerProxy",
tag: null,
-decorateEvent: function(a, b, c) {
-b && (b.index = this.index), this.inherited(arguments);
+decorateEvent: function(e, t, n) {
+t && (t.index = this.index), this.inherited(arguments);
},
-delegateEvent: function(a, b, c, d, e) {
-a == this && (a = this.owner.owner), this.inherited(arguments, [ a, b, c, d, e ]);
+delegateEvent: function(e, t, n, r, i) {
+return e == this && (e = this.owner.owner), this.inherited(arguments, [ e, t, n, r, i ]);
}
});
@@ -3438,10 +3520,10 @@ components: this.avatarComponents
showingChanged: function() {
this.avatar.setShowing(this.showing), document.body.style.cursor = this.showing ? "move" : null;
},
-drag: function(a) {
+drag: function(e) {
this.requireAvatar(), this.avatar.setBounds({
-top: a.pageY - this.offsetY,
-left: a.pageX + this.offsetX
+top: e.pageY - this.offsetY,
+left: e.pageX + this.offsetX
}), this.show();
},
show: function() {
@@ -3486,6 +3568,7 @@ showing: !1,
handlers: {
ondown: "down",
onkeydown: "keydown",
+ondragstart: "dragstart",
onfocus: "focus",
onblur: "blur",
onRequestShow: "requestShow",
@@ -3517,16 +3600,16 @@ if (window.innerWidth) return {
width: window.innerWidth,
height: window.innerHeight
};
-var a = document.documentElement;
+var e = document.documentElement;
return {
-width: a.offsetWidth,
-height: a.offsetHeight
+width: e.offsetWidth,
+height: e.offsetHeight
};
},
updatePosition: function() {
if (this.centered) {
-var a = this.calcViewportSize(), b = this.getBounds();
-this.addStyles("top: " + Math.max((a.height - b.height) / 2, 0) + "px; left: " + Math.max((a.width - b.width) / 2, 0) + "px;");
+var e = this.calcViewportSize(), t = this.getBounds();
+this.addStyles("top: " + Math.max((e.height - t.height) / 2, 0) + "px; left: " + Math.max((e.width - t.width) / 2, 0) + "px;");
}
},
showingChanged: function() {
@@ -3538,30 +3621,34 @@ enyo.dispatcher.capture(this, !this.modal);
release: function() {
enyo.dispatcher.release();
},
-down: function(a, b) {
-this.modal && !b.dispatchTarget.isDescendantOf(this) && b.preventDefault();
+down: function(e, t) {
+this.downEvent = t, this.modal && !t.dispatchTarget.isDescendantOf(this) && t.preventDefault();
+},
+tap: function(e, t) {
+if (this.autoDismiss && !t.dispatchTarget.isDescendantOf(this) && this.downEvent && !this.downEvent.dispatchTarget.isDescendantOf(this)) return this.downEvent = null, this.hide(), !0;
},
-tap: function(a, b) {
-if (this.autoDismiss && !b.dispatchTarget.isDescendantOf(this)) return this.hide(), !0;
+dragstart: function(e, t) {
+var n = t.dispatchTarget === this || t.dispatchTarget.isDescendantOf(this);
+return e.autoDismiss && !n && e.setShowing(!1), !0;
},
-keydown: function(a, b) {
-this.showing && this.autoDismiss && b.keyCode == 27 && this.hide();
+keydown: function(e, t) {
+this.showing && this.autoDismiss && t.keyCode == 27 && this.hide();
},
-blur: function(a, b) {
-b.dispatchTarget.isDescendantOf(this) && (this.lastFocus = b.originator);
+blur: function(e, t) {
+t.dispatchTarget.isDescendantOf(this) && (this.lastFocus = t.originator);
},
-focus: function(a, b) {
-var c = b.dispatchTarget;
-if (this.modal && !c.isDescendantOf(this)) {
-c.hasNode() && c.node.blur();
-var d = this.lastFocus && this.lastFocus.hasNode() || this.hasNode();
-d && d.focus();
+focus: function(e, t) {
+var n = t.dispatchTarget;
+if (this.modal && !n.isDescendantOf(this)) {
+n.hasNode() && n.node.blur();
+var r = this.lastFocus && this.lastFocus.hasNode() || this.hasNode();
+r && r.focus();
}
},
-requestShow: function(a, b) {
+requestShow: function(e, t) {
return this.show(), !0;
},
-requestHide: function(a, b) {
+requestHide: function(e, t) {
return this.hide(), !0;
}
});
@@ -3585,43 +3672,43 @@ this.clear(), this.inherited(arguments);
multiChanged: function() {
this.multi || this.clear(), this.doChange();
},
-highlander: function(a) {
+highlander: function(e) {
this.multi || this.deselect(this.lastSelected);
},
clear: function() {
this.selected = {};
},
-isSelected: function(a) {
-return this.selected[a];
+isSelected: function(e) {
+return this.selected[e];
},
-setByKey: function(a, b, c) {
-if (b) this.selected[a] = c || !0, this.lastSelected = a, this.doSelect({
-key: a,
-data: this.selected[a]
+setByKey: function(e, t, n) {
+if (t) this.selected[e] = n || !0, this.lastSelected = e, this.doSelect({
+key: e,
+data: this.selected[e]
}); else {
-var d = this.isSelected(a);
-delete this.selected[a], this.doDeselect({
-key: a,
-data: d
+var r = this.isSelected(e);
+delete this.selected[e], this.doDeselect({
+key: e,
+data: r
});
}
this.doChange();
},
-deselect: function(a) {
-this.isSelected(a) && this.setByKey(a, !1);
+deselect: function(e) {
+this.isSelected(e) && this.setByKey(e, !1);
},
-select: function(a, b) {
-this.multi ? this.setByKey(a, !this.isSelected(a), b) : this.isSelected(a) || (this.highlander(), this.setByKey(a, !0, b));
+select: function(e, t) {
+this.multi ? this.setByKey(e, !this.isSelected(e), t) : this.isSelected(e) || (this.highlander(), this.setByKey(e, !0, t));
},
-toggle: function(a, b) {
-!this.multi && this.lastSelected != a && this.deselect(this.lastSelected), this.setByKey(a, !this.isSelected(a), b);
+toggle: function(e, t) {
+!this.multi && this.lastSelected != e && this.deselect(this.lastSelected), this.setByKey(e, !this.isSelected(e), t);
},
getSelected: function() {
return this.selected;
},
-remove: function(a) {
-var b = {};
-for (var c in this.selected) c < a ? b[c] = this.selected[c] : c > a && (b[c - 1] = this.selected[c]);
-this.selected = b;
+remove: function(e) {
+var t = {};
+for (var n in this.selected) n < e ? t[n] = this.selected[n] : n > e && (t[n - 1] = this.selected[n]);
+this.selected = t;
}
});