aboutsummaryrefslogtreecommitdiffstats
path: root/Software/.jxbrowser-data
diff options
context:
space:
mode:
Diffstat (limited to 'Software/.jxbrowser-data')
-rw-r--r--Software/.jxbrowser-data/Cache/f_00000e683
-rw-r--r--Software/.jxbrowser-data/Cache/f_00000f6083
-rw-r--r--Software/.jxbrowser-data/Cache/f_0000106
-rw-r--r--Software/.jxbrowser-data/Cache/f_000011bin0 -> 20544 bytes
-rw-r--r--Software/.jxbrowser-data/Cache/f_00001214879
-rw-r--r--Software/.jxbrowser-data/Cache/f_00001328
-rw-r--r--Software/.jxbrowser-data/Cache/f_0000141144
-rw-r--r--Software/.jxbrowser-data/Cache/f_00001783
-rw-r--r--Software/.jxbrowser-data/Cache/f_000018bin0 -> 18958 bytes
-rw-r--r--Software/.jxbrowser-data/Cache/f_000019bin0 -> 21015 bytes
-rw-r--r--Software/.jxbrowser-data/Cache/f_00001d10411
-rw-r--r--Software/.jxbrowser-data/Local Storage - EXT/http_localhost.localstorage1
-rw-r--r--Software/.jxbrowser-data/Local Storage/http_localhost_49602.localstoragebin0 -> 3072 bytes
-rw-r--r--Software/.jxbrowser-data/Local Storage/http_localhost_49602.localstorage-journal0
14 files changed, 33318 insertions, 0 deletions
diff --git a/Software/.jxbrowser-data/Cache/f_00000e b/Software/.jxbrowser-data/Cache/f_00000e
new file mode 100644
index 000000000..24f8c17f0
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_00000e
@@ -0,0 +1,683 @@
+/** @license
+ * eventsource.js
+ * Available under MIT License (MIT)
+ * https://github.com/Yaffle/EventSource/
+ */
+
+/*jslint indent: 2, vars: true, plusplus: true */
+/*global setTimeout, clearTimeout */
+
+(function (global) {
+ "use strict";
+
+ var setTimeout = global.setTimeout;
+ var clearTimeout = global.clearTimeout;
+
+ var k = function () {
+ };
+
+ function XHRTransport(xhr, onStartCallback, onProgressCallback, onFinishCallback, thisArg) {
+ this._internal = new XHRTransportInternal(xhr, onStartCallback, onProgressCallback, onFinishCallback, thisArg);
+ }
+
+ XHRTransport.prototype.open = function (url, withCredentials) {
+ this._internal.open(url, withCredentials);
+ };
+
+ XHRTransport.prototype.cancel = function () {
+ this._internal.cancel();
+ };
+
+ function XHRTransportInternal(xhr, onStartCallback, onProgressCallback, onFinishCallback, thisArg) {
+ this.onStartCallback = onStartCallback;
+ this.onProgressCallback = onProgressCallback;
+ this.onFinishCallback = onFinishCallback;
+ this.thisArg = thisArg;
+ this.xhr = xhr;
+ this.state = 0;
+ this.charOffset = 0;
+ this.offset = 0;
+ this.url = "";
+ this.withCredentials = false;
+ this.timeout = 0;
+ }
+
+ XHRTransportInternal.prototype.onStart = function () {
+ if (this.state === 1) {
+ this.state = 2;
+ var status = 0;
+ var statusText = "";
+ var contentType = undefined;
+ if (!("contentType" in this.xhr)) {
+ try {
+ status = this.xhr.status;
+ statusText = this.xhr.statusText;
+ contentType = this.xhr.getResponseHeader("Content-Type");
+ } catch (error) {
+ // https://bugs.webkit.org/show_bug.cgi?id=29121
+ status = 0;
+ statusText = "";
+ contentType = undefined;
+ // FF < 14, WebKit
+ // https://bugs.webkit.org/show_bug.cgi?id=29658
+ // https://bugs.webkit.org/show_bug.cgi?id=77854
+ }
+ } else {
+ status = 200;
+ statusText = "OK";
+ contentType = this.xhr.contentType;
+ }
+ if (contentType == undefined) {
+ contentType = "";
+ }
+ this.onStartCallback.call(this.thisArg, status, statusText, contentType);
+ }
+ };
+ XHRTransportInternal.prototype.onProgress = function () {
+ this.onStart();
+ if (this.state === 2 || this.state === 3) {
+ this.state = 3;
+ var responseText = "";
+ try {
+ responseText = this.xhr.responseText;
+ } catch (error) {
+ // IE 8 - 9 with XMLHttpRequest
+ }
+ var chunkStart = this.charOffset;
+ var length = responseText.length;
+ for (var i = this.offset; i < length; i += 1) {
+ var c = responseText.charCodeAt(i);
+ if (c === "\n".charCodeAt(0) || c === "\r".charCodeAt(0)) {
+ this.charOffset = i + 1;
+ }
+ }
+ this.offset = length;
+ var chunk = responseText.slice(chunkStart, this.charOffset);
+ this.onProgressCallback.call(this.thisArg, chunk);
+ }
+ };
+ XHRTransportInternal.prototype.onFinish = function () {
+ // IE 8 fires "onload" without "onprogress
+ this.onProgress();
+ if (this.state === 3) {
+ this.state = 4;
+ if (this.timeout !== 0) {
+ clearTimeout(this.timeout);
+ this.timeout = 0;
+ }
+ this.onFinishCallback.call(this.thisArg);
+ }
+ };
+ XHRTransportInternal.prototype.onReadyStateChange = function () {
+ if (this.xhr != undefined) { // Opera 12
+ if (this.xhr.readyState === 4) {
+ if (this.xhr.status === 0) {
+ this.onFinish();
+ } else {
+ this.onFinish();
+ }
+ } else if (this.xhr.readyState === 3) {
+ this.onProgress();
+ } else if (this.xhr.readyState === 2) {
+ // Opera 10.63 throws exception for `this.xhr.status`
+ // this.onStart();
+ }
+ }
+ };
+ XHRTransportInternal.prototype.onTimeout2 = function () {
+ this.timeout = 0;
+ var tmp = (/^data\:([^,]*?)(base64)?,([\S]*)$/).exec(this.url);
+ var contentType = tmp[1];
+ var data = tmp[2] === "base64" ? global.atob(tmp[3]) : decodeURIComponent(tmp[3]);
+ if (this.state === 1) {
+ this.state = 2;
+ this.onStartCallback.call(this.thisArg, 200, "OK", contentType);
+ }
+ if (this.state === 2 || this.state === 3) {
+ this.state = 3;
+ this.onProgressCallback.call(this.thisArg, data);
+ }
+ if (this.state === 3) {
+ this.state = 4;
+ this.onFinishCallback.call(this.thisArg);
+ }
+ };
+ XHRTransportInternal.prototype.onTimeout1 = function () {
+ this.timeout = 0;
+ this.open(this.url, this.withCredentials);
+ };
+ XHRTransportInternal.prototype.onTimeout0 = function () {
+ var that = this;
+ this.timeout = setTimeout(function () {
+ that.onTimeout0();
+ }, 500);
+ if (this.xhr.readyState === 3) {
+ this.onProgress();
+ }
+ };
+ XHRTransportInternal.prototype.handleEvent = function (event) {
+ if (event.type === "load") {
+ this.onFinish();
+ } else if (event.type === "error") {
+ this.onFinish();
+ } else if (event.type === "abort") {
+ // improper fix to match Firefox behaviour, but it is better than just ignore abort
+ // see https://bugzilla.mozilla.org/show_bug.cgi?id=768596
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=880200
+ // https://code.google.com/p/chromium/issues/detail?id=153570
+ // IE 8 fires "onload" without "onprogress
+ this.onFinish();
+ } else if (event.type === "progress") {
+ this.onProgress();
+ } else if (event.type === "readystatechange") {
+ this.onReadyStateChange();
+ }
+ };
+ XHRTransportInternal.prototype.open = function (url, withCredentials) {
+ this.cancel();
+
+ this.url = url;
+ this.withCredentials = withCredentials;
+
+ this.state = 1;
+ this.charOffset = 0;
+ this.offset = 0;
+
+ var that = this;
+
+ var tmp = (/^data\:([^,]*?)(?:;base64)?,[\S]*$/).exec(url);
+ if (tmp != undefined) {
+ this.timeout = setTimeout(function () {
+ that.onTimeout2();
+ }, 0);
+ return;
+ }
+
+ // loading indicator in Safari, Chrome < 14
+ // loading indicator in Firefox
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=736723
+ if ((!("ontimeout" in this.xhr) || ("sendAsBinary" in this.xhr) || ("mozAnon" in this.xhr)) && global.document != undefined && global.document.readyState != undefined && global.document.readyState !== "complete") {
+ this.timeout = setTimeout(function () {
+ that.onTimeout1();
+ }, 4);
+ return;
+ }
+
+ // XDomainRequest#abort removes onprogress, onerror, onload
+ this.xhr.onload = function (event) {
+ that.handleEvent({type: "load"});
+ };
+ this.xhr.onerror = function () {
+ that.handleEvent({type: "error"});
+ };
+ this.xhr.onabort = function () {
+ that.handleEvent({type: "abort"});
+ };
+ this.xhr.onprogress = function () {
+ that.handleEvent({type: "progress"});
+ };
+ // IE 8-9 (XMLHTTPRequest)
+ // Firefox 3.5 - 3.6 - ? < 9.0
+ // onprogress is not fired sometimes or delayed
+ // see also #64
+ this.xhr.onreadystatechange = function () {
+ that.handleEvent({type: "readystatechange"});
+ };
+
+ this.xhr.open("GET", url, true);
+
+ // withCredentials should be set after "open" for Safari and Chrome (< 19 ?)
+ this.xhr.withCredentials = withCredentials;
+
+ this.xhr.responseType = "text";
+
+ if ("setRequestHeader" in this.xhr) {
+ // Request header field Cache-Control is not allowed by Access-Control-Allow-Headers.
+ // "Cache-control: no-cache" are not honored in Chrome and Firefox
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=428916
+ //this.xhr.setRequestHeader("Cache-Control", "no-cache");
+ this.xhr.setRequestHeader("Accept", "text/event-stream");
+ // Request header field Last-Event-ID is not allowed by Access-Control-Allow-Headers.
+ //this.xhr.setRequestHeader("Last-Event-ID", this.lastEventId);
+ }
+
+ try {
+ this.xhr.send(undefined);
+ } catch (error1) {
+ // Safari 5.1.7, Opera 12
+ throw error1;
+ }
+
+ if (("readyState" in this.xhr) && global.opera != undefined) {
+ // workaround for Opera issue with "progress" events
+ this.timeout = setTimeout(function () {
+ that.onTimeout0();
+ }, 0);
+ }
+ };
+ XHRTransportInternal.prototype.cancel = function () {
+ if (this.state !== 0 && this.state !== 4) {
+ this.state = 4;
+ this.xhr.onload = k;
+ this.xhr.onerror = k;
+ this.xhr.onabort = k;
+ this.xhr.onprogress = k;
+ this.xhr.onreadystatechange = k;
+ this.xhr.abort();
+ if (this.timeout !== 0) {
+ clearTimeout(this.timeout);
+ this.timeout = 0;
+ }
+ this.onFinishCallback.call(this.thisArg);
+ }
+ this.state = 0;
+ };
+
+ function Map() {
+ this._data = {};
+ }
+
+ Map.prototype.get = function (key) {
+ return this._data[key + "~"];
+ };
+ Map.prototype.set = function (key, value) {
+ this._data[key + "~"] = value;
+ };
+ Map.prototype["delete"] = function (key) {
+ delete this._data[key + "~"];
+ };
+
+ function EventTarget() {
+ this._listeners = new Map();
+ }
+
+ function throwError(e) {
+ setTimeout(function () {
+ throw e;
+ }, 0);
+ }
+
+ EventTarget.prototype.dispatchEvent = function (event) {
+ event.target = this;
+ var type = event.type.toString();
+ var listeners = this._listeners;
+ var typeListeners = listeners.get(type);
+ if (typeListeners == undefined) {
+ return;
+ }
+ var length = typeListeners.length;
+ var listener = undefined;
+ for (var i = 0; i < length; i += 1) {
+ listener = typeListeners[i];
+ try {
+ if (typeof listener.handleEvent === "function") {
+ listener.handleEvent(event);
+ } else {
+ listener.call(this, event);
+ }
+ } catch (e) {
+ throwError(e);
+ }
+ }
+ };
+ EventTarget.prototype.addEventListener = function (type, callback) {
+ type = type.toString();
+ var listeners = this._listeners;
+ var typeListeners = listeners.get(type);
+ if (typeListeners == undefined) {
+ typeListeners = [];
+ listeners.set(type, typeListeners);
+ }
+ for (var i = typeListeners.length; i >= 0; i -= 1) {
+ if (typeListeners[i] === callback) {
+ return;
+ }
+ }
+ typeListeners.push(callback);
+ };
+ EventTarget.prototype.removeEventListener = function (type, callback) {
+ type = type.toString();
+ var listeners = this._listeners;
+ var typeListeners = listeners.get(type);
+ if (typeListeners == undefined) {
+ return;
+ }
+ var length = typeListeners.length;
+ var filtered = [];
+ for (var i = 0; i < length; i += 1) {
+ if (typeListeners[i] !== callback) {
+ filtered.push(typeListeners[i]);
+ }
+ }
+ if (filtered.length === 0) {
+ listeners["delete"](type);
+ } else {
+ listeners.set(type, filtered);
+ }
+ };
+
+ function Event(type) {
+ this.type = type;
+ this.target = undefined;
+ }
+
+ function MessageEvent(type, options) {
+ Event.call(this, type);
+ this.data = options.data;
+ this.lastEventId = options.lastEventId;
+ }
+
+ MessageEvent.prototype = Event.prototype;
+
+ var XHR = global.XMLHttpRequest;
+ var XDR = global.XDomainRequest;
+ var isCORSSupported = XHR != undefined && (new XHR()).withCredentials != undefined;
+ var Transport = isCORSSupported || (XHR != undefined && XDR == undefined) ? XHR : XDR;
+
+ var WAITING = -1;
+ var CONNECTING = 0;
+ var OPEN = 1;
+ var CLOSED = 2;
+ var AFTER_CR = 3;
+ var FIELD_START = 4;
+ var FIELD = 5;
+ var VALUE_START = 6;
+ var VALUE = 7;
+ var contentTypeRegExp = /^text\/event\-stream;?(\s*charset\=utf\-8)?$/i;
+
+ var MINIMUM_DURATION = 1000;
+ var MAXIMUM_DURATION = 18000000;
+
+ var getDuration = function (value, def) {
+ var n = value;
+ if (n !== n) {
+ n = def;
+ }
+ return (n < MINIMUM_DURATION ? MINIMUM_DURATION : (n > MAXIMUM_DURATION ? MAXIMUM_DURATION : n));
+ };
+
+ var fire = function (that, f, event) {
+ try {
+ if (typeof f === "function") {
+ f.call(that, event);
+ }
+ } catch (e) {
+ throwError(e);
+ }
+ };
+
+ function EventSource(url, options) {
+ EventTarget.call(this);
+
+ this.onopen = undefined;
+ this.onmessage = undefined;
+ this.onerror = undefined;
+
+ this.url = "";
+ this.readyState = CONNECTING;
+ this.withCredentials = false;
+
+ this._internal = new EventSourceInternal(this, url, options);
+ }
+
+ function EventSourceInternal(es, url, options) {
+ this.url = url.toString();
+ this.readyState = CONNECTING;
+ this.withCredentials = isCORSSupported && options != undefined && Boolean(options.withCredentials);
+
+ this.es = es;
+ this.initialRetry = getDuration(1000, 0);
+ this.heartbeatTimeout = getDuration(45000, 0);
+
+ this.lastEventId = "";
+ this.retry = this.initialRetry;
+ this.wasActivity = false;
+ var CurrentTransport = options != undefined && options.Transport != undefined ? options.Transport : Transport;
+ var xhr = new CurrentTransport();
+ this.transport = new XHRTransport(xhr, this.onStart, this.onProgress, this.onFinish, this);
+ this.timeout = 0;
+ this.currentState = WAITING;
+ this.dataBuffer = [];
+ this.lastEventIdBuffer = "";
+ this.eventTypeBuffer = "";
+
+ this.state = FIELD_START;
+ this.fieldStart = 0;
+ this.valueStart = 0;
+
+ this.es.url = this.url;
+ this.es.readyState = this.readyState;
+ this.es.withCredentials = this.withCredentials;
+
+ this.onTimeout();
+ }
+
+ EventSourceInternal.prototype.onStart = function (status, statusText, contentType) {
+ if (this.currentState === CONNECTING) {
+ if (contentType == undefined) {
+ contentType = "";
+ }
+ if (status === 200 && contentTypeRegExp.test(contentType)) {
+ this.currentState = OPEN;
+ this.wasActivity = true;
+ this.retry = this.initialRetry;
+ this.readyState = OPEN;
+ this.es.readyState = OPEN;
+ var event = new Event("open");
+ this.es.dispatchEvent(event);
+ fire(this.es, this.es.onopen, event);
+ } else if (status !== 0) {
+ var message = "";
+ if (status !== 200) {
+ message = "EventSource's response has a status " + status + " " + statusText.replace(/\s+/g, " ") + " that is not 200. Aborting the connection.";
+ } else {
+ message = "EventSource's response has a Content-Type specifying an unsupported type: " + contentType.replace(/\s+/g, " ") + ". Aborting the connection.";
+ }
+ throwError(new Error(message));
+ this.close();
+ var event = new Event("error");
+ this.es.dispatchEvent(event);
+ fire(this.es, this.es.onerror, event);
+ }
+ }
+ };
+
+ EventSourceInternal.prototype.onProgress = function (chunk) {
+ if (this.currentState === OPEN) {
+ var length = chunk.length;
+ if (length !== 0) {
+ this.wasActivity = true;
+ }
+ for (var position = 0; position < length; position += 1) {
+ var c = chunk.charCodeAt(position);
+ if (this.state === AFTER_CR && c === "\n".charCodeAt(0)) {
+ this.state = FIELD_START;
+ } else {
+ if (this.state === AFTER_CR) {
+ this.state = FIELD_START;
+ }
+ if (c === "\r".charCodeAt(0) || c === "\n".charCodeAt(0)) {
+ if (this.state !== FIELD_START) {
+ if (this.state === FIELD) {
+ this.valueStart = position + 1;
+ }
+ var field = chunk.slice(this.fieldStart, this.valueStart - 1);
+ var value = chunk.slice(this.valueStart + (this.valueStart < position && chunk.charCodeAt(this.valueStart) === " ".charCodeAt(0) ? 1 : 0), position);
+ if (field === "data") {
+ this.dataBuffer.push(value);
+ } else if (field === "id") {
+ this.lastEventIdBuffer = value;
+ } else if (field === "event") {
+ this.eventTypeBuffer = value;
+ } else if (field === "retry") {
+ this.initialRetry = getDuration(Number(value), this.initialRetry);
+ this.retry = this.initialRetry;
+ } else if (field === "heartbeatTimeout") {
+ this.heartbeatTimeout = getDuration(Number(value), this.heartbeatTimeout);
+ if (this.timeout !== 0) {
+ clearTimeout(this.timeout);
+ var that = this;
+ this.timeout = setTimeout(function () {
+ that.onTimeout();
+ }, this.heartbeatTimeout);
+ }
+ }
+ }
+ if (this.state === FIELD_START) {
+ if (this.dataBuffer.length !== 0) {
+ this.lastEventId = this.lastEventIdBuffer;
+ if (this.eventTypeBuffer === "") {
+ this.eventTypeBuffer = "message";
+ }
+ var event = new MessageEvent(this.eventTypeBuffer, {
+ data: this.dataBuffer.join("\n"),
+ lastEventId: this.lastEventIdBuffer
+ });
+ this.es.dispatchEvent(event);
+ if (this.eventTypeBuffer === "message") {
+ fire(this.es, this.es.onmessage, event);
+ }
+ if (this.currentState === CLOSED) {
+ return;
+ }
+ }
+ this.dataBuffer.length = 0;
+ this.eventTypeBuffer = "";
+ }
+ this.state = c === "\r".charCodeAt(0) ? AFTER_CR : FIELD_START;
+ } else {
+ if (this.state === FIELD_START) {
+ this.fieldStart = position;
+ this.state = FIELD;
+ }
+ if (this.state === FIELD) {
+ if (c === ":".charCodeAt(0)) {
+ this.valueStart = position + 1;
+ this.state = VALUE_START;
+ }
+ } else if (this.state === VALUE_START) {
+ this.state = VALUE;
+ }
+ }
+ }
+ }
+ }
+ };
+
+ EventSourceInternal.prototype.onFinish = function () {
+ if (this.currentState === OPEN || this.currentState === CONNECTING) {
+ this.currentState = WAITING;
+ if (this.timeout !== 0) {
+ clearTimeout(this.timeout);
+ this.timeout = 0;
+ }
+ if (this.retry > this.initialRetry * 16) {
+ this.retry = this.initialRetry * 16;
+ }
+ if (this.retry > MAXIMUM_DURATION) {
+ this.retry = MAXIMUM_DURATION;
+ }
+ var that = this;
+ this.timeout = setTimeout(function () {
+ that.onTimeout();
+ }, this.retry);
+ this.retry = this.retry * 2 + 1;
+
+ this.readyState = CONNECTING;
+ this.es.readyState = CONNECTING;
+ var event = new Event("error");
+ this.es.dispatchEvent(event);
+ fire(this.es, this.es.onerror, event);
+ }
+ };
+
+ EventSourceInternal.prototype.onTimeout = function () {
+ this.timeout = 0;
+ if (this.currentState !== WAITING) {
+ if (!this.wasActivity) {
+ throwError(new Error("No activity within " + this.heartbeatTimeout + " milliseconds. Reconnecting."));
+ this.transport.cancel();
+ } else {
+ this.wasActivity = false;
+ var that = this;
+ this.timeout = setTimeout(function () {
+ that.onTimeout();
+ }, this.heartbeatTimeout);
+ }
+ return;
+ }
+
+ this.wasActivity = false;
+ var that = this;
+ this.timeout = setTimeout(function () {
+ that.onTimeout();
+ }, this.heartbeatTimeout);
+
+ this.currentState = CONNECTING;
+ this.dataBuffer.length = 0;
+ this.eventTypeBuffer = "";
+ this.lastEventIdBuffer = this.lastEventId;
+ this.fieldStart = 0;
+ this.valueStart = 0;
+ this.state = FIELD_START;
+
+ var s = this.url.slice(0, 5);
+ if (s !== "data:" && s !== "blob:") {
+ s = this.url + ((this.url.indexOf("?", 0) === -1 ? "?" : "&") + "lastEventId=" + encodeURIComponent(this.lastEventId) + "&r=" + (Math.random() + 1).toString().slice(2));
+ } else {
+ s = this.url;
+ }
+ try {
+ this.transport.open(s, this.withCredentials);
+ } catch (error) {
+ this.close();
+ throw error;
+ }
+ };
+
+ EventSourceInternal.prototype.close = function () {
+ this.currentState = CLOSED;
+ this.transport.cancel();
+ if (this.timeout !== 0) {
+ clearTimeout(this.timeout);
+ this.timeout = 0;
+ }
+ this.readyState = CLOSED;
+ this.es.readyState = CLOSED;
+ };
+
+ function F() {
+ this.CONNECTING = CONNECTING;
+ this.OPEN = OPEN;
+ this.CLOSED = CLOSED;
+ }
+ F.prototype = EventTarget.prototype;
+
+ EventSource.prototype = new F();
+
+ EventSource.prototype.close = function () {
+ this._internal.close();
+ };
+
+ F.call(EventSource);
+ if (isCORSSupported) {
+ EventSource.prototype.withCredentials = undefined;
+ }
+
+ var isEventSourceSupported = function () {
+ // Opera 12 fails this test, but this is fine.
+ return global.EventSource != undefined && ("withCredentials" in global.EventSource.prototype);
+ };
+
+ if (Transport != undefined && (global.EventSource == undefined || (isCORSSupported && !isEventSourceSupported()))) {
+ // Why replace a native EventSource ?
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=444328
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=831392
+ // https://code.google.com/p/chromium/issues/detail?id=260144
+ // https://code.google.com/p/chromium/issues/detail?id=225654
+ // ...
+ global.NativeEventSource = global.EventSource;
+ global.EventSource = EventSource;
+ }
+
+}(typeof window !== 'undefined' ? window : this));
diff --git a/Software/.jxbrowser-data/Cache/f_00000f b/Software/.jxbrowser-data/Cache/f_00000f
new file mode 100644
index 000000000..0cab20d1c
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_00000f
@@ -0,0 +1,6083 @@
+/**
+ * @preserve
+ * jquery.layout 1.4.3
+ * $Date: 2014-08-30 08:00:00 (Sat, 30 Aug 2014) $
+ * $Rev: 1.0403 $
+ *
+ * Copyright (c) 2014 Kevin Dalman (http://jquery-dev.com)
+ * Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * SEE: http://layout.jquery-dev.com/LICENSE.txt
+ *
+ * Changelog: http://layout.jquery-dev.com/changelog.cfm
+ *
+ * Docs: http://layout.jquery-dev.com/documentation.html
+ * Tips: http://layout.jquery-dev.com/tips.html
+ * Help: http://groups.google.com/group/jquery-ui-layout
+ */
+
+/* JavaDoc Info: http://code.google.com/closure/compiler/docs/js-for-compiler.html
+ * {!Object} non-nullable type (never NULL)
+ * {?string} nullable type (sometimes NULL) - default for {Object}
+ * {number=} optional parameter
+ * {*} ALL types
+ */
+/* TODO for jQ 2.0
+ * change .andSelf() to .addBack()
+ * check $.fn.disableSelection - this is in jQuery UI 1.9.x
+ */
+
+// NOTE: For best readability, view with a fixed-width font and tabs equal to 4-chars
+
+;(function ($) {
+
+// alias Math methods - used a lot!
+var min = Math.min
+, max = Math.max
+, round = Math.floor
+
+, isStr = function (v) { return $.type(v) === "string"; }
+
+ /**
+ * @param {!Object} Instance
+ * @param {Array.<string>} a_fn
+ */
+, runPluginCallbacks = function (Instance, a_fn) {
+ if ($.isArray(a_fn))
+ for (var i=0, c=a_fn.length; i<c; i++) {
+ var fn = a_fn[i];
+ try {
+ if (isStr(fn)) // 'name' of a function
+ fn = eval(fn);
+ if ($.isFunction(fn))
+ g(fn)( Instance );
+ } catch (ex) {}
+ }
+ function g (f) { return f; }; // compiler hack
+ }
+;
+
+/*
+ * GENERIC $.layout METHODS - used by all layouts
+ */
+$.layout = {
+
+ version: "1.4.3"
+, revision: 1.0403 // eg: 1.4.1 final = 1.0401 - major(n+).minor(nn)+patch(nn+)
+
+ // $.layout.browser REPLACES $.browser
+, browser: {} // set below
+
+ // *PREDEFINED* EFFECTS & DEFAULTS
+ // MUST list effect here - OR MUST set an fxSettings option (can be an empty hash: {})
+, effects: {
+
+ // Pane Open/Close Animations
+ slide: {
+ all: { duration: "fast" } // eg: duration: 1000, easing: "easeOutBounce"
+ , north: { direction: "up" }
+ , south: { direction: "down" }
+ , east: { direction: "right"}
+ , west: { direction: "left" }
+ }
+ , drop: {
+ all: { duration: "slow" }
+ , north: { direction: "up" }
+ , south: { direction: "down" }
+ , east: { direction: "right"}
+ , west: { direction: "left" }
+ }
+ , scale: {
+ all: { duration: "fast" }
+ }
+ // these are not recommended, but can be used
+ , blind: {}
+ , clip: {}
+ , explode: {}
+ , fade: {}
+ , fold: {}
+ , puff: {}
+
+ // Pane Resize Animations
+ , size: {
+ all: { easing: "swing" }
+ }
+ }
+
+ // INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
+, config: {
+ optionRootKeys: "effects,panes,north,south,west,east,center".split(",")
+ , allPanes: "north,south,west,east,center".split(",")
+ , borderPanes: "north,south,west,east".split(",")
+ , oppositeEdge: {
+ north: "south"
+ , south: "north"
+ , east: "west"
+ , west: "east"
+ }
+ // offscreen data
+ , offscreenCSS: { left: "-99999px", right: "auto" } // used by hide/close if useOffscreenClose=true
+ , offscreenReset: "offscreenReset" // key used for data
+ // CSS used in multiple places
+ , hidden: { visibility: "hidden" }
+ , visible: { visibility: "visible" }
+ // layout element settings
+ , resizers: {
+ cssReq: {
+ position: "absolute"
+ , padding: 0
+ , margin: 0
+ , fontSize: "1px"
+ , textAlign: "left" // to counter-act "center" alignment!
+ , overflow: "hidden" // prevent toggler-button from overflowing
+ // SEE $.layout.defaults.zIndexes.resizer_normal
+ }
+ , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
+ background: "#DDD"
+ , border: "none"
+ }
+ }
+ , togglers: {
+ cssReq: {
+ position: "absolute"
+ , display: "block"
+ , padding: 0
+ , margin: 0
+ , overflow: "hidden"
+ , textAlign: "center"
+ , fontSize: "1px"
+ , cursor: "pointer"
+ , zIndex: 1
+ }
+ , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
+ background: "#AAA"
+ }
+ }
+ , content: {
+ cssReq: {
+ position: "relative" /* contain floated or positioned elements */
+ }
+ , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
+ overflow: "auto"
+ , padding: "10px"
+ }
+ , cssDemoPane: { // DEMO CSS - REMOVE scrolling from 'pane' when it has a content-div
+ overflow: "hidden"
+ , padding: 0
+ }
+ }
+ , panes: { // defaults for ALL panes - overridden by 'per-pane settings' below
+ cssReq: {
+ position: "absolute"
+ , margin: 0
+ // $.layout.defaults.zIndexes.pane_normal
+ }
+ , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
+ padding: "10px"
+ , background: "#FFF"
+ , border: "1px solid #BBB"
+ , overflow: "auto"
+ }
+ }
+ , north: {
+ side: "top"
+ , sizeType: "Height"
+ , dir: "horz"
+ , cssReq: {
+ top: 0
+ , bottom: "auto"
+ , left: 0
+ , right: 0
+ , width: "auto"
+ // height: DYNAMIC
+ }
+ }
+ , south: {
+ side: "bottom"
+ , sizeType: "Height"
+ , dir: "horz"
+ , cssReq: {
+ top: "auto"
+ , bottom: 0
+ , left: 0
+ , right: 0
+ , width: "auto"
+ // height: DYNAMIC
+ }
+ }
+ , east: {
+ side: "right"
+ , sizeType: "Width"
+ , dir: "vert"
+ , cssReq: {
+ left: "auto"
+ , right: 0
+ , top: "auto" // DYNAMIC
+ , bottom: "auto" // DYNAMIC
+ , height: "auto"
+ // width: DYNAMIC
+ }
+ }
+ , west: {
+ side: "left"
+ , sizeType: "Width"
+ , dir: "vert"
+ , cssReq: {
+ left: 0
+ , right: "auto"
+ , top: "auto" // DYNAMIC
+ , bottom: "auto" // DYNAMIC
+ , height: "auto"
+ // width: DYNAMIC
+ }
+ }
+ , center: {
+ dir: "center"
+ , cssReq: {
+ left: "auto" // DYNAMIC
+ , right: "auto" // DYNAMIC
+ , top: "auto" // DYNAMIC
+ , bottom: "auto" // DYNAMIC
+ , height: "auto"
+ , width: "auto"
+ }
+ }
+ }
+
+ // CALLBACK FUNCTION NAMESPACE - used to store reusable callback functions
+, callbacks: {}
+
+, getParentPaneElem: function (el) {
+ // must pass either a container or pane element
+ var $el = $(el)
+ , layout = $el.data("layout") || $el.data("parentLayout");
+ if (layout) {
+ var $cont = layout.container;
+ // see if this container is directly-nested inside an outer-pane
+ if ($cont.data("layoutPane")) return $cont;
+ var $pane = $cont.closest("."+ $.layout.defaults.panes.paneClass);
+ // if a pane was found, return it
+ if ($pane.data("layoutPane")) return $pane;
+ }
+ return null;
+ }
+
+, getParentPaneInstance: function (el) {
+ // must pass either a container or pane element
+ var $pane = $.layout.getParentPaneElem(el);
+ return $pane ? $pane.data("layoutPane") : null;
+ }
+
+, getParentLayoutInstance: function (el) {
+ // must pass either a container or pane element
+ var $pane = $.layout.getParentPaneElem(el);
+ return $pane ? $pane.data("parentLayout") : null;
+ }
+
+, getEventObject: function (evt) {
+ return typeof evt === "object" && evt.stopPropagation ? evt : null;
+ }
+, parsePaneName: function (evt_or_pane) {
+ var evt = $.layout.getEventObject( evt_or_pane )
+ , pane = evt_or_pane;
+ if (evt) {
+ // ALWAYS stop propagation of events triggered in Layout!
+ evt.stopPropagation();
+ pane = $(this).data("layoutEdge");
+ }
+ if (pane && !/^(west|east|north|south|center)$/.test(pane)) {
+ $.layout.msg('LAYOUT ERROR - Invalid pane-name: "'+ pane +'"');
+ pane = "error";
+ }
+ return pane;
+ }
+
+
+ // LAYOUT-PLUGIN REGISTRATION
+ // more plugins can added beyond this default list
+, plugins: {
+ draggable: !!$.fn.draggable // resizing
+ , effects: {
+ core: !!$.effects // animimations (specific effects tested by initOptions)
+ , slide: $.effects && ($.effects.slide || ($.effects.effect && $.effects.effect.slide)) // default effect
+ }
+ }
+
+// arrays of plugin or other methods to be triggered for events in *each layout* - will be passed 'Instance'
+, onCreate: [] // runs when layout is just starting to be created - right after options are set
+, onLoad: [] // runs after layout container and global events init, but before initPanes is called
+, onReady: [] // runs after initialization *completes* - ie, after initPanes completes successfully
+, onDestroy: [] // runs after layout is destroyed
+, onUnload: [] // runs after layout is destroyed OR when page unloads
+, afterOpen: [] // runs after setAsOpen() completes
+, afterClose: [] // runs after setAsClosed() completes
+
+ /*
+ * GENERIC UTILITY METHODS
+ */
+
+ // calculate and return the scrollbar width, as an integer
+, scrollbarWidth: function () { return window.scrollbarWidth || $.layout.getScrollbarSize('width'); }
+, scrollbarHeight: function () { return window.scrollbarHeight || $.layout.getScrollbarSize('height'); }
+, getScrollbarSize: function (dim) {
+ var $c = $('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; border: 0; overflow: scroll;"></div>').appendTo("body")
+ , d = { width: $c.outerWidth - $c[0].clientWidth, height: 100 - $c[0].clientHeight };
+ $c.remove();
+ window.scrollbarWidth = d.width;
+ window.scrollbarHeight = d.height;
+ return dim.match(/^(width|height)$/) ? d[dim] : d;
+ }
+
+
+, disableTextSelection: function () {
+ var $d = $(document)
+ , s = 'textSelectionDisabled'
+ , x = 'textSelectionInitialized'
+ ;
+ if ($.fn.disableSelection) {
+ if (!$d.data(x)) // document hasn't been initialized yet
+ $d.on('mouseup', $.layout.enableTextSelection ).data(x, true);
+ if (!$d.data(s))
+ $d.disableSelection().data(s, true);
+ }
+ }
+, enableTextSelection: function () {
+ var $d = $(document)
+ , s = 'textSelectionDisabled';
+ if ($.fn.enableSelection && $d.data(s))
+ $d.enableSelection().data(s, false);
+ }
+
+
+ /**
+ * Returns hash container 'display' and 'visibility'
+ *
+ * @see $.swap() - swaps CSS, runs callback, resets CSS
+ * @param {!Object} $E jQuery element
+ * @param {boolean=} [force=false] Run even if display != none
+ * @return {!Object} Returns current style props, if applicable
+ */
+, showInvisibly: function ($E, force) {
+ if ($E && $E.length && (force || $E.css("display") === "none")) { // only if not *already hidden*
+ var s = $E[0].style
+ // save ONLY the 'style' props because that is what we must restore
+ , CSS = { display: s.display || '', visibility: s.visibility || '' };
+ // show element 'invisibly' so can be measured
+ $E.css({ display: "block", visibility: "hidden" });
+ return CSS;
+ }
+ return {};
+ }
+
+ /**
+ * Returns data for setting size of an element (container or a pane).
+ *
+ * @see _create(), onWindowResize() for container, plus others for pane
+ * @return JSON Returns a hash of all dimensions: top, bottom, left, right, outerWidth, innerHeight, etc
+ */
+, getElementDimensions: function ($E, inset) {
+ var
+ // dimensions hash - start with current data IF passed
+ d = { css: {}, inset: {} }
+ , x = d.css // CSS hash
+ , i = { bottom: 0 } // TEMP insets (bottom = complier hack)
+ , N = $.layout.cssNum
+ , R = Math.round
+ , off = $E.offset()
+ , b, p, ei // TEMP border, padding
+ ;
+ d.offsetLeft = off.left;
+ d.offsetTop = off.top;
+
+ if (!inset) inset = {}; // simplify logic below
+
+ $.each("Left,Right,Top,Bottom".split(","), function (idx, e) { // e = edge
+ b = x["border" + e] = $.layout.borderWidth($E, e);
+ p = x["padding"+ e] = $.layout.cssNum($E, "padding"+e);
+ ei = e.toLowerCase();
+ d.inset[ei] = inset[ei] >= 0 ? inset[ei] : p; // any missing insetX value = paddingX
+ i[ei] = d.inset[ei] + b; // total offset of content from outer side
+ });
+
+ x.width = R($E.width());
+ x.height = R($E.height());
+ x.top = N($E,"top",true);
+ x.bottom = N($E,"bottom",true);
+ x.left = N($E,"left",true);
+ x.right = N($E,"right",true);
+
+ d.outerWidth = R($E.outerWidth());
+ d.outerHeight = R($E.outerHeight());
+ // calc the TRUE inner-dimensions, even in quirks-mode!
+ d.innerWidth = max(0, d.outerWidth - i.left - i.right);
+ d.innerHeight = max(0, d.outerHeight - i.top - i.bottom);
+ // layoutWidth/Height is used in calcs for manual resizing
+ // layoutW/H only differs from innerW/H when in quirks-mode - then is like outerW/H
+ d.layoutWidth = R($E.innerWidth());
+ d.layoutHeight = R($E.innerHeight());
+
+ //if ($E.prop('tagName') === 'BODY') { debugData( d, $E.prop('tagName') ); } // DEBUG
+
+ //d.visible = $E.is(":visible");// && x.width > 0 && x.height > 0;
+
+ return d;
+ }
+
+, getElementStyles: function ($E, list) {
+ var
+ CSS = {}
+ , style = $E[0].style
+ , props = list.split(",")
+ , sides = "Top,Bottom,Left,Right".split(",")
+ , attrs = "Color,Style,Width".split(",")
+ , p, s, a, i, j, k
+ ;
+ for (i=0; i < props.length; i++) {
+ p = props[i];
+ if (p.match(/(border|padding|margin)$/))
+ for (j=0; j < 4; j++) {
+ s = sides[j];
+ if (p === "border")
+ for (k=0; k < 3; k++) {
+ a = attrs[k];
+ CSS[p+s+a] = style[p+s+a];
+ }
+ else
+ CSS[p+s] = style[p+s];
+ }
+ else
+ CSS[p] = style[p];
+ };
+ return CSS
+ }
+
+ /**
+ * Return the innerWidth for the current browser/doctype
+ *
+ * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
+ * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
+ * @param {number=} outerWidth (optional) Can pass a width, allowing calculations BEFORE element is resized
+ * @return {number} Returns the innerWidth of the elem by subtracting padding and borders
+ */
+, cssWidth: function ($E, outerWidth) {
+ // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
+ if (outerWidth <= 0) return 0;
+
+ var lb = $.layout.browser
+ , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
+ , b = $.layout.borderWidth
+ , n = $.layout.cssNum
+ , W = outerWidth
+ ;
+ // strip border and/or padding from outerWidth to get CSS Width
+ if (bs !== "border-box")
+ W -= (b($E, "Left") + b($E, "Right"));
+ if (bs === "content-box")
+ W -= (n($E, "paddingLeft") + n($E, "paddingRight"));
+ return max(0,W);
+ }
+
+ /**
+ * Return the innerHeight for the current browser/doctype
+ *
+ * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
+ * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
+ * @param {number=} outerHeight (optional) Can pass a width, allowing calculations BEFORE element is resized
+ * @return {number} Returns the innerHeight of the elem by subtracting padding and borders
+ */
+, cssHeight: function ($E, outerHeight) {
+ // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
+ if (outerHeight <= 0) return 0;
+
+ var lb = $.layout.browser
+ , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
+ , b = $.layout.borderWidth
+ , n = $.layout.cssNum
+ , H = outerHeight
+ ;
+ // strip border and/or padding from outerHeight to get CSS Height
+ if (bs !== "border-box")
+ H -= (b($E, "Top") + b($E, "Bottom"));
+ if (bs === "content-box")
+ H -= (n($E, "paddingTop") + n($E, "paddingBottom"));
+ return max(0,H);
+ }
+
+ /**
+ * Returns the 'current CSS numeric value' for a CSS property - 0 if property does not exist
+ *
+ * @see Called by many methods
+ * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
+ * @param {string} prop The name of the CSS property, eg: top, width, etc.
+ * @param {boolean=} [allowAuto=false] true = return 'auto' if that is value; false = return 0
+ * @return {(string|number)} Usually used to get an integer value for position (top, left) or size (height, width)
+ */
+, cssNum: function ($E, prop, allowAuto) {
+ if (!$E.jquery) $E = $($E);
+ var CSS = $.layout.showInvisibly($E)
+ , p = $.css($E[0], prop, true)
+ , v = allowAuto && p=="auto" ? p : Math.round(parseFloat(p) || 0);
+ $E.css( CSS ); // RESET
+ return v;
+ }
+
+, borderWidth: function (el, side) {
+ if (el.jquery) el = el[0];
+ var b = "border"+ side.substr(0,1).toUpperCase() + side.substr(1); // left => Left
+ return $.css(el, b+"Style", true) === "none" ? 0 : Math.round(parseFloat($.css(el, b+"Width", true)) || 0);
+ }
+
+ /**
+ * Mouse-tracking utility - FUTURE REFERENCE
+ *
+ * init: if (!window.mouse) {
+ * window.mouse = { x: 0, y: 0 };
+ * $(document).mousemove( $.layout.trackMouse );
+ * }
+ *
+ * @param {Object} evt
+ *
+, trackMouse: function (evt) {
+ window.mouse = { x: evt.clientX, y: evt.clientY };
+ }
+ */
+
+ /**
+ * SUBROUTINE for preventPrematureSlideClose option
+ *
+ * @param {Object} evt
+ * @param {Object=} el
+ */
+, isMouseOverElem: function (evt, el) {
+ var
+ $E = $(el || this)
+ , d = $E.offset()
+ , T = d.top
+ , L = d.left
+ , R = L + $E.outerWidth()
+ , B = T + $E.outerHeight()
+ , x = evt.pageX // evt.clientX ?
+ , y = evt.pageY // evt.clientY ?
+ ;
+ // if X & Y are < 0, probably means is over an open SELECT
+ return ($.layout.browser.msie && x < 0 && y < 0) || ((x >= L && x <= R) && (y >= T && y <= B));
+ }
+
+ /**
+ * Message/Logging Utility
+ *
+ * @example $.layout.msg("My message"); // log text
+ * @example $.layout.msg("My message", true); // alert text
+ * @example $.layout.msg({ foo: "bar" }, "Title"); // log hash-data, with custom title
+ * @example $.layout.msg({ foo: "bar" }, true, "Title", { sort: false }); -OR-
+ * @example $.layout.msg({ foo: "bar" }, "Title", { sort: false, display: true }); // alert hash-data
+ *
+ * @param {(Object|string)} info String message OR Hash/Array
+ * @param {(Boolean|string|Object)=} [popup=false] True means alert-box - can be skipped
+ * @param {(Object|string)=} [debugTitle=""] Title for Hash data - can be skipped
+ * @param {Object=} [debugOpts] Extra options for debug output
+ */
+, msg: function (info, popup, debugTitle, debugOpts) {
+ if ($.isPlainObject(info) && window.debugData) {
+ if (typeof popup === "string") {
+ debugOpts = debugTitle;
+ debugTitle = popup;
+ }
+ else if (typeof debugTitle === "object") {
+ debugOpts = debugTitle;
+ debugTitle = null;
+ }
+ var t = debugTitle || "log( <object> )"
+ , o = $.extend({ sort: false, returnHTML: false, display: false }, debugOpts);
+ if (popup === true || o.display)
+ debugData( info, t, o );
+ else if (window.console)
+ console.log(debugData( info, t, o ));
+ }
+ else if (popup)
+ alert(info);
+ else if (window.console)
+ console.log(info);
+ else {
+ var id = "#layoutLogger"
+ , $l = $(id);
+ if (!$l.length)
+ $l = createLog();
+ $l.children("ul").append('<li style="padding: 4px 10px; margin: 0; border-top: 1px solid #CCC;">'+ info.replace(/\</g,"&lt;").replace(/\>/g,"&gt;") +'</li>');
+ }
+
+ function createLog () {
+ var pos = $.support.fixedPosition ? 'fixed' : 'absolute'
+ , $e = $('<div id="layoutLogger" style="position: '+ pos +'; top: 5px; z-index: 999999; max-width: 25%; overflow: hidden; border: 1px solid #000; border-radius: 5px; background: #FBFBFB; box-shadow: 0 2px 10px rgba(0,0,0,0.3);">'
+ + '<div style="font-size: 13px; font-weight: bold; padding: 5px 10px; background: #F6F6F6; border-radius: 5px 5px 0 0; cursor: move;">'
+ + '<span style="float: right; padding-left: 7px; cursor: pointer;" title="Remove Console" onclick="$(this).closest(\'#layoutLogger\').remove()">X</span>Layout console.log</div>'
+ + '<ul style="font-size: 13px; font-weight: none; list-style: none; margin: 0; padding: 0 0 2px;"></ul>'
+ + '</div>'
+ ).appendTo("body");
+ $e.css('left', $(window).width() - $e.outerWidth() - 5)
+ if ($.ui.draggable) $e.draggable({ handle: ':first-child' });
+ return $e;
+ };
+ }
+
+};
+
+
+/*
+ * $.layout.browser REPLACES removed $.browser, with extra data
+ * Parsing code here adapted from jQuery 1.8 $.browse
+ */
+(function(){
+ var u = navigator.userAgent.toLowerCase()
+ , m = /(chrome)[ \/]([\w.]+)/.exec( u )
+ || /(webkit)[ \/]([\w.]+)/.exec( u )
+ || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( u )
+ || /(msie) ([\w.]+)/.exec( u )
+ || u.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( u )
+ || []
+ , b = m[1] || ""
+ , v = m[2] || 0
+ , ie = b === "msie"
+ , cm = document.compatMode
+ , $s = $.support
+ , bs = $s.boxSizing !== undefined ? $s.boxSizing : $s.boxSizingReliable
+ , bm = !ie || !cm || cm === "CSS1Compat" || $s.boxModel || false
+ , lb = $.layout.browser = {
+ version: v
+ , safari: b === "webkit" // webkit (NOT chrome) = safari
+ , webkit: b === "chrome" // chrome = webkit
+ , msie: ie
+ , isIE6: ie && v == 6
+ // ONLY IE reverts to old box-model - Note that compatMode was deprecated as of IE8
+ , boxModel: bm
+ , boxSizing: !!(typeof bs === "function" ? bs() : bs)
+ };
+ ;
+ if (b) lb[b] = true; // set CURRENT browser
+ /* OLD versions of jQuery only set $.support.boxModel after page is loaded
+ * so if this is IE, use support.boxModel to test for quirks-mode (ONLY IE changes boxModel) */
+ if (!bm && !cm) $(function(){ lb.boxModel = $s.boxModel; });
+})();
+
+
+// DEFAULT OPTIONS
+$.layout.defaults = {
+/*
+ * LAYOUT & LAYOUT-CONTAINER OPTIONS
+ * - none of these options are applicable to individual panes
+ */
+ name: "" // Not required, but useful for buttons and used for the state-cookie
+, containerClass: "ui-layout-container" // layout-container element
+, inset: null // custom container-inset values (override padding)
+, scrollToBookmarkOnLoad: true // after creating a layout, scroll to bookmark in URL (.../page.htm#myBookmark)
+, resizeWithWindow: true // bind thisLayout.resizeAll() to the window.resize event
+, resizeWithWindowDelay: 200 // delay calling resizeAll because makes window resizing very jerky
+, resizeWithWindowMaxDelay: 0 // 0 = none - force resize every XX ms while window is being resized
+, maskPanesEarly: false // true = create pane-masks on resizer.mouseDown instead of waiting for resizer.dragstart
+, onresizeall_start: null // CALLBACK when resizeAll() STARTS - NOT pane-specific
+, onresizeall_end: null // CALLBACK when resizeAll() ENDS - NOT pane-specific
+, onload_start: null // CALLBACK when Layout inits - after options initialized, but before elements
+, onload_end: null // CALLBACK when Layout inits - after EVERYTHING has been initialized
+, onunload_start: null // CALLBACK when Layout is destroyed OR onWindowUnload
+, onunload_end: null // CALLBACK when Layout is destroyed OR onWindowUnload
+, initPanes: true // false = DO NOT initialize the panes onLoad - will init later
+, showErrorMessages: true // enables fatal error messages to warn developers of common errors
+, showDebugMessages: false // display console-and-alert debug msgs - IF this Layout version _has_ debugging code!
+// Changing this zIndex value will cause other zIndex values to automatically change
+, zIndex: null // the PANE zIndex - resizers and masks will be +1
+// DO NOT CHANGE the zIndex values below unless you clearly understand their relationships
+, zIndexes: { // set _default_ z-index values here...
+ pane_normal: 0 // normal z-index for panes
+ , content_mask: 1 // applied to overlays used to mask content INSIDE panes during resizing
+ , resizer_normal: 2 // normal z-index for resizer-bars
+ , pane_sliding: 100 // applied to *BOTH* the pane and its resizer when a pane is 'slid open'
+ , pane_animate: 1000 // applied to the pane when being animated - not applied to the resizer
+ , resizer_drag: 10000 // applied to the CLONED resizer-bar when being 'dragged'
+ }
+, errors: {
+ pane: "pane" // description of "layout pane element" - used only in error messages
+ , selector: "selector" // description of "jQuery-selector" - used only in error messages
+ , addButtonError: "Error Adding Button\nInvalid "
+ , containerMissing: "UI Layout Initialization Error\nThe specified layout-container does not exist."
+ , centerPaneMissing: "UI Layout Initialization Error\nThe center-pane element does not exist.\nThe center-pane is a required element."
+ , noContainerHeight: "UI Layout Initialization Warning\nThe layout-container \"CONTAINER\" has no height.\nTherefore the layout is 0-height and hence 'invisible'!"
+ , callbackError: "UI Layout Callback Error\nThe EVENT callback is not a valid function."
+ }
+/*
+ * PANE DEFAULT SETTINGS
+ * - settings under the 'panes' key become the default settings for *all panes*
+ * - ALL pane-options can also be set specifically for each panes, which will override these 'default values'
+ */
+, panes: { // default options for 'all panes' - will be overridden by 'per-pane settings'
+ applyDemoStyles: false // NOTE: renamed from applyDefaultStyles for clarity
+ , closable: true // pane can open & close
+ , resizable: true // when open, pane can be resized
+ , slidable: true // when closed, pane can 'slide open' over other panes - closes on mouse-out
+ , initClosed: false // true = init pane as 'closed'
+ , initHidden: false // true = init pane as 'hidden' - no resizer-bar/spacing
+ // SELECTORS
+ //, paneSelector: "" // MUST be pane-specific - jQuery selector for pane
+ , contentSelector: ".ui-layout-content" // INNER div/element to auto-size so only it scrolls, not the entire pane!
+ , contentIgnoreSelector: ".ui-layout-ignore" // element(s) to 'ignore' when measuring 'content'
+ , findNestedContent: false // true = $P.find(contentSelector), false = $P.children(contentSelector)
+ // GENERIC ROOT-CLASSES - for auto-generated classNames
+ , paneClass: "ui-layout-pane" // Layout Pane
+ , resizerClass: "ui-layout-resizer" // Resizer Bar
+ , togglerClass: "ui-layout-toggler" // Toggler Button
+ , buttonClass: "ui-layout-button" // CUSTOM Buttons - eg: '[ui-layout-button]-toggle/-open/-close/-pin'
+ // ELEMENT SIZE & SPACING
+ //, size: 100 // MUST be pane-specific -initial size of pane
+ , minSize: 0 // when manually resizing a pane
+ , maxSize: 0 // ditto, 0 = no limit
+ , spacing_open: 6 // space between pane and adjacent panes - when pane is 'open'
+ , spacing_closed: 6 // ditto - when pane is 'closed'
+ , togglerLength_open: 50 // Length = WIDTH of toggler button on north/south sides - HEIGHT on east/west sides
+ , togglerLength_closed: 50 // 100% OR -1 means 'full height/width of resizer bar' - 0 means 'hidden'
+ , togglerAlign_open: "center" // top/left, bottom/right, center, OR...
+ , togglerAlign_closed: "center" // 1 => nn = offset from top/left, -1 => -nn == offset from bottom/right
+ , togglerContent_open: "" // text or HTML to put INSIDE the toggler
+ , togglerContent_closed: "" // ditto
+ // RESIZING OPTIONS
+ , resizerDblClickToggle: true //
+ , autoResize: true // IF size is 'auto' or a percentage, then recalc 'pixel size' whenever the layout resizes
+ , autoReopen: true // IF a pane was auto-closed due to noRoom, reopen it when there is room? False = leave it closed
+ , resizerDragOpacity: 1 // option for ui.draggable
+ //, resizerCursor: "" // MUST be pane-specific - cursor when over resizer-bar
+ , maskContents: false // true = add DIV-mask over-or-inside this pane so can 'drag' over IFRAMES
+ , maskObjects: false // true = add IFRAME-mask over-or-inside this pane to cover objects/applets - content-mask will overlay this mask
+ , maskZindex: null // will override zIndexes.content_mask if specified - not applicable to iframe-panes
+ , resizingGrid: false // grid size that the resizers will snap-to during resizing, eg: [20,20]
+ , livePaneResizing: false // true = LIVE Resizing as resizer is dragged
+ , liveContentResizing: false // true = re-measure header/footer heights as resizer is dragged
+ , liveResizingTolerance: 1 // how many px change before pane resizes, to control performance
+ // SLIDING OPTIONS
+ , sliderCursor: "pointer" // cursor when resizer-bar will trigger 'sliding'
+ , slideTrigger_open: "click" // click, dblclick, mouseenter
+ , slideTrigger_close: "mouseleave"// click, mouseleave
+ , slideDelay_open: 300 // applies only for mouseenter event - 0 = instant open
+ , slideDelay_close: 300 // applies only for mouseleave event (300ms is the minimum!)
+ , hideTogglerOnSlide: false // when pane is slid-open, should the toggler show?
+ , preventQuickSlideClose: $.layout.browser.webkit // Chrome triggers slideClosed as it is opening
+ , preventPrematureSlideClose: false // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
+ // PANE-SPECIFIC TIPS & MESSAGES
+ , tips: {
+ Open: "Open" // eg: "Open Pane"
+ , Close: "Close"
+ , Resize: "Resize"
+ , Slide: "Slide Open"
+ , Pin: "Pin"
+ , Unpin: "Un-Pin"
+ , noRoomToOpen: "Not enough room to show this panel." // alert if user tries to open a pane that cannot
+ , minSizeWarning: "Panel has reached its minimum size" // displays in browser statusbar
+ , maxSizeWarning: "Panel has reached its maximum size" // ditto
+ }
+ // HOT-KEYS & MISC
+ , showOverflowOnHover: false // will bind allowOverflow() utility to pane.onMouseOver
+ , enableCursorHotkey: true // enabled 'cursor' hotkeys
+ //, customHotkey: "" // MUST be pane-specific - EITHER a charCode OR a character
+ , customHotkeyModifier: "SHIFT" // either 'SHIFT', 'CTRL' or 'CTRL+SHIFT' - NOT 'ALT'
+ // PANE ANIMATION
+ // NOTE: fxSss_open, fxSss_close & fxSss_size options (eg: fxName_open) are auto-generated if not passed
+ , fxName: "slide" // ('none' or blank), slide, drop, scale -- only relevant to 'open' & 'close', NOT 'size'
+ , fxSpeed: null // slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration
+ , fxSettings: {} // can be passed, eg: { easing: "easeOutBounce", duration: 1500 }
+ , fxOpacityFix: true // tries to fix opacity in IE to restore anti-aliasing after animation
+ , animatePaneSizing: false // true = animate resizing after dragging resizer-bar OR sizePane() is called
+ /* NOTE: Action-specific FX options are auto-generated from the options above if not specifically set:
+ fxName_open: "slide" // 'Open' pane animation
+ fnName_close: "slide" // 'Close' pane animation
+ fxName_size: "slide" // 'Size' pane animation - when animatePaneSizing = true
+ fxSpeed_open: null
+ fxSpeed_close: null
+ fxSpeed_size: null
+ fxSettings_open: {}
+ fxSettings_close: {}
+ fxSettings_size: {}
+ */
+ // CHILD/NESTED LAYOUTS
+ , children: null // Layout-options for nested/child layout - even {} is valid as options
+ , containerSelector: '' // if child is NOT 'directly nested', a selector to find it/them (can have more than one child layout!)
+ , initChildren: true // true = child layout will be created as soon as _this_ layout completes initialization
+ , destroyChildren: true // true = destroy child-layout if this pane is destroyed
+ , resizeChildren: true // true = trigger child-layout.resizeAll() when this pane is resized
+ // EVENT TRIGGERING
+ , triggerEventsOnLoad: false // true = trigger onopen OR onclose callbacks when layout initializes
+ , triggerEventsDuringLiveResize: true // true = trigger onresize callback REPEATEDLY if livePaneResizing==true
+ // PANE CALLBACKS
+ , onshow_start: null // CALLBACK when pane STARTS to Show - BEFORE onopen/onhide_start
+ , onshow_end: null // CALLBACK when pane ENDS being Shown - AFTER onopen/onhide_end
+ , onhide_start: null // CALLBACK when pane STARTS to Close - BEFORE onclose_start
+ , onhide_end: null // CALLBACK when pane ENDS being Closed - AFTER onclose_end
+ , onopen_start: null // CALLBACK when pane STARTS to Open
+ , onopen_end: null // CALLBACK when pane ENDS being Opened
+ , onclose_start: null // CALLBACK when pane STARTS to Close
+ , onclose_end: null // CALLBACK when pane ENDS being Closed
+ , onresize_start: null // CALLBACK when pane STARTS being Resized ***FOR ANY REASON***
+ , onresize_end: null // CALLBACK when pane ENDS being Resized ***FOR ANY REASON***
+ , onsizecontent_start: null // CALLBACK when sizing of content-element STARTS
+ , onsizecontent_end: null // CALLBACK when sizing of content-element ENDS
+ , onswap_start: null // CALLBACK when pane STARTS to Swap
+ , onswap_end: null // CALLBACK when pane ENDS being Swapped
+ , ondrag_start: null // CALLBACK when pane STARTS being ***MANUALLY*** Resized
+ , ondrag_end: null // CALLBACK when pane ENDS being ***MANUALLY*** Resized
+ }
+/*
+ * PANE-SPECIFIC SETTINGS
+ * - options listed below MUST be specified per-pane - they CANNOT be set under 'panes'
+ * - all options under the 'panes' key can also be set specifically for any pane
+ * - most options under the 'panes' key apply only to 'border-panes' - NOT the the center-pane
+ */
+, north: {
+ paneSelector: ".ui-layout-north"
+ , size: "auto" // eg: "auto", "30%", .30, 200
+ , resizerCursor: "n-resize" // custom = url(myCursor.cur)
+ , customHotkey: "" // EITHER a charCode (43) OR a character ("o")
+ }
+, south: {
+ paneSelector: ".ui-layout-south"
+ , size: "auto"
+ , resizerCursor: "s-resize"
+ , customHotkey: ""
+ }
+, east: {
+ paneSelector: ".ui-layout-east"
+ , size: 200
+ , resizerCursor: "e-resize"
+ , customHotkey: ""
+ }
+, west: {
+ paneSelector: ".ui-layout-west"
+ , size: 200
+ , resizerCursor: "w-resize"
+ , customHotkey: ""
+ }
+, center: {
+ paneSelector: ".ui-layout-center"
+ , minWidth: 0
+ , minHeight: 0
+ }
+};
+
+$.layout.optionsMap = {
+ // layout/global options - NOT pane-options
+ layout: ("name,instanceKey,stateManagement,effects,inset,zIndexes,errors,"
+ + "zIndex,scrollToBookmarkOnLoad,showErrorMessages,maskPanesEarly,"
+ + "outset,resizeWithWindow,resizeWithWindowDelay,resizeWithWindowMaxDelay,"
+ + "onresizeall,onresizeall_start,onresizeall_end,onload,onload_start,onload_end,onunload,onunload_start,onunload_end").split(",")
+// borderPanes: [ ALL options that are NOT specified as 'layout' ]
+ // default.panes options that apply to the center-pane (most options apply _only_ to border-panes)
+, center: ("paneClass,contentSelector,contentIgnoreSelector,findNestedContent,applyDemoStyles,triggerEventsOnLoad,"
+ + "showOverflowOnHover,maskContents,maskObjects,liveContentResizing,"
+ + "containerSelector,children,initChildren,resizeChildren,destroyChildren,"
+ + "onresize,onresize_start,onresize_end,onsizecontent,onsizecontent_start,onsizecontent_end").split(",")
+ // options that MUST be specifically set 'per-pane' - CANNOT set in the panes (defaults) key
+, noDefault: ("paneSelector,resizerCursor,customHotkey").split(",")
+};
+
+/**
+ * Processes options passed in converts flat-format data into subkey (JSON) format
+ * In flat-format, subkeys are _currently_ separated with 2 underscores, like north__optName
+ * Plugins may also call this method so they can transform their own data
+ *
+ * @param {!Object} hash Data/options passed by user - may be a single level or nested levels
+ * @param {boolean=} [addKeys=false] Should the primary layout.options keys be added if they do not exist?
+ * @return {Object} Returns hash of minWidth & minHeight
+ */
+$.layout.transformData = function (hash, addKeys) {
+ var json = addKeys ? { panes: {}, center: {} } : {} // init return object
+ , branch, optKey, keys, key, val, i, c;
+
+ if (typeof hash !== "object") return json; // no options passed
+
+ // convert all 'flat-keys' to 'sub-key' format
+ for (optKey in hash) {
+ branch = json;
+ val = hash[ optKey ];
+ keys = optKey.split("__"); // eg: west__size or north__fxSettings__duration
+ c = keys.length - 1;
+ // convert underscore-delimited to subkeys
+ for (i=0; i <= c; i++) {
+ key = keys[i];
+ if (i === c) { // last key = value
+ if ($.isPlainObject( val ))
+ branch[key] = $.layout.transformData( val ); // RECURSE
+ else
+ branch[key] = val;
+ }
+ else {
+ if (!branch[key])
+ branch[key] = {}; // create the subkey
+ // recurse to sub-key for next loop - if not done
+ branch = branch[key];
+ }
+ }
+ }
+ return json;
+};
+
+// INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
+$.layout.backwardCompatibility = {
+ // data used by renameOldOptions()
+ map: {
+ // OLD Option Name: NEW Option Name
+ applyDefaultStyles: "applyDemoStyles"
+ // CHILD/NESTED LAYOUTS
+ , childOptions: "children"
+ , initChildLayout: "initChildren"
+ , destroyChildLayout: "destroyChildren"
+ , resizeChildLayout: "resizeChildren"
+ , resizeNestedLayout: "resizeChildren"
+ // MISC Options
+ , resizeWhileDragging: "livePaneResizing"
+ , resizeContentWhileDragging: "liveContentResizing"
+ , triggerEventsWhileDragging: "triggerEventsDuringLiveResize"
+ , maskIframesOnResize: "maskContents"
+ // STATE MANAGEMENT
+ , useStateCookie: "stateManagement.enabled"
+ , "cookie.autoLoad": "stateManagement.autoLoad"
+ , "cookie.autoSave": "stateManagement.autoSave"
+ , "cookie.keys": "stateManagement.stateKeys"
+ , "cookie.name": "stateManagement.cookie.name"
+ , "cookie.domain": "stateManagement.cookie.domain"
+ , "cookie.path": "stateManagement.cookie.path"
+ , "cookie.expires": "stateManagement.cookie.expires"
+ , "cookie.secure": "stateManagement.cookie.secure"
+ // OLD Language options
+ , noRoomToOpenTip: "tips.noRoomToOpen"
+ , togglerTip_open: "tips.Close" // open = Close
+ , togglerTip_closed: "tips.Open" // closed = Open
+ , resizerTip: "tips.Resize"
+ , sliderTip: "tips.Slide"
+ }
+
+/**
+* @param {Object} opts
+*/
+, renameOptions: function (opts) {
+ var map = $.layout.backwardCompatibility.map
+ , oldData, newData, value
+ ;
+ for (var itemPath in map) {
+ oldData = getBranch( itemPath );
+ value = oldData.branch[ oldData.key ];
+ if (value !== undefined) {
+ newData = getBranch( map[itemPath], true );
+ newData.branch[ newData.key ] = value;
+ delete oldData.branch[ oldData.key ];
+ }
+ }
+
+ /**
+ * @param {string} path
+ * @param {boolean=} [create=false] Create path if does not exist
+ */
+ function getBranch (path, create) {
+ var a = path.split(".") // split keys into array
+ , c = a.length - 1
+ , D = { branch: opts, key: a[c] } // init branch at top & set key (last item)
+ , i = 0, k, undef;
+ for (; i<c; i++) { // skip the last key (data)
+ k = a[i];
+ if (D.branch[ k ] == undefined) { // child-key does not exist
+ if (create) {
+ D.branch = D.branch[ k ] = {}; // create child-branch
+ }
+ else // can't go any farther
+ D.branch = {}; // branch is undefined
+ }
+ else
+ D.branch = D.branch[ k ]; // get child-branch
+ }
+ return D;
+ };
+ }
+
+/**
+* @param {Object} opts
+*/
+, renameAllOptions: function (opts) {
+ var ren = $.layout.backwardCompatibility.renameOptions;
+ // rename root (layout) options
+ ren( opts );
+ // rename 'defaults' to 'panes'
+ if (opts.defaults) {
+ if (typeof opts.panes !== "object")
+ opts.panes = {};
+ $.extend(true, opts.panes, opts.defaults);
+ delete opts.defaults;
+ }
+ // rename options in the the options.panes key
+ if (opts.panes) ren( opts.panes );
+ // rename options inside *each pane key*, eg: options.west
+ $.each($.layout.config.allPanes, function (i, pane) {
+ if (opts[pane]) ren( opts[pane] );
+ });
+ return opts;
+ }
+};
+
+
+
+
+/* ============================================================
+ * BEGIN WIDGET: $( selector ).layout( {options} );
+ * ============================================================
+ */
+$.fn.layout = function (opts) {
+ var
+
+ // local aliases to global data
+ browser = $.layout.browser
+, _c = $.layout.config
+
+ // local aliases to utlity methods
+, cssW = $.layout.cssWidth
+, cssH = $.layout.cssHeight
+, elDims = $.layout.getElementDimensions
+, styles = $.layout.getElementStyles
+, evtObj = $.layout.getEventObject
+, evtPane = $.layout.parsePaneName
+
+/**
+ * options - populated by initOptions()
+ */
+, options = $.extend(true, {}, $.layout.defaults)
+, effects = options.effects = $.extend(true, {}, $.layout.effects)
+
+/**
+ * layout-state object
+ */
+, state = {
+ // generate unique ID to use for event.namespace so can unbind only events added by 'this layout'
+ id: "layout"+ $.now() // code uses alias: sID
+ , initialized: false
+ , paneResizing: false
+ , panesSliding: {}
+ , container: { // list all keys referenced in code to avoid compiler error msgs
+ innerWidth: 0
+ , innerHeight: 0
+ , outerWidth: 0
+ , outerHeight: 0
+ , layoutWidth: 0
+ , layoutHeight: 0
+ }
+ , north: { childIdx: 0 }
+ , south: { childIdx: 0 }
+ , east: { childIdx: 0 }
+ , west: { childIdx: 0 }
+ , center: { childIdx: 0 }
+ }
+
+/**
+ * parent/child-layout pointers
+ */
+//, hasParentLayout = false - exists ONLY inside Instance so can be set externally
+, children = {
+ north: null
+ , south: null
+ , east: null
+ , west: null
+ , center: null
+ }
+
+/*
+ * ###########################
+ * INTERNAL HELPER FUNCTIONS
+ * ###########################
+ */
+
+ /**
+ * Manages all internal timers
+ */
+, timer = {
+ data: {}
+ , set: function (s, fn, ms) { timer.clear(s); timer.data[s] = setTimeout(fn, ms); }
+ , clear: function (s) { var t=timer.data; if (t[s]) {clearTimeout(t[s]); delete t[s];} }
+ }
+
+ /**
+ * Alert or console.log a message - IF option is enabled.
+ *
+ * @param {(string|!Object)} msg Message (or debug-data) to display
+ * @param {boolean=} [popup=false] True by default, means 'alert', false means use console.log
+ * @param {boolean=} [debug=false] True means is a widget debugging message
+ */
+, _log = function (msg, popup, debug) {
+ var o = options;
+ if ((o.showErrorMessages && !debug) || (debug && o.showDebugMessages))
+ $.layout.msg( o.name +' / '+ msg, (popup !== false) );
+ return false;
+ }
+
+ /**
+ * Executes a Callback function after a trigger event, like resize, open or close
+ *
+ * @param {string} evtName Name of the layout callback, eg "onresize_start"
+ * @param {(string|boolean)=} [pane=""] This is passed only so we can pass the 'pane object' to the callback
+ * @param {(string|boolean)=} [skipBoundEvents=false] True = do not run events bound to the elements - only the callbacks set in options
+ */
+, _runCallbacks = function (evtName, pane, skipBoundEvents) {
+ var hasPane = pane && isStr(pane)
+ , s = hasPane ? state[pane] : state
+ , o = hasPane ? options[pane] : options
+ , lName = options.name
+ // names like onopen and onopen_end separate are interchangeable in options...
+ , lng = evtName + (evtName.match(/_/) ? "" : "_end")
+ , shrt = lng.match(/_end$/) ? lng.substr(0, lng.length - 4) : ""
+ , fn = o[lng] || o[shrt]
+ , retVal = "NC" // NC = No Callback
+ , args = []
+ , $P = hasPane ? $Ps[pane] : 0
+ ;
+ if (hasPane && !$P) // a pane is specified, but does not exist!
+ return retVal;
+ if ( !hasPane && $.type(pane) === "boolean" ) {
+ skipBoundEvents = pane; // allow pane param to be skipped for Layout callback
+ pane = "";
+ }
+
+ // first trigger the callback set in the options
+ if (fn) {
+ try {
+ // convert function name (string) to function object
+ if (isStr( fn )) {
+ if (fn.match(/,/)) {
+ // function name cannot contain a comma,
+ // so must be a function name AND a parameter to pass
+ args = fn.split(",")
+ , fn = eval(args[0]);
+ }
+ else // just the name of an external function?
+ fn = eval(fn);
+ }
+ // execute the callback, if exists
+ if ($.isFunction( fn )) {
+ if (args.length)
+ retVal = g(fn)(args[1]); // pass the argument parsed from 'list'
+ else if ( hasPane )
+ // pass data: pane-name, pane-element, pane-state, pane-options, and layout-name
+ retVal = g(fn)( pane, $Ps[pane], s, o, lName );
+ else // must be a layout/container callback - pass suitable info
+ retVal = g(fn)( Instance, s, o, lName );
+ }
+ }
+ catch (ex) {
+ _log( options.errors.callbackError.replace(/EVENT/, $.trim((pane || "") +" "+ lng)), false );
+ if ($.type(ex) === "string" && string.length)
+ _log("Exception: "+ ex, false );
+ }
+ }
+
+ // trigger additional events bound directly to the pane
+ if (!skipBoundEvents && retVal !== false) {
+ if ( hasPane ) { // PANE events can be bound to each pane-elements
+ o = options[pane];
+ s = state[pane];
+ $P.triggerHandler("layoutpane"+ lng, [ pane, $P, s, o, lName ]);
+ if (shrt)
+ $P.triggerHandler("layoutpane"+ shrt, [ pane, $P, s, o, lName ]);
+ }
+ else { // LAYOUT events can be bound to the container-element
+ $N.triggerHandler("layout"+ lng, [ Instance, s, o, lName ]);
+ if (shrt)
+ $N.triggerHandler("layout"+ shrt, [ Instance, s, o, lName ]);
+ }
+ }
+
+ // ALWAYS resizeChildren after an onresize_end event - even during initialization
+ // IGNORE onsizecontent_end event because causes child-layouts to resize TWICE
+ if (hasPane && evtName === "onresize_end") // BAD: || evtName === "onsizecontent_end"
+ resizeChildren(pane+"", true); // compiler hack -force string
+
+ return retVal;
+
+ function g (f) { return f; }; // compiler hack
+ }
+
+
+ /**
+ * cure iframe display issues in IE & other browsers
+ */
+, _fixIframe = function (pane) {
+ if (browser.mozilla) return; // skip FireFox - it auto-refreshes iframes onShow
+ var $P = $Ps[pane];
+ // if the 'pane' is an iframe, do it
+ if (state[pane].tagName === "IFRAME")
+ $P.css(_c.hidden).css(_c.visible);
+ else // ditto for any iframes INSIDE the pane
+ $P.find('IFRAME').css(_c.hidden).css(_c.visible);
+ }
+
+ /**
+ * @param {string} pane Can accept ONLY a 'pane' (east, west, etc)
+ * @param {number=} outerSize (optional) Can pass a width, allowing calculations BEFORE element is resized
+ * @return {number} Returns the innerHeight/Width of el by subtracting padding and borders
+ */
+, cssSize = function (pane, outerSize) {
+ var fn = _c[pane].dir=="horz" ? cssH : cssW;
+ return fn($Ps[pane], outerSize);
+ }
+
+ /**
+ * @param {string} pane Can accept ONLY a 'pane' (east, west, etc)
+ * @return {Object} Returns hash of minWidth & minHeight
+ */
+, cssMinDims = function (pane) {
+ // minWidth/Height means CSS width/height = 1px
+ var $P = $Ps[pane]
+ , dir = _c[pane].dir
+ , d = {
+ minWidth: 1001 - cssW($P, 1000)
+ , minHeight: 1001 - cssH($P, 1000)
+ }
+ ;
+ if (dir === "horz") d.minSize = d.minHeight;
+ if (dir === "vert") d.minSize = d.minWidth;
+ return d;
+ }
+
+ // TODO: see if these methods can be made more useful...
+ // TODO: *maybe* return cssW/H from these so caller can use this info
+
+ /**
+ * @param {(string|!Object)} el
+ * @param {number=} outerWidth
+ * @param {boolean=} [autoHide=false]
+ */
+, setOuterWidth = function (el, outerWidth, autoHide) {
+ var $E = el, w;
+ if (isStr(el)) $E = $Ps[el]; // west
+ else if (!el.jquery) $E = $(el);
+ w = cssW($E, outerWidth);
+ $E.css({ width: w });
+ if (w > 0) {
+ if (autoHide && $E.data('autoHidden') && $E.innerHeight() > 0) {
+ $E.show().data('autoHidden', false);
+ if (!browser.mozilla) // FireFox refreshes iframes - IE does not
+ // make hidden, then visible to 'refresh' display after animation
+ $E.css(_c.hidden).css(_c.visible);
+ }
+ }
+ else if (autoHide && !$E.data('autoHidden'))
+ $E.hide().data('autoHidden', true);
+ }
+
+ /**
+ * @param {(string|!Object)} el
+ * @param {number=} outerHeight
+ * @param {boolean=} [autoHide=false]
+ */
+, setOuterHeight = function (el, outerHeight, autoHide) {
+ var $E = el, h;
+ if (isStr(el)) $E = $Ps[el]; // west
+ else if (!el.jquery) $E = $(el);
+ h = cssH($E, outerHeight);
+ $E.css({ height: h, visibility: "visible" }); // may have been 'hidden' by sizeContent
+ if (h > 0 && $E.innerWidth() > 0) {
+ if (autoHide && $E.data('autoHidden')) {
+ $E.show().data('autoHidden', false);
+ if (!browser.mozilla) // FireFox refreshes iframes - IE does not
+ $E.css(_c.hidden).css(_c.visible);
+ }
+ }
+ else if (autoHide && !$E.data('autoHidden'))
+ $E.hide().data('autoHidden', true);
+ }
+
+
+ /**
+ * Converts any 'size' params to a pixel/integer size, if not already
+ * If 'auto' or a decimal/percentage is passed as 'size', a pixel-size is calculated
+ *
+ /**
+ * @param {string} pane
+ * @param {(string|number)=} size
+ * @param {string=} [dir]
+ * @return {number}
+ */
+, _parseSize = function (pane, size, dir) {
+ if (!dir) dir = _c[pane].dir;
+
+ if (isStr(size) && size.match(/%/))
+ size = (size === '100%') ? -1 : parseInt(size, 10) / 100; // convert % to decimal
+
+ if (size === 0)
+ return 0;
+ else if (size >= 1)
+ return parseInt(size, 10);
+
+ var o = options, avail = 0;
+ if (dir=="horz") // north or south or center.minHeight
+ avail = sC.innerHeight - ($Ps.north ? o.north.spacing_open : 0) - ($Ps.south ? o.south.spacing_open : 0);
+ else if (dir=="vert") // east or west or center.minWidth
+ avail = sC.innerWidth - ($Ps.west ? o.west.spacing_open : 0) - ($Ps.east ? o.east.spacing_open : 0);
+
+ if (size === -1) // -1 == 100%
+ return avail;
+ else if (size > 0) // percentage, eg: .25
+ return round(avail * size);
+ else if (pane=="center")
+ return 0;
+ else { // size < 0 || size=='auto' || size==Missing || size==Invalid
+ // auto-size the pane
+ var dim = (dir === "horz" ? "height" : "width")
+ , $P = $Ps[pane]
+ , $C = dim === 'height' ? $Cs[pane] : false
+ , vis = $.layout.showInvisibly($P) // show pane invisibly if hidden
+ , szP = $P.css(dim) // SAVE current pane size
+ , szC = $C ? $C.css(dim) : 0 // SAVE current content size
+ ;
+ $P.css(dim, "auto");
+ if ($C) $C.css(dim, "auto");
+ size = (dim === "height") ? $P.outerHeight() : $P.outerWidth(); // MEASURE
+ $P.css(dim, szP).css(vis); // RESET size & visibility
+ if ($C) $C.css(dim, szC);
+ return size;
+ }
+ }
+
+ /**
+ * Calculates current 'size' (outer-width or outer-height) of a border-pane - optionally with 'pane-spacing' added
+ *
+ * @param {(string|!Object)} pane
+ * @param {boolean=} [inclSpace=false]
+ * @return {number} Returns EITHER Width for east/west panes OR Height for north/south panes
+ */
+, getPaneSize = function (pane, inclSpace) {
+ var
+ $P = $Ps[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , oSp = (inclSpace ? o.spacing_open : 0)
+ , cSp = (inclSpace ? o.spacing_closed : 0)
+ ;
+ if (!$P || s.isHidden)
+ return 0;
+ else if (s.isClosed || (s.isSliding && inclSpace))
+ return cSp;
+ else if (_c[pane].dir === "horz")
+ return $P.outerHeight() + oSp;
+ else // dir === "vert"
+ return $P.outerWidth() + oSp;
+ }
+
+ /**
+ * Calculate min/max pane dimensions and limits for resizing
+ *
+ * @param {string} pane
+ * @param {boolean=} [slide=false]
+ */
+, setSizeLimits = function (pane, slide) {
+ if (!isInitialized()) return;
+ var
+ o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , dir = c.dir
+ , type = c.sizeType.toLowerCase()
+ , isSliding = (slide != undefined ? slide : s.isSliding) // only open() passes 'slide' param
+ , $P = $Ps[pane]
+ , paneSpacing = o.spacing_open
+ // measure the pane on the *opposite side* from this pane
+ , altPane = _c.oppositeEdge[pane]
+ , altS = state[altPane]
+ , $altP = $Ps[altPane]
+ , altPaneSize = (!$altP || altS.isVisible===false || altS.isSliding ? 0 : (dir=="horz" ? $altP.outerHeight() : $altP.outerWidth()))
+ , altPaneSpacing = ((!$altP || altS.isHidden ? 0 : options[altPane][ altS.isClosed !== false ? "spacing_closed" : "spacing_open" ]) || 0)
+ // limitSize prevents this pane from 'overlapping' opposite pane
+ , containerSize = (dir=="horz" ? sC.innerHeight : sC.innerWidth)
+ , minCenterDims = cssMinDims("center")
+ , minCenterSize = dir=="horz" ? max(options.center.minHeight, minCenterDims.minHeight) : max(options.center.minWidth, minCenterDims.minWidth)
+ // if pane is 'sliding', then ignore center and alt-pane sizes - because 'overlays' them
+ , limitSize = (containerSize - paneSpacing - (isSliding ? 0 : (_parseSize("center", minCenterSize, dir) + altPaneSize + altPaneSpacing)))
+ , minSize = s.minSize = max( _parseSize(pane, o.minSize), cssMinDims(pane).minSize )
+ , maxSize = s.maxSize = min( (o.maxSize ? _parseSize(pane, o.maxSize) : 100000), limitSize )
+ , r = s.resizerPosition = {} // used to set resizing limits
+ , top = sC.inset.top
+ , left = sC.inset.left
+ , W = sC.innerWidth
+ , H = sC.innerHeight
+ , rW = o.spacing_open // subtract resizer-width to get top/left position for south/east
+ ;
+ switch (pane) {
+ case "north": r.min = top + minSize;
+ r.max = top + maxSize;
+ break;
+ case "west": r.min = left + minSize;
+ r.max = left + maxSize;
+ break;
+ case "south": r.min = top + H - maxSize - rW;
+ r.max = top + H - minSize - rW;
+ break;
+ case "east": r.min = left + W - maxSize - rW;
+ r.max = left + W - minSize - rW;
+ break;
+ };
+ }
+
+ /**
+ * Returns data for setting the size/position of center pane. Also used to set Height for east/west panes
+ *
+ * @return JSON Returns a hash of all dimensions: top, bottom, left, right, (outer) width and (outer) height
+ */
+, calcNewCenterPaneDims = function () {
+ var d = {
+ top: getPaneSize("north", true) // true = include 'spacing' value for pane
+ , bottom: getPaneSize("south", true)
+ , left: getPaneSize("west", true)
+ , right: getPaneSize("east", true)
+ , width: 0
+ , height: 0
+ };
+
+ // NOTE: sC = state.container
+ // calc center-pane outer dimensions
+ d.width = sC.innerWidth - d.left - d.right; // outerWidth
+ d.height = sC.innerHeight - d.bottom - d.top; // outerHeight
+ // add the 'container border/padding' to get final positions relative to the container
+ d.top += sC.inset.top;
+ d.bottom += sC.inset.bottom;
+ d.left += sC.inset.left;
+ d.right += sC.inset.right;
+
+ return d;
+ }
+
+
+ /**
+ * @param {!Object} el
+ * @param {boolean=} [allStates=false]
+ */
+, getHoverClasses = function (el, allStates) {
+ var
+ $El = $(el)
+ , type = $El.data("layoutRole")
+ , pane = $El.data("layoutEdge")
+ , o = options[pane]
+ , root = o[type +"Class"]
+ , _pane = "-"+ pane // eg: "-west"
+ , _open = "-open"
+ , _closed = "-closed"
+ , _slide = "-sliding"
+ , _hover = "-hover " // NOTE the trailing space
+ , _state = $El.hasClass(root+_closed) ? _closed : _open
+ , _alt = _state === _closed ? _open : _closed
+ , classes = (root+_hover) + (root+_pane+_hover) + (root+_state+_hover) + (root+_pane+_state+_hover)
+ ;
+ if (allStates) // when 'removing' classes, also remove alternate-state classes
+ classes += (root+_alt+_hover) + (root+_pane+_alt+_hover);
+
+ if (type=="resizer" && $El.hasClass(root+_slide))
+ classes += (root+_slide+_hover) + (root+_pane+_slide+_hover);
+
+ return $.trim(classes);
+ }
+, addHover = function (evt, el) {
+ var $E = $(el || this);
+ if (evt && $E.data("layoutRole") === "toggler")
+ evt.stopPropagation(); // prevent triggering 'slide' on Resizer-bar
+ $E.addClass( getHoverClasses($E) );
+ }
+, removeHover = function (evt, el) {
+ var $E = $(el || this);
+ $E.removeClass( getHoverClasses($E, true) );
+ }
+
+, onResizerEnter = function (evt) { // ALSO called by toggler.mouseenter
+ var pane = $(this).data("layoutEdge")
+ , s = state[pane]
+ , $d = $(document)
+ ;
+ // ignore closed-panes and mouse moving back & forth over resizer!
+ // also ignore if ANY pane is currently resizing
+ if ( s.isResizing || state.paneResizing ) return;
+
+ if (options.maskPanesEarly)
+ showMasks( pane, { resizing: true });
+ }
+, onResizerLeave = function (evt, el) {
+ var e = el || this // el is only passed when called by the timer
+ , pane = $(e).data("layoutEdge")
+ , name = pane +"ResizerLeave"
+ , $d = $(document)
+ ;
+ timer.clear(pane+"_openSlider"); // cancel slideOpen timer, if set
+ timer.clear(name); // cancel enableSelection timer - may re/set below
+ // this method calls itself on a timer because it needs to allow
+ // enough time for dragging to kick-in and set the isResizing flag
+ // dragging has a 100ms delay set, so this delay must be >100
+ if (!el) // 1st call - mouseleave event
+ timer.set(name, function(){ onResizerLeave(evt, e); }, 200);
+ // if user is resizing, dragStop will reset everything, so skip it here
+ else if (options.maskPanesEarly && !state.paneResizing) // 2nd call - by timer
+ hideMasks();
+ }
+
+/*
+ * ###########################
+ * INITIALIZATION METHODS
+ * ###########################
+ */
+
+ /**
+ * Initialize the layout - called automatically whenever an instance of layout is created
+ *
+ * @see none - triggered onInit
+ * @return mixed true = fully initialized | false = panes not initialized (yet) | 'cancel' = abort
+ */
+, _create = function () {
+ // initialize config/options
+ initOptions();
+ var o = options
+ , s = state;
+
+ // TEMP state so isInitialized returns true during init process
+ s.creatingLayout = true;
+
+ // init plugins for this layout, if there are any (eg: stateManagement)
+ runPluginCallbacks( Instance, $.layout.onCreate );
+
+ // options & state have been initialized, so now run beforeLoad callback
+ // onload will CANCEL layout creation if it returns false
+ if (false === _runCallbacks("onload_start"))
+ return 'cancel';
+
+ // initialize the container element
+ _initContainer();
+
+ // bind hotkey function - keyDown - if required
+ initHotkeys();
+
+ // bind window.onunload
+ $(window).bind("unload."+ sID, unload);
+
+ // init plugins for this layout, if there are any (eg: customButtons)
+ runPluginCallbacks( Instance, $.layout.onLoad );
+
+ // if layout elements are hidden, then layout WILL NOT complete initialization!
+ // initLayoutElements will set initialized=true and run the onload callback IF successful
+ if (o.initPanes) _initLayoutElements();
+
+ delete s.creatingLayout;
+
+ return state.initialized;
+ }
+
+ /**
+ * Initialize the layout IF not already
+ *
+ * @see All methods in Instance run this test
+ * @return boolean true = layoutElements have been initialized | false = panes are not initialized (yet)
+ */
+, isInitialized = function () {
+ if (state.initialized || state.creatingLayout) return true; // already initialized
+ else return _initLayoutElements(); // try to init panes NOW
+ }
+
+ /**
+ * Initialize the layout - called automatically whenever an instance of layout is created
+ *
+ * @see _create() & isInitialized
+ * @param {boolean=} [retry=false] // indicates this is a 2nd try
+ * @return An object pointer to the instance created
+ */
+, _initLayoutElements = function (retry) {
+ // initialize config/options
+ var o = options;
+ // CANNOT init panes inside a hidden container!
+ if (!$N.is(":visible")) {
+ // handle Chrome bug where popup window 'has no height'
+ // if layout is BODY element, try again in 50ms
+ // SEE: http://layout.jquery-dev.com/samples/test_popup_window.html
+ if ( !retry && browser.webkit && $N[0].tagName === "BODY" )
+ setTimeout(function(){ _initLayoutElements(true); }, 50);
+ return false;
+ }
+
+ // a center pane is required, so make sure it exists
+ if (!getPane("center").length) {
+ return _log( o.errors.centerPaneMissing );
+ }
+
+ // TEMP state so isInitialized returns true during init process
+ state.creatingLayout = true;
+
+ // update Container dims
+ $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values
+
+ // initialize all layout elements
+ initPanes(); // size & position panes - calls initHandles() - which calls initResizable()
+
+ if (o.scrollToBookmarkOnLoad) {
+ var l = self.location;
+ if (l.hash) l.replace( l.hash ); // scrollTo Bookmark
+ }
+
+ // check to see if this layout 'nested' inside a pane
+ if (Instance.hasParentLayout)
+ o.resizeWithWindow = false;
+ // bind resizeAll() for 'this layout instance' to window.resize event
+ else if (o.resizeWithWindow)
+ $(window).bind("resize."+ sID, windowResize);
+
+ delete state.creatingLayout;
+ state.initialized = true;
+
+ // init plugins for this layout, if there are any
+ runPluginCallbacks( Instance, $.layout.onReady );
+
+ // now run the onload callback, if exists
+ _runCallbacks("onload_end");
+
+ return true; // elements initialized successfully
+ }
+
+ /**
+ * Initialize nested layouts for a specific pane - can optionally pass layout-options
+ *
+ * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
+ * @param {Object=} [opts] Layout-options - if passed, will OVERRRIDE options[pane].children
+ * @return An object pointer to the layout instance created - or null
+ */
+, createChildren = function (evt_or_pane, opts) {
+ var pane = evtPane.call(this, evt_or_pane)
+ , $P = $Ps[pane]
+ ;
+ if (!$P) return;
+ var $C = $Cs[pane]
+ , s = state[pane]
+ , o = options[pane]
+ , sm = options.stateManagement || {}
+ , cos = opts ? (o.children = opts) : o.children
+ ;
+ if ( $.isPlainObject( cos ) )
+ cos = [ cos ]; // convert a hash to a 1-elem array
+ else if (!cos || !$.isArray( cos ))
+ return;
+
+ $.each( cos, function (idx, co) {
+ if ( !$.isPlainObject( co ) ) return;
+
+ // determine which element is supposed to be the 'child container'
+ // if pane has a 'containerSelector' OR a 'content-div', use those instead of the pane
+ var $containers = co.containerSelector ? $P.find( co.containerSelector ) : ($C || $P);
+
+ $containers.each(function(){
+ var $cont = $(this)
+ , child = $cont.data("layout") // see if a child-layout ALREADY exists on this element
+ ;
+ // if no layout exists, but children are set, try to create the layout now
+ if (!child) {
+ // TODO: see about moving this to the stateManagement plugin, as a method
+ // set a unique child-instance key for this layout, if not already set
+ setInstanceKey({ container: $cont, options: co }, s );
+ // If THIS layout has a hash in stateManagement.autoLoad,
+ // then see if it also contains state-data for this child-layout
+ // If so, copy the stateData to child.options.stateManagement.autoLoad
+ if ( sm.includeChildren && state.stateData[pane] ) {
+ // THIS layout's state was cached when its state was loaded
+ var paneChildren = state.stateData[pane].children || {}
+ , childState = paneChildren[ co.instanceKey ]
+ , co_sm = co.stateManagement || (co.stateManagement = { autoLoad: true })
+ ;
+ // COPY the stateData into the autoLoad key
+ if ( co_sm.autoLoad === true && childState ) {
+ co_sm.autoSave = false; // disable autoSave because saving handled by parent-layout
+ co_sm.includeChildren = true; // cascade option - FOR NOW
+ co_sm.autoLoad = $.extend(true, {}, childState); // COPY the state-hash
+ }
+ }
+
+ // create the layout
+ child = $cont.layout( co );
+
+ // if successful, update data
+ if (child) {
+ // add the child and update all layout-pointers
+ // MAY have already been done by child-layout calling parent.refreshChildren()
+ refreshChildren( pane, child );
+ }
+ }
+ });
+ });
+ }
+
+, setInstanceKey = function (child, parentPaneState) {
+ // create a named key for use in state and instance branches
+ var $c = child.container
+ , o = child.options
+ , sm = o.stateManagement
+ , key = o.instanceKey || $c.data("layoutInstanceKey")
+ ;
+ if (!key) key = (sm && sm.cookie ? sm.cookie.name : '') || o.name; // look for a name/key
+ if (!key) key = "layout"+ (++parentPaneState.childIdx); // if no name/key found, generate one
+ else key = key.replace(/[^\w-]/gi, '_').replace(/_{2,}/g, '_'); // ensure is valid as a hash key
+ o.instanceKey = key;
+ $c.data("layoutInstanceKey", key); // useful if layout is destroyed and then recreated
+ return key;
+ }
+
+ /**
+ * @param {string} pane The pane being opened, ie: north, south, east, or west
+ * @param {Object=} newChild New child-layout Instance to add to this pane
+ */
+, refreshChildren = function (pane, newChild) {
+ var $P = $Ps[pane]
+ , pC = children[pane]
+ , s = state[pane]
+ , o
+ ;
+ // check for destroy()ed layouts and update the child pointers & arrays
+ if ($.isPlainObject( pC )) {
+ $.each( pC, function (key, child) {
+ if (child.destroyed) delete pC[key]
+ });
+ // if no more children, remove the children hash
+ if ($.isEmptyObject( pC ))
+ pC = children[pane] = null; // clear children hash
+ }
+
+ // see if there is a directly-nested layout inside this pane
+ // if there is, then there can be only ONE child-layout, so check that...
+ if (!newChild && !pC) {
+ newChild = $P.data("layout");
+ }
+
+ // if a newChild instance was passed, add it to children[pane]
+ if (newChild) {
+ // update child.state
+ newChild.hasParentLayout = true; // set parent-flag in child
+ // instanceKey is a key-name used in both state and children
+ o = newChild.options;
+ // set a unique child-instance key for this layout, if not already set
+ setInstanceKey( newChild, s );
+ // add pointer to pane.children hash
+ if (!pC) pC = children[pane] = {}; // create an empty children hash
+ pC[ o.instanceKey ] = newChild.container.data("layout"); // add childLayout instance
+ }
+
+ // ALWAYS refresh the pane.children alias, even if null
+ Instance[pane].children = children[pane];
+
+ // if newChild was NOT passed - see if there is a child layout NOW
+ if (!newChild) {
+ createChildren(pane); // MAY create a child and re-call this method
+ }
+ }
+
+, windowResize = function () {
+ var o = options
+ , delay = Number(o.resizeWithWindowDelay);
+ if (delay < 10) delay = 100; // MUST have a delay!
+ // resizing uses a delay-loop because the resize event fires repeatly - except in FF, but delay anyway
+ timer.clear("winResize"); // if already running
+ timer.set("winResize", function(){
+ timer.clear("winResize");
+ timer.clear("winResizeRepeater");
+ var dims = elDims( $N, o.inset );
+ // only trigger resizeAll() if container has changed size
+ if (dims.innerWidth !== sC.innerWidth || dims.innerHeight !== sC.innerHeight)
+ resizeAll();
+ }, delay);
+ // ALSO set fixed-delay timer, if not already running
+ if (!timer.data["winResizeRepeater"]) setWindowResizeRepeater();
+ }
+
+, setWindowResizeRepeater = function () {
+ var delay = Number(options.resizeWithWindowMaxDelay);
+ if (delay > 0)
+ timer.set("winResizeRepeater", function(){ setWindowResizeRepeater(); resizeAll(); }, delay);
+ }
+
+, unload = function () {
+ var o = options;
+
+ _runCallbacks("onunload_start");
+
+ // trigger plugin callabacks for this layout (eg: stateManagement)
+ runPluginCallbacks( Instance, $.layout.onUnload );
+
+ _runCallbacks("onunload_end");
+ }
+
+ /**
+ * Validate and initialize container CSS and events
+ *
+ * @see _create()
+ */
+, _initContainer = function () {
+ var
+ N = $N[0]
+ , $H = $("html")
+ , tag = sC.tagName = N.tagName
+ , id = sC.id = N.id
+ , cls = sC.className = N.className
+ , o = options
+ , name = o.name
+ , props = "position,margin,padding,border"
+ , css = "layoutCSS"
+ , CSS = {}
+ , hid = "hidden" // used A LOT!
+ // see if this container is a 'pane' inside an outer-layout
+ , parent = $N.data("parentLayout") // parent-layout Instance
+ , pane = $N.data("layoutEdge") // pane-name in parent-layout
+ , isChild = parent && pane
+ , num = $.layout.cssNum
+ , $parent, n
+ ;
+ // sC = state.container
+ sC.selector = $N.selector.split(".slice")[0];
+ sC.ref = (o.name ? o.name +' layout / ' : '') + tag + (id ? "#"+id : cls ? '.['+cls+']' : ''); // used in messages
+ sC.isBody = (tag === "BODY");
+
+ // try to find a parent-layout
+ if (!isChild && !sC.isBody) {
+ $parent = $N.closest("."+ $.layout.defaults.panes.paneClass);
+ parent = $parent.data("parentLayout");
+ pane = $parent.data("layoutEdge");
+ isChild = parent && pane;
+ }
+
+ $N .data({
+ layout: Instance
+ , layoutContainer: sID // FLAG to indicate this is a layout-container - contains unique internal ID
+ })
+ .addClass(o.containerClass)
+ ;
+ var layoutMethods = {
+ destroy: ''
+ , initPanes: ''
+ , resizeAll: 'resizeAll'
+ , resize: 'resizeAll'
+ };
+ // loop hash and bind all methods - include layoutID namespacing
+ for (name in layoutMethods) {
+ $N.bind("layout"+ name.toLowerCase() +"."+ sID, Instance[ layoutMethods[name] || name ]);
+ }
+
+ // if this container is another layout's 'pane', then set child/parent pointers
+ if (isChild) {
+ // update parent flag
+ Instance.hasParentLayout = true;
+ // set pointers to THIS child-layout (Instance) in parent-layout
+ parent.refreshChildren( pane, Instance );
+ }
+
+ // SAVE original container CSS for use in destroy()
+ if (!$N.data(css)) {
+ // handle props like overflow different for BODY & HTML - has 'system default' values
+ if (sC.isBody) {
+ // SAVE <BODY> CSS
+ $N.data(css, $.extend( styles($N, props), {
+ height: $N.css("height")
+ , overflow: $N.css("overflow")
+ , overflowX: $N.css("overflowX")
+ , overflowY: $N.css("overflowY")
+ }));
+ // ALSO SAVE <HTML> CSS
+ $H.data(css, $.extend( styles($H, 'padding'), {
+ height: "auto" // FF would return a fixed px-size!
+ , overflow: $H.css("overflow")
+ , overflowX: $H.css("overflowX")
+ , overflowY: $H.css("overflowY")
+ }));
+ }
+ else // handle props normally for non-body elements
+ $N.data(css, styles($N, props+",top,bottom,left,right,width,height,overflow,overflowX,overflowY") );
+ }
+
+ try {
+ // common container CSS
+ CSS = {
+ overflow: hid
+ , overflowX: hid
+ , overflowY: hid
+ };
+ $N.css( CSS );
+
+ if (o.inset && !$.isPlainObject(o.inset)) {
+ // can specify a single number for equal outset all-around
+ n = parseInt(o.inset, 10) || 0
+ o.inset = {
+ top: n
+ , bottom: n
+ , left: n
+ , right: n
+ };
+ }
+
+ // format html & body if this is a full page layout
+ if (sC.isBody) {
+ // if HTML has padding, use this as an outer-spacing around BODY
+ if (!o.outset) {
+ // use padding from parent-elem (HTML) as outset
+ o.outset = {
+ top: num($H, "paddingTop")
+ , bottom: num($H, "paddingBottom")
+ , left: num($H, "paddingLeft")
+ , right: num($H, "paddingRight")
+ };
+ }
+ else if (!$.isPlainObject(o.outset)) {
+ // can specify a single number for equal outset all-around
+ n = parseInt(o.outset, 10) || 0
+ o.outset = {
+ top: n
+ , bottom: n
+ , left: n
+ , right: n
+ };
+ }
+ // HTML
+ $H.css( CSS ).css({
+ height: "100%"
+ , border: "none" // no border or padding allowed when using height = 100%
+ , padding: 0 // ditto
+ , margin: 0
+ });
+ // BODY
+ if (browser.isIE6) {
+ // IE6 CANNOT use the trick of setting absolute positioning on all 4 sides - must have 'height'
+ $N.css({
+ width: "100%"
+ , height: "100%"
+ , border: "none" // no border or padding allowed when using height = 100%
+ , padding: 0 // ditto
+ , margin: 0
+ , position: "relative"
+ });
+ // convert body padding to an inset option - the border cannot be measured in IE6!
+ if (!o.inset) o.inset = elDims( $N ).inset;
+ }
+ else { // use absolute positioning for BODY to allow borders & padding without overflow
+ $N.css({
+ width: "auto"
+ , height: "auto"
+ , margin: 0
+ , position: "absolute" // allows for border and padding on BODY
+ });
+ // apply edge-positioning created above
+ $N.css( o.outset );
+ }
+ // set current layout-container dimensions
+ $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values
+ }
+ else {
+ // container MUST have 'position'
+ var p = $N.css("position");
+ if (!p || !p.match(/(fixed|absolute|relative)/))
+ $N.css("position","relative");
+
+ // set current layout-container dimensions
+ if ( $N.is(":visible") ) {
+ $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT change insetX (padding) values
+ if (sC.innerHeight < 1) // container has no 'height' - warn developer
+ _log( o.errors.noContainerHeight.replace(/CONTAINER/, sC.ref) );
+ }
+ }
+
+ // if container has min-width/height, then enable scrollbar(s)
+ if ( num($N, "minWidth") ) $N.parent().css("overflowX","auto");
+ if ( num($N, "minHeight") ) $N.parent().css("overflowY","auto");
+
+ } catch (ex) {}
+ }
+
+ /**
+ * Bind layout hotkeys - if options enabled
+ *
+ * @see _create() and addPane()
+ * @param {string=} [panes=""] The edge(s) to process
+ */
+, initHotkeys = function (panes) {
+ panes = panes ? panes.split(",") : _c.borderPanes;
+ // bind keyDown to capture hotkeys, if option enabled for ANY pane
+ $.each(panes, function (i, pane) {
+ var o = options[pane];
+ if (o.enableCursorHotkey || o.customHotkey) {
+ $(document).bind("keydown."+ sID, keyDown); // only need to bind this ONCE
+ return false; // BREAK - binding was done
+ }
+ });
+ }
+
+ /**
+ * Build final OPTIONS data
+ *
+ * @see _create()
+ */
+, initOptions = function () {
+ var data, d, pane, key, val, i, c, o;
+
+ // reprocess user's layout-options to have correct options sub-key structure
+ opts = $.layout.transformData( opts, true ); // panes = default subkey
+
+ // auto-rename old options for backward compatibility
+ opts = $.layout.backwardCompatibility.renameAllOptions( opts );
+
+ // if user-options has 'panes' key (pane-defaults), clean it...
+ if (!$.isEmptyObject(opts.panes)) {
+ // REMOVE any pane-defaults that MUST be set per-pane
+ data = $.layout.optionsMap.noDefault;
+ for (i=0, c=data.length; i<c; i++) {
+ key = data[i];
+ delete opts.panes[key]; // OK if does not exist
+ }
+ // REMOVE any layout-options specified under opts.panes
+ data = $.layout.optionsMap.layout;
+ for (i=0, c=data.length; i<c; i++) {
+ key = data[i];
+ delete opts.panes[key]; // OK if does not exist
+ }
+ }
+
+ // MOVE any NON-layout-options from opts-root to opts.panes
+ data = $.layout.optionsMap.layout;
+ var rootKeys = $.layout.config.optionRootKeys;
+ for (key in opts) {
+ val = opts[key];
+ if ($.inArray(key, rootKeys) < 0 && $.inArray(key, data) < 0) {
+ if (!opts.panes[key])
+ opts.panes[key] = $.isPlainObject(val) ? $.extend(true, {}, val) : val;
+ delete opts[key]
+ }
+ }
+
+ // START by updating ALL options from opts
+ $.extend(true, options, opts);
+
+ // CREATE final options (and config) for EACH pane
+ $.each(_c.allPanes, function (i, pane) {
+
+ // apply 'pane-defaults' to CONFIG.[PANE]
+ _c[pane] = $.extend(true, {}, _c.panes, _c[pane]);
+
+ d = options.panes;
+ o = options[pane];
+
+ // center-pane uses SOME keys in defaults.panes branch
+ if (pane === 'center') {
+ // ONLY copy keys from opts.panes listed in: $.layout.optionsMap.center
+ data = $.layout.optionsMap.center; // list of 'center-pane keys'
+ for (i=0, c=data.length; i<c; i++) { // loop the list...
+ key = data[i];
+ // only need to use pane-default if pane-specific value not set
+ if (!opts.center[key] && (opts.panes[key] || !o[key]))
+ o[key] = d[key]; // pane-default
+ }
+ }
+ else {
+ // border-panes use ALL keys in defaults.panes branch
+ o = options[pane] = $.extend(true, {}, d, o); // re-apply pane-specific opts AFTER pane-defaults
+ createFxOptions( pane );
+ // ensure all border-pane-specific base-classes exist
+ if (!o.resizerClass) o.resizerClass = "ui-layout-resizer";
+ if (!o.togglerClass) o.togglerClass = "ui-layout-toggler";
+ }
+ // ensure we have base pane-class (ALL panes)
+ if (!o.paneClass) o.paneClass = "ui-layout-pane";
+ });
+
+ // update options.zIndexes if a zIndex-option specified
+ var zo = opts.zIndex
+ , z = options.zIndexes;
+ if (zo > 0) {
+ z.pane_normal = zo;
+ z.content_mask = max(zo+1, z.content_mask); // MIN = +1
+ z.resizer_normal = max(zo+2, z.resizer_normal); // MIN = +2
+ }
+
+ // DELETE 'panes' key now that we are done - values were copied to EACH pane
+ delete options.panes;
+
+
+ function createFxOptions ( pane ) {
+ var o = options[pane]
+ , d = options.panes;
+ // ensure fxSettings key to avoid errors
+ if (!o.fxSettings) o.fxSettings = {};
+ if (!d.fxSettings) d.fxSettings = {};
+
+ $.each(["_open","_close","_size"], function (i,n) {
+ var
+ sName = "fxName"+ n
+ , sSpeed = "fxSpeed"+ n
+ , sSettings = "fxSettings"+ n
+ // recalculate fxName according to specificity rules
+ , fxName = o[sName] =
+ o[sName] // options.west.fxName_open
+ || d[sName] // options.panes.fxName_open
+ || o.fxName // options.west.fxName
+ || d.fxName // options.panes.fxName
+ || "none" // MEANS $.layout.defaults.panes.fxName == "" || false || null || 0
+ , fxExists = $.effects && ($.effects[fxName] || ($.effects.effect && $.effects.effect[fxName]))
+ ;
+ // validate fxName to ensure is valid effect - MUST have effect-config data in options.effects
+ if (fxName === "none" || !options.effects[fxName] || !fxExists)
+ fxName = o[sName] = "none"; // effect not loaded OR unrecognized fxName
+
+ // set vars for effects subkeys to simplify logic
+ var fx = options.effects[fxName] || {} // effects.slide
+ , fx_all = fx.all || null // effects.slide.all
+ , fx_pane = fx[pane] || null // effects.slide.west
+ ;
+ // create fxSpeed[_open|_close|_size]
+ o[sSpeed] =
+ o[sSpeed] // options.west.fxSpeed_open
+ || d[sSpeed] // options.west.fxSpeed_open
+ || o.fxSpeed // options.west.fxSpeed
+ || d.fxSpeed // options.panes.fxSpeed
+ || null // DEFAULT - let fxSetting.duration control speed
+ ;
+ // create fxSettings[_open|_close|_size]
+ o[sSettings] = $.extend(
+ true
+ , {}
+ , fx_all // effects.slide.all
+ , fx_pane // effects.slide.west
+ , d.fxSettings // options.panes.fxSettings
+ , o.fxSettings // options.west.fxSettings
+ , d[sSettings] // options.panes.fxSettings_open
+ , o[sSettings] // options.west.fxSettings_open
+ );
+ });
+
+ // DONE creating action-specific-settings for this pane,
+ // so DELETE generic options - are no longer meaningful
+ delete o.fxName;
+ delete o.fxSpeed;
+ delete o.fxSettings;
+ }
+ }
+
+ /**
+ * Initialize module objects, styling, size and position for all panes
+ *
+ * @see _initElements()
+ * @param {string} pane The pane to process
+ */
+, getPane = function (pane) {
+ var sel = options[pane].paneSelector
+ if (sel.substr(0,1)==="#") // ID selector
+ // NOTE: elements selected 'by ID' DO NOT have to be 'children'
+ return $N.find(sel).eq(0);
+ else { // class or other selector
+ var $P = $N.children(sel).eq(0);
+ // look for the pane nested inside a 'form' element
+ return $P.length ? $P : $N.children("form:first").children(sel).eq(0);
+ }
+ }
+
+ /**
+ * @param {Object=} evt
+ */
+, initPanes = function (evt) {
+ // stopPropagation if called by trigger("layoutinitpanes") - use evtPane utility
+ evtPane(evt);
+
+ // NOTE: do north & south FIRST so we can measure their height - do center LAST
+ $.each(_c.allPanes, function (idx, pane) {
+ addPane( pane, true );
+ });
+
+ // init the pane-handles NOW in case we have to hide or close the pane below
+ initHandles();
+
+ // now that all panes have been initialized and initially-sized,
+ // make sure there is really enough space available for each pane
+ $.each(_c.borderPanes, function (i, pane) {
+ if ($Ps[pane] && state[pane].isVisible) { // pane is OPEN
+ setSizeLimits(pane);
+ makePaneFit(pane); // pane may be Closed, Hidden or Resized by makePaneFit()
+ }
+ });
+ // size center-pane AGAIN in case we 'closed' a border-pane in loop above
+ sizeMidPanes("center");
+
+ // Chrome/Webkit sometimes fires callbacks BEFORE it completes resizing!
+ // Before RC30.3, there was a 10ms delay here, but that caused layout
+ // to load asynchrously, which is BAD, so try skipping delay for now
+
+ // process pane contents and callbacks, and init/resize child-layout if exists
+ $.each(_c.allPanes, function (idx, pane) {
+ afterInitPane(pane);
+ });
+ }
+
+ /**
+ * Add a pane to the layout - subroutine of initPanes()
+ *
+ * @see initPanes()
+ * @param {string} pane The pane to process
+ * @param {boolean=} [force=false] Size content after init
+ */
+, addPane = function (pane, force) {
+ if ( !force && !isInitialized() ) return;
+ var
+ o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , dir = c.dir
+ , fx = s.fx
+ , spacing = o.spacing_open || 0
+ , isCenter = (pane === "center")
+ , CSS = {}
+ , $P = $Ps[pane]
+ , size, minSize, maxSize, child
+ ;
+ // if pane-pointer already exists, remove the old one first
+ if ($P)
+ removePane( pane, false, true, false );
+ else
+ $Cs[pane] = false; // init
+
+ $P = $Ps[pane] = getPane(pane);
+ if (!$P.length) {
+ $Ps[pane] = false; // logic
+ return;
+ }
+
+ // SAVE original Pane CSS
+ if (!$P.data("layoutCSS")) {
+ var props = "position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border";
+ $P.data("layoutCSS", styles($P, props));
+ }
+
+ // create alias for pane data in Instance - initHandles will add more
+ Instance[pane] = {
+ name: pane
+ , pane: $Ps[pane]
+ , content: $Cs[pane]
+ , options: options[pane]
+ , state: state[pane]
+ , children: children[pane]
+ };
+
+ // add classes, attributes & events
+ $P .data({
+ parentLayout: Instance // pointer to Layout Instance
+ , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
+ , layoutEdge: pane
+ , layoutRole: "pane"
+ })
+ .css(c.cssReq).css("zIndex", options.zIndexes.pane_normal)
+ .css(o.applyDemoStyles ? c.cssDemo : {}) // demo styles
+ .addClass( o.paneClass +" "+ o.paneClass+"-"+pane ) // default = "ui-layout-pane ui-layout-pane-west" - may be a dupe of 'paneSelector'
+ .bind("mouseenter."+ sID, addHover )
+ .bind("mouseleave."+ sID, removeHover )
+ ;
+ var paneMethods = {
+ hide: ''
+ , show: ''
+ , toggle: ''
+ , close: ''
+ , open: ''
+ , slideOpen: ''
+ , slideClose: ''
+ , slideToggle: ''
+ , size: 'sizePane'
+ , sizePane: 'sizePane'
+ , sizeContent: ''
+ , sizeHandles: ''
+ , enableClosable: ''
+ , disableClosable: ''
+ , enableSlideable: ''
+ , disableSlideable: ''
+ , enableResizable: ''
+ , disableResizable: ''
+ , swapPanes: 'swapPanes'
+ , swap: 'swapPanes'
+ , move: 'swapPanes'
+ , removePane: 'removePane'
+ , remove: 'removePane'
+ , createChildren: ''
+ , resizeChildren: ''
+ , resizeAll: 'resizeAll'
+ , resizeLayout: 'resizeAll'
+ }
+ , name;
+ // loop hash and bind all methods - include layoutID namespacing
+ for (name in paneMethods) {
+ $P.bind("layoutpane"+ name.toLowerCase() +"."+ sID, Instance[ paneMethods[name] || name ]);
+ }
+
+ // see if this pane has a 'scrolling-content element'
+ initContent(pane, false); // false = do NOT sizeContent() - called later
+
+ if (!isCenter) {
+ // call _parseSize AFTER applying pane classes & styles - but before making visible (if hidden)
+ // if o.size is auto or not valid, then MEASURE the pane and use that as its 'size'
+ size = s.size = _parseSize(pane, o.size);
+ minSize = _parseSize(pane,o.minSize) || 1;
+ maxSize = _parseSize(pane,o.maxSize) || 100000;
+ if (size > 0) size = max(min(size, maxSize), minSize);
+ s.autoResize = o.autoResize; // used with percentage sizes
+
+ // state for border-panes
+ s.isClosed = false; // true = pane is closed
+ s.isSliding = false; // true = pane is currently open by 'sliding' over adjacent panes
+ s.isResizing= false; // true = pane is in process of being resized
+ s.isHidden = false; // true = pane is hidden - no spacing, resizer or toggler is visible!
+
+ // array for 'pin buttons' whose classNames are auto-updated on pane-open/-close
+ if (!s.pins) s.pins = [];
+ }
+ // states common to ALL panes
+ s.tagName = $P[0].tagName;
+ s.edge = pane; // useful if pane is (or about to be) 'swapped' - easy find out where it is (or is going)
+ s.noRoom = false; // true = pane 'automatically' hidden due to insufficient room - will unhide automatically
+ s.isVisible = true; // false = pane is invisible - closed OR hidden - simplify logic
+
+ // init pane positioning
+ setPanePosition( pane );
+
+ // if pane is not visible,
+ if (dir === "horz") // north or south pane
+ CSS.height = cssH($P, size);
+ else if (dir === "vert") // east or west pane
+ CSS.width = cssW($P, size);
+ //else if (isCenter) {}
+
+ $P.css(CSS); // apply size -- top, bottom & height will be set by sizeMidPanes
+ if (dir != "horz") sizeMidPanes(pane, true); // true = skipCallback
+
+ // if manually adding a pane AFTER layout initialization, then...
+ if (state.initialized) {
+ initHandles( pane );
+ initHotkeys( pane );
+ }
+
+ // close or hide the pane if specified in settings
+ if (o.initClosed && o.closable && !o.initHidden)
+ close(pane, true, true); // true, true = force, noAnimation
+ else if (o.initHidden || o.initClosed)
+ hide(pane); // will be completely invisible - no resizer or spacing
+ else if (!s.noRoom)
+ // make the pane visible - in case was initially hidden
+ $P.css("display","block");
+ // ELSE setAsOpen() - called later by initHandles()
+
+ // RESET visibility now - pane will appear IF display:block
+ $P.css("visibility","visible");
+
+ // check option for auto-handling of pop-ups & drop-downs
+ if (o.showOverflowOnHover)
+ $P.hover( allowOverflow, resetOverflow );
+
+ // if manually adding a pane AFTER layout initialization, then...
+ if (state.initialized) {
+ afterInitPane( pane );
+ }
+ }
+
+, afterInitPane = function (pane) {
+ var $P = $Ps[pane]
+ , s = state[pane]
+ , o = options[pane]
+ ;
+ if (!$P) return;
+
+ // see if there is a directly-nested layout inside this pane
+ if ($P.data("layout"))
+ refreshChildren( pane, $P.data("layout") );
+
+ // process pane contents and callbacks, and init/resize child-layout if exists
+ if (s.isVisible) { // pane is OPEN
+ if (state.initialized) // this pane was added AFTER layout was created
+ resizeAll(); // will also sizeContent
+ else
+ sizeContent(pane);
+
+ if (o.triggerEventsOnLoad)
+ _runCallbacks("onresize_end", pane);
+ else // automatic if onresize called, otherwise call it specifically
+ // resize child - IF inner-layout already exists (created before this layout)
+ resizeChildren(pane, true); // a previously existing childLayout
+ }
+
+ // init childLayouts - even if pane is not visible
+ if (o.initChildren && o.children)
+ createChildren(pane);
+ }
+
+ /**
+ * @param {string=} panes The pane(s) to process
+ */
+, setPanePosition = function (panes) {
+ panes = panes ? panes.split(",") : _c.borderPanes;
+
+ // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
+ $.each(panes, function (i, pane) {
+ var $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , side = _c[pane].side
+ , CSS = {}
+ ;
+ if (!$P) return; // pane does not exist - skip
+
+ // set css-position to account for container borders & padding
+ switch (pane) {
+ case "north": CSS.top = sC.inset.top;
+ CSS.left = sC.inset.left;
+ CSS.right = sC.inset.right;
+ break;
+ case "south": CSS.bottom = sC.inset.bottom;
+ CSS.left = sC.inset.left;
+ CSS.right = sC.inset.right;
+ break;
+ case "west": CSS.left = sC.inset.left; // top, bottom & height set by sizeMidPanes()
+ break;
+ case "east": CSS.right = sC.inset.right; // ditto
+ break;
+ case "center": // top, left, width & height set by sizeMidPanes()
+ }
+ // apply position
+ $P.css(CSS);
+
+ // update resizer position
+ if ($R && s.isClosed)
+ $R.css(side, sC.inset[side]);
+ else if ($R && !s.isHidden)
+ $R.css(side, sC.inset[side] + getPaneSize(pane));
+ });
+ }
+
+ /**
+ * Initialize module objects, styling, size and position for all resize bars and toggler buttons
+ *
+ * @see _create()
+ * @param {string=} [panes=""] The edge(s) to process
+ */
+, initHandles = function (panes) {
+ panes = panes ? panes.split(",") : _c.borderPanes;
+
+ // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
+ $.each(panes, function (i, pane) {
+ var $P = $Ps[pane];
+ $Rs[pane] = false; // INIT
+ $Ts[pane] = false;
+ if (!$P) return; // pane does not exist - skip
+
+ var o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , paneId = o.paneSelector.substr(0,1) === "#" ? o.paneSelector.substr(1) : ""
+ , rClass = o.resizerClass
+ , tClass = o.togglerClass
+ , spacing = (s.isVisible ? o.spacing_open : o.spacing_closed)
+ , _pane = "-"+ pane // used for classNames
+ , _state = (s.isVisible ? "-open" : "-closed") // used for classNames
+ , I = Instance[pane]
+ // INIT RESIZER BAR
+ , $R = I.resizer = $Rs[pane] = $("<div></div>")
+ // INIT TOGGLER BUTTON
+ , $T = I.toggler = (o.closable ? $Ts[pane] = $("<div></div>") : false)
+ ;
+
+ //if (s.isVisible && o.resizable) ... handled by initResizable
+ if (!s.isVisible && o.slidable)
+ $R.attr("title", o.tips.Slide).css("cursor", o.sliderCursor);
+
+ $R // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "paneLeft-resizer"
+ .attr("id", paneId ? paneId +"-resizer" : "" )
+ .data({
+ parentLayout: Instance
+ , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
+ , layoutEdge: pane
+ , layoutRole: "resizer"
+ })
+ .css(_c.resizers.cssReq).css("zIndex", options.zIndexes.resizer_normal)
+ .css(o.applyDemoStyles ? _c.resizers.cssDemo : {}) // add demo styles
+ .addClass(rClass +" "+ rClass+_pane)
+ .hover(addHover, removeHover) // ALWAYS add hover-classes, even if resizing is not enabled - handle with CSS instead
+ .hover(onResizerEnter, onResizerLeave) // ALWAYS NEED resizer.mouseleave to balance toggler.mouseenter
+ .mousedown($.layout.disableTextSelection) // prevent text-selection OUTSIDE resizer
+ .mouseup($.layout.enableTextSelection) // not really necessary, but just in case
+ .appendTo($N) // append DIV to container
+ ;
+ if ($.fn.disableSelection)
+ $R.disableSelection(); // prevent text-selection INSIDE resizer
+ if (o.resizerDblClickToggle)
+ $R.bind("dblclick."+ sID, toggle );
+
+ if ($T) {
+ $T // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "#paneLeft-toggler"
+ .attr("id", paneId ? paneId +"-toggler" : "" )
+ .data({
+ parentLayout: Instance
+ , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
+ , layoutEdge: pane
+ , layoutRole: "toggler"
+ })
+ .css(_c.togglers.cssReq) // add base/required styles
+ .css(o.applyDemoStyles ? _c.togglers.cssDemo : {}) // add demo styles
+ .addClass(tClass +" "+ tClass+_pane)
+ .hover(addHover, removeHover) // ALWAYS add hover-classes, even if toggling is not enabled - handle with CSS instead
+ .bind("mouseenter", onResizerEnter) // NEED toggler.mouseenter because mouseenter MAY NOT fire on resizer
+ .appendTo($R) // append SPAN to resizer DIV
+ ;
+ // ADD INNER-SPANS TO TOGGLER
+ if (o.togglerContent_open) // ui-layout-open
+ $("<span>"+ o.togglerContent_open +"</span>")
+ .data({
+ layoutEdge: pane
+ , layoutRole: "togglerContent"
+ })
+ .data("layoutRole", "togglerContent")
+ .data("layoutEdge", pane)
+ .addClass("content content-open")
+ .css("display","none")
+ .appendTo( $T )
+ //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-open instead!
+ ;
+ if (o.togglerContent_closed) // ui-layout-closed
+ $("<span>"+ o.togglerContent_closed +"</span>")
+ .data({
+ layoutEdge: pane
+ , layoutRole: "togglerContent"
+ })
+ .addClass("content content-closed")
+ .css("display","none")
+ .appendTo( $T )
+ //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-closed instead!
+ ;
+ // ADD TOGGLER.click/.hover
+ enableClosable(pane);
+ }
+
+ // add Draggable events
+ initResizable(pane);
+
+ // ADD CLASSNAMES & SLIDE-BINDINGS - eg: class="resizer resizer-west resizer-open"
+ if (s.isVisible)
+ setAsOpen(pane); // onOpen will be called, but NOT onResize
+ else {
+ setAsClosed(pane); // onClose will be called
+ bindStartSlidingEvents(pane, true); // will enable events IF option is set
+ }
+
+ });
+
+ // SET ALL HANDLE DIMENSIONS
+ sizeHandles();
+ }
+
+
+ /**
+ * Initialize scrolling ui-layout-content div - if exists
+ *
+ * @see initPane() - or externally after an Ajax injection
+ * @param {string} pane The pane to process
+ * @param {boolean=} [resize=true] Size content after init
+ */
+, initContent = function (pane, resize) {
+ if (!isInitialized()) return;
+ var
+ o = options[pane]
+ , sel = o.contentSelector
+ , I = Instance[pane]
+ , $P = $Ps[pane]
+ , $C
+ ;
+ if (sel) $C = I.content = $Cs[pane] = (o.findNestedContent)
+ ? $P.find(sel).eq(0) // match 1-element only
+ : $P.children(sel).eq(0)
+ ;
+ if ($C && $C.length) {
+ $C.data("layoutRole", "content");
+ // SAVE original Content CSS
+ if (!$C.data("layoutCSS"))
+ $C.data("layoutCSS", styles($C, "height"));
+ $C.css( _c.content.cssReq );
+ if (o.applyDemoStyles) {
+ $C.css( _c.content.cssDemo ); // add padding & overflow: auto to content-div
+ $P.css( _c.content.cssDemoPane ); // REMOVE padding/scrolling from pane
+ }
+ // ensure no vertical scrollbar on pane - will mess up measurements
+ if ($P.css("overflowX").match(/(scroll|auto)/)) {
+ $P.css("overflow", "hidden");
+ }
+ state[pane].content = {}; // init content state
+ if (resize !== false) sizeContent(pane);
+ // sizeContent() is called AFTER init of all elements
+ }
+ else
+ I.content = $Cs[pane] = false;
+ }
+
+
+ /**
+ * Add resize-bars to all panes that specify it in options
+ * -dependancy: $.fn.resizable - will skip if not found
+ *
+ * @see _create()
+ * @param {string=} [panes=""] The edge(s) to process
+ */
+, initResizable = function (panes) {
+ var draggingAvailable = $.layout.plugins.draggable
+ , side // set in start()
+ ;
+ panes = panes ? panes.split(",") : _c.borderPanes;
+
+ $.each(panes, function (idx, pane) {
+ var o = options[pane];
+ if (!draggingAvailable || !$Ps[pane] || !o.resizable) {
+ o.resizable = false;
+ return true; // skip to next
+ }
+
+ var s = state[pane]
+ , z = options.zIndexes
+ , c = _c[pane]
+ , side = c.dir=="horz" ? "top" : "left"
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , base = o.resizerClass
+ , lastPos = 0 // used when live-resizing
+ , r, live // set in start because may change
+ // 'drag' classes are applied to the ORIGINAL resizer-bar while dragging is in process
+ , resizerClass = base+"-drag" // resizer-drag
+ , resizerPaneClass = base+"-"+pane+"-drag" // resizer-north-drag
+ // 'helper' class is applied to the CLONED resizer-bar while it is being dragged
+ , helperClass = base+"-dragging" // resizer-dragging
+ , helperPaneClass = base+"-"+pane+"-dragging" // resizer-north-dragging
+ , helperLimitClass = base+"-dragging-limit" // resizer-drag
+ , helperPaneLimitClass = base+"-"+pane+"-dragging-limit" // resizer-north-drag
+ , helperClassesSet = false // logic var
+ ;
+
+ if (!s.isClosed)
+ $R.attr("title", o.tips.Resize)
+ .css("cursor", o.resizerCursor); // n-resize, s-resize, etc
+
+ $R.draggable({
+ containment: $N[0] // limit resizing to layout container
+ , axis: (c.dir=="horz" ? "y" : "x") // limit resizing to horz or vert axis
+ , delay: 0
+ , distance: 1
+ , grid: o.resizingGrid
+ // basic format for helper - style it using class: .ui-draggable-dragging
+ , helper: "clone"
+ , opacity: o.resizerDragOpacity
+ , addClasses: false // avoid ui-state-disabled class when disabled
+ //, iframeFix: o.draggableIframeFix // TODO: consider using when bug is fixed
+ , zIndex: z.resizer_drag
+
+ , start: function (e, ui) {
+ // REFRESH options & state pointers in case we used swapPanes
+ o = options[pane];
+ s = state[pane];
+ // re-read options
+ live = o.livePaneResizing;
+
+ // ondrag_start callback - will CANCEL hide if returns false
+ // TODO: dragging CANNOT be cancelled like this, so see if there is a way?
+ if (false === _runCallbacks("ondrag_start", pane)) return false;
+
+ s.isResizing = true; // prevent pane from closing while resizing
+ state.paneResizing = pane; // easy to see if ANY pane is resizing
+ timer.clear(pane+"_closeSlider"); // just in case already triggered
+
+ // SET RESIZER LIMITS - used in drag()
+ setSizeLimits(pane); // update pane/resizer state
+ r = s.resizerPosition;
+ lastPos = ui.position[ side ]
+
+ $R.addClass( resizerClass +" "+ resizerPaneClass ); // add drag classes
+ helperClassesSet = false; // reset logic var - see drag()
+
+ // MASK PANES CONTAINING IFRAMES, APPLETS OR OTHER TROUBLESOME ELEMENTS
+ showMasks( pane, { resizing: true });
+ }
+
+ , drag: function (e, ui) {
+ if (!helperClassesSet) { // can only add classes after clone has been added to the DOM
+ //$(".ui-draggable-dragging")
+ ui.helper
+ .addClass( helperClass +" "+ helperPaneClass ) // add helper classes
+ .css({ right: "auto", bottom: "auto" }) // fix dir="rtl" issue
+ .children().css("visibility","hidden") // hide toggler inside dragged resizer-bar
+ ;
+ helperClassesSet = true;
+ // draggable bug!? RE-SET zIndex to prevent E/W resize-bar showing through N/S pane!
+ if (s.isSliding) $Ps[pane].css("zIndex", z.pane_sliding);
+ }
+ // CONTAIN RESIZER-BAR TO RESIZING LIMITS
+ var limit = 0;
+ if (ui.position[side] < r.min) {
+ ui.position[side] = r.min;
+ limit = -1;
+ }
+ else if (ui.position[side] > r.max) {
+ ui.position[side] = r.max;
+ limit = 1;
+ }
+ // ADD/REMOVE dragging-limit CLASS
+ if (limit) {
+ ui.helper.addClass( helperLimitClass +" "+ helperPaneLimitClass ); // at dragging-limit
+ window.defaultStatus = (limit>0 && pane.match(/(north|west)/)) || (limit<0 && pane.match(/(south|east)/)) ? o.tips.maxSizeWarning : o.tips.minSizeWarning;
+ }
+ else {
+ ui.helper.removeClass( helperLimitClass +" "+ helperPaneLimitClass ); // not at dragging-limit
+ window.defaultStatus = "";
+ }
+ // DYNAMICALLY RESIZE PANES IF OPTION ENABLED
+ // won't trigger unless resizer has actually moved!
+ if (live && Math.abs(ui.position[side] - lastPos) >= o.liveResizingTolerance) {
+ lastPos = ui.position[side];
+ resizePanes(e, ui, pane)
+ }
+ }
+
+ , stop: function (e, ui) {
+ $('body').enableSelection(); // RE-ENABLE TEXT SELECTION
+ window.defaultStatus = ""; // clear 'resizing limit' message from statusbar
+ $R.removeClass( resizerClass +" "+ resizerPaneClass ); // remove drag classes from Resizer
+ s.isResizing = false;
+ state.paneResizing = false; // easy to see if ANY pane is resizing
+ resizePanes(e, ui, pane, true); // true = resizingDone
+ }
+
+ });
+ });
+
+ /**
+ * resizePanes
+ *
+ * Sub-routine called from stop() - and drag() if livePaneResizing
+ *
+ * @param {!Object} evt
+ * @param {!Object} ui
+ * @param {string} pane
+ * @param {boolean=} [resizingDone=false]
+ */
+ var resizePanes = function (evt, ui, pane, resizingDone) {
+ var dragPos = ui.position
+ , c = _c[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , resizerPos
+ ;
+ switch (pane) {
+ case "north": resizerPos = dragPos.top; break;
+ case "west": resizerPos = dragPos.left; break;
+ case "south": resizerPos = sC.layoutHeight - dragPos.top - o.spacing_open; break;
+ case "east": resizerPos = sC.layoutWidth - dragPos.left - o.spacing_open; break;
+ };
+ // remove container margin from resizer position to get the pane size
+ var newSize = resizerPos - sC.inset[c.side];
+
+ // Disable OR Resize Mask(s) created in drag.start
+ if (!resizingDone) {
+ // ensure we meet liveResizingTolerance criteria
+ if (Math.abs(newSize - s.size) < o.liveResizingTolerance)
+ return; // SKIP resize this time
+ // resize the pane
+ manualSizePane(pane, newSize, false, true); // true = noAnimation
+ sizeMasks(); // resize all visible masks
+ }
+ else { // resizingDone
+ // ondrag_end callback
+ if (false !== _runCallbacks("ondrag_end", pane))
+ manualSizePane(pane, newSize, false, true); // true = noAnimation
+ hideMasks(true); // true = force hiding all masks even if one is 'sliding'
+ if (s.isSliding) // RE-SHOW 'object-masks' so objects won't show through sliding pane
+ showMasks( pane, { resizing: true });
+ }
+ };
+ }
+
+ /**
+ * sizeMask
+ *
+ * Needed to overlay a DIV over an IFRAME-pane because mask CANNOT be *inside* the pane
+ * Called when mask created, and during livePaneResizing
+ */
+, sizeMask = function () {
+ var $M = $(this)
+ , pane = $M.data("layoutMask") // eg: "west"
+ , s = state[pane]
+ ;
+ // only masks over an IFRAME-pane need manual resizing
+ if (s.tagName == "IFRAME" && s.isVisible) // no need to mask closed/hidden panes
+ $M.css({
+ top: s.offsetTop
+ , left: s.offsetLeft
+ , width: s.outerWidth
+ , height: s.outerHeight
+ });
+ /* ALT Method...
+ var $P = $Ps[pane];
+ $M.css( $P.position() ).css({ width: $P[0].offsetWidth, height: $P[0].offsetHeight });
+ */
+ }
+, sizeMasks = function () {
+ $Ms.each( sizeMask ); // resize all 'visible' masks
+ }
+
+ /**
+ * @param {string} pane The pane being resized, animated or isSliding
+ * @param {Object=} [args] (optional) Options: which masks to apply, and to which panes
+ */
+, showMasks = function (pane, args) {
+ var c = _c[pane]
+ , panes = ["center"]
+ , z = options.zIndexes
+ , a = $.extend({
+ objectsOnly: false
+ , animation: false
+ , resizing: true
+ , sliding: state[pane].isSliding
+ }, args )
+ , o, s
+ ;
+ if (a.resizing)
+ panes.push( pane );
+ if (a.sliding)
+ panes.push( _c.oppositeEdge[pane] ); // ADD the oppositeEdge-pane
+
+ if (c.dir === "horz") {
+ panes.push("west");
+ panes.push("east");
+ }
+
+ $.each(panes, function(i,p){
+ s = state[p];
+ o = options[p];
+ if (s.isVisible && ( o.maskObjects || (!a.objectsOnly && o.maskContents) )) {
+ getMasks(p).each(function(){
+ sizeMask.call(this);
+ this.style.zIndex = s.isSliding ? z.pane_sliding+1 : z.pane_normal+1
+ this.style.display = "block";
+ });
+ }
+ });
+ }
+
+ /**
+ * @param {boolean=} force Hide masks even if a pane is sliding
+ */
+, hideMasks = function (force) {
+ // ensure no pane is resizing - could be a timing issue
+ if (force || !state.paneResizing) {
+ $Ms.hide(); // hide ALL masks
+ }
+ // if ANY pane is sliding, then DO NOT remove masks from panes with maskObjects enabled
+ else if (!force && !$.isEmptyObject( state.panesSliding )) {
+ var i = $Ms.length - 1
+ , p, $M;
+ for (; i >= 0; i--) {
+ $M = $Ms.eq(i);
+ p = $M.data("layoutMask");
+ if (!options[p].maskObjects) {
+ $M.hide();
+ }
+ }
+ }
+ }
+
+ /**
+ * @param {string} pane
+ */
+, getMasks = function (pane) {
+ var $Masks = $([])
+ , $M, i = 0, c = $Ms.length
+ ;
+ for (; i<c; i++) {
+ $M = $Ms.eq(i);
+ if ($M.data("layoutMask") === pane)
+ $Masks = $Masks.add( $M );
+ }
+ if ($Masks.length)
+ return $Masks;
+ else
+ return createMasks(pane);
+ }
+
+ /**
+ * createMasks
+ *
+ * Generates both DIV (ALWAYS used) and IFRAME (optional) elements as masks
+ * An IFRAME mask is created *under* the DIV when maskObjects=true, because a DIV cannot mask an applet
+ *
+ * @param {string} pane
+ */
+, createMasks = function (pane) {
+ var
+ $P = $Ps[pane]
+ , s = state[pane]
+ , o = options[pane]
+ , z = options.zIndexes
+ , isIframe, el, $M, css, i
+ ;
+ if (!o.maskContents && !o.maskObjects) return $([]);
+ // if o.maskObjects=true, then loop TWICE to create BOTH kinds of mask, else only create a DIV
+ for (i=0; i < (o.maskObjects ? 2 : 1); i++) {
+ isIframe = o.maskObjects && i==0;
+ el = document.createElement( isIframe ? "iframe" : "div" );
+ $M = $(el).data("layoutMask", pane); // add data to relate mask to pane
+ el.className = "ui-layout-mask ui-layout-mask-"+ pane; // for user styling
+ css = el.style;
+ // Both DIVs and IFRAMES
+ css.background = "#FFF";
+ css.position = "absolute";
+ css.display = "block";
+ if (isIframe) { // IFRAME-only props
+ el.src = "about:blank";
+ el.frameborder = 0;
+ css.border = 0;
+ css.opacity = 0;
+ css.filter = "Alpha(Opacity='0')";
+ //el.allowTransparency = true; - for IE, but breaks masking ability!
+ }
+ else { // DIV-only props
+ css.opacity = 0.001;
+ css.filter = "Alpha(Opacity='1')";
+ }
+ // if pane IS an IFRAME, then must mask the pane itself
+ if (s.tagName == "IFRAME") {
+ // NOTE sizing done by a subroutine so can be called during live-resizing
+ css.zIndex = z.pane_normal+1; // 1-higher than pane
+ $N.append( el ); // append to LAYOUT CONTAINER
+ }
+ // otherwise put masks *inside the pane* to mask its contents
+ else {
+ $M.addClass("ui-layout-mask-inside-pane");
+ css.zIndex = o.maskZindex || z.content_mask; // usually 1, but customizable
+ css.top = 0;
+ css.left = 0;
+ css.width = "100%";
+ css.height = "100%";
+ $P.append( el ); // append INSIDE pane element
+ }
+ // add Mask to cached array so can be resized & reused
+ $Ms = $Ms.add( el );
+ }
+ return $Ms;
+ }
+
+
+ /**
+ * Destroy this layout and reset all elements
+ *
+ * @param {boolean=} [destroyChildren=false] Destory Child-Layouts first?
+ */
+, destroy = function (evt_or_destroyChildren, destroyChildren) {
+ // UNBIND layout events and remove global object
+ $(window).unbind("."+ sID); // resize & unload
+ $(document).unbind("."+ sID); // keyDown (hotkeys)
+
+ if (typeof evt_or_destroyChildren === "object")
+ // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
+ evtPane(evt_or_destroyChildren);
+ else // no event, so transfer 1st param to destroyChildren param
+ destroyChildren = evt_or_destroyChildren;
+
+ // need to look for parent layout BEFORE we remove the container data, else skips a level
+ //var parentPane = Instance.hasParentLayout ? $.layout.getParentPaneInstance( $N ) : null;
+
+ // reset layout-container
+ $N .clearQueue()
+ .removeData("layout")
+ .removeData("layoutContainer")
+ .removeClass(options.containerClass)
+ .unbind("."+ sID) // remove ALL Layout events
+ ;
+
+ // remove all mask elements that have been created
+ $Ms.remove();
+
+ // loop all panes to remove layout classes, attributes and bindings
+ $.each(_c.allPanes, function (i, pane) {
+ removePane( pane, false, true, destroyChildren ); // true = skipResize
+ });
+
+ // do NOT reset container CSS if is a 'pane' (or 'content') in an outer-layout - ie, THIS layout is 'nested'
+ var css = "layoutCSS";
+ if ($N.data(css) && !$N.data("layoutRole")) // RESET CSS
+ $N.css( $N.data(css) ).removeData(css);
+
+ // for full-page layouts, also reset the <HTML> CSS
+ if (sC.tagName === "BODY" && ($N = $("html")).data(css)) // RESET <HTML> CSS
+ $N.css( $N.data(css) ).removeData(css);
+
+ // trigger plugins for this layout, if there are any
+ runPluginCallbacks( Instance, $.layout.onDestroy );
+
+ // trigger state-management and onunload callback
+ unload();
+
+ // clear the Instance of everything except for container & options (so could recreate)
+ // RE-CREATE: myLayout = myLayout.container.layout( myLayout.options );
+ for (var n in Instance)
+ if (!n.match(/^(container|options)$/)) delete Instance[ n ];
+ // add a 'destroyed' flag to make it easy to check
+ Instance.destroyed = true;
+
+ // if this is a child layout, CLEAR the child-pointer in the parent
+ /* for now the pointer REMAINS, but with only container, options and destroyed keys
+ if (parentPane) {
+ var layout = parentPane.pane.data("parentLayout")
+ , key = layout.options.instanceKey || 'error';
+ // THIS SYNTAX MAY BE WRONG!
+ parentPane.children[key] = layout.children[ parentPane.name ].children[key] = null;
+ }
+ */
+
+ return Instance; // for coding convenience
+ }
+
+ /**
+ * Remove a pane from the layout - subroutine of destroy()
+ *
+ * @see destroy()
+ * @param {(string|Object)} evt_or_pane The pane to process
+ * @param {boolean=} [remove=false] Remove the DOM element?
+ * @param {boolean=} [skipResize=false] Skip calling resizeAll()?
+ * @param {boolean=} [destroyChild=true] Destroy Child-layouts? If not passed, obeys options setting
+ */
+, removePane = function (evt_or_pane, remove, skipResize, destroyChild) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $P = $Ps[pane]
+ , $C = $Cs[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ ;
+ // NOTE: elements can still exist even after remove()
+ // so check for missing data(), which is cleared by removed()
+ if ($P && $.isEmptyObject( $P.data() )) $P = false;
+ if ($C && $.isEmptyObject( $C.data() )) $C = false;
+ if ($R && $.isEmptyObject( $R.data() )) $R = false;
+ if ($T && $.isEmptyObject( $T.data() )) $T = false;
+
+ if ($P) $P.stop(true, true);
+
+ var o = options[pane]
+ , s = state[pane]
+ , d = "layout"
+ , css = "layoutCSS"
+ , pC = children[pane]
+ , hasChildren = $.isPlainObject( pC ) && !$.isEmptyObject( pC )
+ , destroy = destroyChild !== undefined ? destroyChild : o.destroyChildren
+ ;
+ // FIRST destroy the child-layout(s)
+ if (hasChildren && destroy) {
+ $.each( pC, function (key, child) {
+ if (!child.destroyed)
+ child.destroy(true);// tell child-layout to destroy ALL its child-layouts too
+ if (child.destroyed) // destroy was successful
+ delete pC[key];
+ });
+ // if no more children, remove the children hash
+ if ($.isEmptyObject( pC )) {
+ pC = children[pane] = null; // clear children hash
+ hasChildren = false;
+ }
+ }
+
+ // Note: can't 'remove' a pane element with non-destroyed children
+ if ($P && remove && !hasChildren)
+ $P.remove(); // remove the pane-element and everything inside it
+ else if ($P && $P[0]) {
+ // create list of ALL pane-classes that need to be removed
+ var root = o.paneClass // default="ui-layout-pane"
+ , pRoot = root +"-"+ pane // eg: "ui-layout-pane-west"
+ , _open = "-open"
+ , _sliding= "-sliding"
+ , _closed = "-closed"
+ , classes = [ root, root+_open, root+_closed, root+_sliding, // generic classes
+ pRoot, pRoot+_open, pRoot+_closed, pRoot+_sliding ] // pane-specific classes
+ ;
+ $.merge(classes, getHoverClasses($P, true)); // ADD hover-classes
+ // remove all Layout classes from pane-element
+ $P .removeClass( classes.join(" ") ) // remove ALL pane-classes
+ .removeData("parentLayout")
+ .removeData("layoutPane")
+ .removeData("layoutRole")
+ .removeData("layoutEdge")
+ .removeData("autoHidden") // in case set
+ .unbind("."+ sID) // remove ALL Layout events
+ // TODO: remove these extra unbind commands when jQuery is fixed
+ //.unbind("mouseenter"+ sID)
+ //.unbind("mouseleave"+ sID)
+ ;
+ // do NOT reset CSS if this pane/content is STILL the container of a nested layout!
+ // the nested layout will reset its 'container' CSS when/if it is destroyed
+ if (hasChildren && $C) {
+ // a content-div may not have a specific width, so give it one to contain the Layout
+ $C.width( $C.width() );
+ $.each( pC, function (key, child) {
+ child.resizeAll(); // resize the Layout
+ });
+ }
+ else if ($C)
+ $C.css( $C.data(css) ).removeData(css).removeData("layoutRole");
+ // remove pane AFTER content in case there was a nested layout
+ if (!$P.data(d))
+ $P.css( $P.data(css) ).removeData(css);
+ }
+
+ // REMOVE pane resizer and toggler elements
+ if ($T) $T.remove();
+ if ($R) $R.remove();
+
+ // CLEAR all pointers and state data
+ Instance[pane] = $Ps[pane] = $Cs[pane] = $Rs[pane] = $Ts[pane] = false;
+ s = { removed: true };
+
+ if (!skipResize)
+ resizeAll();
+ }
+
+
+/*
+ * ###########################
+ * ACTION METHODS
+ * ###########################
+ */
+
+ /**
+ * @param {string} pane
+ */
+, _hidePane = function (pane) {
+ var $P = $Ps[pane]
+ , o = options[pane]
+ , s = $P[0].style
+ ;
+ if (o.useOffscreenClose) {
+ if (!$P.data(_c.offscreenReset))
+ $P.data(_c.offscreenReset, { left: s.left, right: s.right });
+ $P.css( _c.offscreenCSS );
+ }
+ else
+ $P.hide().removeData(_c.offscreenReset);
+ }
+
+ /**
+ * @param {string} pane
+ */
+, _showPane = function (pane) {
+ var $P = $Ps[pane]
+ , o = options[pane]
+ , off = _c.offscreenCSS
+ , old = $P.data(_c.offscreenReset)
+ , s = $P[0].style
+ ;
+ $P .show() // ALWAYS show, just in case
+ .removeData(_c.offscreenReset);
+ if (o.useOffscreenClose && old) {
+ if (s.left == off.left)
+ s.left = old.left;
+ if (s.right == off.right)
+ s.right = old.right;
+ }
+ }
+
+
+ /**
+ * Completely 'hides' a pane, including its spacing - as if it does not exist
+ * The pane is not actually 'removed' from the source, so can use 'show' to un-hide it
+ *
+ * @param {(string|Object)} evt_or_pane The pane being hidden, ie: north, south, east, or west
+ * @param {boolean=} [noAnimation=false]
+ */
+, hide = function (evt_or_pane, noAnimation) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , o = options[pane]
+ , s = state[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ ;
+ if (pane === "center" || !$P || s.isHidden) return; // pane does not exist OR is already hidden
+
+ // onhide_start callback - will CANCEL hide if returns false
+ if (state.initialized && false === _runCallbacks("onhide_start", pane)) return;
+
+ s.isSliding = false; // just in case
+ delete state.panesSliding[pane];
+
+ // now hide the elements
+ if ($R) $R.hide(); // hide resizer-bar
+ if (!state.initialized || s.isClosed) {
+ s.isClosed = true; // to trigger open-animation on show()
+ s.isHidden = true;
+ s.isVisible = false;
+ if (!state.initialized)
+ _hidePane(pane); // no animation when loading page
+ sizeMidPanes(_c[pane].dir === "horz" ? "" : "center");
+ if (state.initialized || o.triggerEventsOnLoad)
+ _runCallbacks("onhide_end", pane);
+ }
+ else {
+ s.isHiding = true; // used by onclose
+ close(pane, false, noAnimation); // adjust all panes to fit
+ }
+ }
+
+ /**
+ * Show a hidden pane - show as 'closed' by default unless openPane = true
+ *
+ * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
+ * @param {boolean=} [openPane=false]
+ * @param {boolean=} [noAnimation=false]
+ * @param {boolean=} [noAlert=false]
+ */
+, show = function (evt_or_pane, openPane, noAnimation, noAlert) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , o = options[pane]
+ , s = state[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ ;
+ if (pane === "center" || !$P || !s.isHidden) return; // pane does not exist OR is not hidden
+
+ // onshow_start callback - will CANCEL show if returns false
+ if (false === _runCallbacks("onshow_start", pane)) return;
+
+ s.isShowing = true; // used by onopen/onclose
+ //s.isHidden = false; - will be set by open/close - if not cancelled
+ s.isSliding = false; // just in case
+ delete state.panesSliding[pane];
+
+ // now show the elements
+ //if ($R) $R.show(); - will be shown by open/close
+ if (openPane === false)
+ close(pane, true); // true = force
+ else
+ open(pane, false, noAnimation, noAlert); // adjust all panes to fit
+ }
+
+
+ /**
+ * Toggles a pane open/closed by calling either open or close
+ *
+ * @param {(string|Object)} evt_or_pane The pane being toggled, ie: north, south, east, or west
+ * @param {boolean=} [slide=false]
+ */
+, toggle = function (evt_or_pane, slide) {
+ if (!isInitialized()) return;
+ var evt = evtObj(evt_or_pane)
+ , pane = evtPane.call(this, evt_or_pane)
+ , s = state[pane]
+ ;
+ if (evt) // called from to $R.dblclick OR triggerPaneEvent
+ evt.stopImmediatePropagation();
+ if (s.isHidden)
+ show(pane); // will call 'open' after unhiding it
+ else if (s.isClosed)
+ open(pane, !!slide);
+ else
+ close(pane);
+ }
+
+
+ /**
+ * Utility method used during init or other auto-processes
+ *
+ * @param {string} pane The pane being closed
+ * @param {boolean=} [setHandles=false]
+ */
+, _closePane = function (pane, setHandles) {
+ var
+ $P = $Ps[pane]
+ , s = state[pane]
+ ;
+ _hidePane(pane);
+ s.isClosed = true;
+ s.isVisible = false;
+ if (setHandles) setAsClosed(pane);
+ }
+
+ /**
+ * Close the specified pane (animation optional), and resize all other panes as needed
+ *
+ * @param {(string|Object)} evt_or_pane The pane being closed, ie: north, south, east, or west
+ * @param {boolean=} [force=false]
+ * @param {boolean=} [noAnimation=false]
+ * @param {boolean=} [skipCallback=false]
+ */
+, close = function (evt_or_pane, force, noAnimation, skipCallback) {
+ var pane = evtPane.call(this, evt_or_pane);
+ if (pane === "center") return; // validate
+ // if pane has been initialized, but NOT the complete layout, close pane instantly
+ if (!state.initialized && $Ps[pane]) {
+ _closePane(pane, true); // INIT pane as closed
+ return;
+ }
+ if (!isInitialized()) return;
+
+ var
+ $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , doFX, isShowing, isHiding, wasSliding;
+
+ // QUEUE in case another action/animation is in progress
+ $N.queue(function( queueNext ){
+
+ if ( !$P
+ || (!o.closable && !s.isShowing && !s.isHiding) // invalid request // (!o.resizable && !o.closable) ???
+ || (!force && s.isClosed && !s.isShowing) // already closed
+ ) return queueNext();
+
+ // onclose_start callback - will CANCEL hide if returns false
+ // SKIP if just 'showing' a hidden pane as 'closed'
+ var abort = !s.isShowing && false === _runCallbacks("onclose_start", pane);
+
+ // transfer logic vars to temp vars
+ isShowing = s.isShowing;
+ isHiding = s.isHiding;
+ wasSliding = s.isSliding;
+ // now clear the logic vars (REQUIRED before aborting)
+ delete s.isShowing;
+ delete s.isHiding;
+
+ if (abort) return queueNext();
+
+ doFX = !noAnimation && !s.isClosed && (o.fxName_close != "none");
+ s.isMoving = true;
+ s.isClosed = true;
+ s.isVisible = false;
+ // update isHidden BEFORE sizing panes
+ if (isHiding) s.isHidden = true;
+ else if (isShowing) s.isHidden = false;
+
+ if (s.isSliding) // pane is being closed, so UNBIND trigger events
+ bindStopSlidingEvents(pane, false); // will set isSliding=false
+ else // resize panes adjacent to this one
+ sizeMidPanes(_c[pane].dir === "horz" ? "" : "center", false); // false = NOT skipCallback
+
+ // if this pane has a resizer bar, move it NOW - before animation
+ setAsClosed(pane);
+
+ // CLOSE THE PANE
+ if (doFX) { // animate the close
+ lockPaneForFX(pane, true); // need to set left/top so animation will work
+ $P.hide( o.fxName_close, o.fxSettings_close, o.fxSpeed_close, function () {
+ lockPaneForFX(pane, false); // undo
+ if (s.isClosed) close_2();
+ queueNext();
+ });
+ }
+ else { // hide the pane without animation
+ _hidePane(pane);
+ close_2();
+ queueNext();
+ };
+ });
+
+ // SUBROUTINE
+ function close_2 () {
+ s.isMoving = false;
+ bindStartSlidingEvents(pane, true); // will enable if o.slidable = true
+
+ // if opposite-pane was autoClosed, see if it can be autoOpened now
+ var altPane = _c.oppositeEdge[pane];
+ if (state[ altPane ].noRoom) {
+ setSizeLimits( altPane );
+ makePaneFit( altPane );
+ }
+
+ if (!skipCallback && (state.initialized || o.triggerEventsOnLoad)) {
+ // onclose callback - UNLESS just 'showing' a hidden pane as 'closed'
+ if (!isShowing) _runCallbacks("onclose_end", pane);
+ // onhide OR onshow callback
+ if (isShowing) _runCallbacks("onshow_end", pane);
+ if (isHiding) _runCallbacks("onhide_end", pane);
+ }
+ }
+ }
+
+ /**
+ * @param {string} pane The pane just closed, ie: north, south, east, or west
+ */
+, setAsClosed = function (pane) {
+ if (!$Rs[pane]) return; // handles not initialized yet!
+ var
+ $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , side = _c[pane].side
+ , rClass = o.resizerClass
+ , tClass = o.togglerClass
+ , _pane = "-"+ pane // used for classNames
+ , _open = "-open"
+ , _sliding= "-sliding"
+ , _closed = "-closed"
+ ;
+ $R
+ .css(side, sC.inset[side]) // move the resizer
+ .removeClass( rClass+_open +" "+ rClass+_pane+_open )
+ .removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
+ .addClass( rClass+_closed +" "+ rClass+_pane+_closed )
+ ;
+ // handle already-hidden panes in case called by swap() or a similar method
+ if (s.isHidden) $R.hide(); // hide resizer-bar
+
+ // DISABLE 'resizing' when closed - do this BEFORE bindStartSlidingEvents?
+ if (o.resizable && $.layout.plugins.draggable)
+ $R
+ .draggable("disable")
+ .removeClass("ui-state-disabled") // do NOT apply disabled styling - not suitable here
+ .css("cursor", "default")
+ .attr("title","")
+ ;
+
+ // if pane has a toggler button, adjust that too
+ if ($T) {
+ $T
+ .removeClass( tClass+_open +" "+ tClass+_pane+_open )
+ .addClass( tClass+_closed +" "+ tClass+_pane+_closed )
+ .attr("title", o.tips.Open) // may be blank
+ ;
+ // toggler-content - if exists
+ $T.children(".content-open").hide();
+ $T.children(".content-closed").css("display","block");
+ }
+
+ // sync any 'pin buttons'
+ syncPinBtns(pane, false);
+
+ if (state.initialized) {
+ // resize 'length' and position togglers for adjacent panes
+ sizeHandles();
+ }
+ }
+
+ /**
+ * Open the specified pane (animation optional), and resize all other panes as needed
+ *
+ * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
+ * @param {boolean=} [slide=false]
+ * @param {boolean=} [noAnimation=false]
+ * @param {boolean=} [noAlert=false]
+ */
+, open = function (evt_or_pane, slide, noAnimation, noAlert) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , doFX, isShowing
+ ;
+ if (pane === "center") return; // validate
+ // QUEUE in case another action/animation is in progress
+ $N.queue(function( queueNext ){
+
+ if ( !$P
+ || (!o.resizable && !o.closable && !s.isShowing) // invalid request
+ || (s.isVisible && !s.isSliding) // already open
+ ) return queueNext();
+
+ // pane can ALSO be unhidden by just calling show(), so handle this scenario
+ if (s.isHidden && !s.isShowing) {
+ queueNext(); // call before show() because it needs the queue free
+ show(pane, true);
+ return;
+ }
+
+ if (s.autoResize && s.size != o.size) // resize pane to original size set in options
+ sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize
+ else
+ // make sure there is enough space available to open the pane
+ setSizeLimits(pane, slide);
+
+ // onopen_start callback - will CANCEL open if returns false
+ var cbReturn = _runCallbacks("onopen_start", pane);
+
+ if (cbReturn === "abort")
+ return queueNext();
+
+ // update pane-state again in case options were changed in onopen_start
+ if (cbReturn !== "NC") // NC = "No Callback"
+ setSizeLimits(pane, slide);
+
+ if (s.minSize > s.maxSize) { // INSUFFICIENT ROOM FOR PANE TO OPEN!
+ syncPinBtns(pane, false); // make sure pin-buttons are reset
+ if (!noAlert && o.tips.noRoomToOpen)
+ alert(o.tips.noRoomToOpen);
+ return queueNext(); // ABORT
+ }
+
+ if (slide) // START Sliding - will set isSliding=true
+ bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
+ else if (s.isSliding) // PIN PANE (stop sliding) - open pane 'normally' instead
+ bindStopSlidingEvents(pane, false); // UNBIND trigger events - will set isSliding=false
+ else if (o.slidable)
+ bindStartSlidingEvents(pane, false); // UNBIND trigger events
+
+ s.noRoom = false; // will be reset by makePaneFit if 'noRoom'
+ makePaneFit(pane);
+
+ // transfer logic var to temp var
+ isShowing = s.isShowing;
+ // now clear the logic var
+ delete s.isShowing;
+
+ doFX = !noAnimation && s.isClosed && (o.fxName_open != "none");
+ s.isMoving = true;
+ s.isVisible = true;
+ s.isClosed = false;
+ // update isHidden BEFORE sizing panes - WHY??? Old?
+ if (isShowing) s.isHidden = false;
+
+ if (doFX) { // ANIMATE
+ // mask adjacent panes with objects
+ lockPaneForFX(pane, true); // need to set left/top so animation will work
+ $P.show( o.fxName_open, o.fxSettings_open, o.fxSpeed_open, function() {
+ lockPaneForFX(pane, false); // undo
+ if (s.isVisible) open_2(); // continue
+ queueNext();
+ });
+ }
+ else { // no animation
+ _showPane(pane);// just show pane and...
+ open_2(); // continue
+ queueNext();
+ };
+ });
+
+ // SUBROUTINE
+ function open_2 () {
+ s.isMoving = false;
+
+ // cure iframe display issues
+ _fixIframe(pane);
+
+ // NOTE: if isSliding, then other panes are NOT 'resized'
+ if (!s.isSliding) { // resize all panes adjacent to this one
+ sizeMidPanes(_c[pane].dir=="vert" ? "center" : "", false); // false = NOT skipCallback
+ }
+
+ // set classes, position handles and execute callbacks...
+ setAsOpen(pane);
+ };
+
+ }
+
+ /**
+ * @param {string} pane The pane just opened, ie: north, south, east, or west
+ * @param {boolean=} [skipCallback=false]
+ */
+, setAsOpen = function (pane, skipCallback) {
+ var
+ $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , side = _c[pane].side
+ , rClass = o.resizerClass
+ , tClass = o.togglerClass
+ , _pane = "-"+ pane // used for classNames
+ , _open = "-open"
+ , _closed = "-closed"
+ , _sliding= "-sliding"
+ ;
+ $R
+ .css(side, sC.inset[side] + getPaneSize(pane)) // move the resizer
+ .removeClass( rClass+_closed +" "+ rClass+_pane+_closed )
+ .addClass( rClass+_open +" "+ rClass+_pane+_open )
+ ;
+ if (s.isSliding)
+ $R.addClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
+ else // in case 'was sliding'
+ $R.removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
+
+ removeHover( 0, $R ); // remove hover classes
+ if (o.resizable && $.layout.plugins.draggable)
+ $R .draggable("enable")
+ .css("cursor", o.resizerCursor)
+ .attr("title", o.tips.Resize);
+ else if (!s.isSliding)
+ $R.css("cursor", "default"); // n-resize, s-resize, etc
+
+ // if pane also has a toggler button, adjust that too
+ if ($T) {
+ $T .removeClass( tClass+_closed +" "+ tClass+_pane+_closed )
+ .addClass( tClass+_open +" "+ tClass+_pane+_open )
+ .attr("title", o.tips.Close); // may be blank
+ removeHover( 0, $T ); // remove hover classes
+ // toggler-content - if exists
+ $T.children(".content-closed").hide();
+ $T.children(".content-open").css("display","block");
+ }
+
+ // sync any 'pin buttons'
+ syncPinBtns(pane, !s.isSliding);
+
+ // update pane-state dimensions - BEFORE resizing content
+ $.extend(s, elDims($P));
+
+ if (state.initialized) {
+ // resize resizer & toggler sizes for all panes
+ sizeHandles();
+ // resize content every time pane opens - to be sure
+ sizeContent(pane, true); // true = remeasure headers/footers, even if 'pane.isMoving'
+ }
+
+ if (!skipCallback && (state.initialized || o.triggerEventsOnLoad) && $P.is(":visible")) {
+ // onopen callback
+ _runCallbacks("onopen_end", pane);
+ // onshow callback - TODO: should this be here?
+ if (s.isShowing) _runCallbacks("onshow_end", pane);
+
+ // ALSO call onresize because layout-size *may* have changed while pane was closed
+ if (state.initialized)
+ _runCallbacks("onresize_end", pane);
+ }
+
+ // TODO: Somehow sizePane("north") is being called after this point???
+ }
+
+
+ /**
+ * slideOpen / slideClose / slideToggle
+ *
+ * Pass-though methods for sliding
+ */
+, slideOpen = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var evt = evtObj(evt_or_pane)
+ , pane = evtPane.call(this, evt_or_pane)
+ , s = state[pane]
+ , delay = options[pane].slideDelay_open
+ ;
+ if (pane === "center") return; // validate
+ // prevent event from triggering on NEW resizer binding created below
+ if (evt) evt.stopImmediatePropagation();
+
+ if (s.isClosed && evt && evt.type === "mouseenter" && delay > 0)
+ // trigger = mouseenter - use a delay
+ timer.set(pane+"_openSlider", open_NOW, delay);
+ else
+ open_NOW(); // will unbind events if is already open
+
+ /**
+ * SUBROUTINE for timed open
+ */
+ function open_NOW () {
+ if (!s.isClosed) // skip if no longer closed!
+ bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
+ else if (!s.isMoving)
+ open(pane, true); // true = slide - open() will handle binding
+ };
+ }
+
+, slideClose = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var evt = evtObj(evt_or_pane)
+ , pane = evtPane.call(this, evt_or_pane)
+ , o = options[pane]
+ , s = state[pane]
+ , delay = s.isMoving ? 1000 : 300 // MINIMUM delay - option may override
+ ;
+ if (pane === "center") return; // validate
+ if (s.isClosed || s.isResizing)
+ return; // skip if already closed OR in process of resizing
+ else if (o.slideTrigger_close === "click")
+ close_NOW(); // close immediately onClick
+ else if (o.preventQuickSlideClose && s.isMoving)
+ return; // handle Chrome quick-close on slide-open
+ else if (o.preventPrematureSlideClose && evt && $.layout.isMouseOverElem(evt, $Ps[pane]))
+ return; // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
+ else if (evt) // trigger = mouseleave - use a delay
+ // 1 sec delay if 'opening', else .3 sec
+ timer.set(pane+"_closeSlider", close_NOW, max(o.slideDelay_close, delay));
+ else // called programically
+ close_NOW();
+
+ /**
+ * SUBROUTINE for timed close
+ */
+ function close_NOW () {
+ if (s.isClosed) // skip 'close' if already closed!
+ bindStopSlidingEvents(pane, false); // UNBIND trigger events - TODO: is this needed here?
+ else if (!s.isMoving)
+ close(pane); // close will handle unbinding
+ };
+ }
+
+ /**
+ * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
+ */
+, slideToggle = function (evt_or_pane) {
+ var pane = evtPane.call(this, evt_or_pane);
+ toggle(pane, true);
+ }
+
+
+ /**
+ * Must set left/top on East/South panes so animation will work properly
+ *
+ * @param {string} pane The pane to lock, 'east' or 'south' - any other is ignored!
+ * @param {boolean} doLock true = set left/top, false = remove
+ */
+, lockPaneForFX = function (pane, doLock) {
+ var $P = $Ps[pane]
+ , s = state[pane]
+ , o = options[pane]
+ , z = options.zIndexes
+ ;
+ if (doLock) {
+ showMasks( pane, { animation: true, objectsOnly: true });
+ $P.css({ zIndex: z.pane_animate }); // overlay all elements during animation
+ if (pane=="south")
+ $P.css({ top: sC.inset.top + sC.innerHeight - $P.outerHeight() });
+ else if (pane=="east")
+ $P.css({ left: sC.inset.left + sC.innerWidth - $P.outerWidth() });
+ }
+ else { // animation DONE - RESET CSS
+ hideMasks();
+ $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) });
+ if (pane=="south")
+ $P.css({ top: "auto" });
+ // if pane is positioned 'off-screen', then DO NOT screw with it!
+ else if (pane=="east" && !$P.css("left").match(/\-99999/))
+ $P.css({ left: "auto" });
+ // fix anti-aliasing in IE - only needed for animations that change opacity
+ if (browser.msie && o.fxOpacityFix && o.fxName_open != "slide" && $P.css("filter") && $P.css("opacity") == 1)
+ $P[0].style.removeAttribute('filter');
+ }
+ }
+
+
+ /**
+ * Toggle sliding functionality of a specific pane on/off by adding removing 'slide open' trigger
+ *
+ * @see open(), close()
+ * @param {string} pane The pane to enable/disable, 'north', 'south', etc.
+ * @param {boolean} enable Enable or Disable sliding?
+ */
+, bindStartSlidingEvents = function (pane, enable) {
+ var o = options[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , evtName = o.slideTrigger_open.toLowerCase()
+ ;
+ if (!$R || (enable && !o.slidable)) return;
+
+ // make sure we have a valid event
+ if (evtName.match(/mouseover/))
+ evtName = o.slideTrigger_open = "mouseenter";
+ else if (!evtName.match(/(click|dblclick|mouseenter)/))
+ evtName = o.slideTrigger_open = "click";
+
+ // must remove double-click-toggle when using dblclick-slide
+ if (o.resizerDblClickToggle && evtName.match(/click/)) {
+ $R[enable ? "unbind" : "bind"]('dblclick.'+ sID, toggle)
+ }
+
+ $R
+ // add or remove event
+ [enable ? "bind" : "unbind"](evtName +'.'+ sID, slideOpen)
+ // set the appropriate cursor & title/tip
+ .css("cursor", enable ? o.sliderCursor : "default")
+ .attr("title", enable ? o.tips.Slide : "")
+ ;
+ }
+
+ /**
+ * Add or remove 'mouseleave' events to 'slide close' when pane is 'sliding' open or closed
+ * Also increases zIndex when pane is sliding open
+ * See bindStartSlidingEvents for code to control 'slide open'
+ *
+ * @see slideOpen(), slideClose()
+ * @param {string} pane The pane to process, 'north', 'south', etc.
+ * @param {boolean} enable Enable or Disable events?
+ */
+, bindStopSlidingEvents = function (pane, enable) {
+ var o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , z = options.zIndexes
+ , evtName = o.slideTrigger_close.toLowerCase()
+ , action = (enable ? "bind" : "unbind")
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ ;
+ timer.clear(pane+"_closeSlider"); // just in case
+
+ if (enable) {
+ s.isSliding = true;
+ state.panesSliding[pane] = true;
+ // remove 'slideOpen' event from resizer
+ // ALSO will raise the zIndex of the pane & resizer
+ bindStartSlidingEvents(pane, false);
+ }
+ else {
+ s.isSliding = false;
+ delete state.panesSliding[pane];
+ }
+
+ // RE/SET zIndex - increases when pane is sliding-open, resets to normal when not
+ $P.css("zIndex", enable ? z.pane_sliding : z.pane_normal);
+ $R.css("zIndex", enable ? z.pane_sliding+2 : z.resizer_normal); // NOTE: mask = pane_sliding+1
+
+ // make sure we have a valid event
+ if (!evtName.match(/(click|mouseleave)/))
+ evtName = o.slideTrigger_close = "mouseleave"; // also catches 'mouseout'
+
+ // add/remove slide triggers
+ $R[action](evtName, slideClose); // base event on resize
+ // need extra events for mouseleave
+ if (evtName === "mouseleave") {
+ // also close on pane.mouseleave
+ $P[action]("mouseleave."+ sID, slideClose);
+ // cancel timer when mouse moves between 'pane' and 'resizer'
+ $R[action]("mouseenter."+ sID, cancelMouseOut);
+ $P[action]("mouseenter."+ sID, cancelMouseOut);
+ }
+
+ if (!enable)
+ timer.clear(pane+"_closeSlider");
+ else if (evtName === "click" && !o.resizable) {
+ // IF pane is not resizable (which already has a cursor and tip)
+ // then set the a cursor & title/tip on resizer when sliding
+ $R.css("cursor", enable ? o.sliderCursor : "default");
+ $R.attr("title", enable ? o.tips.Close : ""); // use Toggler-tip, eg: "Close Pane"
+ }
+
+ // SUBROUTINE for mouseleave timer clearing
+ function cancelMouseOut (evt) {
+ timer.clear(pane+"_closeSlider");
+ evt.stopPropagation();
+ }
+ }
+
+
+ /**
+ * Hides/closes a pane if there is insufficient room - reverses this when there is room again
+ * MUST have already called setSizeLimits() before calling this method
+ *
+ * @param {string} pane The pane being resized
+ * @param {boolean=} [isOpening=false] Called from onOpen?
+ * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
+ * @param {boolean=} [force=false]
+ */
+, makePaneFit = function (pane, isOpening, skipCallback, force) {
+ var o = options[pane]
+ , s = state[pane]
+ , c = _c[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , isSidePane = c.dir==="vert"
+ , hasRoom = false
+ ;
+ // special handling for center & east/west panes
+ if (pane === "center" || (isSidePane && s.noVerticalRoom)) {
+ // see if there is enough room to display the pane
+ // ERROR: hasRoom = s.minHeight <= s.maxHeight && (isSidePane || s.minWidth <= s.maxWidth);
+ hasRoom = (s.maxHeight >= 0);
+ if (hasRoom && s.noRoom) { // previously hidden due to noRoom, so show now
+ _showPane(pane);
+ if ($R) $R.show();
+ s.isVisible = true;
+ s.noRoom = false;
+ if (isSidePane) s.noVerticalRoom = false;
+ _fixIframe(pane);
+ }
+ else if (!hasRoom && !s.noRoom) { // not currently hidden, so hide now
+ _hidePane(pane);
+ if ($R) $R.hide();
+ s.isVisible = false;
+ s.noRoom = true;
+ }
+ }
+
+ // see if there is enough room to fit the border-pane
+ if (pane === "center") {
+ // ignore center in this block
+ }
+ else if (s.minSize <= s.maxSize) { // pane CAN fit
+ hasRoom = true;
+ if (s.size > s.maxSize) // pane is too big - shrink it
+ sizePane(pane, s.maxSize, skipCallback, true, force); // true = noAnimation
+ else if (s.size < s.minSize) // pane is too small - enlarge it
+ sizePane(pane, s.minSize, skipCallback, true, force); // true = noAnimation
+ // need s.isVisible because new pseudoClose method keeps pane visible, but off-screen
+ else if ($R && s.isVisible && $P.is(":visible")) {
+ // make sure resizer-bar is positioned correctly
+ // handles situation where nested layout was 'hidden' when initialized
+ var pos = s.size + sC.inset[c.side];
+ if ($.layout.cssNum( $R, c.side ) != pos) $R.css( c.side, pos );
+ }
+
+ // if was previously hidden due to noRoom, then RESET because NOW there is room
+ if (s.noRoom) {
+ // s.noRoom state will be set by open or show
+ if (s.wasOpen && o.closable) {
+ if (o.autoReopen)
+ open(pane, false, true, true); // true = noAnimation, true = noAlert
+ else // leave the pane closed, so just update state
+ s.noRoom = false;
+ }
+ else
+ show(pane, s.wasOpen, true, true); // true = noAnimation, true = noAlert
+ }
+ }
+ else { // !hasRoom - pane CANNOT fit
+ if (!s.noRoom) { // pane not set as noRoom yet, so hide or close it now...
+ s.noRoom = true; // update state
+ s.wasOpen = !s.isClosed && !s.isSliding;
+ if (s.isClosed){} // SKIP
+ else if (o.closable) // 'close' if possible
+ close(pane, true, true); // true = force, true = noAnimation
+ else // 'hide' pane if cannot just be closed
+ hide(pane, true); // true = noAnimation
+ }
+ }
+ }
+
+
+ /**
+ * manualSizePane is an exposed flow-through method allowing extra code when pane is 'manually resized'
+ *
+ * @param {(string|Object)} evt_or_pane The pane being resized
+ * @param {number} size The *desired* new size for this pane - will be validated
+ * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
+ * @param {boolean=} [noAnimation=false]
+ * @param {boolean=} [force=false] Force resizing even if does not seem necessary
+ */
+, manualSizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , o = options[pane]
+ , s = state[pane]
+ // if resizing callbacks have been delayed and resizing is now DONE, force resizing to complete...
+ , forceResize = force || (o.livePaneResizing && !s.isResizing)
+ ;
+ if (pane === "center") return; // validate
+ // ANY call to manualSizePane disables autoResize - ie, percentage sizing
+ s.autoResize = false;
+ // flow-through...
+ sizePane(pane, size, skipCallback, noAnimation, forceResize); // will animate resize if option enabled
+ }
+
+ /**
+ * sizePane is called only by internal methods whenever a pane needs to be resized
+ *
+ * @param {(string|Object)} evt_or_pane The pane being resized
+ * @param {number} size The *desired* new size for this pane - will be validated
+ * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
+ * @param {boolean=} [noAnimation=false]
+ * @param {boolean=} [force=false] Force resizing even if does not seem necessary
+ */
+, sizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane) // probably NEVER called from event?
+ , o = options[pane]
+ , s = state[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , side = _c[pane].side
+ , dimName = _c[pane].sizeType.toLowerCase()
+ , skipResizeWhileDragging = s.isResizing && !o.triggerEventsDuringLiveResize
+ , doFX = noAnimation !== true && o.animatePaneSizing
+ , oldSize, newSize
+ ;
+ if (pane === "center") return; // validate
+ // QUEUE in case another action/animation is in progress
+ $N.queue(function( queueNext ){
+ // calculate 'current' min/max sizes
+ setSizeLimits(pane); // update pane-state
+ oldSize = s.size;
+ size = _parseSize(pane, size); // handle percentages & auto
+ size = max(size, _parseSize(pane, o.minSize));
+ size = min(size, s.maxSize);
+ if (size < s.minSize) { // not enough room for pane!
+ queueNext(); // call before makePaneFit() because it needs the queue free
+ makePaneFit(pane, false, skipCallback); // will hide or close pane
+ return;
+ }
+
+ // IF newSize is same as oldSize, then nothing to do - abort
+ if (!force && size === oldSize)
+ return queueNext();
+
+ s.newSize = size;
+
+ // onresize_start callback CANNOT cancel resizing because this would break the layout!
+ if (!skipCallback && state.initialized && s.isVisible)
+ _runCallbacks("onresize_start", pane);
+
+ // resize the pane, and make sure its visible
+ newSize = cssSize(pane, size);
+
+ if (doFX && $P.is(":visible")) { // ANIMATE
+ var fx = $.layout.effects.size[pane] || $.layout.effects.size.all
+ , easing = o.fxSettings_size.easing || fx.easing
+ , z = options.zIndexes
+ , props = {};
+ props[ dimName ] = newSize +'px';
+ s.isMoving = true;
+ // overlay all elements during animation
+ $P.css({ zIndex: z.pane_animate })
+ .show().animate( props, o.fxSpeed_size, easing, function(){
+ // reset zIndex after animation
+ $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) });
+ s.isMoving = false;
+ delete s.newSize;
+ sizePane_2(); // continue
+ queueNext();
+ });
+ }
+ else { // no animation
+ $P.css( dimName, newSize ); // resize pane
+ delete s.newSize;
+ // if pane is visible, then
+ if ($P.is(":visible"))
+ sizePane_2(); // continue
+ else {
+ // pane is NOT VISIBLE, so just update state data...
+ // when pane is *next opened*, it will have the new size
+ s.size = size; // update state.size
+ //$.extend(s, elDims($P)); // update state dimensions - CANNOT do this when not visible! }
+ }
+ queueNext();
+ };
+
+ });
+
+ // SUBROUTINE
+ function sizePane_2 () {
+ /* Panes are sometimes not sized precisely in some browsers!?
+ * This code will resize the pane up to 3 times to nudge the pane to the correct size
+ */
+ var actual = dimName==='width' ? $P.outerWidth() : $P.outerHeight()
+ , tries = [{
+ pane: pane
+ , count: 1
+ , target: size
+ , actual: actual
+ , correct: (size === actual)
+ , attempt: size
+ , cssSize: newSize
+ }]
+ , lastTry = tries[0]
+ , thisTry = {}
+ , msg = 'Inaccurate size after resizing the '+ pane +'-pane.'
+ ;
+ while ( !lastTry.correct ) {
+ thisTry = { pane: pane, count: lastTry.count+1, target: size };
+
+ if (lastTry.actual > size)
+ thisTry.attempt = max(0, lastTry.attempt - (lastTry.actual - size));
+ else // lastTry.actual < size
+ thisTry.attempt = max(0, lastTry.attempt + (size - lastTry.actual));
+
+ thisTry.cssSize = cssSize(pane, thisTry.attempt);
+ $P.css( dimName, thisTry.cssSize );
+
+ thisTry.actual = dimName=='width' ? $P.outerWidth() : $P.outerHeight();
+ thisTry.correct = (size === thisTry.actual);
+
+ // log attempts and alert the user of this *non-fatal error* (if showDebugMessages)
+ if ( tries.length === 1) {
+ _log(msg, false, true);
+ _log(lastTry, false, true);
+ }
+ _log(thisTry, false, true);
+ // after 4 tries, is as close as its gonna get!
+ if (tries.length > 3) break;
+
+ tries.push( thisTry );
+ lastTry = tries[ tries.length - 1 ];
+ }
+ // END TESTING CODE
+
+ // update pane-state dimensions
+ s.size = size;
+ $.extend(s, elDims($P));
+
+ if (s.isVisible && $P.is(":visible")) {
+ // reposition the resizer-bar
+ if ($R) $R.css( side, size + sC.inset[side] );
+ // resize the content-div
+ sizeContent(pane);
+ }
+
+ if (!skipCallback && !skipResizeWhileDragging && state.initialized && s.isVisible)
+ _runCallbacks("onresize_end", pane);
+
+ // resize all the adjacent panes, and adjust their toggler buttons
+ // when skipCallback passed, it means the controlling method will handle 'other panes'
+ if (!skipCallback) {
+ // also no callback if live-resize is in progress and NOT triggerEventsDuringLiveResize
+ if (!s.isSliding) sizeMidPanes(_c[pane].dir=="horz" ? "" : "center", skipResizeWhileDragging, force);
+ sizeHandles();
+ }
+
+ // if opposite-pane was autoClosed, see if it can be autoOpened now
+ var altPane = _c.oppositeEdge[pane];
+ if (size < oldSize && state[ altPane ].noRoom) {
+ setSizeLimits( altPane );
+ makePaneFit( altPane, false, skipCallback );
+ }
+
+ // DEBUG - ALERT user/developer so they know there was a sizing problem
+ if (tries.length > 1)
+ _log(msg +'\nSee the Error Console for details.', true, true);
+ }
+ }
+
+ /**
+ * @see initPanes(), sizePane(), resizeAll(), open(), close(), hide()
+ * @param {(Array.<string>|string)} panes The pane(s) being resized, comma-delmited string
+ * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
+ * @param {boolean=} [force=false]
+ */
+, sizeMidPanes = function (panes, skipCallback, force) {
+ panes = (panes ? panes : "east,west,center").split(",");
+
+ $.each(panes, function (i, pane) {
+ if (!$Ps[pane]) return; // NO PANE - skip
+ var
+ o = options[pane]
+ , s = state[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , isCenter= (pane=="center")
+ , hasRoom = true
+ , CSS = {}
+ // if pane is not visible, show it invisibly NOW rather than for *each call* in this script
+ , visCSS = $.layout.showInvisibly($P)
+
+ , newCenter = calcNewCenterPaneDims()
+ ;
+
+ // update pane-state dimensions
+ $.extend(s, elDims($P));
+
+ if (pane === "center") {
+ if (!force && s.isVisible && newCenter.width === s.outerWidth && newCenter.height === s.outerHeight) {
+ $P.css(visCSS);
+ return true; // SKIP - pane already the correct size
+ }
+ // set state for makePaneFit() logic
+ $.extend(s, cssMinDims(pane), {
+ maxWidth: newCenter.width
+ , maxHeight: newCenter.height
+ });
+ CSS = newCenter;
+ s.newWidth = CSS.width;
+ s.newHeight = CSS.height;
+ // convert OUTER width/height to CSS width/height
+ CSS.width = cssW($P, CSS.width);
+ // NEW - allow pane to extend 'below' visible area rather than hide it
+ CSS.height = cssH($P, CSS.height);
+ hasRoom = CSS.width >= 0 && CSS.height >= 0; // height >= 0 = ALWAYS TRUE NOW
+
+ // during layout init, try to shrink east/west panes to make room for center
+ if (!state.initialized && o.minWidth > newCenter.width) {
+ var
+ reqPx = o.minWidth - s.outerWidth
+ , minE = options.east.minSize || 0
+ , minW = options.west.minSize || 0
+ , sizeE = state.east.size
+ , sizeW = state.west.size
+ , newE = sizeE
+ , newW = sizeW
+ ;
+ if (reqPx > 0 && state.east.isVisible && sizeE > minE) {
+ newE = max( sizeE-minE, sizeE-reqPx );
+ reqPx -= sizeE-newE;
+ }
+ if (reqPx > 0 && state.west.isVisible && sizeW > minW) {
+ newW = max( sizeW-minW, sizeW-reqPx );
+ reqPx -= sizeW-newW;
+ }
+ // IF we found enough extra space, then resize the border panes as calculated
+ if (reqPx === 0) {
+ if (sizeE && sizeE != minE)
+ sizePane('east', newE, true, true, force); // true = skipCallback/noAnimation - initPanes will handle when done
+ if (sizeW && sizeW != minW)
+ sizePane('west', newW, true, true, force); // true = skipCallback/noAnimation
+ // now start over!
+ sizeMidPanes('center', skipCallback, force);
+ $P.css(visCSS);
+ return; // abort this loop
+ }
+ }
+ }
+ else { // for east and west, set only the height, which is same as center height
+ // set state.min/maxWidth/Height for makePaneFit() logic
+ if (s.isVisible && !s.noVerticalRoom)
+ $.extend(s, elDims($P), cssMinDims(pane))
+ if (!force && !s.noVerticalRoom && newCenter.height === s.outerHeight) {
+ $P.css(visCSS);
+ return true; // SKIP - pane already the correct size
+ }
+ // east/west have same top, bottom & height as center
+ CSS.top = newCenter.top;
+ CSS.bottom = newCenter.bottom;
+ s.newSize = newCenter.height
+ // NEW - allow pane to extend 'below' visible area rather than hide it
+ CSS.height = cssH($P, newCenter.height);
+ s.maxHeight = CSS.height;
+ hasRoom = (s.maxHeight >= 0); // ALWAYS TRUE NOW
+ if (!hasRoom) s.noVerticalRoom = true; // makePaneFit() logic
+ }
+
+ if (hasRoom) {
+ // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized
+ if (!skipCallback && state.initialized)
+ _runCallbacks("onresize_start", pane);
+
+ $P.css(CSS); // apply the CSS to pane
+ if (pane !== "center")
+ sizeHandles(pane); // also update resizer length
+ if (s.noRoom && !s.isClosed && !s.isHidden)
+ makePaneFit(pane); // will re-open/show auto-closed/hidden pane
+ if (s.isVisible) {
+ $.extend(s, elDims($P)); // update pane dimensions
+ if (state.initialized) sizeContent(pane); // also resize the contents, if exists
+ }
+ }
+ else if (!s.noRoom && s.isVisible) // no room for pane
+ makePaneFit(pane); // will hide or close pane
+
+ // reset visibility, if necessary
+ $P.css(visCSS);
+
+ delete s.newSize;
+ delete s.newWidth;
+ delete s.newHeight;
+
+ if (!s.isVisible)
+ return true; // DONE - next pane
+
+ /*
+ * Extra CSS for IE6 or IE7 in Quirks-mode - add 'width' to NORTH/SOUTH panes
+ * Normally these panes have only 'left' & 'right' positions so pane auto-sizes
+ * ALSO required when pane is an IFRAME because will NOT default to 'full width'
+ * TODO: Can I use width:100% for a north/south iframe?
+ * TODO: Sounds like a job for $P.outerWidth( sC.innerWidth ) SETTER METHOD
+ */
+ if (pane === "center") { // finished processing midPanes
+ var fix = browser.isIE6 || !browser.boxModel;
+ if ($Ps.north && (fix || state.north.tagName=="IFRAME"))
+ $Ps.north.css("width", cssW($Ps.north, sC.innerWidth));
+ if ($Ps.south && (fix || state.south.tagName=="IFRAME"))
+ $Ps.south.css("width", cssW($Ps.south, sC.innerWidth));
+ }
+
+ // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized
+ if (!skipCallback && state.initialized)
+ _runCallbacks("onresize_end", pane);
+ });
+ }
+
+
+ /**
+ * @see window.onresize(), callbacks or custom code
+ * @param {(Object|boolean)=} evt_or_refresh If 'true', then also reset pane-positioning
+ */
+, resizeAll = function (evt_or_refresh) {
+ var oldW = sC.innerWidth
+ , oldH = sC.innerHeight
+ ;
+ // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
+ evtPane(evt_or_refresh);
+
+ // cannot size layout when 'container' is hidden or collapsed
+ if (!$N.is(":visible")) return;
+
+ if (!state.initialized) {
+ _initLayoutElements();
+ return; // no need to resize since we just initialized!
+ }
+
+ if (evt_or_refresh === true && $.isPlainObject(options.outset)) {
+ // update container CSS in case outset option has changed
+ $N.css( options.outset );
+ }
+ // UPDATE container dimensions
+ $.extend(sC, elDims( $N, options.inset ));
+ if (!sC.outerHeight) return;
+
+ // if 'true' passed, refresh pane & handle positioning too
+ if (evt_or_refresh === true) {
+ setPanePosition();
+ }
+
+ // onresizeall_start will CANCEL resizing if returns false
+ // state.container has already been set, so user can access this info for calcuations
+ if (false === _runCallbacks("onresizeall_start")) return false;
+
+ var // see if container is now 'smaller' than before
+ shrunkH = (sC.innerHeight < oldH)
+ , shrunkW = (sC.innerWidth < oldW)
+ , $P, o, s
+ ;
+ // NOTE special order for sizing: S-N-E-W
+ $.each(["south","north","east","west"], function (i, pane) {
+ if (!$Ps[pane]) return; // no pane - SKIP
+ o = options[pane];
+ s = state[pane];
+ if (s.autoResize && s.size != o.size) // resize pane to original size set in options
+ sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize
+ else {
+ setSizeLimits(pane);
+ makePaneFit(pane, false, true, true); // true=skipCallback/forceResize
+ }
+ });
+
+ sizeMidPanes("", true, true); // true=skipCallback/forceResize
+ sizeHandles(); // reposition the toggler elements
+
+ // trigger all individual pane callbacks AFTER layout has finished resizing
+ $.each(_c.allPanes, function (i, pane) {
+ $P = $Ps[pane];
+ if (!$P) return; // SKIP
+ if (state[pane].isVisible) // undefined for non-existent panes
+ _runCallbacks("onresize_end", pane); // callback - if exists
+ });
+
+ _runCallbacks("onresizeall_end");
+ //_triggerLayoutEvent(pane, 'resizeall');
+ }
+
+ /**
+ * Whenever a pane resizes or opens that has a nested layout, trigger resizeAll
+ *
+ * @param {(string|Object)} evt_or_pane The pane just resized or opened
+ */
+, resizeChildren = function (evt_or_pane, skipRefresh) {
+ var pane = evtPane.call(this, evt_or_pane);
+
+ if (!options[pane].resizeChildren) return;
+
+ // ensure the pane-children are up-to-date
+ if (!skipRefresh) refreshChildren( pane );
+ var pC = children[pane];
+ if ($.isPlainObject( pC )) {
+ // resize one or more children
+ $.each( pC, function (key, child) {
+ if (!child.destroyed) child.resizeAll();
+ });
+ }
+ }
+
+ /**
+ * IF pane has a content-div, then resize all elements inside pane to fit pane-height
+ *
+ * @param {(string|Object)} evt_or_panes The pane(s) being resized
+ * @param {boolean=} [remeasure=false] Should the content (header/footer) be remeasured?
+ */
+, sizeContent = function (evt_or_panes, remeasure) {
+ if (!isInitialized()) return;
+
+ var panes = evtPane.call(this, evt_or_panes);
+ panes = panes ? panes.split(",") : _c.allPanes;
+
+ $.each(panes, function (idx, pane) {
+ var
+ $P = $Ps[pane]
+ , $C = $Cs[pane]
+ , o = options[pane]
+ , s = state[pane]
+ , m = s.content // m = measurements
+ ;
+ if (!$P || !$C || !$P.is(":visible")) return true; // NOT VISIBLE - skip
+
+ // if content-element was REMOVED, update OR remove the pointer
+ if (!$C.length) {
+ initContent(pane, false); // false = do NOT sizeContent() - already there!
+ if (!$C) return; // no replacement element found - pointer have been removed
+ }
+
+ // onsizecontent_start will CANCEL resizing if returns false
+ if (false === _runCallbacks("onsizecontent_start", pane)) return;
+
+ // skip re-measuring offsets if live-resizing
+ if ((!s.isMoving && !s.isResizing) || o.liveContentResizing || remeasure || m.top == undefined) {
+ _measure();
+ // if any footers are below pane-bottom, they may not measure correctly,
+ // so allow pane overflow and re-measure
+ if (m.hiddenFooters > 0 && $P.css("overflow") === "hidden") {
+ $P.css("overflow", "visible");
+ _measure(); // remeasure while overflowing
+ $P.css("overflow", "hidden");
+ }
+ }
+ // NOTE: spaceAbove/Below *includes* the pane paddingTop/Bottom, but not pane.borders
+ var newH = s.innerHeight - (m.spaceAbove - s.css.paddingTop) - (m.spaceBelow - s.css.paddingBottom);
+
+ if (!$C.is(":visible") || m.height != newH) {
+ // size the Content element to fit new pane-size - will autoHide if not enough room
+ setOuterHeight($C, newH, true); // true=autoHide
+ m.height = newH; // save new height
+ };
+
+ if (state.initialized)
+ _runCallbacks("onsizecontent_end", pane);
+
+ function _below ($E) {
+ return max(s.css.paddingBottom, (parseInt($E.css("marginBottom"), 10) || 0));
+ };
+
+ function _measure () {
+ var
+ ignore = options[pane].contentIgnoreSelector
+ , $Fs = $C.nextAll().not(".ui-layout-mask").not(ignore || ":lt(0)") // not :lt(0) = ALL
+ , $Fs_vis = $Fs.filter(':visible')
+ , $F = $Fs_vis.filter(':last')
+ ;
+ m = {
+ top: $C[0].offsetTop
+ , height: $C.outerHeight()
+ , numFooters: $Fs.length
+ , hiddenFooters: $Fs.length - $Fs_vis.length
+ , spaceBelow: 0 // correct if no content footer ($E)
+ }
+ m.spaceAbove = m.top; // just for state - not used in calc
+ m.bottom = m.top + m.height;
+ if ($F.length)
+ //spaceBelow = (LastFooter.top + LastFooter.height) [footerBottom] - Content.bottom + max(LastFooter.marginBottom, pane.paddingBotom)
+ m.spaceBelow = ($F[0].offsetTop + $F.outerHeight()) - m.bottom + _below($F);
+ else // no footer - check marginBottom on Content element itself
+ m.spaceBelow = _below($C);
+ };
+ });
+ }
+
+
+ /**
+ * Called every time a pane is opened, closed, or resized to slide the togglers to 'center' and adjust their length if necessary
+ *
+ * @see initHandles(), open(), close(), resizeAll()
+ * @param {(string|Object)=} evt_or_panes The pane(s) being resized
+ */
+, sizeHandles = function (evt_or_panes) {
+ var panes = evtPane.call(this, evt_or_panes)
+ panes = panes ? panes.split(",") : _c.borderPanes;
+
+ $.each(panes, function (i, pane) {
+ var
+ o = options[pane]
+ , s = state[pane]
+ , $P = $Ps[pane]
+ , $R = $Rs[pane]
+ , $T = $Ts[pane]
+ , $TC
+ ;
+ if (!$P || !$R) return;
+
+ var
+ dir = _c[pane].dir
+ , _state = (s.isClosed ? "_closed" : "_open")
+ , spacing = o["spacing"+ _state]
+ , togAlign = o["togglerAlign"+ _state]
+ , togLen = o["togglerLength"+ _state]
+ , paneLen
+ , left
+ , offset
+ , CSS = {}
+ ;
+
+ if (spacing === 0) {
+ $R.hide();
+ return;
+ }
+ else if (!s.noRoom && !s.isHidden) // skip if resizer was hidden for any reason
+ $R.show(); // in case was previously hidden
+
+ // Resizer Bar is ALWAYS same width/height of pane it is attached to
+ if (dir === "horz") { // north/south
+ //paneLen = $P.outerWidth(); // s.outerWidth ||
+ paneLen = sC.innerWidth; // handle offscreen-panes
+ s.resizerLength = paneLen;
+ left = $.layout.cssNum($P, "left")
+ $R.css({
+ width: cssW($R, paneLen) // account for borders & padding
+ , height: cssH($R, spacing) // ditto
+ , left: left > -9999 ? left : sC.inset.left // handle offscreen-panes
+ });
+ }
+ else { // east/west
+ paneLen = $P.outerHeight(); // s.outerHeight ||
+ s.resizerLength = paneLen;
+ $R.css({
+ height: cssH($R, paneLen) // account for borders & padding
+ , width: cssW($R, spacing) // ditto
+ , top: sC.inset.top + getPaneSize("north", true) // TODO: what if no North pane?
+ //, top: $.layout.cssNum($Ps["center"], "top")
+ });
+ }
+
+ // remove hover classes
+ removeHover( o, $R );
+
+ if ($T) {
+ if (togLen === 0 || (s.isSliding && o.hideTogglerOnSlide)) {
+ $T.hide(); // always HIDE the toggler when 'sliding'
+ return;
+ }
+ else
+ $T.show(); // in case was previously hidden
+
+ if (!(togLen > 0) || togLen === "100%" || togLen > paneLen) {
+ togLen = paneLen;
+ offset = 0;
+ }
+ else { // calculate 'offset' based on options.PANE.togglerAlign_open/closed
+ if (isStr(togAlign)) {
+ switch (togAlign) {
+ case "top":
+ case "left": offset = 0;
+ break;
+ case "bottom":
+ case "right": offset = paneLen - togLen;
+ break;
+ case "middle":
+ case "center":
+ default: offset = round((paneLen - togLen) / 2); // 'default' catches typos
+ }
+ }
+ else { // togAlign = number
+ var x = parseInt(togAlign, 10); //
+ if (togAlign >= 0) offset = x;
+ else offset = paneLen - togLen + x; // NOTE: x is negative!
+ }
+ }
+
+ if (dir === "horz") { // north/south
+ var width = cssW($T, togLen);
+ $T.css({
+ width: width // account for borders & padding
+ , height: cssH($T, spacing) // ditto
+ , left: offset // TODO: VERIFY that toggler positions correctly for ALL values
+ , top: 0
+ });
+ // CENTER the toggler content SPAN
+ $T.children(".content").each(function(){
+ $TC = $(this);
+ $TC.css("marginLeft", round((width-$TC.outerWidth())/2)); // could be negative
+ });
+ }
+ else { // east/west
+ var height = cssH($T, togLen);
+ $T.css({
+ height: height // account for borders & padding
+ , width: cssW($T, spacing) // ditto
+ , top: offset // POSITION the toggler
+ , left: 0
+ });
+ // CENTER the toggler content SPAN
+ $T.children(".content").each(function(){
+ $TC = $(this);
+ $TC.css("marginTop", round((height-$TC.outerHeight())/2)); // could be negative
+ });
+ }
+
+ // remove ALL hover classes
+ removeHover( 0, $T );
+ }
+
+ // DONE measuring and sizing this resizer/toggler, so can be 'hidden' now
+ if (!state.initialized && (o.initHidden || s.isHidden)) {
+ $R.hide();
+ if ($T) $T.hide();
+ }
+ });
+ }
+
+
+ /**
+ * @param {(string|Object)} evt_or_pane
+ */
+, enableClosable = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $T = $Ts[pane]
+ , o = options[pane]
+ ;
+ if (!$T) return;
+ o.closable = true;
+ $T .bind("click."+ sID, function(evt){ evt.stopPropagation(); toggle(pane); })
+ .css("visibility", "visible")
+ .css("cursor", "pointer")
+ .attr("title", state[pane].isClosed ? o.tips.Open : o.tips.Close) // may be blank
+ .show();
+ }
+ /**
+ * @param {(string|Object)} evt_or_pane
+ * @param {boolean=} [hide=false]
+ */
+, disableClosable = function (evt_or_pane, hide) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $T = $Ts[pane]
+ ;
+ if (!$T) return;
+ options[pane].closable = false;
+ // is closable is disable, then pane MUST be open!
+ if (state[pane].isClosed) open(pane, false, true);
+ $T .unbind("."+ sID)
+ .css("visibility", hide ? "hidden" : "visible") // instead of hide(), which creates logic issues
+ .css("cursor", "default")
+ .attr("title", "");
+ }
+
+
+ /**
+ * @param {(string|Object)} evt_or_pane
+ */
+, enableSlidable = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $R = $Rs[pane]
+ ;
+ if (!$R || !$R.data('draggable')) return;
+ options[pane].slidable = true;
+ if (state[pane].isClosed)
+ bindStartSlidingEvents(pane, true);
+ }
+ /**
+ * @param {(string|Object)} evt_or_pane
+ */
+, disableSlidable = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $R = $Rs[pane]
+ ;
+ if (!$R) return;
+ options[pane].slidable = false;
+ if (state[pane].isSliding)
+ close(pane, false, true);
+ else {
+ bindStartSlidingEvents(pane, false);
+ $R .css("cursor", "default")
+ .attr("title", "");
+ removeHover(null, $R[0]); // in case currently hovered
+ }
+ }
+
+
+ /**
+ * @param {(string|Object)} evt_or_pane
+ */
+, enableResizable = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $R = $Rs[pane]
+ , o = options[pane]
+ ;
+ if (!$R || !$R.data('draggable')) return;
+ o.resizable = true;
+ $R.draggable("enable");
+ if (!state[pane].isClosed)
+ $R .css("cursor", o.resizerCursor)
+ .attr("title", o.tips.Resize);
+ }
+ /**
+ * @param {(string|Object)} evt_or_pane
+ */
+, disableResizable = function (evt_or_pane) {
+ if (!isInitialized()) return;
+ var pane = evtPane.call(this, evt_or_pane)
+ , $R = $Rs[pane]
+ ;
+ if (!$R || !$R.data('draggable')) return;
+ options[pane].resizable = false;
+ $R .draggable("disable")
+ .css("cursor", "default")
+ .attr("title", "");
+ removeHover(null, $R[0]); // in case currently hovered
+ }
+
+
+ /**
+ * Move a pane from source-side (eg, west) to target-side (eg, east)
+ * If pane exists on target-side, move that to source-side, ie, 'swap' the panes
+ *
+ * @param {(string|Object)} evt_or_pane1 The pane/edge being swapped
+ * @param {string} pane2 ditto
+ */
+, swapPanes = function (evt_or_pane1, pane2) {
+ if (!isInitialized()) return;
+ var pane1 = evtPane.call(this, evt_or_pane1);
+ // change state.edge NOW so callbacks can know where pane is headed...
+ state[pane1].edge = pane2;
+ state[pane2].edge = pane1;
+ // run these even if NOT state.initialized
+ if (false === _runCallbacks("onswap_start", pane1)
+ || false === _runCallbacks("onswap_start", pane2)
+ ) {
+ state[pane1].edge = pane1; // reset
+ state[pane2].edge = pane2;
+ return;
+ }
+
+ var
+ oPane1 = copy( pane1 )
+ , oPane2 = copy( pane2 )
+ , sizes = {}
+ ;
+ sizes[pane1] = oPane1 ? oPane1.state.size : 0;
+ sizes[pane2] = oPane2 ? oPane2.state.size : 0;
+
+ // clear pointers & state
+ $Ps[pane1] = false;
+ $Ps[pane2] = false;
+ state[pane1] = {};
+ state[pane2] = {};
+
+ // ALWAYS remove the resizer & toggler elements
+ if ($Ts[pane1]) $Ts[pane1].remove();
+ if ($Ts[pane2]) $Ts[pane2].remove();
+ if ($Rs[pane1]) $Rs[pane1].remove();
+ if ($Rs[pane2]) $Rs[pane2].remove();
+ $Rs[pane1] = $Rs[pane2] = $Ts[pane1] = $Ts[pane2] = false;
+
+ // transfer element pointers and data to NEW Layout keys
+ move( oPane1, pane2 );
+ move( oPane2, pane1 );
+
+ // cleanup objects
+ oPane1 = oPane2 = sizes = null;
+
+ // make panes 'visible' again
+ if ($Ps[pane1]) $Ps[pane1].css(_c.visible);
+ if ($Ps[pane2]) $Ps[pane2].css(_c.visible);
+
+ // fix any size discrepancies caused by swap
+ resizeAll();
+
+ // run these even if NOT state.initialized
+ _runCallbacks("onswap_end", pane1);
+ _runCallbacks("onswap_end", pane2);
+
+ return;
+
+ function copy (n) { // n = pane
+ var
+ $P = $Ps[n]
+ , $C = $Cs[n]
+ ;
+ return !$P ? false : {
+ pane: n
+ , P: $P ? $P[0] : false
+ , C: $C ? $C[0] : false
+ , state: $.extend(true, {}, state[n])
+ , options: $.extend(true, {}, options[n])
+ }
+ };
+
+ function move (oPane, pane) {
+ if (!oPane) return;
+ var
+ P = oPane.P
+ , C = oPane.C
+ , oldPane = oPane.pane
+ , c = _c[pane]
+ // save pane-options that should be retained
+ , s = $.extend(true, {}, state[pane])
+ , o = options[pane]
+ // RETAIN side-specific FX Settings - more below
+ , fx = { resizerCursor: o.resizerCursor }
+ , re, size, pos
+ ;
+ $.each("fxName,fxSpeed,fxSettings".split(","), function (i, k) {
+ fx[k +"_open"] = o[k +"_open"];
+ fx[k +"_close"] = o[k +"_close"];
+ fx[k +"_size"] = o[k +"_size"];
+ });
+
+ // update object pointers and attributes
+ $Ps[pane] = $(P)
+ .data({
+ layoutPane: Instance[pane] // NEW pointer to pane-alias-object
+ , layoutEdge: pane
+ })
+ .css(_c.hidden)
+ .css(c.cssReq)
+ ;
+ $Cs[pane] = C ? $(C) : false;
+
+ // set options and state
+ options[pane] = $.extend(true, {}, oPane.options, fx);
+ state[pane] = $.extend(true, {}, oPane.state);
+
+ // change classNames on the pane, eg: ui-layout-pane-east ==> ui-layout-pane-west
+ re = new RegExp(o.paneClass +"-"+ oldPane, "g");
+ P.className = P.className.replace(re, o.paneClass +"-"+ pane);
+
+ // ALWAYS regenerate the resizer & toggler elements
+ initHandles(pane); // create the required resizer & toggler
+
+ // if moving to different orientation, then keep 'target' pane size
+ if (c.dir != _c[oldPane].dir) {
+ size = sizes[pane] || 0;
+ setSizeLimits(pane); // update pane-state
+ size = max(size, state[pane].minSize);
+ // use manualSizePane to disable autoResize - not useful after panes are swapped
+ manualSizePane(pane, size, true, true); // true/true = skipCallback/noAnimation
+ }
+ else // move the resizer here
+ $Rs[pane].css(c.side, sC.inset[c.side] + (state[pane].isVisible ? getPaneSize(pane) : 0));
+
+
+ // ADD CLASSNAMES & SLIDE-BINDINGS
+ if (oPane.state.isVisible && !s.isVisible)
+ setAsOpen(pane, true); // true = skipCallback
+ else {
+ setAsClosed(pane);
+ bindStartSlidingEvents(pane, true); // will enable events IF option is set
+ }
+
+ // DESTROY the object
+ oPane = null;
+ };
+ }
+
+
+ /**
+ * INTERNAL method to sync pin-buttons when pane is opened or closed
+ * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
+ *
+ * @see open(), setAsOpen(), setAsClosed()
+ * @param {string} pane These are the params returned to callbacks by layout()
+ * @param {boolean} doPin True means set the pin 'down', False means 'up'
+ */
+, syncPinBtns = function (pane, doPin) {
+ if ($.layout.plugins.buttons)
+ $.each(state[pane].pins, function (i, selector) {
+ $.layout.buttons.setPinState(Instance, $(selector), pane, doPin);
+ });
+ }
+
+; // END var DECLARATIONS
+
+ /**
+ * Capture keys when enableCursorHotkey - toggle pane if hotkey pressed
+ *
+ * @see document.keydown()
+ */
+ function keyDown (evt) {
+ if (!evt) return true;
+ var code = evt.keyCode;
+ if (code < 33) return true; // ignore special keys: ENTER, TAB, etc
+
+ var
+ PANE = {
+ 38: "north" // Up Cursor - $.ui.keyCode.UP
+ , 40: "south" // Down Cursor - $.ui.keyCode.DOWN
+ , 37: "west" // Left Cursor - $.ui.keyCode.LEFT
+ , 39: "east" // Right Cursor - $.ui.keyCode.RIGHT
+ }
+ , ALT = evt.altKey // no worky!
+ , SHIFT = evt.shiftKey
+ , CTRL = evt.ctrlKey
+ , CURSOR = (CTRL && code >= 37 && code <= 40)
+ , o, k, m, pane
+ ;
+
+ if (CURSOR && options[PANE[code]].enableCursorHotkey) // valid cursor-hotkey
+ pane = PANE[code];
+ else if (CTRL || SHIFT) // check to see if this matches a custom-hotkey
+ $.each(_c.borderPanes, function (i, p) { // loop each pane to check its hotkey
+ o = options[p];
+ k = o.customHotkey;
+ m = o.customHotkeyModifier; // if missing or invalid, treated as "CTRL+SHIFT"
+ if ((SHIFT && m=="SHIFT") || (CTRL && m=="CTRL") || (CTRL && SHIFT)) { // Modifier matches
+ if (k && code === (isNaN(k) || k <= 9 ? k.toUpperCase().charCodeAt(0) : k)) { // Key matches
+ pane = p;
+ return false; // BREAK
+ }
+ }
+ });
+
+ // validate pane
+ if (!pane || !$Ps[pane] || !options[pane].closable || state[pane].isHidden)
+ return true;
+
+ toggle(pane);
+
+ evt.stopPropagation();
+ evt.returnValue = false; // CANCEL key
+ return false;
+ };
+
+
+/*
+ * ######################################
+ * UTILITY METHODS
+ * called externally or by initButtons
+ * ######################################
+ */
+
+ /**
+ * Change/reset a pane overflow setting & zIndex to allow popups/drop-downs to work
+ *
+ * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event
+ */
+ function allowOverflow (el) {
+ if (!isInitialized()) return;
+ if (this && this.tagName) el = this; // BOUND to element
+ var $P;
+ if (isStr(el))
+ $P = $Ps[el];
+ else if ($(el).data("layoutRole"))
+ $P = $(el);
+ else
+ $(el).parents().each(function(){
+ if ($(this).data("layoutRole")) {
+ $P = $(this);
+ return false; // BREAK
+ }
+ });
+ if (!$P || !$P.length) return; // INVALID
+
+ var
+ pane = $P.data("layoutEdge")
+ , s = state[pane]
+ ;
+
+ // if pane is already raised, then reset it before doing it again!
+ // this would happen if allowOverflow is attached to BOTH the pane and an element
+ if (s.cssSaved)
+ resetOverflow(pane); // reset previous CSS before continuing
+
+ // if pane is raised by sliding or resizing, or its closed, then abort
+ if (s.isSliding || s.isResizing || s.isClosed) {
+ s.cssSaved = false;
+ return;
+ }
+
+ var
+ newCSS = { zIndex: (options.zIndexes.resizer_normal + 1) }
+ , curCSS = {}
+ , of = $P.css("overflow")
+ , ofX = $P.css("overflowX")
+ , ofY = $P.css("overflowY")
+ ;
+ // determine which, if any, overflow settings need to be changed
+ if (of != "visible") {
+ curCSS.overflow = of;
+ newCSS.overflow = "visible";
+ }
+ if (ofX && !ofX.match(/(visible|auto)/)) {
+ curCSS.overflowX = ofX;
+ newCSS.overflowX = "visible";
+ }
+ if (ofY && !ofY.match(/(visible|auto)/)) {
+ curCSS.overflowY = ofX;
+ newCSS.overflowY = "visible";
+ }
+
+ // save the current overflow settings - even if blank!
+ s.cssSaved = curCSS;
+
+ // apply new CSS to raise zIndex and, if necessary, make overflow 'visible'
+ $P.css( newCSS );
+
+ // make sure the zIndex of all other panes is normal
+ $.each(_c.allPanes, function(i, p) {
+ if (p != pane) resetOverflow(p);
+ });
+
+ };
+ /**
+ * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event
+ */
+ function resetOverflow (el) {
+ if (!isInitialized()) return;
+ if (this && this.tagName) el = this; // BOUND to element
+ var $P;
+ if (isStr(el))
+ $P = $Ps[el];
+ else if ($(el).data("layoutRole"))
+ $P = $(el);
+ else
+ $(el).parents().each(function(){
+ if ($(this).data("layoutRole")) {
+ $P = $(this);
+ return false; // BREAK
+ }
+ });
+ if (!$P || !$P.length) return; // INVALID
+
+ var
+ pane = $P.data("layoutEdge")
+ , s = state[pane]
+ , CSS = s.cssSaved || {}
+ ;
+ // reset the zIndex
+ if (!s.isSliding && !s.isResizing)
+ $P.css("zIndex", options.zIndexes.pane_normal);
+
+ // reset Overflow - if necessary
+ $P.css( CSS );
+
+ // clear var
+ s.cssSaved = false;
+ };
+
+/*
+ * #####################
+ * CREATE/RETURN LAYOUT
+ * #####################
+ */
+
+ // validate that container exists
+ var $N = $(this).eq(0); // FIRST matching Container element
+ if (!$N.length) {
+ return _log( options.errors.containerMissing );
+ };
+
+ // Users retrieve Instance of a layout with: $N.layout() OR $N.data("layout")
+ // return the Instance-pointer if layout has already been initialized
+ if ($N.data("layoutContainer") && $N.data("layout"))
+ return $N.data("layout"); // cached pointer
+
+ // init global vars
+ var
+ $Ps = {} // Panes x5 - set in initPanes()
+ , $Cs = {} // Content x5 - set in initPanes()
+ , $Rs = {} // Resizers x4 - set in initHandles()
+ , $Ts = {} // Togglers x4 - set in initHandles()
+ , $Ms = $([]) // Masks - up to 2 masks per pane (IFRAME + DIV)
+ // aliases for code brevity
+ , sC = state.container // alias for easy access to 'container dimensions'
+ , sID = state.id // alias for unique layout ID/namespace - eg: "layout435"
+ ;
+
+ // create Instance object to expose data & option Properties, and primary action Methods
+ var Instance = {
+ // layout data
+ options: options // property - options hash
+ , state: state // property - dimensions hash
+ // object pointers
+ , container: $N // property - object pointers for layout container
+ , panes: $Ps // property - object pointers for ALL Panes: panes.north, panes.center
+ , contents: $Cs // property - object pointers for ALL Content: contents.north, contents.center
+ , resizers: $Rs // property - object pointers for ALL Resizers, eg: resizers.north
+ , togglers: $Ts // property - object pointers for ALL Togglers, eg: togglers.north
+ // border-pane open/close
+ , hide: hide // method - ditto
+ , show: show // method - ditto
+ , toggle: toggle // method - pass a 'pane' ("north", "west", etc)
+ , open: open // method - ditto
+ , close: close // method - ditto
+ , slideOpen: slideOpen // method - ditto
+ , slideClose: slideClose // method - ditto
+ , slideToggle: slideToggle // method - ditto
+ // pane actions
+ , setSizeLimits: setSizeLimits // method - pass a 'pane' - update state min/max data
+ , _sizePane: sizePane // method -intended for user by plugins only!
+ , sizePane: manualSizePane // method - pass a 'pane' AND an 'outer-size' in pixels or percent, or 'auto'
+ , sizeContent: sizeContent // method - pass a 'pane'
+ , swapPanes: swapPanes // method - pass TWO 'panes' - will swap them
+ , showMasks: showMasks // method - pass a 'pane' OR list of panes - default = all panes with mask option set
+ , hideMasks: hideMasks // method - ditto'
+ // pane element methods
+ , initContent: initContent // method - ditto
+ , addPane: addPane // method - pass a 'pane'
+ , removePane: removePane // method - pass a 'pane' to remove from layout, add 'true' to delete the pane-elem
+ , createChildren: createChildren // method - pass a 'pane' and (optional) layout-options (OVERRIDES options[pane].children
+ , refreshChildren: refreshChildren // method - pass a 'pane' and a layout-instance
+ // special pane option setting
+ , enableClosable: enableClosable // method - pass a 'pane'
+ , disableClosable: disableClosable // method - ditto
+ , enableSlidable: enableSlidable // method - ditto
+ , disableSlidable: disableSlidable // method - ditto
+ , enableResizable: enableResizable // method - ditto
+ , disableResizable: disableResizable// method - ditto
+ // utility methods for panes
+ , allowOverflow: allowOverflow // utility - pass calling element (this)
+ , resetOverflow: resetOverflow // utility - ditto
+ // layout control
+ , destroy: destroy // method - no parameters
+ , initPanes: isInitialized // method - no parameters
+ , resizeAll: resizeAll // method - no parameters
+ // callback triggering
+ , runCallbacks: _runCallbacks // method - pass evtName & pane (if a pane-event), eg: trigger("onopen", "west")
+ // alias collections of options, state and children - created in addPane and extended elsewhere
+ , hasParentLayout: false // set by initContainer()
+ , children: children // pointers to child-layouts, eg: Instance.children.west.layoutName
+ , north: false // alias group: { name: pane, pane: $Ps[pane], options: options[pane], state: state[pane], children: children[pane] }
+ , south: false // ditto
+ , west: false // ditto
+ , east: false // ditto
+ , center: false // ditto
+ };
+
+ // create the border layout NOW
+ if (_create() === 'cancel') // onload_start callback returned false to CANCEL layout creation
+ return null;
+ else // true OR false -- if layout-elements did NOT init (hidden or do not exist), can auto-init later
+ return Instance; // return the Instance object
+
+}
+
+
+})( jQuery );
+
+
+
+
+/**
+ * jquery.layout.state 1.2
+ * $Date: 2014-08-30 08:00:00 (Sat, 30 Aug 2014) $
+ *
+ * Copyright (c) 2014
+ * Kevin Dalman (http://allpro.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * @requires: UI Layout 1.4.0 or higher
+ * @requires: $.ui.cookie (above)
+ *
+ * @see: http://groups.google.com/group/jquery-ui-layout
+ */
+;(function ($) {
+
+if (!$.layout) return;
+
+
+/**
+ * UI COOKIE UTILITY
+ *
+ * A $.cookie OR $.ui.cookie namespace *should be standard*, but until then...
+ * This creates $.ui.cookie so Layout does not need the cookie.jquery.js plugin
+ * NOTE: This utility is REQUIRED by the layout.state plugin
+ *
+ * Cookie methods in Layout are created as part of State Management
+ */
+if (!$.ui) $.ui = {};
+$.ui.cookie = {
+
+ // cookieEnabled is not in DOM specs, but DOES works in all browsers,including IE6
+ acceptsCookies: !!navigator.cookieEnabled
+
+, read: function (name) {
+ var
+ c = document.cookie
+ , cs = c ? c.split(';') : []
+ , pair, data, i
+ ;
+ for (i=0; pair=cs[i]; i++) {
+ data = $.trim(pair).split('='); // name=value => [ name, value ]
+ if (data[0] == name) // found the layout cookie
+ return decodeURIComponent(data[1]);
+ }
+ return null;
+ }
+
+, write: function (name, val, cookieOpts) {
+ var params = ""
+ , date = ""
+ , clear = false
+ , o = cookieOpts || {}
+ , x = o.expires || null
+ , t = $.type(x)
+ ;
+ if (t === "date")
+ date = x;
+ else if (t === "string" && x > 0) {
+ x = parseInt(x,10);
+ t = "number";
+ }
+ if (t === "number") {
+ date = new Date();
+ if (x > 0)
+ date.setDate(date.getDate() + x);
+ else {
+ date.setFullYear(1970);
+ clear = true;
+ }
+ }
+ if (date) params += ";expires="+ date.toUTCString();
+ if (o.path) params += ";path="+ o.path;
+ if (o.domain) params += ";domain="+ o.domain;
+ if (o.secure) params += ";secure";
+ document.cookie = name +"="+ (clear ? "" : encodeURIComponent( val )) + params; // write or clear cookie
+ }
+
+, clear: function (name) {
+ $.ui.cookie.write(name, "", {expires: -1});
+ }
+
+};
+// if cookie.jquery.js is not loaded, create an alias to replicate it
+// this may be useful to other plugins or code dependent on that plugin
+if (!$.cookie) $.cookie = function (k, v, o) {
+ var C = $.ui.cookie;
+ if (v === null)
+ C.clear(k);
+ else if (v === undefined)
+ return C.read(k);
+ else
+ C.write(k, v, o);
+};
+
+
+
+/**
+ * State-management options stored in options.stateManagement, which includes a .cookie hash
+ * Default options saves ALL KEYS for ALL PANES, ie: pane.size, pane.isClosed, pane.isHidden
+ *
+ * // STATE/COOKIE OPTIONS
+ * @example $(el).layout({
+ stateManagement: {
+ enabled: true
+ , stateKeys: "east.size,west.size,east.isClosed,west.isClosed"
+ , cookie: { name: "appLayout", path: "/" }
+ }
+ })
+ * @example $(el).layout({ stateManagement__enabled: true }) // enable auto-state-management using cookies
+ * @example $(el).layout({ stateManagement__cookie: { name: "appLayout", path: "/" } })
+ * @example $(el).layout({ stateManagement__cookie__name: "appLayout", stateManagement__cookie__path: "/" })
+ *
+ * // STATE/COOKIE METHODS
+ * @example myLayout.saveCookie( "west.isClosed,north.size,south.isHidden", {expires: 7} );
+ * @example myLayout.loadCookie();
+ * @example myLayout.deleteCookie();
+ * @example var JSON = myLayout.readState(); // CURRENT Layout State
+ * @example var JSON = myLayout.readCookie(); // SAVED Layout State (from cookie)
+ * @example var JSON = myLayout.state.stateData; // LAST LOADED Layout State (cookie saved in layout.state hash)
+ *
+ * CUSTOM STATE-MANAGEMENT (eg, saved in a database)
+ * @example var JSON = myLayout.readState( "west.isClosed,north.size,south.isHidden" );
+ * @example myLayout.loadState( JSON );
+ */
+
+// tell Layout that the state plugin is available
+$.layout.plugins.stateManagement = true;
+
+// Add State-Management options to layout.defaults
+$.layout.defaults.stateManagement = {
+ enabled: false // true = enable state-management, even if not using cookies
+, autoSave: true // Save a state-cookie when page exits?
+, autoLoad: true // Load the state-cookie when Layout inits?
+, animateLoad: true // animate panes when loading state into an active layout
+, includeChildren: true // recurse into child layouts to include their state as well
+ // List state-data to save - must be pane-specific
+, stateKeys: "north.size,south.size,east.size,west.size,"+
+ "north.isClosed,south.isClosed,east.isClosed,west.isClosed,"+
+ "north.isHidden,south.isHidden,east.isHidden,west.isHidden"
+, cookie: {
+ name: "" // If not specified, will use Layout.name, else just "Layout"
+ , domain: "" // blank = current domain
+ , path: "" // blank = current page, "/" = entire website
+ , expires: "" // 'days' to keep cookie - leave blank for 'session cookie'
+ , secure: false
+ }
+};
+
+// Set stateManagement as a 'layout-option', NOT a 'pane-option'
+$.layout.optionsMap.layout.push("stateManagement");
+// Update config so layout does not move options into the pane-default branch (panes)
+$.layout.config.optionRootKeys.push("stateManagement");
+
+/*
+ * State Management methods
+ */
+$.layout.state = {
+
+ /**
+ * Get the current layout state and save it to a cookie
+ *
+ * myLayout.saveCookie( keys, cookieOpts )
+ *
+ * @param {Object} inst
+ * @param {(string|Array)=} keys
+ * @param {Object=} cookieOpts
+ */
+ saveCookie: function (inst, keys, cookieOpts) {
+ var o = inst.options
+ , sm = o.stateManagement
+ , oC = $.extend(true, {}, sm.cookie, cookieOpts || null)
+ , data = inst.state.stateData = inst.readState( keys || sm.stateKeys ) // read current panes-state
+ ;
+ $.ui.cookie.write( oC.name || o.name || "Layout", $.layout.state.encodeJSON(data), oC );
+ return $.extend(true, {}, data); // return COPY of state.stateData data
+ }
+
+ /**
+ * Remove the state cookie
+ *
+ * @param {Object} inst
+ */
+, deleteCookie: function (inst) {
+ var o = inst.options;
+ $.ui.cookie.clear( o.stateManagement.cookie.name || o.name || "Layout" );
+ }
+
+ /**
+ * Read & return data from the cookie - as JSON
+ *
+ * @param {Object} inst
+ */
+, readCookie: function (inst) {
+ var o = inst.options;
+ var c = $.ui.cookie.read( o.stateManagement.cookie.name || o.name || "Layout" );
+ // convert cookie string back to a hash and return it
+ return c ? $.layout.state.decodeJSON(c) : {};
+ }
+
+ /**
+ * Get data from the cookie and USE IT to loadState
+ *
+ * @param {Object} inst
+ */
+, loadCookie: function (inst) {
+ var c = $.layout.state.readCookie(inst); // READ the cookie
+ if (c && !$.isEmptyObject( c )) {
+ inst.state.stateData = $.extend(true, {}, c); // SET state.stateData
+ inst.loadState(c); // LOAD the retrieved state
+ }
+ return c;
+ }
+
+ /**
+ * Update layout options from the cookie, if one exists
+ *
+ * @param {Object} inst
+ * @param {Object=} stateData
+ * @param {boolean=} animate
+ */
+, loadState: function (inst, data, opts) {
+ if (!$.isPlainObject( data ) || $.isEmptyObject( data )) return;
+
+ // normalize data & cache in the state object
+ data = inst.state.stateData = $.layout.transformData( data ); // panes = default subkey
+
+ // add missing/default state-restore options
+ var smo = inst.options.stateManagement;
+ opts = $.extend({
+ animateLoad: false //smo.animateLoad
+ , includeChildren: smo.includeChildren
+ }, opts );
+
+ if (!inst.state.initialized) {
+ /*
+ * layout NOT initialized, so just update its options
+ */
+ // MUST remove pane.children keys before applying to options
+ // use a copy so we don't remove keys from original data
+ var o = $.extend(true, {}, data);
+ //delete o.center; // center has no state-data - only children
+ $.each($.layout.config.allPanes, function (idx, pane) {
+ if (o[pane]) delete o[pane].children;
+ });
+ // update CURRENT layout-options with saved state data
+ $.extend(true, inst.options, o);
+ }
+ else {
+ /*
+ * layout already initialized, so modify layout's configuration
+ */
+ var noAnimate = !opts.animateLoad
+ , o, c, h, state, open
+ ;
+ $.each($.layout.config.borderPanes, function (idx, pane) {
+ o = data[ pane ];
+ if (!$.isPlainObject( o )) return; // no key, skip pane
+
+ s = o.size;
+ c = o.initClosed;
+ h = o.initHidden;
+ ar = o.autoResize
+ state = inst.state[pane];
+ open = state.isVisible;
+
+ // reset autoResize
+ if (ar)
+ state.autoResize = ar;
+ // resize BEFORE opening
+ if (!open)
+ inst._sizePane(pane, s, false, false, false); // false=skipCallback/noAnimation/forceResize
+ // open/close as necessary - DO NOT CHANGE THIS ORDER!
+ if (h === true) inst.hide(pane, noAnimate);
+ else if (c === true) inst.close(pane, false, noAnimate);
+ else if (c === false) inst.open (pane, false, noAnimate);
+ else if (h === false) inst.show (pane, false, noAnimate);
+ // resize AFTER any other actions
+ if (open)
+ inst._sizePane(pane, s, false, false, noAnimate); // animate resize if option passed
+ });
+
+ /*
+ * RECURSE INTO CHILD-LAYOUTS
+ */
+ if (opts.includeChildren) {
+ var paneStateChildren, childState;
+ $.each(inst.children, function (pane, paneChildren) {
+ paneStateChildren = data[pane] ? data[pane].children : 0;
+ if (paneStateChildren && paneChildren) {
+ $.each(paneChildren, function (stateKey, child) {
+ childState = paneStateChildren[stateKey];
+ if (child && childState)
+ child.loadState( childState );
+ });
+ }
+ });
+ }
+ }
+ }
+
+ /**
+ * Get the *current layout state* and return it as a hash
+ *
+ * @param {Object=} inst // Layout instance to get state for
+ * @param {object=} [opts] // State-Managements override options
+ */
+, readState: function (inst, opts) {
+ // backward compatility
+ if ($.type(opts) === 'string') opts = { keys: opts };
+ if (!opts) opts = {};
+ var sm = inst.options.stateManagement
+ , ic = opts.includeChildren
+ , recurse = ic !== undefined ? ic : sm.includeChildren
+ , keys = opts.stateKeys || sm.stateKeys
+ , alt = { isClosed: 'initClosed', isHidden: 'initHidden' }
+ , state = inst.state
+ , panes = $.layout.config.allPanes
+ , data = {}
+ , pair, pane, key, val
+ , ps, pC, child, array, count, branch
+ ;
+ if ($.isArray(keys)) keys = keys.join(",");
+ // convert keys to an array and change delimiters from '__' to '.'
+ keys = keys.replace(/__/g, ".").split(',');
+ // loop keys and create a data hash
+ for (var i=0, n=keys.length; i < n; i++) {
+ pair = keys[i].split(".");
+ pane = pair[0];
+ key = pair[1];
+ if ($.inArray(pane, panes) < 0) continue; // bad pane!
+ val = state[ pane ][ key ];
+ if (val == undefined) continue;
+ if (key=="isClosed" && state[pane]["isSliding"])
+ val = true; // if sliding, then *really* isClosed
+ ( data[pane] || (data[pane]={}) )[ alt[key] ? alt[key] : key ] = val;
+ }
+
+ // recurse into the child-layouts for each pane
+ if (recurse) {
+ $.each(panes, function (idx, pane) {
+ pC = inst.children[pane];
+ ps = state.stateData[pane];
+ if ($.isPlainObject( pC ) && !$.isEmptyObject( pC )) {
+ // ensure a key exists for this 'pane', eg: branch = data.center
+ branch = data[pane] || (data[pane] = {});
+ if (!branch.children) branch.children = {};
+ $.each( pC, function (key, child) {
+ // ONLY read state from an initialize layout
+ if ( child.state.initialized )
+ branch.children[ key ] = $.layout.state.readState( child );
+ // if we have PREVIOUS (onLoad) state for this child-layout, KEEP IT!
+ else if ( ps && ps.children && ps.children[ key ] ) {
+ branch.children[ key ] = $.extend(true, {}, ps.children[ key ] );
+ }
+ });
+ }
+ });
+ }
+
+ return data;
+ }
+
+ /**
+ * Stringify a JSON hash so can save in a cookie or db-field
+ */
+, encodeJSON: function (json) {
+ var local = window.JSON || {};
+ return (local.stringify || stringify)(json);
+
+ function stringify (h) {
+ var D=[], i=0, k, v, t // k = key, v = value
+ , a = $.isArray(h)
+ ;
+ for (k in h) {
+ v = h[k];
+ t = typeof v;
+ if (t == 'string') // STRING - add quotes
+ v = '"'+ v +'"';
+ else if (t == 'object') // SUB-KEY - recurse into it
+ v = parse(v);
+ D[i++] = (!a ? '"'+ k +'":' : '') + v;
+ }
+ return (a ? '[' : '{') + D.join(',') + (a ? ']' : '}');
+ };
+ }
+
+ /**
+ * Convert stringified JSON back to a hash object
+ * @see $.parseJSON(), adding in jQuery 1.4.1
+ */
+, decodeJSON: function (str) {
+ try { return $.parseJSON ? $.parseJSON(str) : window["eval"]("("+ str +")") || {}; }
+ catch (e) { return {}; }
+ }
+
+
+, _create: function (inst) {
+ var s = $.layout.state
+ , o = inst.options
+ , sm = o.stateManagement
+ ;
+ // ADD State-Management plugin methods to inst
+ $.extend( inst, {
+ // readCookie - update options from cookie - returns hash of cookie data
+ readCookie: function () { return s.readCookie(inst); }
+ // deleteCookie
+ , deleteCookie: function () { s.deleteCookie(inst); }
+ // saveCookie - optionally pass keys-list and cookie-options (hash)
+ , saveCookie: function (keys, cookieOpts) { return s.saveCookie(inst, keys, cookieOpts); }
+ // loadCookie - readCookie and use to loadState() - returns hash of cookie data
+ , loadCookie: function () { return s.loadCookie(inst); }
+ // loadState - pass a hash of state to use to update options
+ , loadState: function (stateData, opts) { s.loadState(inst, stateData, opts); }
+ // readState - returns hash of current layout-state
+ , readState: function (keys) { return s.readState(inst, keys); }
+ // add JSON utility methods too...
+ , encodeJSON: s.encodeJSON
+ , decodeJSON: s.decodeJSON
+ });
+
+ // init state.stateData key, even if plugin is initially disabled
+ inst.state.stateData = {};
+
+ // autoLoad MUST BE one of: data-array, data-hash, callback-function, or TRUE
+ if ( !sm.autoLoad ) return;
+
+ // When state-data exists in the autoLoad key USE IT,
+ // even if stateManagement.enabled == false
+ if ($.isPlainObject( sm.autoLoad )) {
+ if (!$.isEmptyObject( sm.autoLoad )) {
+ inst.loadState( sm.autoLoad );
+ }
+ }
+ else if ( sm.enabled ) {
+ // update the options from cookie or callback
+ // if options is a function, call it to get stateData
+ if ($.isFunction( sm.autoLoad )) {
+ var d = {};
+ try {
+ d = sm.autoLoad( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
+ } catch (e) {}
+ if (d && $.isPlainObject( d ) && !$.isEmptyObject( d ))
+ inst.loadState(d);
+ }
+ else // any other truthy value will trigger loadCookie
+ inst.loadCookie();
+ }
+ }
+
+, _unload: function (inst) {
+ var sm = inst.options.stateManagement;
+ if (sm.enabled && sm.autoSave) {
+ // if options is a function, call it to save the stateData
+ if ($.isFunction( sm.autoSave )) {
+ try {
+ sm.autoSave( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
+ } catch (e) {}
+ }
+ else // any truthy value will trigger saveCookie
+ inst.saveCookie();
+ }
+ }
+
+};
+
+// add state initialization method to Layout's onCreate array of functions
+$.layout.onCreate.push( $.layout.state._create );
+$.layout.onUnload.push( $.layout.state._unload );
+
+})( jQuery );
+
+
+
+/**
+ * @preserve jquery.layout.buttons 1.0
+ * $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
+ *
+ * Copyright (c) 2011
+ * Kevin Dalman (http://allpro.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * @dependancies: UI Layout 1.3.0.rc30.1 or higher
+ *
+ * @support: http://groups.google.com/group/jquery-ui-layout
+ *
+ * Docs: [ to come ]
+ * Tips: [ to come ]
+ */
+;(function ($) {
+
+if (!$.layout) return;
+
+
+// tell Layout that the state plugin is available
+$.layout.plugins.buttons = true;
+
+// Add State-Management options to layout.defaults
+$.layout.defaults.autoBindCustomButtons = false;
+// Set stateManagement as a layout-option, NOT a pane-option
+$.layout.optionsMap.layout.push("autoBindCustomButtons");
+
+var lang = $.layout.language;
+
+/*
+ * Button methods
+ */
+$.layout.buttons = {
+ // set data used by multiple methods below
+ config: {
+ borderPanes: "north,south,west,east"
+ }
+
+ /**
+ * Searches for .ui-layout-button-xxx elements and auto-binds them as layout-buttons
+ *
+ * @see _create()
+ */
+, init: function (inst) {
+ var pre = "ui-layout-button-"
+ , layout = inst.options.name || ""
+ , name;
+ $.each("toggle,open,close,pin,toggle-slide,open-slide".split(","), function (i, action) {
+ $.each($.layout.buttons.config.borderPanes.split(","), function (ii, pane) {
+ $("."+pre+action+"-"+pane).each(function(){
+ // if button was previously 'bound', data.layoutName was set, but is blank if layout has no 'name'
+ name = $(this).data("layoutName") || $(this).attr("layoutName");
+ if (name == undefined || name === layout)
+ inst.bindButton(this, action, pane);
+ });
+ });
+ });
+ }
+
+ /**
+ * Helper function to validate params received by addButton utilities
+ *
+ * Two classes are added to the element, based on the buttonClass...
+ * The type of button is appended to create the 2nd className:
+ * - ui-layout-button-pin
+ * - ui-layout-pane-button-toggle
+ * - ui-layout-pane-button-open
+ * - ui-layout-pane-button-close
+ *
+ * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
+ * @return {Array.<Object>} If both params valid, the element matching 'selector' in a jQuery wrapper - otherwise returns null
+ */
+, get: function (inst, selector, pane, action) {
+ var $E = $(selector)
+ , o = inst.options
+ , err = o.showErrorMessages
+ ;
+ if (!$E.length) { // element not found
+ if (err) alert(lang.errButton + lang.selector +": "+ selector);
+ }
+ else if ($.layout.buttons.config.borderPanes.indexOf(pane) === -1) { // invalid 'pane' sepecified
+ if (err) alert(lang.errButton + lang.pane +": "+ pane);
+ $E = $(""); // NO BUTTON
+ }
+ else { // VALID
+ var btn = o[pane].buttonClass +"-"+ action;
+ $E .addClass( btn +" "+ btn +"-"+ pane )
+ .data("layoutName", o.name); // add layout identifier - even if blank!
+ }
+ return $E;
+ }
+
+
+ /**
+ * NEW syntax for binding layout-buttons - will eventually replace addToggle, addOpen, etc.
+ *
+ * @param {(string|!Object)} sel jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} action
+ * @param {string} pane
+ */
+, bind: function (inst, sel, action, pane) {
+ var _ = $.layout.buttons;
+ switch (action.toLowerCase()) {
+ case "toggle": _.addToggle (inst, sel, pane); break;
+ case "open": _.addOpen (inst, sel, pane); break;
+ case "close": _.addClose (inst, sel, pane); break;
+ case "pin": _.addPin (inst, sel, pane); break;
+ case "toggle-slide": _.addToggle (inst, sel, pane, true); break;
+ case "open-slide": _.addOpen (inst, sel, pane, true); break;
+ }
+ return inst;
+ }
+
+ /**
+ * Add a custom Toggler button for a pane
+ *
+ * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
+ * @param {boolean=} slide true = slide-open, false = pin-open
+ */
+, addToggle: function (inst, selector, pane, slide) {
+ $.layout.buttons.get(inst, selector, pane, "toggle")
+ .click(function(evt){
+ inst.toggle(pane, !!slide);
+ evt.stopPropagation();
+ });
+ return inst;
+ }
+
+ /**
+ * Add a custom Open button for a pane
+ *
+ * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
+ * @param {boolean=} slide true = slide-open, false = pin-open
+ */
+, addOpen: function (inst, selector, pane, slide) {
+ $.layout.buttons.get(inst, selector, pane, "open")
+ .attr("title", lang.Open)
+ .click(function (evt) {
+ inst.open(pane, !!slide);
+ evt.stopPropagation();
+ });
+ return inst;
+ }
+
+ /**
+ * Add a custom Close button for a pane
+ *
+ * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
+ */
+, addClose: function (inst, selector, pane) {
+ $.layout.buttons.get(inst, selector, pane, "close")
+ .attr("title", lang.Close)
+ .click(function (evt) {
+ inst.close(pane);
+ evt.stopPropagation();
+ });
+ return inst;
+ }
+
+ /**
+ * Add a custom Pin button for a pane
+ *
+ * Four classes are added to the element, based on the paneClass for the associated pane...
+ * Assuming the default paneClass and the pin is 'up', these classes are added for a west-pane pin:
+ * - ui-layout-pane-pin
+ * - ui-layout-pane-west-pin
+ * - ui-layout-pane-pin-up
+ * - ui-layout-pane-west-pin-up
+ *
+ * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
+ * @param {string} pane Name of the pane the pin is for: 'north', 'south', etc.
+ */
+, addPin: function (inst, selector, pane) {
+ var $E = $.layout.buttons.get(inst, selector, pane, "pin");
+ if ($E.length) {
+ var s = inst.state[pane];
+ $E.click(function (evt) {
+ $.layout.buttons.setPinState(inst, $(this), pane, (s.isSliding || s.isClosed));
+ if (s.isSliding || s.isClosed) inst.open( pane ); // change from sliding to open
+ else inst.close( pane ); // slide-closed
+ evt.stopPropagation();
+ });
+ // add up/down pin attributes and classes
+ $.layout.buttons.setPinState(inst, $E, pane, (!s.isClosed && !s.isSliding));
+ // add this pin to the pane data so we can 'sync it' automatically
+ // PANE.pins key is an array so we can store multiple pins for each pane
+ s.pins.push( selector ); // just save the selector string
+ }
+ return inst;
+ }
+
+ /**
+ * Change the class of the pin button to make it look 'up' or 'down'
+ *
+ * @see addPin(), syncPins()
+ * @param {Array.<Object>} $Pin The pin-span element in a jQuery wrapper
+ * @param {string} pane These are the params returned to callbacks by layout()
+ * @param {boolean} doPin true = set the pin 'down', false = set it 'up'
+ */
+, setPinState: function (inst, $Pin, pane, doPin) {
+ var updown = $Pin.attr("pin");
+ if (updown && doPin === (updown=="down")) return; // already in correct state
+ var
+ pin = inst.options[pane].buttonClass +"-pin"
+ , side = pin +"-"+ pane
+ , UP = pin +"-up "+ side +"-up"
+ , DN = pin +"-down "+side +"-down"
+ ;
+ $Pin
+ .attr("pin", doPin ? "down" : "up") // logic
+ .attr("title", doPin ? lang.Unpin : lang.Pin)
+ .removeClass( doPin ? UP : DN )
+ .addClass( doPin ? DN : UP )
+ ;
+ }
+
+ /**
+ * INTERNAL function to sync 'pin buttons' when pane is opened or closed
+ * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
+ *
+ * @see open(), close()
+ * @param {string} pane These are the params returned to callbacks by layout()
+ * @param {boolean} doPin True means set the pin 'down', False means 'up'
+ */
+, syncPinBtns: function (inst, pane, doPin) {
+ // REAL METHOD IS _INSIDE_ LAYOUT - THIS IS HERE JUST FOR REFERENCE
+ $.each(state[pane].pins, function (i, selector) {
+ $.layout.buttons.setPinState(inst, $(selector), pane, doPin);
+ });
+ }
+
+
+, _load: function (inst) {
+ // ADD Button methods to Layout Instance
+ $.extend( inst, {
+ bindButton: function (selector, action, pane) { return $.layout.buttons.bind(inst, selector, action, pane); }
+ // DEPRECATED METHODS...
+ , addToggleBtn: function (selector, pane, slide) { return $.layout.buttons.addToggle(inst, selector, pane, slide); }
+ , addOpenBtn: function (selector, pane, slide) { return $.layout.buttons.addOpen(inst, selector, pane, slide); }
+ , addCloseBtn: function (selector, pane) { return $.layout.buttons.addClose(inst, selector, pane); }
+ , addPinBtn: function (selector, pane) { return $.layout.buttons.addPin(inst, selector, pane); }
+ });
+
+ // init state array to hold pin-buttons
+ for (var i=0; i<4; i++) {
+ var pane = $.layout.buttons.config.borderPanes[i];
+ inst.state[pane].pins = [];
+ }
+
+ // auto-init buttons onLoad if option is enabled
+ if ( inst.options.autoBindCustomButtons )
+ $.layout.buttons.init(inst);
+ }
+
+, _unload: function (inst) {
+ // TODO: unbind all buttons???
+ }
+
+};
+
+// add initialization method to Layout's onLoad array of functions
+$.layout.onLoad.push( $.layout.buttons._load );
+//$.layout.onUnload.push( $.layout.buttons._unload );
+
+})( jQuery );
+
+
+
+
+/**
+ * jquery.layout.browserZoom 1.0
+ * $Date: 2011-12-29 08:00:00 (Thu, 29 Dec 2011) $
+ *
+ * Copyright (c) 2012
+ * Kevin Dalman (http://allpro.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * @requires: UI Layout 1.3.0.rc30.1 or higher
+ *
+ * @see: http://groups.google.com/group/jquery-ui-layout
+ *
+ * TODO: Extend logic to handle other problematic zooming in browsers
+ * TODO: Add hotkey/mousewheel bindings to _instantly_ respond to these zoom event
+ */
+(function ($) {
+
+// tell Layout that the plugin is available
+$.layout.plugins.browserZoom = true;
+
+$.layout.defaults.browserZoomCheckInterval = 1000;
+$.layout.optionsMap.layout.push("browserZoomCheckInterval");
+
+/*
+ * browserZoom methods
+ */
+$.layout.browserZoom = {
+
+ _init: function (inst) {
+ // abort if browser does not need this check
+ if ($.layout.browserZoom.ratio() !== false)
+ $.layout.browserZoom._setTimer(inst);
+ }
+
+, _setTimer: function (inst) {
+ // abort if layout destroyed or browser does not need this check
+ if (inst.destroyed) return;
+ var o = inst.options
+ , s = inst.state
+ // don't need check if inst has parentLayout, but check occassionally in case parent destroyed!
+ // MINIMUM 100ms interval, for performance
+ , ms = inst.hasParentLayout ? 5000 : Math.max( o.browserZoomCheckInterval, 100 )
+ ;
+ // set the timer
+ setTimeout(function(){
+ if (inst.destroyed || !o.resizeWithWindow) return;
+ var d = $.layout.browserZoom.ratio();
+ if (d !== s.browserZoom) {
+ s.browserZoom = d;
+ inst.resizeAll();
+ }
+ // set a NEW timeout
+ $.layout.browserZoom._setTimer(inst);
+ }
+ , ms );
+ }
+
+, ratio: function () {
+ var w = window
+ , s = screen
+ , d = document
+ , dE = d.documentElement || d.body
+ , b = $.layout.browser
+ , v = b.version
+ , r, sW, cW
+ ;
+ // we can ignore all browsers that fire window.resize event onZoom
+ if (!b.msie || v > 8)
+ return false; // don't need to track zoom
+ if (s.deviceXDPI && s.systemXDPI) // syntax compiler hack
+ return calc(s.deviceXDPI, s.systemXDPI);
+ // everything below is just for future reference!
+ if (b.webkit && (r = d.body.getBoundingClientRect))
+ return calc((r.left - r.right), d.body.offsetWidth);
+ if (b.webkit && (sW = w.outerWidth))
+ return calc(sW, w.innerWidth);
+ if ((sW = s.width) && (cW = dE.clientWidth))
+ return calc(sW, cW);
+ return false; // no match, so cannot - or don't need to - track zoom
+
+ function calc (x,y) { return (parseInt(x,10) / parseInt(y,10) * 100).toFixed(); }
+ }
+
+};
+// add initialization method to Layout's onLoad array of functions
+$.layout.onReady.push( $.layout.browserZoom._init );
+
+
+})( jQuery );
+
+
+
+
+/**
+ * UI Layout Plugin: Slide-Offscreen Animation
+ *
+ * Prevent panes from being 'hidden' so that an iframes/objects
+ * does not reload/refresh when pane 'opens' again.
+ * This plug-in adds a new animation called "slideOffscreen".
+ * It is identical to the normal "slide" effect, but avoids hiding the element
+ *
+ * Requires Layout 1.3.0.RC30.1 or later for Close offscreen
+ * Requires Layout 1.3.0.RC30.5 or later for Hide, initClosed & initHidden offscreen
+ *
+ * Version: 1.1 - 2012-11-18
+ * Author: Kevin Dalman (kevin@jquery-dev.com)
+ * @preserve jquery.layout.slideOffscreen-1.1.js
+ */
+;(function ($) {
+
+// Add a new "slideOffscreen" effect
+if ($.effects) {
+
+ // add an option so initClosed and initHidden will work
+ $.layout.defaults.panes.useOffscreenClose = false; // user must enable when needed
+ /* set the new animation as the default for all panes
+ $.layout.defaults.panes.fxName = "slideOffscreen";
+ */
+
+ if ($.layout.plugins)
+ $.layout.plugins.effects.slideOffscreen = true;
+
+ // dupe 'slide' effect defaults as new effect defaults
+ $.layout.effects.slideOffscreen = $.extend(true, {}, $.layout.effects.slide);
+
+ // add new effect to jQuery UI
+ $.effects.slideOffscreen = function(o) {
+ return this.queue(function(){
+
+ var fx = $.effects
+ , opt = o.options
+ , $el = $(this)
+ , pane = $el.data('layoutEdge')
+ , state = $el.data('parentLayout').state
+ , dist = state[pane].size
+ , s = this.style
+ , props = ['top','bottom','left','right']
+ // Set options
+ , mode = fx.setMode($el, opt.mode || 'show') // Set Mode
+ , show = (mode == 'show')
+ , dir = opt.direction || 'left' // Default Direction
+ , ref = (dir == 'up' || dir == 'down') ? 'top' : 'left'
+ , pos = (dir == 'up' || dir == 'left')
+ , offscrn = $.layout.config.offscreenCSS || {}
+ , keyLR = $.layout.config.offscreenReset
+ , keyTB = 'offscreenResetTop' // only used internally
+ , animation = {}
+ ;
+ // Animation settings
+ animation[ref] = (show ? (pos ? '+=' : '-=') : (pos ? '-=' : '+=')) + dist;
+
+ if (show) { // show() animation, so save top/bottom but retain left/right set when 'hidden'
+ $el.data(keyTB, { top: s.top, bottom: s.bottom });
+
+ // set the top or left offset in preparation for animation
+ // Note: ALL animations work by shifting the top or left edges
+ if (pos) { // top (north) or left (west)
+ $el.css(ref, isNaN(dist) ? "-" + dist : -dist); // Shift outside the left/top edge
+ }
+ else { // bottom (south) or right (east) - shift all the way across container
+ if (dir === 'right')
+ $el.css({ left: state.container.layoutWidth, right: 'auto' });
+ else // dir === bottom
+ $el.css({ top: state.container.layoutHeight, bottom: 'auto' });
+ }
+ // restore the left/right setting if is a top/bottom animation
+ if (ref === 'top')
+ $el.css( $el.data( keyLR ) || {} );
+ }
+ else { // hide() animation, so save ALL CSS
+ $el.data(keyTB, { top: s.top, bottom: s.bottom });
+ $el.data(keyLR, { left: s.left, right: s.right });
+ }
+
+ // Animate
+ $el.show().animate(animation, { queue: false, duration: o.duration, easing: opt.easing, complete: function(){
+ // Restore top/bottom
+ if ($el.data( keyTB ))
+ $el.css($el.data( keyTB )).removeData( keyTB );
+ if (show) // Restore left/right too
+ $el.css($el.data( keyLR ) || {}).removeData( keyLR );
+ else // Move the pane off-screen (left: -99999, right: 'auto')
+ $el.css( offscrn );
+
+ if (o.callback) o.callback.apply(this, arguments); // Callback
+ $el.dequeue();
+ }});
+
+ });
+ };
+
+}
+
+})( jQuery );
diff --git a/Software/.jxbrowser-data/Cache/f_000010 b/Software/.jxbrowser-data/Cache/f_000010
new file mode 100644
index 000000000..29b3a2c7b
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_000010
@@ -0,0 +1,6 @@
+/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
+//@ sourceMappingURL=jquery.min.map
+*/
+(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
+}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
+u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
diff --git a/Software/.jxbrowser-data/Cache/f_000011 b/Software/.jxbrowser-data/Cache/f_000011
new file mode 100644
index 000000000..2abc3ed69
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_000011
Binary files differ
diff --git a/Software/.jxbrowser-data/Cache/f_000012 b/Software/.jxbrowser-data/Cache/f_000012
new file mode 100644
index 000000000..6dc062e6a
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_000012
@@ -0,0 +1,14879 @@
+/*! jQuery UI - v1.9.2 - 2012-11-23
+* http://jqueryui.com
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
+* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
+
+(function( $, undefined ) {
+
+var uuid = 0,
+ runiqueId = /^ui-id-\d+$/;
+
+// prevent duplicate loading
+// this is only a problem because we proxy existing functions
+// and we don't want to double proxy them
+$.ui = $.ui || {};
+if ( $.ui.version ) {
+ return;
+}
+
+$.extend( $.ui, {
+ version: "1.9.2",
+
+ keyCode: {
+ BACKSPACE: 8,
+ COMMA: 188,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ LEFT: 37,
+ NUMPAD_ADD: 107,
+ NUMPAD_DECIMAL: 110,
+ NUMPAD_DIVIDE: 111,
+ NUMPAD_ENTER: 108,
+ NUMPAD_MULTIPLY: 106,
+ NUMPAD_SUBTRACT: 109,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38
+ }
+});
+
+// plugins
+$.fn.extend({
+ _focus: $.fn.focus,
+ focus: function( delay, fn ) {
+ return typeof delay === "number" ?
+ this.each(function() {
+ var elem = this;
+ setTimeout(function() {
+ $( elem ).focus();
+ if ( fn ) {
+ fn.call( elem );
+ }
+ }, delay );
+ }) :
+ this._focus.apply( this, arguments );
+ },
+
+ scrollParent: function() {
+ var scrollParent;
+ if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+ scrollParent = this.parents().filter(function() {
+ return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
+ }).eq(0);
+ } else {
+ scrollParent = this.parents().filter(function() {
+ return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
+ }).eq(0);
+ }
+
+ return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
+ },
+
+ zIndex: function( zIndex ) {
+ if ( zIndex !== undefined ) {
+ return this.css( "zIndex", zIndex );
+ }
+
+ if ( this.length ) {
+ var elem = $( this[ 0 ] ), position, value;
+ while ( elem.length && elem[ 0 ] !== document ) {
+ // Ignore z-index if position is set to a value where z-index is ignored by the browser
+ // This makes behavior of this function consistent across browsers
+ // WebKit always returns auto if the element is positioned
+ position = elem.css( "position" );
+ if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+ // IE returns 0 when zIndex is not specified
+ // other browsers return a string
+ // we ignore the case of nested elements with an explicit value of 0
+ // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
+ value = parseInt( elem.css( "zIndex" ), 10 );
+ if ( !isNaN( value ) && value !== 0 ) {
+ return value;
+ }
+ }
+ elem = elem.parent();
+ }
+ }
+
+ return 0;
+ },
+
+ uniqueId: function() {
+ return this.each(function() {
+ if ( !this.id ) {
+ this.id = "ui-id-" + (++uuid);
+ }
+ });
+ },
+
+ removeUniqueId: function() {
+ return this.each(function() {
+ if ( runiqueId.test( this.id ) ) {
+ $( this ).removeAttr( "id" );
+ }
+ });
+ }
+});
+
+// selectors
+function focusable( element, isTabIndexNotNaN ) {
+ var map, mapName, img,
+ nodeName = element.nodeName.toLowerCase();
+ if ( "area" === nodeName ) {
+ map = element.parentNode;
+ mapName = map.name;
+ if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+ return false;
+ }
+ img = $( "img[usemap=#" + mapName + "]" )[0];
+ return !!img && visible( img );
+ }
+ return ( /input|select|textarea|button|object/.test( nodeName ) ?
+ !element.disabled :
+ "a" === nodeName ?
+ element.href || isTabIndexNotNaN :
+ isTabIndexNotNaN) &&
+ // the element and all of its ancestors must be visible
+ visible( element );
+}
+
+function visible( element ) {
+ return $.expr.filters.visible( element ) &&
+ !$( element ).parents().andSelf().filter(function() {
+ return $.css( this, "visibility" ) === "hidden";
+ }).length;
+}
+
+$.extend( $.expr[ ":" ], {
+ data: $.expr.createPseudo ?
+ $.expr.createPseudo(function( dataName ) {
+ return function( elem ) {
+ return !!$.data( elem, dataName );
+ };
+ }) :
+ // support: jQuery <1.8
+ function( elem, i, match ) {
+ return !!$.data( elem, match[ 3 ] );
+ },
+
+ focusable: function( element ) {
+ return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
+ },
+
+ tabbable: function( element ) {
+ var tabIndex = $.attr( element, "tabindex" ),
+ isTabIndexNaN = isNaN( tabIndex );
+ return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
+ }
+});
+
+// support
+$(function() {
+ var body = document.body,
+ div = body.appendChild( div = document.createElement( "div" ) );
+
+ // access offsetHeight before setting the style to prevent a layout bug
+ // in IE 9 which causes the element to continue to take up space even
+ // after it is removed from the DOM (#8026)
+ div.offsetHeight;
+
+ $.extend( div.style, {
+ minHeight: "100px",
+ height: "auto",
+ padding: 0,
+ borderWidth: 0
+ });
+
+ $.support.minHeight = div.offsetHeight === 100;
+ $.support.selectstart = "onselectstart" in div;
+
+ // set display to none to avoid a layout bug in IE
+ // http://dev.jquery.com/ticket/4014
+ body.removeChild( div ).style.display = "none";
+});
+
+// support: jQuery <1.8
+if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
+ $.each( [ "Width", "Height" ], function( i, name ) {
+ var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+ type = name.toLowerCase(),
+ orig = {
+ innerWidth: $.fn.innerWidth,
+ innerHeight: $.fn.innerHeight,
+ outerWidth: $.fn.outerWidth,
+ outerHeight: $.fn.outerHeight
+ };
+
+ function reduce( elem, size, border, margin ) {
+ $.each( side, function() {
+ size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
+ if ( border ) {
+ size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
+ }
+ if ( margin ) {
+ size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
+ }
+ });
+ return size;
+ }
+
+ $.fn[ "inner" + name ] = function( size ) {
+ if ( size === undefined ) {
+ return orig[ "inner" + name ].call( this );
+ }
+
+ return this.each(function() {
+ $( this ).css( type, reduce( this, size ) + "px" );
+ });
+ };
+
+ $.fn[ "outer" + name] = function( size, margin ) {
+ if ( typeof size !== "number" ) {
+ return orig[ "outer" + name ].call( this, size );
+ }
+
+ return this.each(function() {
+ $( this).css( type, reduce( this, size, true, margin ) + "px" );
+ });
+ };
+ });
+}
+
+// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
+if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
+ $.fn.removeData = (function( removeData ) {
+ return function( key ) {
+ if ( arguments.length ) {
+ return removeData.call( this, $.camelCase( key ) );
+ } else {
+ return removeData.call( this );
+ }
+ };
+ })( $.fn.removeData );
+}
+
+
+
+
+
+// deprecated
+
+(function() {
+ var uaMatch = /msie ([\w.]+)/.exec( navigator.userAgent.toLowerCase() ) || [];
+ $.ui.ie = uaMatch.length ? true : false;
+ $.ui.ie6 = parseFloat( uaMatch[ 1 ], 10 ) === 6;
+})();
+
+$.fn.extend({
+ disableSelection: function() {
+ return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+ ".ui-disableSelection", function( event ) {
+ event.preventDefault();
+ });
+ },
+
+ enableSelection: function() {
+ return this.unbind( ".ui-disableSelection" );
+ }
+});
+
+$.extend( $.ui, {
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
+ plugin: {
+ add: function( module, option, set ) {
+ var i,
+ proto = $.ui[ module ].prototype;
+ for ( i in set ) {
+ proto.plugins[ i ] = proto.plugins[ i ] || [];
+ proto.plugins[ i ].push( [ option, set[ i ] ] );
+ }
+ },
+ call: function( instance, name, args ) {
+ var i,
+ set = instance.plugins[ name ];
+ if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
+ return;
+ }
+
+ for ( i = 0; i < set.length; i++ ) {
+ if ( instance.options[ set[ i ][ 0 ] ] ) {
+ set[ i ][ 1 ].apply( instance.element, args );
+ }
+ }
+ }
+ },
+
+ contains: $.contains,
+
+ // only used by resizable
+ hasScroll: function( el, a ) {
+
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
+ if ( $( el ).css( "overflow" ) === "hidden") {
+ return false;
+ }
+
+ var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
+ has = false;
+
+ if ( el[ scroll ] > 0 ) {
+ return true;
+ }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ el[ scroll ] = 1;
+ has = ( el[ scroll ] > 0 );
+ el[ scroll ] = 0;
+ return has;
+ },
+
+ // these are odd functions, fix the API or move into individual plugins
+ isOverAxis: function( x, reference, size ) {
+ //Determines when x coordinate is over "b" element axis
+ return ( x > reference ) && ( x < ( reference + size ) );
+ },
+ isOver: function( y, x, top, left, height, width ) {
+ //Determines when x, y coordinates is over "b" element
+ return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
+ }
+});
+
+})( jQuery );
+(function( $, undefined ) {
+
+var uuid = 0,
+ slice = Array.prototype.slice,
+ _cleanData = $.cleanData;
+$.cleanData = function( elems ) {
+ for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+ try {
+ $( elem ).triggerHandler( "remove" );
+ // http://bugs.jquery.com/ticket/8235
+ } catch( e ) {}
+ }
+ _cleanData( elems );
+};
+
+$.widget = function( name, base, prototype ) {
+ var fullName, existingConstructor, constructor, basePrototype,
+ namespace = name.split( "." )[ 0 ];
+
+ name = name.split( "." )[ 1 ];
+ fullName = namespace + "-" + name;
+
+ if ( !prototype ) {
+ prototype = base;
+ base = $.Widget;
+ }
+
+ // create selector for plugin
+ $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+ return !!$.data( elem, fullName );
+ };
+
+ $[ namespace ] = $[ namespace ] || {};
+ existingConstructor = $[ namespace ][ name ];
+ constructor = $[ namespace ][ name ] = function( options, element ) {
+ // allow instantiation without "new" keyword
+ if ( !this._createWidget ) {
+ return new constructor( options, element );
+ }
+
+ // allow instantiation without initializing for simple inheritance
+ // must use "new" keyword (the code above always passes args)
+ if ( arguments.length ) {
+ this._createWidget( options, element );
+ }
+ };
+ // extend with the existing constructor to carry over any static properties
+ $.extend( constructor, existingConstructor, {
+ version: prototype.version,
+ // copy the object used to create the prototype in case we need to
+ // redefine the widget later
+ _proto: $.extend( {}, prototype ),
+ // track widgets that inherit from this widget in case this widget is
+ // redefined after a widget inherits from it
+ _childConstructors: []
+ });
+
+ basePrototype = new base();
+ // we need to make the options hash a property directly on the new instance
+ // otherwise we'll modify the options hash on the prototype that we're
+ // inheriting from
+ basePrototype.options = $.widget.extend( {}, basePrototype.options );
+ $.each( prototype, function( prop, value ) {
+ if ( $.isFunction( value ) ) {
+ prototype[ prop ] = (function() {
+ var _super = function() {
+ return base.prototype[ prop ].apply( this, arguments );
+ },
+ _superApply = function( args ) {
+ return base.prototype[ prop ].apply( this, args );
+ };
+ return function() {
+ var __super = this._super,
+ __superApply = this._superApply,
+ returnValue;
+
+ this._super = _super;
+ this._superApply = _superApply;
+
+ returnValue = value.apply( this, arguments );
+
+ this._super = __super;
+ this._superApply = __superApply;
+
+ return returnValue;
+ };
+ })();
+ }
+ });
+ constructor.prototype = $.widget.extend( basePrototype, {
+ // TODO: remove support for widgetEventPrefix
+ // always use the name + a colon as the prefix, e.g., draggable:start
+ // don't prefix for widgets that aren't DOM-based
+ widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
+ }, prototype, {
+ constructor: constructor,
+ namespace: namespace,
+ widgetName: name,
+ // TODO remove widgetBaseClass, see #8155
+ widgetBaseClass: fullName,
+ widgetFullName: fullName
+ });
+
+ // If this widget is being redefined then we need to find all widgets that
+ // are inheriting from it and redefine all of them so that they inherit from
+ // the new version of this widget. We're essentially trying to replace one
+ // level in the prototype chain.
+ if ( existingConstructor ) {
+ $.each( existingConstructor._childConstructors, function( i, child ) {
+ var childPrototype = child.prototype;
+
+ // redefine the child widget using the same prototype that was
+ // originally used, but inherit from the new version of the base
+ $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
+ });
+ // remove the list of existing child constructors from the old constructor
+ // so the old child constructors can be garbage collected
+ delete existingConstructor._childConstructors;
+ } else {
+ base._childConstructors.push( constructor );
+ }
+
+ $.widget.bridge( name, constructor );
+};
+
+$.widget.extend = function( target ) {
+ var input = slice.call( arguments, 1 ),
+ inputIndex = 0,
+ inputLength = input.length,
+ key,
+ value;
+ for ( ; inputIndex < inputLength; inputIndex++ ) {
+ for ( key in input[ inputIndex ] ) {
+ value = input[ inputIndex ][ key ];
+ if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+ // Clone objects
+ if ( $.isPlainObject( value ) ) {
+ target[ key ] = $.isPlainObject( target[ key ] ) ?
+ $.widget.extend( {}, target[ key ], value ) :
+ // Don't extend strings, arrays, etc. with objects
+ $.widget.extend( {}, value );
+ // Copy everything else by reference
+ } else {
+ target[ key ] = value;
+ }
+ }
+ }
+ }
+ return target;
+};
+
+$.widget.bridge = function( name, object ) {
+ var fullName = object.prototype.widgetFullName || name;
+ $.fn[ name ] = function( options ) {
+ var isMethodCall = typeof options === "string",
+ args = slice.call( arguments, 1 ),
+ returnValue = this;
+
+ // allow multiple hashes to be passed on init
+ options = !isMethodCall && args.length ?
+ $.widget.extend.apply( null, [ options ].concat(args) ) :
+ options;
+
+ if ( isMethodCall ) {
+ this.each(function() {
+ var methodValue,
+ instance = $.data( this, fullName );
+ if ( !instance ) {
+ return $.error( "cannot call methods on " + name + " prior to initialization; " +
+ "attempted to call method '" + options + "'" );
+ }
+ if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
+ return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+ }
+ methodValue = instance[ options ].apply( instance, args );
+ if ( methodValue !== instance && methodValue !== undefined ) {
+ returnValue = methodValue && methodValue.jquery ?
+ returnValue.pushStack( methodValue.get() ) :
+ methodValue;
+ return false;
+ }
+ });
+ } else {
+ this.each(function() {
+ var instance = $.data( this, fullName );
+ if ( instance ) {
+ instance.option( options || {} )._init();
+ } else {
+ $.data( this, fullName, new object( options, this ) );
+ }
+ });
+ }
+
+ return returnValue;
+ };
+};
+
+$.Widget = function( /* options, element */ ) {};
+$.Widget._childConstructors = [];
+
+$.Widget.prototype = {
+ widgetName: "widget",
+ widgetEventPrefix: "",
+ defaultElement: "<div>",
+ options: {
+ disabled: false,
+
+ // callbacks
+ create: null
+ },
+ _createWidget: function( options, element ) {
+ element = $( element || this.defaultElement || this )[ 0 ];
+ this.element = $( element );
+ this.uuid = uuid++;
+ this.eventNamespace = "." + this.widgetName + this.uuid;
+ this.options = $.widget.extend( {},
+ this.options,
+ this._getCreateOptions(),
+ options );
+
+ this.bindings = $();
+ this.hoverable = $();
+ this.focusable = $();
+
+ if ( element !== this ) {
+ // 1.9 BC for #7810
+ // TODO remove dual storage
+ $.data( element, this.widgetName, this );
+ $.data( element, this.widgetFullName, this );
+ this._on( true, this.element, {
+ remove: function( event ) {
+ if ( event.target === element ) {
+ this.destroy();
+ }
+ }
+ });
+ this.document = $( element.style ?
+ // element within the document
+ element.ownerDocument :
+ // element is window or document
+ element.document || element );
+ this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
+ }
+
+ this._create();
+ this._trigger( "create", null, this._getCreateEventData() );
+ this._init();
+ },
+ _getCreateOptions: $.noop,
+ _getCreateEventData: $.noop,
+ _create: $.noop,
+ _init: $.noop,
+
+ destroy: function() {
+ this._destroy();
+ // we can probably remove the unbind calls in 2.0
+ // all event bindings should go through this._on()
+ this.element
+ .unbind( this.eventNamespace )
+ // 1.9 BC for #7810
+ // TODO remove dual storage
+ .removeData( this.widgetName )
+ .removeData( this.widgetFullName )
+ // support: jquery <1.6.3
+ // http://bugs.jquery.com/ticket/9413
+ .removeData( $.camelCase( this.widgetFullName ) );
+ this.widget()
+ .unbind( this.eventNamespace )
+ .removeAttr( "aria-disabled" )
+ .removeClass(
+ this.widgetFullName + "-disabled " +
+ "ui-state-disabled" );
+
+ // clean up events and states
+ this.bindings.unbind( this.eventNamespace );
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
+ },
+ _destroy: $.noop,
+
+ widget: function() {
+ return this.element;
+ },
+
+ option: function( key, value ) {
+ var options = key,
+ parts,
+ curOption,
+ i;
+
+ if ( arguments.length === 0 ) {
+ // don't return a reference to the internal hash
+ return $.widget.extend( {}, this.options );
+ }
+
+ if ( typeof key === "string" ) {
+ // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+ options = {};
+ parts = key.split( "." );
+ key = parts.shift();
+ if ( parts.length ) {
+ curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+ for ( i = 0; i < parts.length - 1; i++ ) {
+ curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+ curOption = curOption[ parts[ i ] ];
+ }
+ key = parts.pop();
+ if ( value === undefined ) {
+ return curOption[ key ] === undefined ? null : curOption[ key ];
+ }
+ curOption[ key ] = value;
+ } else {
+ if ( value === undefined ) {
+ return this.options[ key ] === undefined ? null : this.options[ key ];
+ }
+ options[ key ] = value;
+ }
+ }
+
+ this._setOptions( options );
+
+ return this;
+ },
+ _setOptions: function( options ) {
+ var key;
+
+ for ( key in options ) {
+ this._setOption( key, options[ key ] );
+ }
+
+ return this;
+ },
+ _setOption: function( key, value ) {
+ this.options[ key ] = value;
+
+ if ( key === "disabled" ) {
+ this.widget()
+ .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
+ .attr( "aria-disabled", value );
+ this.hoverable.removeClass( "ui-state-hover" );
+ this.focusable.removeClass( "ui-state-focus" );
+ }
+
+ return this;
+ },
+
+ enable: function() {
+ return this._setOption( "disabled", false );
+ },
+ disable: function() {
+ return this._setOption( "disabled", true );
+ },
+
+ _on: function( suppressDisabledCheck, element, handlers ) {
+ var delegateElement,
+ instance = this;
+
+ // no suppressDisabledCheck flag, shuffle arguments
+ if ( typeof suppressDisabledCheck !== "boolean" ) {
+ handlers = element;
+ element = suppressDisabledCheck;
+ suppressDisabledCheck = false;
+ }
+
+ // no element argument, shuffle and use this.element
+ if ( !handlers ) {
+ handlers = element;
+ element = this.element;
+ delegateElement = this.widget();
+ } else {
+ // accept selectors, DOM elements
+ element = delegateElement = $( element );
+ this.bindings = this.bindings.add( element );
+ }
+
+ $.each( handlers, function( event, handler ) {
+ function handlerProxy() {
+ // allow widgets to customize the disabled handling
+ // - disabled as an array instead of boolean
+ // - disabled class as method for disabling individual parts
+ if ( !suppressDisabledCheck &&
+ ( instance.options.disabled === true ||
+ $( this ).hasClass( "ui-state-disabled" ) ) ) {
+ return;
+ }
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+
+ // copy the guid so direct unbinding works
+ if ( typeof handler !== "string" ) {
+ handlerProxy.guid = handler.guid =
+ handler.guid || handlerProxy.guid || $.guid++;
+ }
+
+ var match = event.match( /^(\w+)\s*(.*)$/ ),
+ eventName = match[1] + instance.eventNamespace,
+ selector = match[2];
+ if ( selector ) {
+ delegateElement.delegate( selector, eventName, handlerProxy );
+ } else {
+ element.bind( eventName, handlerProxy );
+ }
+ });
+ },
+
+ _off: function( element, eventName ) {
+ eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
+ element.unbind( eventName ).undelegate( eventName );
+ },
+
+ _delay: function( handler, delay ) {
+ function handlerProxy() {
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
+ .apply( instance, arguments );
+ }
+ var instance = this;
+ return setTimeout( handlerProxy, delay || 0 );
+ },
+
+ _hoverable: function( element ) {
+ this.hoverable = this.hoverable.add( element );
+ this._on( element, {
+ mouseenter: function( event ) {
+ $( event.currentTarget ).addClass( "ui-state-hover" );
+ },
+ mouseleave: function( event ) {
+ $( event.currentTarget ).removeClass( "ui-state-hover" );
+ }
+ });
+ },
+
+ _focusable: function( element ) {
+ this.focusable = this.focusable.add( element );
+ this._on( element, {
+ focusin: function( event ) {
+ $( event.currentTarget ).addClass( "ui-state-focus" );
+ },
+ focusout: function( event ) {
+ $( event.currentTarget ).removeClass( "ui-state-focus" );
+ }
+ });
+ },
+
+ _trigger: function( type, event, data ) {
+ var prop, orig,
+ callback = this.options[ type ];
+
+ data = data || {};
+ event = $.Event( event );
+ event.type = ( type === this.widgetEventPrefix ?
+ type :
+ this.widgetEventPrefix + type ).toLowerCase();
+ // the original event may come from any element
+ // so we need to reset the target on the new event
+ event.target = this.element[ 0 ];
+
+ // copy original event properties over to the new event
+ orig = event.originalEvent;
+ if ( orig ) {
+ for ( prop in orig ) {
+ if ( !( prop in event ) ) {
+ event[ prop ] = orig[ prop ];
+ }
+ }
+ }
+
+ this.element.trigger( event, data );
+ return !( $.isFunction( callback ) &&
+ callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
+ event.isDefaultPrevented() );
+ }
+};
+
+$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+ $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+ if ( typeof options === "string" ) {
+ options = { effect: options };
+ }
+ var hasOptions,
+ effectName = !options ?
+ method :
+ options === true || typeof options === "number" ?
+ defaultEffect :
+ options.effect || defaultEffect;
+ options = options || {};
+ if ( typeof options === "number" ) {
+ options = { duration: options };
+ }
+ hasOptions = !$.isEmptyObject( options );
+ options.complete = callback;
+ if ( options.delay ) {
+ element.delay( options.delay );
+ }
+ if ( hasOptions && $.effects && ( $.effects.effect[ effectName ] || $.uiBackCompat !== false && $.effects[ effectName ] ) ) {
+ element[ method ]( options );
+ } else if ( effectName !== method && element[ effectName ] ) {
+ element[ effectName ]( options.duration, options.easing, callback );
+ } else {
+ element.queue(function( next ) {
+ $( this )[ method ]();
+ if ( callback ) {
+ callback.call( element[ 0 ] );
+ }
+ next();
+ });
+ }
+ };
+});
+
+// DEPRECATED
+if ( $.uiBackCompat !== false ) {
+ $.Widget.prototype._getCreateOptions = function() {
+ return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
+ };
+}
+
+})( jQuery );
+(function( $, undefined ) {
+
+var mouseHandled = false;
+$( document ).mouseup( function( e ) {
+ mouseHandled = false;
+});
+
+$.widget("ui.mouse", {
+ version: "1.9.2",
+ options: {
+ cancel: 'input,textarea,button,select,option',
+ distance: 1,
+ delay: 0
+ },
+ _mouseInit: function() {
+ var that = this;
+
+ this.element
+ .bind('mousedown.'+this.widgetName, function(event) {
+ return that._mouseDown(event);
+ })
+ .bind('click.'+this.widgetName, function(event) {
+ if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) {
+ $.removeData(event.target, that.widgetName + '.preventClickEvent');
+ event.stopImmediatePropagation();
+ return false;
+ }
+ });
+
+ this.started = false;
+ },
+
+ // TODO: make sure destroying one instance of mouse doesn't mess with
+ // other instances of mouse
+ _mouseDestroy: function() {
+ this.element.unbind('.'+this.widgetName);
+ if ( this._mouseMoveDelegate ) {
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+ }
+ },
+
+ _mouseDown: function(event) {
+ // don't let more than one widget handle mouseStart
+ if( mouseHandled ) { return; }
+
+ // we may have missed mouseup (out of window)
+ (this._mouseStarted && this._mouseUp(event));
+
+ this._mouseDownEvent = event;
+
+ var that = this,
+ btnIsLeft = (event.which === 1),
+ // event.target.nodeName works around a bug in IE 8 with
+ // disabled inputs (#7620)
+ elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
+ if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+ return true;
+ }
+
+ this.mouseDelayMet = !this.options.delay;
+ if (!this.mouseDelayMet) {
+ this._mouseDelayTimer = setTimeout(function() {
+ that.mouseDelayMet = true;
+ }, this.options.delay);
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted = (this._mouseStart(event) !== false);
+ if (!this._mouseStarted) {
+ event.preventDefault();
+ return true;
+ }
+ }
+
+ // Click event may never have fired (Gecko & Opera)
+ if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
+ $.removeData(event.target, this.widgetName + '.preventClickEvent');
+ }
+
+ // these delegates are required to keep context
+ this._mouseMoveDelegate = function(event) {
+ return that._mouseMove(event);
+ };
+ this._mouseUpDelegate = function(event) {
+ return that._mouseUp(event);
+ };
+ $(document)
+ .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ event.preventDefault();
+
+ mouseHandled = true;
+ return true;
+ },
+
+ _mouseMove: function(event) {
+ // IE mouseup check - mouseup happened when mouse was out of window
+ if ($.ui.ie && !(document.documentMode >= 9) && !event.button) {
+ return this._mouseUp(event);
+ }
+
+ if (this._mouseStarted) {
+ this._mouseDrag(event);
+ return event.preventDefault();
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted =
+ (this._mouseStart(this._mouseDownEvent, event) !== false);
+ (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+ }
+
+ return !this._mouseStarted;
+ },
+
+ _mouseUp: function(event) {
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ if (this._mouseStarted) {
+ this._mouseStarted = false;
+
+ if (event.target === this._mouseDownEvent.target) {
+ $.data(event.target, this.widgetName + '.preventClickEvent', true);
+ }
+
+ this._mouseStop(event);
+ }
+
+ return false;
+ },
+
+ _mouseDistanceMet: function(event) {
+ return (Math.max(
+ Math.abs(this._mouseDownEvent.pageX - event.pageX),
+ Math.abs(this._mouseDownEvent.pageY - event.pageY)
+ ) >= this.options.distance
+ );
+ },
+
+ _mouseDelayMet: function(event) {
+ return this.mouseDelayMet;
+ },
+
+ // These are placeholder methods, to be overriden by extending plugin
+ _mouseStart: function(event) {},
+ _mouseDrag: function(event) {},
+ _mouseStop: function(event) {},
+ _mouseCapture: function(event) { return true; }
+});
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.ui = $.ui || {};
+
+var cachedScrollbarWidth,
+ max = Math.max,
+ abs = Math.abs,
+ round = Math.round,
+ rhorizontal = /left|center|right/,
+ rvertical = /top|center|bottom/,
+ roffset = /[\+\-]\d+%?/,
+ rposition = /^\w+/,
+ rpercent = /%$/,
+ _position = $.fn.position;
+
+function getOffsets( offsets, width, height ) {
+ return [
+ parseInt( offsets[ 0 ], 10 ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
+ parseInt( offsets[ 1 ], 10 ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
+ ];
+}
+function parseCss( element, property ) {
+ return parseInt( $.css( element, property ), 10 ) || 0;
+}
+
+$.position = {
+ scrollbarWidth: function() {
+ if ( cachedScrollbarWidth !== undefined ) {
+ return cachedScrollbarWidth;
+ }
+ var w1, w2,
+ div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
+ innerDiv = div.children()[0];
+
+ $( "body" ).append( div );
+ w1 = innerDiv.offsetWidth;
+ div.css( "overflow", "scroll" );
+
+ w2 = innerDiv.offsetWidth;
+
+ if ( w1 === w2 ) {
+ w2 = div[0].clientWidth;
+ }
+
+ div.remove();
+
+ return (cachedScrollbarWidth = w1 - w2);
+ },
+ getScrollInfo: function( within ) {
+ var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
+ overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
+ hasOverflowX = overflowX === "scroll" ||
+ ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
+ hasOverflowY = overflowY === "scroll" ||
+ ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
+ return {
+ width: hasOverflowX ? $.position.scrollbarWidth() : 0,
+ height: hasOverflowY ? $.position.scrollbarWidth() : 0
+ };
+ },
+ getWithinInfo: function( element ) {
+ var withinElement = $( element || window ),
+ isWindow = $.isWindow( withinElement[0] );
+ return {
+ element: withinElement,
+ isWindow: isWindow,
+ offset: withinElement.offset() || { left: 0, top: 0 },
+ scrollLeft: withinElement.scrollLeft(),
+ scrollTop: withinElement.scrollTop(),
+ width: isWindow ? withinElement.width() : withinElement.outerWidth(),
+ height: isWindow ? withinElement.height() : withinElement.outerHeight()
+ };
+ }
+};
+
+$.fn.position = function( options ) {
+ if ( !options || !options.of ) {
+ return _position.apply( this, arguments );
+ }
+
+ // make a copy, we don't want to modify arguments
+ options = $.extend( {}, options );
+
+ var atOffset, targetWidth, targetHeight, targetOffset, basePosition,
+ target = $( options.of ),
+ within = $.position.getWithinInfo( options.within ),
+ scrollInfo = $.position.getScrollInfo( within ),
+ targetElem = target[0],
+ collision = ( options.collision || "flip" ).split( " " ),
+ offsets = {};
+
+ if ( targetElem.nodeType === 9 ) {
+ targetWidth = target.width();
+ targetHeight = target.height();
+ targetOffset = { top: 0, left: 0 };
+ } else if ( $.isWindow( targetElem ) ) {
+ targetWidth = target.width();
+ targetHeight = target.height();
+ targetOffset = { top: target.scrollTop(), left: target.scrollLeft() };
+ } else if ( targetElem.preventDefault ) {
+ // force left top to allow flipping
+ options.at = "left top";
+ targetWidth = targetHeight = 0;
+ targetOffset = { top: targetElem.pageY, left: targetElem.pageX };
+ } else {
+ targetWidth = target.outerWidth();
+ targetHeight = target.outerHeight();
+ targetOffset = target.offset();
+ }
+ // clone to reuse original targetOffset later
+ basePosition = $.extend( {}, targetOffset );
+
+ // force my and at to have valid horizontal and vertical positions
+ // if a value is missing or invalid, it will be converted to center
+ $.each( [ "my", "at" ], function() {
+ var pos = ( options[ this ] || "" ).split( " " ),
+ horizontalOffset,
+ verticalOffset;
+
+ if ( pos.length === 1) {
+ pos = rhorizontal.test( pos[ 0 ] ) ?
+ pos.concat( [ "center" ] ) :
+ rvertical.test( pos[ 0 ] ) ?
+ [ "center" ].concat( pos ) :
+ [ "center", "center" ];
+ }
+ pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
+ pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
+
+ // calculate offsets
+ horizontalOffset = roffset.exec( pos[ 0 ] );
+ verticalOffset = roffset.exec( pos[ 1 ] );
+ offsets[ this ] = [
+ horizontalOffset ? horizontalOffset[ 0 ] : 0,
+ verticalOffset ? verticalOffset[ 0 ] : 0
+ ];
+
+ // reduce to just the positions without the offsets
+ options[ this ] = [
+ rposition.exec( pos[ 0 ] )[ 0 ],
+ rposition.exec( pos[ 1 ] )[ 0 ]
+ ];
+ });
+
+ // normalize collision option
+ if ( collision.length === 1 ) {
+ collision[ 1 ] = collision[ 0 ];
+ }
+
+ if ( options.at[ 0 ] === "right" ) {
+ basePosition.left += targetWidth;
+ } else if ( options.at[ 0 ] === "center" ) {
+ basePosition.left += targetWidth / 2;
+ }
+
+ if ( options.at[ 1 ] === "bottom" ) {
+ basePosition.top += targetHeight;
+ } else if ( options.at[ 1 ] === "center" ) {
+ basePosition.top += targetHeight / 2;
+ }
+
+ atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
+ basePosition.left += atOffset[ 0 ];
+ basePosition.top += atOffset[ 1 ];
+
+ return this.each(function() {
+ var collisionPosition, using,
+ elem = $( this ),
+ elemWidth = elem.outerWidth(),
+ elemHeight = elem.outerHeight(),
+ marginLeft = parseCss( this, "marginLeft" ),
+ marginTop = parseCss( this, "marginTop" ),
+ collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
+ collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
+ position = $.extend( {}, basePosition ),
+ myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
+
+ if ( options.my[ 0 ] === "right" ) {
+ position.left -= elemWidth;
+ } else if ( options.my[ 0 ] === "center" ) {
+ position.left -= elemWidth / 2;
+ }
+
+ if ( options.my[ 1 ] === "bottom" ) {
+ position.top -= elemHeight;
+ } else if ( options.my[ 1 ] === "center" ) {
+ position.top -= elemHeight / 2;
+ }
+
+ position.left += myOffset[ 0 ];
+ position.top += myOffset[ 1 ];
+
+ // if the browser doesn't support fractions, then round for consistent results
+ if ( !$.support.offsetFractions ) {
+ position.left = round( position.left );
+ position.top = round( position.top );
+ }
+
+ collisionPosition = {
+ marginLeft: marginLeft,
+ marginTop: marginTop
+ };
+
+ $.each( [ "left", "top" ], function( i, dir ) {
+ if ( $.ui.position[ collision[ i ] ] ) {
+ $.ui.position[ collision[ i ] ][ dir ]( position, {
+ targetWidth: targetWidth,
+ targetHeight: targetHeight,
+ elemWidth: elemWidth,
+ elemHeight: elemHeight,
+ collisionPosition: collisionPosition,
+ collisionWidth: collisionWidth,
+ collisionHeight: collisionHeight,
+ offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
+ my: options.my,
+ at: options.at,
+ within: within,
+ elem : elem
+ });
+ }
+ });
+
+ if ( $.fn.bgiframe ) {
+ elem.bgiframe();
+ }
+
+ if ( options.using ) {
+ // adds feedback as second argument to using callback, if present
+ using = function( props ) {
+ var left = targetOffset.left - position.left,
+ right = left + targetWidth - elemWidth,
+ top = targetOffset.top - position.top,
+ bottom = top + targetHeight - elemHeight,
+ feedback = {
+ target: {
+ element: target,
+ left: targetOffset.left,
+ top: targetOffset.top,
+ width: targetWidth,
+ height: targetHeight
+ },
+ element: {
+ element: elem,
+ left: position.left,
+ top: position.top,
+ width: elemWidth,
+ height: elemHeight
+ },
+ horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
+ vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
+ };
+ if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
+ feedback.horizontal = "center";
+ }
+ if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
+ feedback.vertical = "middle";
+ }
+ if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
+ feedback.important = "horizontal";
+ } else {
+ feedback.important = "vertical";
+ }
+ options.using.call( this, props, feedback );
+ };
+ }
+
+ elem.offset( $.extend( position, { using: using } ) );
+ });
+};
+
+$.ui.position = {
+ fit: {
+ left: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
+ outerWidth = within.width,
+ collisionPosLeft = position.left - data.collisionPosition.marginLeft,
+ overLeft = withinOffset - collisionPosLeft,
+ overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
+ newOverRight;
+
+ // element is wider than within
+ if ( data.collisionWidth > outerWidth ) {
+ // element is initially over the left side of within
+ if ( overLeft > 0 && overRight <= 0 ) {
+ newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
+ position.left += overLeft - newOverRight;
+ // element is initially over right side of within
+ } else if ( overRight > 0 && overLeft <= 0 ) {
+ position.left = withinOffset;
+ // element is initially over both left and right sides of within
+ } else {
+ if ( overLeft > overRight ) {
+ position.left = withinOffset + outerWidth - data.collisionWidth;
+ } else {
+ position.left = withinOffset;
+ }
+ }
+ // too far left -> align with left edge
+ } else if ( overLeft > 0 ) {
+ position.left += overLeft;
+ // too far right -> align with right edge
+ } else if ( overRight > 0 ) {
+ position.left -= overRight;
+ // adjust based on position and margin
+ } else {
+ position.left = max( position.left - collisionPosLeft, position.left );
+ }
+ },
+ top: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
+ outerHeight = data.within.height,
+ collisionPosTop = position.top - data.collisionPosition.marginTop,
+ overTop = withinOffset - collisionPosTop,
+ overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
+ newOverBottom;
+
+ // element is taller than within
+ if ( data.collisionHeight > outerHeight ) {
+ // element is initially over the top of within
+ if ( overTop > 0 && overBottom <= 0 ) {
+ newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
+ position.top += overTop - newOverBottom;
+ // element is initially over bottom of within
+ } else if ( overBottom > 0 && overTop <= 0 ) {
+ position.top = withinOffset;
+ // element is initially over both top and bottom of within
+ } else {
+ if ( overTop > overBottom ) {
+ position.top = withinOffset + outerHeight - data.collisionHeight;
+ } else {
+ position.top = withinOffset;
+ }
+ }
+ // too far up -> align with top
+ } else if ( overTop > 0 ) {
+ position.top += overTop;
+ // too far down -> align with bottom edge
+ } else if ( overBottom > 0 ) {
+ position.top -= overBottom;
+ // adjust based on position and margin
+ } else {
+ position.top = max( position.top - collisionPosTop, position.top );
+ }
+ }
+ },
+ flip: {
+ left: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.offset.left + within.scrollLeft,
+ outerWidth = within.width,
+ offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
+ collisionPosLeft = position.left - data.collisionPosition.marginLeft,
+ overLeft = collisionPosLeft - offsetLeft,
+ overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
+ myOffset = data.my[ 0 ] === "left" ?
+ -data.elemWidth :
+ data.my[ 0 ] === "right" ?
+ data.elemWidth :
+ 0,
+ atOffset = data.at[ 0 ] === "left" ?
+ data.targetWidth :
+ data.at[ 0 ] === "right" ?
+ -data.targetWidth :
+ 0,
+ offset = -2 * data.offset[ 0 ],
+ newOverRight,
+ newOverLeft;
+
+ if ( overLeft < 0 ) {
+ newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
+ if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
+ position.left += myOffset + atOffset + offset;
+ }
+ }
+ else if ( overRight > 0 ) {
+ newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
+ if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
+ position.left += myOffset + atOffset + offset;
+ }
+ }
+ },
+ top: function( position, data ) {
+ var within = data.within,
+ withinOffset = within.offset.top + within.scrollTop,
+ outerHeight = within.height,
+ offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
+ collisionPosTop = position.top - data.collisionPosition.marginTop,
+ overTop = collisionPosTop - offsetTop,
+ overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
+ top = data.my[ 1 ] === "top",
+ myOffset = top ?
+ -data.elemHeight :
+ data.my[ 1 ] === "bottom" ?
+ data.elemHeight :
+ 0,
+ atOffset = data.at[ 1 ] === "top" ?
+ data.targetHeight :
+ data.at[ 1 ] === "bottom" ?
+ -data.targetHeight :
+ 0,
+ offset = -2 * data.offset[ 1 ],
+ newOverTop,
+ newOverBottom;
+ if ( overTop < 0 ) {
+ newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
+ if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
+ position.top += myOffset + atOffset + offset;
+ }
+ }
+ else if ( overBottom > 0 ) {
+ newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
+ if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
+ position.top += myOffset + atOffset + offset;
+ }
+ }
+ }
+ },
+ flipfit: {
+ left: function() {
+ $.ui.position.flip.left.apply( this, arguments );
+ $.ui.position.fit.left.apply( this, arguments );
+ },
+ top: function() {
+ $.ui.position.flip.top.apply( this, arguments );
+ $.ui.position.fit.top.apply( this, arguments );
+ }
+ }
+};
+
+// fraction support test
+(function () {
+ var testElement, testElementParent, testElementStyle, offsetLeft, i,
+ body = document.getElementsByTagName( "body" )[ 0 ],
+ div = document.createElement( "div" );
+
+ //Create a "fake body" for testing based on method used in jQuery.support
+ testElement = document.createElement( body ? "div" : "body" );
+ testElementStyle = {
+ visibility: "hidden",
+ width: 0,
+ height: 0,
+ border: 0,
+ margin: 0,
+ background: "none"
+ };
+ if ( body ) {
+ $.extend( testElementStyle, {
+ position: "absolute",
+ left: "-1000px",
+ top: "-1000px"
+ });
+ }
+ for ( i in testElementStyle ) {
+ testElement.style[ i ] = testElementStyle[ i ];
+ }
+ testElement.appendChild( div );
+ testElementParent = body || document.documentElement;
+ testElementParent.insertBefore( testElement, testElementParent.firstChild );
+
+ div.style.cssText = "position: absolute; left: 10.7432222px;";
+
+ offsetLeft = $( div ).offset().left;
+ $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
+
+ testElement.innerHTML = "";
+ testElementParent.removeChild( testElement );
+})();
+
+// DEPRECATED
+if ( $.uiBackCompat !== false ) {
+ // offset option
+ (function( $ ) {
+ var _position = $.fn.position;
+ $.fn.position = function( options ) {
+ if ( !options || !options.offset ) {
+ return _position.call( this, options );
+ }
+ var offset = options.offset.split( " " ),
+ at = options.at.split( " " );
+ if ( offset.length === 1 ) {
+ offset[ 1 ] = offset[ 0 ];
+ }
+ if ( /^\d/.test( offset[ 0 ] ) ) {
+ offset[ 0 ] = "+" + offset[ 0 ];
+ }
+ if ( /^\d/.test( offset[ 1 ] ) ) {
+ offset[ 1 ] = "+" + offset[ 1 ];
+ }
+ if ( at.length === 1 ) {
+ if ( /left|center|right/.test( at[ 0 ] ) ) {
+ at[ 1 ] = "center";
+ } else {
+ at[ 1 ] = at[ 0 ];
+ at[ 0 ] = "center";
+ }
+ }
+ return _position.call( this, $.extend( options, {
+ at: at[ 0 ] + offset[ 0 ] + " " + at[ 1 ] + offset[ 1 ],
+ offset: undefined
+ } ) );
+ };
+ }( jQuery ) );
+}
+
+}( jQuery ) );
+(function( $, undefined ) {
+
+var uid = 0,
+ hideProps = {},
+ showProps = {};
+
+hideProps.height = hideProps.paddingTop = hideProps.paddingBottom =
+ hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide";
+showProps.height = showProps.paddingTop = showProps.paddingBottom =
+ showProps.borderTopWidth = showProps.borderBottomWidth = "show";
+
+$.widget( "ui.accordion", {
+ version: "1.9.2",
+ options: {
+ active: 0,
+ animate: {},
+ collapsible: false,
+ event: "click",
+ header: "> li > :first-child,> :not(li):even",
+ heightStyle: "auto",
+ icons: {
+ activeHeader: "ui-icon-triangle-1-s",
+ header: "ui-icon-triangle-1-e"
+ },
+
+ // callbacks
+ activate: null,
+ beforeActivate: null
+ },
+
+ _create: function() {
+ var accordionId = this.accordionId = "ui-accordion-" +
+ (this.element.attr( "id" ) || ++uid),
+ options = this.options;
+
+ this.prevShow = this.prevHide = $();
+ this.element.addClass( "ui-accordion ui-widget ui-helper-reset" );
+
+ this.headers = this.element.find( options.header )
+ .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
+ this._hoverable( this.headers );
+ this._focusable( this.headers );
+
+ this.headers.next()
+ .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
+ .hide();
+
+ // don't allow collapsible: false and active: false / null
+ if ( !options.collapsible && (options.active === false || options.active == null) ) {
+ options.active = 0;
+ }
+ // handle negative values
+ if ( options.active < 0 ) {
+ options.active += this.headers.length;
+ }
+ this.active = this._findActive( options.active )
+ .addClass( "ui-accordion-header-active ui-state-active" )
+ .toggleClass( "ui-corner-all ui-corner-top" );
+ this.active.next()
+ .addClass( "ui-accordion-content-active" )
+ .show();
+
+ this._createIcons();
+ this.refresh();
+
+ // ARIA
+ this.element.attr( "role", "tablist" );
+
+ this.headers
+ .attr( "role", "tab" )
+ .each(function( i ) {
+ var header = $( this ),
+ headerId = header.attr( "id" ),
+ panel = header.next(),
+ panelId = panel.attr( "id" );
+ if ( !headerId ) {
+ headerId = accordionId + "-header-" + i;
+ header.attr( "id", headerId );
+ }
+ if ( !panelId ) {
+ panelId = accordionId + "-panel-" + i;
+ panel.attr( "id", panelId );
+ }
+ header.attr( "aria-controls", panelId );
+ panel.attr( "aria-labelledby", headerId );
+ })
+ .next()
+ .attr( "role", "tabpanel" );
+
+ this.headers
+ .not( this.active )
+ .attr({
+ "aria-selected": "false",
+ tabIndex: -1
+ })
+ .next()
+ .attr({
+ "aria-expanded": "false",
+ "aria-hidden": "true"
+ })
+ .hide();
+
+ // make sure at least one header is in the tab order
+ if ( !this.active.length ) {
+ this.headers.eq( 0 ).attr( "tabIndex", 0 );
+ } else {
+ this.active.attr({
+ "aria-selected": "true",
+ tabIndex: 0
+ })
+ .next()
+ .attr({
+ "aria-expanded": "true",
+ "aria-hidden": "false"
+ });
+ }
+
+ this._on( this.headers, { keydown: "_keydown" });
+ this._on( this.headers.next(), { keydown: "_panelKeyDown" });
+ this._setupEvents( options.event );
+ },
+
+ _getCreateEventData: function() {
+ return {
+ header: this.active,
+ content: !this.active.length ? $() : this.active.next()
+ };
+ },
+
+ _createIcons: function() {
+ var icons = this.options.icons;
+ if ( icons ) {
+ $( "<span>" )
+ .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
+ .prependTo( this.headers );
+ this.active.children( ".ui-accordion-header-icon" )
+ .removeClass( icons.header )
+ .addClass( icons.activeHeader );
+ this.headers.addClass( "ui-accordion-icons" );
+ }
+ },
+
+ _destroyIcons: function() {
+ this.headers
+ .removeClass( "ui-accordion-icons" )
+ .children( ".ui-accordion-header-icon" )
+ .remove();
+ },
+
+ _destroy: function() {
+ var contents;
+
+ // clean up main element
+ this.element
+ .removeClass( "ui-accordion ui-widget ui-helper-reset" )
+ .removeAttr( "role" );
+
+ // clean up headers
+ this.headers
+ .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
+ .removeAttr( "role" )
+ .removeAttr( "aria-selected" )
+ .removeAttr( "aria-controls" )
+ .removeAttr( "tabIndex" )
+ .each(function() {
+ if ( /^ui-accordion/.test( this.id ) ) {
+ this.removeAttribute( "id" );
+ }
+ });
+ this._destroyIcons();
+
+ // clean up content panels
+ contents = this.headers.next()
+ .css( "display", "" )
+ .removeAttr( "role" )
+ .removeAttr( "aria-expanded" )
+ .removeAttr( "aria-hidden" )
+ .removeAttr( "aria-labelledby" )
+ .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
+ .each(function() {
+ if ( /^ui-accordion/.test( this.id ) ) {
+ this.removeAttribute( "id" );
+ }
+ });
+ if ( this.options.heightStyle !== "content" ) {
+ contents.css( "height", "" );
+ }
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "active" ) {
+ // _activate() will handle invalid values and update this.options
+ this._activate( value );
+ return;
+ }
+
+ if ( key === "event" ) {
+ if ( this.options.event ) {
+ this._off( this.headers, this.options.event );
+ }
+ this._setupEvents( value );
+ }
+
+ this._super( key, value );
+
+ // setting collapsible: false while collapsed; open first panel
+ if ( key === "collapsible" && !value && this.options.active === false ) {
+ this._activate( 0 );
+ }
+
+ if ( key === "icons" ) {
+ this._destroyIcons();
+ if ( value ) {
+ this._createIcons();
+ }
+ }
+
+ // #5332 - opacity doesn't cascade to positioned elements in IE
+ // so we need to add the disabled class to the headers and panels
+ if ( key === "disabled" ) {
+ this.headers.add( this.headers.next() )
+ .toggleClass( "ui-state-disabled", !!value );
+ }
+ },
+
+ _keydown: function( event ) {
+ if ( event.altKey || event.ctrlKey ) {
+ return;
+ }
+
+ var keyCode = $.ui.keyCode,
+ length = this.headers.length,
+ currentIndex = this.headers.index( event.target ),
+ toFocus = false;
+
+ switch ( event.keyCode ) {
+ case keyCode.RIGHT:
+ case keyCode.DOWN:
+ toFocus = this.headers[ ( currentIndex + 1 ) % length ];
+ break;
+ case keyCode.LEFT:
+ case keyCode.UP:
+ toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
+ break;
+ case keyCode.SPACE:
+ case keyCode.ENTER:
+ this._eventHandler( event );
+ break;
+ case keyCode.HOME:
+ toFocus = this.headers[ 0 ];
+ break;
+ case keyCode.END:
+ toFocus = this.headers[ length - 1 ];
+ break;
+ }
+
+ if ( toFocus ) {
+ $( event.target ).attr( "tabIndex", -1 );
+ $( toFocus ).attr( "tabIndex", 0 );
+ toFocus.focus();
+ event.preventDefault();
+ }
+ },
+
+ _panelKeyDown : function( event ) {
+ if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
+ $( event.currentTarget ).prev().focus();
+ }
+ },
+
+ refresh: function() {
+ var maxHeight, overflow,
+ heightStyle = this.options.heightStyle,
+ parent = this.element.parent();
+
+
+ if ( heightStyle === "fill" ) {
+ // IE 6 treats height like minHeight, so we need to turn off overflow
+ // in order to get a reliable height
+ // we use the minHeight support test because we assume that only
+ // browsers that don't support minHeight will treat height as minHeight
+ if ( !$.support.minHeight ) {
+ overflow = parent.css( "overflow" );
+ parent.css( "overflow", "hidden");
+ }
+ maxHeight = parent.height();
+ this.element.siblings( ":visible" ).each(function() {
+ var elem = $( this ),
+ position = elem.css( "position" );
+
+ if ( position === "absolute" || position === "fixed" ) {
+ return;
+ }
+ maxHeight -= elem.outerHeight( true );
+ });
+ if ( overflow ) {
+ parent.css( "overflow", overflow );
+ }
+
+ this.headers.each(function() {
+ maxHeight -= $( this ).outerHeight( true );
+ });
+
+ this.headers.next()
+ .each(function() {
+ $( this ).height( Math.max( 0, maxHeight -
+ $( this ).innerHeight() + $( this ).height() ) );
+ })
+ .css( "overflow", "auto" );
+ } else if ( heightStyle === "auto" ) {
+ maxHeight = 0;
+ this.headers.next()
+ .each(function() {
+ maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
+ })
+ .height( maxHeight );
+ }
+ },
+
+ _activate: function( index ) {
+ var active = this._findActive( index )[ 0 ];
+
+ // trying to activate the already active panel
+ if ( active === this.active[ 0 ] ) {
+ return;
+ }
+
+ // trying to collapse, simulate a click on the currently active header
+ active = active || this.active[ 0 ];
+
+ this._eventHandler({
+ target: active,
+ currentTarget: active,
+ preventDefault: $.noop
+ });
+ },
+
+ _findActive: function( selector ) {
+ return typeof selector === "number" ? this.headers.eq( selector ) : $();
+ },
+
+ _setupEvents: function( event ) {
+ var events = {};
+ if ( !event ) {
+ return;
+ }
+ $.each( event.split(" "), function( index, eventName ) {
+ events[ eventName ] = "_eventHandler";
+ });
+ this._on( this.headers, events );
+ },
+
+ _eventHandler: function( event ) {
+ var options = this.options,
+ active = this.active,
+ clicked = $( event.currentTarget ),
+ clickedIsActive = clicked[ 0 ] === active[ 0 ],
+ collapsing = clickedIsActive && options.collapsible,
+ toShow = collapsing ? $() : clicked.next(),
+ toHide = active.next(),
+ eventData = {
+ oldHeader: active,
+ oldPanel: toHide,
+ newHeader: collapsing ? $() : clicked,
+ newPanel: toShow
+ };
+
+ event.preventDefault();
+
+ if (
+ // click on active header, but not collapsible
+ ( clickedIsActive && !options.collapsible ) ||
+ // allow canceling activation
+ ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
+ return;
+ }
+
+ options.active = collapsing ? false : this.headers.index( clicked );
+
+ // when the call to ._toggle() comes after the class changes
+ // it causes a very odd bug in IE 8 (see #6720)
+ this.active = clickedIsActive ? $() : clicked;
+ this._toggle( eventData );
+
+ // switch classes
+ // corner classes on the previously active header stay after the animation
+ active.removeClass( "ui-accordion-header-active ui-state-active" );
+ if ( options.icons ) {
+ active.children( ".ui-accordion-header-icon" )
+ .removeClass( options.icons.activeHeader )
+ .addClass( options.icons.header );
+ }
+
+ if ( !clickedIsActive ) {
+ clicked
+ .removeClass( "ui-corner-all" )
+ .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
+ if ( options.icons ) {
+ clicked.children( ".ui-accordion-header-icon" )
+ .removeClass( options.icons.header )
+ .addClass( options.icons.activeHeader );
+ }
+
+ clicked
+ .next()
+ .addClass( "ui-accordion-content-active" );
+ }
+ },
+
+ _toggle: function( data ) {
+ var toShow = data.newPanel,
+ toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
+
+ // handle activating a panel during the animation for another activation
+ this.prevShow.add( this.prevHide ).stop( true, true );
+ this.prevShow = toShow;
+ this.prevHide = toHide;
+
+ if ( this.options.animate ) {
+ this._animate( toShow, toHide, data );
+ } else {
+ toHide.hide();
+ toShow.show();
+ this._toggleComplete( data );
+ }
+
+ toHide.attr({
+ "aria-expanded": "false",
+ "aria-hidden": "true"
+ });
+ toHide.prev().attr( "aria-selected", "false" );
+ // if we're switching panels, remove the old header from the tab order
+ // if we're opening from collapsed state, remove the previous header from the tab order
+ // if we're collapsing, then keep the collapsing header in the tab order
+ if ( toShow.length && toHide.length ) {
+ toHide.prev().attr( "tabIndex", -1 );
+ } else if ( toShow.length ) {
+ this.headers.filter(function() {
+ return $( this ).attr( "tabIndex" ) === 0;
+ })
+ .attr( "tabIndex", -1 );
+ }
+
+ toShow
+ .attr({
+ "aria-expanded": "true",
+ "aria-hidden": "false"
+ })
+ .prev()
+ .attr({
+ "aria-selected": "true",
+ tabIndex: 0
+ });
+ },
+
+ _animate: function( toShow, toHide, data ) {
+ var total, easing, duration,
+ that = this,
+ adjust = 0,
+ down = toShow.length &&
+ ( !toHide.length || ( toShow.index() < toHide.index() ) ),
+ animate = this.options.animate || {},
+ options = down && animate.down || animate,
+ complete = function() {
+ that._toggleComplete( data );
+ };
+
+ if ( typeof options === "number" ) {
+ duration = options;
+ }
+ if ( typeof options === "string" ) {
+ easing = options;
+ }
+ // fall back from options to animation in case of partial down settings
+ easing = easing || options.easing || animate.easing;
+ duration = duration || options.duration || animate.duration;
+
+ if ( !toHide.length ) {
+ return toShow.animate( showProps, duration, easing, complete );
+ }
+ if ( !toShow.length ) {
+ return toHide.animate( hideProps, duration, easing, complete );
+ }
+
+ total = toShow.show().outerHeight();
+ toHide.animate( hideProps, {
+ duration: duration,
+ easing: easing,
+ step: function( now, fx ) {
+ fx.now = Math.round( now );
+ }
+ });
+ toShow
+ .hide()
+ .animate( showProps, {
+ duration: duration,
+ easing: easing,
+ complete: complete,
+ step: function( now, fx ) {
+ fx.now = Math.round( now );
+ if ( fx.prop !== "height" ) {
+ adjust += fx.now;
+ } else if ( that.options.heightStyle !== "content" ) {
+ fx.now = Math.round( total - toHide.outerHeight() - adjust );
+ adjust = 0;
+ }
+ }
+ });
+ },
+
+ _toggleComplete: function( data ) {
+ var toHide = data.oldPanel;
+
+ toHide
+ .removeClass( "ui-accordion-content-active" )
+ .prev()
+ .removeClass( "ui-corner-top" )
+ .addClass( "ui-corner-all" );
+
+ // Work around for rendering bug in IE (#5421)
+ if ( toHide.length ) {
+ toHide.parent()[0].className = toHide.parent()[0].className;
+ }
+
+ this._trigger( "activate", null, data );
+ }
+});
+
+
+
+// DEPRECATED
+if ( $.uiBackCompat !== false ) {
+ // navigation options
+ (function( $, prototype ) {
+ $.extend( prototype.options, {
+ navigation: false,
+ navigationFilter: function() {
+ return this.href.toLowerCase() === location.href.toLowerCase();
+ }
+ });
+
+ var _create = prototype._create;
+ prototype._create = function() {
+ if ( this.options.navigation ) {
+ var that = this,
+ headers = this.element.find( this.options.header ),
+ content = headers.next(),
+ current = headers.add( content )
+ .find( "a" )
+ .filter( this.options.navigationFilter )
+ [ 0 ];
+ if ( current ) {
+ headers.add( content ).each( function( index ) {
+ if ( $.contains( this, current ) ) {
+ that.options.active = Math.floor( index / 2 );
+ return false;
+ }
+ });
+ }
+ }
+ _create.call( this );
+ };
+ }( jQuery, jQuery.ui.accordion.prototype ) );
+
+ // height options
+ (function( $, prototype ) {
+ $.extend( prototype.options, {
+ heightStyle: null, // remove default so we fall back to old values
+ autoHeight: true, // use heightStyle: "auto"
+ clearStyle: false, // use heightStyle: "content"
+ fillSpace: false // use heightStyle: "fill"
+ });
+
+ var _create = prototype._create,
+ _setOption = prototype._setOption;
+
+ $.extend( prototype, {
+ _create: function() {
+ this.options.heightStyle = this.options.heightStyle ||
+ this._mergeHeightStyle();
+
+ _create.call( this );
+ },
+
+ _setOption: function( key ) {
+ if ( key === "autoHeight" || key === "clearStyle" || key === "fillSpace" ) {
+ this.options.heightStyle = this._mergeHeightStyle();
+ }
+ _setOption.apply( this, arguments );
+ },
+
+ _mergeHeightStyle: function() {
+ var options = this.options;
+
+ if ( options.fillSpace ) {
+ return "fill";
+ }
+
+ if ( options.clearStyle ) {
+ return "content";
+ }
+
+ if ( options.autoHeight ) {
+ return "auto";
+ }
+ }
+ });
+ }( jQuery, jQuery.ui.accordion.prototype ) );
+
+ // icon options
+ (function( $, prototype ) {
+ $.extend( prototype.options.icons, {
+ activeHeader: null, // remove default so we fall back to old values
+ headerSelected: "ui-icon-triangle-1-s"
+ });
+
+ var _createIcons = prototype._createIcons;
+ prototype._createIcons = function() {
+ if ( this.options.icons ) {
+ this.options.icons.activeHeader = this.options.icons.activeHeader ||
+ this.options.icons.headerSelected;
+ }
+ _createIcons.call( this );
+ };
+ }( jQuery, jQuery.ui.accordion.prototype ) );
+
+ // expanded active option, activate method
+ (function( $, prototype ) {
+ prototype.activate = prototype._activate;
+
+ var _findActive = prototype._findActive;
+ prototype._findActive = function( index ) {
+ if ( index === -1 ) {
+ index = false;
+ }
+ if ( index && typeof index !== "number" ) {
+ index = this.headers.index( this.headers.filter( index ) );
+ if ( index === -1 ) {
+ index = false;
+ }
+ }
+ return _findActive.call( this, index );
+ };
+ }( jQuery, jQuery.ui.accordion.prototype ) );
+
+ // resize method
+ jQuery.ui.accordion.prototype.resize = jQuery.ui.accordion.prototype.refresh;
+
+ // change events
+ (function( $, prototype ) {
+ $.extend( prototype.options, {
+ change: null,
+ changestart: null
+ });
+
+ var _trigger = prototype._trigger;
+ prototype._trigger = function( type, event, data ) {
+ var ret = _trigger.apply( this, arguments );
+ if ( !ret ) {
+ return false;
+ }
+
+ if ( type === "beforeActivate" ) {
+ ret = _trigger.call( this, "changestart", event, {
+ oldHeader: data.oldHeader,
+ oldContent: data.oldPanel,
+ newHeader: data.newHeader,
+ newContent: data.newPanel
+ });
+ } else if ( type === "activate" ) {
+ ret = _trigger.call( this, "change", event, {
+ oldHeader: data.oldHeader,
+ oldContent: data.oldPanel,
+ newHeader: data.newHeader,
+ newContent: data.newPanel
+ });
+ }
+ return ret;
+ };
+ }( jQuery, jQuery.ui.accordion.prototype ) );
+
+ // animated option
+ // NOTE: this only provides support for "slide", "bounceslide", and easings
+ // not the full $.ui.accordion.animations API
+ (function( $, prototype ) {
+ $.extend( prototype.options, {
+ animate: null,
+ animated: "slide"
+ });
+
+ var _create = prototype._create;
+ prototype._create = function() {
+ var options = this.options;
+ if ( options.animate === null ) {
+ if ( !options.animated ) {
+ options.animate = false;
+ } else if ( options.animated === "slide" ) {
+ options.animate = 300;
+ } else if ( options.animated === "bounceslide" ) {
+ options.animate = {
+ duration: 200,
+ down: {
+ easing: "easeOutBounce",
+ duration: 1000
+ }
+ };
+ } else {
+ options.animate = options.animated;
+ }
+ }
+
+ _create.call( this );
+ };
+ }( jQuery, jQuery.ui.accordion.prototype ) );
+}
+
+})( jQuery );
+(function( $, undefined ) {
+
+// used to prevent race conditions with remote data sources
+var requestIndex = 0;
+
+$.widget( "ui.autocomplete", {
+ version: "1.9.2",
+ defaultElement: "<input>",
+ options: {
+ appendTo: "body",
+ autoFocus: false,
+ delay: 300,
+ minLength: 1,
+ position: {
+ my: "left top",
+ at: "left bottom",
+ collision: "none"
+ },
+ source: null,
+
+ // callbacks
+ change: null,
+ close: null,
+ focus: null,
+ open: null,
+ response: null,
+ search: null,
+ select: null
+ },
+
+ pending: 0,
+
+ _create: function() {
+ // Some browsers only repeat keydown events, not keypress events,
+ // so we use the suppressKeyPress flag to determine if we've already
+ // handled the keydown event. #7269
+ // Unfortunately the code for & in keypress is the same as the up arrow,
+ // so we use the suppressKeyPressRepeat flag to avoid handling keypress
+ // events when we know the keydown event was used to modify the
+ // search term. #7799
+ var suppressKeyPress, suppressKeyPressRepeat, suppressInput;
+
+ this.isMultiLine = this._isMultiLine();
+ this.valueMethod = this.element[ this.element.is( "input,textarea" ) ? "val" : "text" ];
+ this.isNewMenu = true;
+
+ this.element
+ .addClass( "ui-autocomplete-input" )
+ .attr( "autocomplete", "off" );
+
+ this._on( this.element, {
+ keydown: function( event ) {
+ if ( this.element.prop( "readOnly" ) ) {
+ suppressKeyPress = true;
+ suppressInput = true;
+ suppressKeyPressRepeat = true;
+ return;
+ }
+
+ suppressKeyPress = false;
+ suppressInput = false;
+ suppressKeyPressRepeat = false;
+ var keyCode = $.ui.keyCode;
+ switch( event.keyCode ) {
+ case keyCode.PAGE_UP:
+ suppressKeyPress = true;
+ this._move( "previousPage", event );
+ break;
+ case keyCode.PAGE_DOWN:
+ suppressKeyPress = true;
+ this._move( "nextPage", event );
+ break;
+ case keyCode.UP:
+ suppressKeyPress = true;
+ this._keyEvent( "previous", event );
+ break;
+ case keyCode.DOWN:
+ suppressKeyPress = true;
+ this._keyEvent( "next", event );
+ break;
+ case keyCode.ENTER:
+ case keyCode.NUMPAD_ENTER:
+ // when menu is open and has focus
+ if ( this.menu.active ) {
+ // #6055 - Opera still allows the keypress to occur
+ // which causes forms to submit
+ suppressKeyPress = true;
+ event.preventDefault();
+ this.menu.select( event );
+ }
+ break;
+ case keyCode.TAB:
+ if ( this.menu.active ) {
+ this.menu.select( event );
+ }
+ break;
+ case keyCode.ESCAPE:
+ if ( this.menu.element.is( ":visible" ) ) {
+ this._value( this.term );
+ this.close( event );
+ // Different browsers have different default behavior for escape
+ // Single press can mean undo or clear
+ // Double press in IE means clear the whole form
+ event.preventDefault();
+ }
+ break;
+ default:
+ suppressKeyPressRepeat = true;
+ // search timeout should be triggered before the input value is changed
+ this._searchTimeout( event );
+ break;
+ }
+ },
+ keypress: function( event ) {
+ if ( suppressKeyPress ) {
+ suppressKeyPress = false;
+ event.preventDefault();
+ return;
+ }
+ if ( suppressKeyPressRepeat ) {
+ return;
+ }
+
+ // replicate some key handlers to allow them to repeat in Firefox and Opera
+ var keyCode = $.ui.keyCode;
+ switch( event.keyCode ) {
+ case keyCode.PAGE_UP:
+ this._move( "previousPage", event );
+ break;
+ case keyCode.PAGE_DOWN:
+ this._move( "nextPage", event );
+ break;
+ case keyCode.UP:
+ this._keyEvent( "previous", event );
+ break;
+ case keyCode.DOWN:
+ this._keyEvent( "next", event );
+ break;
+ }
+ },
+ input: function( event ) {
+ if ( suppressInput ) {
+ suppressInput = false;
+ event.preventDefault();
+ return;
+ }
+ this._searchTimeout( event );
+ },
+ focus: function() {
+ this.selectedItem = null;
+ this.previous = this._value();
+ },
+ blur: function( event ) {
+ if ( this.cancelBlur ) {
+ delete this.cancelBlur;
+ return;
+ }
+
+ clearTimeout( this.searching );
+ this.close( event );
+ this._change( event );
+ }
+ });
+
+ this._initSource();
+ this.menu = $( "<ul>" )
+ .addClass( "ui-autocomplete" )
+ .appendTo( this.document.find( this.options.appendTo || "body" )[ 0 ] )
+ .menu({
+ // custom key handling for now
+ input: $(),
+ // disable ARIA support, the live region takes care of that
+ role: null
+ })
+ .zIndex( this.element.zIndex() + 1 )
+ .hide()
+ .data( "menu" );
+
+ this._on( this.menu.element, {
+ mousedown: function( event ) {
+ // prevent moving focus out of the text field
+ event.preventDefault();
+
+ // IE doesn't prevent moving focus even with event.preventDefault()
+ // so we set a flag to know when we should ignore the blur event
+ this.cancelBlur = true;
+ this._delay(function() {
+ delete this.cancelBlur;
+ });
+
+ // clicking on the scrollbar causes focus to shift to the body
+ // but we can't detect a mouseup or a click immediately afterward
+ // so we have to track the next mousedown and close the menu if
+ // the user clicks somewhere outside of the autocomplete
+ var menuElement = this.menu.element[ 0 ];
+ if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
+ this._delay(function() {
+ var that = this;
+ this.document.one( "mousedown", function( event ) {
+ if ( event.target !== that.element[ 0 ] &&
+ event.target !== menuElement &&
+ !$.contains( menuElement, event.target ) ) {
+ that.close();
+ }
+ });
+ });
+ }
+ },
+ menufocus: function( event, ui ) {
+ // #7024 - Prevent accidental activation of menu items in Firefox
+ if ( this.isNewMenu ) {
+ this.isNewMenu = false;
+ if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
+ this.menu.blur();
+
+ this.document.one( "mousemove", function() {
+ $( event.target ).trigger( event.originalEvent );
+ });
+
+ return;
+ }
+ }
+
+ // back compat for _renderItem using item.autocomplete, via #7810
+ // TODO remove the fallback, see #8156
+ var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" );
+ if ( false !== this._trigger( "focus", event, { item: item } ) ) {
+ // use value to match what will end up in the input, if it was a key event
+ if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
+ this._value( item.value );
+ }
+ } else {
+ // Normally the input is populated with the item's value as the
+ // menu is navigated, causing screen readers to notice a change and
+ // announce the item. Since the focus event was canceled, this doesn't
+ // happen, so we update the live region so that screen readers can
+ // still notice the change and announce it.
+ this.liveRegion.text( item.value );
+ }
+ },
+ menuselect: function( event, ui ) {
+ // back compat for _renderItem using item.autocomplete, via #7810
+ // TODO remove the fallback, see #8156
+ var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" ),
+ previous = this.previous;
+
+ // only trigger when focus was lost (click on menu)
+ if ( this.element[0] !== this.document[0].activeElement ) {
+ this.element.focus();
+ this.previous = previous;
+ // #6109 - IE triggers two focus events and the second
+ // is asynchronous, so we need to reset the previous
+ // term synchronously and asynchronously :-(
+ this._delay(function() {
+ this.previous = previous;
+ this.selectedItem = item;
+ });
+ }
+
+ if ( false !== this._trigger( "select", event, { item: item } ) ) {
+ this._value( item.value );
+ }
+ // reset the term after the select event
+ // this allows custom select handling to work properly
+ this.term = this._value();
+
+ this.close( event );
+ this.selectedItem = item;
+ }
+ });
+
+ this.liveRegion = $( "<span>", {
+ role: "status",
+ "aria-live": "polite"
+ })
+ .addClass( "ui-helper-hidden-accessible" )
+ .insertAfter( this.element );
+
+ if ( $.fn.bgiframe ) {
+ this.menu.element.bgiframe();
+ }
+
+ // turning off autocomplete prevents the browser from remembering the
+ // value when navigating through history, so we re-enable autocomplete
+ // if the page is unloaded before the widget is destroyed. #7790
+ this._on( this.window, {
+ beforeunload: function() {
+ this.element.removeAttr( "autocomplete" );
+ }
+ });
+ },
+
+ _destroy: function() {
+ clearTimeout( this.searching );
+ this.element
+ .removeClass( "ui-autocomplete-input" )
+ .removeAttr( "autocomplete" );
+ this.menu.element.remove();
+ this.liveRegion.remove();
+ },
+
+ _setOption: function( key, value ) {
+ this._super( key, value );
+ if ( key === "source" ) {
+ this._initSource();
+ }
+ if ( key === "appendTo" ) {
+ this.menu.element.appendTo( this.document.find( value || "body" )[0] );
+ }
+ if ( key === "disabled" && value && this.xhr ) {
+ this.xhr.abort();
+ }
+ },
+
+ _isMultiLine: function() {
+ // Textareas are always multi-line
+ if ( this.element.is( "textarea" ) ) {
+ return true;
+ }
+ // Inputs are always single-line, even if inside a contentEditable element
+ // IE also treats inputs as contentEditable
+ if ( this.element.is( "input" ) ) {
+ return false;
+ }
+ // All other element types are determined by whether or not they're contentEditable
+ return this.element.prop( "isContentEditable" );
+ },
+
+ _initSource: function() {
+ var array, url,
+ that = this;
+ if ( $.isArray(this.options.source) ) {
+ array = this.options.source;
+ this.source = function( request, response ) {
+ response( $.ui.autocomplete.filter( array, request.term ) );
+ };
+ } else if ( typeof this.options.source === "string" ) {
+ url = this.options.source;
+ this.source = function( request, response ) {
+ if ( that.xhr ) {
+ that.xhr.abort();
+ }
+ that.xhr = $.ajax({
+ url: url,
+ data: request,
+ dataType: "json",
+ success: function( data ) {
+ response( data );
+ },
+ error: function() {
+ response( [] );
+ }
+ });
+ };
+ } else {
+ this.source = this.options.source;
+ }
+ },
+
+ _searchTimeout: function( event ) {
+ clearTimeout( this.searching );
+ this.searching = this._delay(function() {
+ // only search if the value has changed
+ if ( this.term !== this._value() ) {
+ this.selectedItem = null;
+ this.search( null, event );
+ }
+ }, this.options.delay );
+ },
+
+ search: function( value, event ) {
+ value = value != null ? value : this._value();
+
+ // always save the actual value, not the one passed as an argument
+ this.term = this._value();
+
+ if ( value.length < this.options.minLength ) {
+ return this.close( event );
+ }
+
+ if ( this._trigger( "search", event ) === false ) {
+ return;
+ }
+
+ return this._search( value );
+ },
+
+ _search: function( value ) {
+ this.pending++;
+ this.element.addClass( "ui-autocomplete-loading" );
+ this.cancelSearch = false;
+
+ this.source( { term: value }, this._response() );
+ },
+
+ _response: function() {
+ var that = this,
+ index = ++requestIndex;
+
+ return function( content ) {
+ if ( index === requestIndex ) {
+ that.__response( content );
+ }
+
+ that.pending--;
+ if ( !that.pending ) {
+ that.element.removeClass( "ui-autocomplete-loading" );
+ }
+ };
+ },
+
+ __response: function( content ) {
+ if ( content ) {
+ content = this._normalize( content );
+ }
+ this._trigger( "response", null, { content: content } );
+ if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
+ this._suggest( content );
+ this._trigger( "open" );
+ } else {
+ // use ._close() instead of .close() so we don't cancel future searches
+ this._close();
+ }
+ },
+
+ close: function( event ) {
+ this.cancelSearch = true;
+ this._close( event );
+ },
+
+ _close: function( event ) {
+ if ( this.menu.element.is( ":visible" ) ) {
+ this.menu.element.hide();
+ this.menu.blur();
+ this.isNewMenu = true;
+ this._trigger( "close", event );
+ }
+ },
+
+ _change: function( event ) {
+ if ( this.previous !== this._value() ) {
+ this._trigger( "change", event, { item: this.selectedItem } );
+ }
+ },
+
+ _normalize: function( items ) {
+ // assume all items have the right format when the first item is complete
+ if ( items.length && items[0].label && items[0].value ) {
+ return items;
+ }
+ return $.map( items, function( item ) {
+ if ( typeof item === "string" ) {
+ return {
+ label: item,
+ value: item
+ };
+ }
+ return $.extend({
+ label: item.label || item.value,
+ value: item.value || item.label
+ }, item );
+ });
+ },
+
+ _suggest: function( items ) {
+ var ul = this.menu.element
+ .empty()
+ .zIndex( this.element.zIndex() + 1 );
+ this._renderMenu( ul, items );
+ this.menu.refresh();
+
+ // size and position menu
+ ul.show();
+ this._resizeMenu();
+ ul.position( $.extend({
+ of: this.element
+ }, this.options.position ));
+
+ if ( this.options.autoFocus ) {
+ this.menu.next();
+ }
+ },
+
+ _resizeMenu: function() {
+ var ul = this.menu.element;
+ ul.outerWidth( Math.max(
+ // Firefox wraps long text (possibly a rounding bug)
+ // so we add 1px to avoid the wrapping (#7513)
+ ul.width( "" ).outerWidth() + 1,
+ this.element.outerWidth()
+ ) );
+ },
+
+ _renderMenu: function( ul, items ) {
+ var that = this;
+ $.each( items, function( index, item ) {
+ that._renderItemData( ul, item );
+ });
+ },
+
+ _renderItemData: function( ul, item ) {
+ return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
+ },
+
+ _renderItem: function( ul, item ) {
+ return $( "<li>" )
+ .append( $( "<a>" ).text( item.label ) )
+ .appendTo( ul );
+ },
+
+ _move: function( direction, event ) {
+ if ( !this.menu.element.is( ":visible" ) ) {
+ this.search( null, event );
+ return;
+ }
+ if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
+ this.menu.isLastItem() && /^next/.test( direction ) ) {
+ this._value( this.term );
+ this.menu.blur();
+ return;
+ }
+ this.menu[ direction ]( event );
+ },
+
+ widget: function() {
+ return this.menu.element;
+ },
+
+ _value: function() {
+ return this.valueMethod.apply( this.element, arguments );
+ },
+
+ _keyEvent: function( keyEvent, event ) {
+ if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
+ this._move( keyEvent, event );
+
+ // prevents moving cursor to beginning/end of the text field in some browsers
+ event.preventDefault();
+ }
+ }
+});
+
+$.extend( $.ui.autocomplete, {
+ escapeRegex: function( value ) {
+ return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
+ },
+ filter: function(array, term) {
+ var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
+ return $.grep( array, function(value) {
+ return matcher.test( value.label || value.value || value );
+ });
+ }
+});
+
+
+// live region extension, adding a `messages` option
+// NOTE: This is an experimental API. We are still investigating
+// a full solution for string manipulation and internationalization.
+$.widget( "ui.autocomplete", $.ui.autocomplete, {
+ options: {
+ messages: {
+ noResults: "No search results.",
+ results: function( amount ) {
+ return amount + ( amount > 1 ? " results are" : " result is" ) +
+ " available, use up and down arrow keys to navigate.";
+ }
+ }
+ },
+
+ __response: function( content ) {
+ var message;
+ this._superApply( arguments );
+ if ( this.options.disabled || this.cancelSearch ) {
+ return;
+ }
+ if ( content && content.length ) {
+ message = this.options.messages.results( content.length );
+ } else {
+ message = this.options.messages.noResults;
+ }
+ this.liveRegion.text( message );
+ }
+});
+
+
+}( jQuery ));
+(function( $, undefined ) {
+
+var lastActive, startXPos, startYPos, clickDragged,
+ baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
+ stateClasses = "ui-state-hover ui-state-active ",
+ typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
+ formResetHandler = function() {
+ var buttons = $( this ).find( ":ui-button" );
+ setTimeout(function() {
+ buttons.button( "refresh" );
+ }, 1 );
+ },
+ radioGroup = function( radio ) {
+ var name = radio.name,
+ form = radio.form,
+ radios = $( [] );
+ if ( name ) {
+ if ( form ) {
+ radios = $( form ).find( "[name='" + name + "']" );
+ } else {
+ radios = $( "[name='" + name + "']", radio.ownerDocument )
+ .filter(function() {
+ return !this.form;
+ });
+ }
+ }
+ return radios;
+ };
+
+$.widget( "ui.button", {
+ version: "1.9.2",
+ defaultElement: "<button>",
+ options: {
+ disabled: null,
+ text: true,
+ label: null,
+ icons: {
+ primary: null,
+ secondary: null
+ }
+ },
+ _create: function() {
+ this.element.closest( "form" )
+ .unbind( "reset" + this.eventNamespace )
+ .bind( "reset" + this.eventNamespace, formResetHandler );
+
+ if ( typeof this.options.disabled !== "boolean" ) {
+ this.options.disabled = !!this.element.prop( "disabled" );
+ } else {
+ this.element.prop( "disabled", this.options.disabled );
+ }
+
+ this._determineButtonType();
+ this.hasTitle = !!this.buttonElement.attr( "title" );
+
+ var that = this,
+ options = this.options,
+ toggleButton = this.type === "checkbox" || this.type === "radio",
+ activeClass = !toggleButton ? "ui-state-active" : "",
+ focusClass = "ui-state-focus";
+
+ if ( options.label === null ) {
+ options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
+ }
+
+ this._hoverable( this.buttonElement );
+
+ this.buttonElement
+ .addClass( baseClasses )
+ .attr( "role", "button" )
+ .bind( "mouseenter" + this.eventNamespace, function() {
+ if ( options.disabled ) {
+ return;
+ }
+ if ( this === lastActive ) {
+ $( this ).addClass( "ui-state-active" );
+ }
+ })
+ .bind( "mouseleave" + this.eventNamespace, function() {
+ if ( options.disabled ) {
+ return;
+ }
+ $( this ).removeClass( activeClass );
+ })
+ .bind( "click" + this.eventNamespace, function( event ) {
+ if ( options.disabled ) {
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ }
+ });
+
+ this.element
+ .bind( "focus" + this.eventNamespace, function() {
+ // no need to check disabled, focus won't be triggered anyway
+ that.buttonElement.addClass( focusClass );
+ })
+ .bind( "blur" + this.eventNamespace, function() {
+ that.buttonElement.removeClass( focusClass );
+ });
+
+ if ( toggleButton ) {
+ this.element.bind( "change" + this.eventNamespace, function() {
+ if ( clickDragged ) {
+ return;
+ }
+ that.refresh();
+ });
+ // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
+ // prevents issue where button state changes but checkbox/radio checked state
+ // does not in Firefox (see ticket #6970)
+ this.buttonElement
+ .bind( "mousedown" + this.eventNamespace, function( event ) {
+ if ( options.disabled ) {
+ return;
+ }
+ clickDragged = false;
+ startXPos = event.pageX;
+ startYPos = event.pageY;
+ })
+ .bind( "mouseup" + this.eventNamespace, function( event ) {
+ if ( options.disabled ) {
+ return;
+ }
+ if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
+ clickDragged = true;
+ }
+ });
+ }
+
+ if ( this.type === "checkbox" ) {
+ this.buttonElement.bind( "click" + this.eventNamespace, function() {
+ if ( options.disabled || clickDragged ) {
+ return false;
+ }
+ $( this ).toggleClass( "ui-state-active" );
+ that.buttonElement.attr( "aria-pressed", that.element[0].checked );
+ });
+ } else if ( this.type === "radio" ) {
+ this.buttonElement.bind( "click" + this.eventNamespace, function() {
+ if ( options.disabled || clickDragged ) {
+ return false;
+ }
+ $( this ).addClass( "ui-state-active" );
+ that.buttonElement.attr( "aria-pressed", "true" );
+
+ var radio = that.element[ 0 ];
+ radioGroup( radio )
+ .not( radio )
+ .map(function() {
+ return $( this ).button( "widget" )[ 0 ];
+ })
+ .removeClass( "ui-state-active" )
+ .attr( "aria-pressed", "false" );
+ });
+ } else {
+ this.buttonElement
+ .bind( "mousedown" + this.eventNamespace, function() {
+ if ( options.disabled ) {
+ return false;
+ }
+ $( this ).addClass( "ui-state-active" );
+ lastActive = this;
+ that.document.one( "mouseup", function() {
+ lastActive = null;
+ });
+ })
+ .bind( "mouseup" + this.eventNamespace, function() {
+ if ( options.disabled ) {
+ return false;
+ }
+ $( this ).removeClass( "ui-state-active" );
+ })
+ .bind( "keydown" + this.eventNamespace, function(event) {
+ if ( options.disabled ) {
+ return false;
+ }
+ if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
+ $( this ).addClass( "ui-state-active" );
+ }
+ })
+ .bind( "keyup" + this.eventNamespace, function() {
+ $( this ).removeClass( "ui-state-active" );
+ });
+
+ if ( this.buttonElement.is("a") ) {
+ this.buttonElement.keyup(function(event) {
+ if ( event.keyCode === $.ui.keyCode.SPACE ) {
+ // TODO pass through original event correctly (just as 2nd argument doesn't work)
+ $( this ).click();
+ }
+ });
+ }
+ }
+
+ // TODO: pull out $.Widget's handling for the disabled option into
+ // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
+ // be overridden by individual plugins
+ this._setOption( "disabled", options.disabled );
+ this._resetButton();
+ },
+
+ _determineButtonType: function() {
+ var ancestor, labelSelector, checked;
+
+ if ( this.element.is("[type=checkbox]") ) {
+ this.type = "checkbox";
+ } else if ( this.element.is("[type=radio]") ) {
+ this.type = "radio";
+ } else if ( this.element.is("input") ) {
+ this.type = "input";
+ } else {
+ this.type = "button";
+ }
+
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ // we don't search against the document in case the element
+ // is disconnected from the DOM
+ ancestor = this.element.parents().last();
+ labelSelector = "label[for='" + this.element.attr("id") + "']";
+ this.buttonElement = ancestor.find( labelSelector );
+ if ( !this.buttonElement.length ) {
+ ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
+ this.buttonElement = ancestor.filter( labelSelector );
+ if ( !this.buttonElement.length ) {
+ this.buttonElement = ancestor.find( labelSelector );
+ }
+ }
+ this.element.addClass( "ui-helper-hidden-accessible" );
+
+ checked = this.element.is( ":checked" );
+ if ( checked ) {
+ this.buttonElement.addClass( "ui-state-active" );
+ }
+ this.buttonElement.prop( "aria-pressed", checked );
+ } else {
+ this.buttonElement = this.element;
+ }
+ },
+
+ widget: function() {
+ return this.buttonElement;
+ },
+
+ _destroy: function() {
+ this.element
+ .removeClass( "ui-helper-hidden-accessible" );
+ this.buttonElement
+ .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
+ .removeAttr( "role" )
+ .removeAttr( "aria-pressed" )
+ .html( this.buttonElement.find(".ui-button-text").html() );
+
+ if ( !this.hasTitle ) {
+ this.buttonElement.removeAttr( "title" );
+ }
+ },
+
+ _setOption: function( key, value ) {
+ this._super( key, value );
+ if ( key === "disabled" ) {
+ if ( value ) {
+ this.element.prop( "disabled", true );
+ } else {
+ this.element.prop( "disabled", false );
+ }
+ return;
+ }
+ this._resetButton();
+ },
+
+ refresh: function() {
+ //See #8237 & #8828
+ var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
+
+ if ( isDisabled !== this.options.disabled ) {
+ this._setOption( "disabled", isDisabled );
+ }
+ if ( this.type === "radio" ) {
+ radioGroup( this.element[0] ).each(function() {
+ if ( $( this ).is( ":checked" ) ) {
+ $( this ).button( "widget" )
+ .addClass( "ui-state-active" )
+ .attr( "aria-pressed", "true" );
+ } else {
+ $( this ).button( "widget" )
+ .removeClass( "ui-state-active" )
+ .attr( "aria-pressed", "false" );
+ }
+ });
+ } else if ( this.type === "checkbox" ) {
+ if ( this.element.is( ":checked" ) ) {
+ this.buttonElement
+ .addClass( "ui-state-active" )
+ .attr( "aria-pressed", "true" );
+ } else {
+ this.buttonElement
+ .removeClass( "ui-state-active" )
+ .attr( "aria-pressed", "false" );
+ }
+ }
+ },
+
+ _resetButton: function() {
+ if ( this.type === "input" ) {
+ if ( this.options.label ) {
+ this.element.val( this.options.label );
+ }
+ return;
+ }
+ var buttonElement = this.buttonElement.removeClass( typeClasses ),
+ buttonText = $( "<span></span>", this.document[0] )
+ .addClass( "ui-button-text" )
+ .html( this.options.label )
+ .appendTo( buttonElement.empty() )
+ .text(),
+ icons = this.options.icons,
+ multipleIcons = icons.primary && icons.secondary,
+ buttonClasses = [];
+
+ if ( icons.primary || icons.secondary ) {
+ if ( this.options.text ) {
+ buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
+ }
+
+ if ( icons.primary ) {
+ buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
+ }
+
+ if ( icons.secondary ) {
+ buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
+ }
+
+ if ( !this.options.text ) {
+ buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
+
+ if ( !this.hasTitle ) {
+ buttonElement.attr( "title", $.trim( buttonText ) );
+ }
+ }
+ } else {
+ buttonClasses.push( "ui-button-text-only" );
+ }
+ buttonElement.addClass( buttonClasses.join( " " ) );
+ }
+});
+
+$.widget( "ui.buttonset", {
+ version: "1.9.2",
+ options: {
+ items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"
+ },
+
+ _create: function() {
+ this.element.addClass( "ui-buttonset" );
+ },
+
+ _init: function() {
+ this.refresh();
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "disabled" ) {
+ this.buttons.button( "option", key, value );
+ }
+
+ this._super( key, value );
+ },
+
+ refresh: function() {
+ var rtl = this.element.css( "direction" ) === "rtl";
+
+ this.buttons = this.element.find( this.options.items )
+ .filter( ":ui-button" )
+ .button( "refresh" )
+ .end()
+ .not( ":ui-button" )
+ .button()
+ .end()
+ .map(function() {
+ return $( this ).button( "widget" )[ 0 ];
+ })
+ .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
+ .filter( ":first" )
+ .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
+ .end()
+ .filter( ":last" )
+ .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
+ .end()
+ .end();
+ },
+
+ _destroy: function() {
+ this.element.removeClass( "ui-buttonset" );
+ this.buttons
+ .map(function() {
+ return $( this ).button( "widget" )[ 0 ];
+ })
+ .removeClass( "ui-corner-left ui-corner-right" )
+ .end()
+ .button( "destroy" );
+ }
+});
+
+}( jQuery ) );
+(function( $, undefined ) {
+
+$.extend($.ui, { datepicker: { version: "1.9.2" } });
+
+var PROP_NAME = 'datepicker';
+var dpuuid = new Date().getTime();
+var instActive;
+
+/* Date picker manager.
+ Use the singleton instance of this class, $.datepicker, to interact with the date picker.
+ Settings for (groups of) date pickers are maintained in an instance object,
+ allowing multiple different settings on the same page. */
+
+function Datepicker() {
+ this.debug = false; // Change this to true to start debugging
+ this._curInst = null; // The current instance in use
+ this._keyEvent = false; // If the last event was a key event
+ this._disabledInputs = []; // List of date picker inputs that have been disabled
+ this._datepickerShowing = false; // True if the popup picker is showing , false if not
+ this._inDialog = false; // True if showing within a "dialog", false if not
+ this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
+ this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
+ this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
+ this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
+ this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
+ this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
+ this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
+ this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
+ this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
+ this.regional = []; // Available regional settings, indexed by language code
+ this.regional[''] = { // Default regional settings
+ closeText: 'Done', // Display text for close link
+ prevText: 'Prev', // Display text for previous month link
+ nextText: 'Next', // Display text for next month link
+ currentText: 'Today', // Display text for current month link
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'], // Names of months for drop-down and formatting
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
+ weekHeader: 'Wk', // Column header for week of the year
+ dateFormat: 'mm/dd/yy', // See format options on parseDate
+ firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
+ isRTL: false, // True if right-to-left language, false if left-to-right
+ showMonthAfterYear: false, // True if the year select precedes month, false for month then year
+ yearSuffix: '' // Additional text to append to the year in the month headers
+ };
+ this._defaults = { // Global defaults for all the date picker instances
+ showOn: 'focus', // 'focus' for popup on focus,
+ // 'button' for trigger button, or 'both' for either
+ showAnim: 'fadeIn', // Name of jQuery animation for popup
+ showOptions: {}, // Options for enhanced animations
+ defaultDate: null, // Used when field is blank: actual date,
+ // +/-number for offset from today, null for today
+ appendText: '', // Display text following the input box, e.g. showing the format
+ buttonText: '...', // Text for trigger button
+ buttonImage: '', // URL for trigger button image
+ buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
+ hideIfNoPrevNext: false, // True to hide next/previous month links
+ // if not applicable, false to just disable them
+ navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
+ gotoCurrent: false, // True if today link goes back to current selection instead
+ changeMonth: false, // True if month can be selected directly, false if only prev/next
+ changeYear: false, // True if year can be selected directly, false if only prev/next
+ yearRange: 'c-10:c+10', // Range of years to display in drop-down,
+ // either relative to today's year (-nn:+nn), relative to currently displayed year
+ // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
+ showOtherMonths: false, // True to show dates in other months, false to leave blank
+ selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
+ showWeek: false, // True to show week of the year, false to not show it
+ calculateWeek: this.iso8601Week, // How to calculate the week of the year,
+ // takes a Date and returns the number of the week for it
+ shortYearCutoff: '+10', // Short year values < this are in the current century,
+ // > this are in the previous century,
+ // string value starting with '+' for current year + value
+ minDate: null, // The earliest selectable date, or null for no limit
+ maxDate: null, // The latest selectable date, or null for no limit
+ duration: 'fast', // Duration of display/closure
+ beforeShowDay: null, // Function that takes a date and returns an array with
+ // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
+ // [2] = cell title (optional), e.g. $.datepicker.noWeekends
+ beforeShow: null, // Function that takes an input field and
+ // returns a set of custom settings for the date picker
+ onSelect: null, // Define a callback function when a date is selected
+ onChangeMonthYear: null, // Define a callback function when the month or year is changed
+ onClose: null, // Define a callback function when the datepicker is closed
+ numberOfMonths: 1, // Number of months to show at a time
+ showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
+ stepMonths: 1, // Number of months to step back/forward
+ stepBigMonths: 12, // Number of months to step back/forward for the big links
+ altField: '', // Selector for an alternate field to store selected dates into
+ altFormat: '', // The date format to use for the alternate field
+ constrainInput: true, // The input is constrained by the current date format
+ showButtonPanel: false, // True to show button panel, false to not show it
+ autoSize: false, // True to size the input for the date format, false to leave as is
+ disabled: false // The initial disabled state
+ };
+ $.extend(this._defaults, this.regional['']);
+ this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'));
+}
+
+$.extend(Datepicker.prototype, {
+ /* Class name added to elements to indicate already configured with a date picker. */
+ markerClassName: 'hasDatepicker',
+
+ //Keep track of the maximum number of rows displayed (see #7043)
+ maxRows: 4,
+
+ /* Debug logging (if enabled). */
+ log: function () {
+ if (this.debug)
+ console.log.apply('', arguments);
+ },
+
+ // TODO rename to "widget" when switching to widget factory
+ _widgetDatepicker: function() {
+ return this.dpDiv;
+ },
+
+ /* Override the default settings for all instances of the date picker.
+ @param settings object - the new settings to use as defaults (anonymous object)
+ @return the manager object */
+ setDefaults: function(settings) {
+ extendRemove(this._defaults, settings || {});
+ return this;
+ },
+
+ /* Attach the date picker to a jQuery selection.
+ @param target element - the target input field or division or span
+ @param settings object - the new settings to use for this date picker instance (anonymous) */
+ _attachDatepicker: function(target, settings) {
+ // check for settings on the control itself - in namespace 'date:'
+ var inlineSettings = null;
+ for (var attrName in this._defaults) {
+ var attrValue = target.getAttribute('date:' + attrName);
+ if (attrValue) {
+ inlineSettings = inlineSettings || {};
+ try {
+ inlineSettings[attrName] = eval(attrValue);
+ } catch (err) {
+ inlineSettings[attrName] = attrValue;
+ }
+ }
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ var inline = (nodeName == 'div' || nodeName == 'span');
+ if (!target.id) {
+ this.uuid += 1;
+ target.id = 'dp' + this.uuid;
+ }
+ var inst = this._newInst($(target), inline);
+ inst.settings = $.extend({}, settings || {}, inlineSettings || {});
+ if (nodeName == 'input') {
+ this._connectDatepicker(target, inst);
+ } else if (inline) {
+ this._inlineDatepicker(target, inst);
+ }
+ },
+
+ /* Create a new instance object. */
+ _newInst: function(target, inline) {
+ var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
+ return {id: id, input: target, // associated target
+ selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
+ drawMonth: 0, drawYear: 0, // month being drawn
+ inline: inline, // is datepicker inline or not
+ dpDiv: (!inline ? this.dpDiv : // presentation div
+ bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')))};
+ },
+
+ /* Attach the date picker to an input field. */
+ _connectDatepicker: function(target, inst) {
+ var input = $(target);
+ inst.append = $([]);
+ inst.trigger = $([]);
+ if (input.hasClass(this.markerClassName))
+ return;
+ this._attachments(input, inst);
+ input.addClass(this.markerClassName).keydown(this._doKeyDown).
+ keypress(this._doKeyPress).keyup(this._doKeyUp).
+ bind("setData.datepicker", function(event, key, value) {
+ inst.settings[key] = value;
+ }).bind("getData.datepicker", function(event, key) {
+ return this._get(inst, key);
+ });
+ this._autoSize(inst);
+ $.data(target, PROP_NAME, inst);
+ //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
+ if( inst.settings.disabled ) {
+ this._disableDatepicker( target );
+ }
+ },
+
+ /* Make attachments based on settings. */
+ _attachments: function(input, inst) {
+ var appendText = this._get(inst, 'appendText');
+ var isRTL = this._get(inst, 'isRTL');
+ if (inst.append)
+ inst.append.remove();
+ if (appendText) {
+ inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
+ input[isRTL ? 'before' : 'after'](inst.append);
+ }
+ input.unbind('focus', this._showDatepicker);
+ if (inst.trigger)
+ inst.trigger.remove();
+ var showOn = this._get(inst, 'showOn');
+ if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
+ input.focus(this._showDatepicker);
+ if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
+ var buttonText = this._get(inst, 'buttonText');
+ var buttonImage = this._get(inst, 'buttonImage');
+ inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
+ $('<img/>').addClass(this._triggerClass).
+ attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
+ $('<button type="button"></button>').addClass(this._triggerClass).
+ html(buttonImage == '' ? buttonText : $('<img/>').attr(
+ { src:buttonImage, alt:buttonText, title:buttonText })));
+ input[isRTL ? 'before' : 'after'](inst.trigger);
+ inst.trigger.click(function() {
+ if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
+ $.datepicker._hideDatepicker();
+ else if ($.datepicker._datepickerShowing && $.datepicker._lastInput != input[0]) {
+ $.datepicker._hideDatepicker();
+ $.datepicker._showDatepicker(input[0]);
+ } else
+ $.datepicker._showDatepicker(input[0]);
+ return false;
+ });
+ }
+ },
+
+ /* Apply the maximum length for the date format. */
+ _autoSize: function(inst) {
+ if (this._get(inst, 'autoSize') && !inst.inline) {
+ var date = new Date(2009, 12 - 1, 20); // Ensure double digits
+ var dateFormat = this._get(inst, 'dateFormat');
+ if (dateFormat.match(/[DM]/)) {
+ var findMax = function(names) {
+ var max = 0;
+ var maxI = 0;
+ for (var i = 0; i < names.length; i++) {
+ if (names[i].length > max) {
+ max = names[i].length;
+ maxI = i;
+ }
+ }
+ return maxI;
+ };
+ date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
+ 'monthNames' : 'monthNamesShort'))));
+ date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
+ 'dayNames' : 'dayNamesShort'))) + 20 - date.getDay());
+ }
+ inst.input.attr('size', this._formatDate(inst, date).length);
+ }
+ },
+
+ /* Attach an inline date picker to a div. */
+ _inlineDatepicker: function(target, inst) {
+ var divSpan = $(target);
+ if (divSpan.hasClass(this.markerClassName))
+ return;
+ divSpan.addClass(this.markerClassName).append(inst.dpDiv).
+ bind("setData.datepicker", function(event, key, value){
+ inst.settings[key] = value;
+ }).bind("getData.datepicker", function(event, key){
+ return this._get(inst, key);
+ });
+ $.data(target, PROP_NAME, inst);
+ this._setDate(inst, this._getDefaultDate(inst), true);
+ this._updateDatepicker(inst);
+ this._updateAlternate(inst);
+ //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
+ if( inst.settings.disabled ) {
+ this._disableDatepicker( target );
+ }
+ // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
+ // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
+ inst.dpDiv.css( "display", "block" );
+ },
+
+ /* Pop-up the date picker in a "dialog" box.
+ @param input element - ignored
+ @param date string or Date - the initial date to display
+ @param onSelect function - the function to call when a date is selected
+ @param settings object - update the dialog date picker instance's settings (anonymous object)
+ @param pos int[2] - coordinates for the dialog's position within the screen or
+ event - with x/y coordinates or
+ leave empty for default (screen centre)
+ @return the manager object */
+ _dialogDatepicker: function(input, date, onSelect, settings, pos) {
+ var inst = this._dialogInst; // internal instance
+ if (!inst) {
+ this.uuid += 1;
+ var id = 'dp' + this.uuid;
+ this._dialogInput = $('<input type="text" id="' + id +
+ '" style="position: absolute; top: -100px; width: 0px;"/>');
+ this._dialogInput.keydown(this._doKeyDown);
+ $('body').append(this._dialogInput);
+ inst = this._dialogInst = this._newInst(this._dialogInput, false);
+ inst.settings = {};
+ $.data(this._dialogInput[0], PROP_NAME, inst);
+ }
+ extendRemove(inst.settings, settings || {});
+ date = (date && date.constructor == Date ? this._formatDate(inst, date) : date);
+ this._dialogInput.val(date);
+
+ this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
+ if (!this._pos) {
+ var browserWidth = document.documentElement.clientWidth;
+ var browserHeight = document.documentElement.clientHeight;
+ var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+ var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+ this._pos = // should use actual width/height below
+ [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
+ }
+
+ // move input on screen for focus, but hidden behind dialog
+ this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px');
+ inst.settings.onSelect = onSelect;
+ this._inDialog = true;
+ this.dpDiv.addClass(this._dialogClass);
+ this._showDatepicker(this._dialogInput[0]);
+ if ($.blockUI)
+ $.blockUI(this.dpDiv);
+ $.data(this._dialogInput[0], PROP_NAME, inst);
+ return this;
+ },
+
+ /* Detach a datepicker from its control.
+ @param target element - the target input field or division or span */
+ _destroyDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ $.removeData(target, PROP_NAME);
+ if (nodeName == 'input') {
+ inst.append.remove();
+ inst.trigger.remove();
+ $target.removeClass(this.markerClassName).
+ unbind('focus', this._showDatepicker).
+ unbind('keydown', this._doKeyDown).
+ unbind('keypress', this._doKeyPress).
+ unbind('keyup', this._doKeyUp);
+ } else if (nodeName == 'div' || nodeName == 'span')
+ $target.removeClass(this.markerClassName).empty();
+ },
+
+ /* Enable the date picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _enableDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = false;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = false; }).end().
+ filter('img').css({opacity: '1.0', cursor: ''});
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().removeClass('ui-state-disabled');
+ inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
+ prop("disabled", false);
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target ? null : value); }); // delete entry
+ },
+
+ /* Disable the date picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _disableDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = true;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = true; }).end().
+ filter('img').css({opacity: '0.5', cursor: 'default'});
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().addClass('ui-state-disabled');
+ inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
+ prop("disabled", true);
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target ? null : value); }); // delete entry
+ this._disabledInputs[this._disabledInputs.length] = target;
+ },
+
+ /* Is the first field in a jQuery collection disabled as a datepicker?
+ @param target element - the target input field or division or span
+ @return boolean - true if disabled, false if enabled */
+ _isDisabledDatepicker: function(target) {
+ if (!target) {
+ return false;
+ }
+ for (var i = 0; i < this._disabledInputs.length; i++) {
+ if (this._disabledInputs[i] == target)
+ return true;
+ }
+ return false;
+ },
+
+ /* Retrieve the instance data for the target control.
+ @param target element - the target input field or division or span
+ @return object - the associated instance data
+ @throws error if a jQuery problem getting data */
+ _getInst: function(target) {
+ try {
+ return $.data(target, PROP_NAME);
+ }
+ catch (err) {
+ throw 'Missing instance data for this datepicker';
+ }
+ },
+
+ /* Update or retrieve the settings for a date picker attached to an input field or division.
+ @param target element - the target input field or division or span
+ @param name object - the new settings to update or
+ string - the name of the setting to change or retrieve,
+ when retrieving also 'all' for all instance settings or
+ 'defaults' for all global defaults
+ @param value any - the new value for the setting
+ (omit if above is an object or to retrieve a value) */
+ _optionDatepicker: function(target, name, value) {
+ var inst = this._getInst(target);
+ if (arguments.length == 2 && typeof name == 'string') {
+ return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
+ (inst ? (name == 'all' ? $.extend({}, inst.settings) :
+ this._get(inst, name)) : null));
+ }
+ var settings = name || {};
+ if (typeof name == 'string') {
+ settings = {};
+ settings[name] = value;
+ }
+ if (inst) {
+ if (this._curInst == inst) {
+ this._hideDatepicker();
+ }
+ var date = this._getDateDatepicker(target, true);
+ var minDate = this._getMinMaxDate(inst, 'min');
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ extendRemove(inst.settings, settings);
+ // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
+ if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined)
+ inst.settings.minDate = this._formatDate(inst, minDate);
+ if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined)
+ inst.settings.maxDate = this._formatDate(inst, maxDate);
+ this._attachments($(target), inst);
+ this._autoSize(inst);
+ this._setDate(inst, date);
+ this._updateAlternate(inst);
+ this._updateDatepicker(inst);
+ }
+ },
+
+ // change method deprecated
+ _changeDatepicker: function(target, name, value) {
+ this._optionDatepicker(target, name, value);
+ },
+
+ /* Redraw the date picker attached to an input field or division.
+ @param target element - the target input field or division or span */
+ _refreshDatepicker: function(target) {
+ var inst = this._getInst(target);
+ if (inst) {
+ this._updateDatepicker(inst);
+ }
+ },
+
+ /* Set the dates for a jQuery selection.
+ @param target element - the target input field or division or span
+ @param date Date - the new date */
+ _setDateDatepicker: function(target, date) {
+ var inst = this._getInst(target);
+ if (inst) {
+ this._setDate(inst, date);
+ this._updateDatepicker(inst);
+ this._updateAlternate(inst);
+ }
+ },
+
+ /* Get the date(s) for the first entry in a jQuery selection.
+ @param target element - the target input field or division or span
+ @param noDefault boolean - true if no default date is to be used
+ @return Date - the current date */
+ _getDateDatepicker: function(target, noDefault) {
+ var inst = this._getInst(target);
+ if (inst && !inst.inline)
+ this._setDateFromField(inst, noDefault);
+ return (inst ? this._getDate(inst) : null);
+ },
+
+ /* Handle keystrokes. */
+ _doKeyDown: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ var handled = true;
+ var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
+ inst._keyEvent = true;
+ if ($.datepicker._datepickerShowing)
+ switch (event.keyCode) {
+ case 9: $.datepicker._hideDatepicker();
+ handled = false;
+ break; // hide on tab out
+ case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' +
+ $.datepicker._currentClass + ')', inst.dpDiv);
+ if (sel[0])
+ $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
+ var onSelect = $.datepicker._get(inst, 'onSelect');
+ if (onSelect) {
+ var dateStr = $.datepicker._formatDate(inst);
+
+ // trigger custom callback
+ onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
+ }
+ else
+ $.datepicker._hideDatepicker();
+ return false; // don't submit the form
+ break; // select the value on enter
+ case 27: $.datepicker._hideDatepicker();
+ break; // hide on escape
+ case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ -$.datepicker._get(inst, 'stepBigMonths') :
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
+ break; // previous month/year on page up/+ ctrl
+ case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ +$.datepicker._get(inst, 'stepBigMonths') :
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
+ break; // next month/year on page down/+ ctrl
+ case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
+ handled = event.ctrlKey || event.metaKey;
+ break; // clear on ctrl or command +end
+ case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
+ handled = event.ctrlKey || event.metaKey;
+ break; // current on ctrl or command +home
+ case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
+ handled = event.ctrlKey || event.metaKey;
+ // -1 day on ctrl or command +left
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ -$.datepicker._get(inst, 'stepBigMonths') :
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
+ // next month/year on alt +left on Mac
+ break;
+ case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
+ handled = event.ctrlKey || event.metaKey;
+ break; // -1 week on ctrl or command +up
+ case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
+ handled = event.ctrlKey || event.metaKey;
+ // +1 day on ctrl or command +right
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ +$.datepicker._get(inst, 'stepBigMonths') :
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
+ // next month/year on alt +right
+ break;
+ case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
+ handled = event.ctrlKey || event.metaKey;
+ break; // +1 week on ctrl or command +down
+ default: handled = false;
+ }
+ else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
+ $.datepicker._showDatepicker(this);
+ else {
+ handled = false;
+ }
+ if (handled) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ },
+
+ /* Filter entered characters - based on date format. */
+ _doKeyPress: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ if ($.datepicker._get(inst, 'constrainInput')) {
+ var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
+ var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
+ return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
+ }
+ },
+
+ /* Synchronise manual entry and field/alternate field. */
+ _doKeyUp: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ if (inst.input.val() != inst.lastVal) {
+ try {
+ var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
+ (inst.input ? inst.input.val() : null),
+ $.datepicker._getFormatConfig(inst));
+ if (date) { // only if valid
+ $.datepicker._setDateFromField(inst);
+ $.datepicker._updateAlternate(inst);
+ $.datepicker._updateDatepicker(inst);
+ }
+ }
+ catch (err) {
+ $.datepicker.log(err);
+ }
+ }
+ return true;
+ },
+
+ /* Pop-up the date picker for a given input field.
+ If false returned from beforeShow event handler do not show.
+ @param input element - the input field attached to the date picker or
+ event - if triggered by focus */
+ _showDatepicker: function(input) {
+ input = input.target || input;
+ if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
+ input = $('input', input.parentNode)[0];
+ if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
+ return;
+ var inst = $.datepicker._getInst(input);
+ if ($.datepicker._curInst && $.datepicker._curInst != inst) {
+ $.datepicker._curInst.dpDiv.stop(true, true);
+ if ( inst && $.datepicker._datepickerShowing ) {
+ $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
+ }
+ }
+ var beforeShow = $.datepicker._get(inst, 'beforeShow');
+ var beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
+ if(beforeShowSettings === false){
+ //false
+ return;
+ }
+ extendRemove(inst.settings, beforeShowSettings);
+ inst.lastVal = null;
+ $.datepicker._lastInput = input;
+ $.datepicker._setDateFromField(inst);
+ if ($.datepicker._inDialog) // hide cursor
+ input.value = '';
+ if (!$.datepicker._pos) { // position below input
+ $.datepicker._pos = $.datepicker._findPos(input);
+ $.datepicker._pos[1] += input.offsetHeight; // add the height
+ }
+ var isFixed = false;
+ $(input).parents().each(function() {
+ isFixed |= $(this).css('position') == 'fixed';
+ return !isFixed;
+ });
+ var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
+ $.datepicker._pos = null;
+ //to avoid flashes on Firefox
+ inst.dpDiv.empty();
+ // determine sizing offscreen
+ inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
+ $.datepicker._updateDatepicker(inst);
+ // fix width for dynamic number of date pickers
+ // and adjust position before showing
+ offset = $.datepicker._checkOffset(inst, offset, isFixed);
+ inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
+ 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
+ left: offset.left + 'px', top: offset.top + 'px'});
+ if (!inst.inline) {
+ var showAnim = $.datepicker._get(inst, 'showAnim');
+ var duration = $.datepicker._get(inst, 'duration');
+ var postProcess = function() {
+ var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
+ if( !! cover.length ){
+ var borders = $.datepicker._getBorders(inst.dpDiv);
+ cover.css({left: -borders[0], top: -borders[1],
+ width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
+ }
+ };
+ inst.dpDiv.zIndex($(input).zIndex()+1);
+ $.datepicker._datepickerShowing = true;
+
+ // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
+ if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
+ inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
+ else
+ inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
+ if (!showAnim || !duration)
+ postProcess();
+ if (inst.input.is(':visible') && !inst.input.is(':disabled'))
+ inst.input.focus();
+ $.datepicker._curInst = inst;
+ }
+ },
+
+ /* Generate the date picker content. */
+ _updateDatepicker: function(inst) {
+ this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
+ var borders = $.datepicker._getBorders(inst.dpDiv);
+ instActive = inst; // for delegate hover events
+ inst.dpDiv.empty().append(this._generateHTML(inst));
+ this._attachHandlers(inst);
+ var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
+ if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
+ cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
+ }
+ inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
+ var numMonths = this._getNumberOfMonths(inst);
+ var cols = numMonths[1];
+ var width = 17;
+ inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
+ if (cols > 1)
+ inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
+ inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
+ 'Class']('ui-datepicker-multi');
+ inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
+ 'Class']('ui-datepicker-rtl');
+ if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
+ // #6694 - don't focus the input if it's already focused
+ // this breaks the change event in IE
+ inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
+ inst.input.focus();
+ // deffered render of the years select (to avoid flashes on Firefox)
+ if( inst.yearshtml ){
+ var origyearshtml = inst.yearshtml;
+ setTimeout(function(){
+ //assure that inst.yearshtml didn't change.
+ if( origyearshtml === inst.yearshtml && inst.yearshtml ){
+ inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
+ }
+ origyearshtml = inst.yearshtml = null;
+ }, 0);
+ }
+ },
+
+ /* Retrieve the size of left and top borders for an element.
+ @param elem (jQuery object) the element of interest
+ @return (number[2]) the left and top borders */
+ _getBorders: function(elem) {
+ var convert = function(value) {
+ return {thin: 1, medium: 2, thick: 3}[value] || value;
+ };
+ return [parseFloat(convert(elem.css('border-left-width'))),
+ parseFloat(convert(elem.css('border-top-width')))];
+ },
+
+ /* Check positioning to remain on screen. */
+ _checkOffset: function(inst, offset, isFixed) {
+ var dpWidth = inst.dpDiv.outerWidth();
+ var dpHeight = inst.dpDiv.outerHeight();
+ var inputWidth = inst.input ? inst.input.outerWidth() : 0;
+ var inputHeight = inst.input ? inst.input.outerHeight() : 0;
+ var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft());
+ var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
+
+ offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
+ offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
+ offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
+
+ // now check if datepicker is showing outside window viewport - move to a better place if so.
+ offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
+ Math.abs(offset.left + dpWidth - viewWidth) : 0);
+ offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
+ Math.abs(dpHeight + inputHeight) : 0);
+
+ return offset;
+ },
+
+ /* Find an object's position on the screen. */
+ _findPos: function(obj) {
+ var inst = this._getInst(obj);
+ var isRTL = this._get(inst, 'isRTL');
+ while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {
+ obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
+ }
+ var position = $(obj).offset();
+ return [position.left, position.top];
+ },
+
+ /* Hide the date picker from view.
+ @param input element - the input field attached to the date picker */
+ _hideDatepicker: function(input) {
+ var inst = this._curInst;
+ if (!inst || (input && inst != $.data(input, PROP_NAME)))
+ return;
+ if (this._datepickerShowing) {
+ var showAnim = this._get(inst, 'showAnim');
+ var duration = this._get(inst, 'duration');
+ var postProcess = function() {
+ $.datepicker._tidyDialog(inst);
+ };
+
+ // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
+ if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
+ inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
+ else
+ inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
+ (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
+ if (!showAnim)
+ postProcess();
+ this._datepickerShowing = false;
+ var onClose = this._get(inst, 'onClose');
+ if (onClose)
+ onClose.apply((inst.input ? inst.input[0] : null),
+ [(inst.input ? inst.input.val() : ''), inst]);
+ this._lastInput = null;
+ if (this._inDialog) {
+ this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
+ if ($.blockUI) {
+ $.unblockUI();
+ $('body').append(this.dpDiv);
+ }
+ }
+ this._inDialog = false;
+ }
+ },
+
+ /* Tidy up after a dialog display. */
+ _tidyDialog: function(inst) {
+ inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
+ },
+
+ /* Close date picker if clicked elsewhere. */
+ _checkExternalClick: function(event) {
+ if (!$.datepicker._curInst)
+ return;
+
+ var $target = $(event.target),
+ inst = $.datepicker._getInst($target[0]);
+
+ if ( ( ( $target[0].id != $.datepicker._mainDivId &&
+ $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
+ !$target.hasClass($.datepicker.markerClassName) &&
+ !$target.closest("." + $.datepicker._triggerClass).length &&
+ $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
+ ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) )
+ $.datepicker._hideDatepicker();
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustDate: function(id, offset, period) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ if (this._isDisabledDatepicker(target[0])) {
+ return;
+ }
+ this._adjustInstDate(inst, offset +
+ (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
+ period);
+ this._updateDatepicker(inst);
+ },
+
+ /* Action for current link. */
+ _gotoToday: function(id) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
+ inst.selectedDay = inst.currentDay;
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth;
+ inst.drawYear = inst.selectedYear = inst.currentYear;
+ }
+ else {
+ var date = new Date();
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ }
+ this._notifyChange(inst);
+ this._adjustDate(target);
+ },
+
+ /* Action for selecting a new month/year. */
+ _selectMonthYear: function(id, select, period) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
+ inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
+ parseInt(select.options[select.selectedIndex].value,10);
+ this._notifyChange(inst);
+ this._adjustDate(target);
+ },
+
+ /* Action for selecting a day. */
+ _selectDay: function(id, month, year, td) {
+ var target = $(id);
+ if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
+ return;
+ }
+ var inst = this._getInst(target[0]);
+ inst.selectedDay = inst.currentDay = $('a', td).html();
+ inst.selectedMonth = inst.currentMonth = month;
+ inst.selectedYear = inst.currentYear = year;
+ this._selectDate(id, this._formatDate(inst,
+ inst.currentDay, inst.currentMonth, inst.currentYear));
+ },
+
+ /* Erase the input field and hide the date picker. */
+ _clearDate: function(id) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ this._selectDate(target, '');
+ },
+
+ /* Update the input field with the selected date. */
+ _selectDate: function(id, dateStr) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
+ if (inst.input)
+ inst.input.val(dateStr);
+ this._updateAlternate(inst);
+ var onSelect = this._get(inst, 'onSelect');
+ if (onSelect)
+ onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
+ else if (inst.input)
+ inst.input.trigger('change'); // fire the change event
+ if (inst.inline)
+ this._updateDatepicker(inst);
+ else {
+ this._hideDatepicker();
+ this._lastInput = inst.input[0];
+ if (typeof(inst.input[0]) != 'object')
+ inst.input.focus(); // restore focus
+ this._lastInput = null;
+ }
+ },
+
+ /* Update any alternate field to synchronise with the main field. */
+ _updateAlternate: function(inst) {
+ var altField = this._get(inst, 'altField');
+ if (altField) { // update alternate field too
+ var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
+ var date = this._getDate(inst);
+ var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
+ $(altField).each(function() { $(this).val(dateStr); });
+ }
+ },
+
+ /* Set as beforeShowDay function to prevent selection of weekends.
+ @param date Date - the date to customise
+ @return [boolean, string] - is this date selectable?, what is its CSS class? */
+ noWeekends: function(date) {
+ var day = date.getDay();
+ return [(day > 0 && day < 6), ''];
+ },
+
+ /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
+ @param date Date - the date to get the week for
+ @return number - the number of the week within the year that contains this date */
+ iso8601Week: function(date) {
+ var checkDate = new Date(date.getTime());
+ // Find Thursday of this week starting on Monday
+ checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
+ var time = checkDate.getTime();
+ checkDate.setMonth(0); // Compare with Jan 1
+ checkDate.setDate(1);
+ return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
+ },
+
+ /* Parse a string value into a date object.
+ See formatDate below for the possible formats.
+
+ @param format string - the expected format of the date
+ @param value string - the date in the above format
+ @param settings Object - attributes include:
+ shortYearCutoff number - the cutoff year for determining the century (optional)
+ dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
+ dayNames string[7] - names of the days from Sunday (optional)
+ monthNamesShort string[12] - abbreviated names of the months (optional)
+ monthNames string[12] - names of the months (optional)
+ @return Date - the extracted date value or null if value is blank */
+ parseDate: function (format, value, settings) {
+ if (format == null || value == null)
+ throw 'Invalid arguments';
+ value = (typeof value == 'object' ? value.toString() : value + '');
+ if (value == '')
+ return null;
+ var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
+ shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
+ new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
+ var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
+ var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
+ var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
+ var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
+ var year = -1;
+ var month = -1;
+ var day = -1;
+ var doy = -1;
+ var literal = false;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
+ // Extract a number from the string value
+ var getNumber = function(match) {
+ var isDoubled = lookAhead(match);
+ var size = (match == '@' ? 14 : (match == '!' ? 20 :
+ (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));
+ var digits = new RegExp('^\\d{1,' + size + '}');
+ var num = value.substring(iValue).match(digits);
+ if (!num)
+ throw 'Missing number at position ' + iValue;
+ iValue += num[0].length;
+ return parseInt(num[0], 10);
+ };
+ // Extract a name from the string value and convert to an index
+ var getName = function(match, shortNames, longNames) {
+ var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
+ return [ [k, v] ];
+ }).sort(function (a, b) {
+ return -(a[1].length - b[1].length);
+ });
+ var index = -1;
+ $.each(names, function (i, pair) {
+ var name = pair[1];
+ if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) {
+ index = pair[0];
+ iValue += name.length;
+ return false;
+ }
+ });
+ if (index != -1)
+ return index + 1;
+ else
+ throw 'Unknown name at position ' + iValue;
+ };
+ // Confirm that a literal character matches the string value
+ var checkLiteral = function() {
+ if (value.charAt(iValue) != format.charAt(iFormat))
+ throw 'Unexpected literal at position ' + iValue;
+ iValue++;
+ };
+ var iValue = 0;
+ for (var iFormat = 0; iFormat < format.length; iFormat++) {
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ checkLiteral();
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd':
+ day = getNumber('d');
+ break;
+ case 'D':
+ getName('D', dayNamesShort, dayNames);
+ break;
+ case 'o':
+ doy = getNumber('o');
+ break;
+ case 'm':
+ month = getNumber('m');
+ break;
+ case 'M':
+ month = getName('M', monthNamesShort, monthNames);
+ break;
+ case 'y':
+ year = getNumber('y');
+ break;
+ case '@':
+ var date = new Date(getNumber('@'));
+ year = date.getFullYear();
+ month = date.getMonth() + 1;
+ day = date.getDate();
+ break;
+ case '!':
+ var date = new Date((getNumber('!') - this._ticksTo1970) / 10000);
+ year = date.getFullYear();
+ month = date.getMonth() + 1;
+ day = date.getDate();
+ break;
+ case "'":
+ if (lookAhead("'"))
+ checkLiteral();
+ else
+ literal = true;
+ break;
+ default:
+ checkLiteral();
+ }
+ }
+ if (iValue < value.length){
+ var extra = value.substr(iValue);
+ if (!/^\s+/.test(extra)) {
+ throw "Extra/unparsed characters found in date: " + extra;
+ }
+ }
+ if (year == -1)
+ year = new Date().getFullYear();
+ else if (year < 100)
+ year += new Date().getFullYear() - new Date().getFullYear() % 100 +
+ (year <= shortYearCutoff ? 0 : -100);
+ if (doy > -1) {
+ month = 1;
+ day = doy;
+ do {
+ var dim = this._getDaysInMonth(year, month - 1);
+ if (day <= dim)
+ break;
+ month++;
+ day -= dim;
+ } while (true);
+ }
+ var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
+ if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
+ throw 'Invalid date'; // E.g. 31/02/00
+ return date;
+ },
+
+ /* Standard date formats. */
+ ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
+ COOKIE: 'D, dd M yy',
+ ISO_8601: 'yy-mm-dd',
+ RFC_822: 'D, d M y',
+ RFC_850: 'DD, dd-M-y',
+ RFC_1036: 'D, d M y',
+ RFC_1123: 'D, d M yy',
+ RFC_2822: 'D, d M yy',
+ RSS: 'D, d M y', // RFC 822
+ TICKS: '!',
+ TIMESTAMP: '@',
+ W3C: 'yy-mm-dd', // ISO 8601
+
+ _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
+ Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
+
+ /* Format a date object into a string value.
+ The format can be combinations of the following:
+ d - day of month (no leading zero)
+ dd - day of month (two digit)
+ o - day of year (no leading zeros)
+ oo - day of year (three digit)
+ D - day name short
+ DD - day name long
+ m - month of year (no leading zero)
+ mm - month of year (two digit)
+ M - month name short
+ MM - month name long
+ y - year (two digit)
+ yy - year (four digit)
+ @ - Unix timestamp (ms since 01/01/1970)
+ ! - Windows ticks (100ns since 01/01/0001)
+ '...' - literal text
+ '' - single quote
+
+ @param format string - the desired format of the date
+ @param date Date - the date value to format
+ @param settings Object - attributes include:
+ dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
+ dayNames string[7] - names of the days from Sunday (optional)
+ monthNamesShort string[12] - abbreviated names of the months (optional)
+ monthNames string[12] - names of the months (optional)
+ @return string - the date in the above format */
+ formatDate: function (format, date, settings) {
+ if (!date)
+ return '';
+ var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
+ var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
+ var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
+ var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
+ // Format a number, with leading zero if necessary
+ var formatNumber = function(match, value, len) {
+ var num = '' + value;
+ if (lookAhead(match))
+ while (num.length < len)
+ num = '0' + num;
+ return num;
+ };
+ // Format a name, short or long as requested
+ var formatName = function(match, value, shortNames, longNames) {
+ return (lookAhead(match) ? longNames[value] : shortNames[value]);
+ };
+ var output = '';
+ var literal = false;
+ if (date)
+ for (var iFormat = 0; iFormat < format.length; iFormat++) {
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ output += format.charAt(iFormat);
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd':
+ output += formatNumber('d', date.getDate(), 2);
+ break;
+ case 'D':
+ output += formatName('D', date.getDay(), dayNamesShort, dayNames);
+ break;
+ case 'o':
+ output += formatNumber('o',
+ Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
+ break;
+ case 'm':
+ output += formatNumber('m', date.getMonth() + 1, 2);
+ break;
+ case 'M':
+ output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
+ break;
+ case 'y':
+ output += (lookAhead('y') ? date.getFullYear() :
+ (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
+ break;
+ case '@':
+ output += date.getTime();
+ break;
+ case '!':
+ output += date.getTime() * 10000 + this._ticksTo1970;
+ break;
+ case "'":
+ if (lookAhead("'"))
+ output += "'";
+ else
+ literal = true;
+ break;
+ default:
+ output += format.charAt(iFormat);
+ }
+ }
+ return output;
+ },
+
+ /* Extract all possible characters from the date format. */
+ _possibleChars: function (format) {
+ var chars = '';
+ var literal = false;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
+ for (var iFormat = 0; iFormat < format.length; iFormat++)
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ chars += format.charAt(iFormat);
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd': case 'm': case 'y': case '@':
+ chars += '0123456789';
+ break;
+ case 'D': case 'M':
+ return null; // Accept anything
+ case "'":
+ if (lookAhead("'"))
+ chars += "'";
+ else
+ literal = true;
+ break;
+ default:
+ chars += format.charAt(iFormat);
+ }
+ return chars;
+ },
+
+ /* Get a setting value, defaulting if necessary. */
+ _get: function(inst, name) {
+ return inst.settings[name] !== undefined ?
+ inst.settings[name] : this._defaults[name];
+ },
+
+ /* Parse existing date and initialise date picker. */
+ _setDateFromField: function(inst, noDefault) {
+ if (inst.input.val() == inst.lastVal) {
+ return;
+ }
+ var dateFormat = this._get(inst, 'dateFormat');
+ var dates = inst.lastVal = inst.input ? inst.input.val() : null;
+ var date, defaultDate;
+ date = defaultDate = this._getDefaultDate(inst);
+ var settings = this._getFormatConfig(inst);
+ try {
+ date = this.parseDate(dateFormat, dates, settings) || defaultDate;
+ } catch (event) {
+ this.log(event);
+ dates = (noDefault ? '' : dates);
+ }
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ inst.currentDay = (dates ? date.getDate() : 0);
+ inst.currentMonth = (dates ? date.getMonth() : 0);
+ inst.currentYear = (dates ? date.getFullYear() : 0);
+ this._adjustInstDate(inst);
+ },
+
+ /* Retrieve the default date shown on opening. */
+ _getDefaultDate: function(inst) {
+ return this._restrictMinMax(inst,
+ this._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));
+ },
+
+ /* A date may be specified as an exact value or a relative one. */
+ _determineDate: function(inst, date, defaultDate) {
+ var offsetNumeric = function(offset) {
+ var date = new Date();
+ date.setDate(date.getDate() + offset);
+ return date;
+ };
+ var offsetString = function(offset) {
+ try {
+ return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
+ offset, $.datepicker._getFormatConfig(inst));
+ }
+ catch (e) {
+ // Ignore
+ }
+ var date = (offset.toLowerCase().match(/^c/) ?
+ $.datepicker._getDate(inst) : null) || new Date();
+ var year = date.getFullYear();
+ var month = date.getMonth();
+ var day = date.getDate();
+ var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
+ var matches = pattern.exec(offset);
+ while (matches) {
+ switch (matches[2] || 'd') {
+ case 'd' : case 'D' :
+ day += parseInt(matches[1],10); break;
+ case 'w' : case 'W' :
+ day += parseInt(matches[1],10) * 7; break;
+ case 'm' : case 'M' :
+ month += parseInt(matches[1],10);
+ day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
+ break;
+ case 'y': case 'Y' :
+ year += parseInt(matches[1],10);
+ day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
+ break;
+ }
+ matches = pattern.exec(offset);
+ }
+ return new Date(year, month, day);
+ };
+ var newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) :
+ (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
+ newDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate);
+ if (newDate) {
+ newDate.setHours(0);
+ newDate.setMinutes(0);
+ newDate.setSeconds(0);
+ newDate.setMilliseconds(0);
+ }
+ return this._daylightSavingAdjust(newDate);
+ },
+
+ /* Handle switch to/from daylight saving.
+ Hours may be non-zero on daylight saving cut-over:
+ > 12 when midnight changeover, but then cannot generate
+ midnight datetime, so jump to 1AM, otherwise reset.
+ @param date (Date) the date to check
+ @return (Date) the corrected date */
+ _daylightSavingAdjust: function(date) {
+ if (!date) return null;
+ date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
+ return date;
+ },
+
+ /* Set the date(s) directly. */
+ _setDate: function(inst, date, noChange) {
+ var clear = !date;
+ var origMonth = inst.selectedMonth;
+ var origYear = inst.selectedYear;
+ var newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
+ inst.selectedDay = inst.currentDay = newDate.getDate();
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
+ inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
+ if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
+ this._notifyChange(inst);
+ this._adjustInstDate(inst);
+ if (inst.input) {
+ inst.input.val(clear ? '' : this._formatDate(inst));
+ }
+ },
+
+ /* Retrieve the date(s) directly. */
+ _getDate: function(inst) {
+ var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
+ this._daylightSavingAdjust(new Date(
+ inst.currentYear, inst.currentMonth, inst.currentDay)));
+ return startDate;
+ },
+
+ /* Attach the onxxx handlers. These are declared statically so
+ * they work with static code transformers like Caja.
+ */
+ _attachHandlers: function(inst) {
+ var stepMonths = this._get(inst, 'stepMonths');
+ var id = '#' + inst.id.replace( /\\\\/g, "\\" );
+ inst.dpDiv.find('[data-handler]').map(function () {
+ var handler = {
+ prev: function () {
+ window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, -stepMonths, 'M');
+ },
+ next: function () {
+ window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, +stepMonths, 'M');
+ },
+ hide: function () {
+ window['DP_jQuery_' + dpuuid].datepicker._hideDatepicker();
+ },
+ today: function () {
+ window['DP_jQuery_' + dpuuid].datepicker._gotoToday(id);
+ },
+ selectDay: function () {
+ window['DP_jQuery_' + dpuuid].datepicker._selectDay(id, +this.getAttribute('data-month'), +this.getAttribute('data-year'), this);
+ return false;
+ },
+ selectMonth: function () {
+ window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'M');
+ return false;
+ },
+ selectYear: function () {
+ window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'Y');
+ return false;
+ }
+ };
+ $(this).bind(this.getAttribute('data-event'), handler[this.getAttribute('data-handler')]);
+ });
+ },
+
+ /* Generate the HTML for the current state of the date picker. */
+ _generateHTML: function(inst) {
+ var today = new Date();
+ today = this._daylightSavingAdjust(
+ new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
+ var isRTL = this._get(inst, 'isRTL');
+ var showButtonPanel = this._get(inst, 'showButtonPanel');
+ var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
+ var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
+ var numMonths = this._getNumberOfMonths(inst);
+ var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
+ var stepMonths = this._get(inst, 'stepMonths');
+ var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
+ var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
+ new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
+ var minDate = this._getMinMaxDate(inst, 'min');
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ var drawMonth = inst.drawMonth - showCurrentAtPos;
+ var drawYear = inst.drawYear;
+ if (drawMonth < 0) {
+ drawMonth += 12;
+ drawYear--;
+ }
+ if (maxDate) {
+ var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
+ maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
+ maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
+ while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
+ drawMonth--;
+ if (drawMonth < 0) {
+ drawMonth = 11;
+ drawYear--;
+ }
+ }
+ }
+ inst.drawMonth = drawMonth;
+ inst.drawYear = drawYear;
+ var prevText = this._get(inst, 'prevText');
+ prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
+ this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
+ this._getFormatConfig(inst)));
+ var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
+ '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click"' +
+ ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
+ var nextText = this._get(inst, 'nextText');
+ nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
+ this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
+ this._getFormatConfig(inst)));
+ var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
+ '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click"' +
+ ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
+ var currentText = this._get(inst, 'currentText');
+ var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
+ currentText = (!navigationAsDateFormat ? currentText :
+ this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
+ var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">' +
+ this._get(inst, 'closeText') + '</button>' : '');
+ var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
+ (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click"' +
+ '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
+ var firstDay = parseInt(this._get(inst, 'firstDay'),10);
+ firstDay = (isNaN(firstDay) ? 0 : firstDay);
+ var showWeek = this._get(inst, 'showWeek');
+ var dayNames = this._get(inst, 'dayNames');
+ var dayNamesShort = this._get(inst, 'dayNamesShort');
+ var dayNamesMin = this._get(inst, 'dayNamesMin');
+ var monthNames = this._get(inst, 'monthNames');
+ var monthNamesShort = this._get(inst, 'monthNamesShort');
+ var beforeShowDay = this._get(inst, 'beforeShowDay');
+ var showOtherMonths = this._get(inst, 'showOtherMonths');
+ var selectOtherMonths = this._get(inst, 'selectOtherMonths');
+ var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
+ var defaultDate = this._getDefaultDate(inst);
+ var html = '';
+ for (var row = 0; row < numMonths[0]; row++) {
+ var group = '';
+ this.maxRows = 4;
+ for (var col = 0; col < numMonths[1]; col++) {
+ var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
+ var cornerClass = ' ui-corner-all';
+ var calender = '';
+ if (isMultiMonth) {
+ calender += '<div class="ui-datepicker-group';
+ if (numMonths[1] > 1)
+ switch (col) {
+ case 0: calender += ' ui-datepicker-group-first';
+ cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
+ case numMonths[1]-1: calender += ' ui-datepicker-group-last';
+ cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
+ default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;
+ }
+ calender += '">';
+ }
+ calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
+ (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
+ (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
+ this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
+ row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
+ '</div><table class="ui-datepicker-calendar"><thead>' +
+ '<tr>';
+ var thead = (showWeek ? '<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : '');
+ for (var dow = 0; dow < 7; dow++) { // days of the week
+ var day = (dow + firstDay) % 7;
+ thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
+ '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
+ }
+ calender += thead + '</tr></thead><tbody>';
+ var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
+ if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
+ inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
+ var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
+ var curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
+ var numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
+ this.maxRows = numRows;
+ var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
+ for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
+ calender += '<tr>';
+ var tbody = (!showWeek ? '' : '<td class="ui-datepicker-week-col">' +
+ this._get(inst, 'calculateWeek')(printDate) + '</td>');
+ for (var dow = 0; dow < 7; dow++) { // create date picker days
+ var daySettings = (beforeShowDay ?
+ beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
+ var otherMonth = (printDate.getMonth() != drawMonth);
+ var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
+ (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
+ tbody += '<td class="' +
+ ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
+ (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
+ ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
+ (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
+ // or defaultDate is current printedDate and defaultDate is selectedDate
+ ' ' + this._dayOverClass : '') + // highlight selected day
+ (unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
+ (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
+ (printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
+ (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
+ ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
+ (unselectable ? '' : ' data-handler="selectDay" data-event="click" data-month="' + printDate.getMonth() + '" data-year="' + printDate.getFullYear() + '"') + '>' + // actions
+ (otherMonth && !showOtherMonths ? '&#xa0;' : // display for other months
+ (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
+ (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
+ (printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
+ (otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
+ '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
+ printDate.setDate(printDate.getDate() + 1);
+ printDate = this._daylightSavingAdjust(printDate);
+ }
+ calender += tbody + '</tr>';
+ }
+ drawMonth++;
+ if (drawMonth > 11) {
+ drawMonth = 0;
+ drawYear++;
+ }
+ calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
+ ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
+ group += calender;
+ }
+ html += group;
+ }
+ html += buttonPanel + ($.ui.ie6 && !inst.inline ?
+ '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
+ inst._keyEvent = false;
+ return html;
+ },
+
+ /* Generate the month and year header. */
+ _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
+ secondary, monthNames, monthNamesShort) {
+ var changeMonth = this._get(inst, 'changeMonth');
+ var changeYear = this._get(inst, 'changeYear');
+ var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
+ var html = '<div class="ui-datepicker-title">';
+ var monthHtml = '';
+ // month selection
+ if (secondary || !changeMonth)
+ monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>';
+ else {
+ var inMinYear = (minDate && minDate.getFullYear() == drawYear);
+ var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
+ monthHtml += '<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';
+ for (var month = 0; month < 12; month++) {
+ if ((!inMinYear || month >= minDate.getMonth()) &&
+ (!inMaxYear || month <= maxDate.getMonth()))
+ monthHtml += '<option value="' + month + '"' +
+ (month == drawMonth ? ' selected="selected"' : '') +
+ '>' + monthNamesShort[month] + '</option>';
+ }
+ monthHtml += '</select>';
+ }
+ if (!showMonthAfterYear)
+ html += monthHtml + (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '');
+ // year selection
+ if ( !inst.yearshtml ) {
+ inst.yearshtml = '';
+ if (secondary || !changeYear)
+ html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
+ else {
+ // determine range of years to display
+ var years = this._get(inst, 'yearRange').split(':');
+ var thisYear = new Date().getFullYear();
+ var determineYear = function(value) {
+ var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) :
+ (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) :
+ parseInt(value, 10)));
+ return (isNaN(year) ? thisYear : year);
+ };
+ var year = determineYear(years[0]);
+ var endYear = Math.max(year, determineYear(years[1] || ''));
+ year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
+ endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
+ inst.yearshtml += '<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';
+ for (; year <= endYear; year++) {
+ inst.yearshtml += '<option value="' + year + '"' +
+ (year == drawYear ? ' selected="selected"' : '') +
+ '>' + year + '</option>';
+ }
+ inst.yearshtml += '</select>';
+
+ html += inst.yearshtml;
+ inst.yearshtml = null;
+ }
+ }
+ html += this._get(inst, 'yearSuffix');
+ if (showMonthAfterYear)
+ html += (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '') + monthHtml;
+ html += '</div>'; // Close datepicker_header
+ return html;
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustInstDate: function(inst, offset, period) {
+ var year = inst.drawYear + (period == 'Y' ? offset : 0);
+ var month = inst.drawMonth + (period == 'M' ? offset : 0);
+ var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
+ (period == 'D' ? offset : 0);
+ var date = this._restrictMinMax(inst,
+ this._daylightSavingAdjust(new Date(year, month, day)));
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ if (period == 'M' || period == 'Y')
+ this._notifyChange(inst);
+ },
+
+ /* Ensure a date is within any min/max bounds. */
+ _restrictMinMax: function(inst, date) {
+ var minDate = this._getMinMaxDate(inst, 'min');
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ var newDate = (minDate && date < minDate ? minDate : date);
+ newDate = (maxDate && newDate > maxDate ? maxDate : newDate);
+ return newDate;
+ },
+
+ /* Notify change of month/year. */
+ _notifyChange: function(inst) {
+ var onChange = this._get(inst, 'onChangeMonthYear');
+ if (onChange)
+ onChange.apply((inst.input ? inst.input[0] : null),
+ [inst.selectedYear, inst.selectedMonth + 1, inst]);
+ },
+
+ /* Determine the number of months to show. */
+ _getNumberOfMonths: function(inst) {
+ var numMonths = this._get(inst, 'numberOfMonths');
+ return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
+ },
+
+ /* Determine the current maximum date - ensure no time components are set. */
+ _getMinMaxDate: function(inst, minMax) {
+ return this._determineDate(inst, this._get(inst, minMax + 'Date'), null);
+ },
+
+ /* Find the number of days in a given month. */
+ _getDaysInMonth: function(year, month) {
+ return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
+ },
+
+ /* Find the day of the week of the first of a month. */
+ _getFirstDayOfMonth: function(year, month) {
+ return new Date(year, month, 1).getDay();
+ },
+
+ /* Determines if we should allow a "next/prev" month display change. */
+ _canAdjustMonth: function(inst, offset, curYear, curMonth) {
+ var numMonths = this._getNumberOfMonths(inst);
+ var date = this._daylightSavingAdjust(new Date(curYear,
+ curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
+ if (offset < 0)
+ date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
+ return this._isInRange(inst, date);
+ },
+
+ /* Is the given date in the accepted range? */
+ _isInRange: function(inst, date) {
+ var minDate = this._getMinMaxDate(inst, 'min');
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ return ((!minDate || date.getTime() >= minDate.getTime()) &&
+ (!maxDate || date.getTime() <= maxDate.getTime()));
+ },
+
+ /* Provide the configuration settings for formatting/parsing. */
+ _getFormatConfig: function(inst) {
+ var shortYearCutoff = this._get(inst, 'shortYearCutoff');
+ shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
+ new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
+ return {shortYearCutoff: shortYearCutoff,
+ dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
+ monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
+ },
+
+ /* Format the given date for display. */
+ _formatDate: function(inst, day, month, year) {
+ if (!day) {
+ inst.currentDay = inst.selectedDay;
+ inst.currentMonth = inst.selectedMonth;
+ inst.currentYear = inst.selectedYear;
+ }
+ var date = (day ? (typeof day == 'object' ? day :
+ this._daylightSavingAdjust(new Date(year, month, day))) :
+ this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
+ return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
+ }
+});
+
+/*
+ * Bind hover events for datepicker elements.
+ * Done via delegate so the binding only occurs once in the lifetime of the parent div.
+ * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
+ */
+function bindHover(dpDiv) {
+ var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
+ return dpDiv.delegate(selector, 'mouseout', function() {
+ $(this).removeClass('ui-state-hover');
+ if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
+ if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
+ })
+ .delegate(selector, 'mouseover', function(){
+ if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
+ $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
+ $(this).addClass('ui-state-hover');
+ if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
+ if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
+ }
+ });
+}
+
+/* jQuery extend now ignores nulls! */
+function extendRemove(target, props) {
+ $.extend(target, props);
+ for (var name in props)
+ if (props[name] == null || props[name] == undefined)
+ target[name] = props[name];
+ return target;
+};
+
+/* Invoke the datepicker functionality.
+ @param options string - a command, optionally followed by additional parameters or
+ Object - settings for attaching new datepicker functionality
+ @return jQuery object */
+$.fn.datepicker = function(options){
+
+ /* Verify an empty collection wasn't passed - Fixes #6976 */
+ if ( !this.length ) {
+ return this;
+ }
+
+ /* Initialise the date picker. */
+ if (!$.datepicker.initialized) {
+ $(document).mousedown($.datepicker._checkExternalClick).
+ find(document.body).append($.datepicker.dpDiv);
+ $.datepicker.initialized = true;
+ }
+
+ var otherArgs = Array.prototype.slice.call(arguments, 1);
+ if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))
+ return $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this[0]].concat(otherArgs));
+ if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
+ return $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this[0]].concat(otherArgs));
+ return this.each(function() {
+ typeof options == 'string' ?
+ $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this].concat(otherArgs)) :
+ $.datepicker._attachDatepicker(this, options);
+ });
+};
+
+$.datepicker = new Datepicker(); // singleton instance
+$.datepicker.initialized = false;
+$.datepicker.uuid = new Date().getTime();
+$.datepicker.version = "1.9.2";
+
+// Workaround for #4055
+// Add another global to avoid noConflict issues with inline event handlers
+window['DP_jQuery_' + dpuuid] = $;
+
+})(jQuery);
+(function( $, undefined ) {
+
+var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ",
+ sizeRelatedOptions = {
+ buttons: true,
+ height: true,
+ maxHeight: true,
+ maxWidth: true,
+ minHeight: true,
+ minWidth: true,
+ width: true
+ },
+ resizableRelatedOptions = {
+ maxHeight: true,
+ maxWidth: true,
+ minHeight: true,
+ minWidth: true
+ };
+
+$.widget("ui.dialog", {
+ version: "1.9.2",
+ options: {
+ autoOpen: true,
+ buttons: {},
+ closeOnEscape: true,
+ closeText: "close",
+ dialogClass: "",
+ draggable: true,
+ hide: null,
+ height: "auto",
+ maxHeight: false,
+ maxWidth: false,
+ minHeight: 150,
+ minWidth: 150,
+ modal: false,
+ position: {
+ my: "center",
+ at: "center",
+ of: window,
+ collision: "fit",
+ // ensure that the titlebar is never outside the document
+ using: function( pos ) {
+ var topOffset = $( this ).css( pos ).offset().top;
+ if ( topOffset < 0 ) {
+ $( this ).css( "top", pos.top - topOffset );
+ }
+ }
+ },
+ resizable: true,
+ show: null,
+ stack: true,
+ title: "",
+ width: 300,
+ zIndex: 1000
+ },
+
+ _create: function() {
+ this.originalTitle = this.element.attr( "title" );
+ // #5742 - .attr() might return a DOMElement
+ if ( typeof this.originalTitle !== "string" ) {
+ this.originalTitle = "";
+ }
+ this.oldPosition = {
+ parent: this.element.parent(),
+ index: this.element.parent().children().index( this.element )
+ };
+ this.options.title = this.options.title || this.originalTitle;
+ var that = this,
+ options = this.options,
+
+ title = options.title || "&#160;",
+ uiDialog,
+ uiDialogTitlebar,
+ uiDialogTitlebarClose,
+ uiDialogTitle,
+ uiDialogButtonPane;
+
+ uiDialog = ( this.uiDialog = $( "<div>" ) )
+ .addClass( uiDialogClasses + options.dialogClass )
+ .css({
+ display: "none",
+ outline: 0, // TODO: move to stylesheet
+ zIndex: options.zIndex
+ })
+ // setting tabIndex makes the div focusable
+ .attr( "tabIndex", -1)
+ .keydown(function( event ) {
+ if ( options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
+ event.keyCode === $.ui.keyCode.ESCAPE ) {
+ that.close( event );
+ event.preventDefault();
+ }
+ })
+ .mousedown(function( event ) {
+ that.moveToTop( false, event );
+ })
+ .appendTo( "body" );
+
+ this.element
+ .show()
+ .removeAttr( "title" )
+ .addClass( "ui-dialog-content ui-widget-content" )
+ .appendTo( uiDialog );
+
+ uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )
+ .addClass( "ui-dialog-titlebar ui-widget-header " +
+ "ui-corner-all ui-helper-clearfix" )
+ .bind( "mousedown", function() {
+ // Dialog isn't getting focus when dragging (#8063)
+ uiDialog.focus();
+ })
+ .prependTo( uiDialog );
+
+ uiDialogTitlebarClose = $( "<a href='#'></a>" )
+ .addClass( "ui-dialog-titlebar-close ui-corner-all" )
+ .attr( "role", "button" )
+ .click(function( event ) {
+ event.preventDefault();
+ that.close( event );
+ })
+ .appendTo( uiDialogTitlebar );
+
+ ( this.uiDialogTitlebarCloseText = $( "<span>" ) )
+ .addClass( "ui-icon ui-icon-closethick" )
+ .text( options.closeText )
+ .appendTo( uiDialogTitlebarClose );
+
+ uiDialogTitle = $( "<span>" )
+ .uniqueId()
+ .addClass( "ui-dialog-title" )
+ .html( title )
+ .prependTo( uiDialogTitlebar );
+
+ uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
+ .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
+
+ ( this.uiButtonSet = $( "<div>" ) )
+ .addClass( "ui-dialog-buttonset" )
+ .appendTo( uiDialogButtonPane );
+
+ uiDialog.attr({
+ role: "dialog",
+ "aria-labelledby": uiDialogTitle.attr( "id" )
+ });
+
+ uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection();
+ this._hoverable( uiDialogTitlebarClose );
+ this._focusable( uiDialogTitlebarClose );
+
+ if ( options.draggable && $.fn.draggable ) {
+ this._makeDraggable();
+ }
+ if ( options.resizable && $.fn.resizable ) {
+ this._makeResizable();
+ }
+
+ this._createButtons( options.buttons );
+ this._isOpen = false;
+
+ if ( $.fn.bgiframe ) {
+ uiDialog.bgiframe();
+ }
+
+ // prevent tabbing out of modal dialogs
+ this._on( uiDialog, { keydown: function( event ) {
+ if ( !options.modal || event.keyCode !== $.ui.keyCode.TAB ) {
+ return;
+ }
+
+ var tabbables = $( ":tabbable", uiDialog ),
+ first = tabbables.filter( ":first" ),
+ last = tabbables.filter( ":last" );
+
+ if ( event.target === last[0] && !event.shiftKey ) {
+ first.focus( 1 );
+ return false;
+ } else if ( event.target === first[0] && event.shiftKey ) {
+ last.focus( 1 );
+ return false;
+ }
+ }});
+ },
+
+ _init: function() {
+ if ( this.options.autoOpen ) {
+ this.open();
+ }
+ },
+
+ _destroy: function() {
+ var next,
+ oldPosition = this.oldPosition;
+
+ if ( this.overlay ) {
+ this.overlay.destroy();
+ }
+ this.uiDialog.hide();
+ this.element
+ .removeClass( "ui-dialog-content ui-widget-content" )
+ .hide()
+ .appendTo( "body" );
+ this.uiDialog.remove();
+
+ if ( this.originalTitle ) {
+ this.element.attr( "title", this.originalTitle );
+ }
+
+ next = oldPosition.parent.children().eq( oldPosition.index );
+ // Don't try to place the dialog next to itself (#8613)
+ if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
+ next.before( this.element );
+ } else {
+ oldPosition.parent.append( this.element );
+ }
+ },
+
+ widget: function() {
+ return this.uiDialog;
+ },
+
+ close: function( event ) {
+ var that = this,
+ maxZ, thisZ;
+
+ if ( !this._isOpen ) {
+ return;
+ }
+
+ if ( false === this._trigger( "beforeClose", event ) ) {
+ return;
+ }
+
+ this._isOpen = false;
+
+ if ( this.overlay ) {
+ this.overlay.destroy();
+ }
+
+ if ( this.options.hide ) {
+ this._hide( this.uiDialog, this.options.hide, function() {
+ that._trigger( "close", event );
+ });
+ } else {
+ this.uiDialog.hide();
+ this._trigger( "close", event );
+ }
+
+ $.ui.dialog.overlay.resize();
+
+ // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
+ if ( this.options.modal ) {
+ maxZ = 0;
+ $( ".ui-dialog" ).each(function() {
+ if ( this !== that.uiDialog[0] ) {
+ thisZ = $( this ).css( "z-index" );
+ if ( !isNaN( thisZ ) ) {
+ maxZ = Math.max( maxZ, thisZ );
+ }
+ }
+ });
+ $.ui.dialog.maxZ = maxZ;
+ }
+
+ return this;
+ },
+
+ isOpen: function() {
+ return this._isOpen;
+ },
+
+ // the force parameter allows us to move modal dialogs to their correct
+ // position on open
+ moveToTop: function( force, event ) {
+ var options = this.options,
+ saveScroll;
+
+ if ( ( options.modal && !force ) ||
+ ( !options.stack && !options.modal ) ) {
+ return this._trigger( "focus", event );
+ }
+
+ if ( options.zIndex > $.ui.dialog.maxZ ) {
+ $.ui.dialog.maxZ = options.zIndex;
+ }
+ if ( this.overlay ) {
+ $.ui.dialog.maxZ += 1;
+ $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ;
+ this.overlay.$el.css( "z-index", $.ui.dialog.overlay.maxZ );
+ }
+
+ // Save and then restore scroll
+ // Opera 9.5+ resets when parent z-index is changed.
+ // http://bugs.jqueryui.com/ticket/3193
+ saveScroll = {
+ scrollTop: this.element.scrollTop(),
+ scrollLeft: this.element.scrollLeft()
+ };
+ $.ui.dialog.maxZ += 1;
+ this.uiDialog.css( "z-index", $.ui.dialog.maxZ );
+ this.element.attr( saveScroll );
+ this._trigger( "focus", event );
+
+ return this;
+ },
+
+ open: function() {
+ if ( this._isOpen ) {
+ return;
+ }
+
+ var hasFocus,
+ options = this.options,
+ uiDialog = this.uiDialog;
+
+ this._size();
+ this._position( options.position );
+ uiDialog.show( options.show );
+ this.overlay = options.modal ? new $.ui.dialog.overlay( this ) : null;
+ this.moveToTop( true );
+
+ // set focus to the first tabbable element in the content area or the first button
+ // if there are no tabbable elements, set focus on the dialog itself
+ hasFocus = this.element.find( ":tabbable" );
+ if ( !hasFocus.length ) {
+ hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
+ if ( !hasFocus.length ) {
+ hasFocus = uiDialog;
+ }
+ }
+ hasFocus.eq( 0 ).focus();
+
+ this._isOpen = true;
+ this._trigger( "open" );
+
+ return this;
+ },
+
+ _createButtons: function( buttons ) {
+ var that = this,
+ hasButtons = false;
+
+ // if we already have a button pane, remove it
+ this.uiDialogButtonPane.remove();
+ this.uiButtonSet.empty();
+
+ if ( typeof buttons === "object" && buttons !== null ) {
+ $.each( buttons, function() {
+ return !(hasButtons = true);
+ });
+ }
+ if ( hasButtons ) {
+ $.each( buttons, function( name, props ) {
+ var button, click;
+ props = $.isFunction( props ) ?
+ { click: props, text: name } :
+ props;
+ // Default to a non-submitting button
+ props = $.extend( { type: "button" }, props );
+ // Change the context for the click callback to be the main element
+ click = props.click;
+ props.click = function() {
+ click.apply( that.element[0], arguments );
+ };
+ button = $( "<button></button>", props )
+ .appendTo( that.uiButtonSet );
+ if ( $.fn.button ) {
+ button.button();
+ }
+ });
+ this.uiDialog.addClass( "ui-dialog-buttons" );
+ this.uiDialogButtonPane.appendTo( this.uiDialog );
+ } else {
+ this.uiDialog.removeClass( "ui-dialog-buttons" );
+ }
+ },
+
+ _makeDraggable: function() {
+ var that = this,
+ options = this.options;
+
+ function filteredUi( ui ) {
+ return {
+ position: ui.position,
+ offset: ui.offset
+ };
+ }
+
+ this.uiDialog.draggable({
+ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
+ handle: ".ui-dialog-titlebar",
+ containment: "document",
+ start: function( event, ui ) {
+ $( this )
+ .addClass( "ui-dialog-dragging" );
+ that._trigger( "dragStart", event, filteredUi( ui ) );
+ },
+ drag: function( event, ui ) {
+ that._trigger( "drag", event, filteredUi( ui ) );
+ },
+ stop: function( event, ui ) {
+ options.position = [
+ ui.position.left - that.document.scrollLeft(),
+ ui.position.top - that.document.scrollTop()
+ ];
+ $( this )
+ .removeClass( "ui-dialog-dragging" );
+ that._trigger( "dragStop", event, filteredUi( ui ) );
+ $.ui.dialog.overlay.resize();
+ }
+ });
+ },
+
+ _makeResizable: function( handles ) {
+ handles = (handles === undefined ? this.options.resizable : handles);
+ var that = this,
+ options = this.options,
+ // .ui-resizable has position: relative defined in the stylesheet
+ // but dialogs have to use absolute or fixed positioning
+ position = this.uiDialog.css( "position" ),
+ resizeHandles = typeof handles === 'string' ?
+ handles :
+ "n,e,s,w,se,sw,ne,nw";
+
+ function filteredUi( ui ) {
+ return {
+ originalPosition: ui.originalPosition,
+ originalSize: ui.originalSize,
+ position: ui.position,
+ size: ui.size
+ };
+ }
+
+ this.uiDialog.resizable({
+ cancel: ".ui-dialog-content",
+ containment: "document",
+ alsoResize: this.element,
+ maxWidth: options.maxWidth,
+ maxHeight: options.maxHeight,
+ minWidth: options.minWidth,
+ minHeight: this._minHeight(),
+ handles: resizeHandles,
+ start: function( event, ui ) {
+ $( this ).addClass( "ui-dialog-resizing" );
+ that._trigger( "resizeStart", event, filteredUi( ui ) );
+ },
+ resize: function( event, ui ) {
+ that._trigger( "resize", event, filteredUi( ui ) );
+ },
+ stop: function( event, ui ) {
+ $( this ).removeClass( "ui-dialog-resizing" );
+ options.height = $( this ).height();
+ options.width = $( this ).width();
+ that._trigger( "resizeStop", event, filteredUi( ui ) );
+ $.ui.dialog.overlay.resize();
+ }
+ })
+ .css( "position", position )
+ .find( ".ui-resizable-se" )
+ .addClass( "ui-icon ui-icon-grip-diagonal-se" );
+ },
+
+ _minHeight: function() {
+ var options = this.options;
+
+ if ( options.height === "auto" ) {
+ return options.minHeight;
+ } else {
+ return Math.min( options.minHeight, options.height );
+ }
+ },
+
+ _position: function( position ) {
+ var myAt = [],
+ offset = [ 0, 0 ],
+ isVisible;
+
+ if ( position ) {
+ // deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
+ // if (typeof position == 'string' || $.isArray(position)) {
+ // myAt = $.isArray(position) ? position : position.split(' ');
+
+ if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
+ myAt = position.split ? position.split( " " ) : [ position[ 0 ], position[ 1 ] ];
+ if ( myAt.length === 1 ) {
+ myAt[ 1 ] = myAt[ 0 ];
+ }
+
+ $.each( [ "left", "top" ], function( i, offsetPosition ) {
+ if ( +myAt[ i ] === myAt[ i ] ) {
+ offset[ i ] = myAt[ i ];
+ myAt[ i ] = offsetPosition;
+ }
+ });
+
+ position = {
+ my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +
+ myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),
+ at: myAt.join( " " )
+ };
+ }
+
+ position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
+ } else {
+ position = $.ui.dialog.prototype.options.position;
+ }
+
+ // need to show the dialog to get the actual offset in the position plugin
+ isVisible = this.uiDialog.is( ":visible" );
+ if ( !isVisible ) {
+ this.uiDialog.show();
+ }
+ this.uiDialog.position( position );
+ if ( !isVisible ) {
+ this.uiDialog.hide();
+ }
+ },
+
+ _setOptions: function( options ) {
+ var that = this,
+ resizableOptions = {},
+ resize = false;
+
+ $.each( options, function( key, value ) {
+ that._setOption( key, value );
+
+ if ( key in sizeRelatedOptions ) {
+ resize = true;
+ }
+ if ( key in resizableRelatedOptions ) {
+ resizableOptions[ key ] = value;
+ }
+ });
+
+ if ( resize ) {
+ this._size();
+ }
+ if ( this.uiDialog.is( ":data(resizable)" ) ) {
+ this.uiDialog.resizable( "option", resizableOptions );
+ }
+ },
+
+ _setOption: function( key, value ) {
+ var isDraggable, isResizable,
+ uiDialog = this.uiDialog;
+
+ switch ( key ) {
+ case "buttons":
+ this._createButtons( value );
+ break;
+ case "closeText":
+ // ensure that we always pass a string
+ this.uiDialogTitlebarCloseText.text( "" + value );
+ break;
+ case "dialogClass":
+ uiDialog
+ .removeClass( this.options.dialogClass )
+ .addClass( uiDialogClasses + value );
+ break;
+ case "disabled":
+ if ( value ) {
+ uiDialog.addClass( "ui-dialog-disabled" );
+ } else {
+ uiDialog.removeClass( "ui-dialog-disabled" );
+ }
+ break;
+ case "draggable":
+ isDraggable = uiDialog.is( ":data(draggable)" );
+ if ( isDraggable && !value ) {
+ uiDialog.draggable( "destroy" );
+ }
+
+ if ( !isDraggable && value ) {
+ this._makeDraggable();
+ }
+ break;
+ case "position":
+ this._position( value );
+ break;
+ case "resizable":
+ // currently resizable, becoming non-resizable
+ isResizable = uiDialog.is( ":data(resizable)" );
+ if ( isResizable && !value ) {
+ uiDialog.resizable( "destroy" );
+ }
+
+ // currently resizable, changing handles
+ if ( isResizable && typeof value === "string" ) {
+ uiDialog.resizable( "option", "handles", value );
+ }
+
+ // currently non-resizable, becoming resizable
+ if ( !isResizable && value !== false ) {
+ this._makeResizable( value );
+ }
+ break;
+ case "title":
+ // convert whatever was passed in o a string, for html() to not throw up
+ $( ".ui-dialog-title", this.uiDialogTitlebar )
+ .html( "" + ( value || "&#160;" ) );
+ break;
+ }
+
+ this._super( key, value );
+ },
+
+ _size: function() {
+ /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
+ * divs will both have width and height set, so we need to reset them
+ */
+ var nonContentHeight, minContentHeight, autoHeight,
+ options = this.options,
+ isVisible = this.uiDialog.is( ":visible" );
+
+ // reset content sizing
+ this.element.show().css({
+ width: "auto",
+ minHeight: 0,
+ height: 0
+ });
+
+ if ( options.minWidth > options.width ) {
+ options.width = options.minWidth;
+ }
+
+ // reset wrapper sizing
+ // determine the height of all the non-content elements
+ nonContentHeight = this.uiDialog.css({
+ height: "auto",
+ width: options.width
+ })
+ .outerHeight();
+ minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
+
+ if ( options.height === "auto" ) {
+ // only needed for IE6 support
+ if ( $.support.minHeight ) {
+ this.element.css({
+ minHeight: minContentHeight,
+ height: "auto"
+ });
+ } else {
+ this.uiDialog.show();
+ autoHeight = this.element.css( "height", "auto" ).height();
+ if ( !isVisible ) {
+ this.uiDialog.hide();
+ }
+ this.element.height( Math.max( autoHeight, minContentHeight ) );
+ }
+ } else {
+ this.element.height( Math.max( options.height - nonContentHeight, 0 ) );
+ }
+
+ if (this.uiDialog.is( ":data(resizable)" ) ) {
+ this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
+ }
+ }
+});
+
+$.extend($.ui.dialog, {
+ uuid: 0,
+ maxZ: 0,
+
+ getTitleId: function($el) {
+ var id = $el.attr( "id" );
+ if ( !id ) {
+ this.uuid += 1;
+ id = this.uuid;
+ }
+ return "ui-dialog-title-" + id;
+ },
+
+ overlay: function( dialog ) {
+ this.$el = $.ui.dialog.overlay.create( dialog );
+ }
+});
+
+$.extend( $.ui.dialog.overlay, {
+ instances: [],
+ // reuse old instances due to IE memory leak with alpha transparency (see #5185)
+ oldInstances: [],
+ maxZ: 0,
+ events: $.map(
+ "focus,mousedown,mouseup,keydown,keypress,click".split( "," ),
+ function( event ) {
+ return event + ".dialog-overlay";
+ }
+ ).join( " " ),
+ create: function( dialog ) {
+ if ( this.instances.length === 0 ) {
+ // prevent use of anchors and inputs
+ // we use a setTimeout in case the overlay is created from an
+ // event that we're going to be cancelling (see #2804)
+ setTimeout(function() {
+ // handle $(el).dialog().dialog('close') (see #4065)
+ if ( $.ui.dialog.overlay.instances.length ) {
+ $( document ).bind( $.ui.dialog.overlay.events, function( event ) {
+ // stop events if the z-index of the target is < the z-index of the overlay
+ // we cannot return true when we don't want to cancel the event (#3523)
+ if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) {
+ return false;
+ }
+ });
+ }
+ }, 1 );
+
+ // handle window resize
+ $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize );
+ }
+
+ var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) );
+
+ // allow closing by pressing the escape key
+ $( document ).bind( "keydown.dialog-overlay", function( event ) {
+ var instances = $.ui.dialog.overlay.instances;
+ // only react to the event if we're the top overlay
+ if ( instances.length !== 0 && instances[ instances.length - 1 ] === $el &&
+ dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
+ event.keyCode === $.ui.keyCode.ESCAPE ) {
+
+ dialog.close( event );
+ event.preventDefault();
+ }
+ });
+
+ $el.appendTo( document.body ).css({
+ width: this.width(),
+ height: this.height()
+ });
+
+ if ( $.fn.bgiframe ) {
+ $el.bgiframe();
+ }
+
+ this.instances.push( $el );
+ return $el;
+ },
+
+ destroy: function( $el ) {
+ var indexOf = $.inArray( $el, this.instances ),
+ maxZ = 0;
+
+ if ( indexOf !== -1 ) {
+ this.oldInstances.push( this.instances.splice( indexOf, 1 )[ 0 ] );
+ }
+
+ if ( this.instances.length === 0 ) {
+ $( [ document, window ] ).unbind( ".dialog-overlay" );
+ }
+
+ $el.height( 0 ).width( 0 ).remove();
+
+ // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
+ $.each( this.instances, function() {
+ maxZ = Math.max( maxZ, this.css( "z-index" ) );
+ });
+ this.maxZ = maxZ;
+ },
+
+ height: function() {
+ var scrollHeight,
+ offsetHeight;
+ // handle IE
+ if ( $.ui.ie ) {
+ scrollHeight = Math.max(
+ document.documentElement.scrollHeight,
+ document.body.scrollHeight
+ );
+ offsetHeight = Math.max(
+ document.documentElement.offsetHeight,
+ document.body.offsetHeight
+ );
+
+ if ( scrollHeight < offsetHeight ) {
+ return $( window ).height() + "px";
+ } else {
+ return scrollHeight + "px";
+ }
+ // handle "good" browsers
+ } else {
+ return $( document ).height() + "px";
+ }
+ },
+
+ width: function() {
+ var scrollWidth,
+ offsetWidth;
+ // handle IE
+ if ( $.ui.ie ) {
+ scrollWidth = Math.max(
+ document.documentElement.scrollWidth,
+ document.body.scrollWidth
+ );
+ offsetWidth = Math.max(
+ document.documentElement.offsetWidth,
+ document.body.offsetWidth
+ );
+
+ if ( scrollWidth < offsetWidth ) {
+ return $( window ).width() + "px";
+ } else {
+ return scrollWidth + "px";
+ }
+ // handle "good" browsers
+ } else {
+ return $( document ).width() + "px";
+ }
+ },
+
+ resize: function() {
+ /* If the dialog is draggable and the user drags it past the
+ * right edge of the window, the document becomes wider so we
+ * need to stretch the overlay. If the user then drags the
+ * dialog back to the left, the document will become narrower,
+ * so we need to shrink the overlay to the appropriate size.
+ * This is handled by shrinking the overlay before setting it
+ * to the full document size.
+ */
+ var $overlays = $( [] );
+ $.each( $.ui.dialog.overlay.instances, function() {
+ $overlays = $overlays.add( this );
+ });
+
+ $overlays.css({
+ width: 0,
+ height: 0
+ }).css({
+ width: $.ui.dialog.overlay.width(),
+ height: $.ui.dialog.overlay.height()
+ });
+ }
+});
+
+$.extend( $.ui.dialog.overlay.prototype, {
+ destroy: function() {
+ $.ui.dialog.overlay.destroy( this.$el );
+ }
+});
+
+}( jQuery ) );
+(function( $, undefined ) {
+
+$.widget("ui.draggable", $.ui.mouse, {
+ version: "1.9.2",
+ widgetEventPrefix: "drag",
+ options: {
+ addClasses: true,
+ appendTo: "parent",
+ axis: false,
+ connectToSortable: false,
+ containment: false,
+ cursor: "auto",
+ cursorAt: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ iframeFix: false,
+ opacity: false,
+ refreshPositions: false,
+ revert: false,
+ revertDuration: 500,
+ scope: "default",
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ snap: false,
+ snapMode: "both",
+ snapTolerance: 20,
+ stack: false,
+ zIndex: false
+ },
+ _create: function() {
+
+ if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
+ this.element[0].style.position = 'relative';
+
+ (this.options.addClasses && this.element.addClass("ui-draggable"));
+ (this.options.disabled && this.element.addClass("ui-draggable-disabled"));
+
+ this._mouseInit();
+
+ },
+
+ _destroy: function() {
+ this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
+ this._mouseDestroy();
+ },
+
+ _mouseCapture: function(event) {
+
+ var o = this.options;
+
+ // among others, prevent a drag on a resizable-handle
+ if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
+ return false;
+
+ //Quit if we're not on a valid handle
+ this.handle = this._getHandle(event);
+ if (!this.handle)
+ return false;
+
+ $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+ $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
+ .css({
+ width: this.offsetWidth+"px", height: this.offsetHeight+"px",
+ position: "absolute", opacity: "0.001", zIndex: 1000
+ })
+ .css($(this).offset())
+ .appendTo("body");
+ });
+
+ return true;
+
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options;
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ this.helper.addClass("ui-draggable-dragging");
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ //If ddmanager is used for droppables, set the global draggable
+ if($.ui.ddmanager)
+ $.ui.ddmanager.current = this;
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Store the helper's css position
+ this.cssPosition = this.helper.css("position");
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.positionAbs = this.element.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ //Generate the original position
+ this.originalPosition = this.position = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+ //Set a containment if given in the options
+ if(o.containment)
+ this._setContainment();
+
+ //Trigger event + callbacks
+ if(this._trigger("start", event) === false) {
+ this._clear();
+ return false;
+ }
+
+ //Recache the helper size
+ this._cacheHelperProportions();
+
+ //Prepare the droppable offsets
+ if ($.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+
+
+ this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+
+ //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
+ if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event);
+
+ return true;
+ },
+
+ _mouseDrag: function(event, noPropagation) {
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Call plugins and callbacks and use the resulting position if something is returned
+ if (!noPropagation) {
+ var ui = this._uiHash();
+ if(this._trigger('drag', event, ui) === false) {
+ this._mouseUp({});
+ return false;
+ }
+ this.position = ui.position;
+ }
+
+ if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+ if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+ if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ //If we are using droppables, inform the manager about the drop
+ var dropped = false;
+ if ($.ui.ddmanager && !this.options.dropBehaviour)
+ dropped = $.ui.ddmanager.drop(this, event);
+
+ //if a drop comes from outside (a sortable)
+ if(this.dropped) {
+ dropped = this.dropped;
+ this.dropped = false;
+ }
+
+ //if the original element is no longer in the DOM don't bother to continue (see #8269)
+ var element = this.element[0], elementInDom = false;
+ while ( element && (element = element.parentNode) ) {
+ if (element == document ) {
+ elementInDom = true;
+ }
+ }
+ if ( !elementInDom && this.options.helper === "original" )
+ return false;
+
+ if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
+ var that = this;
+ $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+ if(that._trigger("stop", event) !== false) {
+ that._clear();
+ }
+ });
+ } else {
+ if(this._trigger("stop", event) !== false) {
+ this._clear();
+ }
+ }
+
+ return false;
+ },
+
+ _mouseUp: function(event) {
+ //Remove frame helpers
+ $("div.ui-draggable-iframeFix").each(function() {
+ this.parentNode.removeChild(this);
+ });
+
+ //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
+ if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event);
+
+ return $.ui.mouse.prototype._mouseUp.call(this, event);
+ },
+
+ cancel: function() {
+
+ if(this.helper.is(".ui-draggable-dragging")) {
+ this._mouseUp({});
+ } else {
+ this._clear();
+ }
+
+ return this;
+
+ },
+
+ _getHandle: function(event) {
+
+ var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
+ $(this.options.handle, this.element)
+ .find("*")
+ .andSelf()
+ .each(function() {
+ if(this == event.target) handle = true;
+ });
+
+ return handle;
+
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options;
+ var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element);
+
+ if(!helper.parents('body').length)
+ helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
+
+ if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
+ helper.css("position", "absolute");
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if (typeof obj == 'string') {
+ obj = obj.split(' ');
+ }
+ if ($.isArray(obj)) {
+ obj = {left: +obj[0], top: +obj[1] || 0};
+ }
+ if ('left' in obj) {
+ this.offset.click.left = obj.left + this.margins.left;
+ }
+ if ('right' in obj) {
+ this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ }
+ if ('top' in obj) {
+ this.offset.click.top = obj.top + this.margins.top;
+ }
+ if ('bottom' in obj) {
+ this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ }
+ },
+
+ _getParentOffset: function() {
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+ || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
+ po = { top: 0, left: 0 };
+
+ return {
+ top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+ left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+ };
+
+ },
+
+ _getRelativeOffset: function() {
+
+ if(this.cssPosition == "relative") {
+ var p = this.element.position();
+ return {
+ top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+ left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
+ }
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: (parseInt(this.element.css("marginLeft"),10) || 0),
+ top: (parseInt(this.element.css("marginTop"),10) || 0),
+ right: (parseInt(this.element.css("marginRight"),10) || 0),
+ bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var o = this.options;
+ if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+ if(o.containment == 'document' || o.containment == 'window') this.containment = [
+ o.containment == 'document' ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
+ o.containment == 'document' ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
+ (o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ (o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+
+ if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
+ var c = $(o.containment);
+ var ce = c[0]; if(!ce) return;
+ var co = c.offset();
+ var over = ($(ce).css("overflow") != 'hidden');
+
+ this.containment = [
+ (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
+ (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
+ (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
+ (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom
+ ];
+ this.relative_container = c;
+
+ } else if(o.containment.constructor == Array) {
+ this.containment = o.containment;
+ }
+
+ },
+
+ _convertPositionTo: function(d, pos) {
+
+ if(!pos) pos = this.position;
+ var mod = d == "absolute" ? 1 : -1;
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ return {
+ top: (
+ pos.top // The absolute mouse position
+ + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
+ - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+ ),
+ left: (
+ pos.left // The absolute mouse position
+ + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
+ - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+ )
+ };
+
+ },
+
+ _generatePosition: function(event) {
+
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+ var pageX = event.pageX;
+ var pageY = event.pageY;
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+ var containment;
+ if(this.containment) {
+ if (this.relative_container){
+ var co = this.relative_container.offset();
+ containment = [ this.containment[0] + co.left,
+ this.containment[1] + co.top,
+ this.containment[2] + co.left,
+ this.containment[3] + co.top ];
+ }
+ else {
+ containment = this.containment;
+ }
+
+ if(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top;
+ if(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top;
+ }
+
+ if(o.grid) {
+ //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
+ var top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
+ pageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ var left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
+ pageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
+ top: (
+ pageY // The absolute mouse position
+ - this.offset.click.top // Click offset (relative to the element)
+ - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
+ + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ),
+ left: (
+ pageX // The absolute mouse position
+ - this.offset.click.left // Click offset (relative to the element)
+ - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
+ + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ )
+ };
+
+ },
+
+ _clear: function() {
+ this.helper.removeClass("ui-draggable-dragging");
+ if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
+ //if($.ui.ddmanager) $.ui.ddmanager.current = null;
+ this.helper = null;
+ this.cancelHelperRemoval = false;
+ },
+
+ // From now on bulk stuff - mainly helpers
+
+ _trigger: function(type, event, ui) {
+ ui = ui || this._uiHash();
+ $.ui.plugin.call(this, type, [event, ui]);
+ if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
+ return $.Widget.prototype._trigger.call(this, type, event, ui);
+ },
+
+ plugins: {},
+
+ _uiHash: function(event) {
+ return {
+ helper: this.helper,
+ position: this.position,
+ originalPosition: this.originalPosition,
+ offset: this.positionAbs
+ };
+ }
+
+});
+
+$.ui.plugin.add("draggable", "connectToSortable", {
+ start: function(event, ui) {
+
+ var inst = $(this).data("draggable"), o = inst.options,
+ uiSortable = $.extend({}, ui, { item: inst.element });
+ inst.sortables = [];
+ $(o.connectToSortable).each(function() {
+ var sortable = $.data(this, 'sortable');
+ if (sortable && !sortable.options.disabled) {
+ inst.sortables.push({
+ instance: sortable,
+ shouldRevert: sortable.options.revert
+ });
+ sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
+ sortable._trigger("activate", event, uiSortable);
+ }
+ });
+
+ },
+ stop: function(event, ui) {
+
+ //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
+ var inst = $(this).data("draggable"),
+ uiSortable = $.extend({}, ui, { item: inst.element });
+
+ $.each(inst.sortables, function() {
+ if(this.instance.isOver) {
+
+ this.instance.isOver = 0;
+
+ inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
+ this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
+
+ //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
+ if(this.shouldRevert) this.instance.options.revert = true;
+
+ //Trigger the stop of the sortable
+ this.instance._mouseStop(event);
+
+ this.instance.options.helper = this.instance.options._helper;
+
+ //If the helper has been the original item, restore properties in the sortable
+ if(inst.options.helper == 'original')
+ this.instance.currentItem.css({ top: 'auto', left: 'auto' });
+
+ } else {
+ this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
+ this.instance._trigger("deactivate", event, uiSortable);
+ }
+
+ });
+
+ },
+ drag: function(event, ui) {
+
+ var inst = $(this).data("draggable"), that = this;
+
+ var checkPos = function(o) {
+ var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
+ var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
+ var itemHeight = o.height, itemWidth = o.width;
+ var itemTop = o.top, itemLeft = o.left;
+
+ return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
+ };
+
+ $.each(inst.sortables, function(i) {
+
+ var innermostIntersecting = false;
+ var thisSortable = this;
+ //Copy over some variables to allow calling the sortable's native _intersectsWith
+ this.instance.positionAbs = inst.positionAbs;
+ this.instance.helperProportions = inst.helperProportions;
+ this.instance.offset.click = inst.offset.click;
+
+ if(this.instance._intersectsWith(this.instance.containerCache)) {
+ innermostIntersecting = true;
+ $.each(inst.sortables, function () {
+ this.instance.positionAbs = inst.positionAbs;
+ this.instance.helperProportions = inst.helperProportions;
+ this.instance.offset.click = inst.offset.click;
+ if (this != thisSortable
+ && this.instance._intersectsWith(this.instance.containerCache)
+ && $.ui.contains(thisSortable.instance.element[0], this.instance.element[0]))
+ innermostIntersecting = false;
+ return innermostIntersecting;
+ });
+ }
+
+
+ if(innermostIntersecting) {
+ //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
+ if(!this.instance.isOver) {
+
+ this.instance.isOver = 1;
+ //Now we fake the start of dragging for the sortable instance,
+ //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
+ //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
+ this.instance.currentItem = $(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true);
+ this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
+ this.instance.options.helper = function() { return ui.helper[0]; };
+
+ event.target = this.instance.currentItem[0];
+ this.instance._mouseCapture(event, true);
+ this.instance._mouseStart(event, true, true);
+
+ //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
+ this.instance.offset.click.top = inst.offset.click.top;
+ this.instance.offset.click.left = inst.offset.click.left;
+ this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
+ this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
+
+ inst._trigger("toSortable", event);
+ inst.dropped = this.instance.element; //draggable revert needs that
+ //hack so receive/update callbacks work (mostly)
+ inst.currentItem = inst.element;
+ this.instance.fromOutside = inst;
+
+ }
+
+ //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
+ if(this.instance.currentItem) this.instance._mouseDrag(event);
+
+ } else {
+
+ //If it doesn't intersect with the sortable, and it intersected before,
+ //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
+ if(this.instance.isOver) {
+
+ this.instance.isOver = 0;
+ this.instance.cancelHelperRemoval = true;
+
+ //Prevent reverting on this forced stop
+ this.instance.options.revert = false;
+
+ // The out event needs to be triggered independently
+ this.instance._trigger('out', event, this.instance._uiHash(this.instance));
+
+ this.instance._mouseStop(event, true);
+ this.instance.options.helper = this.instance.options._helper;
+
+ //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
+ this.instance.currentItem.remove();
+ if(this.instance.placeholder) this.instance.placeholder.remove();
+
+ inst._trigger("fromSortable", event);
+ inst.dropped = false; //draggable revert needs that
+ }
+
+ };
+
+ });
+
+ }
+});
+
+$.ui.plugin.add("draggable", "cursor", {
+ start: function(event, ui) {
+ var t = $('body'), o = $(this).data('draggable').options;
+ if (t.css("cursor")) o._cursor = t.css("cursor");
+ t.css("cursor", o.cursor);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ if (o._cursor) $('body').css("cursor", o._cursor);
+ }
+});
+
+$.ui.plugin.add("draggable", "opacity", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data('draggable').options;
+ if(t.css("opacity")) o._opacity = t.css("opacity");
+ t.css('opacity', o.opacity);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ if(o._opacity) $(ui.helper).css('opacity', o._opacity);
+ }
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+ start: function(event, ui) {
+ var i = $(this).data("draggable");
+ if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
+ },
+ drag: function(event, ui) {
+
+ var i = $(this).data("draggable"), o = i.options, scrolled = false;
+
+ if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
+
+ if(!o.axis || o.axis != 'x') {
+ if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+ i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
+ else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
+ i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
+ }
+
+ if(!o.axis || o.axis != 'y') {
+ if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+ i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
+ else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
+ i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
+ }
+
+ } else {
+
+ if(!o.axis || o.axis != 'x') {
+ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+ else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+ }
+
+ if(!o.axis || o.axis != 'y') {
+ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+ else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+ }
+
+ }
+
+ if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(i, event);
+
+ }
+});
+
+$.ui.plugin.add("draggable", "snap", {
+ start: function(event, ui) {
+
+ var i = $(this).data("draggable"), o = i.options;
+ i.snapElements = [];
+
+ $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
+ var $t = $(this); var $o = $t.offset();
+ if(this != i.element[0]) i.snapElements.push({
+ item: this,
+ width: $t.outerWidth(), height: $t.outerHeight(),
+ top: $o.top, left: $o.left
+ });
+ });
+
+ },
+ drag: function(event, ui) {
+
+ var inst = $(this).data("draggable"), o = inst.options;
+ var d = o.snapTolerance;
+
+ var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+ y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+
+ for (var i = inst.snapElements.length - 1; i >= 0; i--){
+
+ var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
+ t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
+
+ //Yes, I know, this is insane ;)
+ if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
+ if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+ inst.snapElements[i].snapping = false;
+ continue;
+ }
+
+ if(o.snapMode != 'inner') {
+ var ts = Math.abs(t - y2) <= d;
+ var bs = Math.abs(b - y1) <= d;
+ var ls = Math.abs(l - x2) <= d;
+ var rs = Math.abs(r - x1) <= d;
+ if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+ if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
+ if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
+ if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
+ }
+
+ var first = (ts || bs || ls || rs);
+
+ if(o.snapMode != 'outer') {
+ var ts = Math.abs(t - y1) <= d;
+ var bs = Math.abs(b - y2) <= d;
+ var ls = Math.abs(l - x1) <= d;
+ var rs = Math.abs(r - x2) <= d;
+ if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
+ if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+ if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
+ if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
+ }
+
+ if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
+ (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+ inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
+
+ };
+
+ }
+});
+
+$.ui.plugin.add("draggable", "stack", {
+ start: function(event, ui) {
+
+ var o = $(this).data("draggable").options;
+
+ var group = $.makeArray($(o.stack)).sort(function(a,b) {
+ return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
+ });
+ if (!group.length) { return; }
+
+ var min = parseInt(group[0].style.zIndex) || 0;
+ $(group).each(function(i) {
+ this.style.zIndex = min + i;
+ });
+
+ this[0].style.zIndex = min + group.length;
+
+ }
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+ start: function(event, ui) {
+ var t = $(ui.helper), o = $(this).data("draggable").options;
+ if(t.css("zIndex")) o._zIndex = t.css("zIndex");
+ t.css('zIndex', o.zIndex);
+ },
+ stop: function(event, ui) {
+ var o = $(this).data("draggable").options;
+ if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
+ }
+});
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.widget("ui.droppable", {
+ version: "1.9.2",
+ widgetEventPrefix: "drop",
+ options: {
+ accept: '*',
+ activeClass: false,
+ addClasses: true,
+ greedy: false,
+ hoverClass: false,
+ scope: 'default',
+ tolerance: 'intersect'
+ },
+ _create: function() {
+
+ var o = this.options, accept = o.accept;
+ this.isover = 0; this.isout = 1;
+
+ this.accept = $.isFunction(accept) ? accept : function(d) {
+ return d.is(accept);
+ };
+
+ //Store the droppable's proportions
+ this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
+
+ // Add the reference and positions to the manager
+ $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
+ $.ui.ddmanager.droppables[o.scope].push(this);
+
+ (o.addClasses && this.element.addClass("ui-droppable"));
+
+ },
+
+ _destroy: function() {
+ var drop = $.ui.ddmanager.droppables[this.options.scope];
+ for ( var i = 0; i < drop.length; i++ )
+ if ( drop[i] == this )
+ drop.splice(i, 1);
+
+ this.element.removeClass("ui-droppable ui-droppable-disabled");
+ },
+
+ _setOption: function(key, value) {
+
+ if(key == 'accept') {
+ this.accept = $.isFunction(value) ? value : function(d) {
+ return d.is(value);
+ };
+ }
+ $.Widget.prototype._setOption.apply(this, arguments);
+ },
+
+ _activate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) this.element.addClass(this.options.activeClass);
+ (draggable && this._trigger('activate', event, this.ui(draggable)));
+ },
+
+ _deactivate: function(event) {
+ var draggable = $.ui.ddmanager.current;
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
+ (draggable && this._trigger('deactivate', event, this.ui(draggable)));
+ },
+
+ _over: function(event) {
+
+ var draggable = $.ui.ddmanager.current;
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
+
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
+ this._trigger('over', event, this.ui(draggable));
+ }
+
+ },
+
+ _out: function(event) {
+
+ var draggable = $.ui.ddmanager.current;
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
+
+ if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
+ this._trigger('out', event, this.ui(draggable));
+ }
+
+ },
+
+ _drop: function(event,custom) {
+
+ var draggable = custom || $.ui.ddmanager.current;
+ if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
+
+ var childrenIntersection = false;
+ this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
+ var inst = $.data(this, 'droppable');
+ if(
+ inst.options.greedy
+ && !inst.options.disabled
+ && inst.options.scope == draggable.options.scope
+ && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element))
+ && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
+ ) { childrenIntersection = true; return false; }
+ });
+ if(childrenIntersection) return false;
+
+ if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
+ if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
+ this._trigger('drop', event, this.ui(draggable));
+ return this.element;
+ }
+
+ return false;
+
+ },
+
+ ui: function(c) {
+ return {
+ draggable: (c.currentItem || c.element),
+ helper: c.helper,
+ position: c.position,
+ offset: c.positionAbs
+ };
+ }
+
+});
+
+$.ui.intersect = function(draggable, droppable, toleranceMode) {
+
+ if (!droppable.offset) return false;
+
+ var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
+ y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
+ var l = droppable.offset.left, r = l + droppable.proportions.width,
+ t = droppable.offset.top, b = t + droppable.proportions.height;
+
+ switch (toleranceMode) {
+ case 'fit':
+ return (l <= x1 && x2 <= r
+ && t <= y1 && y2 <= b);
+ break;
+ case 'intersect':
+ return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
+ && x2 - (draggable.helperProportions.width / 2) < r // Left Half
+ && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
+ && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
+ break;
+ case 'pointer':
+ var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
+ draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
+ isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
+ return isOver;
+ break;
+ case 'touch':
+ return (
+ (y1 >= t && y1 <= b) || // Top edge touching
+ (y2 >= t && y2 <= b) || // Bottom edge touching
+ (y1 < t && y2 > b) // Surrounded vertically
+ ) && (
+ (x1 >= l && x1 <= r) || // Left edge touching
+ (x2 >= l && x2 <= r) || // Right edge touching
+ (x1 < l && x2 > r) // Surrounded horizontally
+ );
+ break;
+ default:
+ return false;
+ break;
+ }
+
+};
+
+/*
+ This manager tracks offsets of draggables and droppables
+*/
+$.ui.ddmanager = {
+ current: null,
+ droppables: { 'default': [] },
+ prepareOffsets: function(t, event) {
+
+ var m = $.ui.ddmanager.droppables[t.options.scope] || [];
+ var type = event ? event.type : null; // workaround for #2317
+ var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
+
+ droppablesLoop: for (var i = 0; i < m.length; i++) {
+
+ if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted
+ for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
+ m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
+
+ if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
+
+ m[i].offset = m[i].element.offset();
+ m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+
+ }
+
+ },
+ drop: function(draggable, event) {
+
+ var dropped = false;
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+
+ if(!this.options) return;
+ if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
+ dropped = this._drop.call(this, event) || dropped;
+
+ if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ this.isout = 1; this.isover = 0;
+ this._deactivate.call(this, event);
+ }
+
+ });
+ return dropped;
+
+ },
+ dragStart: function( draggable, event ) {
+ //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
+ draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
+ if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
+ });
+ },
+ drag: function(draggable, event) {
+
+ //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
+ if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
+
+ //Run through all droppables and check their positions based on specific tolerance options
+ $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+
+ if(this.options.disabled || this.greedyChild || !this.visible) return;
+ var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
+
+ var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
+ if(!c) return;
+
+ var parentInstance;
+ if (this.options.greedy) {
+ // find droppable parents with same scope
+ var scope = this.options.scope;
+ var parent = this.element.parents(':data(droppable)').filter(function () {
+ return $.data(this, 'droppable').options.scope === scope;
+ });
+
+ if (parent.length) {
+ parentInstance = $.data(parent[0], 'droppable');
+ parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
+ }
+ }
+
+ // we just moved into a greedy child
+ if (parentInstance && c == 'isover') {
+ parentInstance['isover'] = 0;
+ parentInstance['isout'] = 1;
+ parentInstance._out.call(parentInstance, event);
+ }
+
+ this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
+ this[c == "isover" ? "_over" : "_out"].call(this, event);
+
+ // we just moved out of a greedy child
+ if (parentInstance && c == 'isout') {
+ parentInstance['isout'] = 0;
+ parentInstance['isover'] = 1;
+ parentInstance._over.call(parentInstance, event);
+ }
+ });
+
+ },
+ dragStop: function( draggable, event ) {
+ draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
+ //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
+ if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
+ }
+};
+
+})(jQuery);
+;(jQuery.effects || (function($, undefined) {
+
+var backCompat = $.uiBackCompat !== false,
+ // prefix used for storing data on .data()
+ dataSpace = "ui-effects-";
+
+$.effects = {
+ effect: {}
+};
+
+/*!
+ * jQuery Color Animations v2.0.0
+ * http://jquery.com/
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * Date: Mon Aug 13 13:41:02 2012 -0500
+ */
+(function( jQuery, undefined ) {
+
+ var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),
+
+ // plusequals test for += 100 -= 100
+ rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
+ // a set of RE's that can match strings and generate color tuples.
+ stringParsers = [{
+ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ],
+ execResult[ 2 ],
+ execResult[ 3 ],
+ execResult[ 4 ]
+ ];
+ }
+ }, {
+ re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ] * 2.55,
+ execResult[ 2 ] * 2.55,
+ execResult[ 3 ] * 2.55,
+ execResult[ 4 ]
+ ];
+ }
+ }, {
+ // this regex ignores A-F because it's compared against an already lowercased string
+ re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
+ parse: function( execResult ) {
+ return [
+ parseInt( execResult[ 1 ], 16 ),
+ parseInt( execResult[ 2 ], 16 ),
+ parseInt( execResult[ 3 ], 16 )
+ ];
+ }
+ }, {
+ // this regex ignores A-F because it's compared against an already lowercased string
+ re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
+ parse: function( execResult ) {
+ return [
+ parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
+ parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
+ parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
+ ];
+ }
+ }, {
+ re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
+ space: "hsla",
+ parse: function( execResult ) {
+ return [
+ execResult[ 1 ],
+ execResult[ 2 ] / 100,
+ execResult[ 3 ] / 100,
+ execResult[ 4 ]
+ ];
+ }
+ }],
+
+ // jQuery.Color( )
+ color = jQuery.Color = function( color, green, blue, alpha ) {
+ return new jQuery.Color.fn.parse( color, green, blue, alpha );
+ },
+ spaces = {
+ rgba: {
+ props: {
+ red: {
+ idx: 0,
+ type: "byte"
+ },
+ green: {
+ idx: 1,
+ type: "byte"
+ },
+ blue: {
+ idx: 2,
+ type: "byte"
+ }
+ }
+ },
+
+ hsla: {
+ props: {
+ hue: {
+ idx: 0,
+ type: "degrees"
+ },
+ saturation: {
+ idx: 1,
+ type: "percent"
+ },
+ lightness: {
+ idx: 2,
+ type: "percent"
+ }
+ }
+ }
+ },
+ propTypes = {
+ "byte": {
+ floor: true,
+ max: 255
+ },
+ "percent": {
+ max: 1
+ },
+ "degrees": {
+ mod: 360,
+ floor: true
+ }
+ },
+ support = color.support = {},
+
+ // element for support tests
+ supportElem = jQuery( "<p>" )[ 0 ],
+
+ // colors = jQuery.Color.names
+ colors,
+
+ // local aliases of functions called often
+ each = jQuery.each;
+
+// determine rgba support immediately
+supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
+support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
+
+// define cache name and alpha properties
+// for rgba and hsla spaces
+each( spaces, function( spaceName, space ) {
+ space.cache = "_" + spaceName;
+ space.props.alpha = {
+ idx: 3,
+ type: "percent",
+ def: 1
+ };
+});
+
+function clamp( value, prop, allowEmpty ) {
+ var type = propTypes[ prop.type ] || {};
+
+ if ( value == null ) {
+ return (allowEmpty || !prop.def) ? null : prop.def;
+ }
+
+ // ~~ is an short way of doing floor for positive numbers
+ value = type.floor ? ~~value : parseFloat( value );
+
+ // IE will pass in empty strings as value for alpha,
+ // which will hit this case
+ if ( isNaN( value ) ) {
+ return prop.def;
+ }
+
+ if ( type.mod ) {
+ // we add mod before modding to make sure that negatives values
+ // get converted properly: -10 -> 350
+ return (value + type.mod) % type.mod;
+ }
+
+ // for now all property types without mod have min and max
+ return 0 > value ? 0 : type.max < value ? type.max : value;
+}
+
+function stringParse( string ) {
+ var inst = color(),
+ rgba = inst._rgba = [];
+
+ string = string.toLowerCase();
+
+ each( stringParsers, function( i, parser ) {
+ var parsed,
+ match = parser.re.exec( string ),
+ values = match && parser.parse( match ),
+ spaceName = parser.space || "rgba";
+
+ if ( values ) {
+ parsed = inst[ spaceName ]( values );
+
+ // if this was an rgba parse the assignment might happen twice
+ // oh well....
+ inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
+ rgba = inst._rgba = parsed._rgba;
+
+ // exit each( stringParsers ) here because we matched
+ return false;
+ }
+ });
+
+ // Found a stringParser that handled it
+ if ( rgba.length ) {
+
+ // if this came from a parsed string, force "transparent" when alpha is 0
+ // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
+ if ( rgba.join() === "0,0,0,0" ) {
+ jQuery.extend( rgba, colors.transparent );
+ }
+ return inst;
+ }
+
+ // named colors
+ return colors[ string ];
+}
+
+color.fn = jQuery.extend( color.prototype, {
+ parse: function( red, green, blue, alpha ) {
+ if ( red === undefined ) {
+ this._rgba = [ null, null, null, null ];
+ return this;
+ }
+ if ( red.jquery || red.nodeType ) {
+ red = jQuery( red ).css( green );
+ green = undefined;
+ }
+
+ var inst = this,
+ type = jQuery.type( red ),
+ rgba = this._rgba = [];
+
+ // more than 1 argument specified - assume ( red, green, blue, alpha )
+ if ( green !== undefined ) {
+ red = [ red, green, blue, alpha ];
+ type = "array";
+ }
+
+ if ( type === "string" ) {
+ return this.parse( stringParse( red ) || colors._default );
+ }
+
+ if ( type === "array" ) {
+ each( spaces.rgba.props, function( key, prop ) {
+ rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
+ });
+ return this;
+ }
+
+ if ( type === "object" ) {
+ if ( red instanceof color ) {
+ each( spaces, function( spaceName, space ) {
+ if ( red[ space.cache ] ) {
+ inst[ space.cache ] = red[ space.cache ].slice();
+ }
+ });
+ } else {
+ each( spaces, function( spaceName, space ) {
+ var cache = space.cache;
+ each( space.props, function( key, prop ) {
+
+ // if the cache doesn't exist, and we know how to convert
+ if ( !inst[ cache ] && space.to ) {
+
+ // if the value was null, we don't need to copy it
+ // if the key was alpha, we don't need to copy it either
+ if ( key === "alpha" || red[ key ] == null ) {
+ return;
+ }
+ inst[ cache ] = space.to( inst._rgba );
+ }
+
+ // this is the only case where we allow nulls for ALL properties.
+ // call clamp with alwaysAllowEmpty
+ inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
+ });
+
+ // everything defined but alpha?
+ if ( inst[ cache ] && $.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
+ // use the default of 1
+ inst[ cache ][ 3 ] = 1;
+ if ( space.from ) {
+ inst._rgba = space.from( inst[ cache ] );
+ }
+ }
+ });
+ }
+ return this;
+ }
+ },
+ is: function( compare ) {
+ var is = color( compare ),
+ same = true,
+ inst = this;
+
+ each( spaces, function( _, space ) {
+ var localCache,
+ isCache = is[ space.cache ];
+ if (isCache) {
+ localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
+ each( space.props, function( _, prop ) {
+ if ( isCache[ prop.idx ] != null ) {
+ same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
+ return same;
+ }
+ });
+ }
+ return same;
+ });
+ return same;
+ },
+ _space: function() {
+ var used = [],
+ inst = this;
+ each( spaces, function( spaceName, space ) {
+ if ( inst[ space.cache ] ) {
+ used.push( spaceName );
+ }
+ });
+ return used.pop();
+ },
+ transition: function( other, distance ) {
+ var end = color( other ),
+ spaceName = end._space(),
+ space = spaces[ spaceName ],
+ startColor = this.alpha() === 0 ? color( "transparent" ) : this,
+ start = startColor[ space.cache ] || space.to( startColor._rgba ),
+ result = start.slice();
+
+ end = end[ space.cache ];
+ each( space.props, function( key, prop ) {
+ var index = prop.idx,
+ startValue = start[ index ],
+ endValue = end[ index ],
+ type = propTypes[ prop.type ] || {};
+
+ // if null, don't override start value
+ if ( endValue === null ) {
+ return;
+ }
+ // if null - use end
+ if ( startValue === null ) {
+ result[ index ] = endValue;
+ } else {
+ if ( type.mod ) {
+ if ( endValue - startValue > type.mod / 2 ) {
+ startValue += type.mod;
+ } else if ( startValue - endValue > type.mod / 2 ) {
+ startValue -= type.mod;
+ }
+ }
+ result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
+ }
+ });
+ return this[ spaceName ]( result );
+ },
+ blend: function( opaque ) {
+ // if we are already opaque - return ourself
+ if ( this._rgba[ 3 ] === 1 ) {
+ return this;
+ }
+
+ var rgb = this._rgba.slice(),
+ a = rgb.pop(),
+ blend = color( opaque )._rgba;
+
+ return color( jQuery.map( rgb, function( v, i ) {
+ return ( 1 - a ) * blend[ i ] + a * v;
+ }));
+ },
+ toRgbaString: function() {
+ var prefix = "rgba(",
+ rgba = jQuery.map( this._rgba, function( v, i ) {
+ return v == null ? ( i > 2 ? 1 : 0 ) : v;
+ });
+
+ if ( rgba[ 3 ] === 1 ) {
+ rgba.pop();
+ prefix = "rgb(";
+ }
+
+ return prefix + rgba.join() + ")";
+ },
+ toHslaString: function() {
+ var prefix = "hsla(",
+ hsla = jQuery.map( this.hsla(), function( v, i ) {
+ if ( v == null ) {
+ v = i > 2 ? 1 : 0;
+ }
+
+ // catch 1 and 2
+ if ( i && i < 3 ) {
+ v = Math.round( v * 100 ) + "%";
+ }
+ return v;
+ });
+
+ if ( hsla[ 3 ] === 1 ) {
+ hsla.pop();
+ prefix = "hsl(";
+ }
+ return prefix + hsla.join() + ")";
+ },
+ toHexString: function( includeAlpha ) {
+ var rgba = this._rgba.slice(),
+ alpha = rgba.pop();
+
+ if ( includeAlpha ) {
+ rgba.push( ~~( alpha * 255 ) );
+ }
+
+ return "#" + jQuery.map( rgba, function( v ) {
+
+ // default to 0 when nulls exist
+ v = ( v || 0 ).toString( 16 );
+ return v.length === 1 ? "0" + v : v;
+ }).join("");
+ },
+ toString: function() {
+ return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
+ }
+});
+color.fn.parse.prototype = color.fn;
+
+// hsla conversions adapted from:
+// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
+
+function hue2rgb( p, q, h ) {
+ h = ( h + 1 ) % 1;
+ if ( h * 6 < 1 ) {
+ return p + (q - p) * h * 6;
+ }
+ if ( h * 2 < 1) {
+ return q;
+ }
+ if ( h * 3 < 2 ) {
+ return p + (q - p) * ((2/3) - h) * 6;
+ }
+ return p;
+}
+
+spaces.hsla.to = function ( rgba ) {
+ if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
+ return [ null, null, null, rgba[ 3 ] ];
+ }
+ var r = rgba[ 0 ] / 255,
+ g = rgba[ 1 ] / 255,
+ b = rgba[ 2 ] / 255,
+ a = rgba[ 3 ],
+ max = Math.max( r, g, b ),
+ min = Math.min( r, g, b ),
+ diff = max - min,
+ add = max + min,
+ l = add * 0.5,
+ h, s;
+
+ if ( min === max ) {
+ h = 0;
+ } else if ( r === max ) {
+ h = ( 60 * ( g - b ) / diff ) + 360;
+ } else if ( g === max ) {
+ h = ( 60 * ( b - r ) / diff ) + 120;
+ } else {
+ h = ( 60 * ( r - g ) / diff ) + 240;
+ }
+
+ if ( l === 0 || l === 1 ) {
+ s = l;
+ } else if ( l <= 0.5 ) {
+ s = diff / add;
+ } else {
+ s = diff / ( 2 - add );
+ }
+ return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
+};
+
+spaces.hsla.from = function ( hsla ) {
+ if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
+ return [ null, null, null, hsla[ 3 ] ];
+ }
+ var h = hsla[ 0 ] / 360,
+ s = hsla[ 1 ],
+ l = hsla[ 2 ],
+ a = hsla[ 3 ],
+ q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
+ p = 2 * l - q;
+
+ return [
+ Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
+ Math.round( hue2rgb( p, q, h ) * 255 ),
+ Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
+ a
+ ];
+};
+
+
+each( spaces, function( spaceName, space ) {
+ var props = space.props,
+ cache = space.cache,
+ to = space.to,
+ from = space.from;
+
+ // makes rgba() and hsla()
+ color.fn[ spaceName ] = function( value ) {
+
+ // generate a cache for this space if it doesn't exist
+ if ( to && !this[ cache ] ) {
+ this[ cache ] = to( this._rgba );
+ }
+ if ( value === undefined ) {
+ return this[ cache ].slice();
+ }
+
+ var ret,
+ type = jQuery.type( value ),
+ arr = ( type === "array" || type === "object" ) ? value : arguments,
+ local = this[ cache ].slice();
+
+ each( props, function( key, prop ) {
+ var val = arr[ type === "object" ? key : prop.idx ];
+ if ( val == null ) {
+ val = local[ prop.idx ];
+ }
+ local[ prop.idx ] = clamp( val, prop );
+ });
+
+ if ( from ) {
+ ret = color( from( local ) );
+ ret[ cache ] = local;
+ return ret;
+ } else {
+ return color( local );
+ }
+ };
+
+ // makes red() green() blue() alpha() hue() saturation() lightness()
+ each( props, function( key, prop ) {
+ // alpha is included in more than one space
+ if ( color.fn[ key ] ) {
+ return;
+ }
+ color.fn[ key ] = function( value ) {
+ var vtype = jQuery.type( value ),
+ fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
+ local = this[ fn ](),
+ cur = local[ prop.idx ],
+ match;
+
+ if ( vtype === "undefined" ) {
+ return cur;
+ }
+
+ if ( vtype === "function" ) {
+ value = value.call( this, cur );
+ vtype = jQuery.type( value );
+ }
+ if ( value == null && prop.empty ) {
+ return this;
+ }
+ if ( vtype === "string" ) {
+ match = rplusequals.exec( value );
+ if ( match ) {
+ value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
+ }
+ }
+ local[ prop.idx ] = value;
+ return this[ fn ]( local );
+ };
+ });
+});
+
+// add .fx.step functions
+each( stepHooks, function( i, hook ) {
+ jQuery.cssHooks[ hook ] = {
+ set: function( elem, value ) {
+ var parsed, curElem,
+ backgroundColor = "";
+
+ if ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) {
+ value = color( parsed || value );
+ if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
+ curElem = hook === "backgroundColor" ? elem.parentNode : elem;
+ while (
+ (backgroundColor === "" || backgroundColor === "transparent") &&
+ curElem && curElem.style
+ ) {
+ try {
+ backgroundColor = jQuery.css( curElem, "backgroundColor" );
+ curElem = curElem.parentNode;
+ } catch ( e ) {
+ }
+ }
+
+ value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
+ backgroundColor :
+ "_default" );
+ }
+
+ value = value.toRgbaString();
+ }
+ try {
+ elem.style[ hook ] = value;
+ } catch( error ) {
+ // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
+ }
+ }
+ };
+ jQuery.fx.step[ hook ] = function( fx ) {
+ if ( !fx.colorInit ) {
+ fx.start = color( fx.elem, hook );
+ fx.end = color( fx.end );
+ fx.colorInit = true;
+ }
+ jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
+ };
+});
+
+jQuery.cssHooks.borderColor = {
+ expand: function( value ) {
+ var expanded = {};
+
+ each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
+ expanded[ "border" + part + "Color" ] = value;
+ });
+ return expanded;
+ }
+};
+
+// Basic color names only.
+// Usage of any of the other color names requires adding yourself or including
+// jquery.color.svg-names.js.
+colors = jQuery.Color.names = {
+ // 4.1. Basic color keywords
+ aqua: "#00ffff",
+ black: "#000000",
+ blue: "#0000ff",
+ fuchsia: "#ff00ff",
+ gray: "#808080",
+ green: "#008000",
+ lime: "#00ff00",
+ maroon: "#800000",
+ navy: "#000080",
+ olive: "#808000",
+ purple: "#800080",
+ red: "#ff0000",
+ silver: "#c0c0c0",
+ teal: "#008080",
+ white: "#ffffff",
+ yellow: "#ffff00",
+
+ // 4.2.3. "transparent" color keyword
+ transparent: [ null, null, null, 0 ],
+
+ _default: "#ffffff"
+};
+
+})( jQuery );
+
+
+
+/******************************************************************************/
+/****************************** CLASS ANIMATIONS ******************************/
+/******************************************************************************/
+(function() {
+
+var classAnimationActions = [ "add", "remove", "toggle" ],
+ shorthandStyles = {
+ border: 1,
+ borderBottom: 1,
+ borderColor: 1,
+ borderLeft: 1,
+ borderRight: 1,
+ borderTop: 1,
+ borderWidth: 1,
+ margin: 1,
+ padding: 1
+ };
+
+$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
+ $.fx.step[ prop ] = function( fx ) {
+ if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
+ jQuery.style( fx.elem, prop, fx.end );
+ fx.setAttr = true;
+ }
+ };
+});
+
+function getElementStyles() {
+ var style = this.ownerDocument.defaultView ?
+ this.ownerDocument.defaultView.getComputedStyle( this, null ) :
+ this.currentStyle,
+ newStyle = {},
+ key,
+ len;
+
+ // webkit enumerates style porperties
+ if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
+ len = style.length;
+ while ( len-- ) {
+ key = style[ len ];
+ if ( typeof style[ key ] === "string" ) {
+ newStyle[ $.camelCase( key ) ] = style[ key ];
+ }
+ }
+ } else {
+ for ( key in style ) {
+ if ( typeof style[ key ] === "string" ) {
+ newStyle[ key ] = style[ key ];
+ }
+ }
+ }
+
+ return newStyle;
+}
+
+
+function styleDifference( oldStyle, newStyle ) {
+ var diff = {},
+ name, value;
+
+ for ( name in newStyle ) {
+ value = newStyle[ name ];
+ if ( oldStyle[ name ] !== value ) {
+ if ( !shorthandStyles[ name ] ) {
+ if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
+ diff[ name ] = value;
+ }
+ }
+ }
+ }
+
+ return diff;
+}
+
+$.effects.animateClass = function( value, duration, easing, callback ) {
+ var o = $.speed( duration, easing, callback );
+
+ return this.queue( function() {
+ var animated = $( this ),
+ baseClass = animated.attr( "class" ) || "",
+ applyClassChange,
+ allAnimations = o.children ? animated.find( "*" ).andSelf() : animated;
+
+ // map the animated objects to store the original styles.
+ allAnimations = allAnimations.map(function() {
+ var el = $( this );
+ return {
+ el: el,
+ start: getElementStyles.call( this )
+ };
+ });
+
+ // apply class change
+ applyClassChange = function() {
+ $.each( classAnimationActions, function(i, action) {
+ if ( value[ action ] ) {
+ animated[ action + "Class" ]( value[ action ] );
+ }
+ });
+ };
+ applyClassChange();
+
+ // map all animated objects again - calculate new styles and diff
+ allAnimations = allAnimations.map(function() {
+ this.end = getElementStyles.call( this.el[ 0 ] );
+ this.diff = styleDifference( this.start, this.end );
+ return this;
+ });
+
+ // apply original class
+ animated.attr( "class", baseClass );
+
+ // map all animated objects again - this time collecting a promise
+ allAnimations = allAnimations.map(function() {
+ var styleInfo = this,
+ dfd = $.Deferred(),
+ opts = jQuery.extend({}, o, {
+ queue: false,
+ complete: function() {
+ dfd.resolve( styleInfo );
+ }
+ });
+
+ this.el.animate( this.diff, opts );
+ return dfd.promise();
+ });
+
+ // once all animations have completed:
+ $.when.apply( $, allAnimations.get() ).done(function() {
+
+ // set the final class
+ applyClassChange();
+
+ // for each animated element,
+ // clear all css properties that were animated
+ $.each( arguments, function() {
+ var el = this.el;
+ $.each( this.diff, function(key) {
+ el.css( key, '' );
+ });
+ });
+
+ // this is guarnteed to be there if you use jQuery.speed()
+ // it also handles dequeuing the next anim...
+ o.complete.call( animated[ 0 ] );
+ });
+ });
+};
+
+$.fn.extend({
+ _addClass: $.fn.addClass,
+ addClass: function( classNames, speed, easing, callback ) {
+ return speed ?
+ $.effects.animateClass.call( this,
+ { add: classNames }, speed, easing, callback ) :
+ this._addClass( classNames );
+ },
+
+ _removeClass: $.fn.removeClass,
+ removeClass: function( classNames, speed, easing, callback ) {
+ return speed ?
+ $.effects.animateClass.call( this,
+ { remove: classNames }, speed, easing, callback ) :
+ this._removeClass( classNames );
+ },
+
+ _toggleClass: $.fn.toggleClass,
+ toggleClass: function( classNames, force, speed, easing, callback ) {
+ if ( typeof force === "boolean" || force === undefined ) {
+ if ( !speed ) {
+ // without speed parameter
+ return this._toggleClass( classNames, force );
+ } else {
+ return $.effects.animateClass.call( this,
+ (force ? { add: classNames } : { remove: classNames }),
+ speed, easing, callback );
+ }
+ } else {
+ // without force parameter
+ return $.effects.animateClass.call( this,
+ { toggle: classNames }, force, speed, easing );
+ }
+ },
+
+ switchClass: function( remove, add, speed, easing, callback) {
+ return $.effects.animateClass.call( this, {
+ add: add,
+ remove: remove
+ }, speed, easing, callback );
+ }
+});
+
+})();
+
+/******************************************************************************/
+/*********************************** EFFECTS **********************************/
+/******************************************************************************/
+
+(function() {
+
+$.extend( $.effects, {
+ version: "1.9.2",
+
+ // Saves a set of properties in a data storage
+ save: function( element, set ) {
+ for( var i=0; i < set.length; i++ ) {
+ if ( set[ i ] !== null ) {
+ element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
+ }
+ }
+ },
+
+ // Restores a set of previously saved properties from a data storage
+ restore: function( element, set ) {
+ var val, i;
+ for( i=0; i < set.length; i++ ) {
+ if ( set[ i ] !== null ) {
+ val = element.data( dataSpace + set[ i ] );
+ // support: jQuery 1.6.2
+ // http://bugs.jquery.com/ticket/9917
+ // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
+ // We can't differentiate between "" and 0 here, so we just assume
+ // empty string since it's likely to be a more common value...
+ if ( val === undefined ) {
+ val = "";
+ }
+ element.css( set[ i ], val );
+ }
+ }
+ },
+
+ setMode: function( el, mode ) {
+ if (mode === "toggle") {
+ mode = el.is( ":hidden" ) ? "show" : "hide";
+ }
+ return mode;
+ },
+
+ // Translates a [top,left] array into a baseline value
+ // this should be a little more flexible in the future to handle a string & hash
+ getBaseline: function( origin, original ) {
+ var y, x;
+ switch ( origin[ 0 ] ) {
+ case "top": y = 0; break;
+ case "middle": y = 0.5; break;
+ case "bottom": y = 1; break;
+ default: y = origin[ 0 ] / original.height;
+ }
+ switch ( origin[ 1 ] ) {
+ case "left": x = 0; break;
+ case "center": x = 0.5; break;
+ case "right": x = 1; break;
+ default: x = origin[ 1 ] / original.width;
+ }
+ return {
+ x: x,
+ y: y
+ };
+ },
+
+ // Wraps the element around a wrapper that copies position properties
+ createWrapper: function( element ) {
+
+ // if the element is already wrapped, return it
+ if ( element.parent().is( ".ui-effects-wrapper" )) {
+ return element.parent();
+ }
+
+ // wrap the element
+ var props = {
+ width: element.outerWidth(true),
+ height: element.outerHeight(true),
+ "float": element.css( "float" )
+ },
+ wrapper = $( "<div></div>" )
+ .addClass( "ui-effects-wrapper" )
+ .css({
+ fontSize: "100%",
+ background: "transparent",
+ border: "none",
+ margin: 0,
+ padding: 0
+ }),
+ // Store the size in case width/height are defined in % - Fixes #5245
+ size = {
+ width: element.width(),
+ height: element.height()
+ },
+ active = document.activeElement;
+
+ // support: Firefox
+ // Firefox incorrectly exposes anonymous content
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
+ try {
+ active.id;
+ } catch( e ) {
+ active = document.body;
+ }
+
+ element.wrap( wrapper );
+
+ // Fixes #7595 - Elements lose focus when wrapped.
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+ $( active ).focus();
+ }
+
+ wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
+
+ // transfer positioning properties to the wrapper
+ if ( element.css( "position" ) === "static" ) {
+ wrapper.css({ position: "relative" });
+ element.css({ position: "relative" });
+ } else {
+ $.extend( props, {
+ position: element.css( "position" ),
+ zIndex: element.css( "z-index" )
+ });
+ $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
+ props[ pos ] = element.css( pos );
+ if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
+ props[ pos ] = "auto";
+ }
+ });
+ element.css({
+ position: "relative",
+ top: 0,
+ left: 0,
+ right: "auto",
+ bottom: "auto"
+ });
+ }
+ element.css(size);
+
+ return wrapper.css( props ).show();
+ },
+
+ removeWrapper: function( element ) {
+ var active = document.activeElement;
+
+ if ( element.parent().is( ".ui-effects-wrapper" ) ) {
+ element.parent().replaceWith( element );
+
+ // Fixes #7595 - Elements lose focus when wrapped.
+ if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+ $( active ).focus();
+ }
+ }
+
+
+ return element;
+ },
+
+ setTransition: function( element, list, factor, value ) {
+ value = value || {};
+ $.each( list, function( i, x ) {
+ var unit = element.cssUnit( x );
+ if ( unit[ 0 ] > 0 ) {
+ value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
+ }
+ });
+ return value;
+ }
+});
+
+// return an effect options object for the given parameters:
+function _normalizeArguments( effect, options, speed, callback ) {
+
+ // allow passing all options as the first parameter
+ if ( $.isPlainObject( effect ) ) {
+ options = effect;
+ effect = effect.effect;
+ }
+
+ // convert to an object
+ effect = { effect: effect };
+
+ // catch (effect, null, ...)
+ if ( options == null ) {
+ options = {};
+ }
+
+ // catch (effect, callback)
+ if ( $.isFunction( options ) ) {
+ callback = options;
+ speed = null;
+ options = {};
+ }
+
+ // catch (effect, speed, ?)
+ if ( typeof options === "number" || $.fx.speeds[ options ] ) {
+ callback = speed;
+ speed = options;
+ options = {};
+ }
+
+ // catch (effect, options, callback)
+ if ( $.isFunction( speed ) ) {
+ callback = speed;
+ speed = null;
+ }
+
+ // add options to effect
+ if ( options ) {
+ $.extend( effect, options );
+ }
+
+ speed = speed || options.duration;
+ effect.duration = $.fx.off ? 0 :
+ typeof speed === "number" ? speed :
+ speed in $.fx.speeds ? $.fx.speeds[ speed ] :
+ $.fx.speeds._default;
+
+ effect.complete = callback || options.complete;
+
+ return effect;
+}
+
+function standardSpeed( speed ) {
+ // valid standard speeds
+ if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
+ return true;
+ }
+
+ // invalid strings - treat as "normal" speed
+ if ( typeof speed === "string" && !$.effects.effect[ speed ] ) {
+ // TODO: remove in 2.0 (#7115)
+ if ( backCompat && $.effects[ speed ] ) {
+ return false;
+ }
+ return true;
+ }
+
+ return false;
+}
+
+$.fn.extend({
+ effect: function( /* effect, options, speed, callback */ ) {
+ var args = _normalizeArguments.apply( this, arguments ),
+ mode = args.mode,
+ queue = args.queue,
+ effectMethod = $.effects.effect[ args.effect ],
+
+ // DEPRECATED: remove in 2.0 (#7115)
+ oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ];
+
+ if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) {
+ // delegate to the original method (e.g., .show()) if possible
+ if ( mode ) {
+ return this[ mode ]( args.duration, args.complete );
+ } else {
+ return this.each( function() {
+ if ( args.complete ) {
+ args.complete.call( this );
+ }
+ });
+ }
+ }
+
+ function run( next ) {
+ var elem = $( this ),
+ complete = args.complete,
+ mode = args.mode;
+
+ function done() {
+ if ( $.isFunction( complete ) ) {
+ complete.call( elem[0] );
+ }
+ if ( $.isFunction( next ) ) {
+ next();
+ }
+ }
+
+ // if the element is hiddden and mode is hide,
+ // or element is visible and mode is show
+ if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
+ done();
+ } else {
+ effectMethod.call( elem[0], args, done );
+ }
+ }
+
+ // TODO: remove this check in 2.0, effectMethod will always be true
+ if ( effectMethod ) {
+ return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
+ } else {
+ // DEPRECATED: remove in 2.0 (#7115)
+ return oldEffectMethod.call(this, {
+ options: args,
+ duration: args.duration,
+ callback: args.complete,
+ mode: args.mode
+ });
+ }
+ },
+
+ _show: $.fn.show,
+ show: function( speed ) {
+ if ( standardSpeed( speed ) ) {
+ return this._show.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "show";
+ return this.effect.call( this, args );
+ }
+ },
+
+ _hide: $.fn.hide,
+ hide: function( speed ) {
+ if ( standardSpeed( speed ) ) {
+ return this._hide.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "hide";
+ return this.effect.call( this, args );
+ }
+ },
+
+ // jQuery core overloads toggle and creates _toggle
+ __toggle: $.fn.toggle,
+ toggle: function( speed ) {
+ if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
+ return this.__toggle.apply( this, arguments );
+ } else {
+ var args = _normalizeArguments.apply( this, arguments );
+ args.mode = "toggle";
+ return this.effect.call( this, args );
+ }
+ },
+
+ // helper functions
+ cssUnit: function(key) {
+ var style = this.css( key ),
+ val = [];
+
+ $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
+ if ( style.indexOf( unit ) > 0 ) {
+ val = [ parseFloat( style ), unit ];
+ }
+ });
+ return val;
+ }
+});
+
+})();
+
+/******************************************************************************/
+/*********************************** EASING ***********************************/
+/******************************************************************************/
+
+(function() {
+
+// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
+
+var baseEasings = {};
+
+$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
+ baseEasings[ name ] = function( p ) {
+ return Math.pow( p, i + 2 );
+ };
+});
+
+$.extend( baseEasings, {
+ Sine: function ( p ) {
+ return 1 - Math.cos( p * Math.PI / 2 );
+ },
+ Circ: function ( p ) {
+ return 1 - Math.sqrt( 1 - p * p );
+ },
+ Elastic: function( p ) {
+ return p === 0 || p === 1 ? p :
+ -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
+ },
+ Back: function( p ) {
+ return p * p * ( 3 * p - 2 );
+ },
+ Bounce: function ( p ) {
+ var pow2,
+ bounce = 4;
+
+ while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
+ return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
+ }
+});
+
+$.each( baseEasings, function( name, easeIn ) {
+ $.easing[ "easeIn" + name ] = easeIn;
+ $.easing[ "easeOut" + name ] = function( p ) {
+ return 1 - easeIn( 1 - p );
+ };
+ $.easing[ "easeInOut" + name ] = function( p ) {
+ return p < 0.5 ?
+ easeIn( p * 2 ) / 2 :
+ 1 - easeIn( p * -2 + 2 ) / 2;
+ };
+});
+
+})();
+
+})(jQuery));
+(function( $, undefined ) {
+
+var rvertical = /up|down|vertical/,
+ rpositivemotion = /up|left|vertical|horizontal/;
+
+$.effects.effect.blind = function( o, done ) {
+ // Create element
+ var el = $( this ),
+ props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+ mode = $.effects.setMode( el, o.mode || "hide" ),
+ direction = o.direction || "up",
+ vertical = rvertical.test( direction ),
+ ref = vertical ? "height" : "width",
+ ref2 = vertical ? "top" : "left",
+ motion = rpositivemotion.test( direction ),
+ animation = {},
+ show = mode === "show",
+ wrapper, distance, margin;
+
+ // if already wrapped, the wrapper's properties are my property. #6245
+ if ( el.parent().is( ".ui-effects-wrapper" ) ) {
+ $.effects.save( el.parent(), props );
+ } else {
+ $.effects.save( el, props );
+ }
+ el.show();
+ wrapper = $.effects.createWrapper( el ).css({
+ overflow: "hidden"
+ });
+
+ distance = wrapper[ ref ]();
+ margin = parseFloat( wrapper.css( ref2 ) ) || 0;
+
+ animation[ ref ] = show ? distance : 0;
+ if ( !motion ) {
+ el
+ .css( vertical ? "bottom" : "right", 0 )
+ .css( vertical ? "top" : "left", "auto" )
+ .css({ position: "absolute" });
+
+ animation[ ref2 ] = show ? margin : distance + margin;
+ }
+
+ // start at 0 if we are showing
+ if ( show ) {
+ wrapper.css( ref, 0 );
+ if ( ! motion ) {
+ wrapper.css( ref2, margin + distance );
+ }
+ }
+
+ // Animate
+ wrapper.animate( animation, {
+ duration: o.duration,
+ easing: o.easing,
+ queue: false,
+ complete: function() {
+ if ( mode === "hide" ) {
+ el.hide();
+ }
+ $.effects.restore( el, props );
+ $.effects.removeWrapper( el );
+ done();
+ }
+ });
+
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.bounce = function( o, done ) {
+ var el = $( this ),
+ props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+
+ // defaults:
+ mode = $.effects.setMode( el, o.mode || "effect" ),
+ hide = mode === "hide",
+ show = mode === "show",
+ direction = o.direction || "up",
+ distance = o.distance,
+ times = o.times || 5,
+
+ // number of internal animations
+ anims = times * 2 + ( show || hide ? 1 : 0 ),
+ speed = o.duration / anims,
+ easing = o.easing,
+
+ // utility:
+ ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
+ motion = ( direction === "up" || direction === "left" ),
+ i,
+ upAnim,
+ downAnim,
+
+ // we will need to re-assemble the queue to stack our animations in place
+ queue = el.queue(),
+ queuelen = queue.length;
+
+ // Avoid touching opacity to prevent clearType and PNG issues in IE
+ if ( show || hide ) {
+ props.push( "opacity" );
+ }
+
+ $.effects.save( el, props );
+ el.show();
+ $.effects.createWrapper( el ); // Create Wrapper
+
+ // default distance for the BIGGEST bounce is the outer Distance / 3
+ if ( !distance ) {
+ distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
+ }
+
+ if ( show ) {
+ downAnim = { opacity: 1 };
+ downAnim[ ref ] = 0;
+
+ // if we are showing, force opacity 0 and set the initial position
+ // then do the "first" animation
+ el.css( "opacity", 0 )
+ .css( ref, motion ? -distance * 2 : distance * 2 )
+ .animate( downAnim, speed, easing );
+ }
+
+ // start at the smallest distance if we are hiding
+ if ( hide ) {
+ distance = distance / Math.pow( 2, times - 1 );
+ }
+
+ downAnim = {};
+ downAnim[ ref ] = 0;
+ // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
+ for ( i = 0; i < times; i++ ) {
+ upAnim = {};
+ upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
+
+ el.animate( upAnim, speed, easing )
+ .animate( downAnim, speed, easing );
+
+ distance = hide ? distance * 2 : distance / 2;
+ }
+
+ // Last Bounce when Hiding
+ if ( hide ) {
+ upAnim = { opacity: 0 };
+ upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
+
+ el.animate( upAnim, speed, easing );
+ }
+
+ el.queue(function() {
+ if ( hide ) {
+ el.hide();
+ }
+ $.effects.restore( el, props );
+ $.effects.removeWrapper( el );
+ done();
+ });
+
+ // inject all the animations we just queued to be first in line (after "inprogress")
+ if ( queuelen > 1) {
+ queue.splice.apply( queue,
+ [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
+ }
+ el.dequeue();
+
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.clip = function( o, done ) {
+ // Create element
+ var el = $( this ),
+ props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+ mode = $.effects.setMode( el, o.mode || "hide" ),
+ show = mode === "show",
+ direction = o.direction || "vertical",
+ vert = direction === "vertical",
+ size = vert ? "height" : "width",
+ position = vert ? "top" : "left",
+ animation = {},
+ wrapper, animate, distance;
+
+ // Save & Show
+ $.effects.save( el, props );
+ el.show();
+
+ // Create Wrapper
+ wrapper = $.effects.createWrapper( el ).css({
+ overflow: "hidden"
+ });
+ animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
+ distance = animate[ size ]();
+
+ // Shift
+ if ( show ) {
+ animate.css( size, 0 );
+ animate.css( position, distance / 2 );
+ }
+
+ // Create Animation Object:
+ animation[ size ] = show ? distance : 0;
+ animation[ position ] = show ? 0 : distance / 2;
+
+ // Animate
+ animate.animate( animation, {
+ queue: false,
+ duration: o.duration,
+ easing: o.easing,
+ complete: function() {
+ if ( !show ) {
+ el.hide();
+ }
+ $.effects.restore( el, props );
+ $.effects.removeWrapper( el );
+ done();
+ }
+ });
+
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.drop = function( o, done ) {
+
+ var el = $( this ),
+ props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
+ mode = $.effects.setMode( el, o.mode || "hide" ),
+ show = mode === "show",
+ direction = o.direction || "left",
+ ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
+ motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
+ animation = {
+ opacity: show ? 1 : 0
+ },
+ distance;
+
+ // Adjust
+ $.effects.save( el, props );
+ el.show();
+ $.effects.createWrapper( el );
+
+ distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;
+
+ if ( show ) {
+ el
+ .css( "opacity", 0 )
+ .css( ref, motion === "pos" ? -distance : distance );
+ }
+
+ // Animation
+ animation[ ref ] = ( show ?
+ ( motion === "pos" ? "+=" : "-=" ) :
+ ( motion === "pos" ? "-=" : "+=" ) ) +
+ distance;
+
+ // Animate
+ el.animate( animation, {
+ queue: false,
+ duration: o.duration,
+ easing: o.easing,
+ complete: function() {
+ if ( mode === "hide" ) {
+ el.hide();
+ }
+ $.effects.restore( el, props );
+ $.effects.removeWrapper( el );
+ done();
+ }
+ });
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.explode = function( o, done ) {
+
+ var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
+ cells = rows,
+ el = $( this ),
+ mode = $.effects.setMode( el, o.mode || "hide" ),
+ show = mode === "show",
+
+ // show and then visibility:hidden the element before calculating offset
+ offset = el.show().css( "visibility", "hidden" ).offset(),
+
+ // width and height of a piece
+ width = Math.ceil( el.outerWidth() / cells ),
+ height = Math.ceil( el.outerHeight() / rows ),
+ pieces = [],
+
+ // loop
+ i, j, left, top, mx, my;
+
+ // children animate complete:
+ function childComplete() {
+ pieces.push( this );
+ if ( pieces.length === rows * cells ) {
+ animComplete();
+ }
+ }
+
+ // clone the element for each row and cell.
+ for( i = 0; i < rows ; i++ ) { // ===>
+ top = offset.top + i * height;
+ my = i - ( rows - 1 ) / 2 ;
+
+ for( j = 0; j < cells ; j++ ) { // |||
+ left = offset.left + j * width;
+ mx = j - ( cells - 1 ) / 2 ;
+
+ // Create a clone of the now hidden main element that will be absolute positioned
+ // within a wrapper div off the -left and -top equal to size of our pieces
+ el
+ .clone()
+ .appendTo( "body" )
+ .wrap( "<div></div>" )
+ .css({
+ position: "absolute",
+ visibility: "visible",
+ left: -j * width,
+ top: -i * height
+ })
+
+ // select the wrapper - make it overflow: hidden and absolute positioned based on
+ // where the original was located +left and +top equal to the size of pieces
+ .parent()
+ .addClass( "ui-effects-explode" )
+ .css({
+ position: "absolute",
+ overflow: "hidden",
+ width: width,
+ height: height,
+ left: left + ( show ? mx * width : 0 ),
+ top: top + ( show ? my * height : 0 ),
+ opacity: show ? 0 : 1
+ }).animate({
+ left: left + ( show ? 0 : mx * width ),
+ top: top + ( show ? 0 : my * height ),
+ opacity: show ? 1 : 0
+ }, o.duration || 500, o.easing, childComplete );
+ }
+ }
+
+ function animComplete() {
+ el.css({
+ visibility: "visible"
+ });
+ $( pieces ).remove();
+ if ( !show ) {
+ el.hide();
+ }
+ done();
+ }
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.fade = function( o, done ) {
+ var el = $( this ),
+ mode = $.effects.setMode( el, o.mode || "toggle" );
+
+ el.animate({
+ opacity: mode
+ }, {
+ queue: false,
+ duration: o.duration,
+ easing: o.easing,
+ complete: done
+ });
+};
+
+})( jQuery );
+(function( $, undefined ) {
+
+$.effects.effect.fold = function( o, done ) {
+
+ // Create element
+ var el = $( this ),
+ props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+ mode = $.effects.setMode( el, o.mode || "hide" ),
+ show = mode === "show",
+ hide = mode === "hide",
+ size = o.size || 15,
+ percent = /([0-9]+)%/.exec( size ),
+ horizFirst = !!o.horizFirst,
+ widthFirst = show !== horizFirst,
+ ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
+ duration = o.duration / 2,
+ wrapper, distance,
+ animation1 = {},
+ animation2 = {};
+
+ $.effects.save( el, props );
+ el.show();
+
+ // Create Wrapper
+ wrapper = $.effects.createWrapper( el ).css({
+ overflow: "hidden"
+ });
+ distance = widthFirst ?
+ [ wrapper.width(), wrapper.height() ] :
+ [ wrapper.height(), wrapper.width() ];
+
+ if ( percent ) {
+ size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
+ }
+ if ( show ) {
+ wrapper.css( horizFirst ? {
+ height: 0,
+ width: size
+ } : {
+ height: size,
+ width: 0
+ });
+ }
+
+ // Animation
+ animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
+ animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
+
+ // Animate
+ wrapper
+ .animate( animation1, duration, o.easing )
+ .animate( animation2, duration, o.easing, function() {
+ if ( hide ) {
+ el.hide();
+ }
+ $.effects.restore( el, props );
+ $.effects.removeWrapper( el );
+ done();
+ });
+
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.highlight = function( o, done ) {
+ var elem = $( this ),
+ props = [ "backgroundImage", "backgroundColor", "opacity" ],
+ mode = $.effects.setMode( elem, o.mode || "show" ),
+ animation = {
+ backgroundColor: elem.css( "backgroundColor" )
+ };
+
+ if (mode === "hide") {
+ animation.opacity = 0;
+ }
+
+ $.effects.save( elem, props );
+
+ elem
+ .show()
+ .css({
+ backgroundImage: "none",
+ backgroundColor: o.color || "#ffff99"
+ })
+ .animate( animation, {
+ queue: false,
+ duration: o.duration,
+ easing: o.easing,
+ complete: function() {
+ if ( mode === "hide" ) {
+ elem.hide();
+ }
+ $.effects.restore( elem, props );
+ done();
+ }
+ });
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.pulsate = function( o, done ) {
+ var elem = $( this ),
+ mode = $.effects.setMode( elem, o.mode || "show" ),
+ show = mode === "show",
+ hide = mode === "hide",
+ showhide = ( show || mode === "hide" ),
+
+ // showing or hiding leaves of the "last" animation
+ anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
+ duration = o.duration / anims,
+ animateTo = 0,
+ queue = elem.queue(),
+ queuelen = queue.length,
+ i;
+
+ if ( show || !elem.is(":visible")) {
+ elem.css( "opacity", 0 ).show();
+ animateTo = 1;
+ }
+
+ // anims - 1 opacity "toggles"
+ for ( i = 1; i < anims; i++ ) {
+ elem.animate({
+ opacity: animateTo
+ }, duration, o.easing );
+ animateTo = 1 - animateTo;
+ }
+
+ elem.animate({
+ opacity: animateTo
+ }, duration, o.easing);
+
+ elem.queue(function() {
+ if ( hide ) {
+ elem.hide();
+ }
+ done();
+ });
+
+ // We just queued up "anims" animations, we need to put them next in the queue
+ if ( queuelen > 1 ) {
+ queue.splice.apply( queue,
+ [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
+ }
+ elem.dequeue();
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.puff = function( o, done ) {
+ var elem = $( this ),
+ mode = $.effects.setMode( elem, o.mode || "hide" ),
+ hide = mode === "hide",
+ percent = parseInt( o.percent, 10 ) || 150,
+ factor = percent / 100,
+ original = {
+ height: elem.height(),
+ width: elem.width(),
+ outerHeight: elem.outerHeight(),
+ outerWidth: elem.outerWidth()
+ };
+
+ $.extend( o, {
+ effect: "scale",
+ queue: false,
+ fade: true,
+ mode: mode,
+ complete: done,
+ percent: hide ? percent : 100,
+ from: hide ?
+ original :
+ {
+ height: original.height * factor,
+ width: original.width * factor,
+ outerHeight: original.outerHeight * factor,
+ outerWidth: original.outerWidth * factor
+ }
+ });
+
+ elem.effect( o );
+};
+
+$.effects.effect.scale = function( o, done ) {
+
+ // Create element
+ var el = $( this ),
+ options = $.extend( true, {}, o ),
+ mode = $.effects.setMode( el, o.mode || "effect" ),
+ percent = parseInt( o.percent, 10 ) ||
+ ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
+ direction = o.direction || "both",
+ origin = o.origin,
+ original = {
+ height: el.height(),
+ width: el.width(),
+ outerHeight: el.outerHeight(),
+ outerWidth: el.outerWidth()
+ },
+ factor = {
+ y: direction !== "horizontal" ? (percent / 100) : 1,
+ x: direction !== "vertical" ? (percent / 100) : 1
+ };
+
+ // We are going to pass this effect to the size effect:
+ options.effect = "size";
+ options.queue = false;
+ options.complete = done;
+
+ // Set default origin and restore for show/hide
+ if ( mode !== "effect" ) {
+ options.origin = origin || ["middle","center"];
+ options.restore = true;
+ }
+
+ options.from = o.from || ( mode === "show" ? {
+ height: 0,
+ width: 0,
+ outerHeight: 0,
+ outerWidth: 0
+ } : original );
+ options.to = {
+ height: original.height * factor.y,
+ width: original.width * factor.x,
+ outerHeight: original.outerHeight * factor.y,
+ outerWidth: original.outerWidth * factor.x
+ };
+
+ // Fade option to support puff
+ if ( options.fade ) {
+ if ( mode === "show" ) {
+ options.from.opacity = 0;
+ options.to.opacity = 1;
+ }
+ if ( mode === "hide" ) {
+ options.from.opacity = 1;
+ options.to.opacity = 0;
+ }
+ }
+
+ // Animate
+ el.effect( options );
+
+};
+
+$.effects.effect.size = function( o, done ) {
+
+ // Create element
+ var original, baseline, factor,
+ el = $( this ),
+ props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
+
+ // Always restore
+ props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
+
+ // Copy for children
+ props2 = [ "width", "height", "overflow" ],
+ cProps = [ "fontSize" ],
+ vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
+ hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
+
+ // Set options
+ mode = $.effects.setMode( el, o.mode || "effect" ),
+ restore = o.restore || mode !== "effect",
+ scale = o.scale || "both",
+ origin = o.origin || [ "middle", "center" ],
+ position = el.css( "position" ),
+ props = restore ? props0 : props1,
+ zero = {
+ height: 0,
+ width: 0,
+ outerHeight: 0,
+ outerWidth: 0
+ };
+
+ if ( mode === "show" ) {
+ el.show();
+ }
+ original = {
+ height: el.height(),
+ width: el.width(),
+ outerHeight: el.outerHeight(),
+ outerWidth: el.outerWidth()
+ };
+
+ if ( o.mode === "toggle" && mode === "show" ) {
+ el.from = o.to || zero;
+ el.to = o.from || original;
+ } else {
+ el.from = o.from || ( mode === "show" ? zero : original );
+ el.to = o.to || ( mode === "hide" ? zero : original );
+ }
+
+ // Set scaling factor
+ factor = {
+ from: {
+ y: el.from.height / original.height,
+ x: el.from.width / original.width
+ },
+ to: {
+ y: el.to.height / original.height,
+ x: el.to.width / original.width
+ }
+ };
+
+ // Scale the css box
+ if ( scale === "box" || scale === "both" ) {
+
+ // Vertical props scaling
+ if ( factor.from.y !== factor.to.y ) {
+ props = props.concat( vProps );
+ el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
+ el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
+ }
+
+ // Horizontal props scaling
+ if ( factor.from.x !== factor.to.x ) {
+ props = props.concat( hProps );
+ el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
+ el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
+ }
+ }
+
+ // Scale the content
+ if ( scale === "content" || scale === "both" ) {
+
+ // Vertical props scaling
+ if ( factor.from.y !== factor.to.y ) {
+ props = props.concat( cProps ).concat( props2 );
+ el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
+ el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
+ }
+ }
+
+ $.effects.save( el, props );
+ el.show();
+ $.effects.createWrapper( el );
+ el.css( "overflow", "hidden" ).css( el.from );
+
+ // Adjust
+ if (origin) { // Calculate baseline shifts
+ baseline = $.effects.getBaseline( origin, original );
+ el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
+ el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
+ el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
+ el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
+ }
+ el.css( el.from ); // set top & left
+
+ // Animate
+ if ( scale === "content" || scale === "both" ) { // Scale the children
+
+ // Add margins/font-size
+ vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
+ hProps = hProps.concat([ "marginLeft", "marginRight" ]);
+ props2 = props0.concat(vProps).concat(hProps);
+
+ el.find( "*[width]" ).each( function(){
+ var child = $( this ),
+ c_original = {
+ height: child.height(),
+ width: child.width(),
+ outerHeight: child.outerHeight(),
+ outerWidth: child.outerWidth()
+ };
+ if (restore) {
+ $.effects.save(child, props2);
+ }
+
+ child.from = {
+ height: c_original.height * factor.from.y,
+ width: c_original.width * factor.from.x,
+ outerHeight: c_original.outerHeight * factor.from.y,
+ outerWidth: c_original.outerWidth * factor.from.x
+ };
+ child.to = {
+ height: c_original.height * factor.to.y,
+ width: c_original.width * factor.to.x,
+ outerHeight: c_original.height * factor.to.y,
+ outerWidth: c_original.width * factor.to.x
+ };
+
+ // Vertical props scaling
+ if ( factor.from.y !== factor.to.y ) {
+ child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
+ child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
+ }
+
+ // Horizontal props scaling
+ if ( factor.from.x !== factor.to.x ) {
+ child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
+ child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
+ }
+
+ // Animate children
+ child.css( child.from );
+ child.animate( child.to, o.duration, o.easing, function() {
+
+ // Restore children
+ if ( restore ) {
+ $.effects.restore( child, props2 );
+ }
+ });
+ });
+ }
+
+ // Animate
+ el.animate( el.to, {
+ queue: false,
+ duration: o.duration,
+ easing: o.easing,
+ complete: function() {
+ if ( el.to.opacity === 0 ) {
+ el.css( "opacity", el.from.opacity );
+ }
+ if( mode === "hide" ) {
+ el.hide();
+ }
+ $.effects.restore( el, props );
+ if ( !restore ) {
+
+ // we need to calculate our new positioning based on the scaling
+ if ( position === "static" ) {
+ el.css({
+ position: "relative",
+ top: el.to.top,
+ left: el.to.left
+ });
+ } else {
+ $.each([ "top", "left" ], function( idx, pos ) {
+ el.css( pos, function( _, str ) {
+ var val = parseInt( str, 10 ),
+ toRef = idx ? el.to.left : el.to.top;
+
+ // if original was "auto", recalculate the new value from wrapper
+ if ( str === "auto" ) {
+ return toRef + "px";
+ }
+
+ return val + toRef + "px";
+ });
+ });
+ }
+ }
+
+ $.effects.removeWrapper( el );
+ done();
+ }
+ });
+
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.shake = function( o, done ) {
+
+ var el = $( this ),
+ props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+ mode = $.effects.setMode( el, o.mode || "effect" ),
+ direction = o.direction || "left",
+ distance = o.distance || 20,
+ times = o.times || 3,
+ anims = times * 2 + 1,
+ speed = Math.round(o.duration/anims),
+ ref = (direction === "up" || direction === "down") ? "top" : "left",
+ positiveMotion = (direction === "up" || direction === "left"),
+ animation = {},
+ animation1 = {},
+ animation2 = {},
+ i,
+
+ // we will need to re-assemble the queue to stack our animations in place
+ queue = el.queue(),
+ queuelen = queue.length;
+
+ $.effects.save( el, props );
+ el.show();
+ $.effects.createWrapper( el );
+
+ // Animation
+ animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
+ animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
+ animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
+
+ // Animate
+ el.animate( animation, speed, o.easing );
+
+ // Shakes
+ for ( i = 1; i < times; i++ ) {
+ el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
+ }
+ el
+ .animate( animation1, speed, o.easing )
+ .animate( animation, speed / 2, o.easing )
+ .queue(function() {
+ if ( mode === "hide" ) {
+ el.hide();
+ }
+ $.effects.restore( el, props );
+ $.effects.removeWrapper( el );
+ done();
+ });
+
+ // inject all the animations we just queued to be first in line (after "inprogress")
+ if ( queuelen > 1) {
+ queue.splice.apply( queue,
+ [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
+ }
+ el.dequeue();
+
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.slide = function( o, done ) {
+
+ // Create element
+ var el = $( this ),
+ props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
+ mode = $.effects.setMode( el, o.mode || "show" ),
+ show = mode === "show",
+ direction = o.direction || "left",
+ ref = (direction === "up" || direction === "down") ? "top" : "left",
+ positiveMotion = (direction === "up" || direction === "left"),
+ distance,
+ animation = {};
+
+ // Adjust
+ $.effects.save( el, props );
+ el.show();
+ distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
+
+ $.effects.createWrapper( el ).css({
+ overflow: "hidden"
+ });
+
+ if ( show ) {
+ el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
+ }
+
+ // Animation
+ animation[ ref ] = ( show ?
+ ( positiveMotion ? "+=" : "-=") :
+ ( positiveMotion ? "-=" : "+=")) +
+ distance;
+
+ // Animate
+ el.animate( animation, {
+ queue: false,
+ duration: o.duration,
+ easing: o.easing,
+ complete: function() {
+ if ( mode === "hide" ) {
+ el.hide();
+ }
+ $.effects.restore( el, props );
+ $.effects.removeWrapper( el );
+ done();
+ }
+ });
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.effects.effect.transfer = function( o, done ) {
+ var elem = $( this ),
+ target = $( o.to ),
+ targetFixed = target.css( "position" ) === "fixed",
+ body = $("body"),
+ fixTop = targetFixed ? body.scrollTop() : 0,
+ fixLeft = targetFixed ? body.scrollLeft() : 0,
+ endPosition = target.offset(),
+ animation = {
+ top: endPosition.top - fixTop ,
+ left: endPosition.left - fixLeft ,
+ height: target.innerHeight(),
+ width: target.innerWidth()
+ },
+ startPosition = elem.offset(),
+ transfer = $( '<div class="ui-effects-transfer"></div>' )
+ .appendTo( document.body )
+ .addClass( o.className )
+ .css({
+ top: startPosition.top - fixTop ,
+ left: startPosition.left - fixLeft ,
+ height: elem.innerHeight(),
+ width: elem.innerWidth(),
+ position: targetFixed ? "fixed" : "absolute"
+ })
+ .animate( animation, o.duration, o.easing, function() {
+ transfer.remove();
+ done();
+ });
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+var mouseHandled = false;
+
+$.widget( "ui.menu", {
+ version: "1.9.2",
+ defaultElement: "<ul>",
+ delay: 300,
+ options: {
+ icons: {
+ submenu: "ui-icon-carat-1-e"
+ },
+ menus: "ul",
+ position: {
+ my: "left top",
+ at: "right top"
+ },
+ role: "menu",
+
+ // callbacks
+ blur: null,
+ focus: null,
+ select: null
+ },
+
+ _create: function() {
+ this.activeMenu = this.element;
+ this.element
+ .uniqueId()
+ .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
+ .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
+ .attr({
+ role: this.options.role,
+ tabIndex: 0
+ })
+ // need to catch all clicks on disabled menu
+ // not possible through _on
+ .bind( "click" + this.eventNamespace, $.proxy(function( event ) {
+ if ( this.options.disabled ) {
+ event.preventDefault();
+ }
+ }, this ));
+
+ if ( this.options.disabled ) {
+ this.element
+ .addClass( "ui-state-disabled" )
+ .attr( "aria-disabled", "true" );
+ }
+
+ this._on({
+ // Prevent focus from sticking to links inside menu after clicking
+ // them (focus should always stay on UL during navigation).
+ "mousedown .ui-menu-item > a": function( event ) {
+ event.preventDefault();
+ },
+ "click .ui-state-disabled > a": function( event ) {
+ event.preventDefault();
+ },
+ "click .ui-menu-item:has(a)": function( event ) {
+ var target = $( event.target ).closest( ".ui-menu-item" );
+ if ( !mouseHandled && target.not( ".ui-state-disabled" ).length ) {
+ mouseHandled = true;
+
+ this.select( event );
+ // Open submenu on click
+ if ( target.has( ".ui-menu" ).length ) {
+ this.expand( event );
+ } else if ( !this.element.is( ":focus" ) ) {
+ // Redirect focus to the menu
+ this.element.trigger( "focus", [ true ] );
+
+ // If the active item is on the top level, let it stay active.
+ // Otherwise, blur the active item since it is no longer visible.
+ if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
+ clearTimeout( this.timer );
+ }
+ }
+ }
+ },
+ "mouseenter .ui-menu-item": function( event ) {
+ var target = $( event.currentTarget );
+ // Remove ui-state-active class from siblings of the newly focused menu item
+ // to avoid a jump caused by adjacent elements both having a class with a border
+ target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
+ this.focus( event, target );
+ },
+ mouseleave: "collapseAll",
+ "mouseleave .ui-menu": "collapseAll",
+ focus: function( event, keepActiveItem ) {
+ // If there's already an active item, keep it active
+ // If not, activate the first item
+ var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 );
+
+ if ( !keepActiveItem ) {
+ this.focus( event, item );
+ }
+ },
+ blur: function( event ) {
+ this._delay(function() {
+ if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
+ this.collapseAll( event );
+ }
+ });
+ },
+ keydown: "_keydown"
+ });
+
+ this.refresh();
+
+ // Clicks outside of a menu collapse any open menus
+ this._on( this.document, {
+ click: function( event ) {
+ if ( !$( event.target ).closest( ".ui-menu" ).length ) {
+ this.collapseAll( event );
+ }
+
+ // Reset the mouseHandled flag
+ mouseHandled = false;
+ }
+ });
+ },
+
+ _destroy: function() {
+ // Destroy (sub)menus
+ this.element
+ .removeAttr( "aria-activedescendant" )
+ .find( ".ui-menu" ).andSelf()
+ .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" )
+ .removeAttr( "role" )
+ .removeAttr( "tabIndex" )
+ .removeAttr( "aria-labelledby" )
+ .removeAttr( "aria-expanded" )
+ .removeAttr( "aria-hidden" )
+ .removeAttr( "aria-disabled" )
+ .removeUniqueId()
+ .show();
+
+ // Destroy menu items
+ this.element.find( ".ui-menu-item" )
+ .removeClass( "ui-menu-item" )
+ .removeAttr( "role" )
+ .removeAttr( "aria-disabled" )
+ .children( "a" )
+ .removeUniqueId()
+ .removeClass( "ui-corner-all ui-state-hover" )
+ .removeAttr( "tabIndex" )
+ .removeAttr( "role" )
+ .removeAttr( "aria-haspopup" )
+ .children().each( function() {
+ var elem = $( this );
+ if ( elem.data( "ui-menu-submenu-carat" ) ) {
+ elem.remove();
+ }
+ });
+
+ // Destroy menu dividers
+ this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
+ },
+
+ _keydown: function( event ) {
+ var match, prev, character, skip, regex,
+ preventDefault = true;
+
+ function escape( value ) {
+ return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
+ }
+
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.PAGE_UP:
+ this.previousPage( event );
+ break;
+ case $.ui.keyCode.PAGE_DOWN:
+ this.nextPage( event );
+ break;
+ case $.ui.keyCode.HOME:
+ this._move( "first", "first", event );
+ break;
+ case $.ui.keyCode.END:
+ this._move( "last", "last", event );
+ break;
+ case $.ui.keyCode.UP:
+ this.previous( event );
+ break;
+ case $.ui.keyCode.DOWN:
+ this.next( event );
+ break;
+ case $.ui.keyCode.LEFT:
+ this.collapse( event );
+ break;
+ case $.ui.keyCode.RIGHT:
+ if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
+ this.expand( event );
+ }
+ break;
+ case $.ui.keyCode.ENTER:
+ case $.ui.keyCode.SPACE:
+ this._activate( event );
+ break;
+ case $.ui.keyCode.ESCAPE:
+ this.collapse( event );
+ break;
+ default:
+ preventDefault = false;
+ prev = this.previousFilter || "";
+ character = String.fromCharCode( event.keyCode );
+ skip = false;
+
+ clearTimeout( this.filterTimer );
+
+ if ( character === prev ) {
+ skip = true;
+ } else {
+ character = prev + character;
+ }
+
+ regex = new RegExp( "^" + escape( character ), "i" );
+ match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
+ return regex.test( $( this ).children( "a" ).text() );
+ });
+ match = skip && match.index( this.active.next() ) !== -1 ?
+ this.active.nextAll( ".ui-menu-item" ) :
+ match;
+
+ // If no matches on the current filter, reset to the last character pressed
+ // to move down the menu to the first item that starts with that character
+ if ( !match.length ) {
+ character = String.fromCharCode( event.keyCode );
+ regex = new RegExp( "^" + escape( character ), "i" );
+ match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
+ return regex.test( $( this ).children( "a" ).text() );
+ });
+ }
+
+ if ( match.length ) {
+ this.focus( event, match );
+ if ( match.length > 1 ) {
+ this.previousFilter = character;
+ this.filterTimer = this._delay(function() {
+ delete this.previousFilter;
+ }, 1000 );
+ } else {
+ delete this.previousFilter;
+ }
+ } else {
+ delete this.previousFilter;
+ }
+ }
+
+ if ( preventDefault ) {
+ event.preventDefault();
+ }
+ },
+
+ _activate: function( event ) {
+ if ( !this.active.is( ".ui-state-disabled" ) ) {
+ if ( this.active.children( "a[aria-haspopup='true']" ).length ) {
+ this.expand( event );
+ } else {
+ this.select( event );
+ }
+ }
+ },
+
+ refresh: function() {
+ var menus,
+ icon = this.options.icons.submenu,
+ submenus = this.element.find( this.options.menus );
+
+ // Initialize nested menus
+ submenus.filter( ":not(.ui-menu)" )
+ .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
+ .hide()
+ .attr({
+ role: this.options.role,
+ "aria-hidden": "true",
+ "aria-expanded": "false"
+ })
+ .each(function() {
+ var menu = $( this ),
+ item = menu.prev( "a" ),
+ submenuCarat = $( "<span>" )
+ .addClass( "ui-menu-icon ui-icon " + icon )
+ .data( "ui-menu-submenu-carat", true );
+
+ item
+ .attr( "aria-haspopup", "true" )
+ .prepend( submenuCarat );
+ menu.attr( "aria-labelledby", item.attr( "id" ) );
+ });
+
+ menus = submenus.add( this.element );
+
+ // Don't refresh list items that are already adapted
+ menus.children( ":not(.ui-menu-item):has(a)" )
+ .addClass( "ui-menu-item" )
+ .attr( "role", "presentation" )
+ .children( "a" )
+ .uniqueId()
+ .addClass( "ui-corner-all" )
+ .attr({
+ tabIndex: -1,
+ role: this._itemRole()
+ });
+
+ // Initialize unlinked menu-items containing spaces and/or dashes only as dividers
+ menus.children( ":not(.ui-menu-item)" ).each(function() {
+ var item = $( this );
+ // hyphen, em dash, en dash
+ if ( !/[^\-—–\s]/.test( item.text() ) ) {
+ item.addClass( "ui-widget-content ui-menu-divider" );
+ }
+ });
+
+ // Add aria-disabled attribute to any disabled menu item
+ menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
+
+ // If the active item has been removed, blur the menu
+ if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
+ this.blur();
+ }
+ },
+
+ _itemRole: function() {
+ return {
+ menu: "menuitem",
+ listbox: "option"
+ }[ this.options.role ];
+ },
+
+ focus: function( event, item ) {
+ var nested, focused;
+ this.blur( event, event && event.type === "focus" );
+
+ this._scrollIntoView( item );
+
+ this.active = item.first();
+ focused = this.active.children( "a" ).addClass( "ui-state-focus" );
+ // Only update aria-activedescendant if there's a role
+ // otherwise we assume focus is managed elsewhere
+ if ( this.options.role ) {
+ this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
+ }
+
+ // Highlight active parent menu item, if any
+ this.active
+ .parent()
+ .closest( ".ui-menu-item" )
+ .children( "a:first" )
+ .addClass( "ui-state-active" );
+
+ if ( event && event.type === "keydown" ) {
+ this._close();
+ } else {
+ this.timer = this._delay(function() {
+ this._close();
+ }, this.delay );
+ }
+
+ nested = item.children( ".ui-menu" );
+ if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
+ this._startOpening(nested);
+ }
+ this.activeMenu = item.parent();
+
+ this._trigger( "focus", event, { item: item } );
+ },
+
+ _scrollIntoView: function( item ) {
+ var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
+ if ( this._hasScroll() ) {
+ borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
+ paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
+ offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
+ scroll = this.activeMenu.scrollTop();
+ elementHeight = this.activeMenu.height();
+ itemHeight = item.height();
+
+ if ( offset < 0 ) {
+ this.activeMenu.scrollTop( scroll + offset );
+ } else if ( offset + itemHeight > elementHeight ) {
+ this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
+ }
+ }
+ },
+
+ blur: function( event, fromFocus ) {
+ if ( !fromFocus ) {
+ clearTimeout( this.timer );
+ }
+
+ if ( !this.active ) {
+ return;
+ }
+
+ this.active.children( "a" ).removeClass( "ui-state-focus" );
+ this.active = null;
+
+ this._trigger( "blur", event, { item: this.active } );
+ },
+
+ _startOpening: function( submenu ) {
+ clearTimeout( this.timer );
+
+ // Don't open if already open fixes a Firefox bug that caused a .5 pixel
+ // shift in the submenu position when mousing over the carat icon
+ if ( submenu.attr( "aria-hidden" ) !== "true" ) {
+ return;
+ }
+
+ this.timer = this._delay(function() {
+ this._close();
+ this._open( submenu );
+ }, this.delay );
+ },
+
+ _open: function( submenu ) {
+ var position = $.extend({
+ of: this.active
+ }, this.options.position );
+
+ clearTimeout( this.timer );
+ this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
+ .hide()
+ .attr( "aria-hidden", "true" );
+
+ submenu
+ .show()
+ .removeAttr( "aria-hidden" )
+ .attr( "aria-expanded", "true" )
+ .position( position );
+ },
+
+ collapseAll: function( event, all ) {
+ clearTimeout( this.timer );
+ this.timer = this._delay(function() {
+ // If we were passed an event, look for the submenu that contains the event
+ var currentMenu = all ? this.element :
+ $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
+
+ // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
+ if ( !currentMenu.length ) {
+ currentMenu = this.element;
+ }
+
+ this._close( currentMenu );
+
+ this.blur( event );
+ this.activeMenu = currentMenu;
+ }, this.delay );
+ },
+
+ // With no arguments, closes the currently active menu - if nothing is active
+ // it closes all menus. If passed an argument, it will search for menus BELOW
+ _close: function( startMenu ) {
+ if ( !startMenu ) {
+ startMenu = this.active ? this.active.parent() : this.element;
+ }
+
+ startMenu
+ .find( ".ui-menu" )
+ .hide()
+ .attr( "aria-hidden", "true" )
+ .attr( "aria-expanded", "false" )
+ .end()
+ .find( "a.ui-state-active" )
+ .removeClass( "ui-state-active" );
+ },
+
+ collapse: function( event ) {
+ var newItem = this.active &&
+ this.active.parent().closest( ".ui-menu-item", this.element );
+ if ( newItem && newItem.length ) {
+ this._close();
+ this.focus( event, newItem );
+ }
+ },
+
+ expand: function( event ) {
+ var newItem = this.active &&
+ this.active
+ .children( ".ui-menu " )
+ .children( ".ui-menu-item" )
+ .first();
+
+ if ( newItem && newItem.length ) {
+ this._open( newItem.parent() );
+
+ // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
+ this._delay(function() {
+ this.focus( event, newItem );
+ });
+ }
+ },
+
+ next: function( event ) {
+ this._move( "next", "first", event );
+ },
+
+ previous: function( event ) {
+ this._move( "prev", "last", event );
+ },
+
+ isFirstItem: function() {
+ return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
+ },
+
+ isLastItem: function() {
+ return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
+ },
+
+ _move: function( direction, filter, event ) {
+ var next;
+ if ( this.active ) {
+ if ( direction === "first" || direction === "last" ) {
+ next = this.active
+ [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
+ .eq( -1 );
+ } else {
+ next = this.active
+ [ direction + "All" ]( ".ui-menu-item" )
+ .eq( 0 );
+ }
+ }
+ if ( !next || !next.length || !this.active ) {
+ next = this.activeMenu.children( ".ui-menu-item" )[ filter ]();
+ }
+
+ this.focus( event, next );
+ },
+
+ nextPage: function( event ) {
+ var item, base, height;
+
+ if ( !this.active ) {
+ this.next( event );
+ return;
+ }
+ if ( this.isLastItem() ) {
+ return;
+ }
+ if ( this._hasScroll() ) {
+ base = this.active.offset().top;
+ height = this.element.height();
+ this.active.nextAll( ".ui-menu-item" ).each(function() {
+ item = $( this );
+ return item.offset().top - base - height < 0;
+ });
+
+ this.focus( event, item );
+ } else {
+ this.focus( event, this.activeMenu.children( ".ui-menu-item" )
+ [ !this.active ? "first" : "last" ]() );
+ }
+ },
+
+ previousPage: function( event ) {
+ var item, base, height;
+ if ( !this.active ) {
+ this.next( event );
+ return;
+ }
+ if ( this.isFirstItem() ) {
+ return;
+ }
+ if ( this._hasScroll() ) {
+ base = this.active.offset().top;
+ height = this.element.height();
+ this.active.prevAll( ".ui-menu-item" ).each(function() {
+ item = $( this );
+ return item.offset().top - base + height > 0;
+ });
+
+ this.focus( event, item );
+ } else {
+ this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() );
+ }
+ },
+
+ _hasScroll: function() {
+ return this.element.outerHeight() < this.element.prop( "scrollHeight" );
+ },
+
+ select: function( event ) {
+ // TODO: It should never be possible to not have an active item at this
+ // point, but the tests don't trigger mouseenter before click.
+ this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
+ var ui = { item: this.active };
+ if ( !this.active.has( ".ui-menu" ).length ) {
+ this.collapseAll( event, true );
+ }
+ this._trigger( "select", event, ui );
+ }
+});
+
+}( jQuery ));
+(function( $, undefined ) {
+
+$.widget( "ui.progressbar", {
+ version: "1.9.2",
+ options: {
+ value: 0,
+ max: 100
+ },
+
+ min: 0,
+
+ _create: function() {
+ this.element
+ .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
+ .attr({
+ role: "progressbar",
+ "aria-valuemin": this.min,
+ "aria-valuemax": this.options.max,
+ "aria-valuenow": this._value()
+ });
+
+ this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
+ .appendTo( this.element );
+
+ this.oldValue = this._value();
+ this._refreshValue();
+ },
+
+ _destroy: function() {
+ this.element
+ .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
+ .removeAttr( "role" )
+ .removeAttr( "aria-valuemin" )
+ .removeAttr( "aria-valuemax" )
+ .removeAttr( "aria-valuenow" );
+
+ this.valueDiv.remove();
+ },
+
+ value: function( newValue ) {
+ if ( newValue === undefined ) {
+ return this._value();
+ }
+
+ this._setOption( "value", newValue );
+ return this;
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "value" ) {
+ this.options.value = value;
+ this._refreshValue();
+ if ( this._value() === this.options.max ) {
+ this._trigger( "complete" );
+ }
+ }
+
+ this._super( key, value );
+ },
+
+ _value: function() {
+ var val = this.options.value;
+ // normalize invalid value
+ if ( typeof val !== "number" ) {
+ val = 0;
+ }
+ return Math.min( this.options.max, Math.max( this.min, val ) );
+ },
+
+ _percentage: function() {
+ return 100 * this._value() / this.options.max;
+ },
+
+ _refreshValue: function() {
+ var value = this.value(),
+ percentage = this._percentage();
+
+ if ( this.oldValue !== value ) {
+ this.oldValue = value;
+ this._trigger( "change" );
+ }
+
+ this.valueDiv
+ .toggle( value > this.min )
+ .toggleClass( "ui-corner-right", value === this.options.max )
+ .width( percentage.toFixed(0) + "%" );
+ this.element.attr( "aria-valuenow", value );
+ }
+});
+
+})( jQuery );
+(function( $, undefined ) {
+
+$.widget("ui.resizable", $.ui.mouse, {
+ version: "1.9.2",
+ widgetEventPrefix: "resize",
+ options: {
+ alsoResize: false,
+ animate: false,
+ animateDuration: "slow",
+ animateEasing: "swing",
+ aspectRatio: false,
+ autoHide: false,
+ containment: false,
+ ghost: false,
+ grid: false,
+ handles: "e,s,se",
+ helper: false,
+ maxHeight: null,
+ maxWidth: null,
+ minHeight: 10,
+ minWidth: 10,
+ zIndex: 1000
+ },
+ _create: function() {
+
+ var that = this, o = this.options;
+ this.element.addClass("ui-resizable");
+
+ $.extend(this, {
+ _aspectRatio: !!(o.aspectRatio),
+ aspectRatio: o.aspectRatio,
+ originalElement: this.element,
+ _proportionallyResizeElements: [],
+ _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null
+ });
+
+ //Wrap the element if it cannot hold child nodes
+ if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+
+ //Create a wrapper element and set the wrapper to the new current internal element
+ this.element.wrap(
+ $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
+ position: this.element.css('position'),
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight(),
+ top: this.element.css('top'),
+ left: this.element.css('left')
+ })
+ );
+
+ //Overwrite the original this.element
+ this.element = this.element.parent().data(
+ "resizable", this.element.data('resizable')
+ );
+
+ this.elementIsWrapper = true;
+
+ //Move margins to the wrapper
+ this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
+ this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
+
+ //Prevent Safari textarea resize
+ this.originalResizeStyle = this.originalElement.css('resize');
+ this.originalElement.css('resize', 'none');
+
+ //Push the actual element to our proportionallyResize internal array
+ this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
+
+ // avoid IE jump (hard set the margin)
+ this.originalElement.css({ margin: this.originalElement.css('margin') });
+
+ // fix handlers offset
+ this._proportionallyResize();
+
+ }
+
+ this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
+ if(this.handles.constructor == String) {
+
+ if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';
+ var n = this.handles.split(","); this.handles = {};
+
+ for(var i = 0; i < n.length; i++) {
+
+ var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
+ var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
+
+ // Apply zIndex to all handles - see #7960
+ axis.css({ zIndex: o.zIndex });
+
+ //TODO : What's going on here?
+ if ('se' == handle) {
+ axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');
+ };
+
+ //Insert into internal handles object and append to element
+ this.handles[handle] = '.ui-resizable-'+handle;
+ this.element.append(axis);
+ }
+
+ }
+
+ this._renderAxis = function(target) {
+
+ target = target || this.element;
+
+ for(var i in this.handles) {
+
+ if(this.handles[i].constructor == String)
+ this.handles[i] = $(this.handles[i], this.element).show();
+
+ //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
+ if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+
+ var axis = $(this.handles[i], this.element), padWrapper = 0;
+
+ //Checking the correct pad and border
+ padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
+
+ //The padding type i have to apply...
+ var padPos = [ 'padding',
+ /ne|nw|n/.test(i) ? 'Top' :
+ /se|sw|s/.test(i) ? 'Bottom' :
+ /^e$/.test(i) ? 'Right' : 'Left' ].join("");
+
+ target.css(padPos, padWrapper);
+
+ this._proportionallyResize();
+
+ }
+
+ //TODO: What's that good for? There's not anything to be executed left
+ if(!$(this.handles[i]).length)
+ continue;
+
+ }
+ };
+
+ //TODO: make renderAxis a prototype function
+ this._renderAxis(this.element);
+
+ this._handles = $('.ui-resizable-handle', this.element)
+ .disableSelection();
+
+ //Matching axis name
+ this._handles.mouseover(function() {
+ if (!that.resizing) {
+ if (this.className)
+ var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+ //Axis, default = se
+ that.axis = axis && axis[1] ? axis[1] : 'se';
+ }
+ });
+
+ //If we want to auto hide the elements
+ if (o.autoHide) {
+ this._handles.hide();
+ $(this.element)
+ .addClass("ui-resizable-autohide")
+ .mouseenter(function() {
+ if (o.disabled) return;
+ $(this).removeClass("ui-resizable-autohide");
+ that._handles.show();
+ })
+ .mouseleave(function(){
+ if (o.disabled) return;
+ if (!that.resizing) {
+ $(this).addClass("ui-resizable-autohide");
+ that._handles.hide();
+ }
+ });
+ }
+
+ //Initialize the mouse interaction
+ this._mouseInit();
+
+ },
+
+ _destroy: function() {
+
+ this._mouseDestroy();
+
+ var _destroy = function(exp) {
+ $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
+ .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
+ };
+
+ //TODO: Unwrap at same DOM position
+ if (this.elementIsWrapper) {
+ _destroy(this.element);
+ var wrapper = this.element;
+ this.originalElement.css({
+ position: wrapper.css('position'),
+ width: wrapper.outerWidth(),
+ height: wrapper.outerHeight(),
+ top: wrapper.css('top'),
+ left: wrapper.css('left')
+ }).insertAfter( wrapper );
+ wrapper.remove();
+ }
+
+ this.originalElement.css('resize', this.originalResizeStyle);
+ _destroy(this.originalElement);
+
+ return this;
+ },
+
+ _mouseCapture: function(event) {
+ var handle = false;
+ for (var i in this.handles) {
+ if ($(this.handles[i])[0] == event.target) {
+ handle = true;
+ }
+ }
+
+ return !this.options.disabled && handle;
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options, iniPos = this.element.position(), el = this.element;
+
+ this.resizing = true;
+ this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
+
+ // bugfix for http://dev.jquery.com/ticket/1749
+ if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
+ el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
+ }
+
+ this._renderProxy();
+
+ var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
+
+ if (o.containment) {
+ curleft += $(o.containment).scrollLeft() || 0;
+ curtop += $(o.containment).scrollTop() || 0;
+ }
+
+ //Store needed variables
+ this.offset = this.helper.offset();
+ this.position = { left: curleft, top: curtop };
+ this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalPosition = { left: curleft, top: curtop };
+ this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
+ this.originalMousePosition = { left: event.pageX, top: event.pageY };
+
+ //Aspect Ratio
+ this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
+
+ var cursor = $('.ui-resizable-' + this.axis).css('cursor');
+ $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
+
+ el.addClass("ui-resizable-resizing");
+ this._propagate("start", event);
+ return true;
+ },
+
+ _mouseDrag: function(event) {
+
+ //Increase performance, avoid regex
+ var el = this.helper, o = this.options, props = {},
+ that = this, smp = this.originalMousePosition, a = this.axis;
+
+ var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
+ var trigger = this._change[a];
+ if (!trigger) return false;
+
+ // Calculate the attrs that will be change
+ var data = trigger.apply(this, [event, dx, dy]);
+
+ // Put this in the mouseDrag handler since the user can start pressing shift while resizing
+ this._updateVirtualBoundaries(event.shiftKey);
+ if (this._aspectRatio || event.shiftKey)
+ data = this._updateRatio(data, event);
+
+ data = this._respectSize(data, event);
+
+ // plugins callbacks need to be called first
+ this._propagate("resize", event);
+
+ el.css({
+ top: this.position.top + "px", left: this.position.left + "px",
+ width: this.size.width + "px", height: this.size.height + "px"
+ });
+
+ if (!this._helper && this._proportionallyResizeElements.length)
+ this._proportionallyResize();
+
+ this._updateCache(data);
+
+ // calling the user callback at the end
+ this._trigger('resize', event, this.ui());
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ this.resizing = false;
+ var o = this.options, that = this;
+
+ if(this._helper) {
+ var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
+ soffsetw = ista ? 0 : that.sizeDiff.width;
+
+ var s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) },
+ left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
+ top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
+
+ if (!o.animate)
+ this.element.css($.extend(s, { top: top, left: left }));
+
+ that.helper.height(that.size.height);
+ that.helper.width(that.size.width);
+
+ if (this._helper && !o.animate) this._proportionallyResize();
+ }
+
+ $('body').css('cursor', 'auto');
+
+ this.element.removeClass("ui-resizable-resizing");
+
+ this._propagate("stop", event);
+
+ if (this._helper) this.helper.remove();
+ return false;
+
+ },
+
+ _updateVirtualBoundaries: function(forceAspectRatio) {
+ var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b;
+
+ b = {
+ minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
+ maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
+ minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
+ maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
+ };
+
+ if(this._aspectRatio || forceAspectRatio) {
+ // We want to create an enclosing box whose aspect ration is the requested one
+ // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
+ pMinWidth = b.minHeight * this.aspectRatio;
+ pMinHeight = b.minWidth / this.aspectRatio;
+ pMaxWidth = b.maxHeight * this.aspectRatio;
+ pMaxHeight = b.maxWidth / this.aspectRatio;
+
+ if(pMinWidth > b.minWidth) b.minWidth = pMinWidth;
+ if(pMinHeight > b.minHeight) b.minHeight = pMinHeight;
+ if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth;
+ if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight;
+ }
+ this._vBoundaries = b;
+ },
+
+ _updateCache: function(data) {
+ var o = this.options;
+ this.offset = this.helper.offset();
+ if (isNumber(data.left)) this.position.left = data.left;
+ if (isNumber(data.top)) this.position.top = data.top;
+ if (isNumber(data.height)) this.size.height = data.height;
+ if (isNumber(data.width)) this.size.width = data.width;
+ },
+
+ _updateRatio: function(data, event) {
+
+ var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
+
+ if (isNumber(data.height)) data.width = (data.height * this.aspectRatio);
+ else if (isNumber(data.width)) data.height = (data.width / this.aspectRatio);
+
+ if (a == 'sw') {
+ data.left = cpos.left + (csize.width - data.width);
+ data.top = null;
+ }
+ if (a == 'nw') {
+ data.top = cpos.top + (csize.height - data.height);
+ data.left = cpos.left + (csize.width - data.width);
+ }
+
+ return data;
+ },
+
+ _respectSize: function(data, event) {
+
+ var el = this.helper, o = this._vBoundaries, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
+ ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
+ isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
+
+ if (isminw) data.width = o.minWidth;
+ if (isminh) data.height = o.minHeight;
+ if (ismaxw) data.width = o.maxWidth;
+ if (ismaxh) data.height = o.maxHeight;
+
+ var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
+ var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
+
+ if (isminw && cw) data.left = dw - o.minWidth;
+ if (ismaxw && cw) data.left = dw - o.maxWidth;
+ if (isminh && ch) data.top = dh - o.minHeight;
+ if (ismaxh && ch) data.top = dh - o.maxHeight;
+
+ // fixing jump error on top/left - bug #2330
+ var isNotwh = !data.width && !data.height;
+ if (isNotwh && !data.left && data.top) data.top = null;
+ else if (isNotwh && !data.top && data.left) data.left = null;
+
+ return data;
+ },
+
+ _proportionallyResize: function() {
+
+ var o = this.options;
+ if (!this._proportionallyResizeElements.length) return;
+ var element = this.helper || this.element;
+
+ for (var i=0; i < this._proportionallyResizeElements.length; i++) {
+
+ var prel = this._proportionallyResizeElements[i];
+
+ if (!this.borderDif) {
+ var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
+ p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
+
+ this.borderDif = $.map(b, function(v, i) {
+ var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
+ return border + padding;
+ });
+ }
+
+ prel.css({
+ height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
+ width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
+ });
+
+ };
+
+ },
+
+ _renderProxy: function() {
+
+ var el = this.element, o = this.options;
+ this.elementOffset = el.offset();
+
+ if(this._helper) {
+
+ this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
+
+ // fix ie6 offset TODO: This seems broken
+ var ie6offset = ($.ui.ie6 ? 1 : 0),
+ pxyoffset = ( $.ui.ie6 ? 2 : -1 );
+
+ this.helper.addClass(this._helper).css({
+ width: this.element.outerWidth() + pxyoffset,
+ height: this.element.outerHeight() + pxyoffset,
+ position: 'absolute',
+ left: this.elementOffset.left - ie6offset +'px',
+ top: this.elementOffset.top - ie6offset +'px',
+ zIndex: ++o.zIndex //TODO: Don't modify option
+ });
+
+ this.helper
+ .appendTo("body")
+ .disableSelection();
+
+ } else {
+ this.helper = this.element;
+ }
+
+ },
+
+ _change: {
+ e: function(event, dx, dy) {
+ return { width: this.originalSize.width + dx };
+ },
+ w: function(event, dx, dy) {
+ var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+ return { left: sp.left + dx, width: cs.width - dx };
+ },
+ n: function(event, dx, dy) {
+ var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+ return { top: sp.top + dy, height: cs.height - dy };
+ },
+ s: function(event, dx, dy) {
+ return { height: this.originalSize.height + dy };
+ },
+ se: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ sw: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ },
+ ne: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ nw: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ }
+ },
+
+ _propagate: function(n, event) {
+ $.ui.plugin.call(this, n, [event, this.ui()]);
+ (n != "resize" && this._trigger(n, event, this.ui()));
+ },
+
+ plugins: {},
+
+ ui: function() {
+ return {
+ originalElement: this.originalElement,
+ element: this.element,
+ helper: this.helper,
+ position: this.position,
+ size: this.size,
+ originalSize: this.originalSize,
+ originalPosition: this.originalPosition
+ };
+ }
+
+});
+
+/*
+ * Resizable Extensions
+ */
+
+$.ui.plugin.add("resizable", "alsoResize", {
+
+ start: function (event, ui) {
+ var that = $(this).data("resizable"), o = that.options;
+
+ var _store = function (exp) {
+ $(exp).each(function() {
+ var el = $(this);
+ el.data("resizable-alsoresize", {
+ width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
+ left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10)
+ });
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
+ if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
+ else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
+ }else{
+ _store(o.alsoResize);
+ }
+ },
+
+ resize: function (event, ui) {
+ var that = $(this).data("resizable"), o = that.options, os = that.originalSize, op = that.originalPosition;
+
+ var delta = {
+ height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
+ top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
+ },
+
+ _alsoResize = function (exp, c) {
+ $(exp).each(function() {
+ var el = $(this), start = $(this).data("resizable-alsoresize"), style = {},
+ css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ['width', 'height'] : ['width', 'height', 'top', 'left'];
+
+ $.each(css, function (i, prop) {
+ var sum = (start[prop]||0) + (delta[prop]||0);
+ if (sum && sum >= 0)
+ style[prop] = sum || null;
+ });
+
+ el.css(style);
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
+ $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
+ }else{
+ _alsoResize(o.alsoResize);
+ }
+ },
+
+ stop: function (event, ui) {
+ $(this).removeData("resizable-alsoresize");
+ }
+});
+
+$.ui.plugin.add("resizable", "animate", {
+
+ stop: function(event, ui) {
+ var that = $(this).data("resizable"), o = that.options;
+
+ var pr = that._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
+ soffsetw = ista ? 0 : that.sizeDiff.width;
+
+ var style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
+ left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
+ top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
+
+ that.element.animate(
+ $.extend(style, top && left ? { top: top, left: left } : {}), {
+ duration: o.animateDuration,
+ easing: o.animateEasing,
+ step: function() {
+
+ var data = {
+ width: parseInt(that.element.css('width'), 10),
+ height: parseInt(that.element.css('height'), 10),
+ top: parseInt(that.element.css('top'), 10),
+ left: parseInt(that.element.css('left'), 10)
+ };
+
+ if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
+
+ // propagating resize, and updating values for each animation step
+ that._updateCache(data);
+ that._propagate("resize", event);
+
+ }
+ }
+ );
+ }
+
+});
+
+$.ui.plugin.add("resizable", "containment", {
+
+ start: function(event, ui) {
+ var that = $(this).data("resizable"), o = that.options, el = that.element;
+ var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
+ if (!ce) return;
+
+ that.containerElement = $(ce);
+
+ if (/document/.test(oc) || oc == document) {
+ that.containerOffset = { left: 0, top: 0 };
+ that.containerPosition = { left: 0, top: 0 };
+
+ that.parentData = {
+ element: $(document), left: 0, top: 0,
+ width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
+ };
+ }
+
+ // i'm a node, so compute top, left, right, bottom
+ else {
+ var element = $(ce), p = [];
+ $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
+
+ that.containerOffset = element.offset();
+ that.containerPosition = element.position();
+ that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
+
+ var co = that.containerOffset, ch = that.containerSize.height, cw = that.containerSize.width,
+ width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
+
+ that.parentData = {
+ element: ce, left: co.left, top: co.top, width: width, height: height
+ };
+ }
+ },
+
+ resize: function(event, ui) {
+ var that = $(this).data("resizable"), o = that.options,
+ ps = that.containerSize, co = that.containerOffset, cs = that.size, cp = that.position,
+ pRatio = that._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = that.containerElement;
+
+ if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
+
+ if (cp.left < (that._helper ? co.left : 0)) {
+ that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
+ if (pRatio) that.size.height = that.size.width / that.aspectRatio;
+ that.position.left = o.helper ? co.left : 0;
+ }
+
+ if (cp.top < (that._helper ? co.top : 0)) {
+ that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
+ if (pRatio) that.size.width = that.size.height * that.aspectRatio;
+ that.position.top = that._helper ? co.top : 0;
+ }
+
+ that.offset.left = that.parentData.left+that.position.left;
+ that.offset.top = that.parentData.top+that.position.top;
+
+ var woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ),
+ hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
+
+ var isParent = that.containerElement.get(0) == that.element.parent().get(0),
+ isOffsetRelative = /relative|absolute/.test(that.containerElement.css('position'));
+
+ if(isParent && isOffsetRelative) woset -= that.parentData.left;
+
+ if (woset + that.size.width >= that.parentData.width) {
+ that.size.width = that.parentData.width - woset;
+ if (pRatio) that.size.height = that.size.width / that.aspectRatio;
+ }
+
+ if (hoset + that.size.height >= that.parentData.height) {
+ that.size.height = that.parentData.height - hoset;
+ if (pRatio) that.size.width = that.size.height * that.aspectRatio;
+ }
+ },
+
+ stop: function(event, ui){
+ var that = $(this).data("resizable"), o = that.options, cp = that.position,
+ co = that.containerOffset, cop = that.containerPosition, ce = that.containerElement;
+
+ var helper = $(that.helper), ho = helper.offset(), w = helper.outerWidth() - that.sizeDiff.width, h = helper.outerHeight() - that.sizeDiff.height;
+
+ if (that._helper && !o.animate && (/relative/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ if (that._helper && !o.animate && (/static/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ }
+});
+
+$.ui.plugin.add("resizable", "ghost", {
+
+ start: function(event, ui) {
+
+ var that = $(this).data("resizable"), o = that.options, cs = that.size;
+
+ that.ghost = that.originalElement.clone();
+ that.ghost
+ .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
+ .addClass('ui-resizable-ghost')
+ .addClass(typeof o.ghost == 'string' ? o.ghost : '');
+
+ that.ghost.appendTo(that.helper);
+
+ },
+
+ resize: function(event, ui){
+ var that = $(this).data("resizable"), o = that.options;
+ if (that.ghost) that.ghost.css({ position: 'relative', height: that.size.height, width: that.size.width });
+ },
+
+ stop: function(event, ui){
+ var that = $(this).data("resizable"), o = that.options;
+ if (that.ghost && that.helper) that.helper.get(0).removeChild(that.ghost.get(0));
+ }
+
+});
+
+$.ui.plugin.add("resizable", "grid", {
+
+ resize: function(event, ui) {
+ var that = $(this).data("resizable"), o = that.options, cs = that.size, os = that.originalSize, op = that.originalPosition, a = that.axis, ratio = o._aspectRatio || event.shiftKey;
+ o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
+ var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
+
+ if (/^(se|s|e)$/.test(a)) {
+ that.size.width = os.width + ox;
+ that.size.height = os.height + oy;
+ }
+ else if (/^(ne)$/.test(a)) {
+ that.size.width = os.width + ox;
+ that.size.height = os.height + oy;
+ that.position.top = op.top - oy;
+ }
+ else if (/^(sw)$/.test(a)) {
+ that.size.width = os.width + ox;
+ that.size.height = os.height + oy;
+ that.position.left = op.left - ox;
+ }
+ else {
+ that.size.width = os.width + ox;
+ that.size.height = os.height + oy;
+ that.position.top = op.top - oy;
+ that.position.left = op.left - ox;
+ }
+ }
+
+});
+
+var num = function(v) {
+ return parseInt(v, 10) || 0;
+};
+
+var isNumber = function(value) {
+ return !isNaN(parseInt(value, 10));
+};
+
+})(jQuery);
+(function( $, undefined ) {
+
+$.widget("ui.selectable", $.ui.mouse, {
+ version: "1.9.2",
+ options: {
+ appendTo: 'body',
+ autoRefresh: true,
+ distance: 0,
+ filter: '*',
+ tolerance: 'touch'
+ },
+ _create: function() {
+ var that = this;
+
+ this.element.addClass("ui-selectable");
+
+ this.dragged = false;
+
+ // cache selectee children based on filter
+ var selectees;
+ this.refresh = function() {
+ selectees = $(that.options.filter, that.element[0]);
+ selectees.addClass("ui-selectee");
+ selectees.each(function() {
+ var $this = $(this);
+ var pos = $this.offset();
+ $.data(this, "selectable-item", {
+ element: this,
+ $element: $this,
+ left: pos.left,
+ top: pos.top,
+ right: pos.left + $this.outerWidth(),
+ bottom: pos.top + $this.outerHeight(),
+ startselected: false,
+ selected: $this.hasClass('ui-selected'),
+ selecting: $this.hasClass('ui-selecting'),
+ unselecting: $this.hasClass('ui-unselecting')
+ });
+ });
+ };
+ this.refresh();
+
+ this.selectees = selectees.addClass("ui-selectee");
+
+ this._mouseInit();
+
+ this.helper = $("<div class='ui-selectable-helper'></div>");
+ },
+
+ _destroy: function() {
+ this.selectees
+ .removeClass("ui-selectee")
+ .removeData("selectable-item");
+ this.element
+ .removeClass("ui-selectable ui-selectable-disabled");
+ this._mouseDestroy();
+ },
+
+ _mouseStart: function(event) {
+ var that = this;
+
+ this.opos = [event.pageX, event.pageY];
+
+ if (this.options.disabled)
+ return;
+
+ var options = this.options;
+
+ this.selectees = $(options.filter, this.element[0]);
+
+ this._trigger("start", event);
+
+ $(options.appendTo).append(this.helper);
+ // position helper (lasso)
+ this.helper.css({
+ "left": event.clientX,
+ "top": event.clientY,
+ "width": 0,
+ "height": 0
+ });
+
+ if (options.autoRefresh) {
+ this.refresh();
+ }
+
+ this.selectees.filter('.ui-selected').each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.startselected = true;
+ if (!event.metaKey && !event.ctrlKey) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ });
+
+ $(event.target).parents().andSelf().each(function() {
+ var selectee = $.data(this, "selectable-item");
+ if (selectee) {
+ var doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass('ui-selected');
+ selectee.$element
+ .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
+ .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
+ selectee.unselecting = !doSelect;
+ selectee.selecting = doSelect;
+ selectee.selected = doSelect;
+ // selectable (UN)SELECTING callback
+ if (doSelect) {
+ that._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ } else {
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ return false;
+ }
+ });
+
+ },
+
+ _mouseDrag: function(event) {
+ var that = this;
+ this.dragged = true;
+
+ if (this.options.disabled)
+ return;
+
+ var options = this.options;
+
+ var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY;
+ if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
+ if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
+ this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
+
+ this.selectees.each(function() {
+ var selectee = $.data(this, "selectable-item");
+ //prevent helper from being selected if appendTo: selectable
+ if (!selectee || selectee.element == that.element[0])
+ return;
+ var hit = false;
+ if (options.tolerance == 'touch') {
+ hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
+ } else if (options.tolerance == 'fit') {
+ hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
+ }
+
+ if (hit) {
+ // SELECT
+ if (selectee.selected) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+ }
+ if (selectee.unselecting) {
+ selectee.$element.removeClass('ui-unselecting');
+ selectee.unselecting = false;
+ }
+ if (!selectee.selecting) {
+ selectee.$element.addClass('ui-selecting');
+ selectee.selecting = true;
+ // selectable SELECTING callback
+ that._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ }
+ } else {
+ // UNSELECT
+ if (selectee.selecting) {
+ if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
+ selectee.$element.removeClass('ui-selecting');
+ selectee.selecting = false;
+ selectee.$element.addClass('ui-selected');
+ selectee.selected = true;
+ } else {
+ selectee.$element.removeClass('ui-selecting');
+ selectee.selecting = false;
+ if (selectee.startselected) {
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ }
+ // selectable UNSELECTING callback
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ if (selectee.selected) {
+ if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ that._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ }
+ });
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+ var that = this;
+
+ this.dragged = false;
+
+ var options = this.options;
+
+ $('.ui-unselecting', this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass('ui-unselecting');
+ selectee.unselecting = false;
+ selectee.startselected = false;
+ that._trigger("unselected", event, {
+ unselected: selectee.element
+ });
+ });
+ $('.ui-selecting', this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass('ui-selecting').addClass('ui-selected');
+ selectee.selecting = false;
+ selectee.selected = true;
+ selectee.startselected = true;
+ that._trigger("selected", event, {
+ selected: selectee.element
+ });
+ });
+ this._trigger("stop", event);
+
+ this.helper.remove();
+
+ return false;
+ }
+
+});
+
+})(jQuery);
+(function( $, undefined ) {
+
+// number of pages in a slider
+// (how many times can you page up/down to go through the whole range)
+var numPages = 5;
+
+$.widget( "ui.slider", $.ui.mouse, {
+ version: "1.9.2",
+ widgetEventPrefix: "slide",
+
+ options: {
+ animate: false,
+ distance: 0,
+ max: 100,
+ min: 0,
+ orientation: "horizontal",
+ range: false,
+ step: 1,
+ value: 0,
+ values: null
+ },
+
+ _create: function() {
+ var i, handleCount,
+ o = this.options,
+ existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
+ handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
+ handles = [];
+
+ this._keySliding = false;
+ this._mouseSliding = false;
+ this._animateOff = true;
+ this._handleIndex = null;
+ this._detectOrientation();
+ this._mouseInit();
+
+ this.element
+ .addClass( "ui-slider" +
+ " ui-slider-" + this.orientation +
+ " ui-widget" +
+ " ui-widget-content" +
+ " ui-corner-all" +
+ ( o.disabled ? " ui-slider-disabled ui-disabled" : "" ) );
+
+ this.range = $([]);
+
+ if ( o.range ) {
+ if ( o.range === true ) {
+ if ( !o.values ) {
+ o.values = [ this._valueMin(), this._valueMin() ];
+ }
+ if ( o.values.length && o.values.length !== 2 ) {
+ o.values = [ o.values[0], o.values[0] ];
+ }
+ }
+
+ this.range = $( "<div></div>" )
+ .appendTo( this.element )
+ .addClass( "ui-slider-range" +
+ // note: this isn't the most fittingly semantic framework class for this element,
+ // but worked best visually with a variety of themes
+ " ui-widget-header" +
+ ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) );
+ }
+
+ handleCount = ( o.values && o.values.length ) || 1;
+
+ for ( i = existingHandles.length; i < handleCount; i++ ) {
+ handles.push( handle );
+ }
+
+ this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
+
+ this.handle = this.handles.eq( 0 );
+
+ this.handles.add( this.range ).filter( "a" )
+ .click(function( event ) {
+ event.preventDefault();
+ })
+ .mouseenter(function() {
+ if ( !o.disabled ) {
+ $( this ).addClass( "ui-state-hover" );
+ }
+ })
+ .mouseleave(function() {
+ $( this ).removeClass( "ui-state-hover" );
+ })
+ .focus(function() {
+ if ( !o.disabled ) {
+ $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" );
+ $( this ).addClass( "ui-state-focus" );
+ } else {
+ $( this ).blur();
+ }
+ })
+ .blur(function() {
+ $( this ).removeClass( "ui-state-focus" );
+ });
+
+ this.handles.each(function( i ) {
+ $( this ).data( "ui-slider-handle-index", i );
+ });
+
+ this._on( this.handles, {
+ keydown: function( event ) {
+ var allowed, curVal, newVal, step,
+ index = $( event.target ).data( "ui-slider-handle-index" );
+
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.HOME:
+ case $.ui.keyCode.END:
+ case $.ui.keyCode.PAGE_UP:
+ case $.ui.keyCode.PAGE_DOWN:
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ event.preventDefault();
+ if ( !this._keySliding ) {
+ this._keySliding = true;
+ $( event.target ).addClass( "ui-state-active" );
+ allowed = this._start( event, index );
+ if ( allowed === false ) {
+ return;
+ }
+ }
+ break;
+ }
+
+ step = this.options.step;
+ if ( this.options.values && this.options.values.length ) {
+ curVal = newVal = this.values( index );
+ } else {
+ curVal = newVal = this.value();
+ }
+
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.HOME:
+ newVal = this._valueMin();
+ break;
+ case $.ui.keyCode.END:
+ newVal = this._valueMax();
+ break;
+ case $.ui.keyCode.PAGE_UP:
+ newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
+ break;
+ case $.ui.keyCode.PAGE_DOWN:
+ newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
+ break;
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ if ( curVal === this._valueMax() ) {
+ return;
+ }
+ newVal = this._trimAlignValue( curVal + step );
+ break;
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ if ( curVal === this._valueMin() ) {
+ return;
+ }
+ newVal = this._trimAlignValue( curVal - step );
+ break;
+ }
+
+ this._slide( event, index, newVal );
+ },
+ keyup: function( event ) {
+ var index = $( event.target ).data( "ui-slider-handle-index" );
+
+ if ( this._keySliding ) {
+ this._keySliding = false;
+ this._stop( event, index );
+ this._change( event, index );
+ $( event.target ).removeClass( "ui-state-active" );
+ }
+ }
+ });
+
+ this._refreshValue();
+
+ this._animateOff = false;
+ },
+
+ _destroy: function() {
+ this.handles.remove();
+ this.range.remove();
+
+ this.element
+ .removeClass( "ui-slider" +
+ " ui-slider-horizontal" +
+ " ui-slider-vertical" +
+ " ui-slider-disabled" +
+ " ui-widget" +
+ " ui-widget-content" +
+ " ui-corner-all" );
+
+ this._mouseDestroy();
+ },
+
+ _mouseCapture: function( event ) {
+ var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
+ that = this,
+ o = this.options;
+
+ if ( o.disabled ) {
+ return false;
+ }
+
+ this.elementSize = {
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight()
+ };
+ this.elementOffset = this.element.offset();
+
+ position = { x: event.pageX, y: event.pageY };
+ normValue = this._normValueFromMouse( position );
+ distance = this._valueMax() - this._valueMin() + 1;
+ this.handles.each(function( i ) {
+ var thisDistance = Math.abs( normValue - that.values(i) );
+ if ( distance > thisDistance ) {
+ distance = thisDistance;
+ closestHandle = $( this );
+ index = i;
+ }
+ });
+
+ // workaround for bug #3736 (if both handles of a range are at 0,
+ // the first is always used as the one with least distance,
+ // and moving it is obviously prevented by preventing negative ranges)
+ if( o.range === true && this.values(1) === o.min ) {
+ index += 1;
+ closestHandle = $( this.handles[index] );
+ }
+
+ allowed = this._start( event, index );
+ if ( allowed === false ) {
+ return false;
+ }
+ this._mouseSliding = true;
+
+ this._handleIndex = index;
+
+ closestHandle
+ .addClass( "ui-state-active" )
+ .focus();
+
+ offset = closestHandle.offset();
+ mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" );
+ this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
+ left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
+ top: event.pageY - offset.top -
+ ( closestHandle.height() / 2 ) -
+ ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
+ ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
+ ( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
+ };
+
+ if ( !this.handles.hasClass( "ui-state-hover" ) ) {
+ this._slide( event, index, normValue );
+ }
+ this._animateOff = true;
+ return true;
+ },
+
+ _mouseStart: function() {
+ return true;
+ },
+
+ _mouseDrag: function( event ) {
+ var position = { x: event.pageX, y: event.pageY },
+ normValue = this._normValueFromMouse( position );
+
+ this._slide( event, this._handleIndex, normValue );
+
+ return false;
+ },
+
+ _mouseStop: function( event ) {
+ this.handles.removeClass( "ui-state-active" );
+ this._mouseSliding = false;
+
+ this._stop( event, this._handleIndex );
+ this._change( event, this._handleIndex );
+
+ this._handleIndex = null;
+ this._clickOffset = null;
+ this._animateOff = false;
+
+ return false;
+ },
+
+ _detectOrientation: function() {
+ this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
+ },
+
+ _normValueFromMouse: function( position ) {
+ var pixelTotal,
+ pixelMouse,
+ percentMouse,
+ valueTotal,
+ valueMouse;
+
+ if ( this.orientation === "horizontal" ) {
+ pixelTotal = this.elementSize.width;
+ pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
+ } else {
+ pixelTotal = this.elementSize.height;
+ pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
+ }
+
+ percentMouse = ( pixelMouse / pixelTotal );
+ if ( percentMouse > 1 ) {
+ percentMouse = 1;
+ }
+ if ( percentMouse < 0 ) {
+ percentMouse = 0;
+ }
+ if ( this.orientation === "vertical" ) {
+ percentMouse = 1 - percentMouse;
+ }
+
+ valueTotal = this._valueMax() - this._valueMin();
+ valueMouse = this._valueMin() + percentMouse * valueTotal;
+
+ return this._trimAlignValue( valueMouse );
+ },
+
+ _start: function( event, index ) {
+ var uiHash = {
+ handle: this.handles[ index ],
+ value: this.value()
+ };
+ if ( this.options.values && this.options.values.length ) {
+ uiHash.value = this.values( index );
+ uiHash.values = this.values();
+ }
+ return this._trigger( "start", event, uiHash );
+ },
+
+ _slide: function( event, index, newVal ) {
+ var otherVal,
+ newValues,
+ allowed;
+
+ if ( this.options.values && this.options.values.length ) {
+ otherVal = this.values( index ? 0 : 1 );
+
+ if ( ( this.options.values.length === 2 && this.options.range === true ) &&
+ ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
+ ) {
+ newVal = otherVal;
+ }
+
+ if ( newVal !== this.values( index ) ) {
+ newValues = this.values();
+ newValues[ index ] = newVal;
+ // A slide can be canceled by returning false from the slide callback
+ allowed = this._trigger( "slide", event, {
+ handle: this.handles[ index ],
+ value: newVal,
+ values: newValues
+ } );
+ otherVal = this.values( index ? 0 : 1 );
+ if ( allowed !== false ) {
+ this.values( index, newVal, true );
+ }
+ }
+ } else {
+ if ( newVal !== this.value() ) {
+ // A slide can be canceled by returning false from the slide callback
+ allowed = this._trigger( "slide", event, {
+ handle: this.handles[ index ],
+ value: newVal
+ } );
+ if ( allowed !== false ) {
+ this.value( newVal );
+ }
+ }
+ }
+ },
+
+ _stop: function( event, index ) {
+ var uiHash = {
+ handle: this.handles[ index ],
+ value: this.value()
+ };
+ if ( this.options.values && this.options.values.length ) {
+ uiHash.value = this.values( index );
+ uiHash.values = this.values();
+ }
+
+ this._trigger( "stop", event, uiHash );
+ },
+
+ _change: function( event, index ) {
+ if ( !this._keySliding && !this._mouseSliding ) {
+ var uiHash = {
+ handle: this.handles[ index ],
+ value: this.value()
+ };
+ if ( this.options.values && this.options.values.length ) {
+ uiHash.value = this.values( index );
+ uiHash.values = this.values();
+ }
+
+ this._trigger( "change", event, uiHash );
+ }
+ },
+
+ value: function( newValue ) {
+ if ( arguments.length ) {
+ this.options.value = this._trimAlignValue( newValue );
+ this._refreshValue();
+ this._change( null, 0 );
+ return;
+ }
+
+ return this._value();
+ },
+
+ values: function( index, newValue ) {
+ var vals,
+ newValues,
+ i;
+
+ if ( arguments.length > 1 ) {
+ this.options.values[ index ] = this._trimAlignValue( newValue );
+ this._refreshValue();
+ this._change( null, index );
+ return;
+ }
+
+ if ( arguments.length ) {
+ if ( $.isArray( arguments[ 0 ] ) ) {
+ vals = this.options.values;
+ newValues = arguments[ 0 ];
+ for ( i = 0; i < vals.length; i += 1 ) {
+ vals[ i ] = this._trimAlignValue( newValues[ i ] );
+ this._change( null, i );
+ }
+ this._refreshValue();
+ } else {
+ if ( this.options.values && this.options.values.length ) {
+ return this._values( index );
+ } else {
+ return this.value();
+ }
+ }
+ } else {
+ return this._values();
+ }
+ },
+
+ _setOption: function( key, value ) {
+ var i,
+ valsLength = 0;
+
+ if ( $.isArray( this.options.values ) ) {
+ valsLength = this.options.values.length;
+ }
+
+ $.Widget.prototype._setOption.apply( this, arguments );
+
+ switch ( key ) {
+ case "disabled":
+ if ( value ) {
+ this.handles.filter( ".ui-state-focus" ).blur();
+ this.handles.removeClass( "ui-state-hover" );
+ this.handles.prop( "disabled", true );
+ this.element.addClass( "ui-disabled" );
+ } else {
+ this.handles.prop( "disabled", false );
+ this.element.removeClass( "ui-disabled" );
+ }
+ break;
+ case "orientation":
+ this._detectOrientation();
+ this.element
+ .removeClass( "ui-slider-horizontal ui-slider-vertical" )
+ .addClass( "ui-slider-" + this.orientation );
+ this._refreshValue();
+ break;
+ case "value":
+ this._animateOff = true;
+ this._refreshValue();
+ this._change( null, 0 );
+ this._animateOff = false;
+ break;
+ case "values":
+ this._animateOff = true;
+ this._refreshValue();
+ for ( i = 0; i < valsLength; i += 1 ) {
+ this._change( null, i );
+ }
+ this._animateOff = false;
+ break;
+ case "min":
+ case "max":
+ this._animateOff = true;
+ this._refreshValue();
+ this._animateOff = false;
+ break;
+ }
+ },
+
+ //internal value getter
+ // _value() returns value trimmed by min and max, aligned by step
+ _value: function() {
+ var val = this.options.value;
+ val = this._trimAlignValue( val );
+
+ return val;
+ },
+
+ //internal values getter
+ // _values() returns array of values trimmed by min and max, aligned by step
+ // _values( index ) returns single value trimmed by min and max, aligned by step
+ _values: function( index ) {
+ var val,
+ vals,
+ i;
+
+ if ( arguments.length ) {
+ val = this.options.values[ index ];
+ val = this._trimAlignValue( val );
+
+ return val;
+ } else {
+ // .slice() creates a copy of the array
+ // this copy gets trimmed by min and max and then returned
+ vals = this.options.values.slice();
+ for ( i = 0; i < vals.length; i+= 1) {
+ vals[ i ] = this._trimAlignValue( vals[ i ] );
+ }
+
+ return vals;
+ }
+ },
+
+ // returns the step-aligned value that val is closest to, between (inclusive) min and max
+ _trimAlignValue: function( val ) {
+ if ( val <= this._valueMin() ) {
+ return this._valueMin();
+ }
+ if ( val >= this._valueMax() ) {
+ return this._valueMax();
+ }
+ var step = ( this.options.step > 0 ) ? this.options.step : 1,
+ valModStep = (val - this._valueMin()) % step,
+ alignValue = val - valModStep;
+
+ if ( Math.abs(valModStep) * 2 >= step ) {
+ alignValue += ( valModStep > 0 ) ? step : ( -step );
+ }
+
+ // Since JavaScript has problems with large floats, round
+ // the final value to 5 digits after the decimal point (see #4124)
+ return parseFloat( alignValue.toFixed(5) );
+ },
+
+ _valueMin: function() {
+ return this.options.min;
+ },
+
+ _valueMax: function() {
+ return this.options.max;
+ },
+
+ _refreshValue: function() {
+ var lastValPercent, valPercent, value, valueMin, valueMax,
+ oRange = this.options.range,
+ o = this.options,
+ that = this,
+ animate = ( !this._animateOff ) ? o.animate : false,
+ _set = {};
+
+ if ( this.options.values && this.options.values.length ) {
+ this.handles.each(function( i ) {
+ valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
+ _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
+ $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
+ if ( that.options.range === true ) {
+ if ( that.orientation === "horizontal" ) {
+ if ( i === 0 ) {
+ that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
+ }
+ if ( i === 1 ) {
+ that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
+ }
+ } else {
+ if ( i === 0 ) {
+ that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
+ }
+ if ( i === 1 ) {
+ that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
+ }
+ }
+ }
+ lastValPercent = valPercent;
+ });
+ } else {
+ value = this.value();
+ valueMin = this._valueMin();
+ valueMax = this._valueMax();
+ valPercent = ( valueMax !== valueMin ) ?
+ ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
+ 0;
+ _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
+ this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
+
+ if ( oRange === "min" && this.orientation === "horizontal" ) {
+ this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
+ }
+ if ( oRange === "max" && this.orientation === "horizontal" ) {
+ this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
+ }
+ if ( oRange === "min" && this.orientation === "vertical" ) {
+ this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
+ }
+ if ( oRange === "max" && this.orientation === "vertical" ) {
+ this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
+ }
+ }
+ }
+
+});
+
+}(jQuery));
+(function( $, undefined ) {
+
+$.widget("ui.sortable", $.ui.mouse, {
+ version: "1.9.2",
+ widgetEventPrefix: "sort",
+ ready: false,
+ options: {
+ appendTo: "parent",
+ axis: false,
+ connectWith: false,
+ containment: false,
+ cursor: 'auto',
+ cursorAt: false,
+ dropOnEmpty: true,
+ forcePlaceholderSize: false,
+ forceHelperSize: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ items: '> *',
+ opacity: false,
+ placeholder: false,
+ revert: false,
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ scope: "default",
+ tolerance: "intersect",
+ zIndex: 1000
+ },
+ _create: function() {
+
+ var o = this.options;
+ this.containerCache = {};
+ this.element.addClass("ui-sortable");
+
+ //Get the items
+ this.refresh();
+
+ //Let's determine if the items are being displayed horizontally
+ this.floating = this.items.length ? o.axis === 'x' || (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false;
+
+ //Let's determine the parent's offset
+ this.offset = this.element.offset();
+
+ //Initialize mouse events for interaction
+ this._mouseInit();
+
+ //We're ready to go
+ this.ready = true
+
+ },
+
+ _destroy: function() {
+ this.element
+ .removeClass("ui-sortable ui-sortable-disabled");
+ this._mouseDestroy();
+
+ for ( var i = this.items.length - 1; i >= 0; i-- )
+ this.items[i].item.removeData(this.widgetName + "-item");
+
+ return this;
+ },
+
+ _setOption: function(key, value){
+ if ( key === "disabled" ) {
+ this.options[ key ] = value;
+
+ this.widget().toggleClass( "ui-sortable-disabled", !!value );
+ } else {
+ // Don't call widget base _setOption for disable as it adds ui-state-disabled class
+ $.Widget.prototype._setOption.apply(this, arguments);
+ }
+ },
+
+ _mouseCapture: function(event, overrideHandle) {
+ var that = this;
+
+ if (this.reverting) {
+ return false;
+ }
+
+ if(this.options.disabled || this.options.type == 'static') return false;
+
+ //We have to refresh the items data once first
+ this._refreshItems(event);
+
+ //Find out if the clicked node (or one of its parents) is a actual item in this.items
+ var currentItem = null, nodes = $(event.target).parents().each(function() {
+ if($.data(this, that.widgetName + '-item') == that) {
+ currentItem = $(this);
+ return false;
+ }
+ });
+ if($.data(event.target, that.widgetName + '-item') == that) currentItem = $(event.target);
+
+ if(!currentItem) return false;
+ if(this.options.handle && !overrideHandle) {
+ var validHandle = false;
+
+ $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
+ if(!validHandle) return false;
+ }
+
+ this.currentItem = currentItem;
+ this._removeCurrentsFromItems();
+ return true;
+
+ },
+
+ _mouseStart: function(event, overrideHandle, noActivation) {
+
+ var o = this.options;
+ this.currentContainer = this;
+
+ //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
+ this.refreshPositions();
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Get the next scrolling parent
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.currentItem.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ $.extend(this.offset, {
+ click: { //Where the click happened, relative to the element
+ left: event.pageX - this.offset.left,
+ top: event.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+ });
+
+ // Only after we got the offset, we can change the helper's position to absolute
+ // TODO: Still need to figure out a way to make relative sorting possible
+ this.helper.css("position", "absolute");
+ this.cssPosition = this.helper.css("position");
+
+ //Generate the original position
+ this.originalPosition = this._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+ //Cache the former DOM position
+ this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
+
+ //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
+ if(this.helper[0] != this.currentItem[0]) {
+ this.currentItem.hide();
+ }
+
+ //Create the placeholder
+ this._createPlaceholder();
+
+ //Set a containment if given in the options
+ if(o.containment)
+ this._setContainment();
+
+ if(o.cursor) { // cursor option
+ if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
+ $('body').css("cursor", o.cursor);
+ }
+
+ if(o.opacity) { // opacity option
+ if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
+ this.helper.css("opacity", o.opacity);
+ }
+
+ if(o.zIndex) { // zIndex option
+ if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
+ this.helper.css("zIndex", o.zIndex);
+ }
+
+ //Prepare scrolling
+ if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
+ this.overflowOffset = this.scrollParent.offset();
+
+ //Call callbacks
+ this._trigger("start", event, this._uiHash());
+
+ //Recache the helper size
+ if(!this._preserveHelperProportions)
+ this._cacheHelperProportions();
+
+
+ //Post 'activate' events to possible containers
+ if(!noActivation) {
+ for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, this._uiHash(this)); }
+ }
+
+ //Prepare possible droppables
+ if($.ui.ddmanager)
+ $.ui.ddmanager.current = this;
+
+ if ($.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+
+ this.dragging = true;
+
+ this.helper.addClass("ui-sortable-helper");
+ this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+ return true;
+
+ },
+
+ _mouseDrag: function(event) {
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ if (!this.lastPositionAbs) {
+ this.lastPositionAbs = this.positionAbs;
+ }
+
+ //Do scrolling
+ if(this.options.scroll) {
+ var o = this.options, scrolled = false;
+ if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
+
+ if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
+ else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
+
+ if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
+ else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
+
+ } else {
+
+ if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+ else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
+ scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+
+ if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+ else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
+ scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+
+ }
+
+ if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+ }
+
+ //Regenerate the absolute position used for position checks
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Set the helper position
+ if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
+ if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
+
+ //Rearrange
+ for (var i = this.items.length - 1; i >= 0; i--) {
+
+ //Cache variables and intersection, continue if no intersection
+ var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
+ if (!intersection) continue;
+
+ // Only put the placeholder inside the current Container, skip all
+ // items form other containers. This works because when moving
+ // an item from one container to another the
+ // currentContainer is switched before the placeholder is moved.
+ //
+ // Without this moving items in "sub-sortables" can cause the placeholder to jitter
+ // beetween the outer and inner container.
+ if (item.instance !== this.currentContainer) continue;
+
+ if (itemElement != this.currentItem[0] //cannot intersect with itself
+ && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
+ && !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
+ && (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true)
+ //&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
+ ) {
+
+ this.direction = intersection == 1 ? "down" : "up";
+
+ if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
+ this._rearrange(event, item);
+ } else {
+ break;
+ }
+
+ this._trigger("change", event, this._uiHash());
+ break;
+ }
+ }
+
+ //Post events to containers
+ this._contactContainers(event);
+
+ //Interconnect with droppables
+ if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+ //Call callbacks
+ this._trigger('sort', event, this._uiHash());
+
+ this.lastPositionAbs = this.positionAbs;
+ return false;
+
+ },
+
+ _mouseStop: function(event, noPropagation) {
+
+ if(!event) return;
+
+ //If we are using droppables, inform the manager about the drop
+ if ($.ui.ddmanager && !this.options.dropBehaviour)
+ $.ui.ddmanager.drop(this, event);
+
+ if(this.options.revert) {
+ var that = this;
+ var cur = this.placeholder.offset();
+
+ this.reverting = true;
+
+ $(this.helper).animate({
+ left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
+ top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
+ }, parseInt(this.options.revert, 10) || 500, function() {
+ that._clear(event);
+ });
+ } else {
+ this._clear(event, noPropagation);
+ }
+
+ return false;
+
+ },
+
+ cancel: function() {
+
+ if(this.dragging) {
+
+ this._mouseUp({ target: null });
+
+ if(this.options.helper == "original")
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ else
+ this.currentItem.show();
+
+ //Post deactivating events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ this.containers[i]._trigger("deactivate", null, this._uiHash(this));
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", null, this._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ if (this.placeholder) {
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+ if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
+
+ $.extend(this, {
+ helper: null,
+ dragging: false,
+ reverting: false,
+ _noFinalSort: null
+ });
+
+ if(this.domPosition.prev) {
+ $(this.domPosition.prev).after(this.currentItem);
+ } else {
+ $(this.domPosition.parent).prepend(this.currentItem);
+ }
+ }
+
+ return this;
+
+ },
+
+ serialize: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected);
+ var str = []; o = o || {};
+
+ $(items).each(function() {
+ var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
+ if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
+ });
+
+ if(!str.length && o.key) {
+ str.push(o.key + '=');
+ }
+
+ return str.join('&');
+
+ },
+
+ toArray: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected);
+ var ret = []; o = o || {};
+
+ items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
+ return ret;
+
+ },
+
+ /* Be careful with the following core functions */
+ _intersectsWith: function(item) {
+
+ var x1 = this.positionAbs.left,
+ x2 = x1 + this.helperProportions.width,
+ y1 = this.positionAbs.top,
+ y2 = y1 + this.helperProportions.height;
+
+ var l = item.left,
+ r = l + item.width,
+ t = item.top,
+ b = t + item.height;
+
+ var dyClick = this.offset.click.top,
+ dxClick = this.offset.click.left;
+
+ var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
+
+ if( this.options.tolerance == "pointer"
+ || this.options.forcePointerForContainers
+ || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
+ ) {
+ return isOverElement;
+ } else {
+
+ return (l < x1 + (this.helperProportions.width / 2) // Right Half
+ && x2 - (this.helperProportions.width / 2) < r // Left Half
+ && t < y1 + (this.helperProportions.height / 2) // Bottom Half
+ && y2 - (this.helperProportions.height / 2) < b ); // Top Half
+
+ }
+ },
+
+ _intersectsWithPointer: function(item) {
+
+ var isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
+ isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
+ isOverElement = isOverElementHeight && isOverElementWidth,
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (!isOverElement)
+ return false;
+
+ return this.floating ?
+ ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
+ : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
+
+ },
+
+ _intersectsWithSides: function(item) {
+
+ var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
+ isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (this.floating && horizontalDirection) {
+ return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
+ } else {
+ return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
+ }
+
+ },
+
+ _getDragVerticalDirection: function() {
+ var delta = this.positionAbs.top - this.lastPositionAbs.top;
+ return delta != 0 && (delta > 0 ? "down" : "up");
+ },
+
+ _getDragHorizontalDirection: function() {
+ var delta = this.positionAbs.left - this.lastPositionAbs.left;
+ return delta != 0 && (delta > 0 ? "right" : "left");
+ },
+
+ refresh: function(event) {
+ this._refreshItems(event);
+ this.refreshPositions();
+ return this;
+ },
+
+ _connectWith: function() {
+ var options = this.options;
+ return options.connectWith.constructor == String
+ ? [options.connectWith]
+ : options.connectWith;
+ },
+
+ _getItemsAsjQuery: function(connected) {
+
+ var items = [];
+ var queries = [];
+ var connectWith = this._connectWith();
+
+ if(connectWith && connected) {
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
+ for (var j = cur.length - 1; j >= 0; j--){
+ var inst = $.data(cur[j], this.widgetName);
+ if(inst && inst != this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), inst]);
+ }
+ };
+ };
+ }
+
+ queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), this]);
+
+ for (var i = queries.length - 1; i >= 0; i--){
+ queries[i][0].each(function() {
+ items.push(this);
+ });
+ };
+
+ return $(items);
+
+ },
+
+ _removeCurrentsFromItems: function() {
+
+ var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
+
+ this.items = $.grep(this.items, function (item) {
+ for (var j=0; j < list.length; j++) {
+ if(list[j] == item.item[0])
+ return false;
+ };
+ return true;
+ });
+
+ },
+
+ _refreshItems: function(event) {
+
+ this.items = [];
+ this.containers = [this];
+ var items = this.items;
+ var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
+ var connectWith = this._connectWith();
+
+ if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
+ for (var j = cur.length - 1; j >= 0; j--){
+ var inst = $.data(cur[j], this.widgetName);
+ if(inst && inst != this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
+ this.containers.push(inst);
+ }
+ };
+ };
+ }
+
+ for (var i = queries.length - 1; i >= 0; i--) {
+ var targetData = queries[i][1];
+ var _queries = queries[i][0];
+
+ for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
+ var item = $(_queries[j]);
+
+ item.data(this.widgetName + '-item', targetData); // Data for target checking (mouse manager)
+
+ items.push({
+ item: item,
+ instance: targetData,
+ width: 0, height: 0,
+ left: 0, top: 0
+ });
+ };
+ };
+
+ },
+
+ refreshPositions: function(fast) {
+
+ //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
+ if(this.offsetParent && this.helper) {
+ this.offset.parent = this._getParentOffset();
+ }
+
+ for (var i = this.items.length - 1; i >= 0; i--){
+ var item = this.items[i];
+
+ //We ignore calculating positions of all connected containers when we're not over them
+ if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
+ continue;
+
+ var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
+
+ if (!fast) {
+ item.width = t.outerWidth();
+ item.height = t.outerHeight();
+ }
+
+ var p = t.offset();
+ item.left = p.left;
+ item.top = p.top;
+ };
+
+ if(this.options.custom && this.options.custom.refreshContainers) {
+ this.options.custom.refreshContainers.call(this);
+ } else {
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ var p = this.containers[i].element.offset();
+ this.containers[i].containerCache.left = p.left;
+ this.containers[i].containerCache.top = p.top;
+ this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
+ this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
+ };
+ }
+
+ return this;
+ },
+
+ _createPlaceholder: function(that) {
+ that = that || this;
+ var o = that.options;
+
+ if(!o.placeholder || o.placeholder.constructor == String) {
+ var className = o.placeholder;
+ o.placeholder = {
+ element: function() {
+
+ var el = $(document.createElement(that.currentItem[0].nodeName))
+ .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
+ .removeClass("ui-sortable-helper")[0];
+
+ if(!className)
+ el.style.visibility = "hidden";
+
+ return el;
+ },
+ update: function(container, p) {
+
+ // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
+ // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
+ if(className && !o.forcePlaceholderSize) return;
+
+ //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
+ if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css('paddingTop')||0, 10) - parseInt(that.currentItem.css('paddingBottom')||0, 10)); };
+ if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css('paddingLeft')||0, 10) - parseInt(that.currentItem.css('paddingRight')||0, 10)); };
+ }
+ };
+ }
+
+ //Create the placeholder
+ that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
+
+ //Append it after the actual current item
+ that.currentItem.after(that.placeholder);
+
+ //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
+ o.placeholder.update(that, that.placeholder);
+
+ },
+
+ _contactContainers: function(event) {
+
+ // get innermost container that intersects with item
+ var innermostContainer = null, innermostIndex = null;
+
+
+ for (var i = this.containers.length - 1; i >= 0; i--){
+
+ // never consider a container that's located within the item itself
+ if($.contains(this.currentItem[0], this.containers[i].element[0]))
+ continue;
+
+ if(this._intersectsWith(this.containers[i].containerCache)) {
+
+ // if we've already found a container and it's more "inner" than this, then continue
+ if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0]))
+ continue;
+
+ innermostContainer = this.containers[i];
+ innermostIndex = i;
+
+ } else {
+ // container doesn't intersect. trigger "out" event if necessary
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", event, this._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ // if no intersecting containers found, return
+ if(!innermostContainer) return;
+
+ // move the item into the container if it's not there already
+ if(this.containers.length === 1) {
+ this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+ this.containers[innermostIndex].containerCache.over = 1;
+ } else {
+
+ //When entering a new container, we will find the item with the least distance and append our item near it
+ var dist = 10000; var itemWithLeastDistance = null;
+ var posProperty = this.containers[innermostIndex].floating ? 'left' : 'top';
+ var sizeProperty = this.containers[innermostIndex].floating ? 'width' : 'height';
+ var base = this.positionAbs[posProperty] + this.offset.click[posProperty];
+ for (var j = this.items.length - 1; j >= 0; j--) {
+ if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
+ if(this.items[j].item[0] == this.currentItem[0]) continue;
+ var cur = this.items[j].item.offset()[posProperty];
+ var nearBottom = false;
+ if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
+ nearBottom = true;
+ cur += this.items[j][sizeProperty];
+ }
+
+ if(Math.abs(cur - base) < dist) {
+ dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
+ this.direction = nearBottom ? "up": "down";
+ }
+ }
+
+ if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
+ return;
+
+ this.currentContainer = this.containers[innermostIndex];
+ itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
+ this._trigger("change", event, this._uiHash());
+ this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
+
+ //Update the placeholder
+ this.options.placeholder.update(this.currentContainer, this.placeholder);
+
+ this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+ this.containers[innermostIndex].containerCache.over = 1;
+ }
+
+
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options;
+ var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
+
+ if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
+ $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
+
+ if(helper[0] == this.currentItem[0])
+ this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
+
+ if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
+ if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if (typeof obj == 'string') {
+ obj = obj.split(' ');
+ }
+ if ($.isArray(obj)) {
+ obj = {left: +obj[0], top: +obj[1] || 0};
+ }
+ if ('left' in obj) {
+ this.offset.click.left = obj.left + this.margins.left;
+ }
+ if ('right' in obj) {
+ this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ }
+ if ('top' in obj) {
+ this.offset.click.top = obj.top + this.margins.top;
+ }
+ if ('bottom' in obj) {
+ this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+ }
+ },
+
+ _getParentOffset: function() {
+
+
+ //Get the offsetParent and cache its position
+ this.offsetParent = this.helper.offsetParent();
+ var po = this.offsetParent.offset();
+
+ // This is a special case where we need to modify a offset calculated on start, since the following happened:
+ // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+ // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+ // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+ if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
+ po.left += this.scrollParent.scrollLeft();
+ po.top += this.scrollParent.scrollTop();
+ }
+
+ if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
+ || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
+ po = { top: 0, left: 0 };
+
+ return {
+ top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+ left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+ };
+
+ },
+
+ _getRelativeOffset: function() {
+
+ if(this.cssPosition == "relative") {
+ var p = this.currentItem.position();
+ return {
+ top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+ left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+ };
+ } else {
+ return { top: 0, left: 0 };
+ }
+
+ },
+
+ _cacheMargins: function() {
+ this.margins = {
+ left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
+ top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var o = this.options;
+ if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+ if(o.containment == 'document' || o.containment == 'window') this.containment = [
+ 0 - this.offset.relative.left - this.offset.parent.left,
+ 0 - this.offset.relative.top - this.offset.parent.top,
+ $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+
+ if(!(/^(document|window|parent)$/).test(o.containment)) {
+ var ce = $(o.containment)[0];
+ var co = $(o.containment).offset();
+ var over = ($(ce).css("overflow") != 'hidden');
+
+ this.containment = [
+ co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+ co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+ co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+ co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
+ ];
+ }
+
+ },
+
+ _convertPositionTo: function(d, pos) {
+
+ if(!pos) pos = this.position;
+ var mod = d == "absolute" ? 1 : -1;
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ return {
+ top: (
+ pos.top // The absolute mouse position
+ + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
+ - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+ ),
+ left: (
+ pos.left // The absolute mouse position
+ + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
+ + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
+ - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+ )
+ };
+
+ },
+
+ _generatePosition: function(event) {
+
+ var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ var pageX = event.pageX;
+ var pageY = event.pageY;
+
+ /*
+ * - Position constraining -
+ * Constrain the position to a mix of grid, containment.
+ */
+
+ if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+
+ if(this.containment) {
+ if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
+ if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
+ }
+
+ if(o.grid) {
+ var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+ pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+ pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+ }
+
+ }
+
+ return {
+ top: (
+ pageY // The absolute mouse position
+ - this.offset.click.top // Click offset (relative to the element)
+ - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
+ + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+ ),
+ left: (
+ pageX // The absolute mouse position
+ - this.offset.click.left // Click offset (relative to the element)
+ - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
+ - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
+ + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ )
+ };
+
+ },
+
+ _rearrange: function(event, i, a, hardRefresh) {
+
+ a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
+
+ //Various things done here to improve the performance:
+ // 1. we create a setTimeout, that calls refreshPositions
+ // 2. on the instance, we have a counter variable, that get's higher after every append
+ // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
+ // 4. this lets only the last addition to the timeout stack through
+ this.counter = this.counter ? ++this.counter : 1;
+ var counter = this.counter;
+
+ this._delay(function() {
+ if(counter == this.counter) this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
+ });
+
+ },
+
+ _clear: function(event, noPropagation) {
+
+ this.reverting = false;
+ // We delay all events that have to be triggered to after the point where the placeholder has been removed and
+ // everything else normalized again
+ var delayedTriggers = [];
+
+ // We first have to update the dom position of the actual currentItem
+ // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
+ if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem);
+ this._noFinalSort = null;
+
+ if(this.helper[0] == this.currentItem[0]) {
+ for(var i in this._storedCSS) {
+ if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
+ }
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ } else {
+ this.currentItem.show();
+ }
+
+ if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+ if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
+
+ // Check if the items Container has Changed and trigger appropriate
+ // events.
+ if (this !== this.currentContainer) {
+ if(!noPropagation) {
+ delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
+ }
+ }
+
+
+ //Post events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ if(this.containers[i].containerCache.over) {
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ //Do what was originally in plugins
+ if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
+ if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset opacity
+ if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
+
+ this.dragging = false;
+ if(this.cancelHelperRemoval) {
+ if(!noPropagation) {
+ this._trigger("beforeStop", event, this._uiHash());
+ for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+
+ this.fromOutside = false;
+ return false;
+ }
+
+ if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+
+ if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
+
+ if(!noPropagation) {
+ for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+
+ this.fromOutside = false;
+ return true;
+
+ },
+
+ _trigger: function() {
+ if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
+ this.cancel();
+ }
+ },
+
+ _uiHash: function(_inst) {
+ var inst = _inst || this;
+ return {
+ helper: inst.helper,
+ placeholder: inst.placeholder || $([]),
+ position: inst.position,
+ originalPosition: inst.originalPosition,
+ offset: inst.positionAbs,
+ item: inst.currentItem,
+ sender: _inst ? _inst.element : null
+ };
+ }
+
+});
+
+})(jQuery);
+(function( $ ) {
+
+function modifier( fn ) {
+ return function() {
+ var previous = this.element.val();
+ fn.apply( this, arguments );
+ this._refresh();
+ if ( previous !== this.element.val() ) {
+ this._trigger( "change" );
+ }
+ };
+}
+
+$.widget( "ui.spinner", {
+ version: "1.9.2",
+ defaultElement: "<input>",
+ widgetEventPrefix: "spin",
+ options: {
+ culture: null,
+ icons: {
+ down: "ui-icon-triangle-1-s",
+ up: "ui-icon-triangle-1-n"
+ },
+ incremental: true,
+ max: null,
+ min: null,
+ numberFormat: null,
+ page: 10,
+ step: 1,
+
+ change: null,
+ spin: null,
+ start: null,
+ stop: null
+ },
+
+ _create: function() {
+ // handle string values that need to be parsed
+ this._setOption( "max", this.options.max );
+ this._setOption( "min", this.options.min );
+ this._setOption( "step", this.options.step );
+
+ // format the value, but don't constrain
+ this._value( this.element.val(), true );
+
+ this._draw();
+ this._on( this._events );
+ this._refresh();
+
+ // turning off autocomplete prevents the browser from remembering the
+ // value when navigating through history, so we re-enable autocomplete
+ // if the page is unloaded before the widget is destroyed. #7790
+ this._on( this.window, {
+ beforeunload: function() {
+ this.element.removeAttr( "autocomplete" );
+ }
+ });
+ },
+
+ _getCreateOptions: function() {
+ var options = {},
+ element = this.element;
+
+ $.each( [ "min", "max", "step" ], function( i, option ) {
+ var value = element.attr( option );
+ if ( value !== undefined && value.length ) {
+ options[ option ] = value;
+ }
+ });
+
+ return options;
+ },
+
+ _events: {
+ keydown: function( event ) {
+ if ( this._start( event ) && this._keydown( event ) ) {
+ event.preventDefault();
+ }
+ },
+ keyup: "_stop",
+ focus: function() {
+ this.previous = this.element.val();
+ },
+ blur: function( event ) {
+ if ( this.cancelBlur ) {
+ delete this.cancelBlur;
+ return;
+ }
+
+ this._refresh();
+ if ( this.previous !== this.element.val() ) {
+ this._trigger( "change", event );
+ }
+ },
+ mousewheel: function( event, delta ) {
+ if ( !delta ) {
+ return;
+ }
+ if ( !this.spinning && !this._start( event ) ) {
+ return false;
+ }
+
+ this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
+ clearTimeout( this.mousewheelTimer );
+ this.mousewheelTimer = this._delay(function() {
+ if ( this.spinning ) {
+ this._stop( event );
+ }
+ }, 100 );
+ event.preventDefault();
+ },
+ "mousedown .ui-spinner-button": function( event ) {
+ var previous;
+
+ // We never want the buttons to have focus; whenever the user is
+ // interacting with the spinner, the focus should be on the input.
+ // If the input is focused then this.previous is properly set from
+ // when the input first received focus. If the input is not focused
+ // then we need to set this.previous based on the value before spinning.
+ previous = this.element[0] === this.document[0].activeElement ?
+ this.previous : this.element.val();
+ function checkFocus() {
+ var isActive = this.element[0] === this.document[0].activeElement;
+ if ( !isActive ) {
+ this.element.focus();
+ this.previous = previous;
+ // support: IE
+ // IE sets focus asynchronously, so we need to check if focus
+ // moved off of the input because the user clicked on the button.
+ this._delay(function() {
+ this.previous = previous;
+ });
+ }
+ }
+
+ // ensure focus is on (or stays on) the text field
+ event.preventDefault();
+ checkFocus.call( this );
+
+ // support: IE
+ // IE doesn't prevent moving focus even with event.preventDefault()
+ // so we set a flag to know when we should ignore the blur event
+ // and check (again) if focus moved off of the input.
+ this.cancelBlur = true;
+ this._delay(function() {
+ delete this.cancelBlur;
+ checkFocus.call( this );
+ });
+
+ if ( this._start( event ) === false ) {
+ return;
+ }
+
+ this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
+ },
+ "mouseup .ui-spinner-button": "_stop",
+ "mouseenter .ui-spinner-button": function( event ) {
+ // button will add ui-state-active if mouse was down while mouseleave and kept down
+ if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
+ return;
+ }
+
+ if ( this._start( event ) === false ) {
+ return false;
+ }
+ this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
+ },
+ // TODO: do we really want to consider this a stop?
+ // shouldn't we just stop the repeater and wait until mouseup before
+ // we trigger the stop event?
+ "mouseleave .ui-spinner-button": "_stop"
+ },
+
+ _draw: function() {
+ var uiSpinner = this.uiSpinner = this.element
+ .addClass( "ui-spinner-input" )
+ .attr( "autocomplete", "off" )
+ .wrap( this._uiSpinnerHtml() )
+ .parent()
+ // add buttons
+ .append( this._buttonHtml() );
+
+ this.element.attr( "role", "spinbutton" );
+
+ // button bindings
+ this.buttons = uiSpinner.find( ".ui-spinner-button" )
+ .attr( "tabIndex", -1 )
+ .button()
+ .removeClass( "ui-corner-all" );
+
+ // IE 6 doesn't understand height: 50% for the buttons
+ // unless the wrapper has an explicit height
+ if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
+ uiSpinner.height() > 0 ) {
+ uiSpinner.height( uiSpinner.height() );
+ }
+
+ // disable spinner if element was already disabled
+ if ( this.options.disabled ) {
+ this.disable();
+ }
+ },
+
+ _keydown: function( event ) {
+ var options = this.options,
+ keyCode = $.ui.keyCode;
+
+ switch ( event.keyCode ) {
+ case keyCode.UP:
+ this._repeat( null, 1, event );
+ return true;
+ case keyCode.DOWN:
+ this._repeat( null, -1, event );
+ return true;
+ case keyCode.PAGE_UP:
+ this._repeat( null, options.page, event );
+ return true;
+ case keyCode.PAGE_DOWN:
+ this._repeat( null, -options.page, event );
+ return true;
+ }
+
+ return false;
+ },
+
+ _uiSpinnerHtml: function() {
+ return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
+ },
+
+ _buttonHtml: function() {
+ return "" +
+ "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
+ "<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
+ "</a>" +
+ "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
+ "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
+ "</a>";
+ },
+
+ _start: function( event ) {
+ if ( !this.spinning && this._trigger( "start", event ) === false ) {
+ return false;
+ }
+
+ if ( !this.counter ) {
+ this.counter = 1;
+ }
+ this.spinning = true;
+ return true;
+ },
+
+ _repeat: function( i, steps, event ) {
+ i = i || 500;
+
+ clearTimeout( this.timer );
+ this.timer = this._delay(function() {
+ this._repeat( 40, steps, event );
+ }, i );
+
+ this._spin( steps * this.options.step, event );
+ },
+
+ _spin: function( step, event ) {
+ var value = this.value() || 0;
+
+ if ( !this.counter ) {
+ this.counter = 1;
+ }
+
+ value = this._adjustValue( value + step * this._increment( this.counter ) );
+
+ if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
+ this._value( value );
+ this.counter++;
+ }
+ },
+
+ _increment: function( i ) {
+ var incremental = this.options.incremental;
+
+ if ( incremental ) {
+ return $.isFunction( incremental ) ?
+ incremental( i ) :
+ Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );
+ }
+
+ return 1;
+ },
+
+ _precision: function() {
+ var precision = this._precisionOf( this.options.step );
+ if ( this.options.min !== null ) {
+ precision = Math.max( precision, this._precisionOf( this.options.min ) );
+ }
+ return precision;
+ },
+
+ _precisionOf: function( num ) {
+ var str = num.toString(),
+ decimal = str.indexOf( "." );
+ return decimal === -1 ? 0 : str.length - decimal - 1;
+ },
+
+ _adjustValue: function( value ) {
+ var base, aboveMin,
+ options = this.options;
+
+ // make sure we're at a valid step
+ // - find out where we are relative to the base (min or 0)
+ base = options.min !== null ? options.min : 0;
+ aboveMin = value - base;
+ // - round to the nearest step
+ aboveMin = Math.round(aboveMin / options.step) * options.step;
+ // - rounding is based on 0, so adjust back to our base
+ value = base + aboveMin;
+
+ // fix precision from bad JS floating point math
+ value = parseFloat( value.toFixed( this._precision() ) );
+
+ // clamp the value
+ if ( options.max !== null && value > options.max) {
+ return options.max;
+ }
+ if ( options.min !== null && value < options.min ) {
+ return options.min;
+ }
+
+ return value;
+ },
+
+ _stop: function( event ) {
+ if ( !this.spinning ) {
+ return;
+ }
+
+ clearTimeout( this.timer );
+ clearTimeout( this.mousewheelTimer );
+ this.counter = 0;
+ this.spinning = false;
+ this._trigger( "stop", event );
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "culture" || key === "numberFormat" ) {
+ var prevValue = this._parse( this.element.val() );
+ this.options[ key ] = value;
+ this.element.val( this._format( prevValue ) );
+ return;
+ }
+
+ if ( key === "max" || key === "min" || key === "step" ) {
+ if ( typeof value === "string" ) {
+ value = this._parse( value );
+ }
+ }
+
+ this._super( key, value );
+
+ if ( key === "disabled" ) {
+ if ( value ) {
+ this.element.prop( "disabled", true );
+ this.buttons.button( "disable" );
+ } else {
+ this.element.prop( "disabled", false );
+ this.buttons.button( "enable" );
+ }
+ }
+ },
+
+ _setOptions: modifier(function( options ) {
+ this._super( options );
+ this._value( this.element.val() );
+ }),
+
+ _parse: function( val ) {
+ if ( typeof val === "string" && val !== "" ) {
+ val = window.Globalize && this.options.numberFormat ?
+ Globalize.parseFloat( val, 10, this.options.culture ) : +val;
+ }
+ return val === "" || isNaN( val ) ? null : val;
+ },
+
+ _format: function( value ) {
+ if ( value === "" ) {
+ return "";
+ }
+ return window.Globalize && this.options.numberFormat ?
+ Globalize.format( value, this.options.numberFormat, this.options.culture ) :
+ value;
+ },
+
+ _refresh: function() {
+ this.element.attr({
+ "aria-valuemin": this.options.min,
+ "aria-valuemax": this.options.max,
+ // TODO: what should we do with values that can't be parsed?
+ "aria-valuenow": this._parse( this.element.val() )
+ });
+ },
+
+ // update the value without triggering change
+ _value: function( value, allowAny ) {
+ var parsed;
+ if ( value !== "" ) {
+ parsed = this._parse( value );
+ if ( parsed !== null ) {
+ if ( !allowAny ) {
+ parsed = this._adjustValue( parsed );
+ }
+ value = this._format( parsed );
+ }
+ }
+ this.element.val( value );
+ this._refresh();
+ },
+
+ _destroy: function() {
+ this.element
+ .removeClass( "ui-spinner-input" )
+ .prop( "disabled", false )
+ .removeAttr( "autocomplete" )
+ .removeAttr( "role" )
+ .removeAttr( "aria-valuemin" )
+ .removeAttr( "aria-valuemax" )
+ .removeAttr( "aria-valuenow" );
+ this.uiSpinner.replaceWith( this.element );
+ },
+
+ stepUp: modifier(function( steps ) {
+ this._stepUp( steps );
+ }),
+ _stepUp: function( steps ) {
+ this._spin( (steps || 1) * this.options.step );
+ },
+
+ stepDown: modifier(function( steps ) {
+ this._stepDown( steps );
+ }),
+ _stepDown: function( steps ) {
+ this._spin( (steps || 1) * -this.options.step );
+ },
+
+ pageUp: modifier(function( pages ) {
+ this._stepUp( (pages || 1) * this.options.page );
+ }),
+
+ pageDown: modifier(function( pages ) {
+ this._stepDown( (pages || 1) * this.options.page );
+ }),
+
+ value: function( newVal ) {
+ if ( !arguments.length ) {
+ return this._parse( this.element.val() );
+ }
+ modifier( this._value ).call( this, newVal );
+ },
+
+ widget: function() {
+ return this.uiSpinner;
+ }
+});
+
+}( jQuery ) );
+(function( $, undefined ) {
+
+var tabId = 0,
+ rhash = /#.*$/;
+
+function getNextTabId() {
+ return ++tabId;
+}
+
+function isLocal( anchor ) {
+ return anchor.hash.length > 1 &&
+ anchor.href.replace( rhash, "" ) ===
+ location.href.replace( rhash, "" )
+ // support: Safari 5.1
+ // Safari 5.1 doesn't encode spaces in window.location
+ // but it does encode spaces from anchors (#8777)
+ .replace( /\s/g, "%20" );
+}
+
+$.widget( "ui.tabs", {
+ version: "1.9.2",
+ delay: 300,
+ options: {
+ active: null,
+ collapsible: false,
+ event: "click",
+ heightStyle: "content",
+ hide: null,
+ show: null,
+
+ // callbacks
+ activate: null,
+ beforeActivate: null,
+ beforeLoad: null,
+ load: null
+ },
+
+ _create: function() {
+ var that = this,
+ options = this.options,
+ active = options.active,
+ locationHash = location.hash.substring( 1 );
+
+ this.running = false;
+
+ this.element
+ .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
+ .toggleClass( "ui-tabs-collapsible", options.collapsible )
+ // Prevent users from focusing disabled tabs via click
+ .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) {
+ if ( $( this ).is( ".ui-state-disabled" ) ) {
+ event.preventDefault();
+ }
+ })
+ // support: IE <9
+ // Preventing the default action in mousedown doesn't prevent IE
+ // from focusing the element, so if the anchor gets focused, blur.
+ // We don't have to worry about focusing the previously focused
+ // element since clicking on a non-focusable element should focus
+ // the body anyway.
+ .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
+ if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
+ this.blur();
+ }
+ });
+
+ this._processTabs();
+
+ if ( active === null ) {
+ // check the fragment identifier in the URL
+ if ( locationHash ) {
+ this.tabs.each(function( i, tab ) {
+ if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
+ active = i;
+ return false;
+ }
+ });
+ }
+
+ // check for a tab marked active via a class
+ if ( active === null ) {
+ active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
+ }
+
+ // no active tab, set to false
+ if ( active === null || active === -1 ) {
+ active = this.tabs.length ? 0 : false;
+ }
+ }
+
+ // handle numbers: negative, out of range
+ if ( active !== false ) {
+ active = this.tabs.index( this.tabs.eq( active ) );
+ if ( active === -1 ) {
+ active = options.collapsible ? false : 0;
+ }
+ }
+ options.active = active;
+
+ // don't allow collapsible: false and active: false
+ if ( !options.collapsible && options.active === false && this.anchors.length ) {
+ options.active = 0;
+ }
+
+ // Take disabling tabs via class attribute from HTML
+ // into account and update option properly.
+ if ( $.isArray( options.disabled ) ) {
+ options.disabled = $.unique( options.disabled.concat(
+ $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
+ return that.tabs.index( li );
+ })
+ ) ).sort();
+ }
+
+ // check for length avoids error when initializing empty list
+ if ( this.options.active !== false && this.anchors.length ) {
+ this.active = this._findActive( this.options.active );
+ } else {
+ this.active = $();
+ }
+
+ this._refresh();
+
+ if ( this.active.length ) {
+ this.load( options.active );
+ }
+ },
+
+ _getCreateEventData: function() {
+ return {
+ tab: this.active,
+ panel: !this.active.length ? $() : this._getPanelForTab( this.active )
+ };
+ },
+
+ _tabKeydown: function( event ) {
+ var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
+ selectedIndex = this.tabs.index( focusedTab ),
+ goingForward = true;
+
+ if ( this._handlePageNav( event ) ) {
+ return;
+ }
+
+ switch ( event.keyCode ) {
+ case $.ui.keyCode.RIGHT:
+ case $.ui.keyCode.DOWN:
+ selectedIndex++;
+ break;
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.LEFT:
+ goingForward = false;
+ selectedIndex--;
+ break;
+ case $.ui.keyCode.END:
+ selectedIndex = this.anchors.length - 1;
+ break;
+ case $.ui.keyCode.HOME:
+ selectedIndex = 0;
+ break;
+ case $.ui.keyCode.SPACE:
+ // Activate only, no collapsing
+ event.preventDefault();
+ clearTimeout( this.activating );
+ this._activate( selectedIndex );
+ return;
+ case $.ui.keyCode.ENTER:
+ // Toggle (cancel delayed activation, allow collapsing)
+ event.preventDefault();
+ clearTimeout( this.activating );
+ // Determine if we should collapse or activate
+ this._activate( selectedIndex === this.options.active ? false : selectedIndex );
+ return;
+ default:
+ return;
+ }
+
+ // Focus the appropriate tab, based on which key was pressed
+ event.preventDefault();
+ clearTimeout( this.activating );
+ selectedIndex = this._focusNextTab( selectedIndex, goingForward );
+
+ // Navigating with control key will prevent automatic activation
+ if ( !event.ctrlKey ) {
+ // Update aria-selected immediately so that AT think the tab is already selected.
+ // Otherwise AT may confuse the user by stating that they need to activate the tab,
+ // but the tab will already be activated by the time the announcement finishes.
+ focusedTab.attr( "aria-selected", "false" );
+ this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
+
+ this.activating = this._delay(function() {
+ this.option( "active", selectedIndex );
+ }, this.delay );
+ }
+ },
+
+ _panelKeydown: function( event ) {
+ if ( this._handlePageNav( event ) ) {
+ return;
+ }
+
+ // Ctrl+up moves focus to the current tab
+ if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
+ event.preventDefault();
+ this.active.focus();
+ }
+ },
+
+ // Alt+page up/down moves focus to the previous/next tab (and activates)
+ _handlePageNav: function( event ) {
+ if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
+ this._activate( this._focusNextTab( this.options.active - 1, false ) );
+ return true;
+ }
+ if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
+ this._activate( this._focusNextTab( this.options.active + 1, true ) );
+ return true;
+ }
+ },
+
+ _findNextTab: function( index, goingForward ) {
+ var lastTabIndex = this.tabs.length - 1;
+
+ function constrain() {
+ if ( index > lastTabIndex ) {
+ index = 0;
+ }
+ if ( index < 0 ) {
+ index = lastTabIndex;
+ }
+ return index;
+ }
+
+ while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
+ index = goingForward ? index + 1 : index - 1;
+ }
+
+ return index;
+ },
+
+ _focusNextTab: function( index, goingForward ) {
+ index = this._findNextTab( index, goingForward );
+ this.tabs.eq( index ).focus();
+ return index;
+ },
+
+ _setOption: function( key, value ) {
+ if ( key === "active" ) {
+ // _activate() will handle invalid values and update this.options
+ this._activate( value );
+ return;
+ }
+
+ if ( key === "disabled" ) {
+ // don't use the widget factory's disabled handling
+ this._setupDisabled( value );
+ return;
+ }
+
+ this._super( key, value);
+
+ if ( key === "collapsible" ) {
+ this.element.toggleClass( "ui-tabs-collapsible", value );
+ // Setting collapsible: false while collapsed; open first panel
+ if ( !value && this.options.active === false ) {
+ this._activate( 0 );
+ }
+ }
+
+ if ( key === "event" ) {
+ this._setupEvents( value );
+ }
+
+ if ( key === "heightStyle" ) {
+ this._setupHeightStyle( value );
+ }
+ },
+
+ _tabId: function( tab ) {
+ return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId();
+ },
+
+ _sanitizeSelector: function( hash ) {
+ return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
+ },
+
+ refresh: function() {
+ var options = this.options,
+ lis = this.tablist.children( ":has(a[href])" );
+
+ // get disabled tabs from class attribute from HTML
+ // this will get converted to a boolean if needed in _refresh()
+ options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
+ return lis.index( tab );
+ });
+
+ this._processTabs();
+
+ // was collapsed or no tabs
+ if ( options.active === false || !this.anchors.length ) {
+ options.active = false;
+ this.active = $();
+ // was active, but active tab is gone
+ } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
+ // all remaining tabs are disabled
+ if ( this.tabs.length === options.disabled.length ) {
+ options.active = false;
+ this.active = $();
+ // activate previous tab
+ } else {
+ this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
+ }
+ // was active, active tab still exists
+ } else {
+ // make sure active index is correct
+ options.active = this.tabs.index( this.active );
+ }
+
+ this._refresh();
+ },
+
+ _refresh: function() {
+ this._setupDisabled( this.options.disabled );
+ this._setupEvents( this.options.event );
+ this._setupHeightStyle( this.options.heightStyle );
+
+ this.tabs.not( this.active ).attr({
+ "aria-selected": "false",
+ tabIndex: -1
+ });
+ this.panels.not( this._getPanelForTab( this.active ) )
+ .hide()
+ .attr({
+ "aria-expanded": "false",
+ "aria-hidden": "true"
+ });
+
+ // Make sure one tab is in the tab order
+ if ( !this.active.length ) {
+ this.tabs.eq( 0 ).attr( "tabIndex", 0 );
+ } else {
+ this.active
+ .addClass( "ui-tabs-active ui-state-active" )
+ .attr({
+ "aria-selected": "true",
+ tabIndex: 0
+ });
+ this._getPanelForTab( this.active )
+ .show()
+ .attr({
+ "aria-expanded": "true",
+ "aria-hidden": "false"
+ });
+ }
+ },
+
+ _processTabs: function() {
+ var that = this;
+
+ this.tablist = this._getList()
+ .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
+ .attr( "role", "tablist" );
+
+ this.tabs = this.tablist.find( "> li:has(a[href])" )
+ .addClass( "ui-state-default ui-corner-top" )
+ .attr({
+ role: "tab",
+ tabIndex: -1
+ });
+
+ this.anchors = this.tabs.map(function() {
+ return $( "a", this )[ 0 ];
+ })
+ .addClass( "ui-tabs-anchor" )
+ .attr({
+ role: "presentation",
+ tabIndex: -1
+ });
+
+ this.panels = $();
+
+ this.anchors.each(function( i, anchor ) {
+ var selector, panel, panelId,
+ anchorId = $( anchor ).uniqueId().attr( "id" ),
+ tab = $( anchor ).closest( "li" ),
+ originalAriaControls = tab.attr( "aria-controls" );
+
+ // inline tab
+ if ( isLocal( anchor ) ) {
+ selector = anchor.hash;
+ panel = that.element.find( that._sanitizeSelector( selector ) );
+ // remote tab
+ } else {
+ panelId = that._tabId( tab );
+ selector = "#" + panelId;
+ panel = that.element.find( selector );
+ if ( !panel.length ) {
+ panel = that._createPanel( panelId );
+ panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
+ }
+ panel.attr( "aria-live", "polite" );
+ }
+
+ if ( panel.length) {
+ that.panels = that.panels.add( panel );
+ }
+ if ( originalAriaControls ) {
+ tab.data( "ui-tabs-aria-controls", originalAriaControls );
+ }
+ tab.attr({
+ "aria-controls": selector.substring( 1 ),
+ "aria-labelledby": anchorId
+ });
+ panel.attr( "aria-labelledby", anchorId );
+ });
+
+ this.panels
+ .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
+ .attr( "role", "tabpanel" );
+ },
+
+ // allow overriding how to find the list for rare usage scenarios (#7715)
+ _getList: function() {
+ return this.element.find( "ol,ul" ).eq( 0 );
+ },
+
+ _createPanel: function( id ) {
+ return $( "<div>" )
+ .attr( "id", id )
+ .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
+ .data( "ui-tabs-destroy", true );
+ },
+
+ _setupDisabled: function( disabled ) {
+ if ( $.isArray( disabled ) ) {
+ if ( !disabled.length ) {
+ disabled = false;
+ } else if ( disabled.length === this.anchors.length ) {
+ disabled = true;
+ }
+ }
+
+ // disable tabs
+ for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
+ if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
+ $( li )
+ .addClass( "ui-state-disabled" )
+ .attr( "aria-disabled", "true" );
+ } else {
+ $( li )
+ .removeClass( "ui-state-disabled" )
+ .removeAttr( "aria-disabled" );
+ }
+ }
+
+ this.options.disabled = disabled;
+ },
+
+ _setupEvents: function( event ) {
+ var events = {
+ click: function( event ) {
+ event.preventDefault();
+ }
+ };
+ if ( event ) {
+ $.each( event.split(" "), function( index, eventName ) {
+ events[ eventName ] = "_eventHandler";
+ });
+ }
+
+ this._off( this.anchors.add( this.tabs ).add( this.panels ) );
+ this._on( this.anchors, events );
+ this._on( this.tabs, { keydown: "_tabKeydown" } );
+ this._on( this.panels, { keydown: "_panelKeydown" } );
+
+ this._focusable( this.tabs );
+ this._hoverable( this.tabs );
+ },
+
+ _setupHeightStyle: function( heightStyle ) {
+ var maxHeight, overflow,
+ parent = this.element.parent();
+
+ if ( heightStyle === "fill" ) {
+ // IE 6 treats height like minHeight, so we need to turn off overflow
+ // in order to get a reliable height
+ // we use the minHeight support test because we assume that only
+ // browsers that don't support minHeight will treat height as minHeight
+ if ( !$.support.minHeight ) {
+ overflow = parent.css( "overflow" );
+ parent.css( "overflow", "hidden");
+ }
+ maxHeight = parent.height();
+ this.element.siblings( ":visible" ).each(function() {
+ var elem = $( this ),
+ position = elem.css( "position" );
+
+ if ( position === "absolute" || position === "fixed" ) {
+ return;
+ }
+ maxHeight -= elem.outerHeight( true );
+ });
+ if ( overflow ) {
+ parent.css( "overflow", overflow );
+ }
+
+ this.element.children().not( this.panels ).each(function() {
+ maxHeight -= $( this ).outerHeight( true );
+ });
+
+ this.panels.each(function() {
+ $( this ).height( Math.max( 0, maxHeight -
+ $( this ).innerHeight() + $( this ).height() ) );
+ })
+ .css( "overflow", "auto" );
+ } else if ( heightStyle === "auto" ) {
+ maxHeight = 0;
+ this.panels.each(function() {
+ maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
+ }).height( maxHeight );
+ }
+ },
+
+ _eventHandler: function( event ) {
+ var options = this.options,
+ active = this.active,
+ anchor = $( event.currentTarget ),
+ tab = anchor.closest( "li" ),
+ clickedIsActive = tab[ 0 ] === active[ 0 ],
+ collapsing = clickedIsActive && options.collapsible,
+ toShow = collapsing ? $() : this._getPanelForTab( tab ),
+ toHide = !active.length ? $() : this._getPanelForTab( active ),
+ eventData = {
+ oldTab: active,
+ oldPanel: toHide,
+ newTab: collapsing ? $() : tab,
+ newPanel: toShow
+ };
+
+ event.preventDefault();
+
+ if ( tab.hasClass( "ui-state-disabled" ) ||
+ // tab is already loading
+ tab.hasClass( "ui-tabs-loading" ) ||
+ // can't switch durning an animation
+ this.running ||
+ // click on active header, but not collapsible
+ ( clickedIsActive && !options.collapsible ) ||
+ // allow canceling activation
+ ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
+ return;
+ }
+
+ options.active = collapsing ? false : this.tabs.index( tab );
+
+ this.active = clickedIsActive ? $() : tab;
+ if ( this.xhr ) {
+ this.xhr.abort();
+ }
+
+ if ( !toHide.length && !toShow.length ) {
+ $.error( "jQuery UI Tabs: Mismatching fragment identifier." );
+ }
+
+ if ( toShow.length ) {
+ this.load( this.tabs.index( tab ), event );
+ }
+ this._toggle( event, eventData );
+ },
+
+ // handles show/hide for selecting tabs
+ _toggle: function( event, eventData ) {
+ var that = this,
+ toShow = eventData.newPanel,
+ toHide = eventData.oldPanel;
+
+ this.running = true;
+
+ function complete() {
+ that.running = false;
+ that._trigger( "activate", event, eventData );
+ }
+
+ function show() {
+ eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
+
+ if ( toShow.length && that.options.show ) {
+ that._show( toShow, that.options.show, complete );
+ } else {
+ toShow.show();
+ complete();
+ }
+ }
+
+ // start out by hiding, then showing, then completing
+ if ( toHide.length && this.options.hide ) {
+ this._hide( toHide, this.options.hide, function() {
+ eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
+ show();
+ });
+ } else {
+ eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
+ toHide.hide();
+ show();
+ }
+
+ toHide.attr({
+ "aria-expanded": "false",
+ "aria-hidden": "true"
+ });
+ eventData.oldTab.attr( "aria-selected", "false" );
+ // If we're switching tabs, remove the old tab from the tab order.
+ // If we're opening from collapsed state, remove the previous tab from the tab order.
+ // If we're collapsing, then keep the collapsing tab in the tab order.
+ if ( toShow.length && toHide.length ) {
+ eventData.oldTab.attr( "tabIndex", -1 );
+ } else if ( toShow.length ) {
+ this.tabs.filter(function() {
+ return $( this ).attr( "tabIndex" ) === 0;
+ })
+ .attr( "tabIndex", -1 );
+ }
+
+ toShow.attr({
+ "aria-expanded": "true",
+ "aria-hidden": "false"
+ });
+ eventData.newTab.attr({
+ "aria-selected": "true",
+ tabIndex: 0
+ });
+ },
+
+ _activate: function( index ) {
+ var anchor,
+ active = this._findActive( index );
+
+ // trying to activate the already active panel
+ if ( active[ 0 ] === this.active[ 0 ] ) {
+ return;
+ }
+
+ // trying to collapse, simulate a click on the current active header
+ if ( !active.length ) {
+ active = this.active;
+ }
+
+ anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
+ this._eventHandler({
+ target: anchor,
+ currentTarget: anchor,
+ preventDefault: $.noop
+ });
+ },
+
+ _findActive: function( index ) {
+ return index === false ? $() : this.tabs.eq( index );
+ },
+
+ _getIndex: function( index ) {
+ // meta-function to give users option to provide a href string instead of a numerical index.
+ if ( typeof index === "string" ) {
+ index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
+ }
+
+ return index;
+ },
+
+ _destroy: function() {
+ if ( this.xhr ) {
+ this.xhr.abort();
+ }
+
+ this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
+
+ this.tablist
+ .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
+ .removeAttr( "role" );
+
+ this.anchors
+ .removeClass( "ui-tabs-anchor" )
+ .removeAttr( "role" )
+ .removeAttr( "tabIndex" )
+ .removeData( "href.tabs" )
+ .removeData( "load.tabs" )
+ .removeUniqueId();
+
+ this.tabs.add( this.panels ).each(function() {
+ if ( $.data( this, "ui-tabs-destroy" ) ) {
+ $( this ).remove();
+ } else {
+ $( this )
+ .removeClass( "ui-state-default ui-state-active ui-state-disabled " +
+ "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
+ .removeAttr( "tabIndex" )
+ .removeAttr( "aria-live" )
+ .removeAttr( "aria-busy" )
+ .removeAttr( "aria-selected" )
+ .removeAttr( "aria-labelledby" )
+ .removeAttr( "aria-hidden" )
+ .removeAttr( "aria-expanded" )
+ .removeAttr( "role" );
+ }
+ });
+
+ this.tabs.each(function() {
+ var li = $( this ),
+ prev = li.data( "ui-tabs-aria-controls" );
+ if ( prev ) {
+ li.attr( "aria-controls", prev );
+ } else {
+ li.removeAttr( "aria-controls" );
+ }
+ });
+
+ this.panels.show();
+
+ if ( this.options.heightStyle !== "content" ) {
+ this.panels.css( "height", "" );
+ }
+ },
+
+ enable: function( index ) {
+ var disabled = this.options.disabled;
+ if ( disabled === false ) {
+ return;
+ }
+
+ if ( index === undefined ) {
+ disabled = false;
+ } else {
+ index = this._getIndex( index );
+ if ( $.isArray( disabled ) ) {
+ disabled = $.map( disabled, function( num ) {
+ return num !== index ? num : null;
+ });
+ } else {
+ disabled = $.map( this.tabs, function( li, num ) {
+ return num !== index ? num : null;
+ });
+ }
+ }
+ this._setupDisabled( disabled );
+ },
+
+ disable: function( index ) {
+ var disabled = this.options.disabled;
+ if ( disabled === true ) {
+ return;
+ }
+
+ if ( index === undefined ) {
+ disabled = true;
+ } else {
+ index = this._getIndex( index );
+ if ( $.inArray( index, disabled ) !== -1 ) {
+ return;
+ }
+ if ( $.isArray( disabled ) ) {
+ disabled = $.merge( [ index ], disabled ).sort();
+ } else {
+ disabled = [ index ];
+ }
+ }
+ this._setupDisabled( disabled );
+ },
+
+ load: function( index, event ) {
+ index = this._getIndex( index );
+ var that = this,
+ tab = this.tabs.eq( index ),
+ anchor = tab.find( ".ui-tabs-anchor" ),
+ panel = this._getPanelForTab( tab ),
+ eventData = {
+ tab: tab,
+ panel: panel
+ };
+
+ // not remote
+ if ( isLocal( anchor[ 0 ] ) ) {
+ return;
+ }
+
+ this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
+
+ // support: jQuery <1.8
+ // jQuery <1.8 returns false if the request is canceled in beforeSend,
+ // but as of 1.8, $.ajax() always returns a jqXHR object.
+ if ( this.xhr && this.xhr.statusText !== "canceled" ) {
+ tab.addClass( "ui-tabs-loading" );
+ panel.attr( "aria-busy", "true" );
+
+ this.xhr
+ .success(function( response ) {
+ // support: jQuery <1.8
+ // http://bugs.jquery.com/ticket/11778
+ setTimeout(function() {
+ panel.html( response );
+ that._trigger( "load", event, eventData );
+ }, 1 );
+ })
+ .complete(function( jqXHR, status ) {
+ // support: jQuery <1.8
+ // http://bugs.jquery.com/ticket/11778
+ setTimeout(function() {
+ if ( status === "abort" ) {
+ that.panels.stop( false, true );
+ }
+
+ tab.removeClass( "ui-tabs-loading" );
+ panel.removeAttr( "aria-busy" );
+
+ if ( jqXHR === that.xhr ) {
+ delete that.xhr;
+ }
+ }, 1 );
+ });
+ }
+ },
+
+ // TODO: Remove this function in 1.10 when ajaxOptions is removed
+ _ajaxSettings: function( anchor, event, eventData ) {
+ var that = this;
+ return {
+ url: anchor.attr( "href" ),
+ beforeSend: function( jqXHR, settings ) {
+ return that._trigger( "beforeLoad", event,
+ $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
+ }
+ };
+ },
+
+ _getPanelForTab: function( tab ) {
+ var id = $( tab ).attr( "aria-controls" );
+ return this.element.find( this._sanitizeSelector( "#" + id ) );
+ }
+});
+
+// DEPRECATED
+if ( $.uiBackCompat !== false ) {
+
+ // helper method for a lot of the back compat extensions
+ $.ui.tabs.prototype._ui = function( tab, panel ) {
+ return {
+ tab: tab,
+ panel: panel,
+ index: this.anchors.index( tab )
+ };
+ };
+
+ // url method
+ $.widget( "ui.tabs", $.ui.tabs, {
+ url: function( index, url ) {
+ this.anchors.eq( index ).attr( "href", url );
+ }
+ });
+
+ // TODO: Remove _ajaxSettings() method when removing this extension
+ // ajaxOptions and cache options
+ $.widget( "ui.tabs", $.ui.tabs, {
+ options: {
+ ajaxOptions: null,
+ cache: false
+ },
+
+ _create: function() {
+ this._super();
+
+ var that = this;
+
+ this._on({ tabsbeforeload: function( event, ui ) {
+ // tab is already cached
+ if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) {
+ event.preventDefault();
+ return;
+ }
+
+ ui.jqXHR.success(function() {
+ if ( that.options.cache ) {
+ $.data( ui.tab[ 0 ], "cache.tabs", true );
+ }
+ });
+ }});
+ },
+
+ _ajaxSettings: function( anchor, event, ui ) {
+ var ajaxOptions = this.options.ajaxOptions;
+ return $.extend( {}, ajaxOptions, {
+ error: function( xhr, status ) {
+ try {
+ // Passing index avoid a race condition when this method is
+ // called after the user has selected another tab.
+ // Pass the anchor that initiated this request allows
+ // loadError to manipulate the tab content panel via $(a.hash)
+ ajaxOptions.error(
+ xhr, status, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] );
+ }
+ catch ( error ) {}
+ }
+ }, this._superApply( arguments ) );
+ },
+
+ _setOption: function( key, value ) {
+ // reset cache if switching from cached to not cached
+ if ( key === "cache" && value === false ) {
+ this.anchors.removeData( "cache.tabs" );
+ }
+ this._super( key, value );
+ },
+
+ _destroy: function() {
+ this.anchors.removeData( "cache.tabs" );
+ this._super();
+ },
+
+ url: function( index ){
+ this.anchors.eq( index ).removeData( "cache.tabs" );
+ this._superApply( arguments );
+ }
+ });
+
+ // abort method
+ $.widget( "ui.tabs", $.ui.tabs, {
+ abort: function() {
+ if ( this.xhr ) {
+ this.xhr.abort();
+ }
+ }
+ });
+
+ // spinner
+ $.widget( "ui.tabs", $.ui.tabs, {
+ options: {
+ spinner: "<em>Loading&#8230;</em>"
+ },
+ _create: function() {
+ this._super();
+ this._on({
+ tabsbeforeload: function( event, ui ) {
+ // Don't react to nested tabs or tabs that don't use a spinner
+ if ( event.target !== this.element[ 0 ] ||
+ !this.options.spinner ) {
+ return;
+ }
+
+ var span = ui.tab.find( "span" ),
+ html = span.html();
+ span.html( this.options.spinner );
+ ui.jqXHR.complete(function() {
+ span.html( html );
+ });
+ }
+ });
+ }
+ });
+
+ // enable/disable events
+ $.widget( "ui.tabs", $.ui.tabs, {
+ options: {
+ enable: null,
+ disable: null
+ },
+
+ enable: function( index ) {
+ var options = this.options,
+ trigger;
+
+ if ( index && options.disabled === true ||
+ ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) !== -1 ) ) {
+ trigger = true;
+ }
+
+ this._superApply( arguments );
+
+ if ( trigger ) {
+ this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
+ }
+ },
+
+ disable: function( index ) {
+ var options = this.options,
+ trigger;
+
+ if ( index && options.disabled === false ||
+ ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) === -1 ) ) {
+ trigger = true;
+ }
+
+ this._superApply( arguments );
+
+ if ( trigger ) {
+ this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
+ }
+ }
+ });
+
+ // add/remove methods and events
+ $.widget( "ui.tabs", $.ui.tabs, {
+ options: {
+ add: null,
+ remove: null,
+ tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
+ },
+
+ add: function( url, label, index ) {
+ if ( index === undefined ) {
+ index = this.anchors.length;
+ }
+
+ var doInsertAfter, panel,
+ options = this.options,
+ li = $( options.tabTemplate
+ .replace( /#\{href\}/g, url )
+ .replace( /#\{label\}/g, label ) ),
+ id = !url.indexOf( "#" ) ?
+ url.replace( "#", "" ) :
+ this._tabId( li );
+
+ li.addClass( "ui-state-default ui-corner-top" ).data( "ui-tabs-destroy", true );
+ li.attr( "aria-controls", id );
+
+ doInsertAfter = index >= this.tabs.length;
+
+ // try to find an existing element before creating a new one
+ panel = this.element.find( "#" + id );
+ if ( !panel.length ) {
+ panel = this._createPanel( id );
+ if ( doInsertAfter ) {
+ if ( index > 0 ) {
+ panel.insertAfter( this.panels.eq( -1 ) );
+ } else {
+ panel.appendTo( this.element );
+ }
+ } else {
+ panel.insertBefore( this.panels[ index ] );
+ }
+ }
+ panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ).hide();
+
+ if ( doInsertAfter ) {
+ li.appendTo( this.tablist );
+ } else {
+ li.insertBefore( this.tabs[ index ] );
+ }
+
+ options.disabled = $.map( options.disabled, function( n ) {
+ return n >= index ? ++n : n;
+ });
+
+ this.refresh();
+ if ( this.tabs.length === 1 && options.active === false ) {
+ this.option( "active", 0 );
+ }
+
+ this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
+ return this;
+ },
+
+ remove: function( index ) {
+ index = this._getIndex( index );
+ var options = this.options,
+ tab = this.tabs.eq( index ).remove(),
+ panel = this._getPanelForTab( tab ).remove();
+
+ // If selected tab was removed focus tab to the right or
+ // in case the last tab was removed the tab to the left.
+ // We check for more than 2 tabs, because if there are only 2,
+ // then when we remove this tab, there will only be one tab left
+ // so we don't need to detect which tab to activate.
+ if ( tab.hasClass( "ui-tabs-active" ) && this.anchors.length > 2 ) {
+ this._activate( index + ( index + 1 < this.anchors.length ? 1 : -1 ) );
+ }
+
+ options.disabled = $.map(
+ $.grep( options.disabled, function( n ) {
+ return n !== index;
+ }),
+ function( n ) {
+ return n >= index ? --n : n;
+ });
+
+ this.refresh();
+
+ this._trigger( "remove", null, this._ui( tab.find( "a" )[ 0 ], panel[ 0 ] ) );
+ return this;
+ }
+ });
+
+ // length method
+ $.widget( "ui.tabs", $.ui.tabs, {
+ length: function() {
+ return this.anchors.length;
+ }
+ });
+
+ // panel ids (idPrefix option + title attribute)
+ $.widget( "ui.tabs", $.ui.tabs, {
+ options: {
+ idPrefix: "ui-tabs-"
+ },
+
+ _tabId: function( tab ) {
+ var a = tab.is( "li" ) ? tab.find( "a[href]" ) : tab;
+ a = a[0];
+ return $( a ).closest( "li" ).attr( "aria-controls" ) ||
+ a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF\-]/g, "" ) ||
+ this.options.idPrefix + getNextTabId();
+ }
+ });
+
+ // _createPanel method
+ $.widget( "ui.tabs", $.ui.tabs, {
+ options: {
+ panelTemplate: "<div></div>"
+ },
+
+ _createPanel: function( id ) {
+ return $( this.options.panelTemplate )
+ .attr( "id", id )
+ .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
+ .data( "ui-tabs-destroy", true );
+ }
+ });
+
+ // selected option
+ $.widget( "ui.tabs", $.ui.tabs, {
+ _create: function() {
+ var options = this.options;
+ if ( options.active === null && options.selected !== undefined ) {
+ options.active = options.selected === -1 ? false : options.selected;
+ }
+ this._super();
+ options.selected = options.active;
+ if ( options.selected === false ) {
+ options.selected = -1;
+ }
+ },
+
+ _setOption: function( key, value ) {
+ if ( key !== "selected" ) {
+ return this._super( key, value );
+ }
+
+ var options = this.options;
+ this._super( "active", value === -1 ? false : value );
+ options.selected = options.active;
+ if ( options.selected === false ) {
+ options.selected = -1;
+ }
+ },
+
+ _eventHandler: function() {
+ this._superApply( arguments );
+ this.options.selected = this.options.active;
+ if ( this.options.selected === false ) {
+ this.options.selected = -1;
+ }
+ }
+ });
+
+ // show and select event
+ $.widget( "ui.tabs", $.ui.tabs, {
+ options: {
+ show: null,
+ select: null
+ },
+ _create: function() {
+ this._super();
+ if ( this.options.active !== false ) {
+ this._trigger( "show", null, this._ui(
+ this.active.find( ".ui-tabs-anchor" )[ 0 ],
+ this._getPanelForTab( this.active )[ 0 ] ) );
+ }
+ },
+ _trigger: function( type, event, data ) {
+ var tab, panel,
+ ret = this._superApply( arguments );
+
+ if ( !ret ) {
+ return false;
+ }
+
+ if ( type === "beforeActivate" ) {
+ tab = data.newTab.length ? data.newTab : data.oldTab;
+ panel = data.newPanel.length ? data.newPanel : data.oldPanel;
+ ret = this._super( "select", event, {
+ tab: tab.find( ".ui-tabs-anchor" )[ 0],
+ panel: panel[ 0 ],
+ index: tab.closest( "li" ).index()
+ });
+ } else if ( type === "activate" && data.newTab.length ) {
+ ret = this._super( "show", event, {
+ tab: data.newTab.find( ".ui-tabs-anchor" )[ 0 ],
+ panel: data.newPanel[ 0 ],
+ index: data.newTab.closest( "li" ).index()
+ });
+ }
+ return ret;
+ }
+ });
+
+ // select method
+ $.widget( "ui.tabs", $.ui.tabs, {
+ select: function( index ) {
+ index = this._getIndex( index );
+ if ( index === -1 ) {
+ if ( this.options.collapsible && this.options.selected !== -1 ) {
+ index = this.options.selected;
+ } else {
+ return;
+ }
+ }
+ this.anchors.eq( index ).trigger( this.options.event + this.eventNamespace );
+ }
+ });
+
+ // cookie option
+ (function() {
+
+ var listId = 0;
+
+ $.widget( "ui.tabs", $.ui.tabs, {
+ options: {
+ cookie: null // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
+ },
+ _create: function() {
+ var options = this.options,
+ active;
+ if ( options.active == null && options.cookie ) {
+ active = parseInt( this._cookie(), 10 );
+ if ( active === -1 ) {
+ active = false;
+ }
+ options.active = active;
+ }
+ this._super();
+ },
+ _cookie: function( active ) {
+ var cookie = [ this.cookie ||
+ ( this.cookie = this.options.cookie.name || "ui-tabs-" + (++listId) ) ];
+ if ( arguments.length ) {
+ cookie.push( active === false ? -1 : active );
+ cookie.push( this.options.cookie );
+ }
+ return $.cookie.apply( null, cookie );
+ },
+ _refresh: function() {
+ this._super();
+ if ( this.options.cookie ) {
+ this._cookie( this.options.active, this.options.cookie );
+ }
+ },
+ _eventHandler: function() {
+ this._superApply( arguments );
+ if ( this.options.cookie ) {
+ this._cookie( this.options.active, this.options.cookie );
+ }
+ },
+ _destroy: function() {
+ this._super();
+ if ( this.options.cookie ) {
+ this._cookie( null, this.options.cookie );
+ }
+ }
+ });
+
+ })();
+
+ // load event
+ $.widget( "ui.tabs", $.ui.tabs, {
+ _trigger: function( type, event, data ) {
+ var _data = $.extend( {}, data );
+ if ( type === "load" ) {
+ _data.panel = _data.panel[ 0 ];
+ _data.tab = _data.tab.find( ".ui-tabs-anchor" )[ 0 ];
+ }
+ return this._super( type, event, _data );
+ }
+ });
+
+ // fx option
+ // The new animation options (show, hide) conflict with the old show callback.
+ // The old fx option wins over show/hide anyway (always favor back-compat).
+ // If a user wants to use the new animation API, they must give up the old API.
+ $.widget( "ui.tabs", $.ui.tabs, {
+ options: {
+ fx: null // e.g. { height: "toggle", opacity: "toggle", duration: 200 }
+ },
+
+ _getFx: function() {
+ var hide, show,
+ fx = this.options.fx;
+
+ if ( fx ) {
+ if ( $.isArray( fx ) ) {
+ hide = fx[ 0 ];
+ show = fx[ 1 ];
+ } else {
+ hide = show = fx;
+ }
+ }
+
+ return fx ? { show: show, hide: hide } : null;
+ },
+
+ _toggle: function( event, eventData ) {
+ var that = this,
+ toShow = eventData.newPanel,
+ toHide = eventData.oldPanel,
+ fx = this._getFx();
+
+ if ( !fx ) {
+ return this._super( event, eventData );
+ }
+
+ that.running = true;
+
+ function complete() {
+ that.running = false;
+ that._trigger( "activate", event, eventData );
+ }
+
+ function show() {
+ eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
+
+ if ( toShow.length && fx.show ) {
+ toShow
+ .animate( fx.show, fx.show.duration, function() {
+ complete();
+ });
+ } else {
+ toShow.show();
+ complete();
+ }
+ }
+
+ // start out by hiding, then showing, then completing
+ if ( toHide.length && fx.hide ) {
+ toHide.animate( fx.hide, fx.hide.duration, function() {
+ eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
+ show();
+ });
+ } else {
+ eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
+ toHide.hide();
+ show();
+ }
+ }
+ });
+}
+
+})( jQuery );
+(function( $ ) {
+
+var increments = 0;
+
+function addDescribedBy( elem, id ) {
+ var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
+ describedby.push( id );
+ elem
+ .data( "ui-tooltip-id", id )
+ .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
+}
+
+function removeDescribedBy( elem ) {
+ var id = elem.data( "ui-tooltip-id" ),
+ describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
+ index = $.inArray( id, describedby );
+ if ( index !== -1 ) {
+ describedby.splice( index, 1 );
+ }
+
+ elem.removeData( "ui-tooltip-id" );
+ describedby = $.trim( describedby.join( " " ) );
+ if ( describedby ) {
+ elem.attr( "aria-describedby", describedby );
+ } else {
+ elem.removeAttr( "aria-describedby" );
+ }
+}
+
+$.widget( "ui.tooltip", {
+ version: "1.9.2",
+ options: {
+ content: function() {
+ return $( this ).attr( "title" );
+ },
+ hide: true,
+ // Disabled elements have inconsistent behavior across browsers (#8661)
+ items: "[title]:not([disabled])",
+ position: {
+ my: "left top+15",
+ at: "left bottom",
+ collision: "flipfit flip"
+ },
+ show: true,
+ tooltipClass: null,
+ track: false,
+
+ // callbacks
+ close: null,
+ open: null
+ },
+
+ _create: function() {
+ this._on({
+ mouseover: "open",
+ focusin: "open"
+ });
+
+ // IDs of generated tooltips, needed for destroy
+ this.tooltips = {};
+ // IDs of parent tooltips where we removed the title attribute
+ this.parents = {};
+
+ if ( this.options.disabled ) {
+ this._disable();
+ }
+ },
+
+ _setOption: function( key, value ) {
+ var that = this;
+
+ if ( key === "disabled" ) {
+ this[ value ? "_disable" : "_enable" ]();
+ this.options[ key ] = value;
+ // disable element style changes
+ return;
+ }
+
+ this._super( key, value );
+
+ if ( key === "content" ) {
+ $.each( this.tooltips, function( id, element ) {
+ that._updateContent( element );
+ });
+ }
+ },
+
+ _disable: function() {
+ var that = this;
+
+ // close open tooltips
+ $.each( this.tooltips, function( id, element ) {
+ var event = $.Event( "blur" );
+ event.target = event.currentTarget = element[0];
+ that.close( event, true );
+ });
+
+ // remove title attributes to prevent native tooltips
+ this.element.find( this.options.items ).andSelf().each(function() {
+ var element = $( this );
+ if ( element.is( "[title]" ) ) {
+ element
+ .data( "ui-tooltip-title", element.attr( "title" ) )
+ .attr( "title", "" );
+ }
+ });
+ },
+
+ _enable: function() {
+ // restore title attributes
+ this.element.find( this.options.items ).andSelf().each(function() {
+ var element = $( this );
+ if ( element.data( "ui-tooltip-title" ) ) {
+ element.attr( "title", element.data( "ui-tooltip-title" ) );
+ }
+ });
+ },
+
+ open: function( event ) {
+ var that = this,
+ target = $( event ? event.target : this.element )
+ // we need closest here due to mouseover bubbling,
+ // but always pointing at the same event target
+ .closest( this.options.items );
+
+ // No element to show a tooltip for or the tooltip is already open
+ if ( !target.length || target.data( "ui-tooltip-id" ) ) {
+ return;
+ }
+
+ if ( target.attr( "title" ) ) {
+ target.data( "ui-tooltip-title", target.attr( "title" ) );
+ }
+
+ target.data( "ui-tooltip-open", true );
+
+ // kill parent tooltips, custom or native, for hover
+ if ( event && event.type === "mouseover" ) {
+ target.parents().each(function() {
+ var parent = $( this ),
+ blurEvent;
+ if ( parent.data( "ui-tooltip-open" ) ) {
+ blurEvent = $.Event( "blur" );
+ blurEvent.target = blurEvent.currentTarget = this;
+ that.close( blurEvent, true );
+ }
+ if ( parent.attr( "title" ) ) {
+ parent.uniqueId();
+ that.parents[ this.id ] = {
+ element: this,
+ title: parent.attr( "title" )
+ };
+ parent.attr( "title", "" );
+ }
+ });
+ }
+
+ this._updateContent( target, event );
+ },
+
+ _updateContent: function( target, event ) {
+ var content,
+ contentOption = this.options.content,
+ that = this,
+ eventType = event ? event.type : null;
+
+ if ( typeof contentOption === "string" ) {
+ return this._open( event, target, contentOption );
+ }
+
+ content = contentOption.call( target[0], function( response ) {
+ // ignore async response if tooltip was closed already
+ if ( !target.data( "ui-tooltip-open" ) ) {
+ return;
+ }
+ // IE may instantly serve a cached response for ajax requests
+ // delay this call to _open so the other call to _open runs first
+ that._delay(function() {
+ // jQuery creates a special event for focusin when it doesn't
+ // exist natively. To improve performance, the native event
+ // object is reused and the type is changed. Therefore, we can't
+ // rely on the type being correct after the event finished
+ // bubbling, so we set it back to the previous value. (#8740)
+ if ( event ) {
+ event.type = eventType;
+ }
+ this._open( event, target, response );
+ });
+ });
+ if ( content ) {
+ this._open( event, target, content );
+ }
+ },
+
+ _open: function( event, target, content ) {
+ var tooltip, events, delayedShow,
+ positionOption = $.extend( {}, this.options.position );
+
+ if ( !content ) {
+ return;
+ }
+
+ // Content can be updated multiple times. If the tooltip already
+ // exists, then just update the content and bail.
+ tooltip = this._find( target );
+ if ( tooltip.length ) {
+ tooltip.find( ".ui-tooltip-content" ).html( content );
+ return;
+ }
+
+ // if we have a title, clear it to prevent the native tooltip
+ // we have to check first to avoid defining a title if none exists
+ // (we don't want to cause an element to start matching [title])
+ //
+ // We use removeAttr only for key events, to allow IE to export the correct
+ // accessible attributes. For mouse events, set to empty string to avoid
+ // native tooltip showing up (happens only when removing inside mouseover).
+ if ( target.is( "[title]" ) ) {
+ if ( event && event.type === "mouseover" ) {
+ target.attr( "title", "" );
+ } else {
+ target.removeAttr( "title" );
+ }
+ }
+
+ tooltip = this._tooltip( target );
+ addDescribedBy( target, tooltip.attr( "id" ) );
+ tooltip.find( ".ui-tooltip-content" ).html( content );
+
+ function position( event ) {
+ positionOption.of = event;
+ if ( tooltip.is( ":hidden" ) ) {
+ return;
+ }
+ tooltip.position( positionOption );
+ }
+ if ( this.options.track && event && /^mouse/.test( event.type ) ) {
+ this._on( this.document, {
+ mousemove: position
+ });
+ // trigger once to override element-relative positioning
+ position( event );
+ } else {
+ tooltip.position( $.extend({
+ of: target
+ }, this.options.position ) );
+ }
+
+ tooltip.hide();
+
+ this._show( tooltip, this.options.show );
+ // Handle tracking tooltips that are shown with a delay (#8644). As soon
+ // as the tooltip is visible, position the tooltip using the most recent
+ // event.
+ if ( this.options.show && this.options.show.delay ) {
+ delayedShow = setInterval(function() {
+ if ( tooltip.is( ":visible" ) ) {
+ position( positionOption.of );
+ clearInterval( delayedShow );
+ }
+ }, $.fx.interval );
+ }
+
+ this._trigger( "open", event, { tooltip: tooltip } );
+
+ events = {
+ keyup: function( event ) {
+ if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
+ var fakeEvent = $.Event(event);
+ fakeEvent.currentTarget = target[0];
+ this.close( fakeEvent, true );
+ }
+ },
+ remove: function() {
+ this._removeTooltip( tooltip );
+ }
+ };
+ if ( !event || event.type === "mouseover" ) {
+ events.mouseleave = "close";
+ }
+ if ( !event || event.type === "focusin" ) {
+ events.focusout = "close";
+ }
+ this._on( true, target, events );
+ },
+
+ close: function( event ) {
+ var that = this,
+ target = $( event ? event.currentTarget : this.element ),
+ tooltip = this._find( target );
+
+ // disabling closes the tooltip, so we need to track when we're closing
+ // to avoid an infinite loop in case the tooltip becomes disabled on close
+ if ( this.closing ) {
+ return;
+ }
+
+ // only set title if we had one before (see comment in _open())
+ if ( target.data( "ui-tooltip-title" ) ) {
+ target.attr( "title", target.data( "ui-tooltip-title" ) );
+ }
+
+ removeDescribedBy( target );
+
+ tooltip.stop( true );
+ this._hide( tooltip, this.options.hide, function() {
+ that._removeTooltip( $( this ) );
+ });
+
+ target.removeData( "ui-tooltip-open" );
+ this._off( target, "mouseleave focusout keyup" );
+ // Remove 'remove' binding only on delegated targets
+ if ( target[0] !== this.element[0] ) {
+ this._off( target, "remove" );
+ }
+ this._off( this.document, "mousemove" );
+
+ if ( event && event.type === "mouseleave" ) {
+ $.each( this.parents, function( id, parent ) {
+ $( parent.element ).attr( "title", parent.title );
+ delete that.parents[ id ];
+ });
+ }
+
+ this.closing = true;
+ this._trigger( "close", event, { tooltip: tooltip } );
+ this.closing = false;
+ },
+
+ _tooltip: function( element ) {
+ var id = "ui-tooltip-" + increments++,
+ tooltip = $( "<div>" )
+ .attr({
+ id: id,
+ role: "tooltip"
+ })
+ .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
+ ( this.options.tooltipClass || "" ) );
+ $( "<div>" )
+ .addClass( "ui-tooltip-content" )
+ .appendTo( tooltip );
+ tooltip.appendTo( this.document[0].body );
+ if ( $.fn.bgiframe ) {
+ tooltip.bgiframe();
+ }
+ this.tooltips[ id ] = element;
+ return tooltip;
+ },
+
+ _find: function( target ) {
+ var id = target.data( "ui-tooltip-id" );
+ return id ? $( "#" + id ) : $();
+ },
+
+ _removeTooltip: function( tooltip ) {
+ tooltip.remove();
+ delete this.tooltips[ tooltip.attr( "id" ) ];
+ },
+
+ _destroy: function() {
+ var that = this;
+
+ // close open tooltips
+ $.each( this.tooltips, function( id, element ) {
+ // Delegate to close method to handle common cleanup
+ var event = $.Event( "blur" );
+ event.target = event.currentTarget = element[0];
+ that.close( event, true );
+
+ // Remove immediately; destroying an open tooltip doesn't use the
+ // hide animation
+ $( "#" + id ).remove();
+
+ // Restore the title
+ if ( element.data( "ui-tooltip-title" ) ) {
+ element.attr( "title", element.data( "ui-tooltip-title" ) );
+ element.removeData( "ui-tooltip-title" );
+ }
+ });
+ }
+});
+
+}( jQuery ) );
diff --git a/Software/.jxbrowser-data/Cache/f_000013 b/Software/.jxbrowser-data/Cache/f_000013
new file mode 100644
index 000000000..f0ce7581f
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_000013
@@ -0,0 +1,28 @@
+!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){(function(process,global){!function(global,factory){"object"==typeof exports&&void 0!==module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory(global.async=global.async||{})}(this,function(exports){"use strict";function slice(arrayLike,start){start|=0;for(var newLen=Math.max(arrayLike.length-start,0),newArr=Array(newLen),idx=0;idx<newLen;idx++)newArr[idx]=arrayLike[start+idx];return newArr}function isObject(value){var type=typeof value;return null!=value&&("object"==type||"function"==type)}function fallback(fn){setTimeout(fn,0)}function wrap(defer){return function(fn){var args=slice(arguments,1);defer(function(){fn.apply(null,args)})}}function asyncify(func){return initialParams(function(args,callback){var result;try{result=func.apply(this,args)}catch(e){return callback(e)}isObject(result)&&"function"==typeof result.then?result.then(function(value){invokeCallback(callback,null,value)},function(err){invokeCallback(callback,err.message?err:new Error(err))}):callback(null,result)})}function invokeCallback(callback,error,value){try{callback(error,value)}catch(e){setImmediate$1(rethrow,e)}}function rethrow(error){throw error}function isAsync(fn){return supportsSymbol&&"AsyncFunction"===fn[Symbol.toStringTag]}function wrapAsync(asyncFn){return isAsync(asyncFn)?asyncify(asyncFn):asyncFn}function applyEach$1(eachfn){return function(fns){var args=slice(arguments,1),go=initialParams(function(args,callback){var that=this;return eachfn(fns,function(fn,cb){wrapAsync(fn).apply(that,args.concat(cb))},callback)});return args.length?go.apply(this,args):go}}function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag$1),tag=value[symToStringTag$1];try{value[symToStringTag$1]=void 0;var unmasked=!0}catch(e){}var result=nativeObjectToString.call(value);return unmasked&&(isOwn?value[symToStringTag$1]=tag:delete value[symToStringTag$1]),result}function objectToString(value){return nativeObjectToString$1.call(value)}function baseGetTag(value){return null==value?void 0===value?undefinedTag:nullTag:(value=Object(value),symToStringTag&&symToStringTag in value?getRawTag(value):objectToString(value))}function isFunction(value){if(!isObject(value))return!1;var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function noop(){}function once(fn){return function(){if(null!==fn){var callFn=fn;fn=null,callFn.apply(this,arguments)}}}function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}function isObjectLike(value){return null!=value&&"object"==typeof value}function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag}function stubFalse(){return!1}function isIndex(value,length){return!!(length=null==length?MAX_SAFE_INTEGER$1:length)&&("number"==typeof value||reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value)!inherited&&!hasOwnProperty$1.call(value,key)||skipIndexes&&("length"==key||isBuff&&("offset"==key||"parent"==key)||isType&&("buffer"==key||"byteLength"==key||"byteOffset"==key)||isIndex(key,length))||result.push(key);return result}function isPrototype(value){var Ctor=value&&value.constructor;return value===("function"==typeof Ctor&&Ctor.prototype||objectProto$5)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty$3.call(object,key)&&"constructor"!=key&&result.push(key);return result}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function createArrayIterator(coll){var i=-1,len=coll.length;return function(){return++i<len?{value:coll[i],key:i}:null}}function createES2015Iterator(iterator){var i=-1;return function(){var item=iterator.next();return item.done?null:(i++,{value:item.value,key:i})}}function createObjectIterator(obj){var okeys=keys(obj),i=-1,len=okeys.length;return function(){var key=okeys[++i];return i<len?{value:obj[key],key:key}:null}}function iterator(coll){if(isArrayLike(coll))return createArrayIterator(coll);var iterator=getIterator(coll);return iterator?createES2015Iterator(iterator):createObjectIterator(coll)}function onlyOnce(fn){return function(){if(null===fn)throw new Error("Callback was already called.");var callFn=fn;fn=null,callFn.apply(this,arguments)}}function _eachOfLimit(limit){return function(obj,iteratee,callback){function iterateeCallback(err,value){if(running-=1,err)done=!0,callback(err);else{if(value===breakLoop||done&&running<=0)return done=!0,callback(null);replenish()}}function replenish(){for(;running<limit&&!done;){var elem=nextElem();if(null===elem)return done=!0,void(running<=0&&callback(null));running+=1,iteratee(elem.value,elem.key,onlyOnce(iterateeCallback))}}if(callback=once(callback||noop),limit<=0||!obj)return callback(null);var nextElem=iterator(obj),done=!1,running=0;replenish()}}function eachOfLimit(coll,limit,iteratee,callback){_eachOfLimit(limit)(coll,wrapAsync(iteratee),callback)}function doLimit(fn,limit){return function(iterable,iteratee,callback){return fn(iterable,limit,iteratee,callback)}}function eachOfArrayLike(coll,iteratee,callback){function iteratorCallback(err,value){err?callback(err):++completed!==length&&value!==breakLoop||callback(null)}callback=once(callback||noop);var index=0,completed=0,length=coll.length;for(0===length&&callback(null);index<length;index++)iteratee(coll[index],index,onlyOnce(iteratorCallback))}function doParallel(fn){return function(obj,iteratee,callback){return fn(eachOf,obj,wrapAsync(iteratee),callback)}}function _asyncMap(eachfn,arr,iteratee,callback){callback=callback||noop,arr=arr||[];var results=[],counter=0,_iteratee=wrapAsync(iteratee);eachfn(arr,function(value,_,callback){var index=counter++;_iteratee(value,function(err,v){results[index]=v,callback(err)})},function(err){callback(err,results)})}function doParallelLimit(fn){return function(obj,limit,iteratee,callback){return fn(_eachOfLimit(limit),obj,wrapAsync(iteratee),callback)}}function arrayEach(array,iteratee){for(var index=-1,length=null==array?0:array.length;++index<length&&!1!==iteratee(array[index],index,array););return array}function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}function baseFindIndex(array,predicate,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?1:-1);fromRight?index--:++index<length;)if(predicate(array[index],index,array))return index;return-1}function baseIsNaN(value){return value!==value}function strictIndexOf(array,value,fromIndex){for(var index=fromIndex-1,length=array.length;++index<length;)if(array[index]===value)return index;return-1}function baseIndexOf(array,value,fromIndex){return value===value?strictIndexOf(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex)}function arrayMap(array,iteratee){for(var index=-1,length=null==array?0:array.length,result=Array(length);++index<length;)result[index]=iteratee(array[index],index,array);return result}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&baseGetTag(value)==symbolTag}function baseToString(value){if("string"==typeof value)return value;if(isArray(value))return arrayMap(value,baseToString)+"";if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function baseSlice(array,start,end){var index=-1,length=array.length;start<0&&(start=-start>length?0:length+start),end=end>length?length:end,end<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index<length;)result[index]=array[index+start];return result}function castSlice(array,start,end){var length=array.length;return end=void 0===end?length:end,!start&&end>=length?array:baseSlice(array,start,end)}function charsEndIndex(strSymbols,chrSymbols){for(var index=strSymbols.length;index--&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}function charsStartIndex(strSymbols,chrSymbols){for(var index=-1,length=strSymbols.length;++index<length&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}function asciiToArray(string){return string.split("")}function hasUnicode(string){return reHasUnicode.test(string)}function unicodeToArray(string){return string.match(reUnicode)||[]}function stringToArray(string){return hasUnicode(string)?unicodeToArray(string):asciiToArray(string)}function toString(value){return null==value?"":baseToString(value)}function trim(string,chars,guard){if((string=toString(string))&&(guard||void 0===chars))return string.replace(reTrim,"");if(!string||!(chars=baseToString(chars)))return string;var strSymbols=stringToArray(string),chrSymbols=stringToArray(chars);return castSlice(strSymbols,charsStartIndex(strSymbols,chrSymbols),charsEndIndex(strSymbols,chrSymbols)+1).join("")}function parseParams(func){return func=func.toString().replace(STRIP_COMMENTS,""),func=func.match(FN_ARGS)[2].replace(" ",""),func=func?func.split(FN_ARG_SPLIT):[],func=func.map(function(arg){return trim(arg.replace(FN_ARG,""))})}function autoInject(tasks,callback){var newTasks={};baseForOwn(tasks,function(taskFn,key){function newTask(results,taskCb){var newArgs=arrayMap(params,function(name){return results[name]});newArgs.push(taskCb),wrapAsync(taskFn).apply(null,newArgs)}var params,fnIsAsync=isAsync(taskFn),hasNoDeps=!fnIsAsync&&1===taskFn.length||fnIsAsync&&0===taskFn.length;if(isArray(taskFn))params=taskFn.slice(0,-1),taskFn=taskFn[taskFn.length-1],newTasks[key]=params.concat(params.length>0?newTask:taskFn);else if(hasNoDeps)newTasks[key]=taskFn;else{if(params=parseParams(taskFn),0===taskFn.length&&!fnIsAsync&&0===params.length)throw new Error("autoInject task functions require explicit parameters.");fnIsAsync||params.pop(),newTasks[key]=params.concat(newTask)}}),auto(newTasks,callback)}function DLL(){this.head=this.tail=null,this.length=0}function setInitial(dll,node){dll.length=1,dll.head=dll.tail=node}function queue(worker,concurrency,payload){function _insert(data,insertAtFront,callback){if(null!=callback&&"function"!=typeof callback)throw new Error("task callback must be a function");if(q.started=!0,isArray(data)||(data=[data]),0===data.length&&q.idle())return setImmediate$1(function(){q.drain()});for(var i=0,l=data.length;i<l;i++){var item={data:data[i],callback:callback||noop};insertAtFront?q._tasks.unshift(item):q._tasks.push(item)}setImmediate$1(q.process)}function _next(tasks){return function(err){numRunning-=1;for(var i=0,l=tasks.length;i<l;i++){var task=tasks[i],index=baseIndexOf(workersList,task,0);index>=0&&workersList.splice(index),task.callback.apply(task,arguments),null!=err&&q.error(err,task.data)}numRunning<=q.concurrency-q.buffer&&q.unsaturated(),q.idle()&&q.drain(),q.process()}}if(null==concurrency)concurrency=1;else if(0===concurrency)throw new Error("Concurrency must not be zero");var _worker=wrapAsync(worker),numRunning=0,workersList=[],isProcessing=!1,q={_tasks:new DLL,concurrency:concurrency,payload:payload,saturated:noop,unsaturated:noop,buffer:concurrency/4,empty:noop,drain:noop,error:noop,started:!1,paused:!1,push:function(data,callback){_insert(data,!1,callback)},kill:function(){q.drain=noop,q._tasks.empty()},unshift:function(data,callback){_insert(data,!0,callback)},remove:function(testFn){q._tasks.remove(testFn)},process:function(){if(!isProcessing){for(isProcessing=!0;!q.paused&&numRunning<q.concurrency&&q._tasks.length;){var tasks=[],data=[],l=q._tasks.length;q.payload&&(l=Math.min(l,q.payload));for(var i=0;i<l;i++){var node=q._tasks.shift();tasks.push(node),data.push(node.data)}numRunning+=1,workersList.push(tasks[0]),0===q._tasks.length&&q.empty(),numRunning===q.concurrency&&q.saturated();var cb=onlyOnce(_next(tasks));_worker(data,cb)}isProcessing=!1}},length:function(){return q._tasks.length},running:function(){return numRunning},workersList:function(){return workersList},idle:function(){return q._tasks.length+numRunning===0},pause:function(){q.paused=!0},resume:function(){!1!==q.paused&&(q.paused=!1,setImmediate$1(q.process))}};return q}function cargo(worker,payload){return queue(worker,1,payload)}function reduce(coll,memo,iteratee,callback){callback=once(callback||noop);var _iteratee=wrapAsync(iteratee);eachOfSeries(coll,function(x,i,callback){_iteratee(memo,x,function(err,v){memo=v,callback(err)})},function(err){callback(err,memo)})}function seq(){var _functions=arrayMap(arguments,wrapAsync);return function(){var args=slice(arguments),that=this,cb=args[args.length-1];"function"==typeof cb?args.pop():cb=noop,reduce(_functions,args,function(newargs,fn,cb){fn.apply(that,newargs.concat(function(err){var nextargs=slice(arguments,1);cb(err,nextargs)}))},function(err,results){cb.apply(that,[err].concat(results))})}}function concat$1(eachfn,arr,fn,callback){var result=[];eachfn(arr,function(x,index,cb){fn(x,function(err,y){result=result.concat(y||[]),cb(err)})},function(err){callback(err,result)})}function identity(value){return value}function _createTester(check,getResult){return function(eachfn,arr,iteratee,cb){cb=cb||noop;var testResult,testPassed=!1;eachfn(arr,function(value,_,callback){iteratee(value,function(err,result){err?callback(err):check(result)&&!testResult?(testPassed=!0,testResult=getResult(!0,value),callback(null,breakLoop)):callback()})},function(err){err?cb(err):cb(null,testPassed?testResult:getResult(!1))})}}function _findGetResult(v,x){return x}function consoleFunc(name){return function(fn){var args=slice(arguments,1);args.push(function(err){var args=slice(arguments,1);"object"==typeof console&&(err?console.error&&console.error(err):console[name]&&arrayEach(args,function(x){console[name](x)}))}),wrapAsync(fn).apply(null,args)}}function doDuring(fn,test,callback){function next(err){if(err)return callback(err);var args=slice(arguments,1);args.push(check),_test.apply(this,args)}function check(err,truth){return err?callback(err):truth?void _fn(next):callback(null)}callback=onlyOnce(callback||noop);var _fn=wrapAsync(fn),_test=wrapAsync(test);check(null,!0)}function doWhilst(iteratee,test,callback){callback=onlyOnce(callback||noop);var _iteratee=wrapAsync(iteratee),next=function(err){if(err)return callback(err);var args=slice(arguments,1);if(test.apply(this,args))return _iteratee(next);callback.apply(null,[null].concat(args))};_iteratee(next)}function doUntil(iteratee,test,callback){doWhilst(iteratee,function(){return!test.apply(this,arguments)},callback)}function during(test,fn,callback){function next(err){if(err)return callback(err);_test(check)}function check(err,truth){return err?callback(err):truth?void _fn(next):callback(null)}callback=onlyOnce(callback||noop);var _fn=wrapAsync(fn),_test=wrapAsync(test);_test(check)}function _withoutIndex(iteratee){return function(value,index,callback){return iteratee(value,callback)}}function eachLimit(coll,iteratee,callback){eachOf(coll,_withoutIndex(wrapAsync(iteratee)),callback)}function eachLimit$1(coll,limit,iteratee,callback){_eachOfLimit(limit)(coll,_withoutIndex(wrapAsync(iteratee)),callback)}function ensureAsync(fn){return isAsync(fn)?fn:initialParams(function(args,callback){var sync=!0;args.push(function(){var innerArgs=arguments;sync?setImmediate$1(function(){callback.apply(null,innerArgs)}):callback.apply(null,innerArgs)}),fn.apply(this,args),sync=!1})}function notId(v){return!v}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function filterArray(eachfn,arr,iteratee,callback){var truthValues=new Array(arr.length);eachfn(arr,function(x,index,callback){iteratee(x,function(err,v){truthValues[index]=!!v,callback(err)})},function(err){if(err)return callback(err);for(var results=[],i=0;i<arr.length;i++)truthValues[i]&&results.push(arr[i]);callback(null,results)})}function filterGeneric(eachfn,coll,iteratee,callback){var results=[];eachfn(coll,function(x,index,callback){iteratee(x,function(err,v){err?callback(err):(v&&results.push({index:index,value:x}),callback())})},function(err){err?callback(err):callback(null,arrayMap(results.sort(function(a,b){return a.index-b.index}),baseProperty("value")))})}function _filter(eachfn,coll,iteratee,callback){(isArrayLike(coll)?filterArray:filterGeneric)(eachfn,coll,wrapAsync(iteratee),callback||noop)}function forever(fn,errback){function next(err){if(err)return done(err);task(next)}var done=onlyOnce(errback||noop),task=wrapAsync(ensureAsync(fn));next()}function mapValuesLimit(obj,limit,iteratee,callback){callback=once(callback||noop);var newObj={},_iteratee=wrapAsync(iteratee);eachOfLimit(obj,limit,function(val,key,next){_iteratee(val,key,function(err,result){if(err)return next(err);newObj[key]=result,next()})},function(err){callback(err,newObj)})}function has(obj,key){return key in obj}function memoize(fn,hasher){var memo=Object.create(null),queues=Object.create(null);hasher=hasher||identity;var _fn=wrapAsync(fn),memoized=initialParams(function(args,callback){var key=hasher.apply(null,args);has(memo,key)?setImmediate$1(function(){callback.apply(null,memo[key])}):has(queues,key)?queues[key].push(callback):(queues[key]=[callback],_fn.apply(null,args.concat(function(){var args=slice(arguments);memo[key]=args;var q=queues[key];delete queues[key];for(var i=0,l=q.length;i<l;i++)q[i].apply(null,args)})))});return memoized.memo=memo,memoized.unmemoized=fn,memoized}function _parallel(eachfn,tasks,callback){callback=callback||noop;var results=isArrayLike(tasks)?[]:{};eachfn(tasks,function(task,key,callback){wrapAsync(task)(function(err,result){arguments.length>2&&(result=slice(arguments,1)),results[key]=result,callback(err)})},function(err){callback(err,results)})}function parallelLimit(tasks,callback){_parallel(eachOf,tasks,callback)}function parallelLimit$1(tasks,limit,callback){_parallel(_eachOfLimit(limit),tasks,callback)}function race(tasks,callback){if(callback=once(callback||noop),!isArray(tasks))return callback(new TypeError("First argument to race must be an array of functions"));if(!tasks.length)return callback();for(var i=0,l=tasks.length;i<l;i++)wrapAsync(tasks[i])(callback)}function reduceRight(array,memo,iteratee,callback){reduce(slice(array).reverse(),memo,iteratee,callback)}function reflect(fn){var _fn=wrapAsync(fn);return initialParams(function(args,reflectCallback){return args.push(function(error,cbArg){if(error)reflectCallback(null,{error:error});else{var value;value=arguments.length<=2?cbArg:slice(arguments,1),reflectCallback(null,{value:value})}}),_fn.apply(this,args)})}function reject$1(eachfn,arr,iteratee,callback){_filter(eachfn,arr,function(value,cb){iteratee(value,function(err,v){cb(err,!v)})},callback)}function reflectAll(tasks){var results;return isArray(tasks)?results=arrayMap(tasks,reflect):(results={},baseForOwn(tasks,function(task,key){results[key]=reflect.call(this,task)})),results}function constant$1(value){return function(){return value}}function retry(opts,task,callback){function retryAttempt(){_task(function(err){err&&attempt++<options.times&&("function"!=typeof options.errorFilter||options.errorFilter(err))?setTimeout(retryAttempt,options.intervalFunc(attempt)):callback.apply(null,arguments)})}var DEFAULT_TIMES=5,DEFAULT_INTERVAL=0,options={times:DEFAULT_TIMES,intervalFunc:constant$1(DEFAULT_INTERVAL)};if(arguments.length<3&&"function"==typeof opts?(callback=task||noop,task=opts):(!function(acc,t){if("object"==typeof t)acc.times=+t.times||DEFAULT_TIMES,acc.intervalFunc="function"==typeof t.interval?t.interval:constant$1(+t.interval||DEFAULT_INTERVAL),acc.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");acc.times=+t||DEFAULT_TIMES}}(options,opts),callback=callback||noop),"function"!=typeof task)throw new Error("Invalid arguments for async.retry");var _task=wrapAsync(task),attempt=1;retryAttempt()}function series(tasks,callback){_parallel(eachOfSeries,tasks,callback)}function sortBy(coll,iteratee,callback){function comparator(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0}var _iteratee=wrapAsync(iteratee);map(coll,function(x,callback){_iteratee(x,function(err,criteria){if(err)return callback(err);callback(null,{value:x,criteria:criteria})})},function(err,results){if(err)return callback(err);callback(null,arrayMap(results.sort(comparator),baseProperty("value")))})}function timeout(asyncFn,milliseconds,info){function injectedCallback(){timedOut||(originalCallback.apply(null,arguments),clearTimeout(timer))}function timeoutCallback(){var name=asyncFn.name||"anonymous",error=new Error('Callback function "'+name+'" timed out.');error.code="ETIMEDOUT",info&&(error.info=info),timedOut=!0,originalCallback(error)}var originalCallback,timer,timedOut=!1,fn=wrapAsync(asyncFn);return initialParams(function(args,origCallback){originalCallback=origCallback,timer=setTimeout(timeoutCallback,milliseconds),fn.apply(null,args.concat(injectedCallback))})}function baseRange(start,end,step,fromRight){for(var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);length--;)result[fromRight?length:++index]=start,start+=step;return result}function timeLimit(count,limit,iteratee,callback){var _iteratee=wrapAsync(iteratee);mapLimit(baseRange(0,count,1),limit,_iteratee,callback)}function transform(coll,accumulator,iteratee,callback){arguments.length<=3&&(callback=iteratee,iteratee=accumulator,accumulator=isArray(coll)?[]:{}),callback=once(callback||noop);var _iteratee=wrapAsync(iteratee);eachOf(coll,function(v,k,cb){_iteratee(accumulator,v,k,cb)},function(err){callback(err,accumulator)})}function tryEach(tasks,callback){var result,error=null;callback=callback||noop,eachSeries(tasks,function(task,callback){wrapAsync(task)(function(err,res){result=arguments.length>2?slice(arguments,1):res,error=err,callback(!err)})},function(){callback(error,result)})}function unmemoize(fn){return function(){return(fn.unmemoized||fn).apply(null,arguments)}}function whilst(test,iteratee,callback){callback=onlyOnce(callback||noop);var _iteratee=wrapAsync(iteratee);if(!test())return callback(null);var next=function(err){if(err)return callback(err);if(test())return _iteratee(next);var args=slice(arguments,1);callback.apply(null,[null].concat(args))};_iteratee(next)}function until(test,iteratee,callback){whilst(function(){return!test.apply(this,arguments)},iteratee,callback)}var _defer,initialParams=function(fn){return function(){var args=slice(arguments),callback=args.pop();fn.call(this,args,callback)}},hasSetImmediate="function"==typeof setImmediate&&setImmediate,hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;_defer=hasSetImmediate?setImmediate:hasNextTick?process.nextTick:fallback;var setImmediate$1=wrap(_defer),supportsSymbol="function"==typeof Symbol,freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0,objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0,asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]",MAX_SAFE_INTEGER=9007199254740991,breakLoop={},iteratorSymbol="function"==typeof Symbol&&Symbol.iterator,getIterator=function(coll){return iteratorSymbol&&coll[iteratorSymbol]&&coll[iteratorSymbol]()},argsTag="[object Arguments]",objectProto$3=Object.prototype,hasOwnProperty$2=objectProto$3.hasOwnProperty,propertyIsEnumerable=objectProto$3.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty$2.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")},isArray=Array.isArray,freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer=moduleExports?root.Buffer:void 0,nativeIsBuffer=Buffer?Buffer.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse,MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/,typedArrayTags={};typedArrayTags["[object Float32Array]"]=typedArrayTags["[object Float64Array]"]=typedArrayTags["[object Int8Array]"]=typedArrayTags["[object Int16Array]"]=typedArrayTags["[object Int32Array]"]=typedArrayTags["[object Uint8Array]"]=typedArrayTags["[object Uint8ClampedArray]"]=typedArrayTags["[object Uint16Array]"]=typedArrayTags["[object Uint32Array]"]=!0,typedArrayTags["[object Arguments]"]=typedArrayTags["[object Array]"]=typedArrayTags["[object ArrayBuffer]"]=typedArrayTags["[object Boolean]"]=typedArrayTags["[object DataView]"]=typedArrayTags["[object Date]"]=typedArrayTags["[object Error]"]=typedArrayTags["[object Function]"]=typedArrayTags["[object Map]"]=typedArrayTags["[object Number]"]=typedArrayTags["[object Object]"]=typedArrayTags["[object RegExp]"]=typedArrayTags["[object Set]"]=typedArrayTags["[object String]"]=typedArrayTags["[object WeakMap]"]=!1;var freeExports$1="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal.process,nodeUtil=function(){try{return freeProcess&&freeProcess.binding("util")}catch(e){}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?function(func){return function(value){return func(value)}}(nodeIsTypedArray):baseIsTypedArray,objectProto$2=Object.prototype,hasOwnProperty$1=objectProto$2.hasOwnProperty,objectProto$5=Object.prototype,nativeKeys=function(func,transform){return function(arg){return func(transform(arg))}}(Object.keys,Object),objectProto$4=Object.prototype,hasOwnProperty$3=objectProto$4.hasOwnProperty,eachOfGeneric=doLimit(eachOfLimit,1/0),eachOf=function(coll,iteratee,callback){(isArrayLike(coll)?eachOfArrayLike:eachOfGeneric)(coll,wrapAsync(iteratee),callback)},map=doParallel(_asyncMap),applyEach=applyEach$1(map),mapLimit=doParallelLimit(_asyncMap),mapSeries=doLimit(mapLimit,1),applyEachSeries=applyEach$1(mapSeries),apply=function(fn){var args=slice(arguments,1);return function(){var callArgs=slice(arguments);return fn.apply(null,args.concat(callArgs))}},baseFor=function(fromRight){return function(object,iteratee,keysFunc){for(var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;length--;){var key=props[fromRight?length:++index];if(!1===iteratee(iterable[key],key,iterable))break}return object}}(),auto=function(tasks,concurrency,callback){function enqueueTask(key,task){readyTasks.push(function(){runTask(key,task)})}function processQueue(){if(0===readyTasks.length&&0===runningTasks)return callback(null,results);for(;readyTasks.length&&runningTasks<concurrency;){readyTasks.shift()()}}function addListener(taskName,fn){var taskListeners=listeners[taskName];taskListeners||(taskListeners=listeners[taskName]=[]),taskListeners.push(fn)}function taskComplete(taskName){arrayEach(listeners[taskName]||[],function(fn){fn()}),processQueue()}function runTask(key,task){if(!hasError){var taskCallback=onlyOnce(function(err,result){if(runningTasks--,arguments.length>2&&(result=slice(arguments,1)),err){var safeResults={};baseForOwn(results,function(val,rkey){safeResults[rkey]=val}),safeResults[key]=result,hasError=!0,listeners=Object.create(null),callback(err,safeResults)}else results[key]=result,taskComplete(key)});runningTasks++;var taskFn=wrapAsync(task[task.length-1]);task.length>1?taskFn(results,taskCallback):taskFn(taskCallback)}}function getDependents(taskName){var result=[];return baseForOwn(tasks,function(task,key){isArray(task)&&baseIndexOf(task,taskName,0)>=0&&result.push(key)}),result}"function"==typeof concurrency&&(callback=concurrency,concurrency=null),callback=once(callback||noop);var keys$$1=keys(tasks),numTasks=keys$$1.length;if(!numTasks)return callback(null);concurrency||(concurrency=numTasks);var results={},runningTasks=0,hasError=!1,listeners=Object.create(null),readyTasks=[],readyToCheck=[],uncheckedDependencies={};baseForOwn(tasks,function(task,key){if(!isArray(task))return enqueueTask(key,[task]),void readyToCheck.push(key);var dependencies=task.slice(0,task.length-1),remainingDependencies=dependencies.length;if(0===remainingDependencies)return enqueueTask(key,task),void readyToCheck.push(key);uncheckedDependencies[key]=remainingDependencies,arrayEach(dependencies,function(dependencyName){if(!tasks[dependencyName])throw new Error("async.auto task `"+key+"` has a non-existent dependency `"+dependencyName+"` in "+dependencies.join(", "));addListener(dependencyName,function(){0===--remainingDependencies&&enqueueTask(key,task)})})}),function(){for(var currentTask,counter=0;readyToCheck.length;)currentTask=readyToCheck.pop(),counter++,arrayEach(getDependents(currentTask),function(dependent){0==--uncheckedDependencies[dependent]&&readyToCheck.push(dependent)});if(counter!==numTasks)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),processQueue()},symbolTag="[object Symbol]",INFINITY=1/0,symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0,reHasUnicode=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),rsCombo="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",reOptMod="(?:[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]|\\ud83c[\\udffb-\\udfff])?",rsOptJoin="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",rsRegional,rsSurrPair].join("|")+")[\\ufe0e\\ufe0f]?"+reOptMod+")*",rsSeq="[\\ufe0e\\ufe0f]?"+reOptMod+rsOptJoin,rsSymbol="(?:"+["[^\\ud800-\\udfff]"+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,"[\\ud800-\\udfff]"].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g"),reTrim=/^\s+|\s+$/g,FN_ARGS=/^(?:async\s+)?(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,FN_ARG_SPLIT=/,/,FN_ARG=/(=.+)?(\s*)$/,STRIP_COMMENTS=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;DLL.prototype.removeLink=function(node){return node.prev?node.prev.next=node.next:this.head=node.next,node.next?node.next.prev=node.prev:this.tail=node.prev,node.prev=node.next=null,this.length-=1,node},DLL.prototype.empty=function(){for(;this.head;)this.shift();return this},DLL.prototype.insertAfter=function(node,newNode){newNode.prev=node,newNode.next=node.next,node.next?node.next.prev=newNode:this.tail=newNode,
+node.next=newNode,this.length+=1},DLL.prototype.insertBefore=function(node,newNode){newNode.prev=node.prev,newNode.next=node,node.prev?node.prev.next=newNode:this.head=newNode,node.prev=newNode,this.length+=1},DLL.prototype.unshift=function(node){this.head?this.insertBefore(this.head,node):setInitial(this,node)},DLL.prototype.push=function(node){this.tail?this.insertAfter(this.tail,node):setInitial(this,node)},DLL.prototype.shift=function(){return this.head&&this.removeLink(this.head)},DLL.prototype.pop=function(){return this.tail&&this.removeLink(this.tail)},DLL.prototype.toArray=function(){for(var arr=Array(this.length),curr=this.head,idx=0;idx<this.length;idx++)arr[idx]=curr.data,curr=curr.next;return arr},DLL.prototype.remove=function(testFn){for(var curr=this.head;curr;){var next=curr.next;testFn(curr)&&this.removeLink(curr),curr=next}return this};var _defer$1,eachOfSeries=doLimit(eachOfLimit,1),compose=function(){return seq.apply(null,slice(arguments).reverse())},concat=doParallel(concat$1),concatSeries=function(fn){return function(obj,iteratee,callback){return fn(eachOfSeries,obj,wrapAsync(iteratee),callback)}}(concat$1),constant=function(){var values=slice(arguments),args=[null].concat(values);return function(){return arguments[arguments.length-1].apply(this,args)}},detect=doParallel(_createTester(identity,_findGetResult)),detectLimit=doParallelLimit(_createTester(identity,_findGetResult)),detectSeries=doLimit(detectLimit,1),dir=consoleFunc("dir"),eachSeries=doLimit(eachLimit$1,1),every=doParallel(_createTester(notId,notId)),everyLimit=doParallelLimit(_createTester(notId,notId)),everySeries=doLimit(everyLimit,1),filter=doParallel(_filter),filterLimit=doParallelLimit(_filter),filterSeries=doLimit(filterLimit,1),groupByLimit=function(coll,limit,iteratee,callback){callback=callback||noop;var _iteratee=wrapAsync(iteratee);mapLimit(coll,limit,function(val,callback){_iteratee(val,function(err,key){return err?callback(err):callback(null,{key:key,val:val})})},function(err,mapResults){for(var result={},hasOwnProperty=Object.prototype.hasOwnProperty,i=0;i<mapResults.length;i++)if(mapResults[i]){var key=mapResults[i].key,val=mapResults[i].val;hasOwnProperty.call(result,key)?result[key].push(val):result[key]=[val]}return callback(err,result)})},groupBy=doLimit(groupByLimit,1/0),groupBySeries=doLimit(groupByLimit,1),log=consoleFunc("log"),mapValues=doLimit(mapValuesLimit,1/0),mapValuesSeries=doLimit(mapValuesLimit,1);_defer$1=hasNextTick?process.nextTick:hasSetImmediate?setImmediate:fallback;var nextTick=wrap(_defer$1),queue$1=function(worker,concurrency){var _worker=wrapAsync(worker);return queue(function(items,cb){_worker(items[0],cb)},concurrency,1)},priorityQueue=function(worker,concurrency){var q=queue$1(worker,concurrency);return q.push=function(data,priority,callback){if(null==callback&&(callback=noop),"function"!=typeof callback)throw new Error("task callback must be a function");if(q.started=!0,isArray(data)||(data=[data]),0===data.length)return setImmediate$1(function(){q.drain()});priority=priority||0;for(var nextNode=q._tasks.head;nextNode&&priority>=nextNode.priority;)nextNode=nextNode.next;for(var i=0,l=data.length;i<l;i++){var item={data:data[i],priority:priority,callback:callback};nextNode?q._tasks.insertBefore(nextNode,item):q._tasks.push(item)}setImmediate$1(q.process)},delete q.unshift,q},reject=doParallel(reject$1),rejectLimit=doParallelLimit(reject$1),rejectSeries=doLimit(rejectLimit,1),retryable=function(opts,task){task||(task=opts,opts=null);var _task=wrapAsync(task);return initialParams(function(args,callback){function taskFn(cb){_task.apply(null,args.concat(cb))}opts?retry(opts,taskFn,callback):retry(taskFn,callback)})},some=doParallel(_createTester(Boolean,identity)),someLimit=doParallelLimit(_createTester(Boolean,identity)),someSeries=doLimit(someLimit,1),nativeCeil=Math.ceil,nativeMax=Math.max,times=doLimit(timeLimit,1/0),timesSeries=doLimit(timeLimit,1),waterfall=function(tasks,callback){function nextTask(args){var task=wrapAsync(tasks[taskIndex++]);args.push(onlyOnce(next)),task.apply(null,args)}function next(err){if(err||taskIndex===tasks.length)return callback.apply(null,arguments);nextTask(slice(arguments,1))}if(callback=once(callback||noop),!isArray(tasks))return callback(new Error("First argument to waterfall must be an array of functions"));if(!tasks.length)return callback();var taskIndex=0;nextTask([])},index={applyEach:applyEach,applyEachSeries:applyEachSeries,apply:apply,asyncify:asyncify,auto:auto,autoInject:autoInject,cargo:cargo,compose:compose,concat:concat,concatSeries:concatSeries,constant:constant,detect:detect,detectLimit:detectLimit,detectSeries:detectSeries,dir:dir,doDuring:doDuring,doUntil:doUntil,doWhilst:doWhilst,during:during,each:eachLimit,eachLimit:eachLimit$1,eachOf:eachOf,eachOfLimit:eachOfLimit,eachOfSeries:eachOfSeries,eachSeries:eachSeries,ensureAsync:ensureAsync,every:every,everyLimit:everyLimit,everySeries:everySeries,filter:filter,filterLimit:filterLimit,filterSeries:filterSeries,forever:forever,groupBy:groupBy,groupByLimit:groupByLimit,groupBySeries:groupBySeries,log:log,map:map,mapLimit:mapLimit,mapSeries:mapSeries,mapValues:mapValues,mapValuesLimit:mapValuesLimit,mapValuesSeries:mapValuesSeries,memoize:memoize,nextTick:nextTick,parallel:parallelLimit,parallelLimit:parallelLimit$1,priorityQueue:priorityQueue,queue:queue$1,race:race,reduce:reduce,reduceRight:reduceRight,reflect:reflect,reflectAll:reflectAll,reject:reject,rejectLimit:rejectLimit,rejectSeries:rejectSeries,retry:retry,retryable:retryable,seq:seq,series:series,setImmediate:setImmediate$1,some:some,someLimit:someLimit,someSeries:someSeries,sortBy:sortBy,timeout:timeout,times:times,timesLimit:timeLimit,timesSeries:timesSeries,transform:transform,tryEach:tryEach,unmemoize:unmemoize,until:until,waterfall:waterfall,whilst:whilst,all:every,any:some,forEach:eachLimit,forEachSeries:eachSeries,forEachLimit:eachLimit$1,forEachOf:eachOf,forEachOfSeries:eachOfSeries,forEachOfLimit:eachOfLimit,inject:reduce,foldl:reduce,foldr:reduceRight,select:filter,selectLimit:filterLimit,selectSeries:filterSeries,wrapSync:asyncify};exports.default=index,exports.applyEach=applyEach,exports.applyEachSeries=applyEachSeries,exports.apply=apply,exports.asyncify=asyncify,exports.auto=auto,exports.autoInject=autoInject,exports.cargo=cargo,exports.compose=compose,exports.concat=concat,exports.concatSeries=concatSeries,exports.constant=constant,exports.detect=detect,exports.detectLimit=detectLimit,exports.detectSeries=detectSeries,exports.dir=dir,exports.doDuring=doDuring,exports.doUntil=doUntil,exports.doWhilst=doWhilst,exports.during=during,exports.each=eachLimit,exports.eachLimit=eachLimit$1,exports.eachOf=eachOf,exports.eachOfLimit=eachOfLimit,exports.eachOfSeries=eachOfSeries,exports.eachSeries=eachSeries,exports.ensureAsync=ensureAsync,exports.every=every,exports.everyLimit=everyLimit,exports.everySeries=everySeries,exports.filter=filter,exports.filterLimit=filterLimit,exports.filterSeries=filterSeries,exports.forever=forever,exports.groupBy=groupBy,exports.groupByLimit=groupByLimit,exports.groupBySeries=groupBySeries,exports.log=log,exports.map=map,exports.mapLimit=mapLimit,exports.mapSeries=mapSeries,exports.mapValues=mapValues,exports.mapValuesLimit=mapValuesLimit,exports.mapValuesSeries=mapValuesSeries,exports.memoize=memoize,exports.nextTick=nextTick,exports.parallel=parallelLimit,exports.parallelLimit=parallelLimit$1,exports.priorityQueue=priorityQueue,exports.queue=queue$1,exports.race=race,exports.reduce=reduce,exports.reduceRight=reduceRight,exports.reflect=reflect,exports.reflectAll=reflectAll,exports.reject=reject,exports.rejectLimit=rejectLimit,exports.rejectSeries=rejectSeries,exports.retry=retry,exports.retryable=retryable,exports.seq=seq,exports.series=series,exports.setImmediate=setImmediate$1,exports.some=some,exports.someLimit=someLimit,exports.someSeries=someSeries,exports.sortBy=sortBy,exports.timeout=timeout,exports.times=times,exports.timesLimit=timeLimit,exports.timesSeries=timesSeries,exports.transform=transform,exports.tryEach=tryEach,exports.unmemoize=unmemoize,exports.until=until,exports.waterfall=waterfall,exports.whilst=whilst,exports.all=every,exports.allLimit=everyLimit,exports.allSeries=everySeries,exports.any=some,exports.anyLimit=someLimit,exports.anySeries=someSeries,exports.find=detect,exports.findLimit=detectLimit,exports.findSeries=detectSeries,exports.forEach=eachLimit,exports.forEachSeries=eachSeries,exports.forEachLimit=eachLimit$1,exports.forEachOf=eachOf,exports.forEachOfSeries=eachOfSeries,exports.forEachOfLimit=eachOfLimit,exports.inject=reduce,exports.foldl=reduce,exports.foldr=reduceRight,exports.select=filter,exports.selectLimit=filterLimit,exports.selectSeries=filterSeries,exports.wrapSync=asyncify,Object.defineProperty(exports,"__esModule",{value:!0})})}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:321}],2:[function(require,module,exports){(function(global){"use strict";function define(O,key,value){O[key]||Object[DEFINE_PROPERTY](O,key,{writable:!0,configurable:!0,value:value})}if(require("core-js/shim"),require("regenerator-runtime/runtime"),require("core-js/fn/regexp/escape"),global._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");global._babelPolyfill=!0;var DEFINE_PROPERTY="defineProperty";define(String.prototype,"padLeft","".padStart),define(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(key){[][key]&&define(Array,key,Function.call.bind([][key]))})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"core-js/fn/regexp/escape":6,"core-js/shim":299,"regenerator-runtime/runtime":322}],3:[function(require,module,exports){!function(){var global=function(){return this}();global||"undefined"==typeof window||(global=window);var define=function(module,deps,payload){if("string"!=typeof module)return void(define.original?define.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()));2==arguments.length&&(payload=deps),define.modules[module]||(define.payloads[module]=payload,define.modules[module]=null)};define.modules={},define.payloads={};var _acequire=function(parentId,module,callback){if("string"==typeof module){var payload=lookup(parentId,module);if(void 0!=payload)return callback&&callback(),payload}else if("[object Array]"===Object.prototype.toString.call(module)){for(var params=[],i=0,l=module.length;i<l;++i){var dep=lookup(parentId,module[i]);if(void 0==dep&&acequire.original)return;params.push(dep)}return callback&&callback.apply(null,params)||!0}},acequire=function(module,callback){var packagedModule=_acequire("",module,callback);return void 0==packagedModule&&acequire.original?acequire.original.apply(this,arguments):packagedModule},normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return normalizeModule(parentId,chunks[0])+"!"+normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=base+"/"+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return moduleName},lookup=function(parentId,moduleName){moduleName=normalizeModule(parentId,moduleName);var module=define.modules[moduleName];if(!module){if("function"==typeof(module=define.payloads[moduleName])){var exports={},mod={id:moduleName,uri:"",exports:exports,packaged:!0};exports=module(function(module,callback){return _acequire(moduleName,module,callback)},exports,mod)||mod.exports,define.modules[moduleName]=exports,delete define.payloads[moduleName]}module=define.modules[moduleName]=exports||module}return module};!function(ns){var root=global;ns&&(global[ns]||(global[ns]={}),root=global[ns]),root.define&&root.define.packaged||(define.original=root.define,root.define=define,root.define.packaged=!0),root.acequire&&root.acequire.packaged||(acequire.original=root.acequire,root.acequire=acequire,root.acequire.packaged=!0)}("ace")}(),ace.define("ace/lib/regexp",["require","exports","module"],function(acequire,exports,module){"use strict";function getNativeFlags(regex){return(regex.global?"g":"")+(regex.ignoreCase?"i":"")+(regex.multiline?"m":"")+(regex.extended?"x":"")+(regex.sticky?"y":"")}function indexOf(array,item,from){if(Array.prototype.indexOf)return array.indexOf(item,from);for(var i=from||0;i<array.length;i++)if(array[i]===item)return i;return-1}var real={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},compliantExecNpcg=void 0===real.exec.call(/()??/,"")[1],compliantLastIndexIncrement=function(){return real.test.call(/^/g,""),!/^/g.lastIndex}();compliantLastIndexIncrement&&compliantExecNpcg||(RegExp.prototype.exec=function(str){var name,r2,match=real.exec.apply(this,arguments);if("string"==typeof str&&match){if(!compliantExecNpcg&&match.length>1&&indexOf(match,"")>-1&&(r2=RegExp(this.source,real.replace.call(getNativeFlags(this),"g","")),real.replace.call(str.slice(match.index),r2,function(){for(var i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(match[i]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var i=1;i<match.length;i++)(name=this._xregexp.captureNames[i-1])&&(match[name]=match[i]);!compliantLastIndexIncrement&&this.global&&!match[0].length&&this.lastIndex>match.index&&this.lastIndex--}return match},compliantLastIndexIncrement||(RegExp.prototype.test=function(str){var match=real.exec.call(this,str);return match&&this.global&&!match[0].length&&this.lastIndex>match.index&&this.lastIndex--,!!match}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(acequire,exports,module){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-1/0&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=new Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];if(array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),array.length,lengthBefore+1==array.length)return!0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:pos<0&&(pos=Math.max(length+pos,0)),pos+removeCount<length||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailNewPos<tailOldPos)for(var i=0;i<tailCount;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;i<add;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;++i<length;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;i<length;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;i<length;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;i<length;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;i<length;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;i<length;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(--i<0)throw new TypeError("reduceRight of empty array with no initial value")}do{i in this&&(result=fun.call(void 0,result,self[i],i,object))}while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);i<length;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != 'object'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.defineProperty called on non-object: "+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError("Property description must be an object: "+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError("getters & setters can not be defined on this javascript engine");owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(object){return!1}),Object.isFrozen||(Object.isFrozen=function(object){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;i<ii;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=new RegExp("^"+ws+ws+"*"),trimEndRegexp=new RegExp(ws+ws+"*$");String.prototype.trim=function(){return String(this).replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can't convert "+o+" to object");return Object(o)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(acequire,exports,module){"use strict";acequire("./regexp"),acequire("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(acequire,exports,module){"use strict";if(exports.getDocumentHead=function(doc){return doc||(doc=document),doc.head||doc.getElementsByTagName("head")[0]||doc.documentElement},exports.createElement=function(tag,ns){return document.createElementNS?document.createElementNS(ns||"http://www.w3.org/1999/xhtml",tag):document.createElement(tag)},exports.hasCssClass=function(el,name){return-1!==(el.className||"").split(/\s+/g).indexOf(name)},exports.addCssClass=function(el,name){exports.hasCssClass(el,name)||(el.className+=" "+name)},exports.removeCssClass=function(el,name){for(var classes=el.className.split(/\s+/g);;){var index=classes.indexOf(name);if(-1==index)break;classes.splice(index,1)}el.className=classes.join(" ")},exports.toggleCssClass=function(el,name){for(var classes=el.className.split(/\s+/g),add=!0;;){var index=classes.indexOf(name);if(-1==index)break;add=!1,classes.splice(index,1)}return add&&classes.push(name),el.className=classes.join(" "),add},exports.setCssClass=function(node,className,include){include?exports.addCssClass(node,className):exports.removeCssClass(node,className)},exports.hasCssString=function(id,doc){var sheets,index=0;if(doc=doc||document,doc.createStyleSheet&&(sheets=doc.styleSheets)){for(;index<sheets.length;)if(sheets[index++].owningElement.id===id)return!0}else if(sheets=doc.getElementsByTagName("style"))for(;index<sheets.length;)if(sheets[index++].id===id)return!0;return!1},exports.importCssString=function(cssText,id,doc){if(doc=doc||document,id&&exports.hasCssString(id,doc))return null;var style;id&&(cssText+="\n/*# sourceURL=ace/css/"+id+" */"),doc.createStyleSheet?(style=doc.createStyleSheet(),style.cssText=cssText,id&&(style.owningElement.id=id)):(style=exports.createElement("style"),style.appendChild(doc.createTextNode(cssText)),id&&(style.id=id),exports.getDocumentHead(doc).appendChild(style))},exports.importCssStylsheet=function(uri,doc){if(doc.createStyleSheet)doc.createStyleSheet(uri);else{var link=exports.createElement("link");link.rel="stylesheet",link.href=uri,exports.getDocumentHead(doc).appendChild(link)}},exports.getInnerWidth=function(element){return parseInt(exports.computedStyle(element,"paddingLeft"),10)+parseInt(exports.computedStyle(element,"paddingRight"),10)+element.clientWidth},exports.getInnerHeight=function(element){return parseInt(exports.computedStyle(element,"paddingTop"),10)+parseInt(exports.computedStyle(element,"paddingBottom"),10)+element.clientHeight},exports.scrollbarWidth=function(document){var inner=exports.createElement("ace_inner");inner.style.width="100%",inner.style.minWidth="0px",inner.style.height="200px",inner.style.display="block";var outer=exports.createElement("ace_outer"),style=outer.style;style.position="absolute",style.left="-10000px",style.overflow="hidden",style.width="200px",style.minWidth="0px",style.height="150px",style.display="block",outer.appendChild(inner);var body=document.documentElement;body.appendChild(outer);var noScrollbar=inner.offsetWidth;style.overflow="scroll";var withScrollbar=inner.offsetWidth;return noScrollbar==withScrollbar&&(withScrollbar=outer.clientWidth),body.removeChild(outer),noScrollbar-withScrollbar},"undefined"==typeof document)return void(exports.importCssString=function(){});void 0!==window.pageYOffset?(exports.getPageScrollTop=function(){return window.pageYOffset},exports.getPageScrollLeft=function(){return window.pageXOffset}):(exports.getPageScrollTop=function(){return document.body.scrollTop},exports.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?exports.computedStyle=function(element,style){return style?(window.getComputedStyle(element,"")||{})[style]||"":window.getComputedStyle(element,"")||{}}:exports.computedStyle=function(element,style){return style?element.currentStyle[style]:element.currentStyle},exports.setInnerHtml=function(el,innerHtml){var element=el.cloneNode(!1);return element.innerHTML=innerHtml,el.parentNode.replaceChild(element,el),element},"textContent"in document.documentElement?(exports.setInnerText=function(el,innerText){el.textContent=innerText},exports.getInnerText=function(el){return el.textContent}):(exports.setInnerText=function(el,innerText){el.innerText=innerText},exports.getInnerText=function(el){return el.innerText}),exports.getParentWindow=function(document){return document.defaultView||document.parentWindow}}),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports,module){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(acequire,exports,module){"use strict";acequire("./fixoldbrowsers");var oop=acequire("./oop"),Keys=function(){var name,i,ret={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",
+46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(i in ret.FUNCTION_KEYS)name=ret.FUNCTION_KEYS[i].toLowerCase(),ret[name]=parseInt(i,10);for(i in ret.PRINTABLE_KEYS)name=ret.PRINTABLE_KEYS[i].toLowerCase(),ret[name]=parseInt(i,10);return oop.mixin(ret,ret.MODIFIER_KEYS),oop.mixin(ret,ret.PRINTABLE_KEYS),oop.mixin(ret,ret.FUNCTION_KEYS),ret.enter=ret.return,ret.escape=ret.esc,ret.del=ret.delete,ret[173]="-",function(){for(var mods=["cmd","ctrl","alt","shift"],i=Math.pow(2,mods.length);i--;)ret.KEY_MODS[i]=mods.filter(function(x){return i&ret.KEY_MODS[x]}).join("-")+"-"}(),ret.KEY_MODS[0]="",ret.KEY_MODS[-1]="input-",ret}();oop.mixin(exports,Keys),exports.keyCodeToString=function(keyCode){var keyString=Keys[keyCode];return"string"!=typeof keyString&&(keyString=String.fromCharCode(keyCode)),keyString.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(acequire,exports,module){"use strict";if(exports.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},exports.getOS=function(){return exports.isMac?exports.OS.MAC:exports.isLinux?exports.OS.LINUX:exports.OS.WINDOWS},"object"==typeof navigator){var os=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),ua=navigator.userAgent;exports.isWin="win"==os,exports.isMac="mac"==os,exports.isLinux="linux"==os,exports.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),exports.isOldIE=exports.isIE&&exports.isIE<9,exports.isGecko=exports.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,exports.isOldGecko=exports.isGecko&&parseInt((ua.match(/rv\:(\d+)/)||[])[1],10)<4,exports.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),exports.isWebKit=parseFloat(ua.split("WebKit/")[1])||void 0,exports.isChrome=parseFloat(ua.split(" Chrome/")[1])||void 0,exports.isAIR=ua.indexOf("AdobeAIR")>=0,exports.isIPad=ua.indexOf("iPad")>=0,exports.isTouchPad=ua.indexOf("TouchPad")>=0,exports.isChromeOS=ua.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(acequire,exports,module){"use strict";function normalizeCommandKeys(callback,e,keyCode){var hashId=getModifierHash(e);if(!useragent.isMac&&pressedKeys){if(pressedKeys.OSKey&&(hashId|=8),pressedKeys.altGr){if(3==(3&hashId))return;pressedKeys.altGr=0}if(18===keyCode||17===keyCode){var location="location"in e?e.location:e.keyLocation;if(17===keyCode&&1===location)1==pressedKeys[keyCode]&&(ts=e.timeStamp);else if(18===keyCode&&3===hashId&&2===location){var dt=e.timeStamp-ts;dt<50&&(pressedKeys.altGr=!0)}}}if(keyCode in keys.MODIFIER_KEYS&&(keyCode=-1),8&hashId&&keyCode>=91&&keyCode<=93&&(keyCode=-1),!hashId&&13===keyCode){var location="location"in e?e.location:e.keyLocation;if(3===location&&(callback(e,hashId,-keyCode),e.defaultPrevented))return}if(useragent.isChromeOS&&8&hashId){if(callback(e,hashId,keyCode),e.defaultPrevented)return;hashId&=-9}return!!(hashId||keyCode in keys.FUNCTION_KEYS||keyCode in keys.PRINTABLE_KEYS)&&callback(e,hashId,keyCode)}function resetPressedKeys(){pressedKeys=Object.create(null),pressedKeys.count=0,pressedKeys.lastT=0}var keys=acequire("./keys"),useragent=acequire("./useragent"),pressedKeys=null,ts=0;exports.addListener=function(elem,type,callback){if(elem.addEventListener)return elem.addEventListener(type,callback,!1);if(elem.attachEvent){var wrapper=function(){callback.call(elem,window.event)};callback._wrapper=wrapper,elem.attachEvent("on"+type,wrapper)}},exports.removeListener=function(elem,type,callback){if(elem.removeEventListener)return elem.removeEventListener(type,callback,!1);elem.detachEvent&&elem.detachEvent("on"+type,callback._wrapper||callback)},exports.stopEvent=function(e){return exports.stopPropagation(e),exports.preventDefault(e),!1},exports.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},exports.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},exports.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||useragent.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},exports.capture=function(el,eventHandler,releaseCaptureHandler){function onMouseUp(e){eventHandler&&eventHandler(e),releaseCaptureHandler&&releaseCaptureHandler(e),exports.removeListener(document,"mousemove",eventHandler,!0),exports.removeListener(document,"mouseup",onMouseUp,!0),exports.removeListener(document,"dragstart",onMouseUp,!0)}return exports.addListener(document,"mousemove",eventHandler,!0),exports.addListener(document,"mouseup",onMouseUp,!0),exports.addListener(document,"dragstart",onMouseUp,!0),onMouseUp},exports.addTouchMoveListener=function(el,callback){if("ontouchmove"in el){var startx,starty;exports.addListener(el,"touchstart",function(e){var touchObj=e.changedTouches[0];startx=touchObj.clientX,starty=touchObj.clientY}),exports.addListener(el,"touchmove",function(e){var touchObj=e.changedTouches[0];e.wheelX=-(touchObj.clientX-startx)/1,e.wheelY=-(touchObj.clientY-starty)/1,startx=touchObj.clientX,starty=touchObj.clientY,callback(e)})}},exports.addMouseWheelListener=function(el,callback){"onmousewheel"in el?exports.addListener(el,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),callback(e)}):"onwheel"in el?exports.addListener(el,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}callback(e)}):exports.addListener(el,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),callback(e)})},exports.addMultiMouseDownListener=function(elements,timeouts,eventHandler,callbackName){function onMousedown(e){if(0!==exports.getButton(e)?clicks=0:e.detail>1?++clicks>4&&(clicks=1):clicks=1,useragent.isIE){var isNewClick=Math.abs(e.clientX-startX)>5||Math.abs(e.clientY-startY)>5;timer&&!isNewClick||(clicks=1),timer&&clearTimeout(timer),timer=setTimeout(function(){timer=null},timeouts[clicks-1]||600),1==clicks&&(startX=e.clientX,startY=e.clientY)}if(e._clicks=clicks,eventHandler[callbackName]("mousedown",e),clicks>4)clicks=0;else if(clicks>1)return eventHandler[callbackName](eventNames[clicks],e)}function onDblclick(e){clicks=2,timer&&clearTimeout(timer),timer=setTimeout(function(){timer=null},timeouts[clicks-1]||600),eventHandler[callbackName]("mousedown",e),eventHandler[callbackName](eventNames[clicks],e)}var startX,startY,timer,clicks=0,eventNames={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(elements)||(elements=[elements]),elements.forEach(function(el){exports.addListener(el,"mousedown",onMousedown),useragent.isOldIE&&exports.addListener(el,"dblclick",onDblclick)})};var getModifierHash=!useragent.isMac||!useragent.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};if(exports.getModifierString=function(e){return keys.KEY_MODS[getModifierHash(e)]},exports.addCommandKeyListener=function(el,callback){var addListener=exports.addListener;if(useragent.isOldGecko||useragent.isOpera&&!("KeyboardEvent"in window)){var lastKeyDownKeyCode=null;addListener(el,"keydown",function(e){lastKeyDownKeyCode=e.keyCode}),addListener(el,"keypress",function(e){return normalizeCommandKeys(callback,e,lastKeyDownKeyCode)})}else{var lastDefaultPrevented=null;addListener(el,"keydown",function(e){var keyCode=e.keyCode;pressedKeys[keyCode]=(pressedKeys[keyCode]||0)+1,91==keyCode||92==keyCode?pressedKeys.OSKey=!0:pressedKeys.OSKey&&e.timeStamp-pressedKeys.lastT>200&&1==pressedKeys.count&&resetPressedKeys(),1==pressedKeys[keyCode]&&pressedKeys.count++,pressedKeys.lastT=e.timeStamp;var result=normalizeCommandKeys(callback,e,keyCode);return lastDefaultPrevented=e.defaultPrevented,result}),addListener(el,"keypress",function(e){lastDefaultPrevented&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(exports.stopEvent(e),lastDefaultPrevented=null)}),addListener(el,"keyup",function(e){var keyCode=e.keyCode;pressedKeys[keyCode]?pressedKeys.count=Math.max(pressedKeys.count-1,0):resetPressedKeys(),91!=keyCode&&92!=keyCode||(pressedKeys.OSKey=!1),pressedKeys[keyCode]=null}),pressedKeys||(resetPressedKeys(),addListener(window,"focus",resetPressedKeys))}},"object"==typeof window&&window.postMessage&&!useragent.isOldIE){exports.nextTick=function(callback,win){win=win||window;exports.addListener(win,"message",function listener(e){"zero-timeout-message-1"==e.data&&(exports.stopPropagation(e),exports.removeListener(win,"message",listener),callback())}),win.postMessage("zero-timeout-message-1","*")}}exports.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),exports.nextFrame?exports.nextFrame=exports.nextFrame.bind(window):exports.nextFrame=function(callback){setTimeout(callback,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports,module){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};exports.stringTrimLeft=function(string){return string.replace(/^\s\s*/,"")},exports.stringTrimRight=function(string){return string.replace(/\s\s*$/,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;i<l;i++)array[i]&&"object"==typeof array[i]?copy[i]=this.copyObject(array[i]):copy[i]=array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;key<obj.length;key++)copy[key]=deepCopy(obj[key]);return copy}var cons=obj.constructor;if(cons===RegExp)return obj;copy=cons();for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;i<arr.length;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;i<=array.length;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(acequire,exports,module){"use strict";var event=acequire("../lib/event"),useragent=acequire("../lib/useragent"),dom=acequire("../lib/dom"),lang=acequire("../lib/lang"),BROKEN_SETDATA=useragent.isChrome<18,USE_IE_MIME_TYPE=useragent.isIE,TextInput=function(parentNode,host){function resetSelection(isEmpty){if(!inComposition){if(inComposition=!0,inputHandler)selectionStart=0,selectionEnd=isEmpty?0:text.value.length-1;else var selectionStart=isEmpty?2:1,selectionEnd=2;try{text.setSelectionRange(selectionStart,selectionEnd)}catch(e){}inComposition=!1}}function resetValue(){inComposition||(text.value=PLACEHOLDER,useragent.isWebKit&&syncValue.schedule())}function onContextMenuClose(){clearTimeout(closeTimeout),closeTimeout=setTimeout(function(){tempStyle&&(text.style.cssText=tempStyle,tempStyle=""),null==host.renderer.$keepTextAreaAtCursor&&(host.renderer.$keepTextAreaAtCursor=!0,host.renderer.$moveTextAreaToCursor())},useragent.isOldIE?200:0)}var text=dom.createElement("textarea");text.className="ace_text-input",useragent.isTouchPad&&text.setAttribute("x-palm-disable-auto-cap",!0),text.setAttribute("wrap","off"),text.setAttribute("autocorrect","off"),text.setAttribute("autocapitalize","off"),text.setAttribute("spellcheck",!1),text.style.opacity="0",useragent.isOldIE&&(text.style.top="-1000px"),parentNode.insertBefore(text,parentNode.firstChild);var PLACEHOLDER="",copied=!1,pasted=!1,inComposition=!1,tempStyle="",isSelectionEmpty=!0;try{var isFocused=document.activeElement===text}catch(e){}event.addListener(text,"blur",function(e){host.onBlur(e),isFocused=!1}),event.addListener(text,"focus",function(e){isFocused=!0,host.onFocus(e),resetSelection()}),this.focus=function(){if(tempStyle)return text.focus();var top=text.style.top;text.style.position="fixed",text.style.top="0px",text.focus(),setTimeout(function(){text.style.position="","0px"==text.style.top&&(text.style.top=top)},0)},this.blur=function(){text.blur()},this.isFocused=function(){return isFocused};var syncSelection=lang.delayedCall(function(){isFocused&&resetSelection(isSelectionEmpty)}),syncValue=lang.delayedCall(function(){inComposition||(text.value=PLACEHOLDER,isFocused&&resetSelection())});useragent.isWebKit||host.addEventListener("changeSelection",function(){host.selection.isEmpty()!=isSelectionEmpty&&(isSelectionEmpty=!isSelectionEmpty,syncSelection.schedule())}),resetValue(),isFocused&&host.onFocus();var isAllSelected=function(text){return 0===text.selectionStart&&text.selectionEnd===text.value.length};if(!text.setSelectionRange&&text.createTextRange&&(text.setSelectionRange=function(selectionStart,selectionEnd){var range=this.createTextRange();range.collapse(!0),range.moveStart("character",selectionStart),range.moveEnd("character",selectionEnd),range.select()},isAllSelected=function(text){try{var range=text.ownerDocument.selection.createRange()}catch(e){}return!(!range||range.parentElement()!=text)&&range.text==text.value}),useragent.isOldIE){var inPropertyChange=!1,onPropertyChange=function(e){if(!inPropertyChange){var data=text.value;if(!inComposition&&data&&data!=PLACEHOLDER){if(e&&data==PLACEHOLDER[0])return syncProperty.schedule();sendText(data),inPropertyChange=!0,resetValue(),inPropertyChange=!1}}},syncProperty=lang.delayedCall(onPropertyChange);event.addListener(text,"propertychange",onPropertyChange);var keytable={13:1,27:1};event.addListener(text,"keyup",function(e){if(!inComposition||text.value&&!keytable[e.keyCode]||setTimeout(onCompositionEnd,0),(text.value.charCodeAt(0)||0)<129)return syncProperty.call();inComposition?onCompositionUpdate():onCompositionStart()}),event.addListener(text,"keydown",function(e){syncProperty.schedule(50)})}var onSelect=function(e){copied?copied=!1:isAllSelected(text)?(host.selectAll(),resetSelection()):inputHandler&&resetSelection(host.selection.isEmpty())},inputHandler=null;this.setInputHandler=function(cb){inputHandler=cb},this.getInputHandler=function(){return inputHandler};var afterContextMenu=!1,sendText=function(data){inputHandler&&(data=inputHandler(data),inputHandler=null),pasted?(resetSelection(),data&&host.onPaste(data),pasted=!1):data==PLACEHOLDER.charAt(0)?afterContextMenu?host.execCommand("del",{source:"ace"}):host.execCommand("backspace",{source:"ace"}):(data.substring(0,2)==PLACEHOLDER?data=data.substr(2):data.charAt(0)==PLACEHOLDER.charAt(0)?data=data.substr(1):data.charAt(data.length-1)==PLACEHOLDER.charAt(0)&&(data=data.slice(0,-1)),data.charAt(data.length-1)==PLACEHOLDER.charAt(0)&&(data=data.slice(0,-1)),data&&host.onTextInput(data)),afterContextMenu&&(afterContextMenu=!1)},onInput=function(e){if(!inComposition){var data=text.value;sendText(data),resetValue()}},handleClipboardData=function(e,data){var clipboardData=e.clipboardData||window.clipboardData;if(clipboardData&&!BROKEN_SETDATA){var mime=USE_IE_MIME_TYPE?"Text":"text/plain";return data?!1!==clipboardData.setData(mime,data):clipboardData.getData(mime)}},doCopy=function(e,isCut){var data=host.getCopyText();if(!data)return event.preventDefault(e);handleClipboardData(e,data)?(isCut?host.onCut():host.onCopy(),event.preventDefault(e)):(copied=!0,text.value=data,text.select(),setTimeout(function(){copied=!1,resetValue(),resetSelection(),isCut?host.onCut():host.onCopy()}))},onCut=function(e){doCopy(e,!0)},onCopy=function(e){doCopy(e,!1)},onPaste=function(e){var data=handleClipboardData(e);"string"==typeof data?(data&&host.onPaste(data,e),useragent.isIE&&setTimeout(resetSelection),event.preventDefault(e)):(text.value="",pasted=!0)};event.addCommandKeyListener(text,host.onCommandKey.bind(host)),event.addListener(text,"select",onSelect),event.addListener(text,"input",onInput),event.addListener(text,"cut",onCut),event.addListener(text,"copy",onCopy),event.addListener(text,"paste",onPaste),"oncut"in text&&"oncopy"in text&&"onpaste"in text||event.addListener(parentNode,"keydown",function(e){if((!useragent.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:onCopy(e);break;case 86:onPaste(e);break;case 88:onCut(e)}});var onCompositionStart=function(e){inComposition||!host.onCompositionStart||host.$readOnly||(inComposition={},host.onCompositionStart(),setTimeout(onCompositionUpdate,0),host.on("mousedown",onCompositionEnd),host.selection.isEmpty()||(host.insert(""),host.session.markUndoGroup(),host.selection.clearSelection()),host.session.markUndoGroup())},onCompositionUpdate=function(){if(inComposition&&host.onCompositionUpdate&&!host.$readOnly){var val=text.value.replace(/\x01/g,"");if(inComposition.lastValue!==val&&(host.onCompositionUpdate(val),inComposition.lastValue&&host.undo(),inComposition.lastValue=val,inComposition.lastValue)){var r=host.selection.getRange();host.insert(inComposition.lastValue),host.session.markUndoGroup(),inComposition.range=host.selection.getRange(),host.selection.setRange(r),host.selection.clearSelection()}}},onCompositionEnd=function(e){if(host.onCompositionEnd&&!host.$readOnly){var c=inComposition;inComposition=!1;var timer=setTimeout(function(){timer=null;var str=text.value.replace(/\x01/g,"");inComposition||(str==c.lastValue?resetValue():!c.lastValue&&str&&(resetValue(),sendText(str)))});inputHandler=function(str){return timer&&clearTimeout(timer),(str=str.replace(/\x01/g,""))==c.lastValue?"":(c.lastValue&&timer&&host.undo(),str)},host.onCompositionEnd(),host.removeListener("mousedown",onCompositionEnd),"compositionend"==e.type&&c.range&&host.selection.setRange(c.range)}},syncComposition=lang.delayedCall(onCompositionUpdate,50);event.addListener(text,"compositionstart",onCompositionStart),useragent.isGecko?event.addListener(text,"text",function(){syncComposition.schedule()}):(event.addListener(text,"keyup",function(){syncComposition.schedule()}),event.addListener(text,"keydown",function(){syncComposition.schedule()})),event.addListener(text,"compositionend",onCompositionEnd),this.getElement=function(){return text},this.setReadOnly=function(readOnly){text.readOnly=readOnly},this.onContextMenu=function(e){afterContextMenu=!0,resetSelection(host.selection.isEmpty()),host._emit("nativecontextmenu",{target:host,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,bringToFront){if(bringToFront||!useragent.isOldIE){tempStyle||(tempStyle=text.style.cssText),text.style.cssText=(bringToFront?"z-index:100000;":"")+"height:"+text.style.height+";"+(useragent.isIE?"opacity:0.1;":"");var rect=host.container.getBoundingClientRect(),style=dom.computedStyle(host.container),top=rect.top+(parseInt(style.borderTopWidth)||0),left=rect.left+(parseInt(rect.borderLeftWidth)||0),maxTop=rect.bottom-top-text.clientHeight-2,move=function(e){text.style.left=e.clientX-left-2+"px",text.style.top=Math.min(e.clientY-top-2,maxTop)+"px"};move(e),"mousedown"==e.type&&(host.renderer.$keepTextAreaAtCursor&&(host.renderer.$keepTextAreaAtCursor=null),clearTimeout(closeTimeout),useragent.isWin&&!useragent.isOldIE&&event.capture(host.container,move,onContextMenuClose))}},this.onContextMenuClose=onContextMenuClose;var closeTimeout,onContextMenu=function(e){host.textInput.onContextMenu(e),onContextMenuClose()};event.addListener(text,"mouseup",onContextMenu),event.addListener(text,"mousedown",function(e){e.preventDefault(),onContextMenuClose()}),event.addListener(host.renderer.scroller,"contextmenu",onContextMenu),event.addListener(text,"contextmenu",onContextMenu)};exports.TextInput=TextInput}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(acequire,exports,module){"use strict";function DefaultHandlers(mouseHandler){mouseHandler.$clickSelection=null;var editor=mouseHandler.editor;editor.setDefaultHandler("mousedown",this.onMouseDown.bind(mouseHandler)),editor.setDefaultHandler("dblclick",this.onDoubleClick.bind(mouseHandler)),editor.setDefaultHandler("tripleclick",this.onTripleClick.bind(mouseHandler)),editor.setDefaultHandler("quadclick",this.onQuadClick.bind(mouseHandler)),editor.setDefaultHandler("mousewheel",this.onMouseWheel.bind(mouseHandler)),editor.setDefaultHandler("touchmove",this.onTouchMove.bind(mouseHandler)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(x){mouseHandler[x]=this[x]},this),mouseHandler.selectByLines=this.extendSelectionBy.bind(mouseHandler,"getLineRange"),mouseHandler.selectByWords=this.extendSelectionBy.bind(mouseHandler,"getWordRange")}function calcDistance(ax,ay,bx,by){return Math.sqrt(Math.pow(bx-ax,2)+Math.pow(by-ay,2))}function calcRangeOrientation(range,cursor){if(range.start.row==range.end.row)var cmp=2*cursor.column-range.start.column-range.end.column;else if(range.start.row!=range.end.row-1||range.start.column||range.end.column)var cmp=2*cursor.row-range.start.row-range.end.row;else var cmp=cursor.column-4;return cmp<0?{cursor:range.start,anchor:range.end}:{cursor:range.end,anchor:range.start}}acequire("../lib/dom"),acequire("../lib/event"),acequire("../lib/useragent");(function(){this.onMouseDown=function(ev){var inSelection=ev.inSelection(),pos=ev.getDocumentPosition();this.mousedownEvent=ev;var editor=this.editor,button=ev.getButton();if(0!==button){var selectionRange=editor.getSelectionRange(),selectionEmpty=selectionRange.isEmpty();return editor.$blockScrolling++,(selectionEmpty||1==button)&&editor.selection.moveToPosition(pos),editor.$blockScrolling--,void(2==button&&editor.textInput.onContextMenu(ev.domEvent))}return this.mousedownEvent.time=Date.now(),!inSelection||editor.isFocused()||(editor.focus(),!this.$focusTimout||this.$clickSelection||editor.inMultiSelectMode)?(this.captureMouse(ev),this.startSelect(pos,ev.domEvent._clicks>1),ev.preventDefault()):(this.setState("focusWait"),void this.captureMouse(ev))},this.startSelect=function(pos,waitForClickSelection){pos=pos||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var editor=this.editor;editor.$blockScrolling++,this.mousedownEvent.getShiftKey()?editor.selection.selectToPosition(pos):waitForClickSelection||editor.selection.moveToPosition(pos),waitForClickSelection||this.select(),editor.renderer.scroller.setCapture&&editor.renderer.scroller.setCapture(),editor.setStyle("ace_selecting"),this.setState("select"),editor.$blockScrolling--},this.select=function(){var anchor,editor=this.editor,cursor=editor.renderer.screenToTextCoordinates(this.x,this.y);if(editor.$blockScrolling++,this.$clickSelection){var cmp=this.$clickSelection.comparePoint(cursor);if(-1==cmp)anchor=this.$clickSelection.end;else if(1==cmp)anchor=this.$clickSelection.start;else{var orientedRange=calcRangeOrientation(this.$clickSelection,cursor);cursor=orientedRange.cursor,anchor=orientedRange.anchor}editor.selection.setSelectionAnchor(anchor.row,anchor.column)}editor.selection.selectToPosition(cursor),editor.$blockScrolling--,editor.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(unitName){var anchor,editor=this.editor,cursor=editor.renderer.screenToTextCoordinates(this.x,this.y),range=editor.selection[unitName](cursor.row,cursor.column);if(editor.$blockScrolling++,this.$clickSelection){var cmpStart=this.$clickSelection.comparePoint(range.start),cmpEnd=this.$clickSelection.comparePoint(range.end);if(-1==cmpStart&&cmpEnd<=0)anchor=this.$clickSelection.end,range.end.row==cursor.row&&range.end.column==cursor.column||(cursor=range.start);else if(1==cmpEnd&&cmpStart>=0)anchor=this.$clickSelection.start,range.start.row==cursor.row&&range.start.column==cursor.column||(cursor=range.end);else if(-1==cmpStart&&1==cmpEnd)cursor=range.end,anchor=range.start;else{var orientedRange=calcRangeOrientation(this.$clickSelection,cursor);cursor=orientedRange.cursor,anchor=orientedRange.anchor}editor.selection.setSelectionAnchor(anchor.row,anchor.column)}editor.selection.selectToPosition(cursor),editor.$blockScrolling--,editor.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var distance=calcDistance(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),time=Date.now();(distance>0||time-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(ev){var pos=ev.getDocumentPosition(),editor=this.editor,session=editor.session,range=session.getBracketRange(pos);range?(range.isEmpty()&&(range.start.column--,range.end.column++),this.setState("select")):(range=editor.selection.getWordRange(pos.row,pos.column),this.setState("selectByWords")),this.$clickSelection=range,this.select()},this.onTripleClick=function(ev){var pos=ev.getDocumentPosition(),editor=this.editor;this.setState("selectByLines");var range=editor.getSelectionRange();range.isMultiLine()&&range.contains(pos.row,pos.column)?(this.$clickSelection=editor.selection.getLineRange(range.start.row),this.$clickSelection.end=editor.selection.getLineRange(range.end.row).end):this.$clickSelection=editor.selection.getLineRange(pos.row),this.select()},this.onQuadClick=function(ev){var editor=this.editor;editor.selectAll(),this.$clickSelection=editor.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(ev){if(!ev.getAccelKey()){ev.getShiftKey()&&ev.wheelY&&!ev.wheelX&&(ev.wheelX=ev.wheelY,ev.wheelY=0);var t=ev.domEvent.timeStamp,dt=t-(this.$lastScrollTime||0),editor=this.editor;return editor.renderer.isScrollableBy(ev.wheelX*ev.speed,ev.wheelY*ev.speed)||dt<200?(this.$lastScrollTime=t,editor.renderer.scrollBy(ev.wheelX*ev.speed,ev.wheelY*ev.speed),ev.stop()):void 0}},this.onTouchMove=function(ev){var t=ev.domEvent.timeStamp,dt=t-(this.$lastScrollTime||0),editor=this.editor;if(editor.renderer.isScrollableBy(ev.wheelX*ev.speed,ev.wheelY*ev.speed)||dt<200)return this.$lastScrollTime=t,editor.renderer.scrollBy(ev.wheelX*ev.speed,ev.wheelY*ev.speed),ev.stop()}}).call(DefaultHandlers.prototype),exports.DefaultHandlers=DefaultHandlers}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(acequire,exports,module){"use strict";function Tooltip(parentNode){this.isOpen=!1,this.$element=null,this.$parentNode=parentNode}var dom=(acequire("./lib/oop"),acequire("./lib/dom"));(function(){this.$init=function(){return this.$element=dom.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(text){dom.setInnerText(this.getElement(),text)},this.setHtml=function(html){this.getElement().innerHTML=html},this.setPosition=function(x,y){this.getElement().style.left=x+"px",this.getElement().style.top=y+"px"},this.setClassName=function(className){dom.addCssClass(this.getElement(),className)},this.show=function(text,x,y){null!=text&&this.setText(text),null!=x&&null!=y&&this.setPosition(x,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(Tooltip.prototype),exports.Tooltip=Tooltip}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(acequire,exports,module){"use strict";function GutterHandler(mouseHandler){function showTooltip(){var row=mouseEvent.getDocumentPosition().row,annotation=gutter.$annotations[row];if(!annotation)return hideTooltip();if(row==editor.session.getLength()){var screenRow=editor.renderer.pixelToScreenCoordinates(0,mouseEvent.y).row,pos=mouseEvent.$pos;if(screenRow>editor.session.documentToScreenRow(pos.row,pos.column))return hideTooltip()}if(tooltipAnnotation!=annotation)if(tooltipAnnotation=annotation.text.join("<br/>"),tooltip.setHtml(tooltipAnnotation),tooltip.show(),editor.on("mousewheel",hideTooltip),mouseHandler.$tooltipFollowsMouse)moveTooltip(mouseEvent);else{var gutterElement=mouseEvent.domEvent.target,rect=gutterElement.getBoundingClientRect(),style=tooltip.getElement().style;style.left=rect.right+"px",style.top=rect.bottom+"px"}}function hideTooltip(){tooltipTimeout&&(tooltipTimeout=clearTimeout(tooltipTimeout)),tooltipAnnotation&&(tooltip.hide(),tooltipAnnotation=null,editor.removeEventListener("mousewheel",hideTooltip))}function moveTooltip(e){tooltip.setPosition(e.x,e.y)}var editor=mouseHandler.editor,gutter=editor.renderer.$gutterLayer,tooltip=new GutterTooltip(editor.container);mouseHandler.editor.setDefaultHandler("guttermousedown",function(e){if(editor.isFocused()&&0==e.getButton()){if("foldWidgets"!=gutter.getRegion(e)){var row=e.getDocumentPosition().row,selection=editor.session.selection
+;if(e.getShiftKey())selection.selectTo(row,0);else{if(2==e.domEvent.detail)return editor.selectAll(),e.preventDefault();mouseHandler.$clickSelection=editor.selection.getLineRange(row)}return mouseHandler.setState("selectByLines"),mouseHandler.captureMouse(e),e.preventDefault()}}});var tooltipTimeout,mouseEvent,tooltipAnnotation;mouseHandler.editor.setDefaultHandler("guttermousemove",function(e){var target=e.domEvent.target||e.domEvent.srcElement;if(dom.hasCssClass(target,"ace_fold-widget"))return hideTooltip();tooltipAnnotation&&mouseHandler.$tooltipFollowsMouse&&moveTooltip(e),mouseEvent=e,tooltipTimeout||(tooltipTimeout=setTimeout(function(){tooltipTimeout=null,mouseEvent&&!mouseHandler.isMousePressed?showTooltip():hideTooltip()},50))}),event.addListener(editor.renderer.$gutter,"mouseout",function(e){mouseEvent=null,tooltipAnnotation&&!tooltipTimeout&&(tooltipTimeout=setTimeout(function(){tooltipTimeout=null,hideTooltip()},50))}),editor.on("changeSession",hideTooltip)}function GutterTooltip(parentNode){Tooltip.call(this,parentNode)}var dom=acequire("../lib/dom"),oop=acequire("../lib/oop"),event=acequire("../lib/event"),Tooltip=acequire("../tooltip").Tooltip;oop.inherits(GutterTooltip,Tooltip),function(){this.setPosition=function(x,y){var windowWidth=window.innerWidth||document.documentElement.clientWidth,windowHeight=window.innerHeight||document.documentElement.clientHeight,width=this.getWidth(),height=this.getHeight();x+=15,y+=15,x+width>windowWidth&&(x-=x+width-windowWidth),y+height>windowHeight&&(y-=20+height),Tooltip.prototype.setPosition.call(this,x,y)}}.call(GutterTooltip.prototype),exports.GutterHandler=GutterHandler}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(acequire,exports,module){"use strict";var event=acequire("../lib/event"),useragent=acequire("../lib/useragent"),MouseEvent=exports.MouseEvent=function(domEvent,editor){this.domEvent=domEvent,this.editor=editor,this.x=this.clientX=domEvent.clientX,this.y=this.clientY=domEvent.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){event.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){event.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var editor=this.editor,selectionRange=editor.getSelectionRange();if(selectionRange.isEmpty())this.$inSelection=!1;else{var pos=this.getDocumentPosition();this.$inSelection=selectionRange.contains(pos.row,pos.column)}return this.$inSelection},this.getButton=function(){return event.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=useragent.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(MouseEvent.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(acequire,exports,module){"use strict";function DragdropHandler(mouseHandler){function scrollCursorIntoView(cursor,prevCursor){var now=Date.now(),vMovement=!prevCursor||cursor.row!=prevCursor.row,hMovement=!prevCursor||cursor.column!=prevCursor.column;if(!cursorMovedTime||vMovement||hMovement)editor.$blockScrolling+=1,editor.moveCursorToPosition(cursor),editor.$blockScrolling-=1,cursorMovedTime=now,cursorPointOnCaretMoved={x:x,y:y};else{calcDistance(cursorPointOnCaretMoved.x,cursorPointOnCaretMoved.y,x,y)>SCROLL_CURSOR_HYSTERESIS?cursorMovedTime=null:now-cursorMovedTime>=SCROLL_CURSOR_DELAY&&(editor.renderer.scrollCursorIntoView(),cursorMovedTime=null)}}function autoScroll(cursor,prevCursor){var now=Date.now(),lineHeight=editor.renderer.layerConfig.lineHeight,characterWidth=editor.renderer.layerConfig.characterWidth,editorRect=editor.renderer.scroller.getBoundingClientRect(),offsets={x:{left:x-editorRect.left,right:editorRect.right-x},y:{top:y-editorRect.top,bottom:editorRect.bottom-y}},nearestXOffset=Math.min(offsets.x.left,offsets.x.right),nearestYOffset=Math.min(offsets.y.top,offsets.y.bottom),scrollCursor={row:cursor.row,column:cursor.column};nearestXOffset/characterWidth<=2&&(scrollCursor.column+=offsets.x.left<offsets.x.right?-3:2),nearestYOffset/lineHeight<=1&&(scrollCursor.row+=offsets.y.top<offsets.y.bottom?-1:1);var vScroll=cursor.row!=scrollCursor.row,hScroll=cursor.column!=scrollCursor.column,vMovement=!prevCursor||cursor.row!=prevCursor.row;vScroll||hScroll&&!vMovement?autoScrollStartTime?now-autoScrollStartTime>=AUTOSCROLL_DELAY&&editor.renderer.scrollCursorIntoView(scrollCursor):autoScrollStartTime=now:autoScrollStartTime=null}function onDragInterval(){var prevCursor=dragCursor;dragCursor=editor.renderer.screenToTextCoordinates(x,y),scrollCursorIntoView(dragCursor,prevCursor),autoScroll(dragCursor,prevCursor)}function addDragMarker(){range=editor.selection.toOrientedRange(),dragSelectionMarker=editor.session.addMarker(range,"ace_selection",editor.getSelectionStyle()),editor.clearSelection(),editor.isFocused()&&editor.renderer.$cursorLayer.setBlinking(!1),clearInterval(timerId),onDragInterval(),timerId=setInterval(onDragInterval,20),counter=0,event.addListener(document,"mousemove",onMouseMove)}function clearDragMarker(){clearInterval(timerId),editor.session.removeMarker(dragSelectionMarker),dragSelectionMarker=null,editor.$blockScrolling+=1,editor.selection.fromOrientedRange(range),editor.$blockScrolling-=1,editor.isFocused()&&!isInternal&&editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly()),range=null,dragCursor=null,counter=0,autoScrollStartTime=null,cursorMovedTime=null,event.removeListener(document,"mousemove",onMouseMove)}function onMouseMove(){null==onMouseMoveTimer&&(onMouseMoveTimer=setTimeout(function(){null!=onMouseMoveTimer&&dragSelectionMarker&&clearDragMarker()},20))}function canAccept(dataTransfer){var types=dataTransfer.types;return!types||Array.prototype.some.call(types,function(type){return"text/plain"==type||"Text"==type})}function getDropEffect(e){var copyAllowed=["copy","copymove","all","uninitialized"],moveAllowed=["move","copymove","linkmove","all","uninitialized"],copyModifierState=useragent.isMac?e.altKey:e.ctrlKey,effectAllowed="uninitialized";try{effectAllowed=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var dropEffect="none";return copyModifierState&&copyAllowed.indexOf(effectAllowed)>=0?dropEffect="copy":moveAllowed.indexOf(effectAllowed)>=0?dropEffect="move":copyAllowed.indexOf(effectAllowed)>=0&&(dropEffect="copy"),dropEffect}var editor=mouseHandler.editor,blankImage=dom.createElement("img");blankImage.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",useragent.isOpera&&(blankImage.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(x){mouseHandler[x]=this[x]},this),editor.addEventListener("mousedown",this.onMouseDown.bind(mouseHandler));var dragSelectionMarker,x,y,timerId,range,dragCursor,dragOperation,isInternal,autoScrollStartTime,cursorMovedTime,cursorPointOnCaretMoved,mouseTarget=editor.container,counter=0;this.onDragStart=function(e){if(this.cancelDrag||!mouseTarget.draggable){var self=this;return setTimeout(function(){self.startSelect(),self.captureMouse(e)},0),e.preventDefault()}range=editor.getSelectionRange();var dataTransfer=e.dataTransfer;dataTransfer.effectAllowed=editor.getReadOnly()?"copy":"copyMove",useragent.isOpera&&(editor.container.appendChild(blankImage),blankImage.scrollTop=0),dataTransfer.setDragImage&&dataTransfer.setDragImage(blankImage,0,0),useragent.isOpera&&editor.container.removeChild(blankImage),dataTransfer.clearData(),dataTransfer.setData("Text",editor.session.getTextRange()),isInternal=!0,this.setState("drag")},this.onDragEnd=function(e){if(mouseTarget.draggable=!1,isInternal=!1,this.setState(null),!editor.getReadOnly()){var dropEffect=e.dataTransfer.dropEffect;dragOperation||"move"!=dropEffect||editor.session.remove(editor.getSelectionRange()),editor.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!editor.getReadOnly()&&canAccept(e.dataTransfer))return x=e.clientX,y=e.clientY,dragSelectionMarker||addDragMarker(),counter++,e.dataTransfer.dropEffect=dragOperation=getDropEffect(e),event.preventDefault(e)},this.onDragOver=function(e){if(!editor.getReadOnly()&&canAccept(e.dataTransfer))return x=e.clientX,y=e.clientY,dragSelectionMarker||(addDragMarker(),counter++),null!==onMouseMoveTimer&&(onMouseMoveTimer=null),e.dataTransfer.dropEffect=dragOperation=getDropEffect(e),event.preventDefault(e)},this.onDragLeave=function(e){if(--counter<=0&&dragSelectionMarker)return clearDragMarker(),dragOperation=null,event.preventDefault(e)},this.onDrop=function(e){if(dragCursor){var dataTransfer=e.dataTransfer;if(isInternal)switch(dragOperation){case"move":range=range.contains(dragCursor.row,dragCursor.column)?{start:dragCursor,end:dragCursor}:editor.moveText(range,dragCursor);break;case"copy":range=editor.moveText(range,dragCursor,!0)}else{var dropData=dataTransfer.getData("Text");range={start:dragCursor,end:editor.session.insert(dragCursor,dropData)},editor.focus(),dragOperation=null}return clearDragMarker(),event.preventDefault(e)}},event.addListener(mouseTarget,"dragstart",this.onDragStart.bind(mouseHandler)),event.addListener(mouseTarget,"dragend",this.onDragEnd.bind(mouseHandler)),event.addListener(mouseTarget,"dragenter",this.onDragEnter.bind(mouseHandler)),event.addListener(mouseTarget,"dragover",this.onDragOver.bind(mouseHandler)),event.addListener(mouseTarget,"dragleave",this.onDragLeave.bind(mouseHandler)),event.addListener(mouseTarget,"drop",this.onDrop.bind(mouseHandler));var onMouseMoveTimer=null}function calcDistance(ax,ay,bx,by){return Math.sqrt(Math.pow(bx-ax,2)+Math.pow(by-ay,2))}var dom=acequire("../lib/dom"),event=acequire("../lib/event"),useragent=acequire("../lib/useragent"),AUTOSCROLL_DELAY=200,SCROLL_CURSOR_DELAY=200,SCROLL_CURSOR_HYSTERESIS=5;(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var editor=this.editor;editor.container.draggable=!0,editor.renderer.$cursorLayer.setBlinking(!1),editor.setStyle("ace_dragging");var cursorStyle=useragent.isWin?"default":"move";editor.renderer.setCursorStyle(cursorStyle),this.setState("dragReady")},this.onMouseDrag=function(e){var target=this.editor.container;if(useragent.isIE&&"dragReady"==this.state){var distance=calcDistance(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);distance>3&&target.dragDrop()}if("dragWait"===this.state){var distance=calcDistance(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);distance>0&&(target.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var editor=this.editor,inSelection=e.inSelection(),button=e.getButton();if(1===(e.domEvent.detail||1)&&0===button&&inSelection){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var eventTarget=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in eventTarget&&(eventTarget.unselectable="on"),editor.getDragDelay()){if(useragent.isWebKit){this.cancelDrag=!0;editor.container.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(DragdropHandler.prototype),exports.DragdropHandler=DragdropHandler}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(acequire,exports,module){"use strict";var dom=acequire("./dom");exports.get=function(url,callback){var xhr=new XMLHttpRequest;xhr.open("GET",url,!0),xhr.onreadystatechange=function(){4===xhr.readyState&&callback(xhr.responseText)},xhr.send(null)},exports.loadScript=function(path,callback){var head=dom.getDocumentHead(),s=document.createElement("script");s.src=path,head.appendChild(s),s.onload=s.onreadystatechange=function(_,isAbort){!isAbort&&s.readyState&&"loaded"!=s.readyState&&"complete"!=s.readyState||(s=s.onload=s.onreadystatechange=null,isAbort||callback())}},exports.qualifyURL=function(url){var a=document.createElement("a");return a.href=url,a.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports,module){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;i<listeners.length&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;i<listeners.length;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback){handlers[eventName];disabled&&this.setDefaultHandler(eventName,disabled.pop())}else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports,module){"no use strict";function warn(message){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function reportError(msg,data){var e=new Error(msg);e.data=data,"object"==typeof console&&console.error&&console.error(e),setTimeout(function(){throw e})}var oop=acequire("./oop"),EventEmitter=acequire("./event_emitter").EventEmitter,optionsProvider={setOptions:function(optList){Object.keys(optList).forEach(function(key){this.setOption(key,optList[key])},this)},getOptions:function(optionNames){var result={};return optionNames?Array.isArray(optionNames)||(result=optionNames,optionNames=Object.keys(result)):optionNames=Object.keys(this.$options),optionNames.forEach(function(key){result[key]=this.getOption(key)},this),result},setOption:function(name,value){if(this["$"+name]!==value){var opt=this.$options[name];if(!opt)return warn('misspelled option "'+name+'"');if(opt.forwardTo)return this[opt.forwardTo]&&this[opt.forwardTo].setOption(name,value);opt.handlesSet||(this["$"+name]=value),opt&&opt.set&&opt.set.call(this,value)}},getOption:function(name){var opt=this.$options[name];return opt?opt.forwardTo?this[opt.forwardTo]&&this[opt.forwardTo].getOption(name):opt&&opt.get?opt.get.call(this):this["$"+name]:warn('misspelled option "'+name+'"')}},AppConfig=function(){this.$defaultOptions={}};(function(){oop.implement(this,EventEmitter),this.defineOptions=function(obj,path,options){return obj.$options||(this.$defaultOptions[path]=obj.$options={}),Object.keys(options).forEach(function(key){var opt=options[key];"string"==typeof opt&&(opt={forwardTo:opt}),opt.name||(opt.name=key),obj.$options[opt.name]=opt,"initialValue"in opt&&(obj["$"+opt.name]=opt.initialValue)}),oop.implement(obj,optionsProvider),this},this.resetOptions=function(obj){Object.keys(obj.$options).forEach(function(key){var opt=obj.$options[key];"value"in opt&&obj.setOption(key,opt.value)})},this.setDefaultValue=function(path,name,value){var opts=this.$defaultOptions[path]||(this.$defaultOptions[path]={});opts[name]&&(opts.forwardTo?this.setDefaultValue(opts.forwardTo,name,value):opts[name].value=value)},this.setDefaultValues=function(path,optionHash){Object.keys(optionHash).forEach(function(key){this.setDefaultValue(path,key,optionHash[key])},this)},this.warn=warn,this.reportError=reportError}).call(AppConfig.prototype),exports.AppConfig=AppConfig}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(acequire,exports,module){"no use strict";function init(packaged){if(global&&global.document){options.packaged=packaged||acequire.packaged||module.packaged||global.define&&define.packaged;for(var scriptOptions={},scriptUrl="",currentScript=document.currentScript||document._currentScript,currentDocument=currentScript&&currentScript.ownerDocument||document,scripts=currentDocument.getElementsByTagName("script"),i=0;i<scripts.length;i++){var script=scripts[i],src=script.src||script.getAttribute("src");if(src){for(var attributes=script.attributes,j=0,l=attributes.length;j<l;j++){var attr=attributes[j];0===attr.name.indexOf("data-ace-")&&(scriptOptions[deHyphenate(attr.name.replace(/^data-ace-/,""))]=attr.value)}var m=src.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);m&&(scriptUrl=m[1])}}scriptUrl&&(scriptOptions.base=scriptOptions.base||scriptUrl,scriptOptions.packaged=!0),scriptOptions.basePath=scriptOptions.base,scriptOptions.workerPath=scriptOptions.workerPath||scriptOptions.base,scriptOptions.modePath=scriptOptions.modePath||scriptOptions.base,scriptOptions.themePath=scriptOptions.themePath||scriptOptions.base,delete scriptOptions.base;for(var key in scriptOptions)void 0!==scriptOptions[key]&&exports.set(key,scriptOptions[key])}}function deHyphenate(str){return str.replace(/-(.)/g,function(m,m1){return m1.toUpperCase()})}var lang=acequire("./lib/lang"),net=(acequire("./lib/oop"),acequire("./lib/net")),AppConfig=acequire("./lib/app_config").AppConfig;module.exports=exports=new AppConfig;var global=function(){return this||"undefined"!=typeof window&&window}(),options={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};exports.get=function(key){if(!options.hasOwnProperty(key))throw new Error("Unknown config key: "+key);return options[key]},exports.set=function(key,value){if(!options.hasOwnProperty(key))throw new Error("Unknown config key: "+key);options[key]=value},exports.all=function(){return lang.copyObject(options)},exports.moduleUrl=function(name,component){if(options.$moduleUrls[name])return options.$moduleUrls[name];var parts=name.split("/");component=component||parts[parts.length-2]||"";var sep="snippets"==component?"/":"-",base=parts[parts.length-1];if("worker"==component&&"-"==sep){var re=new RegExp("^"+component+"[\\-_]|[\\-_]"+component+"$","g");base=base.replace(re,"")}(!base||base==component)&&parts.length>1&&(base=parts[parts.length-2]);var path=options[component+"Path"];return null==path?path=options.basePath:"/"==sep&&(component=sep=""),path&&"/"!=path.slice(-1)&&(path+="/"),path+component+sep+base+this.get("suffix")},exports.setModuleUrl=function(name,subst){return options.$moduleUrls[name]=subst},exports.$loading={},exports.loadModule=function(moduleName,onLoad){var module,moduleType;Array.isArray(moduleName)&&(moduleType=moduleName[0],moduleName=moduleName[1]);try{module=acequire(moduleName)}catch(e){}if(module&&!exports.$loading[moduleName])return onLoad&&onLoad(module);if(exports.$loading[moduleName]||(exports.$loading[moduleName]=[]),exports.$loading[moduleName].push(onLoad),!(exports.$loading[moduleName].length>1)){var afterLoad=function(){acequire([moduleName],function(module){exports._emit("load.module",{name:moduleName,module:module});var listeners=exports.$loading[moduleName];exports.$loading[moduleName]=null,listeners.forEach(function(onLoad){onLoad&&onLoad(module)})})};if(!exports.get("packaged"))return afterLoad();net.loadScript(exports.moduleUrl(moduleName,moduleType),afterLoad)}},init(!0),exports.init=init}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(acequire,exports,module){"use strict";var event=acequire("../lib/event"),useragent=acequire("../lib/useragent"),DefaultHandlers=acequire("./default_handlers").DefaultHandlers,DefaultGutterHandler=acequire("./default_gutter_handler").GutterHandler,MouseEvent=acequire("./mouse_event").MouseEvent,DragdropHandler=acequire("./dragdrop_handler").DragdropHandler,config=acequire("../config"),MouseHandler=function(editor){var _self=this;this.editor=editor,new DefaultHandlers(this),new DefaultGutterHandler(this),new DragdropHandler(this);var focusEditor=function(e){(!document.hasFocus||!document.hasFocus()||!editor.isFocused()&&document.activeElement==(editor.textInput&&editor.textInput.getElement()))&&window.focus(),editor.focus()},mouseTarget=editor.renderer.getMouseEventTarget();event.addListener(mouseTarget,"click",this.onMouseEvent.bind(this,"click")),event.addListener(mouseTarget,"mousemove",this.onMouseMove.bind(this,"mousemove")),event.addMultiMouseDownListener([mouseTarget,editor.renderer.scrollBarV&&editor.renderer.scrollBarV.inner,editor.renderer.scrollBarH&&editor.renderer.scrollBarH.inner,editor.textInput&&editor.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),event.addMouseWheelListener(editor.container,this.onMouseWheel.bind(this,"mousewheel")),event.addTouchMoveListener(editor.container,this.onTouchMove.bind(this,"touchmove"));var gutterEl=editor.renderer.$gutter;event.addListener(gutterEl,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),event.addListener(gutterEl,"click",this.onMouseEvent.bind(this,"gutterclick")),event.addListener(gutterEl,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),event.addListener(gutterEl,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),event.addListener(mouseTarget,"mousedown",focusEditor),event.addListener(gutterEl,"mousedown",focusEditor),useragent.isIE&&editor.renderer.scrollBarV&&(event.addListener(editor.renderer.scrollBarV.element,"mousedown",focusEditor),event.addListener(editor.renderer.scrollBarH.element,"mousedown",focusEditor)),editor.on("mousemove",function(e){if(!_self.state&&!_self.$dragDelay&&_self.$dragEnabled){var character=editor.renderer.screenToTextCoordinates(e.x,e.y),range=editor.session.selection.getRange(),renderer=editor.renderer;!range.isEmpty()&&range.insideStart(character.row,character.column)?renderer.setCursorStyle("default"):renderer.setCursorStyle("")}})};(function(){this.onMouseEvent=function(name,e){this.editor._emit(name,new MouseEvent(e,this.editor))},this.onMouseMove=function(name,e){var listeners=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;listeners&&listeners.length&&this.editor._emit(name,new MouseEvent(e,this.editor))},this.onMouseWheel=function(name,e){var mouseEvent=new MouseEvent(e,this.editor);mouseEvent.speed=2*this.$scrollSpeed,mouseEvent.wheelX=e.wheelX,mouseEvent.wheelY=e.wheelY,this.editor._emit(name,mouseEvent)},this.onTouchMove=function(name,e){var mouseEvent=new MouseEvent(e,this.editor);mouseEvent.speed=1,mouseEvent.wheelX=e.wheelX,mouseEvent.wheelY=e.wheelY,this.editor._emit(name,mouseEvent)},this.setState=function(state){this.state=state},this.captureMouse=function(ev,mouseMoveHandler){this.x=ev.x,this.y=ev.y,this.isMousePressed=!0;var renderer=this.editor.renderer;renderer.$keepTextAreaAtCursor&&(renderer.$keepTextAreaAtCursor=null);var self=this,onMouseMove=function(e){if(e){if(useragent.isWebKit&&!e.which&&self.releaseMouse)return self.releaseMouse();self.x=e.clientX,self.y=e.clientY,mouseMoveHandler&&mouseMoveHandler(e),self.mouseEvent=new MouseEvent(e,self.editor),self.$mouseMoved=!0}},onCaptureEnd=function(e){clearInterval(timerId),onCaptureInterval(),self[self.state+"End"]&&self[self.state+"End"](e),self.state="",null==renderer.$keepTextAreaAtCursor&&(renderer.$keepTextAreaAtCursor=!0,renderer.$moveTextAreaToCursor()),self.isMousePressed=!1,self.$onCaptureMouseMove=self.releaseMouse=null,e&&self.onMouseEvent("mouseup",e)},onCaptureInterval=function(){self[self.state]&&self[self.state](),self.$mouseMoved=!1};if(useragent.isOldIE&&"dblclick"==ev.domEvent.type)return setTimeout(function(){onCaptureEnd(ev)});self.$onCaptureMouseMove=onMouseMove,self.releaseMouse=event.capture(this.editor.container,onMouseMove,onCaptureEnd);var timerId=setInterval(onCaptureInterval,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var stop=function(e){e&&e.domEvent&&"contextmenu"!=e.domEvent.type||(this.editor.off("nativecontextmenu",stop),e&&e.domEvent&&event.stopEvent(e.domEvent))}.bind(this);setTimeout(stop,10),this.editor.on("nativecontextmenu",stop)}}).call(MouseHandler.prototype),config.defineOptions(MouseHandler.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:useragent.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),exports.MouseHandler=MouseHandler}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(acequire,exports,module){"use strict";function FoldHandler(editor){editor.on("click",function(e){var position=e.getDocumentPosition(),session=editor.session,fold=session.getFoldAt(position.row,position.column,1);fold&&(e.getAccelKey()?session.removeFold(fold):session.expandFold(fold),e.stop())}),editor.on("gutterclick",function(e){if("foldWidgets"==editor.renderer.$gutterLayer.getRegion(e)){var row=e.getDocumentPosition().row,session=editor.session;session.foldWidgets&&session.foldWidgets[row]&&editor.session.onFoldWidgetClick(row,e),editor.isFocused()||editor.focus(),e.stop()}}),editor.on("gutterdblclick",function(e){if("foldWidgets"==editor.renderer.$gutterLayer.getRegion(e)){var row=e.getDocumentPosition().row,session=editor.session,data=session.getParentFoldRangeData(row,!0),range=data.range||data.firstRange;if(range){row=range.start.row;var fold=session.getFoldAt(row,session.getLine(row).length,1);fold?session.removeFold(fold):(session.addFold("...",range),editor.renderer.scrollCursorIntoView({row:range.start.row,column:0}))}e.stop()}})}exports.FoldHandler=FoldHandler}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(acequire,exports,module){"use strict";var keyUtil=acequire("../lib/keys"),event=acequire("../lib/event"),KeyBinding=function(editor){this.$editor=editor,this.$data={editor:editor},this.$handlers=[],this.setDefaultHandler(editor.commands)};(function(){this.setDefaultHandler=function(kb){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=kb,this.addKeyboardHandler(kb,0)},this.setKeyboardHandler=function(kb){var h=this.$handlers;if(h[h.length-1]!=kb){for(;h[h.length-1]&&h[h.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(h[h.length-1]);this.addKeyboardHandler(kb,1)}},this.addKeyboardHandler=function(kb,pos){if(kb){"function"!=typeof kb||kb.handleKeyboard||(kb.handleKeyboard=kb);var i=this.$handlers.indexOf(kb);-1!=i&&this.$handlers.splice(i,1),void 0==pos?this.$handlers.push(kb):this.$handlers.splice(pos,0,kb),-1==i&&kb.attach&&kb.attach(this.$editor)}},this.removeKeyboardHandler=function(kb){var i=this.$handlers.indexOf(kb);return-1!=i&&(this.$handlers.splice(i,1),kb.detach&&kb.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var data=this.$data,editor=data.editor;return this.$handlers.map(function(h){return h.getStatusText&&h.getStatusText(editor,data)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(hashId,keyString,keyCode,e){for(var toExecute,success=!1,commands=this.$editor.commands,i=this.$handlers.length;i--&&!((toExecute=this.$handlers[i].handleKeyboard(this.$data,hashId,keyString,keyCode,e))&&toExecute.command&&(success="null"==toExecute.command||commands.exec(toExecute.command,this.$editor,toExecute.args,e),success&&e&&-1!=hashId&&1!=toExecute.passEvent&&1!=toExecute.command.passEvent&&event.stopEvent(e),success)););return success||-1!=hashId||(toExecute={command:"insertstring"},success=commands.exec("insertstring",this.$editor,keyString)),success&&this.$editor._signal("keyboardActivity",toExecute),success},this.onCommandKey=function(e,hashId,keyCode){var keyString=keyUtil.keyCodeToString(keyCode);this.$callKeyboardHandlers(hashId,keyString,keyCode,e)},this.onTextInput=function(text){this.$callKeyboardHandlers(-1,text)}}).call(KeyBinding.prototype),exports.KeyBinding=KeyBinding}),ace.define("ace/range",["require","exports","module"],function(acequire,exports,module){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},
+this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)&&(!this.isEnd(row,column)&&!this.isStart(row,column))},this.insideStart=function(row,column){return 0==this.compare(row,column)&&!this.isEnd(row,column)},this.insideEnd=function(row,column){return 0==this.compare(row,column)&&!this.isStart(row,column)},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?row<this.start.row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?column<=this.end.column?0:1:0:column<this.start.column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(this.end.row<firstRow)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(this.start.row<firstRow)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(acequire,exports,module){"use strict";var oop=acequire("./lib/oop"),lang=acequire("./lib/lang"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Selection=function(session){this.session=session,this.doc=session.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var self=this;this.lead.on("change",function(e){self._emit("changeCursor"),self.$isEmpty||self._emit("changeSelection"),self.$keepDesiredColumnOnChange||e.old.column==e.value.column||(self.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){self.$isEmpty||self._emit("changeSelection")})};(function(){oop.implement(this,EventEmitter),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.isEmpty()&&this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(row,column){this.anchor.setPosition(row,column),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(columns){if(this.$isEmpty)return void this.moveCursorTo(this.lead.row,this.lead.column+columns);var anchor=this.getSelectionAnchor(),lead=this.getSelectionLead(),isBackwards=this.isBackwards();isBackwards&&0===anchor.column||this.setSelectionAnchor(anchor.row,anchor.column+columns),(isBackwards||0!==lead.column)&&this.$moveSelection(function(){this.moveCursorTo(lead.row,lead.column+columns)})},this.isBackwards=function(){var anchor=this.anchor,lead=this.lead;return anchor.row>lead.row||anchor.row==lead.row&&anchor.column>lead.column},this.getRange=function(){var anchor=this.anchor,lead=this.lead;return this.isEmpty()?Range.fromPoints(lead,lead):this.isBackwards()?Range.fromPoints(lead,anchor):Range.fromPoints(anchor,lead)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var lastRow=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(lastRow,this.doc.getLine(lastRow).length)},this.setRange=this.setSelectionRange=function(range,reverse){reverse?(this.setSelectionAnchor(range.end.row,range.end.column),this.selectTo(range.start.row,range.start.column)):(this.setSelectionAnchor(range.start.row,range.start.column),this.selectTo(range.end.row,range.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(mover){var lead=this.lead;this.$isEmpty&&this.setSelectionAnchor(lead.row,lead.column),mover.call(this)},this.selectTo=function(row,column){this.$moveSelection(function(){this.moveCursorTo(row,column)})},this.selectToPosition=function(pos){this.$moveSelection(function(){this.moveCursorToPosition(pos)})},this.moveTo=function(row,column){this.clearSelection(),this.moveCursorTo(row,column)},this.moveToPosition=function(pos){this.clearSelection(),this.moveCursorToPosition(pos)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(row,column){if(void 0===column){var cursor=row||this.lead;row=cursor.row,column=cursor.column}return this.session.getWordRange(row,column)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var cursor=this.getCursor(),range=this.session.getAWordRange(cursor.row,cursor.column);this.setSelectionRange(range)},this.getLineRange=function(row,excludeLastChar){var rowEnd,rowStart="number"==typeof row?row:this.lead.row,foldLine=this.session.getFoldLine(rowStart);return foldLine?(rowStart=foldLine.start.row,rowEnd=foldLine.end.row):rowEnd=rowStart,!0===excludeLastChar?new Range(rowStart,0,rowEnd,this.session.getLine(rowEnd).length):new Range(rowStart,0,rowEnd+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var fold,cursor=this.lead.getPosition();if(fold=this.session.getFoldAt(cursor.row,cursor.column,-1))this.moveCursorTo(fold.start.row,fold.start.column);else if(0===cursor.column)cursor.row>0&&this.moveCursorTo(cursor.row-1,this.doc.getLine(cursor.row-1).length);else{var tabSize=this.session.getTabSize();this.session.isTabStop(cursor)&&this.doc.getLine(cursor.row).slice(cursor.column-tabSize,cursor.column).split(" ").length-1==tabSize?this.moveCursorBy(0,-tabSize):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var fold,cursor=this.lead.getPosition();if(fold=this.session.getFoldAt(cursor.row,cursor.column,1))this.moveCursorTo(fold.end.row,fold.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var tabSize=this.session.getTabSize(),cursor=this.lead;this.session.isTabStop(cursor)&&this.doc.getLine(cursor.row).slice(cursor.column,cursor.column+tabSize).split(" ").length-1==tabSize?this.moveCursorBy(0,tabSize):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var row=this.lead.row,column=this.lead.column,screenRow=this.session.documentToScreenRow(row,column),firstColumnPosition=this.session.screenToDocumentPosition(screenRow,0),beforeCursor=this.session.getDisplayLine(row,null,firstColumnPosition.row,firstColumnPosition.column),leadingSpace=beforeCursor.match(/^\s*/);leadingSpace[0].length==column||this.session.$useEmacsStyleLineStart||(firstColumnPosition.column+=leadingSpace[0].length),this.moveCursorToPosition(firstColumnPosition)},this.moveCursorLineEnd=function(){var lead=this.lead,lineEnd=this.session.getDocumentLastRowColumnPosition(lead.row,lead.column);if(this.lead.column==lineEnd.column){var line=this.session.getLine(lineEnd.row);if(lineEnd.column==line.length){var textEnd=line.search(/\s+$/);textEnd>0&&(lineEnd.column=textEnd)}}this.moveCursorTo(lineEnd.row,lineEnd.column)},this.moveCursorFileEnd=function(){var row=this.doc.getLength()-1,column=this.doc.getLine(row).length;this.moveCursorTo(row,column)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var row=this.lead.row,column=this.lead.column,line=this.doc.getLine(row),rightOfCursor=line.substring(column);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var fold=this.session.getFoldAt(row,column,1);return fold?void this.moveCursorTo(fold.end.row,fold.end.column):(this.session.nonTokenRe.exec(rightOfCursor)&&(column+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,rightOfCursor=line.substring(column)),column>=line.length?(this.moveCursorTo(row,line.length),this.moveCursorRight(),void(row<this.doc.getLength()-1&&this.moveCursorWordRight())):(this.session.tokenRe.exec(rightOfCursor)&&(column+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(row,column)))},this.moveCursorLongWordLeft=function(){var fold,row=this.lead.row,column=this.lead.column;if(fold=this.session.getFoldAt(row,column,-1))return void this.moveCursorTo(fold.start.row,fold.start.column);var str=this.session.getFoldStringAt(row,column,-1);null==str&&(str=this.doc.getLine(row).substring(0,column));var leftOfCursor=lang.stringReverse(str);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(leftOfCursor)&&(column-=this.session.nonTokenRe.lastIndex,leftOfCursor=leftOfCursor.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),column<=0)return this.moveCursorTo(row,0),this.moveCursorLeft(),void(row>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(leftOfCursor)&&(column-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(row,column)},this.$shortWordEndIndex=function(rightOfCursor){var ch,index=0,whitespaceRe=/\s/,tokenRe=this.session.tokenRe;if(tokenRe.lastIndex=0,this.session.tokenRe.exec(rightOfCursor))index=this.session.tokenRe.lastIndex;else{for(;(ch=rightOfCursor[index])&&whitespaceRe.test(ch);)index++;if(index<1)for(tokenRe.lastIndex=0;(ch=rightOfCursor[index])&&!tokenRe.test(ch);)if(tokenRe.lastIndex=0,index++,whitespaceRe.test(ch)){if(index>2){index--;break}for(;(ch=rightOfCursor[index])&&whitespaceRe.test(ch);)index++;if(index>2)break}}return tokenRe.lastIndex=0,index},this.moveCursorShortWordRight=function(){var row=this.lead.row,column=this.lead.column,line=this.doc.getLine(row),rightOfCursor=line.substring(column),fold=this.session.getFoldAt(row,column,1);if(fold)return this.moveCursorTo(fold.end.row,fold.end.column);if(column==line.length){var l=this.doc.getLength();do{row++,rightOfCursor=this.doc.getLine(row)}while(row<l&&/^\s*$/.test(rightOfCursor));/^\s+/.test(rightOfCursor)||(rightOfCursor=""),column=0}var index=this.$shortWordEndIndex(rightOfCursor);this.moveCursorTo(row,column+index)},this.moveCursorShortWordLeft=function(){var fold,row=this.lead.row,column=this.lead.column;if(fold=this.session.getFoldAt(row,column,-1))return this.moveCursorTo(fold.start.row,fold.start.column);var line=this.session.getLine(row).substring(0,column);if(0===column){do{row--,line=this.doc.getLine(row)}while(row>0&&/^\s*$/.test(line));column=line.length,/\s+$/.test(line)||(line="")}var leftOfCursor=lang.stringReverse(line),index=this.$shortWordEndIndex(leftOfCursor);return this.moveCursorTo(row,column-index)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(rows,chars){var screenPos=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===chars&&(this.$desiredColumn?screenPos.column=this.$desiredColumn:this.$desiredColumn=screenPos.column);var docPos=this.session.screenToDocumentPosition(screenPos.row+rows,screenPos.column);0!==rows&&0===chars&&docPos.row===this.lead.row&&docPos.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[docPos.row]&&(docPos.row>0||rows>0)&&docPos.row++,this.moveCursorTo(docPos.row,docPos.column+chars,0===chars)},this.moveCursorToPosition=function(position){this.moveCursorTo(position.row,position.column)},this.moveCursorTo=function(row,column,keepDesiredColumn){var fold=this.session.getFoldAt(row,column,1);fold&&(row=fold.start.row,column=fold.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(row,column),this.$keepDesiredColumnOnChange=!1,keepDesiredColumn||(this.$desiredColumn=null)},this.moveCursorToScreen=function(row,column,keepDesiredColumn){var pos=this.session.screenToDocumentPosition(row,column);this.moveCursorTo(pos.row,pos.column,keepDesiredColumn)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(range){this.setSelectionRange(range,range.cursor==range.start),this.$desiredColumn=range.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(range){var r=this.getRange();return range?(range.start.column=r.start.column,range.start.row=r.start.row,range.end.column=r.end.column,range.end.row=r.end.row):range=r,range.cursor=this.isBackwards()?range.start:range.end,range.desiredColumn=this.$desiredColumn,range},this.getRangeOfMovements=function(func){var start=this.getCursor();try{func(this);var end=this.getCursor();return Range.fromPoints(start,end)}catch(e){return Range.fromPoints(start,start)}finally{this.moveCursorToPosition(start)}},this.toJSON=function(){if(this.rangeCount)var data=this.ranges.map(function(r){var r1=r.clone();return r1.isBackwards=r.cursor==r.start,r1});else{var data=this.getRange();data.isBackwards=this.isBackwards()}return data},this.fromJSON=function(data){if(void 0==data.start){if(this.rangeList){this.toSingleRange(data[0]);for(var i=data.length;i--;){var r=Range.fromPoints(data[i].start,data[i].end);data[i].isBackwards&&(r.cursor=r.start),this.addRange(r,!0)}return}data=data[0]}this.rangeList&&this.toSingleRange(data),this.setSelectionRange(data,data.isBackwards)},this.isEqual=function(data){if((data.length||this.rangeCount)&&data.length!=this.rangeCount)return!1;if(!data.length||!this.ranges)return this.getRange().isEqual(data);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(data[i]))return!1;return!0}}).call(Selection.prototype),exports.Selection=Selection}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(acequire,exports,module){"use strict";var config=acequire("./config"),MAX_TOKEN_COUNT=2e3,Tokenizer=function(rules){this.states=rules,this.regExps={},this.matchMappings={};for(var key in this.states){for(var state=this.states[key],ruleRegExps=[],matchTotal=0,mapping=this.matchMappings[key]={defaultToken:"text"},flag="g",splitterRurles=[],i=0;i<state.length;i++){var rule=state[i];if(rule.defaultToken&&(mapping.defaultToken=rule.defaultToken),rule.caseInsensitive&&(flag="gi"),null!=rule.regex){rule.regex instanceof RegExp&&(rule.regex=rule.regex.toString().slice(1,-1));var adjustedregex=rule.regex,matchcount=new RegExp("(?:("+adjustedregex+")|(.))").exec("a").length-2;Array.isArray(rule.token)?1==rule.token.length||1==matchcount?rule.token=rule.token[0]:matchcount-1!=rule.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:rule,groupCount:matchcount-1}),rule.token=rule.token[0]):(rule.tokenArray=rule.token,rule.token=null,rule.onMatch=this.$arrayTokens):"function"!=typeof rule.token||rule.onMatch||(rule.onMatch=matchcount>1?this.$applyToken:rule.token),matchcount>1&&(/\\\d/.test(rule.regex)?adjustedregex=rule.regex.replace(/\\([0-9]+)/g,function(match,digit){return"\\"+(parseInt(digit,10)+matchTotal+1)}):(matchcount=1,adjustedregex=this.removeCapturingGroups(rule.regex)),rule.splitRegex||"string"==typeof rule.token||splitterRurles.push(rule)),mapping[matchTotal]=i,matchTotal+=matchcount,ruleRegExps.push(adjustedregex),rule.onMatch||(rule.onMatch=null)}}ruleRegExps.length||(mapping[0]=0,ruleRegExps.push("$")),splitterRurles.forEach(function(rule){rule.splitRegex=this.createSplitterRegexp(rule.regex,flag)},this),this.regExps[key]=new RegExp("("+ruleRegExps.join(")|(")+")|($)",flag)}};(function(){this.$setMaxTokenCount=function(m){MAX_TOKEN_COUNT=0|m},this.$applyToken=function(str){var values=this.splitRegex.exec(str).slice(1),types=this.token.apply(this,values);if("string"==typeof types)return[{type:types,value:str}];for(var tokens=[],i=0,l=types.length;i<l;i++)values[i]&&(tokens[tokens.length]={type:types[i],value:values[i]});return tokens},this.$arrayTokens=function(str){if(!str)return[];var values=this.splitRegex.exec(str);if(!values)return"text";for(var tokens=[],types=this.tokenArray,i=0,l=types.length;i<l;i++)values[i+1]&&(tokens[tokens.length]={type:types[i],value:values[i+1]});return tokens},this.removeCapturingGroups=function(src){return src.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(x,y){return y?"(?:":x})},this.createSplitterRegexp=function(src,flag){if(-1!=src.indexOf("(?=")){var stack=0,inChClass=!1,lastCapture={};src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(m,esc,parenOpen,parenClose,square,index){return inChClass?inChClass="]"!=square:square?inChClass=!0:parenClose?(stack==lastCapture.stack&&(lastCapture.end=index+1,lastCapture.stack=-1),stack--):parenOpen&&(stack++,1!=parenOpen.length&&(lastCapture.stack=stack,lastCapture.start=index)),m}),null!=lastCapture.end&&/^\)*$/.test(src.substr(lastCapture.end))&&(src=src.substring(0,lastCapture.start)+src.substr(lastCapture.end))}return"^"!=src.charAt(0)&&(src="^"+src),"$"!=src.charAt(src.length-1)&&(src+="$"),new RegExp(src,(flag||"").replace("g",""))},this.getLineTokens=function(line,startState){if(startState&&"string"!=typeof startState){var stack=startState.slice(0);startState=stack[0],"#tmp"===startState&&(stack.shift(),startState=stack.shift())}else var stack=[];var currentState=startState||"start",state=this.states[currentState];state||(currentState="start",state=this.states[currentState]);var mapping=this.matchMappings[currentState],re=this.regExps[currentState];re.lastIndex=0;for(var match,tokens=[],lastIndex=0,matchAttempts=0,token={type:null,value:""};match=re.exec(line);){var type=mapping.defaultToken,rule=null,value=match[0],index=re.lastIndex;if(index-value.length>lastIndex){var skipped=line.substring(lastIndex,index-value.length);token.type==type?token.value+=skipped:(token.type&&tokens.push(token),token={type:type,value:skipped})}for(var i=0;i<match.length-2;i++)if(void 0!==match[i+1]){rule=state[mapping[i]],type=rule.onMatch?rule.onMatch(value,currentState,stack):rule.token,rule.next&&(currentState="string"==typeof rule.next?rule.next:rule.next(currentState,stack),state=this.states[currentState],state||(this.reportError("state doesn't exist",currentState),currentState="start",state=this.states[currentState]),mapping=this.matchMappings[currentState],lastIndex=index,re=this.regExps[currentState],re.lastIndex=index);break}if(value)if("string"==typeof type)rule&&!1===rule.merge||token.type!==type?(token.type&&tokens.push(token),token={type:type,value:value}):token.value+=value;else if(type){token.type&&tokens.push(token),token={type:null,value:""};for(var i=0;i<type.length;i++)tokens.push(type[i])}if(lastIndex==line.length)break;if(lastIndex=index,matchAttempts++>MAX_TOKEN_COUNT){for(matchAttempts>2*line.length&&this.reportError("infinite loop with in ace tokenizer",{startState:startState,line:line});lastIndex<line.length;)token.type&&tokens.push(token),token={value:line.substring(lastIndex,lastIndex+=2e3),type:"overflow"};currentState="start",stack=[];break}}return token.type&&tokens.push(token),stack.length>1&&stack[0]!==currentState&&stack.unshift("#tmp",currentState),{tokens:tokens,state:stack.length?stack:currentState}},this.reportError=config.reportError}).call(Tokenizer.prototype),exports.Tokenizer=Tokenizer}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(acequire,exports,module){"use strict";var lang=acequire("../lib/lang"),TextHighlightRules=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(rules,prefix){if(prefix)for(var key in rules){for(var state=rules[key],i=0;i<state.length;i++){var rule=state[i];(rule.next||rule.onMatch)&&("string"==typeof rule.next&&0!==rule.next.indexOf(prefix)&&(rule.next=prefix+rule.next),rule.nextState&&0!==rule.nextState.indexOf(prefix)&&(rule.nextState=prefix+rule.nextState))}this.$rules[prefix+key]=state}else for(var key in rules)this.$rules[key]=rules[key]},this.getRules=function(){return this.$rules},this.embedRules=function(HighlightRules,prefix,escapeRules,states,append){var embedRules="function"==typeof HighlightRules?(new HighlightRules).getRules():HighlightRules;if(states)for(var i=0;i<states.length;i++)states[i]=prefix+states[i];else{states=[];for(var key in embedRules)states.push(prefix+key)}if(this.addRules(embedRules,prefix),escapeRules)for(var addRules=Array.prototype[append?"push":"unshift"],i=0;i<states.length;i++)addRules.apply(this.$rules[states[i]],lang.deepCopy(escapeRules));this.$embeds||(this.$embeds=[]),this.$embeds.push(prefix)},this.getEmbeds=function(){return this.$embeds};var pushState=function(currentState,stack){return("start"!=currentState||stack.length)&&stack.unshift(this.nextState,currentState),this.nextState},popState=function(currentState,stack){return stack.shift(),stack.shift()||"start"};this.normalizeRules=function(){function processState(key){var state=rules[key];state.processed=!0;for(var i=0;i<state.length;i++){var rule=state[i];!rule.regex&&rule.start&&(rule.regex=rule.start,rule.next||(rule.next=[]),rule.next.push({defaultToken:rule.token},{token:rule.token+".end",regex:rule.end||rule.start,next:"pop"}),rule.token=rule.token+".start",rule.push=!0);var next=rule.next||rule.push;if(next&&Array.isArray(next)){var stateName=rule.stateName;stateName||(stateName=rule.token,"string"!=typeof stateName&&(stateName=stateName[0]||""),rules[stateName]&&(stateName+=id++)),rules[stateName]=next,rule.next=stateName,processState(stateName)}else"pop"==next&&(rule.next=popState);if(rule.push&&(rule.nextState=rule.next||rule.push,rule.next=pushState,delete rule.push),rule.rules)for(var r in rule.rules)rules[r]?rules[r].push&&rules[r].push.apply(rules[r],rule.rules[r]):rules[r]=rule.rules[r];if(rule.include||"string"==typeof rule)var includeName=rule.include||rule,toInsert=rules[includeName];else Array.isArray(rule)&&(toInsert=rule);if(toInsert){var args=[i,1].concat(toInsert);rule.noEscape&&(args=args.filter(function(x){return!x.next})),state.splice.apply(state,args),i--,toInsert=null}rule.keywordMap&&(rule.token=this.createKeywordMapper(rule.keywordMap,rule.defaultToken||"text",rule.caseInsensitive),delete rule.defaultToken)}}var id=0,rules=this.$rules;Object.keys(rules).forEach(processState,this)},this.createKeywordMapper=function(map,defaultToken,ignoreCase,splitChar){var keywords=Object.create(null);return Object.keys(map).forEach(function(className){var a=map[className];ignoreCase&&(a=a.toLowerCase());for(var list=a.split(splitChar||"|"),i=list.length;i--;)keywords[list[i]]=className}),Object.getPrototypeOf(keywords)&&(keywords.__proto__=null),this.$keywordList=Object.keys(keywords),map=null,ignoreCase?function(value){return keywords[value.toLowerCase()]||defaultToken}:function(value){return keywords[value]||defaultToken}},this.getKeywords=function(){return this.$keywords}}).call(TextHighlightRules.prototype),exports.TextHighlightRules=TextHighlightRules}),ace.define("ace/mode/behaviour",["require","exports","module"],function(acequire,exports,module){"use strict";var Behaviour=function(){this.$behaviours={}};(function(){this.add=function(name,action,callback){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[name]:this.$behaviours[name]={}}this.$behaviours[name][action]=callback},this.addBehaviours=function(behaviours){for(var key in behaviours)for(var action in behaviours[key])this.add(key,action,behaviours[key][action])},this.remove=function(name){this.$behaviours&&this.$behaviours[name]&&delete this.$behaviours[name]},this.inherit=function(mode,filter){if("function"==typeof mode)var behaviours=(new mode).getBehaviours(filter);else var behaviours=mode.getBehaviours(filter);this.addBehaviours(behaviours)},this.getBehaviours=function(filter){if(filter){for(var ret={},i=0;i<filter.length;i++)this.$behaviours[filter[i]]&&(ret[filter[i]]=this.$behaviours[filter[i]]);return ret}return this.$behaviours}}).call(Behaviour.prototype),exports.Behaviour=Behaviour}),ace.define("ace/unicode",["require","exports","module"],function(acequire,exports,module){"use strict";exports.packages={},function(pack){for(var name in pack)exports.packages[name]=pack[name].replace(/\w{4}/g,"\\u$&")}({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
+Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/token_iterator",["require","exports","module"],function(acequire,exports,module){"use strict";var TokenIterator=function(session,initialRow,initialColumn){this.$session=session,this.$row=initialRow,this.$rowTokens=session.getTokens(initialRow);var token=session.getTokenAt(initialRow,initialColumn);this.$tokenIndex=token?token.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var rowCount;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,rowCount||(rowCount=this.$session.getLength()),this.$row>=rowCount)return this.$row=rowCount-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var rowTokens=this.$rowTokens,tokenIndex=this.$tokenIndex,column=rowTokens[tokenIndex].start;if(void 0!==column)return column;for(column=0;tokenIndex>0;)tokenIndex-=1,column+=rowTokens[tokenIndex].value.length;return column},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(TokenIterator.prototype),exports.TokenIterator=TokenIterator}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(acequire,exports,module){"use strict";var Tokenizer=acequire("../tokenizer").Tokenizer,TextHighlightRules=acequire("./text_highlight_rules").TextHighlightRules,Behaviour=acequire("./behaviour").Behaviour,unicode=acequire("../unicode"),lang=acequire("../lib/lang"),TokenIterator=acequire("../token_iterator").TokenIterator,Range=acequire("../range").Range,Mode=function(){this.HighlightRules=TextHighlightRules,this.$behaviour=new Behaviour};(function(){this.tokenRe=new RegExp("^["+unicode.packages.L+unicode.packages.Mn+unicode.packages.Mc+unicode.packages.Nd+unicode.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+unicode.packages.L+unicode.packages.Mn+unicode.packages.Mc+unicode.packages.Nd+unicode.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new Tokenizer(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(state,session,startRow,endRow){function iter(fun){for(var i=startRow;i<=endRow;i++)fun(doc.getLine(i),i)}var doc=session.doc,ignoreBlankLines=!0,shouldRemove=!0,minIndent=1/0,tabSize=session.getTabSize(),insertAtTabStop=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var regexpStart=this.lineCommentStart.map(lang.escapeRegExp).join("|"),lineCommentStart=this.lineCommentStart[0];else var regexpStart=lang.escapeRegExp(this.lineCommentStart),lineCommentStart=this.lineCommentStart;regexpStart=new RegExp("^(\\s*)(?:"+regexpStart+") ?"),insertAtTabStop=session.getUseSoftTabs();var uncomment=function(line,i){var m=line.match(regexpStart);if(m){var start=m[1].length,end=m[0].length;shouldInsertSpace(line,start,end)||" "!=m[0][end-1]||end--,doc.removeInLine(i,start,end)}},commentWithSpace=lineCommentStart+" ",comment=function(line,i){ignoreBlankLines&&!/\S/.test(line)||(shouldInsertSpace(line,minIndent,minIndent)?doc.insertInLine({row:i,column:minIndent},commentWithSpace):doc.insertInLine({row:i,column:minIndent},lineCommentStart))},testRemove=function(line,i){return regexpStart.test(line)},shouldInsertSpace=function(line,before,after){for(var spaces=0;before--&&" "==line.charAt(before);)spaces++;if(spaces%tabSize!=0)return!1;for(var spaces=0;" "==line.charAt(after++);)spaces++;return tabSize>2?spaces%tabSize!=tabSize-1:spaces%tabSize==0}}else{if(!this.blockComment)return!1;var lineCommentStart=this.blockComment.start,lineCommentEnd=this.blockComment.end,regexpStart=new RegExp("^(\\s*)(?:"+lang.escapeRegExp(lineCommentStart)+")"),regexpEnd=new RegExp("(?:"+lang.escapeRegExp(lineCommentEnd)+")\\s*$"),comment=function(line,i){testRemove(line,i)||ignoreBlankLines&&!/\S/.test(line)||(doc.insertInLine({row:i,column:line.length},lineCommentEnd),doc.insertInLine({row:i,column:minIndent},lineCommentStart))},uncomment=function(line,i){var m;(m=line.match(regexpEnd))&&doc.removeInLine(i,line.length-m[0].length,line.length),(m=line.match(regexpStart))&&doc.removeInLine(i,m[1].length,m[0].length)},testRemove=function(line,row){if(regexpStart.test(line))return!0;for(var tokens=session.getTokens(row),i=0;i<tokens.length;i++)if("comment"===tokens[i].type)return!0}}var minEmptyLength=1/0;iter(function(line,i){var indent=line.search(/\S/);-1!==indent?(indent<minIndent&&(minIndent=indent),shouldRemove&&!testRemove(line,i)&&(shouldRemove=!1)):minEmptyLength>line.length&&(minEmptyLength=line.length)}),minIndent==1/0&&(minIndent=minEmptyLength,ignoreBlankLines=!1,shouldRemove=!1),insertAtTabStop&&minIndent%tabSize!=0&&(minIndent=Math.floor(minIndent/tabSize)*tabSize),iter(shouldRemove?uncomment:comment)},this.toggleBlockComment=function(state,session,range,cursor){var comment=this.blockComment;if(comment){!comment.start&&comment[0]&&(comment=comment[0]);var startRow,colDiff,iterator=new TokenIterator(session,cursor.row,cursor.column),token=iterator.getCurrentToken(),initialRange=(session.selection,session.selection.toOrientedRange());if(token&&/comment/.test(token.type)){for(var startRange,endRange;token&&/comment/.test(token.type);){var i=token.value.indexOf(comment.start);if(-1!=i){var row=iterator.getCurrentTokenRow(),column=iterator.getCurrentTokenColumn()+i;startRange=new Range(row,column,row,column+comment.start.length);break}token=iterator.stepBackward()}for(var iterator=new TokenIterator(session,cursor.row,cursor.column),token=iterator.getCurrentToken();token&&/comment/.test(token.type);){var i=token.value.indexOf(comment.end);if(-1!=i){var row=iterator.getCurrentTokenRow(),column=iterator.getCurrentTokenColumn()+i;endRange=new Range(row,column,row,column+comment.end.length);break}token=iterator.stepForward()}endRange&&session.remove(endRange),startRange&&(session.remove(startRange),startRow=startRange.start.row,colDiff=-comment.start.length)}else colDiff=comment.start.length,startRow=range.start.row,session.insert(range.end,comment.end),session.insert(range.start,comment.start);initialRange.start.row==startRow&&(initialRange.start.column+=colDiff),initialRange.end.row==startRow&&(initialRange.end.column+=colDiff),session.selection.fromOrientedRange(initialRange)}},this.getNextLineIndent=function(state,line,tab){return this.$getIndent(line)},this.checkOutdent=function(state,line,input){return!1},this.autoOutdent=function(state,doc,row){},this.$getIndent=function(line){return line.match(/^\s*/)[0]},this.createWorker=function(session){return null},this.createModeDelegates=function(mapping){this.$embeds=[],this.$modes={};for(var i in mapping)mapping[i]&&(this.$embeds.push(i),this.$modes[i]=new mapping[i]);for(var delegations=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],i=0;i<delegations.length;i++)!function(scope){var functionName=delegations[i],defaultHandler=scope[functionName];scope[delegations[i]]=function(){return this.$delegator(functionName,arguments,defaultHandler)}}(this)},this.$delegator=function(method,args,defaultHandler){var state=args[0];"string"!=typeof state&&(state=state[0]);for(var i=0;i<this.$embeds.length;i++)if(this.$modes[this.$embeds[i]]){var split=state.split(this.$embeds[i]);if(!split[0]&&split[1]){args[0]=split[1];var mode=this.$modes[this.$embeds[i]];return mode[method].apply(mode,args)}}var ret=defaultHandler.apply(this,args);return defaultHandler?ret:void 0},this.transformAction=function(state,action,editor,session,param){if(this.$behaviour){var behaviours=this.$behaviour.getBehaviours();for(var key in behaviours)if(behaviours[key][action]){var ret=behaviours[key][action].apply(this,arguments);if(ret)return ret}}},this.getKeywords=function(append){if(!this.completionKeywords){var rules=this.$tokenizer.rules,completionKeywords=[];for(var rule in rules)for(var ruleItr=rules[rule],r=0,l=ruleItr.length;r<l;r++)if("string"==typeof ruleItr[r].token)/keyword|support|storage/.test(ruleItr[r].token)&&completionKeywords.push(ruleItr[r].regex);else if("object"==typeof ruleItr[r].token)for(var a=0,aLength=ruleItr[r].token.length;a<aLength;a++)if(/keyword|support|storage/.test(ruleItr[r].token[a])){var rule=ruleItr[r].regex.match(/\(.+?\)/g)[a];completionKeywords.push(rule.substr(1,rule.length-2))}this.completionKeywords=completionKeywords}return append?completionKeywords.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(state,session,pos,prefix){
+return(this.$keywordList||this.$createKeywordList()).map(function(word){return{name:word,value:word,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(Mode.prototype),exports.Mode=Mode}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports,module){"use strict";exports.applyDelta=function(docLines,delta,doNotValidate){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":if(1===delta.lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports,module){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),void 0===column?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):row<0?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),column<0&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports,module){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},0==="aaa".split(/a/).length?this.$split=function(text){return text.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(text){return text.split(/\r\n|\r|\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=match?match[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\r\n"==text||"\r"==text||"\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return this.getLength()<=1&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:row<0?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;row<this.getLength()?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=lastRow<this.getLength()-1,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){row<this.getLength()-1&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);return text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;i<deltas.length;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?delta.lines.length<=1&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;i<l;i++)if((index-=lines[i].length+newlineLength)<0)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;i<row;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports,module){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,BackgroundTokenizer=function(tokenizer,editor){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=tokenizer;var self=this;this.$worker=function(){if(self.running){for(var workerStart=new Date,currentLine=self.currentLine,endLine=-1,doc=self.doc,startLine=currentLine;self.lines[currentLine];)currentLine++;var len=doc.getLength(),processedLines=0;for(self.running=!1;currentLine<len;){self.$tokenizeRow(currentLine),endLine=currentLine;do{currentLine++}while(self.lines[currentLine]);if(++processedLines%5==0&&new Date-workerStart>20){self.running=setTimeout(self.$worker,20);break}}self.currentLine=currentLine,startLine<=endLine&&self.fireUpdateEvent(startLine,endLine)}}};(function(){oop.implement(this,EventEmitter),this.setTokenizer=function(tokenizer){this.tokenizer=tokenizer,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(doc){this.doc=doc,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(firstRow,lastRow){var data={first:firstRow,last:lastRow};this._signal("update",{data:data})},this.start=function(startRow){this.currentLine=Math.min(startRow||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(delta){var startRow=delta.start.row,len=delta.end.row-startRow;if(0===len)this.lines[startRow]=null;else if("remove"==delta.action)this.lines.splice(startRow,len+1,null),this.states.splice(startRow,len+1,null);else{var args=Array(len+1);args.unshift(startRow,1),this.lines.splice.apply(this.lines,args),this.states.splice.apply(this.states,args)}this.currentLine=Math.min(startRow,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(row){return this.lines[row]||this.$tokenizeRow(row)},this.getState=function(row){return this.currentLine==row&&this.$tokenizeRow(row),this.states[row]||"start"},this.$tokenizeRow=function(row){var line=this.doc.getLine(row),state=this.states[row-1],data=this.tokenizer.getLineTokens(line,state,row);return this.states[row]+""!=data.state+""?(this.states[row]=data.state,this.lines[row+1]=null,this.currentLine>row+1&&(this.currentLine=row+1)):this.currentLine==row&&(this.currentLine=row+1),this.lines[row]=data.tokens}}).call(BackgroundTokenizer.prototype),exports.BackgroundTokenizer=BackgroundTokenizer}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(acequire,exports,module){"use strict";var lang=acequire("./lib/lang"),Range=(acequire("./lib/oop"),acequire("./range").Range),SearchHighlight=function(regExp,clazz,type){this.setRegexp(regExp),this.clazz=clazz,this.type=type||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(regExp){this.regExp+""!=regExp+""&&(this.regExp=regExp,this.cache=[])},this.update=function(html,markerLayer,session,config){if(this.regExp)for(var start=config.firstRow,end=config.lastRow,i=start;i<=end;i++){var ranges=this.cache[i];null==ranges&&(ranges=lang.getMatchOffsets(session.getLine(i),this.regExp),ranges.length>this.MAX_RANGES&&(ranges=ranges.slice(0,this.MAX_RANGES)),ranges=ranges.map(function(match){return new Range(i,match.offset,i,match.offset+match.length)}),this.cache[i]=ranges.length?ranges:"");for(var j=ranges.length;j--;)markerLayer.drawSingleLineMarker(html,ranges[j].toScreenRange(session),this.clazz,config)}}}).call(SearchHighlight.prototype),exports.SearchHighlight=SearchHighlight}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(acequire,exports,module){"use strict";function FoldLine(foldData,folds){this.foldData=foldData,Array.isArray(folds)?this.folds=folds:folds=this.folds=[folds];var last=folds[folds.length-1];this.range=new Range(folds[0].start.row,folds[0].start.column,last.end.row,last.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(fold){fold.setFoldLine(this)},this)}var Range=acequire("../range").Range;(function(){this.shiftRow=function(shift){this.start.row+=shift,this.end.row+=shift,this.folds.forEach(function(fold){fold.start.row+=shift,fold.end.row+=shift})},this.addFold=function(fold){if(fold.sameRow){if(fold.start.row<this.startRow||fold.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(fold),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(fold.start.row,fold.start.column)>0?(this.end.row=fold.end.row,this.end.column=fold.end.column):this.range.compareStart(fold.end.row,fold.end.column)<0&&(this.start.row=fold.start.row,this.start.column=fold.start.column)}else if(fold.start.row==this.end.row)this.folds.push(fold),this.end.row=fold.end.row,this.end.column=fold.end.column;else{if(fold.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(fold),this.start.row=fold.start.row,this.start.column=fold.start.column}fold.foldLine=this},this.containsRow=function(row){return row>=this.start.row&&row<=this.end.row},this.walk=function(callback,endRow,endColumn){var fold,cmp,stop,lastEnd=0,folds=this.folds,isNewRow=!0;null==endRow&&(endRow=this.end.row,endColumn=this.end.column);for(var i=0;i<folds.length;i++){if(fold=folds[i],-1==(cmp=fold.range.compareStart(endRow,endColumn)))return void callback(null,endRow,endColumn,lastEnd,isNewRow);if(stop=callback(null,fold.start.row,fold.start.column,lastEnd,isNewRow),(stop=!stop&&callback(fold.placeholder,fold.start.row,fold.start.column,lastEnd))||0===cmp)return;isNewRow=!fold.sameRow,lastEnd=fold.end.column}callback(null,endRow,endColumn,lastEnd,isNewRow)},this.getNextFoldTo=function(row,column){for(var fold,cmp,i=0;i<this.folds.length;i++){if(fold=this.folds[i],-1==(cmp=fold.range.compareEnd(row,column)))return{fold:fold,kind:"after"};if(0===cmp)return{fold:fold,kind:"inside"}}return null},this.addRemoveChars=function(row,column,len){var fold,folds,ret=this.getNextFoldTo(row,column);if(ret)if(fold=ret.fold,"inside"==ret.kind&&fold.start.column!=column&&fold.start.row!=row)window.console&&window.console.log(row,column,fold);else if(fold.start.row==row){folds=this.folds;var i=folds.indexOf(fold);for(0===i&&(this.start.column+=len),i;i<folds.length;i++){if(fold=folds[i],fold.start.column+=len,!fold.sameRow)return;fold.end.column+=len}this.end.column+=len}},this.split=function(row,column){var pos=this.getNextFoldTo(row,column);if(!pos||"inside"==pos.kind)return null;var fold=pos.fold,folds=this.folds,foldData=this.foldData,i=folds.indexOf(fold),foldBefore=folds[i-1];this.end.row=foldBefore.end.row,this.end.column=foldBefore.end.column,folds=folds.splice(i,folds.length-i);var newFoldLine=new FoldLine(foldData,folds);return foldData.splice(foldData.indexOf(this)+1,0,newFoldLine),newFoldLine},this.merge=function(foldLineNext){for(var folds=foldLineNext.folds,i=0;i<folds.length;i++)this.addFold(folds[i]);var foldData=this.foldData;foldData.splice(foldData.indexOf(foldLineNext),1)},this.toString=function(){var ret=[this.range.toString()+": ["];return this.folds.forEach(function(fold){ret.push(" "+fold.toString())}),ret.push("]"),ret.join("\n")},this.idxToPosition=function(idx){for(var lastFoldEndColumn=0,i=0;i<this.folds.length;i++){var fold=this.folds[i];if((idx-=fold.start.column-lastFoldEndColumn)<0)return{row:fold.start.row,column:fold.start.column+idx};if((idx-=fold.placeholder.length)<0)return fold.start;lastFoldEndColumn=fold.end.column}return{row:this.end.row,column:this.end.column+idx}}}).call(FoldLine.prototype),exports.FoldLine=FoldLine}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(acequire,exports,module){"use strict";var Range=acequire("./range").Range,comparePoints=Range.comparePoints,RangeList=function(){this.ranges=[]};(function(){this.comparePoints=comparePoints,this.pointIndex=function(pos,excludeEdges,startIndex){for(var list=this.ranges,i=startIndex||0;i<list.length;i++){var range=list[i],cmpEnd=comparePoints(pos,range.end);if(!(cmpEnd>0)){var cmpStart=comparePoints(pos,range.start);return 0===cmpEnd?excludeEdges&&0!==cmpStart?-i-2:i:cmpStart>0||0===cmpStart&&!excludeEdges?i:-i-1}}return-i-1},this.add=function(range){var excludeEdges=!range.isEmpty(),startIndex=this.pointIndex(range.start,excludeEdges);startIndex<0&&(startIndex=-startIndex-1);var endIndex=this.pointIndex(range.end,excludeEdges,startIndex);return endIndex<0?endIndex=-endIndex-1:endIndex++,this.ranges.splice(startIndex,endIndex-startIndex,range)},this.addList=function(list){for(var removed=[],i=list.length;i--;)removed.push.apply(removed,this.add(list[i]));return removed},this.substractPoint=function(pos){var i=this.pointIndex(pos);if(i>=0)return this.ranges.splice(i,1)},this.merge=function(){var removed=[],list=this.ranges;list=list.sort(function(a,b){return comparePoints(a.start,b.start)});for(var range,next=list[0],i=1;i<list.length;i++){range=next,next=list[i];var cmp=comparePoints(range.end,next.start);cmp<0||(0!=cmp||range.isEmpty()||next.isEmpty())&&(comparePoints(range.end,next.end)<0&&(range.end.row=next.end.row,range.end.column=next.end.column),list.splice(i,1),removed.push(next),next=range,i--)}return this.ranges=list,removed},this.contains=function(row,column){return this.pointIndex({row:row,column:column})>=0},this.containsPoint=function(pos){return this.pointIndex(pos)>=0},this.rangeAtPoint=function(pos){var i=this.pointIndex(pos);if(i>=0)return this.ranges[i]},this.clipRows=function(startRow,endRow){var list=this.ranges;if(list[0].start.row>endRow||list[list.length-1].start.row<startRow)return[];var startIndex=this.pointIndex({row:startRow,column:0});startIndex<0&&(startIndex=-startIndex-1);var endIndex=this.pointIndex({row:endRow,column:0},startIndex);endIndex<0&&(endIndex=-endIndex-1);for(var clipped=[],i=startIndex;i<endIndex;i++)clipped.push(list[i]);return clipped},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(session){this.session&&this.detach(),this.session=session,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(delta){if("insert"==delta.action)var start=delta.start,end=delta.end;else var end=delta.start,start=delta.end;for(var startRow=start.row,endRow=end.row,lineDif=endRow-startRow,colDiff=-start.column+end.column,ranges=this.ranges,i=0,n=ranges.length;i<n;i++){var r=ranges[i];if(!(r.end.row<startRow)){if(r.start.row>startRow)break;if(r.start.row==startRow&&r.start.column>=start.column&&(r.start.column==start.column&&this.$insertRight||(r.start.column+=colDiff,r.start.row+=lineDif)),r.end.row==startRow&&r.end.column>=start.column){if(r.end.column==start.column&&this.$insertRight)continue;r.end.column==start.column&&colDiff>0&&i<n-1&&r.end.column>r.start.column&&r.end.column==ranges[i+1].start.column&&(r.end.column-=colDiff),r.end.column+=colDiff,r.end.row+=lineDif}}}if(0!=lineDif&&i<n)for(;i<n;i++){var r=ranges[i];r.start.row+=lineDif,r.end.row+=lineDif}}}).call(RangeList.prototype),exports.RangeList=RangeList}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(acequire,exports,module){"use strict";function consumePoint(point,anchor){point.row-=anchor.row,0==point.row&&(point.column-=anchor.column)}function consumeRange(range,anchor){consumePoint(range.start,anchor),consumePoint(range.end,anchor)}function restorePoint(point,anchor){0==point.row&&(point.column+=anchor.column),point.row+=anchor.row}function restoreRange(range,anchor){restorePoint(range.start,anchor),restorePoint(range.end,anchor)}var RangeList=(acequire("../range").Range,acequire("../range_list").RangeList),oop=acequire("../lib/oop"),Fold=exports.Fold=function(range,placeholder){this.foldLine=null,this.placeholder=placeholder,this.range=range,this.start=range.start,this.end=range.end,this.sameRow=range.start.row==range.end.row,this.subFolds=this.ranges=[]};oop.inherits(Fold,RangeList),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(foldLine){this.foldLine=foldLine,this.subFolds.forEach(function(fold){fold.setFoldLine(foldLine)})},this.clone=function(){var range=this.range.clone(),fold=new Fold(range,this.placeholder);return this.subFolds.forEach(function(subFold){fold.subFolds.push(subFold.clone())}),fold.collapseChildren=this.collapseChildren,fold},this.addSubFold=function(fold){if(!this.range.isEqual(fold)){if(!this.range.containsRange(fold))throw new Error("A fold can't intersect already existing fold"+fold.range+this.range);consumeRange(fold,this.start);for(var row=fold.start.row,column=fold.start.column,i=0,cmp=-1;i<this.subFolds.length&&1==(cmp=this.subFolds[i].range.compare(row,column));i++);var afterStart=this.subFolds[i];if(0==cmp)return afterStart.addSubFold(fold);for(var row=fold.range.end.row,column=fold.range.end.column,j=i,cmp=-1;j<this.subFolds.length&&1==(cmp=this.subFolds[j].range.compare(row,column));j++);this.subFolds[j];if(0==cmp)throw new Error("A fold can't intersect already existing fold"+fold.range+this.range);this.subFolds.splice(i,j-i,fold);return fold.setFoldLine(this.foldLine),fold}},this.restoreRange=function(range){return restoreRange(range,this.start)}}.call(Fold.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(acequire,exports,module){"use strict";function Folding(){this.getFoldAt=function(row,column,side){var foldLine=this.getFoldLine(row);if(!foldLine)return null;for(var folds=foldLine.folds,i=0;i<folds.length;i++){var fold=folds[i];if(fold.range.contains(row,column)){if(1==side&&fold.range.isEnd(row,column))continue;if(-1==side&&fold.range.isStart(row,column))continue;return fold}}},this.getFoldsInRange=function(range){var start=range.start,end=range.end,foldLines=this.$foldData,foundFolds=[];start.column+=1,end.column-=1;for(var i=0;i<foldLines.length;i++){var cmp=foldLines[i].range.compareRange(range);if(2!=cmp){if(-2==cmp)break;for(var folds=foldLines[i].folds,j=0;j<folds.length;j++){var fold=folds[j];if(-2==(cmp=fold.range.compareRange(range)))break;if(2!=cmp){if(42==cmp)break;foundFolds.push(fold)}}}}return start.column-=1,end.column+=1,foundFolds},this.getFoldsInRangeList=function(ranges){if(Array.isArray(ranges)){var folds=[];ranges.forEach(function(range){folds=folds.concat(this.getFoldsInRange(range))},this)}else var folds=this.getFoldsInRange(ranges);return folds},this.getAllFolds=function(){for(var folds=[],foldLines=this.$foldData,i=0;i<foldLines.length;i++)for(var j=0;j<foldLines[i].folds.length;j++)folds.push(foldLines[i].folds[j]);return folds},this.getFoldStringAt=function(row,column,trim,foldLine){if(!(foldLine=foldLine||this.getFoldLine(row)))return null;for(var str,fold,lastFold={end:{column:0}},i=0;i<foldLine.folds.length;i++){fold=foldLine.folds[i];var cmp=fold.range.compareEnd(row,column);if(-1==cmp){str=this.getLine(fold.start.row).substring(lastFold.end.column,fold.start.column);break}if(0===cmp)return null;lastFold=fold}return str||(str=this.getLine(fold.start.row).substring(lastFold.end.column)),-1==trim?str.substring(0,column-lastFold.end.column):1==trim?str.substring(column-lastFold.end.column):str},this.getFoldLine=function(docRow,startFoldLine){var foldData=this.$foldData,i=0;for(startFoldLine&&(i=foldData.indexOf(startFoldLine)),-1==i&&(i=0),i;i<foldData.length;i++){var foldLine=foldData[i];if(foldLine.start.row<=docRow&&foldLine.end.row>=docRow)return foldLine;if(foldLine.end.row>docRow)return null}return null},this.getNextFoldLine=function(docRow,startFoldLine){var foldData=this.$foldData,i=0;for(startFoldLine&&(i=foldData.indexOf(startFoldLine)),-1==i&&(i=0),i;i<foldData.length;i++){var foldLine=foldData[i];if(foldLine.end.row>=docRow)return foldLine}return null},this.getFoldedRowCount=function(first,last){for(var foldData=this.$foldData,rowCount=last-first+1,i=0;i<foldData.length;i++){var foldLine=foldData[i],end=foldLine.end.row,start=foldLine.start.row;if(end>=last){start<last&&(start>=first?rowCount-=last-start:rowCount=0);break}end>=first&&(rowCount-=start>=first?end-start:end-first+1)}return rowCount},this.$addFoldLine=function(foldLine){return this.$foldData.push(foldLine),this.$foldData.sort(function(a,b){return a.start.row-b.start.row}),foldLine},this.addFold=function(placeholder,range){var fold,foldData=this.$foldData,added=!1;placeholder instanceof Fold?fold=placeholder:(fold=new Fold(range,placeholder),fold.collapseChildren=range.collapseChildren),this.$clipRangeToDocument(fold.range);var startRow=fold.start.row,startColumn=fold.start.column,endRow=fold.end.row,endColumn=fold.end.column;if(!(startRow<endRow||startRow==endRow&&startColumn<=endColumn-2))throw new Error("The range has to be at least 2 characters width");var startFold=this.getFoldAt(startRow,startColumn,1),endFold=this.getFoldAt(endRow,endColumn,-1);if(startFold&&endFold==startFold)return startFold.addSubFold(fold);startFold&&!startFold.range.isStart(startRow,startColumn)&&this.removeFold(startFold),endFold&&!endFold.range.isEnd(endRow,endColumn)&&this.removeFold(endFold);var folds=this.getFoldsInRange(fold.range);folds.length>0&&(this.removeFolds(folds),folds.forEach(function(subFold){fold.addSubFold(subFold)}));for(var i=0;i<foldData.length;i++){var foldLine=foldData[i];if(endRow==foldLine.start.row){foldLine.addFold(fold),added=!0;break}if(startRow==foldLine.end.row){if(foldLine.addFold(fold),added=!0,!fold.sameRow){var foldLineNext=foldData[i+1];if(foldLineNext&&foldLineNext.start.row==endRow){foldLine.merge(foldLineNext);break}}break}if(endRow<=foldLine.start.row)break}return added||(foldLine=this.$addFoldLine(new FoldLine(this.$foldData,fold))),this.$useWrapMode?this.$updateWrapData(foldLine.start.row,foldLine.start.row):this.$updateRowLengthCache(foldLine.start.row,foldLine.start.row),this.$modified=!0,this._signal("changeFold",{data:fold,action:"add"}),fold},this.addFolds=function(folds){folds.forEach(function(fold){this.addFold(fold)},this)},this.removeFold=function(fold){var foldLine=fold.foldLine,startRow=foldLine.start.row,endRow=foldLine.end.row,foldLines=this.$foldData,folds=foldLine.folds;if(1==folds.length)foldLines.splice(foldLines.indexOf(foldLine),1);else if(foldLine.range.isEnd(fold.end.row,fold.end.column))folds.pop(),foldLine.end.row=folds[folds.length-1].end.row,foldLine.end.column=folds[folds.length-1].end.column;else if(foldLine.range.isStart(fold.start.row,fold.start.column))folds.shift(),foldLine.start.row=folds[0].start.row,foldLine.start.column=folds[0].start.column;else if(fold.sameRow)folds.splice(folds.indexOf(fold),1);else{var newFoldLine=foldLine.split(fold.start.row,fold.start.column);folds=newFoldLine.folds,folds.shift(),newFoldLine.start.row=folds[0].start.row,newFoldLine.start.column=folds[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(startRow,endRow):this.$updateRowLengthCache(startRow,endRow)),this.$modified=!0,this._signal("changeFold",{data:fold,action:"remove"})},this.removeFolds=function(folds){for(var cloneFolds=[],i=0;i<folds.length;i++)cloneFolds.push(folds[i]);cloneFolds.forEach(function(fold){this.removeFold(fold)},this),this.$modified=!0},this.expandFold=function(fold){this.removeFold(fold),fold.subFolds.forEach(function(subFold){fold.restoreRange(subFold),this.addFold(subFold)},this),
+fold.collapseChildren>0&&this.foldAll(fold.start.row+1,fold.end.row,fold.collapseChildren-1),fold.subFolds=[]},this.expandFolds=function(folds){folds.forEach(function(fold){this.expandFold(fold)},this)},this.unfold=function(location,expandInner){var range,folds;if(null==location?(range=new Range(0,0,this.getLength(),0),expandInner=!0):range="number"==typeof location?new Range(location,0,location,this.getLine(location).length):"row"in location?Range.fromPoints(location,location):location,folds=this.getFoldsInRangeList(range),expandInner)this.removeFolds(folds);else for(var subFolds=folds;subFolds.length;)this.expandFolds(subFolds),subFolds=this.getFoldsInRangeList(range);if(folds.length)return folds},this.isRowFolded=function(docRow,startFoldRow){return!!this.getFoldLine(docRow,startFoldRow)},this.getRowFoldEnd=function(docRow,startFoldRow){var foldLine=this.getFoldLine(docRow,startFoldRow);return foldLine?foldLine.end.row:docRow},this.getRowFoldStart=function(docRow,startFoldRow){var foldLine=this.getFoldLine(docRow,startFoldRow);return foldLine?foldLine.start.row:docRow},this.getFoldDisplayLine=function(foldLine,endRow,endColumn,startRow,startColumn){null==startRow&&(startRow=foldLine.start.row),null==startColumn&&(startColumn=0),null==endRow&&(endRow=foldLine.end.row),null==endColumn&&(endColumn=this.getLine(endRow).length);var doc=this.doc,textLine="";return foldLine.walk(function(placeholder,row,column,lastColumn){if(!(row<startRow)){if(row==startRow){if(column<startColumn)return;lastColumn=Math.max(startColumn,lastColumn)}textLine+=null!=placeholder?placeholder:doc.getLine(row).substring(lastColumn,column)}},endRow,endColumn),textLine},this.getDisplayLine=function(row,endColumn,startRow,startColumn){var foldLine=this.getFoldLine(row);if(foldLine)return this.getFoldDisplayLine(foldLine,row,endColumn,startRow,startColumn);var line;return line=this.doc.getLine(row),line.substring(startColumn||0,endColumn||line.length)},this.$cloneFoldData=function(){var fd=[];return fd=this.$foldData.map(function(foldLine){var folds=foldLine.folds.map(function(fold){return fold.clone()});return new FoldLine(fd,folds)})},this.toggleFold=function(tryToUnfold){var fold,bracketPos,selection=this.selection,range=selection.getRange();if(range.isEmpty()){var cursor=range.start;if(fold=this.getFoldAt(cursor.row,cursor.column))return void this.expandFold(fold);(bracketPos=this.findMatchingBracket(cursor))?1==range.comparePoint(bracketPos)?range.end=bracketPos:(range.start=bracketPos,range.start.column++,range.end.column--):(bracketPos=this.findMatchingBracket({row:cursor.row,column:cursor.column+1}))?(1==range.comparePoint(bracketPos)?range.end=bracketPos:range.start=bracketPos,range.start.column++):range=this.getCommentFoldRange(cursor.row,cursor.column)||range}else{var folds=this.getFoldsInRange(range);if(tryToUnfold&&folds.length)return void this.expandFolds(folds);1==folds.length&&(fold=folds[0])}if(fold||(fold=this.getFoldAt(range.start.row,range.start.column)),fold&&fold.range.toString()==range.toString())return void this.expandFold(fold);var placeholder="...";if(!range.isMultiLine()){if(placeholder=this.getTextRange(range),placeholder.length<4)return;placeholder=placeholder.trim().substring(0,2)+".."}this.addFold(placeholder,range)},this.getCommentFoldRange=function(row,column,dir){var iterator=new TokenIterator(this,row,column),token=iterator.getCurrentToken();if(token&&/^comment|string/.test(token.type)){var range=new Range,re=new RegExp(token.type.replace(/\..*/,"\\."));if(1!=dir){do{token=iterator.stepBackward()}while(token&&re.test(token.type));iterator.stepForward()}if(range.start.row=iterator.getCurrentTokenRow(),range.start.column=iterator.getCurrentTokenColumn()+2,iterator=new TokenIterator(this,row,column),-1!=dir){do{token=iterator.stepForward()}while(token&&re.test(token.type));token=iterator.stepBackward()}else token=iterator.getCurrentToken();return range.end.row=iterator.getCurrentTokenRow(),range.end.column=iterator.getCurrentTokenColumn()+token.value.length-2,range}},this.foldAll=function(startRow,endRow,depth){void 0==depth&&(depth=1e5);var foldWidgets=this.foldWidgets;if(foldWidgets){endRow=endRow||this.getLength(),startRow=startRow||0;for(var row=startRow;row<endRow;row++)if(null==foldWidgets[row]&&(foldWidgets[row]=this.getFoldWidget(row)),"start"==foldWidgets[row]){var range=this.getFoldWidgetRange(row);if(range&&range.isMultiLine()&&range.end.row<=endRow&&range.start.row>=startRow){row=range.end.row;try{var fold=this.addFold("...",range);fold&&(fold.collapseChildren=depth)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(style){if(!this.$foldStyles[style])throw new Error("invalid fold style: "+style+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=style){this.$foldStyle=style,"manual"==style&&this.unfold();var mode=this.$foldMode;this.$setFolding(null),this.$setFolding(mode)}},this.$setFolding=function(foldMode){if(this.$foldMode!=foldMode){if(this.$foldMode=foldMode,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!foldMode||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=foldMode.getFoldWidget.bind(foldMode,this,this.$foldStyle),this.getFoldWidgetRange=foldMode.getFoldWidgetRange.bind(foldMode,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(row,ignoreCurrent){var fw=this.foldWidgets;if(!fw||ignoreCurrent&&fw[row])return{};for(var firstRange,i=row-1;i>=0;){var c=fw[i];if(null==c&&(c=fw[i]=this.getFoldWidget(i)),"start"==c){var range=this.getFoldWidgetRange(i);if(firstRange||(firstRange=range),range&&range.end.row>=row)break}i--}return{range:-1!==i&&range,firstRange:firstRange}},this.onFoldWidgetClick=function(row,e){e=e.domEvent;var options={children:e.shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey};if(!this.$toggleFoldWidget(row,options)){var el=e.target||e.srcElement;el&&/ace_fold-widget/.test(el.className)&&(el.className+=" ace_invalid")}},this.$toggleFoldWidget=function(row,options){if(this.getFoldWidget){var type=this.getFoldWidget(row),line=this.getLine(row),dir="end"===type?-1:1,fold=this.getFoldAt(row,-1===dir?0:line.length,dir);if(fold)return void(options.children||options.all?this.removeFold(fold):this.expandFold(fold));var range=this.getFoldWidgetRange(row,!0);if(range&&!range.isMultiLine()&&(fold=this.getFoldAt(range.start.row,range.start.column,1))&&range.isEqual(fold.range))return void this.removeFold(fold);if(options.siblings){var data=this.getParentFoldRangeData(row);if(data.range)var startRow=data.range.start.row+1,endRow=data.range.end.row;this.foldAll(startRow,endRow,options.all?1e4:0)}else options.children?(endRow=range?range.end.row:this.getLength(),this.foldAll(row+1,endRow,options.all?1e4:0)):range&&(options.all&&(range.collapseChildren=1e4),this.addFold("...",range));return range}},this.toggleFoldWidget=function(toggleParent){var row=this.selection.getCursor().row;row=this.getRowFoldStart(row);var range=this.$toggleFoldWidget(row,{});if(!range){var data=this.getParentFoldRangeData(row,!0);if(range=data.range||data.firstRange){row=range.start.row;var fold=this.getFoldAt(row,this.getLine(row).length,1);fold?this.removeFold(fold):this.addFold("...",range)}}},this.updateFoldWidgets=function(delta){var firstRow=delta.start.row,len=delta.end.row-firstRow;if(0===len)this.foldWidgets[firstRow]=null;else if("remove"==delta.action)this.foldWidgets.splice(firstRow,len+1,null);else{var args=Array(len+1);args.unshift(firstRow,1),this.foldWidgets.splice.apply(this.foldWidgets,args)}},this.tokenizerUpdateFoldWidgets=function(e){var rows=e.data;rows.first!=rows.last&&this.foldWidgets.length>rows.first&&this.foldWidgets.splice(rows.first,this.foldWidgets.length)}}var Range=acequire("../range").Range,FoldLine=acequire("./fold_line").FoldLine,Fold=acequire("./fold").Fold,TokenIterator=acequire("../token_iterator").TokenIterator;exports.Folding=Folding}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(acequire,exports,module){"use strict";function BracketMatch(){this.findMatchingBracket=function(position,chr){if(0==position.column)return null;var charBeforeCursor=chr||this.getLine(position.row).charAt(position.column-1);if(""==charBeforeCursor)return null;var match=charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/);return match?match[1]?this.$findClosingBracket(match[1],position):this.$findOpeningBracket(match[2],position):null},this.getBracketRange=function(pos){var range,line=this.getLine(pos.row),before=!0,chr=line.charAt(pos.column-1),match=chr&&chr.match(/([\(\[\{])|([\)\]\}])/);if(match||(chr=line.charAt(pos.column),pos={row:pos.row,column:pos.column+1},match=chr&&chr.match(/([\(\[\{])|([\)\]\}])/),before=!1),!match)return null;if(match[1]){var bracketPos=this.$findClosingBracket(match[1],pos);if(!bracketPos)return null;range=Range.fromPoints(pos,bracketPos),before||(range.end.column++,range.start.column--),range.cursor=range.end}else{var bracketPos=this.$findOpeningBracket(match[2],pos);if(!bracketPos)return null;range=Range.fromPoints(bracketPos,pos),before||(range.start.column++,range.end.column--),range.cursor=range.start}return range},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(bracket,position,typeRe){var openBracket=this.$brackets[bracket],depth=1,iterator=new TokenIterator(this,position.row,position.column),token=iterator.getCurrentToken();if(token||(token=iterator.stepForward()),token){typeRe||(typeRe=new RegExp("(\\.?"+token.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var valueIndex=position.column-iterator.getCurrentTokenColumn()-2,value=token.value;;){for(;valueIndex>=0;){var chr=value.charAt(valueIndex);if(chr==openBracket){if(0==(depth-=1))return{row:iterator.getCurrentTokenRow(),column:valueIndex+iterator.getCurrentTokenColumn()}}else chr==bracket&&(depth+=1);valueIndex-=1}do{token=iterator.stepBackward()}while(token&&!typeRe.test(token.type));if(null==token)break;value=token.value,valueIndex=value.length-1}return null}},this.$findClosingBracket=function(bracket,position,typeRe){var closingBracket=this.$brackets[bracket],depth=1,iterator=new TokenIterator(this,position.row,position.column),token=iterator.getCurrentToken();if(token||(token=iterator.stepForward()),token){typeRe||(typeRe=new RegExp("(\\.?"+token.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var valueIndex=position.column-iterator.getCurrentTokenColumn();;){for(var value=token.value,valueLength=value.length;valueIndex<valueLength;){var chr=value.charAt(valueIndex);if(chr==closingBracket){if(0==(depth-=1))return{row:iterator.getCurrentTokenRow(),column:valueIndex+iterator.getCurrentTokenColumn()}}else chr==bracket&&(depth+=1);valueIndex+=1}do{token=iterator.stepForward()}while(token&&!typeRe.test(token.type));if(null==token)break;valueIndex=0}return null}}}var TokenIterator=acequire("../token_iterator").TokenIterator,Range=acequire("../range").Range;exports.BracketMatch=BracketMatch}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(acequire,exports,module){"use strict";var oop=acequire("./lib/oop"),lang=acequire("./lib/lang"),config=acequire("./config"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Selection=acequire("./selection").Selection,TextMode=acequire("./mode/text").Mode,Range=acequire("./range").Range,Document=acequire("./document").Document,BackgroundTokenizer=acequire("./background_tokenizer").BackgroundTokenizer,SearchHighlight=acequire("./search_highlight").SearchHighlight,EditSession=function(text,mode){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof text&&text.getLine||(text=new Document(text)),this.setDocument(text),this.selection=new Selection(this),config.resetOptions(this),this.setMode(mode),config._signal("session",this)};(function(){function isFullWidth(c){return!(c<4352)&&(c>=4352&&c<=4447||c>=4515&&c<=4519||c>=4602&&c<=4607||c>=9001&&c<=9002||c>=11904&&c<=11929||c>=11931&&c<=12019||c>=12032&&c<=12245||c>=12272&&c<=12283||c>=12288&&c<=12350||c>=12353&&c<=12438||c>=12441&&c<=12543||c>=12549&&c<=12589||c>=12593&&c<=12686||c>=12688&&c<=12730||c>=12736&&c<=12771||c>=12784&&c<=12830||c>=12832&&c<=12871||c>=12880&&c<=13054||c>=13056&&c<=19903||c>=19968&&c<=42124||c>=42128&&c<=42182||c>=43360&&c<=43388||c>=44032&&c<=55203||c>=55216&&c<=55238||c>=55243&&c<=55291||c>=63744&&c<=64255||c>=65040&&c<=65049||c>=65072&&c<=65106||c>=65108&&c<=65126||c>=65128&&c<=65131||c>=65281&&c<=65376||c>=65504&&c<=65510)}oop.implement(this,EventEmitter),this.setDocument=function(doc){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=doc,doc.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(docRow){if(!docRow)return this.$docRowCache=[],void(this.$screenRowCache=[]);var l=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,docRow)+1;l>i&&(this.$docRowCache.splice(i,l),this.$screenRowCache.splice(i,l))},this.$getRowCacheIndex=function(cacheArray,val){for(var low=0,hi=cacheArray.length-1;low<=hi;){var mid=low+hi>>1,c=cacheArray[mid];if(val>c)low=mid+1;else{if(!(val<c))return mid;hi=mid-1}}return low-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var fold=e.data;this.$resetRowCache(fold.start.row)},this.onChange=function(delta){this.$modified=!0,this.$resetRowCache(delta.start.row);var removedFolds=this.$updateInternalDataOnChange(delta);this.$fromUndo||!this.$undoManager||delta.ignore||(this.$deltasDoc.push(delta),removedFolds&&0!=removedFolds.length&&this.$deltasFold.push({action:"removeFolds",folds:removedFolds}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(delta),this._signal("change",delta)},this.setValue=function(text){this.doc.setValue(text),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(row){return this.bgTokenizer.getState(row)},this.getTokens=function(row){return this.bgTokenizer.getTokens(row)},this.getTokenAt=function(row,column){var token,tokens=this.bgTokenizer.getTokens(row),c=0;if(null==column)i=tokens.length-1,c=this.getLine(row).length;else for(var i=0;i<tokens.length&&!((c+=tokens[i].value.length)>=column);i++);return(token=tokens[i])?(token.index=i,token.start=c-token.value.length,token):null},this.setUndoManager=function(undoManager){if(this.$undoManager=undoManager,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),undoManager){var self=this;this.$syncInformUndoManager=function(){self.$informUndoManager.cancel(),self.$deltasFold.length&&(self.$deltas.push({group:"fold",deltas:self.$deltasFold}),self.$deltasFold=[]),self.$deltasDoc.length&&(self.$deltas.push({group:"doc",deltas:self.$deltasDoc}),self.$deltasDoc=[]),self.$deltas.length>0&&undoManager.execute({action:"aceupdate",args:[self.$deltas,self],merge:self.mergeUndoDeltas}),self.mergeUndoDeltas=!1,self.$deltas=[]},this.$informUndoManager=lang.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?lang.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(val){this.setOption("useSoftTabs",val)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(tabSize){this.setOption("tabSize",tabSize)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(position){return this.$useSoftTabs&&position.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(overwrite){this.setOption("overwrite",overwrite)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(row,className){this.$decorations[row]||(this.$decorations[row]=""),this.$decorations[row]+=" "+className,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(row,className){this.$decorations[row]=(this.$decorations[row]||"").replace(" "+className,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(rows){this.$breakpoints=[];for(var i=0;i<rows.length;i++)this.$breakpoints[rows[i]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(row,className){void 0===className&&(className="ace_breakpoint"),className?this.$breakpoints[row]=className:delete this.$breakpoints[row],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(row){delete this.$breakpoints[row],this._signal("changeBreakpoint",{})},this.addMarker=function(range,clazz,type,inFront){var id=this.$markerId++,marker={range:range,type:type||"line",renderer:"function"==typeof type?type:null,clazz:clazz,inFront:!!inFront,id:id};return inFront?(this.$frontMarkers[id]=marker,this._signal("changeFrontMarker")):(this.$backMarkers[id]=marker,this._signal("changeBackMarker")),id},this.addDynamicMarker=function(marker,inFront){if(marker.update){var id=this.$markerId++;return marker.id=id,marker.inFront=!!inFront,inFront?(this.$frontMarkers[id]=marker,this._signal("changeFrontMarker")):(this.$backMarkers[id]=marker,this._signal("changeBackMarker")),marker}},this.removeMarker=function(markerId){var marker=this.$frontMarkers[markerId]||this.$backMarkers[markerId];if(marker){var markers=marker.inFront?this.$frontMarkers:this.$backMarkers;marker&&(delete markers[markerId],this._signal(marker.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(inFront){return inFront?this.$frontMarkers:this.$backMarkers},this.highlight=function(re){if(!this.$searchHighlight){var highlight=new SearchHighlight(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(highlight)}this.$searchHighlight.setRegexp(re)},this.highlightLines=function(startRow,endRow,clazz,inFront){"number"!=typeof endRow&&(clazz=endRow,endRow=startRow),clazz||(clazz="ace_step");var range=new Range(startRow,0,endRow,1/0);return range.id=this.addMarker(range,clazz,"fullLine",inFront),range},this.setAnnotations=function(annotations){this.$annotations=annotations,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(text){var match=text.match(/^.*?(\r?\n)/m);this.$autoNewLine=match?match[1]:"\n"},this.getWordRange=function(row,column){var line=this.getLine(row),inToken=!1;if(column>0&&(inToken=!!line.charAt(column-1).match(this.tokenRe)),inToken||(inToken=!!line.charAt(column).match(this.tokenRe)),inToken)var re=this.tokenRe;else if(/^\s+$/.test(line.slice(column-1,column+1)))var re=/\s/;else var re=this.nonTokenRe;var start=column;if(start>0){do{start--}while(start>=0&&line.charAt(start).match(re));start++}for(var end=column;end<line.length&&line.charAt(end).match(re);)end++;return new Range(row,start,row,end)},this.getAWordRange=function(row,column){for(var wordRange=this.getWordRange(row,column),line=this.getLine(wordRange.end.row);line.charAt(wordRange.end.column).match(/[ \t]/);)wordRange.end.column+=1;return wordRange},this.setNewLineMode=function(newLineMode){this.doc.setNewLineMode(newLineMode)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(useWorker){this.setOption("useWorker",useWorker)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var rows=e.data;this.bgTokenizer.start(rows.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(mode,cb){if(mode&&"object"==typeof mode){if(mode.getTokenizer)return this.$onChangeMode(mode);var options=mode,path=options.path}else path=mode||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new TextMode),this.$modes[path]&&!options)return this.$onChangeMode(this.$modes[path]),void(cb&&cb());this.$modeId=path,config.loadModule(["mode",path],function(m){if(this.$modeId!==path)return cb&&cb();this.$modes[path]&&!options?this.$onChangeMode(this.$modes[path]):m&&m.Mode&&(m=new m.Mode(options),options||(this.$modes[path]=m,m.$id=path),this.$onChangeMode(m)),cb&&cb()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(mode,$isPlaceholder){if($isPlaceholder||(this.$modeId=mode.$id),this.$mode!==mode){this.$mode=mode,this.$stopWorker(),this.$useWorker&&this.$startWorker();var tokenizer=mode.getTokenizer();if(void 0!==tokenizer.addEventListener){var onReloadTokenizer=this.onReloadTokenizer.bind(this);tokenizer.addEventListener("update",onReloadTokenizer)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(tokenizer);else{this.bgTokenizer=new BackgroundTokenizer(tokenizer);var _self=this;this.bgTokenizer.addEventListener("update",function(e){_self._signal("tokenizerUpdate",e)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=mode.tokenRe,this.nonTokenRe=mode.nonTokenRe,$isPlaceholder||(mode.attachToSession&&mode.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(mode.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){config.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(scrollTop){this.$scrollTop===scrollTop||isNaN(scrollTop)||(this.$scrollTop=scrollTop,this._signal("changeScrollTop",scrollTop))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(scrollLeft){this.$scrollLeft===scrollLeft||isNaN(scrollLeft)||(this.$scrollLeft=scrollLeft,this._signal("changeScrollLeft",scrollLeft))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var width=0;return this.lineWidgets.forEach(function(w){w&&w.screenWidth>width&&(width=w.screenWidth)}),this.lineWidgetWidth=width},this.$computeWidth=function(force){if(this.$modified||force){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var lines=this.doc.getAllLines(),cache=this.$rowLengthCache,longestScreenLine=0,foldIndex=0,foldLine=this.$foldData[foldIndex],foldStart=foldLine?foldLine.start.row:1/0,len=lines.length,i=0;i<len;i++){if(i>foldStart){if((i=foldLine.end.row+1)>=len)break;foldLine=this.$foldData[foldIndex++],foldStart=foldLine?foldLine.start.row:1/0}null==cache[i]&&(cache[i]=this.$getStringScreenWidth(lines[i])[0]),cache[i]>longestScreenLine&&(longestScreenLine=cache[i])}this.screenWidth=longestScreenLine}},this.getLine=function(row){return this.doc.getLine(row)},this.getLines=function(firstRow,lastRow){return this.doc.getLines(firstRow,lastRow)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(range){return this.doc.getTextRange(range||this.selection.getRange())},this.insert=function(position,text){return this.doc.insert(position,text)},this.remove=function(range){return this.doc.remove(range)},this.removeFullLines=function(firstRow,lastRow){return this.doc.removeFullLines(firstRow,lastRow)},this.undoChanges=function(deltas,dontSelect){if(deltas.length){this.$fromUndo=!0;for(var lastUndoRange=null,i=deltas.length-1;-1!=i;i--){var delta=deltas[i];"doc"==delta.group?(this.doc.revertDeltas(delta.deltas),lastUndoRange=this.$getUndoSelection(delta.deltas,!0,lastUndoRange)):delta.deltas.forEach(function(foldDelta){this.addFolds(foldDelta.folds)},this)}return this.$fromUndo=!1,lastUndoRange&&this.$undoSelect&&!dontSelect&&this.selection.setSelectionRange(lastUndoRange),lastUndoRange}},this.redoChanges=function(deltas,dontSelect){if(deltas.length){this.$fromUndo=!0;for(var lastUndoRange=null,i=0;i<deltas.length;i++){var delta=deltas[i];"doc"==delta.group&&(this.doc.applyDeltas(delta.deltas),lastUndoRange=this.$getUndoSelection(delta.deltas,!1,lastUndoRange))}return this.$fromUndo=!1,lastUndoRange&&this.$undoSelect&&!dontSelect&&this.selection.setSelectionRange(lastUndoRange),lastUndoRange}},this.setUndoSelect=function(enable){this.$undoSelect=enable},this.$getUndoSelection=function(deltas,isUndo,lastUndoRange){function isInsert(delta){return isUndo?"insert"!==delta.action:"insert"===delta.action}var range,point,delta=deltas[0];isInsert(delta)?range=Range.fromPoints(delta.start,delta.end):range=Range.fromPoints(delta.start,delta.start);for(var i=1;i<deltas.length;i++)delta=deltas[i],isInsert(delta)?(point=delta.start,-1==range.compare(point.row,point.column)&&range.setStart(point),point=delta.end,1==range.compare(point.row,point.column)&&range.setEnd(point),!0):(point=delta.start,-1==range.compare(point.row,point.column)&&(range=Range.fromPoints(delta.start,delta.start)),!1);if(null!=lastUndoRange){0===Range.comparePoints(lastUndoRange.start,range.start)&&(lastUndoRange.start.column+=range.end.column-range.start.column,lastUndoRange.end.column+=range.end.column-range.start.column);var cmp=lastUndoRange.compareRange(range);1==cmp?range.setStart(lastUndoRange.start):-1==cmp&&range.setEnd(lastUndoRange.end)}return range},this.replace=function(range,text){return this.doc.replace(range,text)},this.moveText=function(fromRange,toPosition,copy){var text=this.getTextRange(fromRange),folds=this.getFoldsInRange(fromRange),toRange=Range.fromPoints(toPosition,toPosition);if(!copy){this.remove(fromRange);var rowDiff=fromRange.start.row-fromRange.end.row,collDiff=rowDiff?-fromRange.end.column:fromRange.start.column-fromRange.end.column;collDiff&&(toRange.start.row==fromRange.end.row&&toRange.start.column>fromRange.end.column&&(toRange.start.column+=collDiff),toRange.end.row==fromRange.end.row&&toRange.end.column>fromRange.end.column&&(toRange.end.column+=collDiff)),rowDiff&&toRange.start.row>=fromRange.end.row&&(toRange.start.row+=rowDiff,toRange.end.row+=rowDiff)}if(toRange.end=this.insert(toRange.start,text),folds.length){var oldStart=fromRange.start,newStart=toRange.start,rowDiff=newStart.row-oldStart.row,collDiff=newStart.column-oldStart.column;this.addFolds(folds.map(function(x){return x=x.clone(),x.start.row==oldStart.row&&(x.start.column+=collDiff),x.end.row==oldStart.row&&(x.end.column+=collDiff),x.start.row+=rowDiff,x.end.row+=rowDiff,x}))}return toRange},this.indentRows=function(startRow,endRow,indentString){indentString=indentString.replace(/\t/g,this.getTabString());for(var row=startRow;row<=endRow;row++)this.doc.insertInLine({row:row,column:0},indentString)},this.outdentRows=function(range){for(var rowRange=range.collapseRows(),deleteRange=new Range(0,0,0,0),size=this.getTabSize(),i=rowRange.start.row;i<=rowRange.end.row;++i){var line=this.getLine(i);deleteRange.start.row=i,deleteRange.end.row=i;for(var j=0;j<size&&" "==line.charAt(j);++j);j<size&&"\t"==line.charAt(j)?(deleteRange.start.column=j,deleteRange.end.column=j+1):(deleteRange.start.column=0,deleteRange.end.column=j),this.remove(deleteRange)}},this.$moveLines=function(firstRow,lastRow,dir){if(firstRow=this.getRowFoldStart(firstRow),lastRow=this.getRowFoldEnd(lastRow),dir<0){var row=this.getRowFoldStart(firstRow+dir);if(row<0)return 0;var diff=row-firstRow}else if(dir>0){var row=this.getRowFoldEnd(lastRow+dir);if(row>this.doc.getLength()-1)return 0;var diff=row-lastRow}else{firstRow=this.$clipRowToDocument(firstRow),lastRow=this.$clipRowToDocument(lastRow);var diff=lastRow-firstRow+1}var range=new Range(firstRow,0,lastRow,Number.MAX_VALUE),folds=this.getFoldsInRange(range).map(function(x){return x=x.clone(),x.start.row+=diff,x.end.row+=diff,x}),lines=0==dir?this.doc.getLines(firstRow,lastRow):this.doc.removeFullLines(firstRow,lastRow);return this.doc.insertFullLines(firstRow+diff,lines),folds.length&&this.addFolds(folds),diff},this.moveLinesUp=function(firstRow,lastRow){return this.$moveLines(firstRow,lastRow,-1)},this.moveLinesDown=function(firstRow,lastRow){return this.$moveLines(firstRow,lastRow,1)},this.duplicateLines=function(firstRow,lastRow){return this.$moveLines(firstRow,lastRow,0)},this.$clipRowToDocument=function(row){return Math.max(0,Math.min(row,this.doc.getLength()-1))},this.$clipColumnToRow=function(row,column){return column<0?0:Math.min(this.doc.getLine(row).length,column)},this.$clipPositionToDocument=function(row,column){if(column=Math.max(0,column),row<0)row=0,column=0;else{var len=this.doc.getLength();row>=len?(row=len-1,column=this.doc.getLine(len-1).length):column=Math.min(this.doc.getLine(row).length,column)}return{row:row,column:column}},this.$clipRangeToDocument=function(range){range.start.row<0?(range.start.row=0,range.start.column=0):range.start.column=this.$clipColumnToRow(range.start.row,range.start.column);var len=this.doc.getLength()-1;return range.end.row>len?(range.end.row=len,range.end.column=this.doc.getLine(len).length):range.end.column=this.$clipColumnToRow(range.end.row,range.end.column),range},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(useWrapMode){if(useWrapMode!=this.$useWrapMode){if(this.$useWrapMode=useWrapMode,this.$modified=!0,this.$resetRowCache(0),useWrapMode){var len=this.getLength();this.$wrapData=Array(len),this.$updateWrapData(0,len-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(min,max){this.$wrapLimitRange.min===min&&this.$wrapLimitRange.max===max||(this.$wrapLimitRange={min:min,max:max},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(desiredLimit,$printMargin){var limits=this.$wrapLimitRange;limits.max<0&&(limits={min:$printMargin,max:$printMargin});var wrapLimit=this.$constrainWrapLimit(desiredLimit,limits.min,limits.max);return wrapLimit!=this.$wrapLimit&&wrapLimit>1&&(this.$wrapLimit=wrapLimit,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),
+this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(wrapLimit,min,max){return min&&(wrapLimit=Math.max(min,wrapLimit)),max&&(wrapLimit=Math.min(max,wrapLimit)),wrapLimit},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(limit){this.setWrapLimitRange(limit,limit)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(delta){var useWrapMode=this.$useWrapMode,action=delta.action,start=delta.start,end=delta.end,firstRow=start.row,lastRow=end.row,len=lastRow-firstRow,removedFolds=null;if(this.$updating=!0,0!=len)if("remove"===action){this[useWrapMode?"$wrapData":"$rowLengthCache"].splice(firstRow,len);var foldLines=this.$foldData;removedFolds=this.getFoldsInRange(delta),this.removeFolds(removedFolds);var foldLine=this.getFoldLine(end.row),idx=0;if(foldLine){foldLine.addRemoveChars(end.row,end.column,start.column-end.column),foldLine.shiftRow(-len);var foldLineBefore=this.getFoldLine(firstRow);foldLineBefore&&foldLineBefore!==foldLine&&(foldLineBefore.merge(foldLine),foldLine=foldLineBefore),idx=foldLines.indexOf(foldLine)+1}for(idx;idx<foldLines.length;idx++){var foldLine=foldLines[idx];foldLine.start.row>=end.row&&foldLine.shiftRow(-len)}lastRow=firstRow}else{var args=Array(len);args.unshift(firstRow,0);var arr=useWrapMode?this.$wrapData:this.$rowLengthCache;arr.splice.apply(arr,args);var foldLines=this.$foldData,foldLine=this.getFoldLine(firstRow),idx=0;if(foldLine){var cmp=foldLine.range.compareInside(start.row,start.column);0==cmp?(foldLine=foldLine.split(start.row,start.column))&&(foldLine.shiftRow(len),foldLine.addRemoveChars(lastRow,0,end.column-start.column)):-1==cmp&&(foldLine.addRemoveChars(firstRow,0,end.column-start.column),foldLine.shiftRow(len)),idx=foldLines.indexOf(foldLine)+1}for(idx;idx<foldLines.length;idx++){var foldLine=foldLines[idx];foldLine.start.row>=firstRow&&foldLine.shiftRow(len)}}else{len=Math.abs(delta.start.column-delta.end.column),"remove"===action&&(removedFolds=this.getFoldsInRange(delta),this.removeFolds(removedFolds),len=-len);var foldLine=this.getFoldLine(firstRow);foldLine&&foldLine.addRemoveChars(firstRow,start.column,len)}return useWrapMode&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,useWrapMode?this.$updateWrapData(firstRow,lastRow):this.$updateRowLengthCache(firstRow,lastRow),removedFolds},this.$updateRowLengthCache=function(firstRow,lastRow,b){this.$rowLengthCache[firstRow]=null,this.$rowLengthCache[lastRow]=null},this.$updateWrapData=function(firstRow,lastRow){var tokens,foldLine,lines=this.doc.getAllLines(),tabSize=this.getTabSize(),wrapData=this.$wrapData,wrapLimit=this.$wrapLimit,row=firstRow;for(lastRow=Math.min(lastRow,lines.length-1);row<=lastRow;)foldLine=this.getFoldLine(row,foldLine),foldLine?(tokens=[],foldLine.walk(function(placeholder,row,column,lastColumn){var walkTokens;if(null!=placeholder){walkTokens=this.$getDisplayTokens(placeholder,tokens.length),walkTokens[0]=PLACEHOLDER_START;for(var i=1;i<walkTokens.length;i++)walkTokens[i]=PLACEHOLDER_BODY}else walkTokens=this.$getDisplayTokens(lines[row].substring(lastColumn,column),tokens.length);tokens=tokens.concat(walkTokens)}.bind(this),foldLine.end.row,lines[foldLine.end.row].length+1),wrapData[foldLine.start.row]=this.$computeWrapSplits(tokens,wrapLimit,tabSize),row=foldLine.end.row+1):(tokens=this.$getDisplayTokens(lines[row]),wrapData[row]=this.$computeWrapSplits(tokens,wrapLimit,tabSize),row++)};var PLACEHOLDER_START=3,PLACEHOLDER_BODY=4,SPACE=10,TAB=11,TAB_SPACE=12;this.$computeWrapSplits=function(tokens,wrapLimit,tabSize){function getWrapIndent(){var indentation=0;if(0===maxIndent)return indentation;if(indentedSoftWrap)for(var i=0;i<tokens.length;i++){var token=tokens[i];if(token==SPACE)indentation+=1;else{if(token!=TAB){if(token==TAB_SPACE)continue;break}indentation+=tabSize}}return isCode&&!1!==indentedSoftWrap&&(indentation+=tabSize),Math.min(indentation,maxIndent)}function addSplit(screenPos){var displayed=tokens.slice(lastSplit,screenPos),len=displayed.length;displayed.join("").replace(/12/g,function(){len-=1}).replace(/2/g,function(){len-=1}),splits.length||(indent=getWrapIndent(),splits.indent=indent),lastDocSplit+=len,splits.push(lastDocSplit),lastSplit=screenPos}if(0==tokens.length)return[];for(var splits=[],displayLength=tokens.length,lastSplit=0,lastDocSplit=0,isCode=this.$wrapAsCode,indentedSoftWrap=this.$indentedSoftWrap,maxIndent=wrapLimit<=Math.max(2*tabSize,8)||!1===indentedSoftWrap?0:Math.floor(wrapLimit/2),indent=0;displayLength-lastSplit>wrapLimit-indent;){var split=lastSplit+wrapLimit-indent;if(tokens[split-1]>=SPACE&&tokens[split]>=SPACE)addSplit(split);else if(tokens[split]!=PLACEHOLDER_START&&tokens[split]!=PLACEHOLDER_BODY){for(var minSplit=Math.max(split-(wrapLimit-(wrapLimit>>2)),lastSplit-1);split>minSplit&&tokens[split]<PLACEHOLDER_START;)split--;if(isCode){for(;split>minSplit&&tokens[split]<PLACEHOLDER_START;)split--;for(;split>minSplit&&9==tokens[split];)split--}else for(;split>minSplit&&tokens[split]<SPACE;)split--;split>minSplit?addSplit(++split):(split=lastSplit+wrapLimit,2==tokens[split]&&split--,addSplit(split-indent))}else{for(split;split!=lastSplit-1&&tokens[split]!=PLACEHOLDER_START;split--);if(split>lastSplit){addSplit(split);continue}for(split=lastSplit+wrapLimit;split<tokens.length&&tokens[split]==PLACEHOLDER_BODY;split++);if(split==tokens.length)break;addSplit(split)}}return splits},this.$getDisplayTokens=function(str,offset){var tabSize,arr=[];offset=offset||0;for(var i=0;i<str.length;i++){var c=str.charCodeAt(i);if(9==c){tabSize=this.getScreenTabSize(arr.length+offset),arr.push(TAB);for(var n=1;n<tabSize;n++)arr.push(TAB_SPACE)}else 32==c?arr.push(SPACE):c>39&&c<48||c>57&&c<64?arr.push(9):c>=4352&&isFullWidth(c)?arr.push(1,2):arr.push(1)}return arr},this.$getStringScreenWidth=function(str,maxScreenColumn,screenColumn){if(0==maxScreenColumn)return[0,0];null==maxScreenColumn&&(maxScreenColumn=1/0),screenColumn=screenColumn||0;var c,column;for(column=0;column<str.length&&(c=str.charCodeAt(column),9==c?screenColumn+=this.getScreenTabSize(screenColumn):c>=4352&&isFullWidth(c)?screenColumn+=2:screenColumn+=1,!(screenColumn>maxScreenColumn));column++);return[screenColumn,column]},this.lineWidgets=null,this.getRowLength=function(row){if(this.lineWidgets)var h=this.lineWidgets[row]&&this.lineWidgets[row].rowCount||0;else h=0;return this.$useWrapMode&&this.$wrapData[row]?this.$wrapData[row].length+1+h:1+h},this.getRowLineCount=function(row){return this.$useWrapMode&&this.$wrapData[row]?this.$wrapData[row].length+1:1},this.getRowWrapIndent=function(screenRow){if(this.$useWrapMode){var pos=this.screenToDocumentPosition(screenRow,Number.MAX_VALUE),splits=this.$wrapData[pos.row];return splits.length&&splits[0]<pos.column?splits.indent:0}return 0},this.getScreenLastRowColumn=function(screenRow){var pos=this.screenToDocumentPosition(screenRow,Number.MAX_VALUE);return this.documentToScreenColumn(pos.row,pos.column)},this.getDocumentLastRowColumn=function(docRow,docColumn){var screenRow=this.documentToScreenRow(docRow,docColumn);return this.getScreenLastRowColumn(screenRow)},this.getDocumentLastRowColumnPosition=function(docRow,docColumn){var screenRow=this.documentToScreenRow(docRow,docColumn);return this.screenToDocumentPosition(screenRow,Number.MAX_VALUE/10)},this.getRowSplitData=function(row){return this.$useWrapMode?this.$wrapData[row]:void 0},this.getScreenTabSize=function(screenColumn){return this.$tabSize-screenColumn%this.$tabSize},this.screenToDocumentRow=function(screenRow,screenColumn){return this.screenToDocumentPosition(screenRow,screenColumn).row},this.screenToDocumentColumn=function(screenRow,screenColumn){return this.screenToDocumentPosition(screenRow,screenColumn).column},this.screenToDocumentPosition=function(screenRow,screenColumn){if(screenRow<0)return{row:0,column:0};var line,column,docRow=0,docColumn=0,row=0,rowLength=0,rowCache=this.$screenRowCache,i=this.$getRowCacheIndex(rowCache,screenRow),l=rowCache.length;if(l&&i>=0)var row=rowCache[i],docRow=this.$docRowCache[i],doCache=screenRow>rowCache[l-1];else var doCache=!l;for(var maxRow=this.getLength()-1,foldLine=this.getNextFoldLine(docRow),foldStart=foldLine?foldLine.start.row:1/0;row<=screenRow&&(rowLength=this.getRowLength(docRow),!(row+rowLength>screenRow||docRow>=maxRow));)row+=rowLength,++docRow>foldStart&&(docRow=foldLine.end.row+1,foldLine=this.getNextFoldLine(docRow,foldLine),foldStart=foldLine?foldLine.start.row:1/0),doCache&&(this.$docRowCache.push(docRow),this.$screenRowCache.push(row));if(foldLine&&foldLine.start.row<=docRow)line=this.getFoldDisplayLine(foldLine),docRow=foldLine.start.row;else{if(row+rowLength<=screenRow||docRow>maxRow)return{row:maxRow,column:this.getLine(maxRow).length};line=this.getLine(docRow),foldLine=null}var wrapIndent=0;if(this.$useWrapMode){var splits=this.$wrapData[docRow];if(splits){var splitIndex=Math.floor(screenRow-row);column=splits[splitIndex],splitIndex>0&&splits.length&&(wrapIndent=splits.indent,docColumn=splits[splitIndex-1]||splits[splits.length-1],line=line.substring(docColumn))}}return docColumn+=this.$getStringScreenWidth(line,screenColumn-wrapIndent)[1],this.$useWrapMode&&docColumn>=column&&(docColumn=column-1),foldLine?foldLine.idxToPosition(docColumn):{row:docRow,column:docColumn}},this.documentToScreenPosition=function(docRow,docColumn){if(void 0===docColumn)var pos=this.$clipPositionToDocument(docRow.row,docRow.column);else pos=this.$clipPositionToDocument(docRow,docColumn);docRow=pos.row,docColumn=pos.column;var screenRow=0,foldStartRow=null,fold=null;(fold=this.getFoldAt(docRow,docColumn,1))&&(docRow=fold.start.row,docColumn=fold.start.column);var rowEnd,row=0,rowCache=this.$docRowCache,i=this.$getRowCacheIndex(rowCache,docRow),l=rowCache.length;if(l&&i>=0)var row=rowCache[i],screenRow=this.$screenRowCache[i],doCache=docRow>rowCache[l-1];else var doCache=!l;for(var foldLine=this.getNextFoldLine(row),foldStart=foldLine?foldLine.start.row:1/0;row<docRow;){if(row>=foldStart){if((rowEnd=foldLine.end.row+1)>docRow)break;foldLine=this.getNextFoldLine(rowEnd,foldLine),foldStart=foldLine?foldLine.start.row:1/0}else rowEnd=row+1;screenRow+=this.getRowLength(row),row=rowEnd,doCache&&(this.$docRowCache.push(row),this.$screenRowCache.push(screenRow))}var textLine="";foldLine&&row>=foldStart?(textLine=this.getFoldDisplayLine(foldLine,docRow,docColumn),foldStartRow=foldLine.start.row):(textLine=this.getLine(docRow).substring(0,docColumn),foldStartRow=docRow);var wrapIndent=0;if(this.$useWrapMode){var wrapRow=this.$wrapData[foldStartRow];if(wrapRow){for(var screenRowOffset=0;textLine.length>=wrapRow[screenRowOffset];)screenRow++,screenRowOffset++;textLine=textLine.substring(wrapRow[screenRowOffset-1]||0,textLine.length),wrapIndent=screenRowOffset>0?wrapRow.indent:0}}return{row:screenRow,column:wrapIndent+this.$getStringScreenWidth(textLine)[0]}},this.documentToScreenColumn=function(row,docColumn){return this.documentToScreenPosition(row,docColumn).column},this.documentToScreenRow=function(docRow,docColumn){return this.documentToScreenPosition(docRow,docColumn).row},this.getScreenLength=function(){var screenRows=0,fold=null;if(this.$useWrapMode)for(var lastRow=this.$wrapData.length,row=0,i=0,fold=this.$foldData[i++],foldStart=fold?fold.start.row:1/0;row<lastRow;){var splits=this.$wrapData[row];screenRows+=splits?splits.length+1:1,row++,row>foldStart&&(row=fold.end.row+1,fold=this.$foldData[i++],foldStart=fold?fold.start.row:1/0)}else{screenRows=this.getLength();for(var foldData=this.$foldData,i=0;i<foldData.length;i++)fold=foldData[i],screenRows-=fold.end.row-fold.start.row}return this.lineWidgets&&(screenRows+=this.$getWidgetScreenLength()),screenRows},this.$setFontMetrics=function(fm){this.$enableVarChar&&(this.$getStringScreenWidth=function(str,maxScreenColumn,screenColumn){if(0===maxScreenColumn)return[0,0];maxScreenColumn||(maxScreenColumn=1/0),screenColumn=screenColumn||0;var c,column;for(column=0;column<str.length&&(c=str.charAt(column),!((screenColumn+="\t"===c?this.getScreenTabSize(screenColumn):fm.getCharacterWidth(c))>maxScreenColumn));column++);return[screenColumn,column]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()}}).call(EditSession.prototype),acequire("./edit_session/folding").Folding.call(EditSession.prototype),acequire("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype),config.defineOptions(EditSession.prototype,"session",{wrap:{set:function(value){if(value&&"off"!=value?"free"==value?value=!0:"printMargin"==value?value=-1:"string"==typeof value&&(value=parseInt(value,10)||!1):value=!1,this.$wrap!=value)if(this.$wrap=value,value){var col="number"==typeof value?value:null;this.setWrapLimitRange(col,col),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(val){(val="auto"==val?"text"!=this.$mode.type:"text"!=val)!=this.$wrapAsCode&&(this.$wrapAsCode=val,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(useWorker){this.$useWorker=useWorker,this.$stopWorker(),useWorker&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(tabSize){isNaN(tabSize)||this.$tabSize===tabSize||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=tabSize,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(val){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(val){this.doc.setNewLineMode(val)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(val){this.setMode(val)},get:function(){return this.$modeId}}}),exports.EditSession=EditSession}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(acequire,exports,module){"use strict";var lang=acequire("./lib/lang"),oop=acequire("./lib/oop"),Range=acequire("./range").Range,Search=function(){this.$options={}};(function(){this.set=function(options){return oop.mixin(this.$options,options),this},this.getOptions=function(){return lang.copyObject(this.$options)},this.setOptions=function(options){this.$options=options},this.find=function(session){var options=this.$options,iterator=this.$matchIterator(session,options);if(!iterator)return!1;var firstRange=null;return iterator.forEach(function(range,row,offset){if(range.start)firstRange=range;else{var column=range.offset+(offset||0);if(firstRange=new Range(row,column,row,column+range.length),!range.length&&options.start&&options.start.start&&0!=options.skipCurrent&&firstRange.isEqual(options.start))return firstRange=null,!1}return!0}),firstRange},this.findAll=function(session){var options=this.$options;if(!options.needle)return[];this.$assembleRegExp(options);var range=options.range,lines=range?session.getLines(range.start.row,range.end.row):session.doc.getAllLines(),ranges=[],re=options.re;if(options.$isMultiLine){var prevRange,len=re.length,maxRow=lines.length-len;outer:for(var row=re.offset||0;row<=maxRow;row++){for(var j=0;j<len;j++)if(-1==lines[row+j].search(re[j]))continue outer;var startLine=lines[row],line=lines[row+len-1],startIndex=startLine.length-startLine.match(re[0])[0].length,endIndex=line.match(re[len-1])[0].length;prevRange&&prevRange.end.row===row&&prevRange.end.column>startIndex||(ranges.push(prevRange=new Range(row,startIndex,row+len-1,endIndex)),len>2&&(row=row+len-2))}}else for(var i=0;i<lines.length;i++)for(var matches=lang.getMatchOffsets(lines[i],re),j=0;j<matches.length;j++){var match=matches[j];ranges.push(new Range(i,match.offset,i,match.offset+match.length))}if(range){for(var startColumn=range.start.column,endColumn=range.start.column,i=0,j=ranges.length-1;i<j&&ranges[i].start.column<startColumn&&ranges[i].start.row==range.start.row;)i++;for(;i<j&&ranges[j].end.column>endColumn&&ranges[j].end.row==range.end.row;)j--;for(ranges=ranges.slice(i,j+1),i=0,j=ranges.length;i<j;i++)ranges[i].start.row+=range.start.row,ranges[i].end.row+=range.start.row}return ranges},this.replace=function(input,replacement){var options=this.$options,re=this.$assembleRegExp(options);if(options.$isMultiLine)return replacement;if(re){var match=re.exec(input);if(!match||match[0].length!=input.length)return null;if(replacement=input.replace(re,replacement),options.preserveCase){replacement=replacement.split("");for(var i=Math.min(input.length,input.length);i--;){var ch=input[i];ch&&ch.toLowerCase()!=ch?replacement[i]=replacement[i].toUpperCase():replacement[i]=replacement[i].toLowerCase()}replacement=replacement.join("")}return replacement}},this.$matchIterator=function(session,options){var re=this.$assembleRegExp(options);if(!re)return!1;var callback;if(options.$isMultiLine)var len=re.length,matchIterator=function(line,row,offset){var startIndex=line.search(re[0]);if(-1!=startIndex){for(var i=1;i<len;i++)if(line=session.getLine(row+i),-1==line.search(re[i]))return;var endIndex=line.match(re[len-1])[0].length,range=new Range(row,startIndex,row+len-1,endIndex);return 1==re.offset?(range.start.row--,range.start.column=Number.MAX_VALUE):offset&&(range.start.column+=offset),!!callback(range)||void 0}};else if(options.backwards)var matchIterator=function(line,row,startIndex){for(var matches=lang.getMatchOffsets(line,re),i=matches.length-1;i>=0;i--)if(callback(matches[i],row,startIndex))return!0};else var matchIterator=function(line,row,startIndex){for(var matches=lang.getMatchOffsets(line,re),i=0;i<matches.length;i++)if(callback(matches[i],row,startIndex))return!0};var lineIterator=this.$lineIterator(session,options);return{forEach:function(_callback){callback=_callback,lineIterator.forEach(matchIterator)}}},this.$assembleRegExp=function(options,$disableFakeMultiline){if(options.needle instanceof RegExp)return options.re=options.needle;var needle=options.needle;if(!options.needle)return options.re=!1;options.regExp||(needle=lang.escapeRegExp(needle)),options.wholeWord&&(needle="\\b"+needle+"\\b");var modifier=options.caseSensitive?"gm":"gmi";if(options.$isMultiLine=!$disableFakeMultiline&&/[\n\r]/.test(needle),options.$isMultiLine)return options.re=this.$assembleMultilineRegExp(needle,modifier);try{var re=new RegExp(needle,modifier)}catch(e){re=!1}return options.re=re},this.$assembleMultilineRegExp=function(needle,modifier){for(var parts=needle.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),re=[],i=0;i<parts.length;i++)try{re.push(new RegExp(parts[i],modifier))}catch(e){return!1}return""==parts[0]?(re.shift(),re.offset=1):re.offset=0,re},this.$lineIterator=function(session,options){var backwards=1==options.backwards,skipCurrent=0!=options.skipCurrent,range=options.range,start=options.start;start||(start=range?range[backwards?"end":"start"]:session.selection.getRange()),start.start&&(start=start[skipCurrent!=backwards?"end":"start"]);var firstRow=range?range.start.row:0,lastRow=range?range.end.row:session.getLength()-1;return{forEach:backwards?function(callback){var row=start.row;if(!callback(session.getLine(row).substring(0,start.column),row)){for(row--;row>=firstRow;row--)if(callback(session.getLine(row),row))return;if(0!=options.wrap)for(row=lastRow,firstRow=start.row;row>=firstRow;row--)if(callback(session.getLine(row),row))return}}:function(callback){var row=start.row;if(!callback(session.getLine(row).substr(start.column),row,start.column)){for(row+=1;row<=lastRow;row++)if(callback(session.getLine(row),row))return;if(0!=options.wrap)for(row=firstRow,lastRow=start.row;row<=lastRow;row++)if(callback(session.getLine(row),row))return}}}}}).call(Search.prototype),exports.Search=Search}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(acequire,exports,module){"use strict";function HashHandler(config,platform){this.platform=platform||(useragent.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(config),this.$singleCommand=!0}function MultiHashHandler(config,platform){HashHandler.call(this,config,platform),this.$singleCommand=!1}var keyUtil=acequire("../lib/keys"),useragent=acequire("../lib/useragent"),KEY_MODS=keyUtil.KEY_MODS;MultiHashHandler.prototype=HashHandler.prototype,function(){function getPosition(command){return"object"==typeof command&&command.bindKey&&command.bindKey.position||0}this.addCommand=function(command){this.commands[command.name]&&this.removeCommand(command),this.commands[command.name]=command,command.bindKey&&this._buildKeyHash(command)},this.removeCommand=function(command,keepCommand){var name=command&&("string"==typeof command?command:command.name);command=this.commands[name],keepCommand||delete this.commands[name];var ckb=this.commandKeyBinding;for(var keyId in ckb){var cmdGroup=ckb[keyId];if(cmdGroup==command)delete ckb[keyId];else if(Array.isArray(cmdGroup)){var i=cmdGroup.indexOf(command);-1!=i&&(cmdGroup.splice(i,1),1==cmdGroup.length&&(ckb[keyId]=cmdGroup[0]))}}},this.bindKey=function(key,command,position){if("object"==typeof key&&key&&(void 0==position&&(position=key.position),key=key[this.platform]),key)return"function"==typeof command?this.addCommand({exec:command,bindKey:key,name:command.name||key}):void key.split("|").forEach(function(keyPart){var chain="";if(-1!=keyPart.indexOf(" ")){var parts=keyPart.split(/\s+/);keyPart=parts.pop(),parts.forEach(function(keyPart){var binding=this.parseKeys(keyPart),id=KEY_MODS[binding.hashId]+binding.key;chain+=(chain?" ":"")+id,this._addCommandToBinding(chain,"chainKeys")},this),chain+=" "}var binding=this.parseKeys(keyPart),id=KEY_MODS[binding.hashId]+binding.key;this._addCommandToBinding(chain+id,command,position)},this)},this._addCommandToBinding=function(keyId,command,position){var i,ckb=this.commandKeyBinding;if(command)if(!ckb[keyId]||this.$singleCommand)ckb[keyId]=command;else{Array.isArray(ckb[keyId])?-1!=(i=ckb[keyId].indexOf(command))&&ckb[keyId].splice(i,1):ckb[keyId]=[ckb[keyId]],"number"!=typeof position&&(position=position||command.isDefault?-100:getPosition(command));var commands=ckb[keyId];for(i=0;i<commands.length;i++){var other=commands[i],otherPos=getPosition(other);if(otherPos>position)break}commands.splice(i,0,command)}else delete ckb[keyId]},this.addCommands=function(commands){commands&&Object.keys(commands).forEach(function(name){var command=commands[name];if(command){if("string"==typeof command)return this.bindKey(command,name);"function"==typeof command&&(command={exec:command}),"object"==typeof command&&(command.name||(command.name=name),this.addCommand(command))}},this)},this.removeCommands=function(commands){Object.keys(commands).forEach(function(name){this.removeCommand(commands[name])},this)},this.bindKeys=function(keyList){Object.keys(keyList).forEach(function(key){this.bindKey(key,keyList[key])},this)},this._buildKeyHash=function(command){this.bindKey(command.bindKey,command)},this.parseKeys=function(keys){var parts=keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x}),key=parts.pop(),keyCode=keyUtil[key];if(keyUtil.FUNCTION_KEYS[keyCode])key=keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();else{if(!parts.length)return{key:key,hashId:-1};if(1==parts.length&&"shift"==parts[0])return{key:key.toUpperCase(),hashId:-1}}for(var hashId=0,i=parts.length;i--;){var modifier=keyUtil.KEY_MODS[parts[i]];if(null==modifier)return"undefined"!=typeof console&&console.error("invalid modifier "+parts[i]+" in "+keys),!1;hashId|=modifier}return{key:key,hashId:hashId}},this.findKeyCommand=function(hashId,keyString){var key=KEY_MODS[hashId]+keyString;return this.commandKeyBinding[key]},this.handleKeyboard=function(data,hashId,keyString,keyCode){if(!(keyCode<0)){var key=KEY_MODS[hashId]+keyString,command=this.commandKeyBinding[key];return data.$keyChain&&(data.$keyChain+=" "+key,command=this.commandKeyBinding[data.$keyChain]||command),!command||"chainKeys"!=command&&"chainKeys"!=command[command.length-1]?(data.$keyChain&&(hashId&&4!=hashId||1!=keyString.length?(-1==hashId||keyCode>0)&&(data.$keyChain=""):data.$keyChain=data.$keyChain.slice(0,-key.length-1)),{command:command}):(data.$keyChain=data.$keyChain||key,{command:"null"})}},this.getStatusText=function(editor,data){return data.$keyChain||""}}.call(HashHandler.prototype),exports.HashHandler=HashHandler,exports.MultiHashHandler=MultiHashHandler}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(acequire,exports,module){"use strict";var oop=acequire("../lib/oop"),MultiHashHandler=acequire("../keyboard/hash_handler").MultiHashHandler,EventEmitter=acequire("../lib/event_emitter").EventEmitter,CommandManager=function(platform,commands){MultiHashHandler.call(this,commands,platform),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};oop.inherits(CommandManager,MultiHashHandler),function(){oop.implement(this,EventEmitter),this.exec=function(command,editor,args){if(Array.isArray(command)){for(var i=command.length;i--;)if(this.exec(command[i],editor,args))return!0;return!1}if("string"==typeof command&&(command=this.commands[command]),!command)return!1;if(editor&&editor.$readOnly&&!command.readOnly)return!1;var e={editor:editor,command:command,args:args};return e.returnValue=this._emit("exec",e),this._signal("afterExec",e),!1!==e.returnValue},this.toggleRecording=function(editor){if(!this.$inReplay)return editor&&editor._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(editor){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(editor);try{this.$inReplay=!0,this.macro.forEach(function(x){"string"==typeof x?this.exec(x,editor):this.exec(x[0],editor,x[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(m){return m.map(function(x){return"string"!=typeof x[0]&&(x[0]=x[0].name),x[1]||(x=x[0]),x})}}.call(CommandManager.prototype),exports.CommandManager=CommandManager}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(acequire,exports,module){"use strict";function bindKey(win,mac){return{win:win,mac:mac}}var lang=acequire("../lib/lang"),config=acequire("../config"),Range=acequire("../range").Range;exports.commands=[{name:"showSettingsMenu",bindKey:bindKey("Ctrl-,","Command-,"),exec:function(editor){config.loadModule("ace/ext/settings_menu",function(module){module.init(editor),editor.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:bindKey("Alt-E","Ctrl-E"),exec:function(editor){config.loadModule("ace/ext/error_marker",function(module){module.showErrorMarker(editor,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:bindKey("Alt-Shift-E","Ctrl-Shift-E"),exec:function(editor){config.loadModule("ace/ext/error_marker",function(module){module.showErrorMarker(editor,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:bindKey("Ctrl-A","Command-A"),exec:function(editor){editor.selectAll()},readOnly:!0},{name:"centerselection",bindKey:bindKey(null,"Ctrl-L"),exec:function(editor){editor.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:bindKey("Ctrl-L","Command-L"),exec:function(editor){var line=parseInt(prompt("Enter line number:"),10);isNaN(line)||editor.gotoLine(line)},readOnly:!0},{name:"fold",bindKey:bindKey("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(editor){editor.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:bindKey("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(editor){editor.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:bindKey("F2","F2"),exec:function(editor){editor.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:bindKey("Alt-F2","Alt-F2"),exec:function(editor){editor.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:bindKey(null,"Ctrl-Command-Option-0"),exec:function(editor){editor.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:bindKey("Alt-0","Command-Option-0"),exec:function(editor){editor.session.foldAll(),editor.session.unfold(editor.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:bindKey("Alt-Shift-0","Command-Option-Shift-0"),exec:function(editor){editor.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:bindKey("Ctrl-K","Command-G"),exec:function(editor){editor.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:bindKey("Ctrl-Shift-K","Command-Shift-G"),exec:function(editor){editor.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:bindKey("Alt-K","Ctrl-G"),exec:function(editor){editor.selection.isEmpty()?editor.selection.selectWord():editor.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:bindKey("Alt-Shift-K","Ctrl-Shift-G"),exec:function(editor){editor.selection.isEmpty()?editor.selection.selectWord():editor.findPrevious()},readOnly:!0},{name:"find",bindKey:bindKey("Ctrl-F","Command-F"),exec:function(editor){config.loadModule("ace/ext/searchbox",function(e){e.Search(editor)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(editor){editor.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:bindKey("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(editor){editor.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:bindKey("Ctrl-Home","Command-Home|Command-Up"),exec:function(editor){editor.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:bindKey("Shift-Up","Shift-Up"),exec:function(editor){editor.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:bindKey("Up","Up|Ctrl-P"),exec:function(editor,args){editor.navigateUp(args.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:bindKey("Ctrl-Shift-End","Command-Shift-Down"),exec:function(editor){editor.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:bindKey("Ctrl-End","Command-End|Command-Down"),exec:function(editor){editor.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:bindKey("Shift-Down","Shift-Down"),exec:function(editor){editor.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:bindKey("Down","Down|Ctrl-N"),exec:function(editor,args){editor.navigateDown(args.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{
+name:"selectwordleft",bindKey:bindKey("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(editor){editor.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:bindKey("Ctrl-Left","Option-Left"),exec:function(editor){editor.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:bindKey("Alt-Shift-Left","Command-Shift-Left"),exec:function(editor){editor.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:bindKey("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(editor){editor.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:bindKey("Shift-Left","Shift-Left"),exec:function(editor){editor.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:bindKey("Left","Left|Ctrl-B"),exec:function(editor,args){editor.navigateLeft(args.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:bindKey("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(editor){editor.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:bindKey("Ctrl-Right","Option-Right"),exec:function(editor){editor.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:bindKey("Alt-Shift-Right","Command-Shift-Right"),exec:function(editor){editor.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:bindKey("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(editor){editor.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:bindKey("Shift-Right","Shift-Right"),exec:function(editor){editor.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:bindKey("Right","Right|Ctrl-F"),exec:function(editor,args){editor.navigateRight(args.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(editor){editor.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:bindKey(null,"Option-PageDown"),exec:function(editor){editor.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:bindKey("PageDown","PageDown|Ctrl-V"),exec:function(editor){editor.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(editor){editor.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:bindKey(null,"Option-PageUp"),exec:function(editor){editor.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(editor){editor.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:bindKey("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:bindKey("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(editor){editor.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(editor){editor.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:bindKey("Ctrl-Alt-E","Command-Option-E"),exec:function(editor){editor.commands.toggleRecording(editor)},readOnly:!0},{name:"replaymacro",bindKey:bindKey("Ctrl-Shift-E","Command-Shift-E"),exec:function(editor){editor.commands.replay(editor)},readOnly:!0},{name:"jumptomatching",bindKey:bindKey("Ctrl-P","Ctrl-P"),exec:function(editor){editor.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:bindKey("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(editor){editor.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:bindKey("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(editor){editor.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:bindKey(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(editor){},readOnly:!0},{name:"cut",exec:function(editor){var range=editor.getSelectionRange();editor._emit("cut",range),editor.selection.isEmpty()||(editor.session.remove(range),editor.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(editor,args){editor.$handlePaste(args)},scrollIntoView:"cursor"},{name:"removeline",bindKey:bindKey("Ctrl-D","Command-D"),exec:function(editor){editor.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:bindKey("Ctrl-Shift-D","Command-Shift-D"),exec:function(editor){editor.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:bindKey("Ctrl-Alt-S","Command-Alt-S"),exec:function(editor){editor.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:bindKey("Ctrl-/","Command-/"),exec:function(editor){editor.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:bindKey("Ctrl-Shift-/","Command-Shift-/"),exec:function(editor){editor.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:bindKey("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(editor){editor.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:bindKey("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(editor){editor.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:bindKey("Ctrl-H","Command-Option-F"),exec:function(editor){config.loadModule("ace/ext/searchbox",function(e){e.Search(editor,!0)})}},{name:"undo",bindKey:bindKey("Ctrl-Z","Command-Z"),exec:function(editor){editor.undo()}},{name:"redo",bindKey:bindKey("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(editor){editor.redo()}},{name:"copylinesup",bindKey:bindKey("Alt-Shift-Up","Command-Option-Up"),exec:function(editor){editor.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:bindKey("Alt-Up","Option-Up"),exec:function(editor){editor.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:bindKey("Alt-Shift-Down","Command-Option-Down"),exec:function(editor){editor.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:bindKey("Alt-Down","Option-Down"),exec:function(editor){editor.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:bindKey("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(editor){editor.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:bindKey("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(editor){editor.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:bindKey("Shift-Delete",null),exec:function(editor){if(!editor.selection.isEmpty())return!1;editor.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:bindKey("Alt-Backspace","Command-Backspace"),exec:function(editor){editor.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:bindKey("Alt-Delete","Ctrl-K"),exec:function(editor){editor.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:bindKey("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(editor){editor.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:bindKey("Ctrl-Delete","Alt-Delete"),exec:function(editor){editor.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:bindKey("Shift-Tab","Shift-Tab"),exec:function(editor){editor.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:bindKey("Tab","Tab"),exec:function(editor){editor.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:bindKey("Ctrl-[","Ctrl-["),exec:function(editor){editor.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:bindKey("Ctrl-]","Ctrl-]"),exec:function(editor){editor.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(editor,str){editor.insert(str)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(editor,args){editor.insert(lang.stringRepeat(args.text||"",args.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:bindKey(null,"Ctrl-O"),exec:function(editor){editor.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:bindKey("Ctrl-T","Ctrl-T"),exec:function(editor){editor.transposeLetters()},multiSelectAction:function(editor){editor.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:bindKey("Ctrl-U","Ctrl-U"),exec:function(editor){editor.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:bindKey("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(editor){editor.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:bindKey("Ctrl-Shift-L","Command-Shift-L"),exec:function(editor){var range=editor.selection.getRange();range.start.column=range.end.column=0,range.end.row++,editor.selection.setRange(range,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:bindKey(null,null),exec:function(editor){for(var isBackwards=editor.selection.isBackwards(),selectionStart=isBackwards?editor.selection.getSelectionLead():editor.selection.getSelectionAnchor(),selectionEnd=isBackwards?editor.selection.getSelectionAnchor():editor.selection.getSelectionLead(),firstLineEndCol=editor.session.doc.getLine(selectionStart.row).length,selectedText=editor.session.doc.getTextRange(editor.selection.getRange()),selectedCount=selectedText.replace(/\n\s*/," ").length,insertLine=editor.session.doc.getLine(selectionStart.row),i=selectionStart.row+1;i<=selectionEnd.row+1;i++){var curLine=lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));0!==curLine.length&&(curLine=" "+curLine),insertLine+=curLine}selectionEnd.row+1<editor.session.doc.getLength()-1&&(insertLine+=editor.session.doc.getNewLineCharacter()),editor.clearSelection(),editor.session.doc.replace(new Range(selectionStart.row,0,selectionEnd.row+2,0),insertLine),selectedCount>0?(editor.selection.moveCursorTo(selectionStart.row,selectionStart.column),editor.selection.selectTo(selectionStart.row,selectionStart.column+selectedCount)):(firstLineEndCol=editor.session.doc.getLine(selectionStart.row).length>firstLineEndCol?firstLineEndCol+1:firstLineEndCol,editor.selection.moveCursorTo(selectionStart.row,firstLineEndCol))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:bindKey(null,null),exec:function(editor){var endRow=editor.session.doc.getLength()-1,endCol=editor.session.doc.getLine(endRow).length,ranges=editor.selection.rangeList.ranges,newRanges=[];ranges.length<1&&(ranges=[editor.selection.getRange()]);for(var i=0;i<ranges.length;i++)i==ranges.length-1&&(ranges[i].end.row===endRow&&ranges[i].end.column===endCol||newRanges.push(new Range(ranges[i].end.row,ranges[i].end.column,endRow,endCol))),0===i?0===ranges[i].start.row&&0===ranges[i].start.column||newRanges.push(new Range(0,0,ranges[i].start.row,ranges[i].start.column)):newRanges.push(new Range(ranges[i-1].end.row,ranges[i-1].end.column,ranges[i].start.row,ranges[i].start.column));editor.exitMultiSelectMode(),editor.clearSelection();for(var i=0;i<newRanges.length;i++)editor.selection.addRange(newRanges[i],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(acequire,exports,module){"use strict";acequire("./lib/fixoldbrowsers");var oop=acequire("./lib/oop"),dom=acequire("./lib/dom"),lang=acequire("./lib/lang"),useragent=acequire("./lib/useragent"),TextInput=acequire("./keyboard/textinput").TextInput,MouseHandler=acequire("./mouse/mouse_handler").MouseHandler,FoldHandler=acequire("./mouse/fold_handler").FoldHandler,KeyBinding=acequire("./keyboard/keybinding").KeyBinding,EditSession=acequire("./edit_session").EditSession,Search=acequire("./search").Search,Range=acequire("./range").Range,EventEmitter=acequire("./lib/event_emitter").EventEmitter,CommandManager=acequire("./commands/command_manager").CommandManager,defaultCommands=acequire("./commands/default_commands").commands,config=acequire("./config"),TokenIterator=acequire("./token_iterator").TokenIterator,Editor=function(renderer,session){var container=renderer.getContainerElement();this.container=container,this.renderer=renderer,this.commands=new CommandManager(useragent.isMac?"mac":"win",defaultCommands),this.textInput=new TextInput(renderer.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new KeyBinding(this),this.$mouseHandler=new MouseHandler(this),new FoldHandler(this),this.$blockScrolling=0,this.$search=(new Search).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=lang.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(_,_self){_self._$emitInputEvent.schedule(31)}),this.setSession(session||new EditSession("")),config.resetOptions(this),config._signal("editor",this)};(function(){oop.implement(this,EventEmitter),this.$initOperationListeners=function(){this.selections=[],this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=lang.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(commadEvent){if(this.curOp){if(!commadEvent||this.curOp.command)return;this.prevOp=this.curOp}commadEvent||(this.previousCommand=null,commadEvent={}),this.$opResetTimer.schedule(),this.curOp={command:commadEvent.command||{},args:commadEvent.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&void 0!==this.curOp.command.scrollIntoView&&this.$blockScrolling++},this.endOperation=function(e){if(this.curOp){if(e&&!1===e.returnValue)return this.curOp=null;this._signal("beforeEndOperation");var command=this.curOp.command;command.name&&this.$blockScrolling>0&&this.$blockScrolling--;var scrollIntoView=command&&command.scrollIntoView;if(scrollIntoView){switch(scrollIntoView){case"center-animate":scrollIntoView="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var range=this.selection.getRange(),config=this.renderer.layerConfig;(range.start.row>=config.lastRow||range.end.row<=config.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==scrollIntoView&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var prev=this.prevOp,mergeableCommands=this.$mergeableCommands,shouldMerge=prev.command&&e.command.name==prev.command.name;if("insertstring"==e.command.name){var text=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),shouldMerge=shouldMerge&&this.mergeNextCommand&&(!/\s/.test(text)||/\s/.test(prev.args)),this.mergeNextCommand=!0}else shouldMerge=shouldMerge&&-1!==mergeableCommands.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(shouldMerge=!1),shouldMerge?this.session.mergeUndoDeltas=!0:-1!==mergeableCommands.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(keyboardHandler,cb){if(keyboardHandler&&"string"==typeof keyboardHandler){this.$keybindingId=keyboardHandler;var _self=this;config.loadModule(["keybinding",keyboardHandler],function(module){_self.$keybindingId==keyboardHandler&&_self.keyBinding.setKeyboardHandler(module&&module.handler),cb&&cb()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(keyboardHandler),cb&&cb()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(session){if(this.session!=session){this.curOp&&this.endOperation(),this.curOp={};var oldSession=this.session;if(oldSession){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var selection=this.session.getSelection();selection.off("changeCursor",this.$onCursorChange),selection.off("changeSelection",this.$onSelectionChange)}this.session=session,session?(this.$onDocumentChange=this.onDocumentChange.bind(this),session.on("change",this.$onDocumentChange),this.renderer.setSession(session),this.$onChangeMode=this.onChangeMode.bind(this),session.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),session.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),session.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),session.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),session.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),session.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=session.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(session)),this._signal("changeSession",{session:session,oldSession:oldSession}),this.curOp=null,oldSession&&oldSession._signal("changeEditor",{oldEditor:this}),session&&session._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(val,cursorPos){return this.session.doc.setValue(val),cursorPos?1==cursorPos?this.navigateFileEnd():-1==cursorPos&&this.navigateFileStart():this.selectAll(),val},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(force){this.renderer.onResize(force)},this.setTheme=function(theme,cb){this.renderer.setTheme(theme,cb)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(style){this.renderer.setStyle(style)},this.unsetStyle=function(style){this.renderer.unsetStyle(style)},this.getFontSize=function(){return this.getOption("fontSize")||dom.computedStyle(this.container,"fontSize")},this.setFontSize=function(size){this.setOption("fontSize",size)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var self=this;this.$highlightPending=!0,setTimeout(function(){self.$highlightPending=!1;var session=self.session;if(session&&session.bgTokenizer){var pos=session.findMatchingBracket(self.getCursorPosition());if(pos)var range=new Range(pos.row,pos.column,pos.row,pos.column+1);else if(session.$mode.getMatching)var range=session.$mode.getMatching(self.session);range&&(session.$bracketHighlight=session.addMarker(range,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var self=this;this.$highlightTagPending=!0,setTimeout(function(){self.$highlightTagPending=!1;var session=self.session;if(session&&session.bgTokenizer){var pos=self.getCursorPosition(),iterator=new TokenIterator(self.session,pos.row,pos.column),token=iterator.getCurrentToken();if(!token||!/\b(?:tag-open|tag-name)/.test(token.type))return session.removeMarker(session.$tagHighlight),void(session.$tagHighlight=null);if(-1==token.type.indexOf("tag-open")||(token=iterator.stepForward())){var tag=token.value,depth=0,prevToken=iterator.stepBackward();if("<"==prevToken.value)do{prevToken=token,(token=iterator.stepForward())&&token.value===tag&&-1!==token.type.indexOf("tag-name")&&("<"===prevToken.value?depth++:"</"===prevToken.value&&depth--)}while(token&&depth>=0);else{do{token=prevToken,prevToken=iterator.stepBackward(),token&&token.value===tag&&-1!==token.type.indexOf("tag-name")&&("<"===prevToken.value?depth++:"</"===prevToken.value&&depth--)}while(prevToken&&depth<=0);iterator.stepForward()}if(!token)return session.removeMarker(session.$tagHighlight),void(session.$tagHighlight=null);var row=iterator.getCurrentTokenRow(),column=iterator.getCurrentTokenColumn(),range=new Range(row,column,row,column+token.value.length);session.$tagHighlight&&0!==range.compareRange(session.$backMarkers[session.$tagHighlight].range)&&(session.removeMarker(session.$tagHighlight),session.$tagHighlight=null),range&&!session.$tagHighlight&&(session.$tagHighlight=session.addMarker(range,"ace_bracket","text"))}}},50)}},this.focus=function(){var _self=this;setTimeout(function(){_self.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(delta){var wrap=this.session.$useWrapMode,lastRow=delta.start.row==delta.end.row?delta.end.row:1/0;this.renderer.updateLines(delta.start.row,lastRow,wrap),this._signal("change",delta),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){var rows=e.data;this.renderer.updateLines(rows.first,rows.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(config.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var highlight,session=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(highlight=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(highlight=!1)),session.$highlightLineMarker&&!highlight)session.removeMarker(session.$highlightLineMarker.id),session.$highlightLineMarker=null;else if(!session.$highlightLineMarker&&highlight){var range=new Range(highlight.row,highlight.column,highlight.row,1/0);range.id=session.addMarker(range,"ace_active-line","screenLine"),session.$highlightLineMarker=range}else highlight&&(session.$highlightLineMarker.start.row=highlight.row,session.$highlightLineMarker.end.row=highlight.row,session.$highlightLineMarker.start.column=highlight.column,session._signal("changeBackMarker"))},this.onSelectionChange=function(e){var session=this.session;if(session.$selectionMarker&&session.removeMarker(session.$selectionMarker),session.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var range=this.selection.getRange(),style=this.getSelectionStyle();session.$selectionMarker=session.addMarker(range,"ace_selection",style)}var re=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(re),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var session=this.session,selection=this.getSelectionRange();if(!selection.isEmpty()&&!selection.isMultiLine()){var startOuter=selection.start.column-1,endOuter=selection.end.column+1,line=session.getLine(selection.start.row),lineCols=line.length,needle=line.substring(Math.max(startOuter,0),Math.min(endOuter,lineCols));if(!(startOuter>=0&&/^[\w\d]/.test(needle)||endOuter<=lineCols&&/[\w\d]$/.test(needle))&&(needle=line.substring(selection.start.column,selection.end.column),/^[\w\d]+$/.test(needle))){return this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:needle})}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var text=this.getSelectedText();return this._signal("copy",text),text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(text,event){var e={text:text,event:event};this.commands.exec("paste",this,e)},this.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var text=e.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(text);else{var lines=text.split(/\r\n|\r|\n/),ranges=this.selection.rangeList.ranges;if(lines.length>ranges.length||lines.length<2||!lines[1])return this.commands.exec("insertstring",this,text);for(var i=ranges.length;i--;){var range=ranges[i];range.isEmpty()||this.session.remove(range),this.session.insert(range.start,lines[i])}}},this.execCommand=function(command,args){return this.commands.exec(command,this,args)},this.insert=function(text,pasted){var session=this.session,mode=session.getMode(),cursor=this.getCursorPosition();if(this.getBehavioursEnabled()&&!pasted){var transform=mode.transformAction(session.getState(cursor.row),"insertion",this,session,text);transform&&(text!==transform.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),text=transform.text)}if("\t"==text&&(text=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var range=new Range.fromPoints(cursor,cursor);range.end.column+=text.length,this.session.remove(range)}}else{var range=this.getSelectionRange();cursor=this.session.remove(range),this.clearSelection()}if("\n"==text||"\r\n"==text){var line=session.getLine(cursor.row);if(cursor.column>line.search(/\S|$/)){var d=line.substr(cursor.column).search(/\S|$/);session.doc.removeInLine(cursor.row,cursor.column,cursor.column+d)}}this.clearSelection();var start=cursor.column,lineState=session.getState(cursor.row),line=session.getLine(cursor.row),shouldOutdent=mode.checkOutdent(lineState,line,text);session.insert(cursor,text);if(transform&&transform.selection&&(2==transform.selection.length?this.selection.setSelectionRange(new Range(cursor.row,start+transform.selection[0],cursor.row,start+transform.selection[1])):this.selection.setSelectionRange(new Range(cursor.row+transform.selection[0],transform.selection[1],cursor.row+transform.selection[2],transform.selection[3]))),session.getDocument().isNewLine(text)){var lineIndent=mode.getNextLineIndent(lineState,line.slice(0,cursor.column),session.getTabString());session.insert({row:cursor.row+1,column:0},lineIndent)}shouldOutdent&&mode.autoOutdent(lineState,session,cursor.row)},this.onTextInput=function(text){this.keyBinding.onTextInput(text)},this.onCommandKey=function(e,hashId,keyCode){this.keyBinding.onCommandKey(e,hashId,keyCode)},this.setOverwrite=function(overwrite){this.session.setOverwrite(overwrite)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(speed){this.setOption("scrollSpeed",speed)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(dragDelay){this.setOption("dragDelay",dragDelay)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(val){this.setOption("selectionStyle",val)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},
+this.setHighlightActiveLine=function(shouldHighlight){this.setOption("highlightActiveLine",shouldHighlight)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(shouldHighlight){this.setOption("highlightGutterLine",shouldHighlight)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(shouldHighlight){this.setOption("highlightSelectedWord",shouldHighlight)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(shouldAnimate){this.renderer.setAnimatedScroll(shouldAnimate)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(showInvisibles){this.renderer.setShowInvisibles(showInvisibles)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(display){this.renderer.setDisplayIndentGuides(display)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(showPrintMargin){this.renderer.setShowPrintMargin(showPrintMargin)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(showPrintMargin){this.renderer.setPrintMarginColumn(showPrintMargin)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(readOnly){this.setOption("readOnly",readOnly)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(enabled){this.setOption("behavioursEnabled",enabled)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(enabled){this.setOption("wrapBehavioursEnabled",enabled)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(show){this.setOption("showFoldWidgets",show)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(fade){this.setOption("fadeFoldWidgets",fade)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(dir){this.selection.isEmpty()&&("left"==dir?this.selection.selectLeft():this.selection.selectRight());var range=this.getSelectionRange();if(this.getBehavioursEnabled()){var session=this.session,state=session.getState(range.start.row),new_range=session.getMode().transformAction(state,"deletion",this,session,range);if(0===range.end.column){var text=session.getTextRange(range);if("\n"==text[text.length-1]){var line=session.getLine(range.end.row);/^\s+$/.test(line)&&(range.end.column=line.length)}}new_range&&(range=new_range)}this.session.remove(range),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var range=this.getSelectionRange();range.start.column==range.end.column&&range.start.row==range.end.row&&(range.end.column=0,range.end.row++),this.session.remove(range),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var cursor=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(cursor)},this.transposeLetters=function(){if(this.selection.isEmpty()){var cursor=this.getCursorPosition(),column=cursor.column;if(0!==column){var swap,range,line=this.session.getLine(cursor.row);column<line.length?(swap=line.charAt(column)+line.charAt(column-1),range=new Range(cursor.row,column-1,cursor.row,column+1)):(swap=line.charAt(column-1)+line.charAt(column-2),range=new Range(cursor.row,column-2,cursor.row,column)),this.session.replace(range,swap)}}},this.toLowerCase=function(){var originalRange=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var range=this.getSelectionRange(),text=this.session.getTextRange(range);this.session.replace(range,text.toLowerCase()),this.selection.setSelectionRange(originalRange)},this.toUpperCase=function(){var originalRange=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var range=this.getSelectionRange(),text=this.session.getTextRange(range);this.session.replace(range,text.toUpperCase()),this.selection.setSelectionRange(originalRange)},this.indent=function(){var session=this.session,range=this.getSelectionRange();if(range.start.row<range.end.row){var rows=this.$getSelectedRows();return void session.indentRows(rows.first,rows.last,"\t")}if(range.start.column<range.end.column){if(!/^\s+$/.test(session.getTextRange(range))){var rows=this.$getSelectedRows();return void session.indentRows(rows.first,rows.last,"\t")}}var line=session.getLine(range.start.row),position=range.start,size=session.getTabSize(),column=session.documentToScreenColumn(position.row,position.column);if(this.session.getUseSoftTabs())var count=size-column%size,indentString=lang.stringRepeat(" ",count);else{for(var count=column%size;" "==line[range.start.column]&&count;)range.start.column--,count--;this.selection.setSelectionRange(range),indentString="\t"}return this.insert(indentString)},this.blockIndent=function(){var rows=this.$getSelectedRows();this.session.indentRows(rows.first,rows.last,"\t")},this.blockOutdent=function(){var selection=this.session.getSelection();this.session.outdentRows(selection.getRange())},this.sortLines=function(){var rows=this.$getSelectedRows(),session=this.session,lines=[];for(i=rows.first;i<=rows.last;i++)lines.push(session.getLine(i));lines.sort(function(a,b){return a.toLowerCase()<b.toLowerCase()?-1:a.toLowerCase()>b.toLowerCase()?1:0});for(var deleteRange=new Range(0,0,0,0),i=rows.first;i<=rows.last;i++){var line=session.getLine(i);deleteRange.start.row=i,deleteRange.end.row=i,deleteRange.end.column=line.length,session.replace(deleteRange,lines[i-rows.first])}},this.toggleCommentLines=function(){var state=this.session.getState(this.getCursorPosition().row),rows=this.$getSelectedRows();this.session.getMode().toggleCommentLines(state,this.session,rows.first,rows.last)},this.toggleBlockComment=function(){var cursor=this.getCursorPosition(),state=this.session.getState(cursor.row),range=this.getSelectionRange();this.session.getMode().toggleBlockComment(state,this.session,range,cursor)},this.getNumberAt=function(row,column){var _numberRx=/[\-]?[0-9]+(?:\.[0-9]+)?/g;_numberRx.lastIndex=0;for(var s=this.session.getLine(row);_numberRx.lastIndex<column;){var m=_numberRx.exec(s);if(m.index<=column&&m.index+m[0].length>=column){return{value:m[0],start:m.index,end:m.index+m[0].length}}}return null},this.modifyNumber=function(amount){var row=this.selection.getCursor().row,column=this.selection.getCursor().column,charRange=new Range(row,column-1,row,column),c=this.session.getTextRange(charRange);if(!isNaN(parseFloat(c))&&isFinite(c)){var nr=this.getNumberAt(row,column);if(nr){var fp=nr.value.indexOf(".")>=0?nr.start+nr.value.indexOf(".")+1:nr.end,decimals=nr.start+nr.value.length-fp,t=parseFloat(nr.value);t*=Math.pow(10,decimals),fp!==nr.end&&column<fp?amount*=Math.pow(10,nr.end-column-1):amount*=Math.pow(10,nr.end-column),t+=amount,t/=Math.pow(10,decimals);var nnr=t.toFixed(decimals),replaceRange=new Range(row,nr.start,row,nr.end);this.session.replace(replaceRange,nnr),this.moveCursorTo(row,Math.max(nr.start+1,column+nnr.length-nr.value.length))}}},this.removeLines=function(){var rows=this.$getSelectedRows();this.session.removeFullLines(rows.first,rows.last),this.clearSelection()},this.duplicateSelection=function(){var sel=this.selection,doc=this.session,range=sel.getRange(),reverse=sel.isBackwards();if(range.isEmpty()){var row=range.start.row;doc.duplicateLines(row,row)}else{var point=reverse?range.start:range.end,endPoint=doc.insert(point,doc.getTextRange(range),!1);range.start=point,range.end=endPoint,sel.setSelectionRange(range,reverse)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(range,toPosition,copy){return this.session.moveText(range,toPosition,copy)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(dir,copy){var rows,moved,selection=this.selection;if(!selection.inMultiSelectMode||this.inVirtualSelectionMode){var range=selection.toOrientedRange();rows=this.$getSelectedRows(range),moved=this.session.$moveLines(rows.first,rows.last,copy?0:dir),copy&&-1==dir&&(moved=0),range.moveBy(moved,0),selection.fromOrientedRange(range)}else{var ranges=selection.rangeList.ranges;selection.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var diff=0,totalDiff=0,l=ranges.length,i=0;i<l;i++){var rangeIndex=i;ranges[i].moveBy(diff,0),rows=this.$getSelectedRows(ranges[i]);for(var first=rows.first,last=rows.last;++i<l;){totalDiff&&ranges[i].moveBy(totalDiff,0);var subRows=this.$getSelectedRows(ranges[i]);if(copy&&subRows.first!=last)break;if(!copy&&subRows.first>last+1)break;last=subRows.last}for(i--,diff=this.session.$moveLines(first,last,copy?0:dir),copy&&-1==dir&&(rangeIndex=i+1);rangeIndex<=i;)ranges[rangeIndex].moveBy(diff,0),rangeIndex++;copy||(diff=0),totalDiff+=diff}selection.fromOrientedRange(selection.ranges[0]),selection.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(range){return range=(range||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(range.start.row),last:this.session.getRowFoldEnd(range.end.row)}},this.onCompositionStart=function(text){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(text){this.renderer.setCompositionText(text)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(row){return row>=this.getFirstVisibleRow()&&row<=this.getLastVisibleRow()},this.isRowFullyVisible=function(row){return row>=this.renderer.getFirstFullyVisibleRow()&&row<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(dir,select){var renderer=this.renderer,config=this.renderer.layerConfig,rows=dir*Math.floor(config.height/config.lineHeight);this.$blockScrolling++,!0===select?this.selection.$moveSelection(function(){this.moveCursorBy(rows,0)}):!1===select&&(this.selection.moveCursorBy(rows,0),this.selection.clearSelection()),this.$blockScrolling--;var scrollTop=renderer.scrollTop;renderer.scrollBy(0,rows*config.lineHeight),null!=select&&renderer.scrollCursorIntoView(null,.5),renderer.animateScrolling(scrollTop)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(row){this.renderer.scrollToRow(row)},this.scrollToLine=function(line,center,animate,callback){this.renderer.scrollToLine(line,center,animate,callback)},this.centerSelection=function(){var range=this.getSelectionRange(),pos={row:Math.floor(range.start.row+(range.end.row-range.start.row)/2),column:Math.floor(range.start.column+(range.end.column-range.start.column)/2)};this.renderer.alignCursor(pos,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(row,column){this.selection.moveCursorTo(row,column)},this.moveCursorToPosition=function(pos){this.selection.moveCursorToPosition(pos)},this.jumpToMatching=function(select,expand){var cursor=this.getCursorPosition(),iterator=new TokenIterator(this.session,cursor.row,cursor.column),prevToken=iterator.getCurrentToken(),token=prevToken||iterator.stepForward();if(token){var matchType,bracketType,found=!1,depth={},i=cursor.column-token.start,brackets={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(token.value.match(/[{}()\[\]]/g)){for(;i<token.value.length&&!found;i++)if(brackets[token.value[i]])switch(bracketType=brackets[token.value[i]]+"."+token.type.replace("rparen","lparen"),isNaN(depth[bracketType])&&(depth[bracketType]=0),token.value[i]){case"(":case"[":case"{":depth[bracketType]++;break;case")":case"]":case"}":depth[bracketType]--,-1===depth[bracketType]&&(matchType="bracket",found=!0)}}else token&&-1!==token.type.indexOf("tag-name")&&(isNaN(depth[token.value])&&(depth[token.value]=0),"<"===prevToken.value?depth[token.value]++:"</"===prevToken.value&&depth[token.value]--,-1===depth[token.value]&&(matchType="tag",found=!0));found||(prevToken=token,token=iterator.stepForward(),i=0)}while(token&&!found);if(matchType){var range,pos;if("bracket"===matchType)(range=this.session.getBracketRange(cursor))||(range=new Range(iterator.getCurrentTokenRow(),iterator.getCurrentTokenColumn()+i-1,iterator.getCurrentTokenRow(),iterator.getCurrentTokenColumn()+i-1),pos=range.start,(expand||pos.row===cursor.row&&Math.abs(pos.column-cursor.column)<2)&&(range=this.session.getBracketRange(pos)));else if("tag"===matchType){if(!token||-1===token.type.indexOf("tag-name"))return;var tag=token.value;if(range=new Range(iterator.getCurrentTokenRow(),iterator.getCurrentTokenColumn()-2,iterator.getCurrentTokenRow(),iterator.getCurrentTokenColumn()-2),0===range.compare(cursor.row,cursor.column)){found=!1;do{token=prevToken,(prevToken=iterator.stepBackward())&&(-1!==prevToken.type.indexOf("tag-close")&&range.setEnd(iterator.getCurrentTokenRow(),iterator.getCurrentTokenColumn()+1),token.value===tag&&-1!==token.type.indexOf("tag-name")&&("<"===prevToken.value?depth[tag]++:"</"===prevToken.value&&depth[tag]--,0===depth[tag]&&(found=!0)))}while(prevToken&&!found)}token&&token.type.indexOf("tag-name")&&(pos=range.start,pos.row==cursor.row&&Math.abs(pos.column-cursor.column)<2&&(pos=range.end))}pos=range&&range.cursor||pos,pos&&(select?range&&expand?this.selection.setRange(range):range&&range.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(pos.row,pos.column):this.selection.moveTo(pos.row,pos.column))}}},this.gotoLine=function(lineNumber,column,animate){this.selection.clearSelection(),this.session.unfold({row:lineNumber-1,column:column||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(lineNumber-1,column||0),this.$blockScrolling-=1,this.isRowFullyVisible(lineNumber-1)||this.scrollToLine(lineNumber-1,!0,animate)},this.navigateTo=function(row,column){this.selection.moveTo(row,column)},this.navigateUp=function(times){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var selectionStart=this.selection.anchor.getPosition();return this.moveCursorToPosition(selectionStart)}this.selection.clearSelection(),this.selection.moveCursorBy(-times||-1,0)},this.navigateDown=function(times){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var selectionEnd=this.selection.anchor.getPosition();return this.moveCursorToPosition(selectionEnd)}this.selection.clearSelection(),this.selection.moveCursorBy(times||1,0)},this.navigateLeft=function(times){if(this.selection.isEmpty())for(times=times||1;times--;)this.selection.moveCursorLeft();else{var selectionStart=this.getSelectionRange().start;this.moveCursorToPosition(selectionStart)}this.clearSelection()},this.navigateRight=function(times){if(this.selection.isEmpty())for(times=times||1;times--;)this.selection.moveCursorRight();else{var selectionEnd=this.getSelectionRange().end;this.moveCursorToPosition(selectionEnd)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(replacement,options){options&&this.$search.set(options);var range=this.$search.find(this.session),replaced=0;return range?(this.$tryReplace(range,replacement)&&(replaced=1),null!==range&&(this.selection.setSelectionRange(range),this.renderer.scrollSelectionIntoView(range.start,range.end)),replaced):replaced},this.replaceAll=function(replacement,options){options&&this.$search.set(options);var ranges=this.$search.findAll(this.session),replaced=0;if(!ranges.length)return replaced;this.$blockScrolling+=1;var selection=this.getSelectionRange();this.selection.moveTo(0,0);for(var i=ranges.length-1;i>=0;--i)this.$tryReplace(ranges[i],replacement)&&replaced++;return this.selection.setSelectionRange(selection),this.$blockScrolling-=1,replaced},this.$tryReplace=function(range,replacement){var input=this.session.getTextRange(range);return replacement=this.$search.replace(input,replacement),null!==replacement?(range.end=this.session.replace(range,replacement),range):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(needle,options,animate){options||(options={}),"string"==typeof needle||needle instanceof RegExp?options.needle=needle:"object"==typeof needle&&oop.mixin(options,needle);var range=this.selection.getRange();null==options.needle&&(needle=this.session.getTextRange(range)||this.$search.$options.needle,needle||(range=this.session.getWordRange(range.start.row,range.start.column),needle=this.session.getTextRange(range)),this.$search.set({needle:needle})),this.$search.set(options),options.start||this.$search.set({start:range});var newRange=this.$search.find(this.session);return options.preventScroll?newRange:newRange?(this.revealRange(newRange,animate),newRange):(options.backwards?range.start=range.end:range.end=range.start,void this.selection.setRange(range))},this.findNext=function(options,animate){this.find({skipCurrent:!0,backwards:!1},options,animate)},this.findPrevious=function(options,animate){this.find(options,{skipCurrent:!0,backwards:!0},animate)},this.revealRange=function(range,animate){this.$blockScrolling+=1,this.session.unfold(range),this.selection.setSelectionRange(range),this.$blockScrolling-=1;var scrollTop=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(range.start,range.end,.5),!1!==animate&&this.renderer.animateScrolling(scrollTop)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(enable){if(enable){var rect,self=this,shouldScroll=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var scrollAnchor=this.$scrollAnchor;scrollAnchor.style.cssText="position:absolute",this.container.insertBefore(scrollAnchor,this.container.firstChild);var onChangeSelection=this.on("changeSelection",function(){shouldScroll=!0}),onBeforeRender=this.renderer.on("beforeRender",function(){shouldScroll&&(rect=self.renderer.container.getBoundingClientRect())}),onAfterRender=this.renderer.on("afterRender",function(){if(shouldScroll&&rect&&(self.isFocused()||self.searchBox&&self.searchBox.isFocused())){var renderer=self.renderer,pos=renderer.$cursorLayer.$pixelPos,config=renderer.layerConfig,top=pos.top-config.offset;shouldScroll=pos.top>=0&&top+rect.top<0||!(pos.top<config.height&&pos.top+rect.top+config.lineHeight>window.innerHeight)&&null,null!=shouldScroll&&(scrollAnchor.style.top=top+"px",scrollAnchor.style.left=pos.left+"px",scrollAnchor.style.height=config.lineHeight+"px",scrollAnchor.scrollIntoView(shouldScroll)),shouldScroll=rect=null}});this.setAutoScrollEditorIntoView=function(enable){enable||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",onChangeSelection),this.renderer.off("afterRender",onAfterRender),this.renderer.off("beforeRender",onBeforeRender))}}},this.$resetCursorStyle=function(){var style=this.$cursorStyle||"ace",cursorLayer=this.renderer.$cursorLayer;cursorLayer&&(cursorLayer.setSmoothBlinking(/smooth/.test(style)),cursorLayer.isBlinking=!this.$readOnly&&"wide"!=style,dom.setCssClass(cursorLayer.element,"ace_slim-cursors",/slim/.test(style)))}}).call(Editor.prototype),config.defineOptions(Editor.prototype,"editor",{selectionStyle:{set:function(style){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:style})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(shouldHighlight){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(readOnly){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(val){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(val){this.setAutoScrollEditorIntoView(val)}},keyboardHandler:{set:function(val){this.setKeyboardHandler(val)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),exports.Editor=Editor}),ace.define("ace/undomanager",["require","exports","module"],function(acequire,exports,module){"use strict";var UndoManager=function(){this.reset()};(function(){function $serializeDelta(delta){return{action:delta.action,start:delta.start,end:delta.end,lines:1==delta.lines.length?null:delta.lines,text:1==delta.lines.length?delta.lines[0]:null}}function $deserializeDelta(delta){return{action:delta.action,start:delta.start,end:delta.end,lines:delta.lines||[delta.text]}}function cloneDeltaSetsObj(deltaSets_old,fnGetModifiedDelta){for(var deltaSets_new=new Array(deltaSets_old.length),i=0;i<deltaSets_old.length;i++){for(var deltaSet_old=deltaSets_old[i],deltaSet_new={group:deltaSet_old.group,deltas:new Array(deltaSet_old.length)},j=0;j<deltaSet_old.deltas.length;j++){var delta_old=deltaSet_old.deltas[j];deltaSet_new.deltas[j]=fnGetModifiedDelta(delta_old)}deltaSets_new[i]=deltaSet_new}return deltaSets_new}this.execute=function(options){var deltaSets=options.args[0];this.$doc=options.args[1],options.merge&&this.hasUndo()&&(this.dirtyCounter--,deltaSets=this.$undoStack.pop().concat(deltaSets)),this.$undoStack.push(deltaSets),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(dontSelect){var deltaSets=this.$undoStack.pop(),undoSelectionRange=null;return deltaSets&&(undoSelectionRange=this.$doc.undoChanges(deltaSets,dontSelect),this.$redoStack.push(deltaSets),this.dirtyCounter--),undoSelectionRange},this.redo=function(dontSelect){var deltaSets=this.$redoStack.pop(),redoSelectionRange=null;return deltaSets&&(redoSelectionRange=this.$doc.redoChanges(this.$deserializeDeltas(deltaSets),dontSelect),this.$undoStack.push(deltaSets),this.dirtyCounter++),redoSelectionRange},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter},this.$serializeDeltas=function(deltaSets){return cloneDeltaSetsObj(deltaSets,$serializeDelta)},this.$deserializeDeltas=function(deltaSets){return cloneDeltaSetsObj(deltaSets,$deserializeDelta)}}).call(UndoManager.prototype),exports.UndoManager=UndoManager}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(acequire,exports,module){"use strict";var dom=acequire("../lib/dom"),oop=acequire("../lib/oop"),lang=acequire("../lib/lang"),EventEmitter=acequire("../lib/event_emitter").EventEmitter,Gutter=function(parentEl){this.element=dom.createElement("div"),this.element.className="ace_layer ace_gutter-layer",parentEl.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){oop.implement(this,EventEmitter),this.setSession=function(session){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=session,session&&session.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(row,className){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(row,className)},this.removeGutterDecoration=function(row,className){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(row,className)},this.setAnnotations=function(annotations){this.$annotations=[];for(var i=0;i<annotations.length;i++){var annotation=annotations[i],row=annotation.row,rowInfo=this.$annotations[row];rowInfo||(rowInfo=this.$annotations[row]={text:[]});var annoText=annotation.text;annoText=annoText?lang.escapeHTML(annoText):annotation.html||"",-1===rowInfo.text.indexOf(annoText)&&rowInfo.text.push(annoText);var type=annotation.type;"error"==type?rowInfo.className=" ace_error":"warning"==type&&" ace_error"!=rowInfo.className?rowInfo.className=" ace_warning":"info"!=type||rowInfo.className||(rowInfo.className=" ace_info")}},this.$updateAnnotations=function(delta){if(this.$annotations.length){var firstRow=delta.start.row,len=delta.end.row-firstRow;if(0===len);else if("remove"==delta.action)this.$annotations.splice(firstRow,len+1,null);else{var args=new Array(len+1);args.unshift(firstRow,1),this.$annotations.splice.apply(this.$annotations,args)}}},this.update=function(config){for(var session=this.session,firstRow=config.firstRow,lastRow=Math.min(config.lastRow+config.gutterOffset,session.getLength()-1),fold=session.getNextFoldLine(firstRow),foldStart=fold?fold.start.row:1/0,foldWidgets=this.$showFoldWidgets&&session.foldWidgets,breakpoints=session.$breakpoints,decorations=session.$decorations,firstLineNumber=session.$firstLineNumber,lastLineNumber=0,gutterRenderer=session.gutterRenderer||this.$renderer,cell=null,index=-1,row=firstRow;;){if(row>foldStart&&(row=fold.end.row+1,fold=session.getNextFoldLine(row,fold),foldStart=fold?fold.start.row:1/0),row>lastRow){for(;this.$cells.length>index+1;)cell=this.$cells.pop(),this.element.removeChild(cell.element);break}cell=this.$cells[++index],cell||(cell={element:null,textNode:null,foldWidget:null},cell.element=dom.createElement("div"),cell.textNode=document.createTextNode(""),cell.element.appendChild(cell.textNode),this.element.appendChild(cell.element),this.$cells[index]=cell);var className="ace_gutter-cell ";breakpoints[row]&&(className+=breakpoints[row]),decorations[row]&&(className+=decorations[row]),this.$annotations[row]&&(className+=this.$annotations[row].className),cell.element.className!=className&&(cell.element.className=className);var height=session.getRowLength(row)*config.lineHeight+"px";if(height!=cell.element.style.height&&(cell.element.style.height=height),foldWidgets){var c=foldWidgets[row];null==c&&(c=foldWidgets[row]=session.getFoldWidget(row))}if(c){cell.foldWidget||(cell.foldWidget=dom.createElement("span"),cell.element.appendChild(cell.foldWidget));var className="ace_fold-widget ace_"+c;"start"==c&&row==foldStart&&row<fold.end.row?className+=" ace_closed":className+=" ace_open",cell.foldWidget.className!=className&&(cell.foldWidget.className=className);var height=config.lineHeight+"px";cell.foldWidget.style.height!=height&&(cell.foldWidget.style.height=height)}else cell.foldWidget&&(cell.element.removeChild(cell.foldWidget),cell.foldWidget=null);var text=lastLineNumber=gutterRenderer?gutterRenderer.getText(session,row):row+firstLineNumber;text!=cell.textNode.data&&(cell.textNode.data=text),row++}this.element.style.height=config.minHeight+"px",(this.$fixedWidth||session.$useWrapMode)&&(lastLineNumber=session.getLength()+firstLineNumber);var gutterWidth=gutterRenderer?gutterRenderer.getWidth(session,lastLineNumber,config):lastLineNumber.toString().length*config.characterWidth,padding=this.$padding||this.$computePadding();(gutterWidth+=padding.left+padding.right)===this.gutterWidth||isNaN(gutterWidth)||(this.gutterWidth=gutterWidth,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",gutterWidth))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(show){this.$renderer=!show&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(show){show?dom.addCssClass(this.element,"ace_folding-enabled"):dom.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=show,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var style=dom.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(style.paddingLeft)+1||0,this.$padding.right=parseInt(style.paddingRight)||0,this.$padding},this.getRegion=function(point){var padding=this.$padding||this.$computePadding(),rect=this.element.getBoundingClientRect();return point.x<padding.left+rect.left?"markers":this.$showFoldWidgets&&point.x>rect.right-padding.right?"foldWidgets":void 0}}).call(Gutter.prototype),exports.Gutter=Gutter}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(acequire,exports,module){"use strict"
+;var Range=acequire("../range").Range,dom=acequire("../lib/dom"),Marker=function(parentEl){this.element=dom.createElement("div"),this.element.className="ace_layer ace_marker-layer",parentEl.appendChild(this.element)};(function(){function getBorderClass(tl,tr,br,bl){return(tl?1:0)|(tr?2:0)|(br?4:0)|(bl?8:0)}this.$padding=0,this.setPadding=function(padding){this.$padding=padding},this.setSession=function(session){this.session=session},this.setMarkers=function(markers){this.markers=markers},this.update=function(config){var config=config||this.config;if(config){this.config=config;var html=[];for(var key in this.markers){var marker=this.markers[key];if(marker.range){var range=marker.range.clipRows(config.firstRow,config.lastRow);if(!range.isEmpty())if(range=range.toScreenRange(this.session),marker.renderer){var top=this.$getTop(range.start.row,config),left=this.$padding+range.start.column*config.characterWidth;marker.renderer(html,range,left,top,config)}else"fullLine"==marker.type?this.drawFullLineMarker(html,range,marker.clazz,config):"screenLine"==marker.type?this.drawScreenLineMarker(html,range,marker.clazz,config):range.isMultiLine()?"text"==marker.type?this.drawTextMarker(html,range,marker.clazz,config):this.drawMultiLineMarker(html,range,marker.clazz,config):this.drawSingleLineMarker(html,range,marker.clazz+" ace_start ace_br15",config)}else marker.update(html,this,this.session,config)}this.element.innerHTML=html.join("")}},this.$getTop=function(row,layerConfig){return(row-layerConfig.firstRowScreen)*layerConfig.lineHeight},this.drawTextMarker=function(stringBuilder,range,clazz,layerConfig,extraStyle){for(var session=this.session,start=range.start.row,end=range.end.row,row=start,prev=0,curr=0,next=session.getScreenLastRowColumn(row),lineRange=new Range(row,range.start.column,row,curr);row<=end;row++)lineRange.start.row=lineRange.end.row=row,lineRange.start.column=row==start?range.start.column:session.getRowWrapIndent(row),lineRange.end.column=next,prev=curr,curr=next,next=row+1<end?session.getScreenLastRowColumn(row+1):row==end?0:range.end.column,this.drawSingleLineMarker(stringBuilder,lineRange,clazz+(row==start?" ace_start":"")+" ace_br"+getBorderClass(row==start||row==start+1&&range.start.column,prev<curr,curr>next,row==end),layerConfig,row==end?0:1,extraStyle)},this.drawMultiLineMarker=function(stringBuilder,range,clazz,config,extraStyle){var padding=this.$padding,height=config.lineHeight,top=this.$getTop(range.start.row,config),left=padding+range.start.column*config.characterWidth;extraStyle=extraStyle||"",stringBuilder.push("<div class='",clazz," ace_br1 ace_start' style='","height:",height,"px;","right:0;","top:",top,"px;","left:",left,"px;",extraStyle,"'></div>"),top=this.$getTop(range.end.row,config);var width=range.end.column*config.characterWidth;if(stringBuilder.push("<div class='",clazz," ace_br12' style='","height:",height,"px;","width:",width,"px;","top:",top,"px;","left:",padding,"px;",extraStyle,"'></div>"),!((height=(range.end.row-range.start.row-1)*config.lineHeight)<=0)){top=this.$getTop(range.start.row+1,config);var radiusClass=(range.start.column?1:0)|(range.end.column?0:8);stringBuilder.push("<div class='",clazz,radiusClass?" ace_br"+radiusClass:"","' style='","height:",height,"px;","right:0;","top:",top,"px;","left:",padding,"px;",extraStyle,"'></div>")}},this.drawSingleLineMarker=function(stringBuilder,range,clazz,config,extraLength,extraStyle){var height=config.lineHeight,width=(range.end.column+(extraLength||0)-range.start.column)*config.characterWidth,top=this.$getTop(range.start.row,config),left=this.$padding+range.start.column*config.characterWidth;stringBuilder.push("<div class='",clazz,"' style='","height:",height,"px;","width:",width,"px;","top:",top,"px;","left:",left,"px;",extraStyle||"","'></div>")},this.drawFullLineMarker=function(stringBuilder,range,clazz,config,extraStyle){var top=this.$getTop(range.start.row,config),height=config.lineHeight;range.start.row!=range.end.row&&(height+=this.$getTop(range.end.row,config)-top),stringBuilder.push("<div class='",clazz,"' style='","height:",height,"px;","top:",top,"px;","left:0;right:0;",extraStyle||"","'></div>")},this.drawScreenLineMarker=function(stringBuilder,range,clazz,config,extraStyle){var top=this.$getTop(range.start.row,config),height=config.lineHeight;stringBuilder.push("<div class='",clazz,"' style='","height:",height,"px;","top:",top,"px;","left:0;right:0;",extraStyle||"","'></div>")}}).call(Marker.prototype),exports.Marker=Marker}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(acequire,exports,module){"use strict";var oop=acequire("../lib/oop"),dom=acequire("../lib/dom"),lang=acequire("../lib/lang"),EventEmitter=(acequire("../lib/useragent"),acequire("../lib/event_emitter").EventEmitter),Text=function(parentEl){this.element=dom.createElement("div"),this.element.className="ace_layer ace_text-layer",parentEl.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){oop.implement(this,EventEmitter),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var EOL_CHAR="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=EOL_CHAR)return this.EOL_CHAR=EOL_CHAR,!0},this.setPadding=function(padding){this.$padding=padding,this.element.style.padding="0 "+padding+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(measure){this.$fontMetrics=measure,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(session){this.session=session,session&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(showInvisibles){return this.showInvisibles!=showInvisibles&&(this.showInvisibles=showInvisibles,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(display){return this.displayIndentGuides!=display&&(this.displayIndentGuides=display,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var tabSize=this.session.getTabSize();this.tabSize=tabSize;for(var tabStr=this.$tabStrings=[0],i=1;i<tabSize+1;i++)this.showInvisibles?tabStr.push("<span class='ace_invisible ace_invisible_tab'>"+lang.stringRepeat(this.TAB_CHAR,i)+"</span>"):tabStr.push(lang.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var className="ace_indent-guide",spaceClass="",tabClass="";if(this.showInvisibles){className+=" ace_invisible",spaceClass=" ace_invisible_space",tabClass=" ace_invisible_tab";var spaceContent=lang.stringRepeat(this.SPACE_CHAR,this.tabSize),tabContent=lang.stringRepeat(this.TAB_CHAR,this.tabSize)}else var spaceContent=lang.stringRepeat(" ",this.tabSize),tabContent=spaceContent;this.$tabStrings[" "]="<span class='"+className+spaceClass+"'>"+spaceContent+"</span>",this.$tabStrings["\t"]="<span class='"+className+tabClass+"'>"+tabContent+"</span>"}},this.updateLines=function(config,firstRow,lastRow){this.config.lastRow==config.lastRow&&this.config.firstRow==config.firstRow||this.scrollLines(config),this.config=config;for(var first=Math.max(firstRow,config.firstRow),last=Math.min(lastRow,config.lastRow),lineElements=this.element.childNodes,lineElementsIdx=0,row=config.firstRow;row<first;row++){var foldLine=this.session.getFoldLine(row);if(foldLine){if(foldLine.containsRow(first)){first=foldLine.start.row;break}row=foldLine.end.row}lineElementsIdx++}for(var row=first,foldLine=this.session.getNextFoldLine(row),foldStart=foldLine?foldLine.start.row:1/0;;){if(row>foldStart&&(row=foldLine.end.row+1,foldLine=this.session.getNextFoldLine(row,foldLine),foldStart=foldLine?foldLine.start.row:1/0),row>last)break;var lineElement=lineElements[lineElementsIdx++];if(lineElement){var html=[];this.$renderLine(html,row,!this.$useLineGroups(),row==foldStart&&foldLine),lineElement.style.height=config.lineHeight*this.session.getRowLength(row)+"px",lineElement.innerHTML=html.join("")}row++}},this.scrollLines=function(config){var oldConfig=this.config;if(this.config=config,!oldConfig||oldConfig.lastRow<config.firstRow)return this.update(config);if(config.lastRow<oldConfig.firstRow)return this.update(config);var el=this.element;if(oldConfig.firstRow<config.firstRow)for(var row=this.session.getFoldedRowCount(oldConfig.firstRow,config.firstRow-1);row>0;row--)el.removeChild(el.firstChild);if(oldConfig.lastRow>config.lastRow)for(var row=this.session.getFoldedRowCount(config.lastRow+1,oldConfig.lastRow);row>0;row--)el.removeChild(el.lastChild);if(config.firstRow<oldConfig.firstRow){var fragment=this.$renderLinesFragment(config,config.firstRow,oldConfig.firstRow-1);el.firstChild?el.insertBefore(fragment,el.firstChild):el.appendChild(fragment)}if(config.lastRow>oldConfig.lastRow){var fragment=this.$renderLinesFragment(config,oldConfig.lastRow+1,config.lastRow);el.appendChild(fragment)}},this.$renderLinesFragment=function(config,firstRow,lastRow){for(var fragment=this.element.ownerDocument.createDocumentFragment(),row=firstRow,foldLine=this.session.getNextFoldLine(row),foldStart=foldLine?foldLine.start.row:1/0;;){if(row>foldStart&&(row=foldLine.end.row+1,foldLine=this.session.getNextFoldLine(row,foldLine),foldStart=foldLine?foldLine.start.row:1/0),row>lastRow)break;var container=dom.createElement("div"),html=[];if(this.$renderLine(html,row,!1,row==foldStart&&foldLine),container.innerHTML=html.join(""),this.$useLineGroups())container.className="ace_line_group",fragment.appendChild(container),container.style.height=config.lineHeight*this.session.getRowLength(row)+"px";else for(;container.firstChild;)fragment.appendChild(container.firstChild);row++}return fragment},this.update=function(config){this.config=config;for(var html=[],firstRow=config.firstRow,lastRow=config.lastRow,row=firstRow,foldLine=this.session.getNextFoldLine(row),foldStart=foldLine?foldLine.start.row:1/0;;){if(row>foldStart&&(row=foldLine.end.row+1,foldLine=this.session.getNextFoldLine(row,foldLine),foldStart=foldLine?foldLine.start.row:1/0),row>lastRow)break;this.$useLineGroups()&&html.push("<div class='ace_line_group' style='height:",config.lineHeight*this.session.getRowLength(row),"px'>"),this.$renderLine(html,row,!1,row==foldStart&&foldLine),this.$useLineGroups()&&html.push("</div>"),row++}this.element.innerHTML=html.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(stringBuilder,screenColumn,token,value){var self=this,replaceFunc=function(c,a,b,tabIdx,idx4){if(a)return self.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+lang.stringRepeat(self.SPACE_CHAR,c.length)+"</span>":c;if("&"==c)return"&#38;";if("<"==c)return"&#60;";if(">"==c)return"&#62;";if("\t"==c){var tabSize=self.session.getScreenTabSize(screenColumn+tabIdx);return screenColumn+=tabSize-1,self.$tabStrings[tabSize]}if(" "==c){var classToUse=self.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",space=self.showInvisibles?self.SPACE_CHAR:"";return screenColumn+=1,"<span class='"+classToUse+"' style='width:"+2*self.config.characterWidth+"px'>"+space+"</span>"}return b?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+self.SPACE_CHAR+"</span>":(screenColumn+=1,"<span class='ace_cjk' style='width:"+2*self.config.characterWidth+"px'>"+c+"</span>")},output=value.replace(/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,replaceFunc);if(this.$textToken[token.type])stringBuilder.push(output);else{var classes="ace_"+token.type.replace(/\./g," ace_"),style="";"fold"==token.type&&(style=" style='width:"+token.value.length*this.config.characterWidth+"px;' "),stringBuilder.push("<span class='",classes,"'",style,">",output,"</span>")}return screenColumn+value.length},this.renderIndentGuide=function(stringBuilder,value,max){var cols=value.search(this.$indentGuideRe);return cols<=0||cols>=max?value:" "==value[0]?(cols-=cols%this.tabSize,stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "],cols/this.tabSize)),value.substr(cols)):"\t"==value[0]?(stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"],cols)),value.substr(cols)):value},this.$renderWrappedLine=function(stringBuilder,tokens,splits,onlyContents){for(var chars=0,split=0,splitChars=splits[0],screenColumn=0,i=0;i<tokens.length;i++){var token=tokens[i],value=token.value;if(0==i&&this.displayIndentGuides){if(chars=value.length,!(value=this.renderIndentGuide(stringBuilder,value,splitChars)))continue;chars-=value.length}if(chars+value.length<splitChars)screenColumn=this.$renderToken(stringBuilder,screenColumn,token,value),chars+=value.length;else{for(;chars+value.length>=splitChars;)screenColumn=this.$renderToken(stringBuilder,screenColumn,token,value.substring(0,splitChars-chars)),value=value.substring(splitChars-chars),chars=splitChars,onlyContents||stringBuilder.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),stringBuilder.push(lang.stringRepeat(" ",splits.indent)),split++,screenColumn=0,splitChars=splits[split]||Number.MAX_VALUE;0!=value.length&&(chars+=value.length,screenColumn=this.$renderToken(stringBuilder,screenColumn,token,value))}}},this.$renderSimpleLine=function(stringBuilder,tokens){var screenColumn=0,token=tokens[0],value=token.value;this.displayIndentGuides&&(value=this.renderIndentGuide(stringBuilder,value)),value&&(screenColumn=this.$renderToken(stringBuilder,screenColumn,token,value));for(var i=1;i<tokens.length;i++)token=tokens[i],value=token.value,screenColumn=this.$renderToken(stringBuilder,screenColumn,token,value)},this.$renderLine=function(stringBuilder,row,onlyContents,foldLine){if(foldLine||0==foldLine||(foldLine=this.session.getFoldLine(row)),foldLine)var tokens=this.$getFoldLineTokens(row,foldLine);else var tokens=this.session.getTokens(row);if(onlyContents||stringBuilder.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(row)),"px'>"),tokens.length){var splits=this.session.getRowSplitData(row);splits&&splits.length?this.$renderWrappedLine(stringBuilder,tokens,splits,onlyContents):this.$renderSimpleLine(stringBuilder,tokens)}this.showInvisibles&&(foldLine&&(row=foldLine.end.row),stringBuilder.push("<span class='ace_invisible ace_invisible_eol'>",row==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),onlyContents||stringBuilder.push("</div>")},this.$getFoldLineTokens=function(row,foldLine){function addTokens(tokens,from,to){for(var idx=0,col=0;col+tokens[idx].value.length<from;)if(col+=tokens[idx].value.length,++idx==tokens.length)return;if(col!=from){var value=tokens[idx].value.substring(from-col);value.length>to-from&&(value=value.substring(0,to-from)),renderTokens.push({type:tokens[idx].type,value:value}),col=from+value.length,idx+=1}for(;col<to&&idx<tokens.length;){var value=tokens[idx].value;value.length+col>to?renderTokens.push({type:tokens[idx].type,value:value.substring(0,to-col)}):renderTokens.push(tokens[idx]),col+=value.length,idx+=1}}var session=this.session,renderTokens=[],tokens=session.getTokens(row);return foldLine.walk(function(placeholder,row,column,lastColumn,isNewRow){null!=placeholder?renderTokens.push({type:"fold",value:placeholder}):(isNewRow&&(tokens=session.getTokens(row)),tokens.length&&addTokens(tokens,lastColumn,column))},foldLine.end.row,this.session.getLine(foldLine.end.row).length),renderTokens},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(Text.prototype),exports.Text=Text}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(acequire,exports,module){"use strict";var isIE8,dom=acequire("../lib/dom"),Cursor=function(parentEl){this.element=dom.createElement("div"),this.element.className="ace_layer ace_cursor-layer",parentEl.appendChild(this.element),void 0===isIE8&&(isIE8=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),dom.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(isIE8?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(val){for(var cursors=this.cursors,i=cursors.length;i--;)cursors[i].style.visibility=val?"":"hidden"},this.$updateOpacity=function(val){for(var cursors=this.cursors,i=cursors.length;i--;)cursors[i].style.opacity=val?"":"0"},this.$padding=0,this.setPadding=function(padding){this.$padding=padding},this.setSession=function(session){this.session=session},this.setBlinking=function(blinking){blinking!=this.isBlinking&&(this.isBlinking=blinking,this.restartTimer())},this.setBlinkInterval=function(blinkInterval){blinkInterval!=this.blinkInterval&&(this.blinkInterval=blinkInterval,this.restartTimer())},this.setSmoothBlinking=function(smoothBlinking){smoothBlinking==this.smoothBlinking||isIE8||(this.smoothBlinking=smoothBlinking,dom.setCssClass(this.element,"ace_smooth-blinking",smoothBlinking),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var el=dom.createElement("div");return el.className="ace_cursor",this.element.appendChild(el),this.cursors.push(el),el},this.removeCursor=function(){if(this.cursors.length>1){var el=this.cursors.pop();return el.parentNode.removeChild(el),el}},this.hideCursor=function(){this.isVisible=!1,dom.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,dom.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var update=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&dom.removeCssClass(this.element,"ace_smooth-blinking"),update(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){dom.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var blink=function(){this.timeoutId=setTimeout(function(){update(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){update(!0),blink()},this.blinkInterval),blink()}},this.getPixelPosition=function(position,onScreen){if(!this.config||!this.session)return{left:0,top:0};position||(position=this.session.selection.getCursor());var pos=this.session.documentToScreenPosition(position);return{left:this.$padding+pos.column*this.config.characterWidth,top:(pos.row-(onScreen?this.config.firstRowScreen:0))*this.config.lineHeight}},this.update=function(config){this.config=config;var selections=this.session.$selectionMarkers,i=0,cursorIndex=0;void 0!==selections&&0!==selections.length||(selections=[{cursor:null}]);for(var i=0,n=selections.length;i<n;i++){var pixelPos=this.getPixelPosition(selections[i].cursor,!0);if(!((pixelPos.top>config.height+config.offset||pixelPos.top<0)&&i>1)){var style=(this.cursors[cursorIndex++]||this.addCursor()).style;this.drawCursor?this.drawCursor(style,pixelPos,config,selections[i],this.session):(style.left=pixelPos.left+"px",style.top=pixelPos.top+"px",style.width=config.characterWidth+"px",style.height=config.lineHeight+"px")}}for(;this.cursors.length>cursorIndex;)this.removeCursor();var overwrite=this.session.getOverwrite();this.$setOverwrite(overwrite),this.$pixelPos=pixelPos,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(overwrite){overwrite!=this.overwrite&&(this.overwrite=overwrite,overwrite?dom.addCssClass(this.element,"ace_overwrite-cursors"):dom.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(Cursor.prototype),exports.Cursor=Cursor}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(acequire,exports,module){"use strict";var oop=acequire("./lib/oop"),dom=acequire("./lib/dom"),event=acequire("./lib/event"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,ScrollBar=function(parent){this.element=dom.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=dom.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),parent.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,event.addListener(this.element,"scroll",this.onScroll.bind(this)),event.addListener(this.element,"mousedown",event.preventDefault)};(function(){oop.implement(this,EventEmitter),this.setVisible=function(isVisible){this.element.style.display=isVisible?"":"none",this.isVisible=isVisible}}).call(ScrollBar.prototype);var VScrollBar=function(parent,renderer){ScrollBar.call(this,parent),this.scrollTop=0,renderer.$scrollbarWidth=this.width=dom.scrollbarWidth(parent.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};oop.inherits(VScrollBar,ScrollBar),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(height){this.element.style.height=height+"px"},this.setInnerHeight=function(height){this.inner.style.height=height+"px"},this.setScrollHeight=function(height){this.inner.style.height=height+"px"},this.setScrollTop=function(scrollTop){this.scrollTop!=scrollTop&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=scrollTop)}}.call(VScrollBar.prototype);var HScrollBar=function(parent,renderer){ScrollBar.call(this,parent),this.scrollLeft=0,this.height=renderer.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};oop.inherits(HScrollBar,ScrollBar),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(width){this.element.style.width=width+"px"},this.setInnerWidth=function(width){this.inner.style.width=width+"px"},this.setScrollWidth=function(width){this.inner.style.width=width+"px"},this.setScrollLeft=function(scrollLeft){this.scrollLeft!=scrollLeft&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=scrollLeft)}}.call(HScrollBar.prototype),exports.ScrollBar=VScrollBar,exports.ScrollBarV=VScrollBar,exports.ScrollBarH=HScrollBar,exports.VScrollBar=VScrollBar,exports.HScrollBar=HScrollBar}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(acequire,exports,module){"use strict";var event=acequire("./lib/event"),RenderLoop=function(onRender,win){this.onRender=onRender,this.pending=!1,this.changes=0,this.window=win||window};(function(){this.schedule=function(change){if(this.changes=this.changes|change,!this.pending&&this.changes){this.pending=!0;var _self=this;event.nextFrame(function(){_self.pending=!1;for(var changes;changes=_self.changes;)_self.changes=0,_self.onRender(changes)},this.window)}}}).call(RenderLoop.prototype),exports.RenderLoop=RenderLoop}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(acequire,exports,module){var oop=acequire("../lib/oop"),dom=acequire("../lib/dom"),lang=acequire("../lib/lang"),useragent=acequire("../lib/useragent"),EventEmitter=acequire("../lib/event_emitter").EventEmitter,CHAR_COUNT=0,FontMetrics=exports.FontMetrics=function(parentEl){this.el=dom.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=dom.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=dom.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),parentEl.appendChild(this.el),CHAR_COUNT||this.$testFractionalRect(),this.$measureNode.innerHTML=lang.stringRepeat("X",CHAR_COUNT),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){oop.implement(this,EventEmitter),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var el=dom.createElement("div");this.$setMeasureNodeStyles(el.style),el.style.width="0.2px",document.documentElement.appendChild(el);var w=el.getBoundingClientRect().width;CHAR_COUNT=w>0&&w<1?50:100,el.parentNode.removeChild(el)},this.$setMeasureNodeStyles=function(style,isRoot){style.width=style.height="auto",style.left=style.top="0px",style.visibility="hidden",style.position="absolute",style.whiteSpace="pre",useragent.isIE<8?style["font-family"]="inherit":style.font="inherit",style.overflow=isRoot?"hidden":"visible"},this.checkForSizeChanges=function(){var size=this.$measureSizes();if(size&&(this.$characterSize.width!==size.width||this.$characterSize.height!==size.height)){this.$measureNode.style.fontWeight="bold";var boldSize=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=size,this.charSizes=Object.create(null),this.allowBoldFonts=boldSize&&boldSize.width===size.width&&boldSize.height===size.height,this._emit("changeCharacterSize",{data:size})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var self=this;return this.$pollSizeChangesTimer=setInterval(function(){self.checkForSizeChanges()},500)},this.setPolling=function(val){val?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(50===CHAR_COUNT){var rect=null;try{rect=this.$measureNode.getBoundingClientRect()}catch(e){rect={width:0,height:0}}var size={height:rect.height,width:rect.width/CHAR_COUNT}}else var size={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/CHAR_COUNT};return 0===size.width||0===size.height?null:size},this.$measureCharWidth=function(ch){return this.$main.innerHTML=lang.stringRepeat(ch,CHAR_COUNT),this.$main.getBoundingClientRect().width/CHAR_COUNT},this.getCharacterWidth=function(ch){var w=this.charSizes[ch];return void 0===w&&(w=this.charSizes[ch]=this.$measureCharWidth(ch)/this.$characterSize.width),w},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(FontMetrics.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(acequire,exports,module){"use strict";var oop=acequire("./lib/oop"),dom=acequire("./lib/dom"),config=acequire("./config"),useragent=acequire("./lib/useragent"),GutterLayer=acequire("./layer/gutter").Gutter,MarkerLayer=acequire("./layer/marker").Marker,TextLayer=acequire("./layer/text").Text,CursorLayer=acequire("./layer/cursor").Cursor,HScrollBar=acequire("./scrollbar").HScrollBar,VScrollBar=acequire("./scrollbar").VScrollBar,RenderLoop=acequire("./renderloop").RenderLoop,FontMetrics=acequire("./layer/font_metrics").FontMetrics,EventEmitter=acequire("./lib/event_emitter").EventEmitter
+;dom.importCssString('.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}',"ace_editor.css");var VirtualRenderer=function(container,theme){var _self=this;this.container=container||dom.createElement("div"),this.$keepTextAreaAtCursor=!useragent.isOldIE,dom.addCssClass(this.container,"ace_editor"),this.setTheme(theme),this.$gutter=dom.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=dom.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=dom.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new GutterLayer(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new MarkerLayer(this.content);var textLayer=this.$textLayer=new TextLayer(this.content);this.canvas=textLayer.element,this.$markerFront=new MarkerLayer(this.content),this.$cursorLayer=new CursorLayer(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new VScrollBar(this.container,this),this.scrollBarH=new HScrollBar(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){_self.$scrollAnimation||_self.session.setScrollTop(e.data-_self.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){_self.$scrollAnimation||_self.session.setScrollLeft(e.data-_self.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new FontMetrics(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){_self.updateCharacterSize(),_self.onResize(!0,_self.gutterWidth,_self.$size.width,_self.$size.height),_self._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new RenderLoop(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),config.resetOptions(this),config._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,oop.implement(this,EventEmitter),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(session){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=session,session&&this.scrollMargin.top&&session.getScrollTop()<=0&&session.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(session),this.$markerBack.setSession(session),this.$markerFront.setSession(session),this.$gutterLayer.setSession(session),this.$textLayer.setSession(session),session&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(firstRow,lastRow,force){if(void 0===lastRow&&(lastRow=1/0),this.$changedLines?(this.$changedLines.firstRow>firstRow&&(this.$changedLines.firstRow=firstRow),this.$changedLines.lastRow<lastRow&&(this.$changedLines.lastRow=lastRow)):this.$changedLines={firstRow:firstRow,lastRow:lastRow},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!force)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(force){force?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(force,gutterWidth,width,height){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=force?1:0;var el=this.container;height||(height=el.clientHeight||el.scrollHeight),width||(width=el.clientWidth||el.scrollWidth);var changes=this.$updateCachedSize(force,gutterWidth,width,height);if(!this.$size.scrollerHeight||!width&&!height)return this.resizing=0;force&&(this.$gutterLayer.$padding=null),force?this.$renderChanges(changes|this.$changes,!0):this.$loop.schedule(changes|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(force,gutterWidth,width,height){height-=this.$extraHeight||0;var changes=0,size=this.$size,oldSize={width:size.width,height:size.height,scrollerHeight:size.scrollerHeight,scrollerWidth:size.scrollerWidth};return height&&(force||size.height!=height)&&(size.height=height,changes|=this.CHANGE_SIZE,size.scrollerHeight=size.height,this.$horizScroll&&(size.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",changes|=this.CHANGE_SCROLL),width&&(force||size.width!=width)&&(changes|=this.CHANGE_SIZE,size.width=width,null==gutterWidth&&(gutterWidth=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=gutterWidth,this.scrollBarH.element.style.left=this.scroller.style.left=gutterWidth+"px",size.scrollerWidth=Math.max(0,width-gutterWidth-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||force)&&(changes|=this.CHANGE_FULL)),size.$dirty=!width||!height,changes&&this._signal("resize",oldSize),changes},this.onGutterResize=function(){var gutterWidth=this.$showGutter?this.$gutter.offsetWidth:0;gutterWidth!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,gutterWidth,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var availableWidth=this.$size.scrollerWidth-2*this.$padding,limit=Math.floor(availableWidth/this.characterWidth);return this.session.adjustWrapLimit(limit,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(shouldAnimate){this.setOption("animatedScroll",shouldAnimate)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(showInvisibles){this.setOption("showInvisibles",showInvisibles)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(display){this.setOption("displayIndentGuides",display)},this.setShowPrintMargin=function(showPrintMargin){this.setOption("showPrintMargin",showPrintMargin)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(showPrintMargin){this.setOption("printMarginColumn",showPrintMargin)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(show){return this.setOption("showGutter",show)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(show){this.setOption("fadeFoldWidgets",show)},this.setHighlightGutterLine=function(shouldHighlight){this.setOption("highlightGutterLine",shouldHighlight)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var pos=this.$cursorLayer.$pixelPos,height=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var cursor=this.session.selection.getCursor();cursor.column=0,pos=this.$cursorLayer.getPixelPosition(cursor,!0),height*=this.session.getRowLength(cursor.row)}this.$gutterLineHighlight.style.top=pos.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=height+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var containerEl=dom.createElement("div");containerEl.className="ace_layer ace_print-margin-layer",this.$printMarginEl=dom.createElement("div"),this.$printMarginEl.className="ace_print-margin",containerEl.appendChild(this.$printMarginEl),this.content.insertBefore(containerEl,this.content.firstChild)}var style=this.$printMarginEl.style;style.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",style.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var config=this.layerConfig,posTop=this.$cursorLayer.$pixelPos.top,posLeft=this.$cursorLayer.$pixelPos.left;posTop-=config.offset;var style=this.textarea.style,h=this.lineHeight;if(posTop<0||posTop>config.height-h)return void(style.top=style.left="0");var w=this.characterWidth;if(this.$composition){var val=this.textarea.value.replace(/^\x01+/,"");w*=this.session.$getStringScreenWidth(val)[0]+2,h+=2}posLeft-=this.scrollLeft,posLeft>this.$size.scrollerWidth-w&&(posLeft=this.$size.scrollerWidth-w),posLeft+=this.gutterWidth,style.height=h+"px",style.width=w+"px",style.left=Math.min(posLeft,this.$size.scrollerWidth-w)+"px",style.top=Math.min(posTop,this.$size.height-h)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var config=this.layerConfig,lastRow=config.lastRow;return this.session.documentToScreenRow(lastRow,0)*config.lineHeight-this.session.getScrollTop()>config.height-config.lineHeight?lastRow-1:lastRow},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(padding){this.$padding=padding,this.$textLayer.setPadding(padding),this.$cursorLayer.setPadding(padding),this.$markerFront.setPadding(padding),this.$markerBack.setPadding(padding),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(top,bottom,left,right){var sm=this.scrollMargin;sm.top=0|top,sm.bottom=0|bottom,sm.right=0|right,sm.left=0|left,sm.v=sm.top+sm.bottom,sm.h=sm.left+sm.right,sm.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-sm.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(alwaysVisible){this.setOption("hScrollBarAlwaysVisible",alwaysVisible)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(alwaysVisible){this.setOption("vScrollBarAlwaysVisible",alwaysVisible)},this.$updateScrollBarV=function(){var scrollHeight=this.layerConfig.maxHeight,scrollerHeight=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(scrollHeight-=(scrollerHeight-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>scrollHeight-scrollerHeight&&(scrollHeight=this.scrollTop+scrollerHeight,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(scrollHeight+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(changes,force){if(this.$changes&&(changes|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!changes&&!force)return void(this.$changes|=changes);if(this.$size.$dirty)return this.$changes|=changes,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var config=this.layerConfig;if(changes&this.CHANGE_FULL||changes&this.CHANGE_SIZE||changes&this.CHANGE_TEXT||changes&this.CHANGE_LINES||changes&this.CHANGE_SCROLL||changes&this.CHANGE_H_SCROLL){if(changes|=this.$computeLayerConfig(),config.firstRow!=this.layerConfig.firstRow&&config.firstRowScreen==this.layerConfig.firstRowScreen){var st=this.scrollTop+(config.firstRow-this.layerConfig.firstRow)*this.lineHeight;st>0&&(this.scrollTop=st,changes|=this.CHANGE_SCROLL,changes|=this.$computeLayerConfig())}config=this.layerConfig,this.$updateScrollBarV(),changes&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-config.offset+"px",this.content.style.marginTop=-config.offset+"px",this.content.style.width=config.width+2*this.$padding+"px",this.content.style.height=config.minHeight+"px"}return changes&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),changes&this.CHANGE_FULL?(this.$textLayer.update(config),this.$showGutter&&this.$gutterLayer.update(config),this.$markerBack.update(config),this.$markerFront.update(config),this.$cursorLayer.update(config),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):changes&this.CHANGE_SCROLL?(changes&this.CHANGE_TEXT||changes&this.CHANGE_LINES?this.$textLayer.update(config):this.$textLayer.scrollLines(config),this.$showGutter&&this.$gutterLayer.update(config),this.$markerBack.update(config),this.$markerFront.update(config),this.$cursorLayer.update(config),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(changes&this.CHANGE_TEXT?(this.$textLayer.update(config),this.$showGutter&&this.$gutterLayer.update(config)):changes&this.CHANGE_LINES?(this.$updateLines()||changes&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(config):(changes&this.CHANGE_TEXT||changes&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(config),changes&this.CHANGE_CURSOR&&(this.$cursorLayer.update(config),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),changes&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(config),changes&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(config),void this._signal("afterRender"))},this.$autosize=function(){var height=this.session.getScreenLength()*this.lineHeight,maxHeight=this.$maxLines*this.lineHeight,desiredHeight=Math.max((this.$minLines||1)*this.lineHeight,Math.min(maxHeight,height))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(desiredHeight+=this.scrollBarH.getHeight());var vScroll=height>maxHeight;if(desiredHeight!=this.desiredHeight||this.$size.height!=this.desiredHeight||vScroll!=this.$vScroll){vScroll!=this.$vScroll&&(this.$vScroll=vScroll,this.scrollBarV.setVisible(vScroll));var w=this.container.clientWidth;this.container.style.height=desiredHeight+"px",this.$updateCachedSize(!0,this.$gutterWidth,w,desiredHeight),this.desiredHeight=desiredHeight,this._signal("autosize")}},this.$computeLayerConfig=function(){var session=this.session,size=this.$size,hideScrollbars=size.height<=2*this.lineHeight,screenLines=this.session.getScreenLength(),maxHeight=screenLines*this.lineHeight,longestLine=this.$getLongestLine(),horizScroll=!hideScrollbars&&(this.$hScrollBarAlwaysVisible||size.scrollerWidth-longestLine-2*this.$padding<0),hScrollChanged=this.$horizScroll!==horizScroll;hScrollChanged&&(this.$horizScroll=horizScroll,this.scrollBarH.setVisible(horizScroll));var vScrollBefore=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var offset=this.scrollTop%this.lineHeight,minHeight=size.scrollerHeight+this.lineHeight,scrollPastEnd=!this.$maxLines&&this.$scrollPastEnd?(size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;maxHeight+=scrollPastEnd;var sm=this.scrollMargin;this.session.setScrollTop(Math.max(-sm.top,Math.min(this.scrollTop,maxHeight-size.scrollerHeight+sm.bottom))),this.session.setScrollLeft(Math.max(-sm.left,Math.min(this.scrollLeft,longestLine+2*this.$padding-size.scrollerWidth+sm.right)));var vScroll=!hideScrollbars&&(this.$vScrollBarAlwaysVisible||size.scrollerHeight-maxHeight+scrollPastEnd<0||this.scrollTop>sm.top),vScrollChanged=vScrollBefore!==vScroll;vScrollChanged&&(this.$vScroll=vScroll,this.scrollBarV.setVisible(vScroll));var firstRowScreen,firstRowHeight,lineCount=Math.ceil(minHeight/this.lineHeight)-1,firstRow=Math.max(0,Math.round((this.scrollTop-offset)/this.lineHeight)),lastRow=firstRow+lineCount,lineHeight=this.lineHeight;firstRow=session.screenToDocumentRow(firstRow,0);var foldLine=session.getFoldLine(firstRow);foldLine&&(firstRow=foldLine.start.row),firstRowScreen=session.documentToScreenRow(firstRow,0),firstRowHeight=session.getRowLength(firstRow)*lineHeight,lastRow=Math.min(session.screenToDocumentRow(lastRow,0),session.getLength()-1),minHeight=size.scrollerHeight+session.getRowLength(lastRow)*lineHeight+firstRowHeight,offset=this.scrollTop-firstRowScreen*lineHeight;var changes=0;return this.layerConfig.width!=longestLine&&(changes=this.CHANGE_H_SCROLL),(hScrollChanged||vScrollChanged)&&(changes=this.$updateCachedSize(!0,this.gutterWidth,size.width,size.height),this._signal("scrollbarVisibilityChanged"),vScrollChanged&&(longestLine=this.$getLongestLine())),this.layerConfig={width:longestLine,padding:this.$padding,firstRow:firstRow,firstRowScreen:firstRowScreen,lastRow:lastRow,lineHeight:lineHeight,characterWidth:this.characterWidth,minHeight:minHeight,maxHeight:maxHeight,offset:offset,gutterOffset:Math.max(0,Math.ceil((offset+size.height-size.scrollerHeight)/lineHeight)),height:this.$size.scrollerHeight},changes},this.$updateLines=function(){var firstRow=this.$changedLines.firstRow,lastRow=this.$changedLines.lastRow;this.$changedLines=null;var layerConfig=this.layerConfig;if(!(firstRow>layerConfig.lastRow+1||lastRow<layerConfig.firstRow))return lastRow===1/0?(this.$showGutter&&this.$gutterLayer.update(layerConfig),void this.$textLayer.update(layerConfig)):(this.$textLayer.updateLines(layerConfig,firstRow,lastRow),!0)},this.$getLongestLine=function(){var charCount=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(charCount+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(charCount*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),
+this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(row,className){this.$gutterLayer.addGutterDecoration(row,className)},this.removeGutterDecoration=function(row,className){this.$gutterLayer.removeGutterDecoration(row,className)},this.updateBreakpoints=function(rows){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(annotations){this.$gutterLayer.setAnnotations(annotations),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(anchor,lead,offset){this.scrollCursorIntoView(anchor,offset),this.scrollCursorIntoView(lead,offset)},this.scrollCursorIntoView=function(cursor,offset,$viewMargin){if(0!==this.$size.scrollerHeight){var pos=this.$cursorLayer.getPixelPosition(cursor),left=pos.left,top=pos.top,topMargin=$viewMargin&&$viewMargin.top||0,bottomMargin=$viewMargin&&$viewMargin.bottom||0,scrollTop=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;scrollTop+topMargin>top?(offset&&scrollTop+topMargin>top+this.lineHeight&&(top-=offset*this.$size.scrollerHeight),0===top&&(top=-this.scrollMargin.top),this.session.setScrollTop(top)):scrollTop+this.$size.scrollerHeight-bottomMargin<top+this.lineHeight&&(offset&&scrollTop+this.$size.scrollerHeight-bottomMargin<top-this.lineHeight&&(top+=offset*this.$size.scrollerHeight),this.session.setScrollTop(top+this.lineHeight-this.$size.scrollerHeight));var scrollLeft=this.scrollLeft;scrollLeft>left?(left<this.$padding+2*this.layerConfig.characterWidth&&(left=-this.scrollMargin.left),this.session.setScrollLeft(left)):scrollLeft+this.$size.scrollerWidth<left+this.characterWidth?this.session.setScrollLeft(Math.round(left+this.characterWidth-this.$size.scrollerWidth)):scrollLeft<=this.$padding&&left-scrollLeft<this.characterWidth&&this.session.setScrollLeft(0)}},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(row){this.session.setScrollTop(row*this.lineHeight)},this.alignCursor=function(cursor,alignment){"number"==typeof cursor&&(cursor={row:cursor,column:0});var pos=this.$cursorLayer.getPixelPosition(cursor),h=this.$size.scrollerHeight-this.lineHeight,offset=pos.top-h*(alignment||0);return this.session.setScrollTop(offset),offset},this.STEPS=8,this.$calcSteps=function(fromValue,toValue){var i=0,l=this.STEPS,steps=[];for(i=0;i<l;++i)steps.push(function(t,x_min,dx){return dx*(Math.pow(t-1,3)+1)+x_min}(i/this.STEPS,fromValue,toValue-fromValue));return steps},this.scrollToLine=function(line,center,animate,callback){var pos=this.$cursorLayer.getPixelPosition({row:line,column:0}),offset=pos.top;center&&(offset-=this.$size.scrollerHeight/2);var initialScroll=this.scrollTop;this.session.setScrollTop(offset),!1!==animate&&this.animateScrolling(initialScroll,callback)},this.animateScrolling=function(fromValue,callback){var toValue=this.scrollTop;if(this.$animatedScroll){var _self=this;if(fromValue!=toValue){if(this.$scrollAnimation){var oldSteps=this.$scrollAnimation.steps;if(oldSteps.length&&(fromValue=oldSteps[0])==toValue)return}var steps=_self.$calcSteps(fromValue,toValue);this.$scrollAnimation={from:fromValue,to:toValue,steps:steps},clearInterval(this.$timer),_self.session.setScrollTop(steps.shift()),_self.session.$scrollTop=toValue,this.$timer=setInterval(function(){steps.length?(_self.session.setScrollTop(steps.shift()),_self.session.$scrollTop=toValue):null!=toValue?(_self.session.$scrollTop=-1,_self.session.setScrollTop(toValue),toValue=null):(_self.$timer=clearInterval(_self.$timer),_self.$scrollAnimation=null,callback&&callback())},10)}}},this.scrollToY=function(scrollTop){this.scrollTop!==scrollTop&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=scrollTop)},this.scrollToX=function(scrollLeft){this.scrollLeft!==scrollLeft&&(this.scrollLeft=scrollLeft),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(x,y){this.session.setScrollTop(y),this.session.setScrollLeft(y)},this.scrollBy=function(deltaX,deltaY){deltaY&&this.session.setScrollTop(this.session.getScrollTop()+deltaY),deltaX&&this.session.setScrollLeft(this.session.getScrollLeft()+deltaX)},this.isScrollableBy=function(deltaX,deltaY){return deltaY<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(deltaY>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(deltaX<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(deltaX>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(x,y){var canvasPos=this.scroller.getBoundingClientRect(),offset=(x+this.scrollLeft-canvasPos.left-this.$padding)/this.characterWidth,row=Math.floor((y+this.scrollTop-canvasPos.top)/this.lineHeight),col=Math.round(offset);return{row:row,column:col,side:offset-col>0?1:-1}},this.screenToTextCoordinates=function(x,y){var canvasPos=this.scroller.getBoundingClientRect(),col=Math.round((x+this.scrollLeft-canvasPos.left-this.$padding)/this.characterWidth),row=(y+this.scrollTop-canvasPos.top)/this.lineHeight;return this.session.screenToDocumentPosition(row,Math.max(col,0))},this.textToScreenCoordinates=function(row,column){var canvasPos=this.scroller.getBoundingClientRect(),pos=this.session.documentToScreenPosition(row,column),x=this.$padding+Math.round(pos.column*this.characterWidth),y=pos.row*this.lineHeight;return{pageX:canvasPos.left+x-this.scrollLeft,pageY:canvasPos.top+y-this.scrollTop}},this.visualizeFocus=function(){dom.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){dom.removeCssClass(this.container,"ace_focus")},this.showComposition=function(position){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,dom.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(text){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(dom.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(theme,cb){function afterLoad(module){if(_self.$themeId!=theme)return cb&&cb();if(module.cssClass){dom.importCssString(module.cssText,module.cssClass,_self.container.ownerDocument),_self.theme&&dom.removeCssClass(_self.container,_self.theme.cssClass);var padding="padding"in module?module.padding:"padding"in(_self.theme||{})?4:_self.$padding;_self.$padding&&padding!=_self.$padding&&_self.setPadding(padding),_self.$theme=module.cssClass,_self.theme=module,dom.addCssClass(_self.container,module.cssClass),dom.setCssClass(_self.container,"ace_dark",module.isDark),_self.$size&&(_self.$size.width=0,_self.$updateSizeAsync()),_self._dispatchEvent("themeLoaded",{theme:module}),cb&&cb()}}var _self=this;if(this.$themeId=theme,_self._dispatchEvent("themeChange",{theme:theme}),theme&&"string"!=typeof theme)afterLoad(theme);else{var moduleName=theme||this.$options.theme.initialValue;config.loadModule(["theme",moduleName],afterLoad)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(style,include){dom.setCssClass(this.container,style,!1!==include)},this.unsetStyle=function(style){dom.removeCssClass(this.container,style)},this.setCursorStyle=function(style){this.scroller.style.cursor!=style&&(this.scroller.style.cursor=style)},this.setMouseCursor=function(cursorStyle){this.scroller.style.cursor=cursorStyle},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(VirtualRenderer.prototype),config.defineOptions(VirtualRenderer.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(value){this.$textLayer.setShowInvisibles(value)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(val){"number"==typeof val&&(this.$printMarginColumn=val),this.$showPrintMargin=!!val,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(show){this.$gutter.style.display=show?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(show){dom.setCssClass(this.$gutter,"ace_fade-fold-widgets",show)},initialValue:!1},showFoldWidgets:{set:function(show){this.$gutterLayer.setShowFoldWidgets(show)},initialValue:!0},showLineNumbers:{set:function(show){this.$gutterLayer.setShowLineNumbers(show),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(show){this.$textLayer.setDisplayIndentGuides(show)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(shouldHighlight){if(!this.$gutterLineHighlight)return this.$gutterLineHighlight=dom.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight);this.$gutterLineHighlight.style.display=shouldHighlight?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(val){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(val){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(size){"number"==typeof size&&(size+="px"),this.container.style.fontSize=size,this.updateFontSize()},initialValue:12},fontFamily:{set:function(name){this.container.style.fontFamily=name,this.updateFontSize()}},maxLines:{set:function(val){this.updateFull()}},minLines:{set:function(val){this.updateFull()}},scrollPastEnd:{set:function(val){val=+val||0,this.$scrollPastEnd!=val&&(this.$scrollPastEnd=val,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(val){this.$gutterLayer.$fixedWidth=!!val,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(val){this.setTheme(val)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),exports.VirtualRenderer=VirtualRenderer}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(acequire,exports,module){"use strict";var oop=acequire("../lib/oop"),net=acequire("../lib/net"),EventEmitter=acequire("../lib/event_emitter").EventEmitter,config=acequire("../config"),WorkerClient=function(topLevelNamespaces,mod,classname,workerUrl){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),acequire.nameToUrl&&!acequire.toUrl&&(acequire.toUrl=acequire.nameToUrl),config.get("packaged")||!acequire.toUrl)workerUrl=workerUrl||config.moduleUrl(mod.id,"worker");else{var normalizePath=this.$normalizePath;workerUrl=workerUrl||normalizePath(acequire.toUrl("ace/worker/worker.js",null,"_"));var tlns={};topLevelNamespaces.forEach(function(ns){tlns[ns]=normalizePath(acequire.toUrl(ns,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{var workerSrc=mod.src,Blob=require("w3c-blob"),blob=new Blob([workerSrc],{type:"application/javascript"}),blobUrl=(window.URL||window.webkitURL).createObjectURL(blob);this.$worker=new Worker(blobUrl)}catch(e){if(!(e instanceof window.DOMException))throw e;var blob=this.$workerBlob(workerUrl),URL=window.URL||window.webkitURL,blobURL=URL.createObjectURL(blob);this.$worker=new Worker(blobURL),URL.revokeObjectURL(blobURL)}this.$worker.postMessage({init:!0,tlns:tlns,module:mod.id,classname:classname}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){oop.implement(this,EventEmitter),this.onMessage=function(e){var msg=e.data;switch(msg.type){case"event":this._signal(msg.name,{data:msg.data});break;case"call":var callback=this.callbacks[msg.id];callback&&(callback(msg.data),delete this.callbacks[msg.id]);break;case"error":this.reportError(msg.data);break;case"log":window.console&&console.log&&console.log.apply(console,msg.data)}},this.reportError=function(err){window.console&&console.error&&console.error(err)},this.$normalizePath=function(path){return net.qualifyURL(path)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(cmd,args){this.$worker.postMessage({command:cmd,args:args})},this.call=function(cmd,args,callback){if(callback){var id=this.callbackId++;this.callbacks[id]=callback,args.push(id)}this.send(cmd,args)},this.emit=function(event,data){try{this.$worker.postMessage({event:event,data:{data:data.data}})}catch(ex){console.error(ex.stack)}},this.attachToDocument=function(doc){this.$doc&&this.terminate(),this.$doc=doc,this.call("setValue",[doc.getValue()]),doc.on("change",this.changeListener)},this.changeListener=function(delta){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==delta.action?this.deltaQueue.push(delta.start,delta.lines):this.deltaQueue.push(delta.start,delta.end)},this.$sendDeltaQueue=function(){var q=this.deltaQueue;q&&(this.deltaQueue=null,q.length>50&&q.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:q}))},this.$workerBlob=function(workerUrl){var script="importScripts('"+net.qualifyURL(workerUrl)+"');";try{return new Blob([script],{type:"application/javascript"})}catch(e){var BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,blobBuilder=new BlobBuilder;return blobBuilder.append(script),blobBuilder.getBlob("application/javascript")}}}).call(WorkerClient.prototype);var UIWorkerClient=function(topLevelNamespaces,mod,classname){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var main=null,emitSync=!1,sender=Object.create(EventEmitter),_self=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){_self.messageBuffer.push(e),main&&(emitSync?setTimeout(processNext):processNext())},this.setEmitSync=function(val){emitSync=val};var processNext=function(){var msg=_self.messageBuffer.shift();msg.command?main[msg.command].apply(main,msg.args):msg.event&&sender._signal(msg.event,msg.data)};sender.postMessage=function(msg){_self.onMessage({data:msg})},sender.callback=function(data,callbackId){this.postMessage({type:"call",id:callbackId,data:data})},sender.emit=function(name,data){this.postMessage({type:"event",name:name,data:data})},config.loadModule(["worker",mod],function(Main){for(main=new Main[classname](sender);_self.messageBuffer.length;)processNext()})};UIWorkerClient.prototype=WorkerClient.prototype,exports.UIWorkerClient=UIWorkerClient,exports.WorkerClient=WorkerClient}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(acequire,exports,module){"use strict";var Range=acequire("./range").Range,EventEmitter=acequire("./lib/event_emitter").EventEmitter,oop=acequire("./lib/oop"),PlaceHolder=function(session,length,pos,others,mainClass,othersClass){var _self=this;this.length=length,this.session=session,this.doc=session.getDocument(),this.mainClass=mainClass,this.othersClass=othersClass,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=others,this.$onCursorChange=function(){setTimeout(function(){_self.onCursorChange()})},this.$pos=pos;var undoStack=session.getUndoManager().$undoStack||session.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=undoStack.length,this.setup(),session.selection.on("changeCursor",this.$onCursorChange)};(function(){oop.implement(this,EventEmitter),this.setup=function(){var _self=this,doc=this.doc,session=this.session;this.selectionBefore=session.selection.toJSON(),session.selection.inMultiSelectMode&&session.selection.toSingleRange(),this.pos=doc.createAnchor(this.$pos.row,this.$pos.column);var pos=this.pos;pos.$insertRight=!0,pos.detach(),pos.markerId=session.addMarker(new Range(pos.row,pos.column,pos.row,pos.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(other){var anchor=doc.createAnchor(other.row,other.column);anchor.$insertRight=!0,anchor.detach(),_self.others.push(anchor)}),session.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var session=this.session,_self=this;this.othersActive=!0,this.others.forEach(function(anchor){anchor.markerId=session.addMarker(new Range(anchor.row,anchor.column,anchor.row,anchor.column+_self.length),_self.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var i=0;i<this.others.length;i++)this.session.removeMarker(this.others[i].markerId)}},this.onUpdate=function(delta){if(this.$updating)return this.updateAnchors(delta);var range=delta;if(range.start.row===range.end.row&&range.start.row===this.pos.row){this.$updating=!0;var lengthDiff="insert"===delta.action?range.end.column-range.start.column:range.start.column-range.end.column,inMainRange=range.start.column>=this.pos.column&&range.start.column<=this.pos.column+this.length+1,distanceFromStart=range.start.column-this.pos.column;if(this.updateAnchors(delta),inMainRange&&(this.length+=lengthDiff),inMainRange&&!this.session.$fromUndo)if("insert"===delta.action)for(var i=this.others.length-1;i>=0;i--){var otherPos=this.others[i],newPos={row:otherPos.row,column:otherPos.column+distanceFromStart};this.doc.insertMergedLines(newPos,delta.lines)}else if("remove"===delta.action)for(var i=this.others.length-1;i>=0;i--){var otherPos=this.others[i],newPos={row:otherPos.row,column:otherPos.column+distanceFromStart};this.doc.remove(new Range(newPos.row,newPos.column,newPos.row,newPos.column-lengthDiff))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(delta){this.pos.onChange(delta);for(var i=this.others.length;i--;)this.others[i].onChange(delta);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var _self=this,session=this.session,updateMarker=function(pos,className){session.removeMarker(pos.markerId),pos.markerId=session.addMarker(new Range(pos.row,pos.column,pos.row,pos.column+_self.length),className,null,!1)};updateMarker(this.pos,this.mainClass);for(var i=this.others.length;i--;)updateMarker(this.others[i],this.othersClass)}},this.onCursorChange=function(event){if(!this.$updating&&this.session){var pos=this.session.selection.getCursor();pos.row===this.pos.row&&pos.column>=this.pos.column&&pos.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",event)):(this.hideOtherMarkers(),this._emit("cursorLeave",event))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var undoManager=this.session.getUndoManager(),undosRequired=(undoManager.$undoStack||undoManager.$undostack).length-this.$undoStackDepth,i=0;i<undosRequired;i++)undoManager.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(PlaceHolder.prototype),exports.PlaceHolder=PlaceHolder}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(acequire,exports,module){function isSamePoint(p1,p2){return p1.row==p2.row&&p1.column==p2.column}function onMouseDown(e){var ev=e.domEvent,alt=ev.altKey,shift=ev.shiftKey,ctrl=ev.ctrlKey,accel=e.getAccelKey(),button=e.getButton();if(ctrl&&useragent.isMac&&(button=ev.button),e.editor.inMultiSelectMode&&2==button)return void e.editor.textInput.onContextMenu(e.domEvent);if(!ctrl&&!alt&&!accel)return void(0===button&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode());if(0===button){var selectionMode,editor=e.editor,selection=editor.selection,isMultiSelect=editor.inMultiSelectMode,pos=e.getDocumentPosition(),cursor=selection.getCursor(),inSelection=e.inSelection()||selection.isEmpty()&&isSamePoint(pos,cursor),mouseX=e.x,mouseY=e.y,onMouseSelection=function(e){mouseX=e.clientX,mouseY=e.clientY},session=editor.session,screenAnchor=editor.renderer.pixelToScreenCoordinates(mouseX,mouseY),screenCursor=screenAnchor;if(editor.$mouseHandler.$enableJumpToDef)ctrl&&alt||accel&&alt?selectionMode=shift?"block":"add":alt&&editor.$blockSelectEnabled&&(selectionMode="block");else if(accel&&!alt){if(selectionMode="add",!isMultiSelect&&shift)return}else alt&&editor.$blockSelectEnabled&&(selectionMode="block");if(selectionMode&&useragent.isMac&&ev.ctrlKey&&editor.$mouseHandler.cancelContextMenu(),"add"==selectionMode){if(!isMultiSelect&&inSelection)return;if(!isMultiSelect){var range=selection.toOrientedRange();editor.addSelectionMarker(range)}var oldRange=selection.rangeList.rangeAtPoint(pos);editor.$blockScrolling++,editor.inVirtualSelectionMode=!0,shift&&(oldRange=null,range=selection.ranges[0]||range,editor.removeSelectionMarker(range)),editor.once("mouseup",function(){var tmpSel=selection.toOrientedRange();oldRange&&tmpSel.isEmpty()&&isSamePoint(oldRange.cursor,tmpSel.cursor)?selection.substractPoint(tmpSel.cursor):(shift?selection.substractPoint(range.cursor):range&&(editor.removeSelectionMarker(range),selection.addRange(range)),selection.addRange(tmpSel)),editor.$blockScrolling--,editor.inVirtualSelectionMode=!1})}else if("block"==selectionMode){e.stop(),editor.inVirtualSelectionMode=!0;var initialRange,rectSel=[],blockSelect=function(){var newCursor=editor.renderer.pixelToScreenCoordinates(mouseX,mouseY),cursor=session.screenToDocumentPosition(newCursor.row,newCursor.column);isSamePoint(screenCursor,newCursor)&&isSamePoint(cursor,selection.lead)||(screenCursor=newCursor,editor.$blockScrolling++,editor.selection.moveToPosition(cursor),editor.renderer.scrollCursorIntoView(),editor.removeSelectionMarkers(rectSel),rectSel=selection.rectangularRangeBlock(screenCursor,screenAnchor),editor.$mouseHandler.$clickSelection&&1==rectSel.length&&rectSel[0].isEmpty()&&(rectSel[0]=editor.$mouseHandler.$clickSelection.clone()),rectSel.forEach(editor.addSelectionMarker,editor),editor.updateSelectionMarkers(),editor.$blockScrolling--)};editor.$blockScrolling++,isMultiSelect&&!accel?selection.toSingleRange():!isMultiSelect&&accel&&(initialRange=selection.toOrientedRange(),editor.addSelectionMarker(initialRange)),shift?screenAnchor=session.documentToScreenPosition(selection.lead):selection.moveToPosition(pos),editor.$blockScrolling--,screenCursor={row:-1,column:-1};var onMouseSelectionEnd=function(e){clearInterval(timerId),editor.removeSelectionMarkers(rectSel),rectSel.length||(rectSel=[selection.toOrientedRange()]),editor.$blockScrolling++,initialRange&&(editor.removeSelectionMarker(initialRange),selection.toSingleRange(initialRange));for(var i=0;i<rectSel.length;i++)selection.addRange(rectSel[i]);editor.inVirtualSelectionMode=!1,editor.$mouseHandler.$clickSelection=null,editor.$blockScrolling--},onSelectionInterval=blockSelect;event.capture(editor.container,onMouseSelection,onMouseSelectionEnd);var timerId=setInterval(function(){onSelectionInterval()},20);return e.preventDefault()}}}var event=acequire("../lib/event"),useragent=acequire("../lib/useragent");exports.onMouseDown=onMouseDown}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(acequire,exports,module){exports.defaultCommands=[{name:"addCursorAbove",exec:function(editor){editor.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(editor){editor.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(editor){editor.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(editor){editor.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(editor){editor.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(editor){editor.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(editor){editor.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(editor){editor.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(editor){editor.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(editor){editor.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(editor){editor.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],exports.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(editor){editor.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(editor){return editor&&editor.inMultiSelectMode}}];var HashHandler=acequire("../keyboard/hash_handler").HashHandler;exports.keyboardHandler=new HashHandler(exports.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(acequire,exports,module){function find(session,needle,dir){return search.$options.wrap=!0,search.$options.needle=needle,search.$options.backwards=-1==dir,search.find(session)}function isSamePoint(p1,p2){return p1.row==p2.row&&p1.column==p2.column}function MultiSelect(editor){editor.$multiselectOnSessionChange||(editor.$onAddRange=editor.$onAddRange.bind(editor),editor.$onRemoveRange=editor.$onRemoveRange.bind(editor),editor.$onMultiSelect=editor.$onMultiSelect.bind(editor),editor.$onSingleSelect=editor.$onSingleSelect.bind(editor),editor.$multiselectOnSessionChange=exports.onSessionChange.bind(editor),editor.$checkMultiselectChange=editor.$checkMultiselectChange.bind(editor),editor.$multiselectOnSessionChange(editor),editor.on("changeSession",editor.$multiselectOnSessionChange),editor.on("mousedown",onMouseDown),editor.commands.addCommands(commands.defaultCommands),addAltCursorListeners(editor))}function addAltCursorListeners(editor){function reset(e){altCursor&&(editor.renderer.setMouseCursor(""),altCursor=!1)}var el=editor.textInput.getElement(),altCursor=!1;event.addListener(el,"keydown",function(e){var altDown=18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey);editor.$blockSelectEnabled&&altDown?altCursor||(editor.renderer.setMouseCursor("crosshair"),altCursor=!0):altCursor&&reset()}),event.addListener(el,"keyup",reset),event.addListener(el,"blur",reset)}var RangeList=acequire("./range_list").RangeList,Range=acequire("./range").Range,Selection=acequire("./selection").Selection,onMouseDown=acequire("./mouse/multi_select_handler").onMouseDown,event=acequire("./lib/event"),lang=acequire("./lib/lang"),commands=acequire("./commands/multi_select_commands");exports.commands=commands.defaultCommands.concat(commands.multiSelectCommands);var Search=acequire("./search").Search,search=new Search,EditSession=acequire("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(EditSession.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(range,$blockChangeEvents){if(range){if(!this.inMultiSelectMode&&0===this.rangeCount){var oldRange=this.toOrientedRange();if(this.rangeList.add(oldRange),this.rangeList.add(range),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),$blockChangeEvents||this.fromOrientedRange(range);this.rangeList.removeAll(),this.rangeList.add(oldRange),this.$onAddRange(oldRange)}range.cursor||(range.cursor=range.end);var removed=this.rangeList.add(range);return this.$onAddRange(range),removed.length&&this.$onRemoveRange(removed),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),$blockChangeEvents||this.fromOrientedRange(range)}},this.toSingleRange=function(range){range=range||this.ranges[0];var removed=this.rangeList.removeAll();removed.length&&this.$onRemoveRange(removed),range&&this.fromOrientedRange(range)},this.substractPoint=function(pos){var removed=this.rangeList.substractPoint(pos);if(removed)return this.$onRemoveRange(removed),removed[0]},this.mergeOverlappingRanges=function(){var removed=this.rangeList.merge();removed.length?this.$onRemoveRange(removed):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(range){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(range),this._signal("addRange",{range:range})},this.$onRemoveRange=function(removed){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var lastRange=this.rangeList.ranges.pop();removed.push(lastRange),this.rangeCount=0}for(var i=removed.length;i--;){var index=this.ranges.indexOf(removed[i]);this.ranges.splice(index,1)}this._signal("removeRange",{ranges:removed}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(lastRange=lastRange||this.ranges[0])&&!lastRange.isEqual(this.getRange())&&this.fromOrientedRange(lastRange)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new RangeList,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var ranges=this.rangeList.ranges,lastRange=ranges[ranges.length-1],range=Range.fromPoints(ranges[0].start,lastRange.end);this.toSingleRange(),this.setSelectionRange(range,lastRange.cursor==lastRange.start)}else{var range=this.getRange(),isBackwards=this.isBackwards(),startRow=range.start.row,endRow=range.end.row;if(startRow==endRow){if(isBackwards)var start=range.end,end=range.start;else var start=range.start,end=range.end;return this.addRange(Range.fromPoints(end,end)),void this.addRange(Range.fromPoints(start,start))}var rectSel=[],r=this.getLineRange(startRow,!0);r.start.column=range.start.column,rectSel.push(r);for(var i=startRow+1;i<endRow;i++)rectSel.push(this.getLineRange(i,!0));r=this.getLineRange(endRow,!0),r.end.column=range.end.column,
+rectSel.push(r),rectSel.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var ranges=this.rangeList.ranges,lastRange=ranges[ranges.length-1],range=Range.fromPoints(ranges[0].start,lastRange.end);this.toSingleRange(),this.setSelectionRange(range,lastRange.cursor==lastRange.start)}else{var cursor=this.session.documentToScreenPosition(this.selectionLead),anchor=this.session.documentToScreenPosition(this.selectionAnchor);this.rectangularRangeBlock(cursor,anchor).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(screenCursor,screenAnchor,includeEmptyLines){var rectSel=[],xBackwards=screenCursor.column<screenAnchor.column;if(xBackwards)var startColumn=screenCursor.column,endColumn=screenAnchor.column;else var startColumn=screenAnchor.column,endColumn=screenCursor.column;var yBackwards=screenCursor.row<screenAnchor.row;if(yBackwards)var startRow=screenCursor.row,endRow=screenAnchor.row;else var startRow=screenAnchor.row,endRow=screenCursor.row;startColumn<0&&(startColumn=0),startRow<0&&(startRow=0),startRow==endRow&&(includeEmptyLines=!0);for(var row=startRow;row<=endRow;row++){var range=Range.fromPoints(this.session.screenToDocumentPosition(row,startColumn),this.session.screenToDocumentPosition(row,endColumn));if(range.isEmpty()){if(docEnd&&isSamePoint(range.end,docEnd))break;var docEnd=range.end}range.cursor=xBackwards?range.start:range.end,rectSel.push(range)}if(yBackwards&&rectSel.reverse(),!includeEmptyLines){for(var end=rectSel.length-1;rectSel[end].isEmpty()&&end>0;)end--;if(end>0)for(var start=0;rectSel[start].isEmpty();)start++;for(var i=end;i>=start;i--)rectSel[i].isEmpty()&&rectSel.splice(i,1)}return rectSel}}.call(Selection.prototype);var Editor=acequire("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(orientedRange){orientedRange.cursor||(orientedRange.cursor=orientedRange.end);var style=this.getSelectionStyle();return orientedRange.marker=this.session.addMarker(orientedRange,"ace_selection",style),this.session.$selectionMarkers.push(orientedRange),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,orientedRange},this.removeSelectionMarker=function(range){if(range.marker){this.session.removeMarker(range.marker);var index=this.session.$selectionMarkers.indexOf(range);-1!=index&&this.session.$selectionMarkers.splice(index,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(ranges){for(var markerList=this.session.$selectionMarkers,i=ranges.length;i--;){var range=ranges[i];if(range.marker){this.session.removeMarker(range.marker);var index=markerList.indexOf(range);-1!=index&&markerList.splice(index,1)}}this.session.selectionMarkerCount=markerList.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(commands.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(commands.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var command=e.command,editor=e.editor;if(editor.multiSelect){if(command.multiSelectAction)"forEach"==command.multiSelectAction?result=editor.forEachSelection(command,e.args):"forEachLine"==command.multiSelectAction?result=editor.forEachSelection(command,e.args,!0):"single"==command.multiSelectAction?(editor.exitMultiSelectMode(),result=command.exec(editor,e.args||{})):result=command.multiSelectAction(editor,e.args||{});else{var result=command.exec(editor,e.args||{});editor.multiSelect.addRange(editor.multiSelect.toOrientedRange()),editor.multiSelect.mergeOverlappingRanges()}return result}},this.forEachSelection=function(cmd,args,options){if(!this.inVirtualSelectionMode){var result,keepOrder=options&&options.keepOrder,$byLines=1==options||options&&options.$byLines,session=this.session,selection=this.selection,rangeList=selection.rangeList,ranges=(keepOrder?selection:rangeList).ranges;if(!ranges.length)return cmd.exec?cmd.exec(this,args||{}):cmd(this,args||{});var reg=selection._eventRegistry;selection._eventRegistry={};var tmpSel=new Selection(session);this.inVirtualSelectionMode=!0;for(var i=ranges.length;i--;){if($byLines)for(;i>0&&ranges[i].start.row==ranges[i-1].end.row;)i--;tmpSel.fromOrientedRange(ranges[i]),tmpSel.index=i,this.selection=session.selection=tmpSel;var cmdResult=cmd.exec?cmd.exec(this,args||{}):cmd(this,args||{});result||void 0===cmdResult||(result=cmdResult),tmpSel.toOrientedRange(ranges[i])}tmpSel.detach(),this.selection=session.selection=selection,this.inVirtualSelectionMode=!1,selection._eventRegistry=reg,selection.mergeOverlappingRanges();var anim=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),anim&&anim.from==anim.to&&this.renderer.animateScrolling(anim.from),result}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var text="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var ranges=this.multiSelect.rangeList.ranges,buf=[],i=0;i<ranges.length;i++)buf.push(this.session.getTextRange(ranges[i]));var nl=this.session.getDocument().getNewLineCharacter();text=buf.join(nl),text.length==(buf.length-1)*nl.length&&(text="")}else this.selection.isEmpty()||(text=this.session.getTextRange(this.getSelectionRange()));return text},this.$checkMultiselectChange=function(e,anchor){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var range=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&anchor==this.multiSelect.anchor)return;var pos=anchor==this.multiSelect.anchor?range.cursor==range.start?range.end:range.start:range.cursor;pos.row==anchor.row&&this.session.$clipPositionToDocument(pos.row,pos.column).column==anchor.column||this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(needle,options,additive){if(options=options||{},options.needle=needle||options.needle,void 0==options.needle){var range=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();options.needle=this.session.getTextRange(range)}this.$search.set(options);var ranges=this.$search.findAll(this.session);if(!ranges.length)return 0;this.$blockScrolling+=1;var selection=this.multiSelect;additive||selection.toSingleRange(ranges[0]);for(var i=ranges.length;i--;)selection.addRange(ranges[i],!0);return range&&selection.rangeList.rangeAtPoint(range.start)&&selection.addRange(range,!0),this.$blockScrolling-=1,ranges.length},this.selectMoreLines=function(dir,skip){var range=this.selection.toOrientedRange(),isBackwards=range.cursor==range.end,screenLead=this.session.documentToScreenPosition(range.cursor);this.selection.$desiredColumn&&(screenLead.column=this.selection.$desiredColumn);var lead=this.session.screenToDocumentPosition(screenLead.row+dir,screenLead.column);if(range.isEmpty())var anchor=lead;else var screenAnchor=this.session.documentToScreenPosition(isBackwards?range.end:range.start),anchor=this.session.screenToDocumentPosition(screenAnchor.row+dir,screenAnchor.column);if(isBackwards){var newRange=Range.fromPoints(lead,anchor);newRange.cursor=newRange.start}else{var newRange=Range.fromPoints(anchor,lead);newRange.cursor=newRange.end}if(newRange.desiredColumn=screenLead.column,this.selection.inMultiSelectMode){if(skip)var toRemove=range.cursor}else this.selection.addRange(range);this.selection.addRange(newRange),toRemove&&this.selection.substractPoint(toRemove)},this.transposeSelections=function(dir){for(var session=this.session,sel=session.multiSelect,all=sel.ranges,i=all.length;i--;){var range=all[i];if(range.isEmpty()){var tmp=session.getWordRange(range.start.row,range.start.column);range.start.row=tmp.start.row,range.start.column=tmp.start.column,range.end.row=tmp.end.row,range.end.column=tmp.end.column}}sel.mergeOverlappingRanges();for(var words=[],i=all.length;i--;){var range=all[i];words.unshift(session.getTextRange(range))}dir<0?words.unshift(words.pop()):words.push(words.shift());for(var i=all.length;i--;){var range=all[i],tmp=range.clone();session.replace(range,words[i]),range.start.row=tmp.start.row,range.start.column=tmp.start.column}},this.selectMore=function(dir,skip,stopAtFirst){var session=this.session,sel=session.multiSelect,range=sel.toOrientedRange();if(!range.isEmpty()||(range=session.getWordRange(range.start.row,range.start.column),range.cursor=-1==dir?range.start:range.end,this.multiSelect.addRange(range),!stopAtFirst)){var needle=session.getTextRange(range),newRange=find(session,needle,dir);newRange&&(newRange.cursor=-1==dir?newRange.start:newRange.end,this.$blockScrolling+=1,this.session.unfold(newRange),this.multiSelect.addRange(newRange),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),skip&&this.multiSelect.substractPoint(range.cursor)}},this.alignCursors=function(){var session=this.session,sel=session.multiSelect,ranges=sel.ranges,row=-1,sameRowRanges=ranges.filter(function(r){if(r.cursor.row==row)return!0;row=r.cursor.row});if(ranges.length&&sameRowRanges.length!=ranges.length-1){sameRowRanges.forEach(function(r){sel.substractPoint(r.cursor)});var maxCol=0,minSpace=1/0,spaceOffsets=ranges.map(function(r){var p=r.cursor,line=session.getLine(p.row),spaceOffset=line.substr(p.column).search(/\S/g);return-1==spaceOffset&&(spaceOffset=0),p.column>maxCol&&(maxCol=p.column),spaceOffset<minSpace&&(minSpace=spaceOffset),spaceOffset});ranges.forEach(function(r,i){var p=r.cursor,l=maxCol-p.column,d=spaceOffsets[i]-minSpace;l>d?session.insert(p,lang.stringRepeat(" ",l-d)):session.remove(new Range(p.row,p.column,p.row,p.column-l+d)),r.start.column=r.end.column=maxCol,r.start.row=r.end.row=p.row,r.cursor=r.end}),sel.fromOrientedRange(ranges[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var range=this.selection.getRange(),fr=range.start.row,lr=range.end.row,guessRange=fr==lr;if(guessRange){var line,max=this.session.getLength();do{line=this.session.getLine(lr)}while(/[=:]/.test(line)&&++lr<max);do{line=this.session.getLine(fr)}while(/[=:]/.test(line)&&--fr>0);fr<0&&(fr=0),lr>=max&&(lr=max-1)}var lines=this.session.removeFullLines(fr,lr);lines=this.$reAlignText(lines,guessRange),this.session.insert({row:fr,column:0},lines.join("\n")+"\n"),guessRange||(range.start.column=0,range.end.column=lines[lines.length-1].length),this.selection.setRange(range)}},this.$reAlignText=function(lines,forceLeft){function spaces(n){return lang.stringRepeat(" ",n)}function alignLeft(m){return m[2]?spaces(startW)+m[2]+spaces(textW-m[2].length+endW)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}function alignRight(m){return m[2]?spaces(startW+textW-m[2].length)+m[2]+spaces(endW," ")+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}function unAlign(m){return m[2]?spaces(startW)+m[2]+spaces(endW)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}var startW,textW,endW,isLeftAligned=!0,isRightAligned=!0;return lines.map(function(line){var m=line.match(/(\s*)(.*?)(\s*)([=:].*)/);return m?null==startW?(startW=m[1].length,textW=m[2].length,endW=m[3].length,m):(startW+textW+endW!=m[1].length+m[2].length+m[3].length&&(isRightAligned=!1),startW!=m[1].length&&(isLeftAligned=!1),startW>m[1].length&&(startW=m[1].length),textW<m[2].length&&(textW=m[2].length),endW>m[3].length&&(endW=m[3].length),m):[line]}).map(forceLeft?alignLeft:isLeftAligned?isRightAligned?alignRight:alignLeft:unAlign)}}).call(Editor.prototype),exports.onSessionChange=function(e){var session=e.session;session&&!session.multiSelect&&(session.$selectionMarkers=[],session.selection.$initRangeList(),session.multiSelect=session.selection),this.multiSelect=session&&session.multiSelect;var oldSession=e.oldSession;oldSession&&(oldSession.multiSelect.off("addRange",this.$onAddRange),oldSession.multiSelect.off("removeRange",this.$onRemoveRange),oldSession.multiSelect.off("multiSelect",this.$onMultiSelect),oldSession.multiSelect.off("singleSelect",this.$onSingleSelect),oldSession.multiSelect.lead.off("change",this.$checkMultiselectChange),oldSession.multiSelect.anchor.off("change",this.$checkMultiselectChange)),session&&(session.multiSelect.on("addRange",this.$onAddRange),session.multiSelect.on("removeRange",this.$onRemoveRange),session.multiSelect.on("multiSelect",this.$onMultiSelect),session.multiSelect.on("singleSelect",this.$onSingleSelect),session.multiSelect.lead.on("change",this.$checkMultiselectChange),session.multiSelect.anchor.on("change",this.$checkMultiselectChange)),session&&this.inMultiSelectMode!=session.selection.inMultiSelectMode&&(session.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},exports.MultiSelect=MultiSelect,acequire("./config").defineOptions(Editor.prototype,"editor",{enableMultiselect:{set:function(val){MultiSelect(this),val?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",onMouseDown)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",onMouseDown))},value:!0},enableBlockSelect:{set:function(val){this.$blockSelectEnabled=val},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(acequire,exports,module){"use strict";var Range=acequire("../../range").Range,FoldMode=exports.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(session,foldStyle,row){var line=session.getLine(row);return this.foldingStartMarker.test(line)?"start":"markbeginend"==foldStyle&&this.foldingStopMarker&&this.foldingStopMarker.test(line)?"end":""},this.getFoldWidgetRange=function(session,foldStyle,row){return null},this.indentationBlock=function(session,row,column){var line=session.getLine(row),startLevel=line.search(/\S/);if(-1!=startLevel){for(var startColumn=column||line.length,maxRow=session.getLength(),startRow=row,endRow=row;++row<maxRow;){var level=session.getLine(row).search(/\S/);if(-1!=level){if(level<=startLevel)break;endRow=row}}if(endRow>startRow){var endColumn=session.getLine(endRow).length;return new Range(startRow,startColumn,endRow,endColumn)}}},this.openingBracketBlock=function(session,bracket,row,column,typeRe){var start={row:row,column:column+1},end=session.$findClosingBracket(bracket,start,typeRe);if(end){var fw=session.foldWidgets[end.row];return null==fw&&(fw=session.getFoldWidget(end.row)),"start"==fw&&end.row>start.row&&(end.row--,end.column=session.getLine(end.row).length),Range.fromPoints(start,end)}},this.closingBracketBlock=function(session,bracket,row,column,typeRe){var end={row:row,column:column},start=session.$findOpeningBracket(bracket,end);if(start)return start.column++,end.column--,Range.fromPoints(start,end)}}).call(FoldMode.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(acequire,exports,module){"use strict";exports.isDark=!1,exports.cssClass="ace-tm",exports.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',acequire("../lib/dom").importCssString(exports.cssText,exports.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(acequire,exports,module){"use strict";function LineWidgets(session){this.session=session,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var dom=(acequire("./lib/oop"),acequire("./lib/dom"));acequire("./range").Range;(function(){this.getRowLength=function(row){var h;return h=this.lineWidgets?this.lineWidgets[row]&&this.lineWidgets[row].rowCount||0:0,this.$useWrapMode&&this.$wrapData[row]?this.$wrapData[row].length+1+h:1+h},this.$getWidgetScreenLength=function(){var screenRows=0;return this.lineWidgets.forEach(function(w){w&&w.rowCount&&!w.hidden&&(screenRows+=w.rowCount)}),screenRows},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(editor){editor&&editor.widgetManager&&editor.widgetManager!=this&&editor.widgetManager.detach(),this.editor!=editor&&(this.detach(),this.editor=editor,editor&&(editor.widgetManager=this,editor.renderer.on("beforeRender",this.measureWidgets),editor.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var editor=this.editor;if(editor){this.editor=null,editor.widgetManager=null,editor.renderer.off("beforeRender",this.measureWidgets),editor.renderer.off("afterRender",this.renderWidgets);var lineWidgets=this.session.lineWidgets;lineWidgets&&lineWidgets.forEach(function(w){w&&w.el&&w.el.parentNode&&(w._inDocument=!1,w.el.parentNode.removeChild(w.el))})}},this.updateOnFold=function(e,session){var lineWidgets=session.lineWidgets;if(lineWidgets&&e.action){for(var fold=e.data,start=fold.start.row,end=fold.end.row,hide="add"==e.action,i=start+1;i<end;i++)lineWidgets[i]&&(lineWidgets[i].hidden=hide);lineWidgets[end]&&(hide?lineWidgets[start]?lineWidgets[end].hidden=hide:lineWidgets[start]=lineWidgets[end]:(lineWidgets[start]==lineWidgets[end]&&(lineWidgets[start]=void 0),lineWidgets[end].hidden=hide))}},this.updateOnChange=function(delta){var lineWidgets=this.session.lineWidgets;if(lineWidgets){var startRow=delta.start.row,len=delta.end.row-startRow;if(0===len);else if("remove"==delta.action){var removed=lineWidgets.splice(startRow+1,len);removed.forEach(function(w){w&&this.removeLineWidget(w)},this),this.$updateRows()}else{var args=new Array(len);args.unshift(startRow,0),lineWidgets.splice.apply(lineWidgets,args),this.$updateRows()}}},this.$updateRows=function(){var lineWidgets=this.session.lineWidgets;if(lineWidgets){var noWidgets=!0;lineWidgets.forEach(function(w,i){if(w)for(noWidgets=!1,w.row=i;w.$oldWidget;)w.$oldWidget.row=i,w=w.$oldWidget}),noWidgets&&(this.session.lineWidgets=null)}},this.addLineWidget=function(w){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var old=this.session.lineWidgets[w.row];old&&(w.$oldWidget=old,old.el&&old.el.parentNode&&(old.el.parentNode.removeChild(old.el),old._inDocument=!1)),this.session.lineWidgets[w.row]=w,w.session=this.session;var renderer=this.editor.renderer;w.html&&!w.el&&(w.el=dom.createElement("div"),w.el.innerHTML=w.html),w.el&&(dom.addCssClass(w.el,"ace_lineWidgetContainer"),w.el.style.position="absolute",w.el.style.zIndex=5,renderer.container.appendChild(w.el),w._inDocument=!0),w.coverGutter||(w.el.style.zIndex=3),w.pixelHeight||(w.pixelHeight=w.el.offsetHeight),null==w.rowCount&&(w.rowCount=w.pixelHeight/renderer.layerConfig.lineHeight);var fold=this.session.getFoldAt(w.row,0);if(w.$fold=fold,fold){var lineWidgets=this.session.lineWidgets;w.row!=fold.end.row||lineWidgets[fold.start.row]?w.hidden=!0:lineWidgets[fold.start.row]=w}return this.session._emit("changeFold",{data:{start:{row:w.row}}}),this.$updateRows(),this.renderWidgets(null,renderer),this.onWidgetChanged(w),w},this.removeLineWidget=function(w){if(w._inDocument=!1,w.session=null,w.el&&w.el.parentNode&&w.el.parentNode.removeChild(w.el),w.editor&&w.editor.destroy)try{w.editor.destroy()}catch(e){}if(this.session.lineWidgets){var w1=this.session.lineWidgets[w.row];if(w1==w)this.session.lineWidgets[w.row]=w.$oldWidget,w.$oldWidget&&this.onWidgetChanged(w.$oldWidget);else for(;w1;){if(w1.$oldWidget==w){w1.$oldWidget=w.$oldWidget;break}w1=w1.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:w.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(row){for(var lineWidgets=this.session.lineWidgets,w=lineWidgets&&lineWidgets[row],list=[];w;)list.push(w),w=w.$oldWidget;return list},this.onWidgetChanged=function(w){this.session._changedWidgets.push(w),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,renderer){var changedWidgets=this.session._changedWidgets,config=renderer.layerConfig;if(changedWidgets&&changedWidgets.length){for(var min=1/0,i=0;i<changedWidgets.length;i++){var w=changedWidgets[i];if(w&&w.el&&w.session==this.session){if(!w._inDocument){if(this.session.lineWidgets[w.row]!=w)continue;w._inDocument=!0,renderer.container.appendChild(w.el)}w.h=w.el.offsetHeight,w.fixedWidth||(w.w=w.el.offsetWidth,w.screenWidth=Math.ceil(w.w/config.characterWidth));var rowCount=w.h/config.lineHeight;w.coverLine&&(rowCount-=this.session.getRowLineCount(w.row))<0&&(rowCount=0),w.rowCount!=rowCount&&(w.rowCount=rowCount,w.row<min&&(min=w.row))}}min!=1/0&&(this.session._emit("changeFold",{data:{start:{row:min}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,renderer){var config=renderer.layerConfig,lineWidgets=this.session.lineWidgets;if(lineWidgets){for(var first=Math.min(this.firstRow,config.firstRow),last=Math.max(this.lastRow,config.lastRow,lineWidgets.length);first>0&&!lineWidgets[first];)first--;this.firstRow=config.firstRow,this.lastRow=config.lastRow,renderer.$cursorLayer.config=config;for(var i=first;i<=last;i++){var w=lineWidgets[i];if(w&&w.el)if(w.hidden)w.el.style.top=-100-(w.pixelHeight||0)+"px";else{w._inDocument||(w._inDocument=!0,renderer.container.appendChild(w.el));var top=renderer.$cursorLayer.getPixelPosition({row:i,column:0},!0).top;w.coverLine||(top+=config.lineHeight*this.session.getRowLineCount(w.row)),w.el.style.top=top-config.offset+"px";var left=w.coverGutter?0:renderer.gutterWidth;w.fixedWidth||(left-=renderer.scrollLeft),w.el.style.left=left+"px",w.fullWidth&&w.screenWidth&&(w.el.style.minWidth=config.width+2*config.padding+"px"),w.fixedWidth?w.el.style.right=renderer.scrollBar.getWidth()+"px":w.el.style.right=""}}}}}).call(LineWidgets.prototype),exports.LineWidgets=LineWidgets}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(acequire,exports,module){"use strict";function binarySearch(array,needle,comparator){for(var first=0,last=array.length-1;first<=last;){var mid=first+last>>1,c=comparator(needle,array[mid]);if(c>0)first=mid+1;else{if(!(c<0))return mid;last=mid-1}}return-(first+1)}function findAnnotations(session,row,dir){var annotations=session.getAnnotations().sort(Range.comparePoints);if(annotations.length){var i=binarySearch(annotations,{row:row,column:-1},Range.comparePoints);i<0&&(i=-i-1),i>=annotations.length?i=dir>0?0:annotations.length-1:0===i&&dir<0&&(i=annotations.length-1);var annotation=annotations[i];if(annotation&&dir){if(annotation.row===row){do{annotation=annotations[i+=dir]}while(annotation&&annotation.row===row);if(!annotation)return annotations.slice()}var matched=[];row=annotation.row;do{matched[dir<0?"unshift":"push"](annotation),annotation=annotations[i+=dir]}while(annotation&&annotation.row==row);return matched.length&&matched}}}var LineWidgets=acequire("../line_widgets").LineWidgets,dom=acequire("../lib/dom"),Range=acequire("../range").Range;exports.showErrorMarker=function(editor,dir){var session=editor.session;session.widgetManager||(session.widgetManager=new LineWidgets(session),session.widgetManager.attach(editor));var pos=editor.getCursorPosition(),row=pos.row,oldWidget=session.widgetManager.getWidgetsAtRow(row).filter(function(w){return"errorMarker"==w.type})[0];oldWidget?oldWidget.destroy():row-=dir;var gutterAnno,annotations=findAnnotations(session,row,dir);if(annotations){var annotation=annotations[0];pos.column=(annotation.pos&&"number"!=typeof annotation.column?annotation.pos.sc:annotation.column)||0,pos.row=annotation.row,gutterAnno=editor.renderer.$gutterLayer.$annotations[pos.row]}else{if(oldWidget)return;gutterAnno={text:["Looks good!"],className:"ace_ok"}}editor.session.unfold(pos.row),editor.selection.moveToPosition(pos);var w={row:pos.row,fixedWidth:!0,coverGutter:!0,el:dom.createElement("div"),type:"errorMarker"},el=w.el.appendChild(dom.createElement("div")),arrow=w.el.appendChild(dom.createElement("div"));arrow.className="error_widget_arrow "+gutterAnno.className;var left=editor.renderer.$cursorLayer.getPixelPosition(pos).left;arrow.style.left=left+editor.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",el.className="error_widget "+gutterAnno.className,el.innerHTML=gutterAnno.text.join("<br>"),el.appendChild(dom.createElement("div"));var kb=function(_,hashId,keyString){if(0===hashId&&("esc"===keyString||"return"===keyString))return w.destroy(),{command:"null"}};w.destroy=function(){editor.$mouseHandler.isMousePressed||(editor.keyBinding.removeKeyboardHandler(kb),session.widgetManager.removeLineWidget(w),editor.off("changeSelection",w.destroy),editor.off("changeSession",w.destroy),editor.off("mouseup",w.destroy),editor.off("change",w.destroy))},editor.keyBinding.addKeyboardHandler(kb),editor.on("changeSelection",w.destroy),editor.on("changeSession",w.destroy),editor.on("mouseup",w.destroy),editor.on("change",w.destroy),editor.session.widgetManager.addLineWidget(w),w.el.onmousedown=editor.focus.bind(editor),editor.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},dom.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(acequire,exports,module){"use strict";acequire("./lib/fixoldbrowsers");var dom=acequire("./lib/dom"),event=acequire("./lib/event"),Editor=acequire("./editor").Editor,EditSession=acequire("./edit_session").EditSession,UndoManager=acequire("./undomanager").UndoManager,Renderer=acequire("./virtual_renderer").VirtualRenderer;acequire("./worker/worker_client"),acequire("./keyboard/hash_handler"),acequire("./placeholder"),acequire("./multi_select"),acequire("./mode/folding/fold_mode"),acequire("./theme/textmate"),acequire("./ext/error_marker"),exports.config=acequire("./config"),exports.acequire=acequire,exports.edit=function(el){if("string"==typeof el){var _id=el;if(!(el=document.getElementById(_id)))throw new Error("ace.edit can't find div #"+_id)}if(el&&el.env&&el.env.editor instanceof Editor)return el.env.editor;var value="";if(el&&/input|textarea/i.test(el.tagName)){var oldNode=el;value=oldNode.value,el=dom.createElement("pre"),oldNode.parentNode.replaceChild(el,oldNode)}else el&&(value=dom.getInnerText(el),el.innerHTML="");var doc=exports.createEditSession(value),editor=new Editor(new Renderer(el));editor.setSession(doc);var env={document:doc,editor:editor,onResize:editor.resize.bind(editor,null)};return oldNode&&(env.textarea=oldNode),event.addListener(window,"resize",env.onResize),editor.on("destroy",function(){event.removeListener(window,"resize",env.onResize),env.editor.container.env=null}),editor.container.env=editor.env=env,editor},exports.createEditSession=function(text,mode){var doc=new EditSession(text,mode);return doc.setUndoManager(new UndoManager),doc},exports.EditSession=EditSession,exports.UndoManager=UndoManager,exports.version="1.2.3"}),function(){ace.acequire(["ace/ace"],function(a){a&&a.config.init(!0),window.ace||(window.ace=a);for(var key in a)a.hasOwnProperty(key)&&(window.ace[key]=a[key])})}(),module.exports=window.ace.acequire("ace/ace")},{"w3c-blob":323}],4:[function(require,module,exports){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(acequire,exports,module){"use strict";var oop=acequire("../lib/oop"),TextHighlightRules=acequire("./text_highlight_rules").TextHighlightRules,DocCommentHighlightRules=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},DocCommentHighlightRules.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]
+}};oop.inherits(DocCommentHighlightRules,TextHighlightRules),DocCommentHighlightRules.getTagRule=function(start){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},DocCommentHighlightRules.getStartRule=function(start){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:start}},DocCommentHighlightRules.getEndRule=function(start){return{token:"comment.doc",regex:"\\*\\/",next:start}},exports.DocCommentHighlightRules=DocCommentHighlightRules}),ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(acequire,exports,module){"use strict";var oop=acequire("../lib/oop"),DocCommentHighlightRules=acequire("./doc_comment_highlight_rules").DocCommentHighlightRules,TextHighlightRules=acequire("./text_highlight_rules").TextHighlightRules,cFunctions=exports.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",c_cppHighlightRules=function(){var keywordMapper=this.$keywords=this.createKeywordMapper({"keyword.control":"break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using","storage.type":"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template|char16_t|char32_t","storage.modifier":"const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local","keyword.operator":"and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace","variable.language":"this","constant.language":"NULL|true|false|TRUE|FALSE|nullptr"},"identifier"),escapeRe=/\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;this.$rules={start:[{token:"comment",regex:"//$",next:"start"},{token:"comment",regex:"//",next:"singleLineComment"},DocCommentHighlightRules.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:"'(?:"+escapeRe+"|.)'"},{token:"string.start",regex:'"',stateName:"qqstring",next:[{token:"string",regex:/\\\s*$/,next:"qqstring"},{token:"constant.language.escape",regex:escapeRe},{token:"constant.language.escape",regex:/%[^'"\\]/},{token:"string.end",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"string.start",regex:'R"\\(',stateName:"rawString",next:[{token:"string.end",regex:'\\)"',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef)\\b",next:"directive"},{token:"keyword",regex:"#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"},{token:"support.function.C99.c",regex:cFunctions},{token:keywordMapper,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(DocCommentHighlightRules,"doc-",[DocCommentHighlightRules.getEndRule("start")]),this.normalizeRules()};oop.inherits(c_cppHighlightRules,TextHighlightRules),exports.c_cppHighlightRules=c_cppHighlightRules}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(acequire,exports,module){"use strict";var Range=acequire("../range").Range,MatchingBraceOutdent=function(){};(function(){this.checkOutdent=function(line,input){return!!/^\s+$/.test(line)&&/^\s*\}/.test(input)},this.autoOutdent=function(doc,row){var line=doc.getLine(row),match=line.match(/^(\s*\})/);if(!match)return 0;var column=match[1].length,openBracePos=doc.findMatchingBracket({row:row,column:column});if(!openBracePos||openBracePos.row==row)return 0;var indent=this.$getIndent(doc.getLine(openBracePos.row));doc.replace(new Range(row,0,row,column-1),indent)},this.$getIndent=function(line){return line.match(/^\s*/)[0]}}).call(MatchingBraceOutdent.prototype),exports.MatchingBraceOutdent=MatchingBraceOutdent}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(acequire,exports,module){"use strict";var context,oop=acequire("../../lib/oop"),Behaviour=acequire("../behaviour").Behaviour,TokenIterator=acequire("../../token_iterator").TokenIterator,lang=acequire("../../lib/lang"),SAFE_INSERT_IN_TOKENS=["text","paren.rparen","punctuation.operator"],SAFE_INSERT_BEFORE_TOKENS=["text","paren.rparen","punctuation.operator","comment"],contextCache={},initContext=function(editor){var id=-1;if(editor.multiSelect&&(id=editor.selection.index,contextCache.rangeCount!=editor.multiSelect.rangeCount&&(contextCache={rangeCount:editor.multiSelect.rangeCount})),contextCache[id])return context=contextCache[id];context=contextCache[id]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},getWrapped=function(selection,selected,opening,closing){var rowDiff=selection.end.row-selection.start.row;return{text:opening+selected+closing,selection:[0,selection.start.column+1,rowDiff,selection.end.column+(rowDiff?0:1)]}},CstyleBehaviour=function(){this.add("braces","insertion",function(state,action,editor,session,text){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row);if("{"==text){initContext(editor);var selection=editor.getSelectionRange(),selected=session.doc.getTextRange(selection);if(""!==selected&&"{"!==selected&&editor.getWrapBehavioursEnabled())return getWrapped(selection,selected,"{","}");if(CstyleBehaviour.isSaneInsertion(editor,session))return/[\]\}\)]/.test(line[cursor.column])||editor.inMultiSelectMode?(CstyleBehaviour.recordAutoInsert(editor,session,"}"),{text:"{}",selection:[1,1]}):(CstyleBehaviour.recordMaybeInsert(editor,session,"{"),{text:"{",selection:[1,1]})}else if("}"==text){initContext(editor);var rightChar=line.substring(cursor.column,cursor.column+1);if("}"==rightChar){var matching=session.$findOpeningBracket("}",{column:cursor.column+1,row:cursor.row});if(null!==matching&&CstyleBehaviour.isAutoInsertedClosing(cursor,line,text))return CstyleBehaviour.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==text||"\r\n"==text){initContext(editor);var closing="";CstyleBehaviour.isMaybeInsertedClosing(cursor,line)&&(closing=lang.stringRepeat("}",context.maybeInsertedBrackets),CstyleBehaviour.clearMaybeInsertedClosing());var rightChar=line.substring(cursor.column,cursor.column+1);if("}"===rightChar){var openBracePos=session.findMatchingBracket({row:cursor.row,column:cursor.column+1},"}");if(!openBracePos)return null;var next_indent=this.$getIndent(session.getLine(openBracePos.row))}else{if(!closing)return void CstyleBehaviour.clearMaybeInsertedClosing();var next_indent=this.$getIndent(line)}var indent=next_indent+session.getTabString();return{text:"\n"+indent+"\n"+next_indent+closing,selection:[1,indent.length,1,indent.length]}}CstyleBehaviour.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(state,action,editor,session,range){var selected=session.doc.getTextRange(range);if(!range.isMultiLine()&&"{"==selected){initContext(editor);if("}"==session.doc.getLine(range.start.row).substring(range.end.column,range.end.column+1))return range.end.column++,range;context.maybeInsertedBrackets--}}),this.add("parens","insertion",function(state,action,editor,session,text){if("("==text){initContext(editor);var selection=editor.getSelectionRange(),selected=session.doc.getTextRange(selection);if(""!==selected&&editor.getWrapBehavioursEnabled())return getWrapped(selection,selected,"(",")");if(CstyleBehaviour.isSaneInsertion(editor,session))return CstyleBehaviour.recordAutoInsert(editor,session,")"),{text:"()",selection:[1,1]}}else if(")"==text){initContext(editor);var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row),rightChar=line.substring(cursor.column,cursor.column+1);if(")"==rightChar){var matching=session.$findOpeningBracket(")",{column:cursor.column+1,row:cursor.row});if(null!==matching&&CstyleBehaviour.isAutoInsertedClosing(cursor,line,text))return CstyleBehaviour.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(state,action,editor,session,range){var selected=session.doc.getTextRange(range);if(!range.isMultiLine()&&"("==selected){initContext(editor);if(")"==session.doc.getLine(range.start.row).substring(range.start.column+1,range.start.column+2))return range.end.column++,range}}),this.add("brackets","insertion",function(state,action,editor,session,text){if("["==text){initContext(editor);var selection=editor.getSelectionRange(),selected=session.doc.getTextRange(selection);if(""!==selected&&editor.getWrapBehavioursEnabled())return getWrapped(selection,selected,"[","]");if(CstyleBehaviour.isSaneInsertion(editor,session))return CstyleBehaviour.recordAutoInsert(editor,session,"]"),{text:"[]",selection:[1,1]}}else if("]"==text){initContext(editor);var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row),rightChar=line.substring(cursor.column,cursor.column+1);if("]"==rightChar){var matching=session.$findOpeningBracket("]",{column:cursor.column+1,row:cursor.row});if(null!==matching&&CstyleBehaviour.isAutoInsertedClosing(cursor,line,text))return CstyleBehaviour.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(state,action,editor,session,range){var selected=session.doc.getTextRange(range);if(!range.isMultiLine()&&"["==selected){initContext(editor);if("]"==session.doc.getLine(range.start.row).substring(range.start.column+1,range.start.column+2))return range.end.column++,range}}),this.add("string_dquotes","insertion",function(state,action,editor,session,text){if('"'==text||"'"==text){initContext(editor);var quote=text,selection=editor.getSelectionRange(),selected=session.doc.getTextRange(selection);if(""!==selected&&"'"!==selected&&'"'!=selected&&editor.getWrapBehavioursEnabled())return getWrapped(selection,selected,quote,quote);if(!selected){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row),leftChar=line.substring(cursor.column-1,cursor.column),rightChar=line.substring(cursor.column,cursor.column+1),token=session.getTokenAt(cursor.row,cursor.column),rightToken=session.getTokenAt(cursor.row,cursor.column+1);if("\\"==leftChar&&token&&/escape/.test(token.type))return null;var pair,stringBefore=token&&/string|escape/.test(token.type),stringAfter=!rightToken||/string|escape/.test(rightToken.type);if(rightChar==quote)pair=stringBefore!==stringAfter;else{if(stringBefore&&!stringAfter)return null;if(stringBefore&&stringAfter)return null;var wordRe=session.$mode.tokenRe;wordRe.lastIndex=0;var isWordBefore=wordRe.test(leftChar);wordRe.lastIndex=0;var isWordAfter=wordRe.test(leftChar);if(isWordBefore||isWordAfter)return null;if(rightChar&&!/[\s;,.})\]\\]/.test(rightChar))return null;pair=!0}return{text:pair?quote+quote:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(state,action,editor,session,range){var selected=session.doc.getTextRange(range);if(!range.isMultiLine()&&('"'==selected||"'"==selected)){initContext(editor);if(session.doc.getLine(range.start.row).substring(range.start.column+1,range.start.column+2)==selected)return range.end.column++,range}})};CstyleBehaviour.isSaneInsertion=function(editor,session){var cursor=editor.getCursorPosition(),iterator=new TokenIterator(session,cursor.row,cursor.column);if(!this.$matchTokenType(iterator.getCurrentToken()||"text",SAFE_INSERT_IN_TOKENS)){var iterator2=new TokenIterator(session,cursor.row,cursor.column+1);if(!this.$matchTokenType(iterator2.getCurrentToken()||"text",SAFE_INSERT_IN_TOKENS))return!1}return iterator.stepForward(),iterator.getCurrentTokenRow()!==cursor.row||this.$matchTokenType(iterator.getCurrentToken()||"text",SAFE_INSERT_BEFORE_TOKENS)},CstyleBehaviour.$matchTokenType=function(token,types){return types.indexOf(token.type||token)>-1},CstyleBehaviour.recordAutoInsert=function(editor,session,bracket){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row);this.isAutoInsertedClosing(cursor,line,context.autoInsertedLineEnd[0])||(context.autoInsertedBrackets=0),context.autoInsertedRow=cursor.row,context.autoInsertedLineEnd=bracket+line.substr(cursor.column),context.autoInsertedBrackets++},CstyleBehaviour.recordMaybeInsert=function(editor,session,bracket){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row);this.isMaybeInsertedClosing(cursor,line)||(context.maybeInsertedBrackets=0),context.maybeInsertedRow=cursor.row,context.maybeInsertedLineStart=line.substr(0,cursor.column)+bracket,context.maybeInsertedLineEnd=line.substr(cursor.column),context.maybeInsertedBrackets++},CstyleBehaviour.isAutoInsertedClosing=function(cursor,line,bracket){return context.autoInsertedBrackets>0&&cursor.row===context.autoInsertedRow&&bracket===context.autoInsertedLineEnd[0]&&line.substr(cursor.column)===context.autoInsertedLineEnd},CstyleBehaviour.isMaybeInsertedClosing=function(cursor,line){return context.maybeInsertedBrackets>0&&cursor.row===context.maybeInsertedRow&&line.substr(cursor.column)===context.maybeInsertedLineEnd&&line.substr(0,cursor.column)==context.maybeInsertedLineStart},CstyleBehaviour.popAutoInsertedClosing=function(){context.autoInsertedLineEnd=context.autoInsertedLineEnd.substr(1),context.autoInsertedBrackets--},CstyleBehaviour.clearMaybeInsertedClosing=function(){context&&(context.maybeInsertedBrackets=0,context.maybeInsertedRow=-1)},oop.inherits(CstyleBehaviour,Behaviour),exports.CstyleBehaviour=CstyleBehaviour}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(acequire,exports,module){"use strict";var oop=acequire("../../lib/oop"),Range=acequire("../../range").Range,BaseFoldMode=acequire("./fold_mode").FoldMode,FoldMode=exports.FoldMode=function(commentRegex){commentRegex&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+commentRegex.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+commentRegex.end)))};oop.inherits(FoldMode,BaseFoldMode),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(session,foldStyle,row){var line=session.getLine(row);if(this.singleLineBlockCommentRe.test(line)&&!this.startRegionRe.test(line)&&!this.tripleStarBlockCommentRe.test(line))return"";var fw=this._getFoldWidgetBase(session,foldStyle,row);return!fw&&this.startRegionRe.test(line)?"start":fw},this.getFoldWidgetRange=function(session,foldStyle,row,forceMultiline){var line=session.getLine(row);if(this.startRegionRe.test(line))return this.getCommentRegionBlock(session,line,row);var match=line.match(this.foldingStartMarker);if(match){var i=match.index;if(match[1])return this.openingBracketBlock(session,match[1],row,i);var range=session.getCommentFoldRange(row,i+match[0].length,1);return range&&!range.isMultiLine()&&(forceMultiline?range=this.getSectionRange(session,row):"all"!=foldStyle&&(range=null)),range}if("markbegin"!==foldStyle){var match=line.match(this.foldingStopMarker);if(match){var i=match.index+match[0].length;return match[1]?this.closingBracketBlock(session,match[1],row,i):session.getCommentFoldRange(row,i,-1)}}},this.getSectionRange=function(session,row){var line=session.getLine(row),startIndent=line.search(/\S/),startRow=row,startColumn=line.length;row+=1;for(var endRow=row,maxRow=session.getLength();++row<maxRow;){line=session.getLine(row);var indent=line.search(/\S/);if(-1!==indent){if(startIndent>indent)break;var subRange=this.getFoldWidgetRange(session,"all",row);if(subRange){if(subRange.start.row<=startRow)break;if(subRange.isMultiLine())row=subRange.end.row;else if(startIndent==indent)break}endRow=row}}return new Range(startRow,startColumn,endRow,session.getLine(endRow).length)},this.getCommentRegionBlock=function(session,line,row){for(var startColumn=line.search(/\s*$/),maxRow=session.getLength(),startRow=row,re=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,depth=1;++row<maxRow;){line=session.getLine(row);var m=re.exec(line);if(m&&(m[1]?depth--:depth++,!depth))break}var endRow=row;if(endRow>startRow)return new Range(startRow,startColumn,endRow,line.length)}}.call(FoldMode.prototype)}),ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(acequire,exports,module){"use strict";var oop=acequire("../lib/oop"),TextMode=acequire("./text").Mode,c_cppHighlightRules=acequire("./c_cpp_highlight_rules").c_cppHighlightRules,MatchingBraceOutdent=acequire("./matching_brace_outdent").MatchingBraceOutdent,CstyleBehaviour=(acequire("../range").Range,acequire("./behaviour/cstyle").CstyleBehaviour),CStyleFoldMode=acequire("./folding/cstyle").FoldMode,Mode=function(){this.HighlightRules=c_cppHighlightRules,this.$outdent=new MatchingBraceOutdent,this.$behaviour=new CstyleBehaviour,this.foldingRules=new CStyleFoldMode};oop.inherits(Mode,TextMode),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(state,line,tab){var indent=this.$getIndent(line),tokenizedLine=this.getTokenizer().getLineTokens(line,state),tokens=tokenizedLine.tokens,endState=tokenizedLine.state;if(tokens.length&&"comment"==tokens[tokens.length-1].type)return indent;if("start"==state){var match=line.match(/^.*[\{\(\[]\s*$/);match&&(indent+=tab)}else if("doc-start"==state){if("start"==endState)return"";var match=line.match(/^\s*(\/?)\*/);match&&(match[1]&&(indent+=" "),indent+="* ")}return indent},this.checkOutdent=function(state,line,input){return this.$outdent.checkOutdent(line,input)},this.autoOutdent=function(state,doc,row){this.$outdent.autoOutdent(doc,row)},this.$id="ace/mode/c_cpp"}.call(Mode.prototype),exports.Mode=Mode})},{}],5:[function(require,module,exports){ace.define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"],function(acequire,exports,module){"use strict";exports.isDark=!1,exports.cssText='.ace-eclipse .ace_gutter {background: #ebebeb;border-right: 1px solid rgb(159, 159, 159);color: rgb(136, 136, 136);}.ace-eclipse .ace_print-margin {width: 1px;background: #ebebeb;}.ace-eclipse {background-color: #FFFFFF;color: black;}.ace-eclipse .ace_fold {background-color: rgb(60, 76, 114);}.ace-eclipse .ace_cursor {color: black;}.ace-eclipse .ace_storage,.ace-eclipse .ace_keyword,.ace-eclipse .ace_variable {color: rgb(127, 0, 85);}.ace-eclipse .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-eclipse .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-eclipse .ace_function {color: rgb(60, 76, 114);}.ace-eclipse .ace_string {color: rgb(42, 0, 255);}.ace-eclipse .ace_comment {color: rgb(113, 150, 130);}.ace-eclipse .ace_comment.ace_doc {color: rgb(63, 95, 191);}.ace-eclipse .ace_comment.ace_doc.ace_tag {color: rgb(127, 159, 191);}.ace-eclipse .ace_constant.ace_numeric {color: darkblue;}.ace-eclipse .ace_tag {color: rgb(25, 118, 116);}.ace-eclipse .ace_type {color: rgb(127, 0, 127);}.ace-eclipse .ace_xml-pe {color: rgb(104, 104, 91);}.ace-eclipse .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-eclipse .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-eclipse .ace_meta.ace_tag {color:rgb(25, 118, 116);}.ace-eclipse .ace_invisible {color: #ddd;}.ace-eclipse .ace_entity.ace_other.ace_attribute-name {color:rgb(127, 0, 127);}.ace-eclipse .ace_marker-layer .ace_step {background: rgb(255, 255, 0);}.ace-eclipse .ace_active-line {background: rgb(232, 242, 254);}.ace-eclipse .ace_gutter-active-line {background-color : #DADADA;}.ace-eclipse .ace_marker-layer .ace_selected-word {border: 1px solid rgb(181, 213, 255);}.ace-eclipse .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',exports.cssClass="ace-eclipse",acequire("../lib/dom").importCssString(exports.cssText,exports.cssClass)})},{}],6:[function(require,module,exports){require("../../modules/core.regexp.escape"),module.exports=require("../../modules/_core").RegExp.escape},{"../../modules/_core":27,"../../modules/core.regexp.escape":123}],7:[function(require,module,exports){module.exports=function(it){if("function"!=typeof it)throw TypeError(it+" is not a function!");return it}},{}],8:[function(require,module,exports){var cof=require("./_cof");module.exports=function(it,msg){if("number"!=typeof it&&"Number"!=cof(it))throw TypeError(msg);return+it}},{"./_cof":22}],9:[function(require,module,exports){var UNSCOPABLES=require("./_wks")("unscopables"),ArrayProto=Array.prototype;void 0==ArrayProto[UNSCOPABLES]&&require("./_hide")(ArrayProto,UNSCOPABLES,{}),module.exports=function(key){ArrayProto[UNSCOPABLES][key]=!0}},{"./_hide":44,"./_wks":121}],10:[function(require,module,exports){module.exports=function(it,Constructor,name,forbiddenField){if(!(it instanceof Constructor)||void 0!==forbiddenField&&forbiddenField in it)throw TypeError(name+": incorrect invocation!");return it}},{}],11:[function(require,module,exports){var isObject=require("./_is-object");module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},{"./_is-object":53}],12:[function(require,module,exports){"use strict";var toObject=require("./_to-object"),toIndex=require("./_to-index"),toLength=require("./_to-length");module.exports=[].copyWithin||function(target,start){var O=toObject(this),len=toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments.length>2?arguments[2]:void 0,count=Math.min((void 0===end?len:toIndex(end,len))-from,len-to),inc=1;for(from<to&&to<from+count&&(inc=-1,from+=count-1,to+=count-1);count-- >0;)from in O?O[to]=O[from]:delete O[to],to+=inc,from+=inc;return O}},{"./_to-index":109,"./_to-length":112,"./_to-object":113}],13:[function(require,module,exports){"use strict";var toObject=require("./_to-object"),toIndex=require("./_to-index"),toLength=require("./_to-length");module.exports=function(value){for(var O=toObject(this),length=toLength(O.length),aLen=arguments.length,index=toIndex(aLen>1?arguments[1]:void 0,length),end=aLen>2?arguments[2]:void 0,endPos=void 0===end?length:toIndex(end,length);endPos>index;)O[index++]=value;return O}},{"./_to-index":109,"./_to-length":112,"./_to-object":113}],14:[function(require,module,exports){var forOf=require("./_for-of");module.exports=function(iter,ITERATOR){var result=[];return forOf(iter,!1,result.push,result,ITERATOR),result}},{"./_for-of":41}],15:[function(require,module,exports){var toIObject=require("./_to-iobject"),toLength=require("./_to-length"),toIndex=require("./_to-index");module.exports=function(IS_INCLUDES){return function($this,el,fromIndex){var value,O=toIObject($this),length=toLength(O.length),index=toIndex(fromIndex,length);if(IS_INCLUDES&&el!=el){for(;length>index;)if((value=O[index++])!=value)return!0}else for(;length>index;index++)if((IS_INCLUDES||index in O)&&O[index]===el)return IS_INCLUDES||index||0;return!IS_INCLUDES&&-1}}},{"./_to-index":109,"./_to-iobject":111,"./_to-length":112}],16:[function(require,module,exports){var ctx=require("./_ctx"),IObject=require("./_iobject"),toObject=require("./_to-object"),toLength=require("./_to-length"),asc=require("./_array-species-create");module.exports=function(TYPE,$create){var IS_MAP=1==TYPE,IS_FILTER=2==TYPE,IS_SOME=3==TYPE,IS_EVERY=4==TYPE,IS_FIND_INDEX=6==TYPE,NO_HOLES=5==TYPE||IS_FIND_INDEX,create=$create||asc;return function($this,callbackfn,that){for(var val,res,O=toObject($this),self=IObject(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=IS_MAP?create($this,length):IS_FILTER?create($this,0):void 0;length>index;index++)if((NO_HOLES||index in self)&&(val=self[index],res=f(val,index,O),TYPE))if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return!0;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return!1;return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./_array-species-create":19,"./_ctx":29,"./_iobject":49,"./_to-length":112,"./_to-object":113}],17:[function(require,module,exports){var aFunction=require("./_a-function"),toObject=require("./_to-object"),IObject=require("./_iobject"),toLength=require("./_to-length");module.exports=function(that,callbackfn,aLen,memo,isRight){aFunction(callbackfn);var O=toObject(that),self=IObject(O),length=toLength(O.length),index=isRight?length-1:0,i=isRight?-1:1;if(aLen<2)for(;;){if(index in self){memo=self[index],index+=i;break}if(index+=i,isRight?index<0:length<=index)throw TypeError("Reduce of empty array with no initial value")}for(;isRight?index>=0:length>index;index+=i)index in self&&(memo=callbackfn(memo,self[index],index,O));return memo}},{"./_a-function":7,"./_iobject":49,"./_to-length":112,"./_to-object":113}],18:[function(require,module,exports){var isObject=require("./_is-object"),isArray=require("./_is-array"),SPECIES=require("./_wks")("species");module.exports=function(original){var C;return isArray(original)&&(C=original.constructor,"function"!=typeof C||C!==Array&&!isArray(C.prototype)||(C=void 0),isObject(C)&&null===(C=C[SPECIES])&&(C=void 0)),void 0===C?Array:C}},{"./_is-array":51,"./_is-object":53,"./_wks":121}],19:[function(require,module,exports){var speciesConstructor=require("./_array-species-constructor");module.exports=function(original,length){return new(speciesConstructor(original))(length)}},{"./_array-species-constructor":18}],20:[function(require,module,exports){"use strict";var aFunction=require("./_a-function"),isObject=require("./_is-object"),invoke=require("./_invoke"),arraySlice=[].slice,factories={},construct=function(F,len,args){if(!(len in factories)){for(var n=[],i=0;i<len;i++)n[i]="a["+i+"]";factories[len]=Function("F,a","return new F("+n.join(",")+")")}return factories[len](F,args)};module.exports=Function.bind||function(that){var fn=aFunction(this),partArgs=arraySlice.call(arguments,1),bound=function(){var args=partArgs.concat(arraySlice.call(arguments));return this instanceof bound?construct(fn,args.length,args):invoke(fn,args,that)};return isObject(fn.prototype)&&(bound.prototype=fn.prototype),bound}},{"./_a-function":7,"./_invoke":48,"./_is-object":53}],21:[function(require,module,exports){var cof=require("./_cof"),TAG=require("./_wks")("toStringTag"),ARG="Arguments"==cof(function(){return arguments}()),tryGet=function(it,key){try{return it[key]}catch(e){}};module.exports=function(it){var O,T,B;return void 0===it?"Undefined":null===it?"Null":"string"==typeof(T=tryGet(O=Object(it),TAG))?T:ARG?cof(O):"Object"==(B=cof(O))&&"function"==typeof O.callee?"Arguments":B}},{"./_cof":22,"./_wks":121}],22:[function(require,module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},{}],23:[function(require,module,exports){"use strict";var dP=require("./_object-dp").f,create=require("./_object-create"),redefineAll=require("./_redefine-all"),ctx=require("./_ctx"),anInstance=require("./_an-instance"),defined=require("./_defined"),forOf=require("./_for-of"),$iterDefine=require("./_iter-define"),step=require("./_iter-step"),setSpecies=require("./_set-species"),DESCRIPTORS=require("./_descriptors"),fastKey=require("./_meta").fastKey,SIZE=DESCRIPTORS?"_s":"size",getEntry=function(that,key){var entry,index=fastKey(key);if("F"!==index)return that._i[index];for(entry=that._f;entry;entry=entry.n)if(entry.k==key)return entry};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){anInstance(that,C,NAME,"_i"),that._i=create(null),that._f=void 0,that._l=void 0,that[SIZE]=0,void 0!=iterable&&forOf(iterable,IS_MAP,that[ADDER],that)});return redefineAll(C.prototype,{clear:function(){
+for(var that=this,data=that._i,entry=that._f;entry;entry=entry.n)entry.r=!0,entry.p&&(entry.p=entry.p.n=void 0),delete data[entry.i];that._f=that._l=void 0,that[SIZE]=0},delete:function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that._i[entry.i],entry.r=!0,prev&&(prev.n=next),next&&(next.p=prev),that._f==entry&&(that._f=next),that._l==entry&&(that._l=prev),that[SIZE]--}return!!entry},forEach:function(callbackfn){anInstance(this,C,"forEach");for(var entry,f=ctx(callbackfn,arguments.length>1?arguments[1]:void 0,3);entry=entry?entry.n:this._f;)for(f(entry.v,entry.k,this);entry&&entry.r;)entry=entry.p},has:function(key){return!!getEntry(this,key)}}),DESCRIPTORS&&dP(C.prototype,"size",{get:function(){return defined(this[SIZE])}}),C},def:function(that,key,value){var prev,index,entry=getEntry(that,key);return entry?entry.v=value:(that._l=entry={i:index=fastKey(key,!0),k:key,v:value,p:prev=that._l,n:void 0,r:!1},that._f||(that._f=entry),prev&&(prev.n=entry),that[SIZE]++,"F"!==index&&(that._i[index]=entry)),that},getEntry:getEntry,setStrong:function(C,NAME,IS_MAP){$iterDefine(C,NAME,function(iterated,kind){this._t=iterated,this._k=kind,this._l=void 0},function(){for(var that=this,kind=that._k,entry=that._l;entry&&entry.r;)entry=entry.p;return that._t&&(that._l=entry=entry?entry.n:that._t._f)?"keys"==kind?step(0,entry.k):"values"==kind?step(0,entry.v):step(0,[entry.k,entry.v]):(that._t=void 0,step(1))},IS_MAP?"entries":"values",!IS_MAP,!0),setSpecies(NAME)}}},{"./_an-instance":10,"./_ctx":29,"./_defined":31,"./_descriptors":32,"./_for-of":41,"./_iter-define":57,"./_iter-step":59,"./_meta":66,"./_object-create":70,"./_object-dp":71,"./_redefine-all":90,"./_set-species":95}],24:[function(require,module,exports){var classof=require("./_classof"),from=require("./_array-from-iterable");module.exports=function(NAME){return function(){if(classof(this)!=NAME)throw TypeError(NAME+"#toJSON isn't generic");return from(this)}}},{"./_array-from-iterable":14,"./_classof":21}],25:[function(require,module,exports){"use strict";var redefineAll=require("./_redefine-all"),getWeak=require("./_meta").getWeak,anObject=require("./_an-object"),isObject=require("./_is-object"),anInstance=require("./_an-instance"),forOf=require("./_for-of"),createArrayMethod=require("./_array-methods"),$has=require("./_has"),arrayFind=createArrayMethod(5),arrayFindIndex=createArrayMethod(6),id=0,uncaughtFrozenStore=function(that){return that._l||(that._l=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.a=[]},findUncaughtFrozen=function(store,key){return arrayFind(store.a,function(it){return it[0]===key})};UncaughtFrozenStore.prototype={get:function(key){var entry=findUncaughtFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findUncaughtFrozen(this,key)},set:function(key,value){var entry=findUncaughtFrozen(this,key);entry?entry[1]=value:this.a.push([key,value])},delete:function(key){var index=arrayFindIndex(this.a,function(it){return it[0]===key});return~index&&this.a.splice(index,1),!!~index}},module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){anInstance(that,C,NAME,"_i"),that._i=id++,that._l=void 0,void 0!=iterable&&forOf(iterable,IS_MAP,that[ADDER],that)});return redefineAll(C.prototype,{delete:function(key){if(!isObject(key))return!1;var data=getWeak(key);return!0===data?uncaughtFrozenStore(this).delete(key):data&&$has(data,this._i)&&delete data[this._i]},has:function(key){if(!isObject(key))return!1;var data=getWeak(key);return!0===data?uncaughtFrozenStore(this).has(key):data&&$has(data,this._i)}}),C},def:function(that,key,value){var data=getWeak(anObject(key),!0);return!0===data?uncaughtFrozenStore(that).set(key,value):data[that._i]=value,that},ufstore:uncaughtFrozenStore}},{"./_an-instance":10,"./_an-object":11,"./_array-methods":16,"./_for-of":41,"./_has":43,"./_is-object":53,"./_meta":66,"./_redefine-all":90}],26:[function(require,module,exports){"use strict";var global=require("./_global"),$export=require("./_export"),redefine=require("./_redefine"),redefineAll=require("./_redefine-all"),meta=require("./_meta"),forOf=require("./_for-of"),anInstance=require("./_an-instance"),isObject=require("./_is-object"),fails=require("./_fails"),$iterDetect=require("./_iter-detect"),setToStringTag=require("./_set-to-string-tag"),inheritIfRequired=require("./_inherit-if-required");module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=global[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={},fixMethod=function(KEY){var fn=proto[KEY];redefine(proto,KEY,"delete"==KEY?function(a){return!(IS_WEAK&&!isObject(a))&&fn.call(this,0===a?0:a)}:"has"==KEY?function(a){return!(IS_WEAK&&!isObject(a))&&fn.call(this,0===a?0:a)}:"get"==KEY?function(a){return IS_WEAK&&!isObject(a)?void 0:fn.call(this,0===a?0:a)}:"add"==KEY?function(a){return fn.call(this,0===a?0:a),this}:function(a,b){return fn.call(this,0===a?0:a,b),this})};if("function"==typeof C&&(IS_WEAK||proto.forEach&&!fails(function(){(new C).entries().next()}))){var instance=new C,HASNT_CHAINING=instance[ADDER](IS_WEAK?{}:-0,1)!=instance,THROWS_ON_PRIMITIVES=fails(function(){instance.has(1)}),ACCEPT_ITERABLES=$iterDetect(function(iter){new C(iter)}),BUGGY_ZERO=!IS_WEAK&&fails(function(){for(var $instance=new C,index=5;index--;)$instance[ADDER](index,index);return!$instance.has(-0)});ACCEPT_ITERABLES||(C=wrapper(function(target,iterable){anInstance(target,C,NAME);var that=inheritIfRequired(new Base,target,C);return void 0!=iterable&&forOf(iterable,IS_MAP,that[ADDER],that),that}),C.prototype=proto,proto.constructor=C),(THROWS_ON_PRIMITIVES||BUGGY_ZERO)&&(fixMethod("delete"),fixMethod("has"),IS_MAP&&fixMethod("get")),(BUGGY_ZERO||HASNT_CHAINING)&&fixMethod(ADDER),IS_WEAK&&proto.clear&&delete proto.clear}else C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER),redefineAll(C.prototype,methods),meta.NEED=!0;return setToStringTag(C,NAME),O[NAME]=C,$export($export.G+$export.W+$export.F*(C!=Base),O),IS_WEAK||common.setStrong(C,NAME,IS_MAP),C}},{"./_an-instance":10,"./_export":36,"./_fails":38,"./_for-of":41,"./_global":42,"./_inherit-if-required":47,"./_is-object":53,"./_iter-detect":58,"./_meta":66,"./_redefine":91,"./_redefine-all":90,"./_set-to-string-tag":96}],27:[function(require,module,exports){var core=module.exports={version:"2.4.0"};"number"==typeof __e&&(__e=core)},{}],28:[function(require,module,exports){"use strict";var $defineProperty=require("./_object-dp"),createDesc=require("./_property-desc");module.exports=function(object,index,value){index in object?$defineProperty.f(object,index,createDesc(0,value)):object[index]=value}},{"./_object-dp":71,"./_property-desc":89}],29:[function(require,module,exports){var aFunction=require("./_a-function");module.exports=function(fn,that,length){if(aFunction(fn),void 0===that)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./_a-function":7}],30:[function(require,module,exports){"use strict";var anObject=require("./_an-object"),toPrimitive=require("./_to-primitive");module.exports=function(hint){if("string"!==hint&&"number"!==hint&&"default"!==hint)throw TypeError("Incorrect hint");return toPrimitive(anObject(this),"number"!=hint)}},{"./_an-object":11,"./_to-primitive":114}],31:[function(require,module,exports){module.exports=function(it){if(void 0==it)throw TypeError("Can't call method on "+it);return it}},{}],32:[function(require,module,exports){module.exports=!require("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":38}],33:[function(require,module,exports){var isObject=require("./_is-object"),document=require("./_global").document,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}},{"./_global":42,"./_is-object":53}],34:[function(require,module,exports){module.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],35:[function(require,module,exports){var getKeys=require("./_object-keys"),gOPS=require("./_object-gops"),pIE=require("./_object-pie");module.exports=function(it){var result=getKeys(it),getSymbols=gOPS.f;if(getSymbols)for(var key,symbols=getSymbols(it),isEnum=pIE.f,i=0;symbols.length>i;)isEnum.call(it,key=symbols[i++])&&result.push(key);return result}},{"./_object-gops":77,"./_object-keys":80,"./_object-pie":81}],36:[function(require,module,exports){var global=require("./_global"),core=require("./_core"),hide=require("./_hide"),redefine=require("./_redefine"),ctx=require("./_ctx"),$export=function(type,name,source){var key,own,out,exp,IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,target=IS_GLOBAL?global:IS_STATIC?global[name]||(global[name]={}):(global[name]||{}).prototype,exports=IS_GLOBAL?core:core[name]||(core[name]={}),expProto=exports.prototype||(exports.prototype={});IS_GLOBAL&&(source=name);for(key in source)own=!IS_FORCED&&target&&void 0!==target[key],out=(own?target:source)[key],exp=IS_BIND&&own?ctx(out,global):IS_PROTO&&"function"==typeof out?ctx(Function.call,out):out,target&&redefine(target,key,out,type&$export.U),exports[key]!=out&&hide(exports,key,exp),IS_PROTO&&expProto[key]!=out&&(expProto[key]=out)};global.core=core,$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128,module.exports=$export},{"./_core":27,"./_ctx":29,"./_global":42,"./_hide":44,"./_redefine":91}],37:[function(require,module,exports){var MATCH=require("./_wks")("match");module.exports=function(KEY){var re=/./;try{"/./"[KEY](re)}catch(e){try{return re[MATCH]=!1,!"/./"[KEY](re)}catch(f){}}return!0}},{"./_wks":121}],38:[function(require,module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return!0}}},{}],39:[function(require,module,exports){"use strict";var hide=require("./_hide"),redefine=require("./_redefine"),fails=require("./_fails"),defined=require("./_defined"),wks=require("./_wks");module.exports=function(KEY,length,exec){var SYMBOL=wks(KEY),fns=exec(defined,SYMBOL,""[KEY]),strfn=fns[0],rxfn=fns[1];fails(function(){var O={};return O[SYMBOL]=function(){return 7},7!=""[KEY](O)})&&(redefine(String.prototype,KEY,strfn),hide(RegExp.prototype,SYMBOL,2==length?function(string,arg){return rxfn.call(string,this,arg)}:function(string){return rxfn.call(string,this)}))}},{"./_defined":31,"./_fails":38,"./_hide":44,"./_redefine":91,"./_wks":121}],40:[function(require,module,exports){"use strict";var anObject=require("./_an-object");module.exports=function(){var that=anObject(this),result="";return that.global&&(result+="g"),that.ignoreCase&&(result+="i"),that.multiline&&(result+="m"),that.unicode&&(result+="u"),that.sticky&&(result+="y"),result}},{"./_an-object":11}],41:[function(require,module,exports){var ctx=require("./_ctx"),call=require("./_iter-call"),isArrayIter=require("./_is-array-iter"),anObject=require("./_an-object"),toLength=require("./_to-length"),getIterFn=require("./core.get-iterator-method"),BREAK={},RETURN={},exports=module.exports=function(iterable,entries,fn,that,ITERATOR){var length,step,iterator,result,iterFn=ITERATOR?function(){return iterable}:getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0;if("function"!=typeof iterFn)throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn)){for(length=toLength(iterable.length);length>index;index++)if((result=entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index]))===BREAK||result===RETURN)return result}else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;)if((result=call(iterator,f,step.value,entries))===BREAK||result===RETURN)return result};exports.BREAK=BREAK,exports.RETURN=RETURN},{"./_an-object":11,"./_ctx":29,"./_is-array-iter":50,"./_iter-call":55,"./_to-length":112,"./core.get-iterator-method":122}],42:[function(require,module,exports){var global=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=global)},{}],43:[function(require,module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},{}],44:[function(require,module,exports){var dP=require("./_object-dp"),createDesc=require("./_property-desc");module.exports=require("./_descriptors")?function(object,key,value){return dP.f(object,key,createDesc(1,value))}:function(object,key,value){return object[key]=value,object}},{"./_descriptors":32,"./_object-dp":71,"./_property-desc":89}],45:[function(require,module,exports){module.exports=require("./_global").document&&document.documentElement},{"./_global":42}],46:[function(require,module,exports){module.exports=!require("./_descriptors")&&!require("./_fails")(function(){return 7!=Object.defineProperty(require("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":32,"./_dom-create":33,"./_fails":38}],47:[function(require,module,exports){var isObject=require("./_is-object"),setPrototypeOf=require("./_set-proto").set;module.exports=function(that,target,C){var P,S=target.constructor;return S!==C&&"function"==typeof S&&(P=S.prototype)!==C.prototype&&isObject(P)&&setPrototypeOf&&setPrototypeOf(that,P),that}},{"./_is-object":53,"./_set-proto":94}],48:[function(require,module,exports){module.exports=function(fn,args,that){var un=void 0===that;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3])}return fn.apply(that,args)}},{}],49:[function(require,module,exports){var cof=require("./_cof");module.exports=Object("z").propertyIsEnumerable(0)?Object:function(it){return"String"==cof(it)?it.split(""):Object(it)}},{"./_cof":22}],50:[function(require,module,exports){var Iterators=require("./_iterators"),ITERATOR=require("./_wks")("iterator"),ArrayProto=Array.prototype;module.exports=function(it){return void 0!==it&&(Iterators.Array===it||ArrayProto[ITERATOR]===it)}},{"./_iterators":60,"./_wks":121}],51:[function(require,module,exports){var cof=require("./_cof");module.exports=Array.isArray||function(arg){return"Array"==cof(arg)}},{"./_cof":22}],52:[function(require,module,exports){var isObject=require("./_is-object"),floor=Math.floor;module.exports=function(it){return!isObject(it)&&isFinite(it)&&floor(it)===it}},{"./_is-object":53}],53:[function(require,module,exports){module.exports=function(it){return"object"==typeof it?null!==it:"function"==typeof it}},{}],54:[function(require,module,exports){var isObject=require("./_is-object"),cof=require("./_cof"),MATCH=require("./_wks")("match");module.exports=function(it){var isRegExp;return isObject(it)&&(void 0!==(isRegExp=it[MATCH])?!!isRegExp:"RegExp"==cof(it))}},{"./_cof":22,"./_is-object":53,"./_wks":121}],55:[function(require,module,exports){var anObject=require("./_an-object");module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator.return;throw void 0!==ret&&anObject(ret.call(iterator)),e}}},{"./_an-object":11}],56:[function(require,module,exports){"use strict";var create=require("./_object-create"),descriptor=require("./_property-desc"),setToStringTag=require("./_set-to-string-tag"),IteratorPrototype={};require("./_hide")(IteratorPrototype,require("./_wks")("iterator"),function(){return this}),module.exports=function(Constructor,NAME,next){Constructor.prototype=create(IteratorPrototype,{next:descriptor(1,next)}),setToStringTag(Constructor,NAME+" Iterator")}},{"./_hide":44,"./_object-create":70,"./_property-desc":89,"./_set-to-string-tag":96,"./_wks":121}],57:[function(require,module,exports){"use strict";var LIBRARY=require("./_library"),$export=require("./_export"),redefine=require("./_redefine"),hide=require("./_hide"),has=require("./_has"),Iterators=require("./_iterators"),$iterCreate=require("./_iter-create"),setToStringTag=require("./_set-to-string-tag"),getPrototypeOf=require("./_object-gpo"),ITERATOR=require("./_wks")("iterator"),BUGGY=!([].keys&&"next"in[].keys()),returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCED){$iterCreate(Constructor,NAME,next);var methods,key,IteratorPrototype,getMethod=function(kind){if(!BUGGY&&kind in proto)return proto[kind];switch(kind){case"keys":case"values":return function(){return new Constructor(this,kind)}}return function(){return new Constructor(this,kind)}},TAG=NAME+" Iterator",DEF_VALUES="values"==DEFAULT,VALUES_BUG=!1,proto=Base.prototype,$native=proto[ITERATOR]||proto["@@iterator"]||DEFAULT&&proto[DEFAULT],$default=$native||getMethod(DEFAULT),$entries=DEFAULT?DEF_VALUES?getMethod("entries"):$default:void 0,$anyNative="Array"==NAME?proto.entries||$native:$native;if($anyNative&&(IteratorPrototype=getPrototypeOf($anyNative.call(new Base)))!==Object.prototype&&(setToStringTag(IteratorPrototype,TAG,!0),LIBRARY||has(IteratorPrototype,ITERATOR)||hide(IteratorPrototype,ITERATOR,returnThis)),DEF_VALUES&&$native&&"values"!==$native.name&&(VALUES_BUG=!0,$default=function(){return $native.call(this)}),LIBRARY&&!FORCED||!BUGGY&&!VALUES_BUG&&proto[ITERATOR]||hide(proto,ITERATOR,$default),Iterators[NAME]=$default,Iterators[TAG]=returnThis,DEFAULT)if(methods={values:DEF_VALUES?$default:getMethod("values"),keys:IS_SET?$default:getMethod("keys"),entries:$entries},FORCED)for(key in methods)key in proto||redefine(proto,key,methods[key]);else $export($export.P+$export.F*(BUGGY||VALUES_BUG),NAME,methods);return methods}},{"./_export":36,"./_has":43,"./_hide":44,"./_iter-create":56,"./_iterators":60,"./_library":62,"./_object-gpo":78,"./_redefine":91,"./_set-to-string-tag":96,"./_wks":121}],58:[function(require,module,exports){var ITERATOR=require("./_wks")("iterator"),SAFE_CLOSING=!1;try{var riter=[7][ITERATOR]();riter.return=function(){SAFE_CLOSING=!0},Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec,skipClosing){if(!skipClosing&&!SAFE_CLOSING)return!1;var safe=!1;try{var arr=[7],iter=arr[ITERATOR]();iter.next=function(){return{done:safe=!0}},arr[ITERATOR]=function(){return iter},exec(arr)}catch(e){}return safe}},{"./_wks":121}],59:[function(require,module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},{}],60:[function(require,module,exports){module.exports={}},{}],61:[function(require,module,exports){var getKeys=require("./_object-keys"),toIObject=require("./_to-iobject");module.exports=function(object,el){for(var key,O=toIObject(object),keys=getKeys(O),length=keys.length,index=0;length>index;)if(O[key=keys[index++]]===el)return key}},{"./_object-keys":80,"./_to-iobject":111}],62:[function(require,module,exports){module.exports=!1},{}],63:[function(require,module,exports){var $expm1=Math.expm1;module.exports=!$expm1||$expm1(10)>22025.465794806718||$expm1(10)<22025.465794806718||-2e-17!=$expm1(-2e-17)?function(x){return 0==(x=+x)?x:x>-1e-6&&x<1e-6?x+x*x/2:Math.exp(x)-1}:$expm1},{}],64:[function(require,module,exports){module.exports=Math.log1p||function(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:Math.log(1+x)}},{}],65:[function(require,module,exports){module.exports=Math.sign||function(x){return 0==(x=+x)||x!=x?x:x<0?-1:1}},{}],66:[function(require,module,exports){var META=require("./_uid")("meta"),isObject=require("./_is-object"),has=require("./_has"),setDesc=require("./_object-dp").f,id=0,isExtensible=Object.isExtensible||function(){return!0},FREEZE=!require("./_fails")(function(){return isExtensible(Object.preventExtensions({}))}),setMeta=function(it){setDesc(it,META,{value:{i:"O"+ ++id,w:{}}})},fastKey=function(it,create){if(!isObject(it))return"symbol"==typeof it?it:("string"==typeof it?"S":"P")+it;if(!has(it,META)){if(!isExtensible(it))return"F";if(!create)return"E";setMeta(it)}return it[META].i},getWeak=function(it,create){if(!has(it,META)){if(!isExtensible(it))return!0;if(!create)return!1;setMeta(it)}return it[META].w},onFreeze=function(it){return FREEZE&&meta.NEED&&isExtensible(it)&&!has(it,META)&&setMeta(it),it},meta=module.exports={KEY:META,NEED:!1,fastKey:fastKey,getWeak:getWeak,onFreeze:onFreeze}},{"./_fails":38,"./_has":43,"./_is-object":53,"./_object-dp":71,"./_uid":118}],67:[function(require,module,exports){var Map=require("./es6.map"),$export=require("./_export"),shared=require("./_shared")("metadata"),store=shared.store||(shared.store=new(require("./es6.weak-map"))),getOrCreateMetadataMap=function(target,targetKey,create){var targetMetadata=store.get(target);if(!targetMetadata){if(!create)return;store.set(target,targetMetadata=new Map)}var keyMetadata=targetMetadata.get(targetKey);if(!keyMetadata){if(!create)return;targetMetadata.set(targetKey,keyMetadata=new Map)}return keyMetadata},ordinaryHasOwnMetadata=function(MetadataKey,O,P){var metadataMap=getOrCreateMetadataMap(O,P,!1);return void 0!==metadataMap&&metadataMap.has(MetadataKey)},ordinaryGetOwnMetadata=function(MetadataKey,O,P){var metadataMap=getOrCreateMetadataMap(O,P,!1);return void 0===metadataMap?void 0:metadataMap.get(MetadataKey)},ordinaryDefineOwnMetadata=function(MetadataKey,MetadataValue,O,P){getOrCreateMetadataMap(O,P,!0).set(MetadataKey,MetadataValue)},ordinaryOwnMetadataKeys=function(target,targetKey){var metadataMap=getOrCreateMetadataMap(target,targetKey,!1),keys=[];return metadataMap&&metadataMap.forEach(function(_,key){keys.push(key)}),keys},toMetaKey=function(it){return void 0===it||"symbol"==typeof it?it:String(it)},exp=function(O){$export($export.S,"Reflect",O)};module.exports={store:store,map:getOrCreateMetadataMap,has:ordinaryHasOwnMetadata,get:ordinaryGetOwnMetadata,set:ordinaryDefineOwnMetadata,keys:ordinaryOwnMetadataKeys,key:toMetaKey,exp:exp}},{"./_export":36,"./_shared":98,"./es6.map":153,"./es6.weak-map":259}],68:[function(require,module,exports){var global=require("./_global"),macrotask=require("./_task").set,Observer=global.MutationObserver||global.WebKitMutationObserver,process=global.process,Promise=global.Promise,isNode="process"==require("./_cof")(process);module.exports=function(){var head,last,notify,flush=function(){var parent,fn;for(isNode&&(parent=process.domain)&&parent.exit();head;){fn=head.fn,head=head.next;try{fn()}catch(e){throw head?notify():last=void 0,e}}last=void 0,parent&&parent.enter()};if(isNode)notify=function(){process.nextTick(flush)};else if(Observer){var toggle=!0,node=document.createTextNode("");new Observer(flush).observe(node,{characterData:!0}),notify=function(){node.data=toggle=!toggle}}else if(Promise&&Promise.resolve){var promise=Promise.resolve();notify=function(){promise.then(flush)}}else notify=function(){macrotask.call(global,flush)};return function(fn){var task={fn:fn,next:void 0};last&&(last.next=task),head||(head=task,notify()),last=task}}},{"./_cof":22,"./_global":42,"./_task":108}],69:[function(require,module,exports){"use strict";var getKeys=require("./_object-keys"),gOPS=require("./_object-gops"),pIE=require("./_object-pie"),toObject=require("./_to-object"),IObject=require("./_iobject"),$assign=Object.assign;module.exports=!$assign||require("./_fails")(function(){var A={},B={},S=Symbol(),K="abcdefghijklmnopqrst";return A[S]=7,K.split("").forEach(function(k){B[k]=k}),7!=$assign({},A)[S]||Object.keys($assign({},B)).join("")!=K})?function(target,source){for(var T=toObject(target),aLen=arguments.length,index=1,getSymbols=gOPS.f,isEnum=pIE.f;aLen>index;)for(var key,S=IObject(arguments[index++]),keys=getSymbols?getKeys(S).concat(getSymbols(S)):getKeys(S),length=keys.length,j=0;length>j;)isEnum.call(S,key=keys[j++])&&(T[key]=S[key]);return T}:$assign},{"./_fails":38,"./_iobject":49,"./_object-gops":77,"./_object-keys":80,"./_object-pie":81,"./_to-object":113}],70:[function(require,module,exports){var anObject=require("./_an-object"),dPs=require("./_object-dps"),enumBugKeys=require("./_enum-bug-keys"),IE_PROTO=require("./_shared-key")("IE_PROTO"),Empty=function(){},createDict=function(){var iframeDocument,iframe=require("./_dom-create")("iframe"),i=enumBugKeys.length;for(iframe.style.display="none",require("./_html").appendChild(iframe),iframe.src="javascript:",iframeDocument=iframe.contentWindow.document,iframeDocument.open(),iframeDocument.write("<script>document.F=Object<\/script>"),iframeDocument.close(),createDict=iframeDocument.F;i--;)delete createDict.prototype[enumBugKeys[i]];return createDict()};module.exports=Object.create||function(O,Properties){var result;return null!==O?(Empty.prototype=anObject(O),result=new Empty,Empty.prototype=null,result[IE_PROTO]=O):result=createDict(),void 0===Properties?result:dPs(result,Properties)}},{"./_an-object":11,"./_dom-create":33,"./_enum-bug-keys":34,"./_html":45,"./_object-dps":72,"./_shared-key":97}],71:[function(require,module,exports){var anObject=require("./_an-object"),IE8_DOM_DEFINE=require("./_ie8-dom-define"),toPrimitive=require("./_to-primitive"),dP=Object.defineProperty;exports.f=require("./_descriptors")?Object.defineProperty:function(O,P,Attributes){if(anObject(O),P=toPrimitive(P,!0),anObject(Attributes),IE8_DOM_DEFINE)try{return dP(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");return"value"in Attributes&&(O[P]=Attributes.value),O}},{"./_an-object":11,"./_descriptors":32,"./_ie8-dom-define":46,"./_to-primitive":114}],72:[function(require,module,exports){var dP=require("./_object-dp"),anObject=require("./_an-object"),getKeys=require("./_object-keys");module.exports=require("./_descriptors")?Object.defineProperties:function(O,Properties){anObject(O);for(var P,keys=getKeys(Properties),length=keys.length,i=0;length>i;)dP.f(O,P=keys[i++],Properties[P]);return O}},{"./_an-object":11,"./_descriptors":32,"./_object-dp":71,"./_object-keys":80}],73:[function(require,module,exports){module.exports=require("./_library")||!require("./_fails")(function(){var K=Math.random();__defineSetter__.call(null,K,function(){}),delete require("./_global")[K]})},{"./_fails":38,"./_global":42,"./_library":62}],74:[function(require,module,exports){var pIE=require("./_object-pie"),createDesc=require("./_property-desc"),toIObject=require("./_to-iobject"),toPrimitive=require("./_to-primitive"),has=require("./_has"),IE8_DOM_DEFINE=require("./_ie8-dom-define"),gOPD=Object.getOwnPropertyDescriptor;exports.f=require("./_descriptors")?gOPD:function(O,P){if(O=toIObject(O),P=toPrimitive(P,!0),IE8_DOM_DEFINE)try{return gOPD(O,P)}catch(e){}if(has(O,P))return createDesc(!pIE.f.call(O,P),O[P])}},{"./_descriptors":32,"./_has":43,"./_ie8-dom-define":46,"./_object-pie":81,"./_property-desc":89,"./_to-iobject":111,"./_to-primitive":114}],75:[function(require,module,exports){var toIObject=require("./_to-iobject"),gOPN=require("./_object-gopn").f,toString={}.toString,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(it){try{return gOPN(it)}catch(e){return windowNames.slice()}};module.exports.f=function(it){return windowNames&&"[object Window]"==toString.call(it)?getWindowNames(it):gOPN(toIObject(it))}},{"./_object-gopn":76,"./_to-iobject":111}],76:[function(require,module,exports){var $keys=require("./_object-keys-internal"),hiddenKeys=require("./_enum-bug-keys").concat("length","prototype");exports.f=Object.getOwnPropertyNames||function(O){return $keys(O,hiddenKeys)}},{"./_enum-bug-keys":34,"./_object-keys-internal":79}],77:[function(require,module,exports){exports.f=Object.getOwnPropertySymbols},{}],78:[function(require,module,exports){var has=require("./_has"),toObject=require("./_to-object"),IE_PROTO=require("./_shared-key")("IE_PROTO"),ObjectProto=Object.prototype;module.exports=Object.getPrototypeOf||function(O){return O=toObject(O),has(O,IE_PROTO)?O[IE_PROTO]:"function"==typeof O.constructor&&O instanceof O.constructor?O.constructor.prototype:O instanceof Object?ObjectProto:null}},{"./_has":43,"./_shared-key":97,"./_to-object":113}],79:[function(require,module,exports){var has=require("./_has"),toIObject=require("./_to-iobject"),arrayIndexOf=require("./_array-includes")(!1),IE_PROTO=require("./_shared-key")("IE_PROTO");module.exports=function(object,names){var key,O=toIObject(object),i=0,result=[];for(key in O)key!=IE_PROTO&&has(O,key)&&result.push(key);for(;names.length>i;)has(O,key=names[i++])&&(~arrayIndexOf(result,key)||result.push(key));return result}},{"./_array-includes":15,"./_has":43,"./_shared-key":97,"./_to-iobject":111}],80:[function(require,module,exports){var $keys=require("./_object-keys-internal"),enumBugKeys=require("./_enum-bug-keys");module.exports=Object.keys||function(O){return $keys(O,enumBugKeys)}},{"./_enum-bug-keys":34,"./_object-keys-internal":79}],81:[function(require,module,exports){exports.f={}.propertyIsEnumerable},{}],82:[function(require,module,exports){var $export=require("./_export"),core=require("./_core"),fails=require("./_fails");module.exports=function(KEY,exec){var fn=(core.Object||{})[KEY]||Object[KEY],exp={};exp[KEY]=exec(fn),$export($export.S+$export.F*fails(function(){fn(1)}),"Object",exp)}},{"./_core":27,"./_export":36,"./_fails":38}],83:[function(require,module,exports){var getKeys=require("./_object-keys"),toIObject=require("./_to-iobject"),isEnum=require("./_object-pie").f;module.exports=function(isEntries){return function(it){for(var key,O=toIObject(it),keys=getKeys(O),length=keys.length,i=0,result=[];length>i;)isEnum.call(O,key=keys[i++])&&result.push(isEntries?[key,O[key]]:O[key]);return result}}},{"./_object-keys":80,"./_object-pie":81,"./_to-iobject":111}],84:[function(require,module,exports){var gOPN=require("./_object-gopn"),gOPS=require("./_object-gops"),anObject=require("./_an-object"),Reflect=require("./_global").Reflect;module.exports=Reflect&&Reflect.ownKeys||function(it){var keys=gOPN.f(anObject(it)),getSymbols=gOPS.f;return getSymbols?keys.concat(getSymbols(it)):keys}},{"./_an-object":11,"./_global":42,"./_object-gopn":76,"./_object-gops":77}],85:[function(require,module,exports){var $parseFloat=require("./_global").parseFloat,$trim=require("./_string-trim").trim;module.exports=1/$parseFloat(require("./_string-ws")+"-0")!=-1/0?function(str){var string=$trim(String(str),3),result=$parseFloat(string);return 0===result&&"-"==string.charAt(0)?-0:result}:$parseFloat},{"./_global":42,"./_string-trim":106,"./_string-ws":107}],86:[function(require,module,exports){var $parseInt=require("./_global").parseInt,$trim=require("./_string-trim").trim,ws=require("./_string-ws"),hex=/^[\-+]?0[xX]/;module.exports=8!==$parseInt(ws+"08")||22!==$parseInt(ws+"0x16")?function(str,radix){var string=$trim(String(str),3);return $parseInt(string,radix>>>0||(hex.test(string)?16:10))}:$parseInt},{"./_global":42,"./_string-trim":106,"./_string-ws":107}],87:[function(require,module,exports){"use strict";var path=require("./_path"),invoke=require("./_invoke"),aFunction=require("./_a-function");module.exports=function(){for(var fn=aFunction(this),length=arguments.length,pargs=Array(length),i=0,_=path._,holder=!1;length>i;)(pargs[i]=arguments[i++])===_&&(holder=!0);return function(){var args,that=this,aLen=arguments.length,j=0,k=0;if(!holder&&!aLen)return invoke(fn,pargs,that);if(args=pargs.slice(),holder)for(;length>j;j++)args[j]===_&&(args[j]=arguments[k++]);for(;aLen>k;)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./_a-function":7,"./_invoke":48,"./_path":88}],88:[function(require,module,exports){module.exports=require("./_global")},{"./_global":42}],
+89:[function(require,module,exports){module.exports=function(bitmap,value){return{enumerable:!(1&bitmap),configurable:!(2&bitmap),writable:!(4&bitmap),value:value}}},{}],90:[function(require,module,exports){var redefine=require("./_redefine");module.exports=function(target,src,safe){for(var key in src)redefine(target,key,src[key],safe);return target}},{"./_redefine":91}],91:[function(require,module,exports){var global=require("./_global"),hide=require("./_hide"),has=require("./_has"),SRC=require("./_uid")("src"),$toString=Function.toString,TPL=(""+$toString).split("toString");require("./_core").inspectSource=function(it){return $toString.call(it)},(module.exports=function(O,key,val,safe){var isFunction="function"==typeof val;isFunction&&(has(val,"name")||hide(val,"name",key)),O[key]!==val&&(isFunction&&(has(val,SRC)||hide(val,SRC,O[key]?""+O[key]:TPL.join(String(key)))),O===global?O[key]=val:safe?O[key]?O[key]=val:hide(O,key,val):(delete O[key],hide(O,key,val)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[SRC]||$toString.call(this)})},{"./_core":27,"./_global":42,"./_has":43,"./_hide":44,"./_uid":118}],92:[function(require,module,exports){module.exports=function(regExp,replace){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(it).replace(regExp,replacer)}}},{}],93:[function(require,module,exports){module.exports=Object.is||function(x,y){return x===y?0!==x||1/x==1/y:x!=x&&y!=y}},{}],94:[function(require,module,exports){var isObject=require("./_is-object"),anObject=require("./_an-object"),check=function(O,proto){if(anObject(O),!isObject(proto)&&null!==proto)throw TypeError(proto+": can't set as prototype!")};module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(test,buggy,set){try{set=require("./_ctx")(Function.call,require("./_object-gopd").f(Object.prototype,"__proto__").set,2),set(test,[]),buggy=!(test instanceof Array)}catch(e){buggy=!0}return function(O,proto){return check(O,proto),buggy?O.__proto__=proto:set(O,proto),O}}({},!1):void 0),check:check}},{"./_an-object":11,"./_ctx":29,"./_is-object":53,"./_object-gopd":74}],95:[function(require,module,exports){"use strict";var global=require("./_global"),dP=require("./_object-dp"),DESCRIPTORS=require("./_descriptors"),SPECIES=require("./_wks")("species");module.exports=function(KEY){var C=global[KEY];DESCRIPTORS&&C&&!C[SPECIES]&&dP.f(C,SPECIES,{configurable:!0,get:function(){return this}})}},{"./_descriptors":32,"./_global":42,"./_object-dp":71,"./_wks":121}],96:[function(require,module,exports){var def=require("./_object-dp").f,has=require("./_has"),TAG=require("./_wks")("toStringTag");module.exports=function(it,tag,stat){it&&!has(it=stat?it:it.prototype,TAG)&&def(it,TAG,{configurable:!0,value:tag})}},{"./_has":43,"./_object-dp":71,"./_wks":121}],97:[function(require,module,exports){var shared=require("./_shared")("keys"),uid=require("./_uid");module.exports=function(key){return shared[key]||(shared[key]=uid(key))}},{"./_shared":98,"./_uid":118}],98:[function(require,module,exports){var global=require("./_global"),store=global["__core-js_shared__"]||(global["__core-js_shared__"]={});module.exports=function(key){return store[key]||(store[key]={})}},{"./_global":42}],99:[function(require,module,exports){var anObject=require("./_an-object"),aFunction=require("./_a-function"),SPECIES=require("./_wks")("species");module.exports=function(O,D){var S,C=anObject(O).constructor;return void 0===C||void 0==(S=anObject(C)[SPECIES])?D:aFunction(S)}},{"./_a-function":7,"./_an-object":11,"./_wks":121}],100:[function(require,module,exports){var fails=require("./_fails");module.exports=function(method,arg){return!!method&&fails(function(){arg?method.call(null,function(){},1):method.call(null)})}},{"./_fails":38}],101:[function(require,module,exports){var toInteger=require("./_to-integer"),defined=require("./_defined");module.exports=function(TO_STRING){return function(that,pos){var a,b,s=String(defined(that)),i=toInteger(pos),l=s.length;return i<0||i>=l?TO_STRING?"":void 0:(a=s.charCodeAt(i),a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):b-56320+(a-55296<<10)+65536)}}},{"./_defined":31,"./_to-integer":110}],102:[function(require,module,exports){var isRegExp=require("./_is-regexp"),defined=require("./_defined");module.exports=function(that,searchString,NAME){if(isRegExp(searchString))throw TypeError("String#"+NAME+" doesn't accept regex!");return String(defined(that))}},{"./_defined":31,"./_is-regexp":54}],103:[function(require,module,exports){var $export=require("./_export"),fails=require("./_fails"),defined=require("./_defined"),createHTML=function(string,tag,attribute,value){var S=String(defined(string)),p1="<"+tag;return""!==attribute&&(p1+=" "+attribute+'="'+String(value).replace(/"/g,"&quot;")+'"'),p1+">"+S+"</"+tag+">"};module.exports=function(NAME,exec){var O={};O[NAME]=exec(createHTML),$export($export.P+$export.F*fails(function(){var test=""[NAME]('"');return test!==test.toLowerCase()||test.split('"').length>3}),"String",O)}},{"./_defined":31,"./_export":36,"./_fails":38}],104:[function(require,module,exports){var toLength=require("./_to-length"),repeat=require("./_string-repeat"),defined=require("./_defined");module.exports=function(that,maxLength,fillString,left){var S=String(defined(that)),stringLength=S.length,fillStr=void 0===fillString?" ":String(fillString),intMaxLength=toLength(maxLength);if(intMaxLength<=stringLength||""==fillStr)return S;var fillLen=intMaxLength-stringLength,stringFiller=repeat.call(fillStr,Math.ceil(fillLen/fillStr.length));return stringFiller.length>fillLen&&(stringFiller=stringFiller.slice(0,fillLen)),left?stringFiller+S:S+stringFiller}},{"./_defined":31,"./_string-repeat":105,"./_to-length":112}],105:[function(require,module,exports){"use strict";var toInteger=require("./_to-integer"),defined=require("./_defined");module.exports=function(count){var str=String(defined(this)),res="",n=toInteger(count);if(n<0||n==1/0)throw RangeError("Count can't be negative");for(;n>0;(n>>>=1)&&(str+=str))1&n&&(res+=str);return res}},{"./_defined":31,"./_to-integer":110}],106:[function(require,module,exports){var $export=require("./_export"),defined=require("./_defined"),fails=require("./_fails"),spaces=require("./_string-ws"),space="["+spaces+"]",non="​…",ltrim=RegExp("^"+space+space+"*"),rtrim=RegExp(space+space+"*$"),exporter=function(KEY,exec,ALIAS){var exp={},FORCE=fails(function(){return!!spaces[KEY]()||non[KEY]()!=non}),fn=exp[KEY]=FORCE?exec(trim):spaces[KEY];ALIAS&&(exp[ALIAS]=fn),$export($export.P+$export.F*FORCE,"String",exp)},trim=exporter.trim=function(string,TYPE){return string=String(defined(string)),1&TYPE&&(string=string.replace(ltrim,"")),2&TYPE&&(string=string.replace(rtrim,"")),string};module.exports=exporter},{"./_defined":31,"./_export":36,"./_fails":38,"./_string-ws":107}],107:[function(require,module,exports){module.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},{}],108:[function(require,module,exports){var defer,channel,port,ctx=require("./_ctx"),invoke=require("./_invoke"),html=require("./_html"),cel=require("./_dom-create"),global=require("./_global"),process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,counter=0,queue={},run=function(){var id=+this;if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id],fn()}},listener=function(event){run.call(event.data)};setTask&&clearTask||(setTask=function(fn){for(var args=[],i=1;arguments.length>i;)args.push(arguments[i++]);return queue[++counter]=function(){invoke("function"==typeof fn?fn:Function(fn),args)},defer(counter),counter},clearTask=function(id){delete queue[id]},"process"==require("./_cof")(process)?defer=function(id){process.nextTick(ctx(run,id,1))}:MessageChannel?(channel=new MessageChannel,port=channel.port2,channel.port1.onmessage=listener,defer=ctx(port.postMessage,port,1)):global.addEventListener&&"function"==typeof postMessage&&!global.importScripts?(defer=function(id){global.postMessage(id+"","*")},global.addEventListener("message",listener,!1)):defer="onreadystatechange"in cel("script")?function(id){html.appendChild(cel("script")).onreadystatechange=function(){html.removeChild(this),run.call(id)}}:function(id){setTimeout(ctx(run,id,1),0)}),module.exports={set:setTask,clear:clearTask}},{"./_cof":22,"./_ctx":29,"./_dom-create":33,"./_global":42,"./_html":45,"./_invoke":48}],109:[function(require,module,exports){var toInteger=require("./_to-integer"),max=Math.max,min=Math.min;module.exports=function(index,length){return index=toInteger(index),index<0?max(index+length,0):min(index,length)}},{"./_to-integer":110}],110:[function(require,module,exports){var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}},{}],111:[function(require,module,exports){var IObject=require("./_iobject"),defined=require("./_defined");module.exports=function(it){return IObject(defined(it))}},{"./_defined":31,"./_iobject":49}],112:[function(require,module,exports){var toInteger=require("./_to-integer"),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),9007199254740991):0}},{"./_to-integer":110}],113:[function(require,module,exports){var defined=require("./_defined");module.exports=function(it){return Object(defined(it))}},{"./_defined":31}],114:[function(require,module,exports){var isObject=require("./_is-object");module.exports=function(it,S){if(!isObject(it))return it;var fn,val;if(S&&"function"==typeof(fn=it.toString)&&!isObject(val=fn.call(it)))return val;if("function"==typeof(fn=it.valueOf)&&!isObject(val=fn.call(it)))return val;if(!S&&"function"==typeof(fn=it.toString)&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":53}],115:[function(require,module,exports){"use strict";if(require("./_descriptors")){var LIBRARY=require("./_library"),global=require("./_global"),fails=require("./_fails"),$export=require("./_export"),$typed=require("./_typed"),$buffer=require("./_typed-buffer"),ctx=require("./_ctx"),anInstance=require("./_an-instance"),propertyDesc=require("./_property-desc"),hide=require("./_hide"),redefineAll=require("./_redefine-all"),toInteger=require("./_to-integer"),toLength=require("./_to-length"),toIndex=require("./_to-index"),toPrimitive=require("./_to-primitive"),has=require("./_has"),same=require("./_same-value"),classof=require("./_classof"),isObject=require("./_is-object"),toObject=require("./_to-object"),isArrayIter=require("./_is-array-iter"),create=require("./_object-create"),getPrototypeOf=require("./_object-gpo"),gOPN=require("./_object-gopn").f,getIterFn=require("./core.get-iterator-method"),uid=require("./_uid"),wks=require("./_wks"),createArrayMethod=require("./_array-methods"),createArrayIncludes=require("./_array-includes"),speciesConstructor=require("./_species-constructor"),ArrayIterators=require("./es6.array.iterator"),Iterators=require("./_iterators"),$iterDetect=require("./_iter-detect"),setSpecies=require("./_set-species"),arrayFill=require("./_array-fill"),arrayCopyWithin=require("./_array-copy-within"),$DP=require("./_object-dp"),$GOPD=require("./_object-gopd"),dP=$DP.f,gOPD=$GOPD.f,RangeError=global.RangeError,TypeError=global.TypeError,Uint8Array=global.Uint8Array,ArrayProto=Array.prototype,$ArrayBuffer=$buffer.ArrayBuffer,$DataView=$buffer.DataView,arrayForEach=createArrayMethod(0),arrayFilter=createArrayMethod(2),arraySome=createArrayMethod(3),arrayEvery=createArrayMethod(4),arrayFind=createArrayMethod(5),arrayFindIndex=createArrayMethod(6),arrayIncludes=createArrayIncludes(!0),arrayIndexOf=createArrayIncludes(!1),arrayValues=ArrayIterators.values,arrayKeys=ArrayIterators.keys,arrayEntries=ArrayIterators.entries,arrayLastIndexOf=ArrayProto.lastIndexOf,arrayReduce=ArrayProto.reduce,arrayReduceRight=ArrayProto.reduceRight,arrayJoin=ArrayProto.join,arraySort=ArrayProto.sort,arraySlice=ArrayProto.slice,arrayToString=ArrayProto.toString,arrayToLocaleString=ArrayProto.toLocaleString,ITERATOR=wks("iterator"),TAG=wks("toStringTag"),TYPED_CONSTRUCTOR=uid("typed_constructor"),DEF_CONSTRUCTOR=uid("def_constructor"),ALL_CONSTRUCTORS=$typed.CONSTR,TYPED_ARRAY=$typed.TYPED,VIEW=$typed.VIEW,$map=createArrayMethod(1,function(O,length){return allocate(speciesConstructor(O,O[DEF_CONSTRUCTOR]),length)}),LITTLE_ENDIAN=fails(function(){return 1===new Uint8Array(new Uint16Array([1]).buffer)[0]}),FORCED_SET=!!Uint8Array&&!!Uint8Array.prototype.set&&fails(function(){new Uint8Array(1).set({})}),strictToLength=function(it,SAME){if(void 0===it)throw TypeError("Wrong length!");var number=+it,length=toLength(it);if(SAME&&!same(number,length))throw RangeError("Wrong length!");return length},toOffset=function(it,BYTES){var offset=toInteger(it);if(offset<0||offset%BYTES)throw RangeError("Wrong offset!");return offset},validate=function(it){if(isObject(it)&&TYPED_ARRAY in it)return it;throw TypeError(it+" is not a typed array!")},allocate=function(C,length){if(!(isObject(C)&&TYPED_CONSTRUCTOR in C))throw TypeError("It is not a typed array constructor!");return new C(length)},speciesFromList=function(O,list){return fromList(speciesConstructor(O,O[DEF_CONSTRUCTOR]),list)},fromList=function(C,list){for(var index=0,length=list.length,result=allocate(C,length);length>index;)result[index]=list[index++];return result},addGetter=function(it,key,internal){dP(it,key,{get:function(){return this._d[internal]}})},$from=function(source){var i,length,values,result,step,iterator,O=toObject(source),aLen=arguments.length,mapfn=aLen>1?arguments[1]:void 0,mapping=void 0!==mapfn,iterFn=getIterFn(O);if(void 0!=iterFn&&!isArrayIter(iterFn)){for(iterator=iterFn.call(O),values=[],i=0;!(step=iterator.next()).done;i++)values.push(step.value);O=values}for(mapping&&aLen>2&&(mapfn=ctx(mapfn,arguments[2],2)),i=0,length=toLength(O.length),result=allocate(this,length);length>i;i++)result[i]=mapping?mapfn(O[i],i):O[i];return result},$of=function(){for(var index=0,length=arguments.length,result=allocate(this,length);length>index;)result[index]=arguments[index++];return result},TO_LOCALE_BUG=!!Uint8Array&&fails(function(){arrayToLocaleString.call(new Uint8Array(1))}),$toLocaleString=function(){return arrayToLocaleString.apply(TO_LOCALE_BUG?arraySlice.call(validate(this)):validate(this),arguments)},proto={copyWithin:function(target,start){return arrayCopyWithin.call(validate(this),target,start,arguments.length>2?arguments[2]:void 0)},every:function(callbackfn){return arrayEvery(validate(this),callbackfn,arguments.length>1?arguments[1]:void 0)},fill:function(value){return arrayFill.apply(validate(this),arguments)},filter:function(callbackfn){return speciesFromList(this,arrayFilter(validate(this),callbackfn,arguments.length>1?arguments[1]:void 0))},find:function(predicate){return arrayFind(validate(this),predicate,arguments.length>1?arguments[1]:void 0)},findIndex:function(predicate){return arrayFindIndex(validate(this),predicate,arguments.length>1?arguments[1]:void 0)},forEach:function(callbackfn){arrayForEach(validate(this),callbackfn,arguments.length>1?arguments[1]:void 0)},indexOf:function(searchElement){return arrayIndexOf(validate(this),searchElement,arguments.length>1?arguments[1]:void 0)},includes:function(searchElement){return arrayIncludes(validate(this),searchElement,arguments.length>1?arguments[1]:void 0)},join:function(separator){return arrayJoin.apply(validate(this),arguments)},lastIndexOf:function(searchElement){return arrayLastIndexOf.apply(validate(this),arguments)},map:function(mapfn){return $map(validate(this),mapfn,arguments.length>1?arguments[1]:void 0)},reduce:function(callbackfn){return arrayReduce.apply(validate(this),arguments)},reduceRight:function(callbackfn){return arrayReduceRight.apply(validate(this),arguments)},reverse:function(){for(var value,that=this,length=validate(that).length,middle=Math.floor(length/2),index=0;index<middle;)value=that[index],that[index++]=that[--length],that[length]=value;return that},some:function(callbackfn){return arraySome(validate(this),callbackfn,arguments.length>1?arguments[1]:void 0)},sort:function(comparefn){return arraySort.call(validate(this),comparefn)},subarray:function(begin,end){var O=validate(this),length=O.length,$begin=toIndex(begin,length);return new(speciesConstructor(O,O[DEF_CONSTRUCTOR]))(O.buffer,O.byteOffset+$begin*O.BYTES_PER_ELEMENT,toLength((void 0===end?length:toIndex(end,length))-$begin))}},$slice=function(start,end){return speciesFromList(this,arraySlice.call(validate(this),start,end))},$set=function(arrayLike){validate(this);var offset=toOffset(arguments[1],1),length=this.length,src=toObject(arrayLike),len=toLength(src.length),index=0;if(len+offset>length)throw RangeError("Wrong length!");for(;index<len;)this[offset+index]=src[index++]},$iterators={entries:function(){return arrayEntries.call(validate(this))},keys:function(){return arrayKeys.call(validate(this))},values:function(){return arrayValues.call(validate(this))}},isTAIndex=function(target,key){return isObject(target)&&target[TYPED_ARRAY]&&"symbol"!=typeof key&&key in target&&String(+key)==String(key)},$getDesc=function(target,key){return isTAIndex(target,key=toPrimitive(key,!0))?propertyDesc(2,target[key]):gOPD(target,key)},$setDesc=function(target,key,desc){return!(isTAIndex(target,key=toPrimitive(key,!0))&&isObject(desc)&&has(desc,"value"))||has(desc,"get")||has(desc,"set")||desc.configurable||has(desc,"writable")&&!desc.writable||has(desc,"enumerable")&&!desc.enumerable?dP(target,key,desc):(target[key]=desc.value,target)};ALL_CONSTRUCTORS||($GOPD.f=$getDesc,$DP.f=$setDesc),$export($export.S+$export.F*!ALL_CONSTRUCTORS,"Object",{getOwnPropertyDescriptor:$getDesc,defineProperty:$setDesc}),fails(function(){arrayToString.call({})})&&(arrayToString=arrayToLocaleString=function(){return arrayJoin.call(this)});var $TypedArrayPrototype$=redefineAll({},proto);redefineAll($TypedArrayPrototype$,$iterators),hide($TypedArrayPrototype$,ITERATOR,$iterators.values),redefineAll($TypedArrayPrototype$,{slice:$slice,set:$set,constructor:function(){},toString:arrayToString,toLocaleString:$toLocaleString}),addGetter($TypedArrayPrototype$,"buffer","b"),addGetter($TypedArrayPrototype$,"byteOffset","o"),addGetter($TypedArrayPrototype$,"byteLength","l"),addGetter($TypedArrayPrototype$,"length","e"),dP($TypedArrayPrototype$,TAG,{get:function(){return this[TYPED_ARRAY]}}),module.exports=function(KEY,BYTES,wrapper,CLAMPED){CLAMPED=!!CLAMPED;var NAME=KEY+(CLAMPED?"Clamped":"")+"Array",ISNT_UINT8="Uint8Array"!=NAME,GETTER="get"+KEY,SETTER="set"+KEY,TypedArray=global[NAME],Base=TypedArray||{},TAC=TypedArray&&getPrototypeOf(TypedArray),FORCED=!TypedArray||!$typed.ABV,O={},TypedArrayPrototype=TypedArray&&TypedArray.prototype,getter=function(that,index){var data=that._d;return data.v[GETTER](index*BYTES+data.o,LITTLE_ENDIAN)},setter=function(that,index,value){var data=that._d;CLAMPED&&(value=(value=Math.round(value))<0?0:value>255?255:255&value),data.v[SETTER](index*BYTES+data.o,value,LITTLE_ENDIAN)},addElement=function(that,index){dP(that,index,{get:function(){return getter(this,index)},set:function(value){return setter(this,index,value)},enumerable:!0})};FORCED?(TypedArray=wrapper(function(that,data,$offset,$length){anInstance(that,TypedArray,NAME,"_d");var buffer,byteLength,length,klass,index=0,offset=0;if(isObject(data)){if(!(data instanceof $ArrayBuffer||"ArrayBuffer"==(klass=classof(data))||"SharedArrayBuffer"==klass))return TYPED_ARRAY in data?fromList(TypedArray,data):$from.call(TypedArray,data);buffer=data,offset=toOffset($offset,BYTES);var $len=data.byteLength;if(void 0===$length){if($len%BYTES)throw RangeError("Wrong length!");if((byteLength=$len-offset)<0)throw RangeError("Wrong length!")}else if((byteLength=toLength($length)*BYTES)+offset>$len)throw RangeError("Wrong length!");length=byteLength/BYTES}else length=strictToLength(data,!0),byteLength=length*BYTES,buffer=new $ArrayBuffer(byteLength);for(hide(that,"_d",{b:buffer,o:offset,l:byteLength,e:length,v:new $DataView(buffer)});index<length;)addElement(that,index++)}),TypedArrayPrototype=TypedArray.prototype=create($TypedArrayPrototype$),hide(TypedArrayPrototype,"constructor",TypedArray)):$iterDetect(function(iter){new TypedArray(null),new TypedArray(iter)},!0)||(TypedArray=wrapper(function(that,data,$offset,$length){anInstance(that,TypedArray,NAME);var klass;return isObject(data)?data instanceof $ArrayBuffer||"ArrayBuffer"==(klass=classof(data))||"SharedArrayBuffer"==klass?void 0!==$length?new Base(data,toOffset($offset,BYTES),$length):void 0!==$offset?new Base(data,toOffset($offset,BYTES)):new Base(data):TYPED_ARRAY in data?fromList(TypedArray,data):$from.call(TypedArray,data):new Base(strictToLength(data,ISNT_UINT8))}),arrayForEach(TAC!==Function.prototype?gOPN(Base).concat(gOPN(TAC)):gOPN(Base),function(key){key in TypedArray||hide(TypedArray,key,Base[key])}),TypedArray.prototype=TypedArrayPrototype,LIBRARY||(TypedArrayPrototype.constructor=TypedArray));var $nativeIterator=TypedArrayPrototype[ITERATOR],CORRECT_ITER_NAME=!!$nativeIterator&&("values"==$nativeIterator.name||void 0==$nativeIterator.name),$iterator=$iterators.values;hide(TypedArray,TYPED_CONSTRUCTOR,!0),hide(TypedArrayPrototype,TYPED_ARRAY,NAME),hide(TypedArrayPrototype,VIEW,!0),hide(TypedArrayPrototype,DEF_CONSTRUCTOR,TypedArray),(CLAMPED?new TypedArray(1)[TAG]==NAME:TAG in TypedArrayPrototype)||dP(TypedArrayPrototype,TAG,{get:function(){return NAME}}),O[NAME]=TypedArray,$export($export.G+$export.W+$export.F*(TypedArray!=Base),O),$export($export.S,NAME,{BYTES_PER_ELEMENT:BYTES,from:$from,of:$of}),"BYTES_PER_ELEMENT"in TypedArrayPrototype||hide(TypedArrayPrototype,"BYTES_PER_ELEMENT",BYTES),$export($export.P,NAME,proto),setSpecies(NAME),$export($export.P+$export.F*FORCED_SET,NAME,{set:$set}),$export($export.P+$export.F*!CORRECT_ITER_NAME,NAME,$iterators),$export($export.P+$export.F*(TypedArrayPrototype.toString!=arrayToString),NAME,{toString:arrayToString}),$export($export.P+$export.F*fails(function(){new TypedArray(1).slice()}),NAME,{slice:$slice}),$export($export.P+$export.F*(fails(function(){return[1,2].toLocaleString()!=new TypedArray([1,2]).toLocaleString()})||!fails(function(){TypedArrayPrototype.toLocaleString.call([1,2])})),NAME,{toLocaleString:$toLocaleString}),Iterators[NAME]=CORRECT_ITER_NAME?$nativeIterator:$iterator,LIBRARY||CORRECT_ITER_NAME||hide(TypedArrayPrototype,ITERATOR,$iterator)}}else module.exports=function(){}},{"./_an-instance":10,"./_array-copy-within":12,"./_array-fill":13,"./_array-includes":15,"./_array-methods":16,"./_classof":21,"./_ctx":29,"./_descriptors":32,"./_export":36,"./_fails":38,"./_global":42,"./_has":43,"./_hide":44,"./_is-array-iter":50,"./_is-object":53,"./_iter-detect":58,"./_iterators":60,"./_library":62,"./_object-create":70,"./_object-dp":71,"./_object-gopd":74,"./_object-gopn":76,"./_object-gpo":78,"./_property-desc":89,"./_redefine-all":90,"./_same-value":93,"./_set-species":95,"./_species-constructor":99,"./_to-index":109,"./_to-integer":110,"./_to-length":112,"./_to-object":113,"./_to-primitive":114,"./_typed":117,"./_typed-buffer":116,"./_uid":118,"./_wks":121,"./core.get-iterator-method":122,"./es6.array.iterator":134}],116:[function(require,module,exports){"use strict";var global=require("./_global"),DESCRIPTORS=require("./_descriptors"),LIBRARY=require("./_library"),$typed=require("./_typed"),hide=require("./_hide"),redefineAll=require("./_redefine-all"),fails=require("./_fails"),anInstance=require("./_an-instance"),toInteger=require("./_to-integer"),toLength=require("./_to-length"),gOPN=require("./_object-gopn").f,dP=require("./_object-dp").f,arrayFill=require("./_array-fill"),setToStringTag=require("./_set-to-string-tag"),$ArrayBuffer=global.ArrayBuffer,$DataView=global.DataView,Math=global.Math,RangeError=global.RangeError,Infinity=global.Infinity,BaseBuffer=$ArrayBuffer,abs=Math.abs,pow=Math.pow,floor=Math.floor,log=Math.log,LN2=Math.LN2,$BUFFER=DESCRIPTORS?"_b":"buffer",$LENGTH=DESCRIPTORS?"_l":"byteLength",$OFFSET=DESCRIPTORS?"_o":"byteOffset",packIEEE754=function(value,mLen,nBytes){var e,m,c,buffer=Array(nBytes),eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?pow(2,-24)-pow(2,-77):0,i=0,s=value<0||0===value&&1/value<0?1:0;for(value=abs(value),value!=value||value===Infinity?(m=value!=value?1:0,e=eMax):(e=floor(log(value)/LN2),value*(c=pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*pow(2,mLen),e+=eBias):(m=value*pow(2,eBias-1)*pow(2,mLen),e=0));mLen>=8;buffer[i++]=255&m,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer[i++]=255&e,e/=256,eLen-=8);return buffer[--i]|=128*s,buffer},unpackIEEE754=function(buffer,mLen,nBytes){var m,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=eLen-7,i=nBytes-1,s=buffer[i--],e=127&s;for(s>>=7;nBits>0;e=256*e+buffer[i],i--,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[i],i--,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:s?-Infinity:Infinity;m+=pow(2,mLen),e-=eBias}return(s?-1:1)*m*pow(2,e-mLen)},unpackI32=function(bytes){return bytes[3]<<24|bytes[2]<<16|bytes[1]<<8|bytes[0]},packI8=function(it){return[255&it]},packI16=function(it){return[255&it,it>>8&255]},packI32=function(it){return[255&it,it>>8&255,it>>16&255,it>>24&255]},packF64=function(it){return packIEEE754(it,52,8)},packF32=function(it){return packIEEE754(it,23,4)},addGetter=function(C,key,internal){dP(C.prototype,key,{get:function(){return this[internal]}})},get=function(view,bytes,index,isLittleEndian){var numIndex=+index,intIndex=toInteger(numIndex);if(numIndex!=intIndex||intIndex<0||intIndex+bytes>view[$LENGTH])throw RangeError("Wrong index!");var store=view[$BUFFER]._b,start=intIndex+view[$OFFSET],pack=store.slice(start,start+bytes);return isLittleEndian?pack:pack.reverse()},set=function(view,bytes,index,conversion,value,isLittleEndian){var numIndex=+index,intIndex=toInteger(numIndex);if(numIndex!=intIndex||intIndex<0||intIndex+bytes>view[$LENGTH])throw RangeError("Wrong index!");for(var store=view[$BUFFER]._b,start=intIndex+view[$OFFSET],pack=conversion(+value),i=0;i<bytes;i++)store[start+i]=pack[isLittleEndian?i:bytes-i-1]},validateArrayBufferArguments=function(that,length){anInstance(that,$ArrayBuffer,"ArrayBuffer");var numberLength=+length,byteLength=toLength(numberLength);if(numberLength!=byteLength)throw RangeError("Wrong length!");return byteLength};if($typed.ABV){if(!fails(function(){new $ArrayBuffer})||!fails(function(){new $ArrayBuffer(.5)})){$ArrayBuffer=function(length){return new BaseBuffer(validateArrayBufferArguments(this,length))};for(var key,ArrayBufferProto=$ArrayBuffer.prototype=BaseBuffer.prototype,keys=gOPN(BaseBuffer),j=0;keys.length>j;)(key=keys[j++])in $ArrayBuffer||hide($ArrayBuffer,key,BaseBuffer[key]);LIBRARY||(ArrayBufferProto.constructor=$ArrayBuffer)}var view=new $DataView(new $ArrayBuffer(2)),$setInt8=$DataView.prototype.setInt8;view.setInt8(0,2147483648),view.setInt8(1,2147483649),!view.getInt8(0)&&view.getInt8(1)||redefineAll($DataView.prototype,{setInt8:function(byteOffset,value){$setInt8.call(this,byteOffset,value<<24>>24)},setUint8:function(byteOffset,value){$setInt8.call(this,byteOffset,value<<24>>24)}},!0)}else $ArrayBuffer=function(length){var byteLength=validateArrayBufferArguments(this,length);this._b=arrayFill.call(Array(byteLength),0),this[$LENGTH]=byteLength},$DataView=function(buffer,byteOffset,byteLength){anInstance(this,$DataView,"DataView"),anInstance(buffer,$ArrayBuffer,"DataView");var bufferLength=buffer[$LENGTH],offset=toInteger(byteOffset);if(offset<0||offset>bufferLength)throw RangeError("Wrong offset!");if(byteLength=void 0===byteLength?bufferLength-offset:toLength(byteLength),offset+byteLength>bufferLength)throw RangeError("Wrong length!");this[$BUFFER]=buffer,this[$OFFSET]=offset,this[$LENGTH]=byteLength},DESCRIPTORS&&(addGetter($ArrayBuffer,"byteLength","_l"),addGetter($DataView,"buffer","_b"),addGetter($DataView,"byteLength","_l"),addGetter($DataView,"byteOffset","_o")),redefineAll($DataView.prototype,{getInt8:function(byteOffset){return get(this,1,byteOffset)[0]<<24>>24},getUint8:function(byteOffset){return get(this,1,byteOffset)[0]},getInt16:function(byteOffset){var bytes=get(this,2,byteOffset,arguments[1]);return(bytes[1]<<8|bytes[0])<<16>>16},getUint16:function(byteOffset){var bytes=get(this,2,byteOffset,arguments[1]);return bytes[1]<<8|bytes[0]},getInt32:function(byteOffset){return unpackI32(get(this,4,byteOffset,arguments[1]))},getUint32:function(byteOffset){return unpackI32(get(this,4,byteOffset,arguments[1]))>>>0},getFloat32:function(byteOffset){return unpackIEEE754(get(this,4,byteOffset,arguments[1]),23,4)},getFloat64:function(byteOffset){return unpackIEEE754(get(this,8,byteOffset,arguments[1]),52,8)},setInt8:function(byteOffset,value){set(this,1,byteOffset,packI8,value)},setUint8:function(byteOffset,value){set(this,1,byteOffset,packI8,value)},setInt16:function(byteOffset,value){set(this,2,byteOffset,packI16,value,arguments[2])},setUint16:function(byteOffset,value){set(this,2,byteOffset,packI16,value,arguments[2])},setInt32:function(byteOffset,value){set(this,4,byteOffset,packI32,value,arguments[2])},setUint32:function(byteOffset,value){set(this,4,byteOffset,packI32,value,arguments[2])},setFloat32:function(byteOffset,value){set(this,4,byteOffset,packF32,value,arguments[2])},setFloat64:function(byteOffset,value){set(this,8,byteOffset,packF64,value,arguments[2])}});setToStringTag($ArrayBuffer,"ArrayBuffer"),setToStringTag($DataView,"DataView"),hide($DataView.prototype,$typed.VIEW,!0),exports.ArrayBuffer=$ArrayBuffer,exports.DataView=$DataView},{"./_an-instance":10,"./_array-fill":13,"./_descriptors":32,"./_fails":38,"./_global":42,"./_hide":44,"./_library":62,"./_object-dp":71,"./_object-gopn":76,"./_redefine-all":90,"./_set-to-string-tag":96,"./_to-integer":110,"./_to-length":112,"./_typed":117}],117:[function(require,module,exports){for(var Typed,global=require("./_global"),hide=require("./_hide"),uid=require("./_uid"),TYPED=uid("typed_array"),VIEW=uid("view"),ABV=!(!global.ArrayBuffer||!global.DataView),CONSTR=ABV,i=0,TypedArrayConstructors="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");i<9;)(Typed=global[TypedArrayConstructors[i++]])?(hide(Typed.prototype,TYPED,!0),hide(Typed.prototype,VIEW,!0)):CONSTR=!1;module.exports={ABV:ABV,CONSTR:CONSTR,TYPED:TYPED,VIEW:VIEW}},{"./_global":42,"./_hide":44,"./_uid":118}],118:[function(require,module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(void 0===key?"":key,")_",(++id+px).toString(36))}},{}],119:[function(require,module,exports){var global=require("./_global"),core=require("./_core"),LIBRARY=require("./_library"),wksExt=require("./_wks-ext"),defineProperty=require("./_object-dp").f;module.exports=function(name){var $Symbol=core.Symbol||(core.Symbol=LIBRARY?{}:global.Symbol||{});"_"==name.charAt(0)||name in $Symbol||defineProperty($Symbol,name,{value:wksExt.f(name)})}},{"./_core":27,"./_global":42,"./_library":62,"./_object-dp":71,"./_wks-ext":120}],120:[function(require,module,exports){exports.f=require("./_wks")},{"./_wks":121}],121:[function(require,module,exports){var store=require("./_shared")("wks"),uid=require("./_uid"),Symbol=require("./_global").Symbol,USE_SYMBOL="function"==typeof Symbol;(module.exports=function(name){return store[name]||(store[name]=USE_SYMBOL&&Symbol[name]||(USE_SYMBOL?Symbol:uid)("Symbol."+name))}).store=store},{"./_global":42,"./_shared":98,"./_uid":118}],122:[function(require,module,exports){var classof=require("./_classof"),ITERATOR=require("./_wks")("iterator"),Iterators=require("./_iterators");module.exports=require("./_core").getIteratorMethod=function(it){
+if(void 0!=it)return it[ITERATOR]||it["@@iterator"]||Iterators[classof(it)]}},{"./_classof":21,"./_core":27,"./_iterators":60,"./_wks":121}],123:[function(require,module,exports){var $export=require("./_export"),$re=require("./_replacer")(/[\\^$*+?.()|[\]{}]/g,"\\$&");$export($export.S,"RegExp",{escape:function(it){return $re(it)}})},{"./_export":36,"./_replacer":92}],124:[function(require,module,exports){var $export=require("./_export");$export($export.P,"Array",{copyWithin:require("./_array-copy-within")}),require("./_add-to-unscopables")("copyWithin")},{"./_add-to-unscopables":9,"./_array-copy-within":12,"./_export":36}],125:[function(require,module,exports){"use strict";var $export=require("./_export"),$every=require("./_array-methods")(4);$export($export.P+$export.F*!require("./_strict-method")([].every,!0),"Array",{every:function(callbackfn){return $every(this,callbackfn,arguments[1])}})},{"./_array-methods":16,"./_export":36,"./_strict-method":100}],126:[function(require,module,exports){var $export=require("./_export");$export($export.P,"Array",{fill:require("./_array-fill")}),require("./_add-to-unscopables")("fill")},{"./_add-to-unscopables":9,"./_array-fill":13,"./_export":36}],127:[function(require,module,exports){"use strict";var $export=require("./_export"),$filter=require("./_array-methods")(2);$export($export.P+$export.F*!require("./_strict-method")([].filter,!0),"Array",{filter:function(callbackfn){return $filter(this,callbackfn,arguments[1])}})},{"./_array-methods":16,"./_export":36,"./_strict-method":100}],128:[function(require,module,exports){"use strict";var $export=require("./_export"),$find=require("./_array-methods")(6),KEY="findIndex",forced=!0;KEY in[]&&Array(1)[KEY](function(){forced=!1}),$export($export.P+$export.F*forced,"Array",{findIndex:function(callbackfn){return $find(this,callbackfn,arguments.length>1?arguments[1]:void 0)}}),require("./_add-to-unscopables")(KEY)},{"./_add-to-unscopables":9,"./_array-methods":16,"./_export":36}],129:[function(require,module,exports){"use strict";var $export=require("./_export"),$find=require("./_array-methods")(5),forced=!0;"find"in[]&&Array(1).find(function(){forced=!1}),$export($export.P+$export.F*forced,"Array",{find:function(callbackfn){return $find(this,callbackfn,arguments.length>1?arguments[1]:void 0)}}),require("./_add-to-unscopables")("find")},{"./_add-to-unscopables":9,"./_array-methods":16,"./_export":36}],130:[function(require,module,exports){"use strict";var $export=require("./_export"),$forEach=require("./_array-methods")(0),STRICT=require("./_strict-method")([].forEach,!0);$export($export.P+$export.F*!STRICT,"Array",{forEach:function(callbackfn){return $forEach(this,callbackfn,arguments[1])}})},{"./_array-methods":16,"./_export":36,"./_strict-method":100}],131:[function(require,module,exports){"use strict";var ctx=require("./_ctx"),$export=require("./_export"),toObject=require("./_to-object"),call=require("./_iter-call"),isArrayIter=require("./_is-array-iter"),toLength=require("./_to-length"),createProperty=require("./_create-property"),getIterFn=require("./core.get-iterator-method");$export($export.S+$export.F*!require("./_iter-detect")(function(iter){Array.from(iter)}),"Array",{from:function(arrayLike){var length,result,step,iterator,O=toObject(arrayLike),C="function"==typeof this?this:Array,aLen=arguments.length,mapfn=aLen>1?arguments[1]:void 0,mapping=void 0!==mapfn,index=0,iterFn=getIterFn(O);if(mapping&&(mapfn=ctx(mapfn,aLen>2?arguments[2]:void 0,2)),void 0==iterFn||C==Array&&isArrayIter(iterFn))for(length=toLength(O.length),result=new C(length);length>index;index++)createProperty(result,index,mapping?mapfn(O[index],index):O[index]);else for(iterator=iterFn.call(O),result=new C;!(step=iterator.next()).done;index++)createProperty(result,index,mapping?call(iterator,mapfn,[step.value,index],!0):step.value);return result.length=index,result}})},{"./_create-property":28,"./_ctx":29,"./_export":36,"./_is-array-iter":50,"./_iter-call":55,"./_iter-detect":58,"./_to-length":112,"./_to-object":113,"./core.get-iterator-method":122}],132:[function(require,module,exports){"use strict";var $export=require("./_export"),$indexOf=require("./_array-includes")(!1),$native=[].indexOf,NEGATIVE_ZERO=!!$native&&1/[1].indexOf(1,-0)<0;$export($export.P+$export.F*(NEGATIVE_ZERO||!require("./_strict-method")($native)),"Array",{indexOf:function(searchElement){return NEGATIVE_ZERO?$native.apply(this,arguments)||0:$indexOf(this,searchElement,arguments[1])}})},{"./_array-includes":15,"./_export":36,"./_strict-method":100}],133:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Array",{isArray:require("./_is-array")})},{"./_export":36,"./_is-array":51}],134:[function(require,module,exports){"use strict";var addToUnscopables=require("./_add-to-unscopables"),step=require("./_iter-step"),Iterators=require("./_iterators"),toIObject=require("./_to-iobject");module.exports=require("./_iter-define")(Array,"Array",function(iterated,kind){this._t=toIObject(iterated),this._i=0,this._k=kind},function(){var O=this._t,kind=this._k,index=this._i++;return!O||index>=O.length?(this._t=void 0,step(1)):"keys"==kind?step(0,index):"values"==kind?step(0,O[index]):step(0,[index,O[index]])},"values"),Iterators.Arguments=Iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries")},{"./_add-to-unscopables":9,"./_iter-define":57,"./_iter-step":59,"./_iterators":60,"./_to-iobject":111}],135:[function(require,module,exports){"use strict";var $export=require("./_export"),toIObject=require("./_to-iobject"),arrayJoin=[].join;$export($export.P+$export.F*(require("./_iobject")!=Object||!require("./_strict-method")(arrayJoin)),"Array",{join:function(separator){return arrayJoin.call(toIObject(this),void 0===separator?",":separator)}})},{"./_export":36,"./_iobject":49,"./_strict-method":100,"./_to-iobject":111}],136:[function(require,module,exports){"use strict";var $export=require("./_export"),toIObject=require("./_to-iobject"),toInteger=require("./_to-integer"),toLength=require("./_to-length"),$native=[].lastIndexOf,NEGATIVE_ZERO=!!$native&&1/[1].lastIndexOf(1,-0)<0;$export($export.P+$export.F*(NEGATIVE_ZERO||!require("./_strict-method")($native)),"Array",{lastIndexOf:function(searchElement){if(NEGATIVE_ZERO)return $native.apply(this,arguments)||0;var O=toIObject(this),length=toLength(O.length),index=length-1;for(arguments.length>1&&(index=Math.min(index,toInteger(arguments[1]))),index<0&&(index=length+index);index>=0;index--)if(index in O&&O[index]===searchElement)return index||0;return-1}})},{"./_export":36,"./_strict-method":100,"./_to-integer":110,"./_to-iobject":111,"./_to-length":112}],137:[function(require,module,exports){"use strict";var $export=require("./_export"),$map=require("./_array-methods")(1);$export($export.P+$export.F*!require("./_strict-method")([].map,!0),"Array",{map:function(callbackfn){return $map(this,callbackfn,arguments[1])}})},{"./_array-methods":16,"./_export":36,"./_strict-method":100}],138:[function(require,module,exports){"use strict";var $export=require("./_export"),createProperty=require("./_create-property");$export($export.S+$export.F*require("./_fails")(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function(){for(var index=0,aLen=arguments.length,result=new("function"==typeof this?this:Array)(aLen);aLen>index;)createProperty(result,index,arguments[index++]);return result.length=aLen,result}})},{"./_create-property":28,"./_export":36,"./_fails":38}],139:[function(require,module,exports){"use strict";var $export=require("./_export"),$reduce=require("./_array-reduce");$export($export.P+$export.F*!require("./_strict-method")([].reduceRight,!0),"Array",{reduceRight:function(callbackfn){return $reduce(this,callbackfn,arguments.length,arguments[1],!0)}})},{"./_array-reduce":17,"./_export":36,"./_strict-method":100}],140:[function(require,module,exports){"use strict";var $export=require("./_export"),$reduce=require("./_array-reduce");$export($export.P+$export.F*!require("./_strict-method")([].reduce,!0),"Array",{reduce:function(callbackfn){return $reduce(this,callbackfn,arguments.length,arguments[1],!1)}})},{"./_array-reduce":17,"./_export":36,"./_strict-method":100}],141:[function(require,module,exports){"use strict";var $export=require("./_export"),html=require("./_html"),cof=require("./_cof"),toIndex=require("./_to-index"),toLength=require("./_to-length"),arraySlice=[].slice;$export($export.P+$export.F*require("./_fails")(function(){html&&arraySlice.call(html)}),"Array",{slice:function(begin,end){var len=toLength(this.length),klass=cof(this);if(end=void 0===end?len:end,"Array"==klass)return arraySlice.call(this,begin,end);for(var start=toIndex(begin,len),upTo=toIndex(end,len),size=toLength(upTo-start),cloned=Array(size),i=0;i<size;i++)cloned[i]="String"==klass?this.charAt(start+i):this[start+i];return cloned}})},{"./_cof":22,"./_export":36,"./_fails":38,"./_html":45,"./_to-index":109,"./_to-length":112}],142:[function(require,module,exports){"use strict";var $export=require("./_export"),$some=require("./_array-methods")(3);$export($export.P+$export.F*!require("./_strict-method")([].some,!0),"Array",{some:function(callbackfn){return $some(this,callbackfn,arguments[1])}})},{"./_array-methods":16,"./_export":36,"./_strict-method":100}],143:[function(require,module,exports){"use strict";var $export=require("./_export"),aFunction=require("./_a-function"),toObject=require("./_to-object"),fails=require("./_fails"),$sort=[].sort,test=[1,2,3];$export($export.P+$export.F*(fails(function(){test.sort(void 0)})||!fails(function(){test.sort(null)})||!require("./_strict-method")($sort)),"Array",{sort:function(comparefn){return void 0===comparefn?$sort.call(toObject(this)):$sort.call(toObject(this),aFunction(comparefn))}})},{"./_a-function":7,"./_export":36,"./_fails":38,"./_strict-method":100,"./_to-object":113}],144:[function(require,module,exports){require("./_set-species")("Array")},{"./_set-species":95}],145:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Date",{now:function(){return(new Date).getTime()}})},{"./_export":36}],146:[function(require,module,exports){"use strict";var $export=require("./_export"),fails=require("./_fails"),getTime=Date.prototype.getTime,lz=function(num){return num>9?num:"0"+num};$export($export.P+$export.F*(fails(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!fails(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(getTime.call(this)))throw RangeError("Invalid time value");var d=this,y=d.getUTCFullYear(),m=d.getUTCMilliseconds(),s=y<0?"-":y>9999?"+":"";return s+("00000"+Math.abs(y)).slice(s?-6:-4)+"-"+lz(d.getUTCMonth()+1)+"-"+lz(d.getUTCDate())+"T"+lz(d.getUTCHours())+":"+lz(d.getUTCMinutes())+":"+lz(d.getUTCSeconds())+"."+(m>99?m:"0"+lz(m))+"Z"}})},{"./_export":36,"./_fails":38}],147:[function(require,module,exports){"use strict";var $export=require("./_export"),toObject=require("./_to-object"),toPrimitive=require("./_to-primitive");$export($export.P+$export.F*require("./_fails")(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(key){var O=toObject(this),pv=toPrimitive(O);return"number"!=typeof pv||isFinite(pv)?O.toISOString():null}})},{"./_export":36,"./_fails":38,"./_to-object":113,"./_to-primitive":114}],148:[function(require,module,exports){var TO_PRIMITIVE=require("./_wks")("toPrimitive"),proto=Date.prototype;TO_PRIMITIVE in proto||require("./_hide")(proto,TO_PRIMITIVE,require("./_date-to-primitive"))},{"./_date-to-primitive":30,"./_hide":44,"./_wks":121}],149:[function(require,module,exports){var DateProto=Date.prototype,$toString=DateProto.toString,getTime=DateProto.getTime;new Date(NaN)+""!="Invalid Date"&&require("./_redefine")(DateProto,"toString",function(){var value=getTime.call(this);return value===value?$toString.call(this):"Invalid Date"})},{"./_redefine":91}],150:[function(require,module,exports){var $export=require("./_export");$export($export.P,"Function",{bind:require("./_bind")})},{"./_bind":20,"./_export":36}],151:[function(require,module,exports){"use strict";var isObject=require("./_is-object"),getPrototypeOf=require("./_object-gpo"),HAS_INSTANCE=require("./_wks")("hasInstance"),FunctionProto=Function.prototype;HAS_INSTANCE in FunctionProto||require("./_object-dp").f(FunctionProto,HAS_INSTANCE,{value:function(O){if("function"!=typeof this||!isObject(O))return!1;if(!isObject(this.prototype))return O instanceof this;for(;O=getPrototypeOf(O);)if(this.prototype===O)return!0;return!1}})},{"./_is-object":53,"./_object-dp":71,"./_object-gpo":78,"./_wks":121}],152:[function(require,module,exports){var dP=require("./_object-dp").f,createDesc=require("./_property-desc"),has=require("./_has"),FProto=Function.prototype,isExtensible=Object.isExtensible||function(){return!0};"name"in FProto||require("./_descriptors")&&dP(FProto,"name",{configurable:!0,get:function(){try{var that=this,name=(""+that).match(/^\s*function ([^ (]*)/)[1];return has(that,"name")||!isExtensible(that)||dP(that,"name",createDesc(5,name)),name}catch(e){return""}}})},{"./_descriptors":32,"./_has":43,"./_object-dp":71,"./_property-desc":89}],153:[function(require,module,exports){"use strict";var strong=require("./_collection-strong");module.exports=require("./_collection")("Map",function(get){return function(){return get(this,arguments.length>0?arguments[0]:void 0)}},{get:function(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function(key,value){return strong.def(this,0===key?0:key,value)}},strong,!0)},{"./_collection":26,"./_collection-strong":23}],154:[function(require,module,exports){var $export=require("./_export"),log1p=require("./_math-log1p"),sqrt=Math.sqrt,$acosh=Math.acosh;$export($export.S+$export.F*!($acosh&&710==Math.floor($acosh(Number.MAX_VALUE))&&$acosh(1/0)==1/0),"Math",{acosh:function(x){return(x=+x)<1?NaN:x>94906265.62425156?Math.log(x)+Math.LN2:log1p(x-1+sqrt(x-1)*sqrt(x+1))}})},{"./_export":36,"./_math-log1p":64}],155:[function(require,module,exports){function asinh(x){return isFinite(x=+x)&&0!=x?x<0?-asinh(-x):Math.log(x+Math.sqrt(x*x+1)):x}var $export=require("./_export"),$asinh=Math.asinh;$export($export.S+$export.F*!($asinh&&1/$asinh(0)>0),"Math",{asinh:asinh})},{"./_export":36}],156:[function(require,module,exports){var $export=require("./_export"),$atanh=Math.atanh;$export($export.S+$export.F*!($atanh&&1/$atanh(-0)<0),"Math",{atanh:function(x){return 0==(x=+x)?x:Math.log((1+x)/(1-x))/2}})},{"./_export":36}],157:[function(require,module,exports){var $export=require("./_export"),sign=require("./_math-sign");$export($export.S,"Math",{cbrt:function(x){return sign(x=+x)*Math.pow(Math.abs(x),1/3)}})},{"./_export":36,"./_math-sign":65}],158:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Math",{clz32:function(x){return(x>>>=0)?31-Math.floor(Math.log(x+.5)*Math.LOG2E):32}})},{"./_export":36}],159:[function(require,module,exports){var $export=require("./_export"),exp=Math.exp;$export($export.S,"Math",{cosh:function(x){return(exp(x=+x)+exp(-x))/2}})},{"./_export":36}],160:[function(require,module,exports){var $export=require("./_export"),$expm1=require("./_math-expm1");$export($export.S+$export.F*($expm1!=Math.expm1),"Math",{expm1:$expm1})},{"./_export":36,"./_math-expm1":63}],161:[function(require,module,exports){var $export=require("./_export"),sign=require("./_math-sign"),pow=Math.pow,EPSILON=pow(2,-52),EPSILON32=pow(2,-23),MAX32=pow(2,127)*(2-EPSILON32),MIN32=pow(2,-126),roundTiesToEven=function(n){return n+1/EPSILON-1/EPSILON};$export($export.S,"Math",{fround:function(x){var a,result,$abs=Math.abs(x),$sign=sign(x);return $abs<MIN32?$sign*roundTiesToEven($abs/MIN32/EPSILON32)*MIN32*EPSILON32:(a=(1+EPSILON32/EPSILON)*$abs,result=a-(a-$abs),result>MAX32||result!=result?$sign*(1/0):$sign*result)}})},{"./_export":36,"./_math-sign":65}],162:[function(require,module,exports){var $export=require("./_export"),abs=Math.abs;$export($export.S,"Math",{hypot:function(value1,value2){for(var arg,div,sum=0,i=0,aLen=arguments.length,larg=0;i<aLen;)arg=abs(arguments[i++]),larg<arg?(div=larg/arg,sum=sum*div*div+1,larg=arg):arg>0?(div=arg/larg,sum+=div*div):sum+=arg;return larg===1/0?1/0:larg*Math.sqrt(sum)}})},{"./_export":36}],163:[function(require,module,exports){var $export=require("./_export"),$imul=Math.imul;$export($export.S+$export.F*require("./_fails")(function(){return-5!=$imul(4294967295,5)||2!=$imul.length}),"Math",{imul:function(x,y){var xn=+x,yn=+y,xl=65535&xn,yl=65535&yn;return 0|xl*yl+((65535&xn>>>16)*yl+xl*(65535&yn>>>16)<<16>>>0)}})},{"./_export":36,"./_fails":38}],164:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Math",{log10:function(x){return Math.log(x)/Math.LN10}})},{"./_export":36}],165:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Math",{log1p:require("./_math-log1p")})},{"./_export":36,"./_math-log1p":64}],166:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Math",{log2:function(x){return Math.log(x)/Math.LN2}})},{"./_export":36}],167:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Math",{sign:require("./_math-sign")})},{"./_export":36,"./_math-sign":65}],168:[function(require,module,exports){var $export=require("./_export"),expm1=require("./_math-expm1"),exp=Math.exp;$export($export.S+$export.F*require("./_fails")(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(x){return Math.abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(Math.E/2)}})},{"./_export":36,"./_fails":38,"./_math-expm1":63}],169:[function(require,module,exports){var $export=require("./_export"),expm1=require("./_math-expm1"),exp=Math.exp;$export($export.S,"Math",{tanh:function(x){var a=expm1(x=+x),b=expm1(-x);return a==1/0?1:b==1/0?-1:(a-b)/(exp(x)+exp(-x))}})},{"./_export":36,"./_math-expm1":63}],170:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Math",{trunc:function(it){return(it>0?Math.floor:Math.ceil)(it)}})},{"./_export":36}],171:[function(require,module,exports){"use strict";var global=require("./_global"),has=require("./_has"),cof=require("./_cof"),inheritIfRequired=require("./_inherit-if-required"),toPrimitive=require("./_to-primitive"),fails=require("./_fails"),gOPN=require("./_object-gopn").f,gOPD=require("./_object-gopd").f,dP=require("./_object-dp").f,$trim=require("./_string-trim").trim,$Number=global.Number,Base=$Number,proto=$Number.prototype,BROKEN_COF="Number"==cof(require("./_object-create")(proto)),TRIM="trim"in String.prototype,toNumber=function(argument){var it=toPrimitive(argument,!1);if("string"==typeof it&&it.length>2){it=TRIM?it.trim():$trim(it,3);var third,radix,maxCode,first=it.charCodeAt(0);if(43===first||45===first){if(88===(third=it.charCodeAt(2))||120===third)return NaN}else if(48===first){switch(it.charCodeAt(1)){case 66:case 98:radix=2,maxCode=49;break;case 79:case 111:radix=8,maxCode=55;break;default:return+it}for(var code,digits=it.slice(2),i=0,l=digits.length;i<l;i++)if((code=digits.charCodeAt(i))<48||code>maxCode)return NaN;return parseInt(digits,radix)}}return+it};if(!$Number(" 0o1")||!$Number("0b1")||$Number("+0x1")){$Number=function(value){var it=arguments.length<1?0:value,that=this;return that instanceof $Number&&(BROKEN_COF?fails(function(){proto.valueOf.call(that)}):"Number"!=cof(that))?inheritIfRequired(new Base(toNumber(it)),that,$Number):toNumber(it)};for(var key,keys=require("./_descriptors")?gOPN(Base):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),j=0;keys.length>j;j++)has(Base,key=keys[j])&&!has($Number,key)&&dP($Number,key,gOPD(Base,key));$Number.prototype=proto,proto.constructor=$Number,require("./_redefine")(global,"Number",$Number)}},{"./_cof":22,"./_descriptors":32,"./_fails":38,"./_global":42,"./_has":43,"./_inherit-if-required":47,"./_object-create":70,"./_object-dp":71,"./_object-gopd":74,"./_object-gopn":76,"./_redefine":91,"./_string-trim":106,"./_to-primitive":114}],172:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Number",{EPSILON:Math.pow(2,-52)})},{"./_export":36}],173:[function(require,module,exports){var $export=require("./_export"),_isFinite=require("./_global").isFinite;$export($export.S,"Number",{isFinite:function(it){return"number"==typeof it&&_isFinite(it)}})},{"./_export":36,"./_global":42}],174:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Number",{isInteger:require("./_is-integer")})},{"./_export":36,"./_is-integer":52}],175:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Number",{isNaN:function(number){return number!=number}})},{"./_export":36}],176:[function(require,module,exports){var $export=require("./_export"),isInteger=require("./_is-integer"),abs=Math.abs;$export($export.S,"Number",{isSafeInteger:function(number){return isInteger(number)&&abs(number)<=9007199254740991}})},{"./_export":36,"./_is-integer":52}],177:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":36}],178:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{"./_export":36}],179:[function(require,module,exports){var $export=require("./_export"),$parseFloat=require("./_parse-float");$export($export.S+$export.F*(Number.parseFloat!=$parseFloat),"Number",{parseFloat:$parseFloat})},{"./_export":36,"./_parse-float":85}],180:[function(require,module,exports){var $export=require("./_export"),$parseInt=require("./_parse-int");$export($export.S+$export.F*(Number.parseInt!=$parseInt),"Number",{parseInt:$parseInt})},{"./_export":36,"./_parse-int":86}],181:[function(require,module,exports){"use strict";var $export=require("./_export"),toInteger=require("./_to-integer"),aNumberValue=require("./_a-number-value"),repeat=require("./_string-repeat"),$toFixed=1..toFixed,floor=Math.floor,data=[0,0,0,0,0,0],ERROR="Number.toFixed: incorrect invocation!",multiply=function(n,c){for(var i=-1,c2=c;++i<6;)c2+=n*data[i],data[i]=c2%1e7,c2=floor(c2/1e7)},divide=function(n){for(var i=6,c=0;--i>=0;)c+=data[i],data[i]=floor(c/n),c=c%n*1e7},numToString=function(){for(var i=6,s="";--i>=0;)if(""!==s||0===i||0!==data[i]){var t=String(data[i]);s=""===s?t:s+repeat.call("0",7-t.length)+t}return s},pow=function(x,n,acc){return 0===n?acc:n%2==1?pow(x,n-1,acc*x):pow(x*x,n/2,acc)},log=function(x){for(var n=0,x2=x;x2>=4096;)n+=12,x2/=4096;for(;x2>=2;)n+=1,x2/=2;return n};$export($export.P+$export.F*(!!$toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!require("./_fails")(function(){$toFixed.call({})})),"Number",{toFixed:function(fractionDigits){var e,z,j,k,x=aNumberValue(this,ERROR),f=toInteger(fractionDigits),s="",m="0";if(f<0||f>20)throw RangeError(ERROR);if(x!=x)return"NaN";if(x<=-1e21||x>=1e21)return String(x);if(x<0&&(s="-",x=-x),x>1e-21)if(e=log(x*pow(2,69,1))-69,z=e<0?x*pow(2,-e,1):x/pow(2,e,1),z*=4503599627370496,(e=52-e)>0){for(multiply(0,z),j=f;j>=7;)multiply(1e7,0),j-=7;for(multiply(pow(10,j,1),0),j=e-1;j>=23;)divide(1<<23),j-=23;divide(1<<j),multiply(1,1),divide(2),m=numToString()}else multiply(0,z),multiply(1<<-e,0),m=numToString()+repeat.call("0",f);return f>0?(k=m.length,m=s+(k<=f?"0."+repeat.call("0",f-k)+m:m.slice(0,k-f)+"."+m.slice(k-f))):m=s+m,m}})},{"./_a-number-value":8,"./_export":36,"./_fails":38,"./_string-repeat":105,"./_to-integer":110}],182:[function(require,module,exports){"use strict";var $export=require("./_export"),$fails=require("./_fails"),aNumberValue=require("./_a-number-value"),$toPrecision=1..toPrecision;$export($export.P+$export.F*($fails(function(){return"1"!==$toPrecision.call(1,void 0)})||!$fails(function(){$toPrecision.call({})})),"Number",{toPrecision:function(precision){var that=aNumberValue(this,"Number#toPrecision: incorrect invocation!");return void 0===precision?$toPrecision.call(that):$toPrecision.call(that,precision)}})},{"./_a-number-value":8,"./_export":36,"./_fails":38}],183:[function(require,module,exports){var $export=require("./_export");$export($export.S+$export.F,"Object",{assign:require("./_object-assign")})},{"./_export":36,"./_object-assign":69}],184:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Object",{create:require("./_object-create")})},{"./_export":36,"./_object-create":70}],185:[function(require,module,exports){var $export=require("./_export");$export($export.S+$export.F*!require("./_descriptors"),"Object",{defineProperties:require("./_object-dps")})},{"./_descriptors":32,"./_export":36,"./_object-dps":72}],186:[function(require,module,exports){var $export=require("./_export");$export($export.S+$export.F*!require("./_descriptors"),"Object",{defineProperty:require("./_object-dp").f})},{"./_descriptors":32,"./_export":36,"./_object-dp":71}],187:[function(require,module,exports){var isObject=require("./_is-object"),meta=require("./_meta").onFreeze;require("./_object-sap")("freeze",function($freeze){return function(it){return $freeze&&isObject(it)?$freeze(meta(it)):it}})},{"./_is-object":53,"./_meta":66,"./_object-sap":82}],188:[function(require,module,exports){var toIObject=require("./_to-iobject"),$getOwnPropertyDescriptor=require("./_object-gopd").f;require("./_object-sap")("getOwnPropertyDescriptor",function(){return function(it,key){return $getOwnPropertyDescriptor(toIObject(it),key)}})},{"./_object-gopd":74,"./_object-sap":82,"./_to-iobject":111}],189:[function(require,module,exports){require("./_object-sap")("getOwnPropertyNames",function(){return require("./_object-gopn-ext").f})},{"./_object-gopn-ext":75,"./_object-sap":82}],190:[function(require,module,exports){var toObject=require("./_to-object"),$getPrototypeOf=require("./_object-gpo");require("./_object-sap")("getPrototypeOf",function(){return function(it){return $getPrototypeOf(toObject(it))}})},{"./_object-gpo":78,"./_object-sap":82,"./_to-object":113}],191:[function(require,module,exports){var isObject=require("./_is-object");require("./_object-sap")("isExtensible",function($isExtensible){return function(it){return!!isObject(it)&&(!$isExtensible||$isExtensible(it))}})},{"./_is-object":53,"./_object-sap":82}],192:[function(require,module,exports){var isObject=require("./_is-object");require("./_object-sap")("isFrozen",function($isFrozen){return function(it){return!isObject(it)||!!$isFrozen&&$isFrozen(it)}})},{"./_is-object":53,"./_object-sap":82}],193:[function(require,module,exports){var isObject=require("./_is-object");require("./_object-sap")("isSealed",function($isSealed){return function(it){return!isObject(it)||!!$isSealed&&$isSealed(it)}})},{"./_is-object":53,"./_object-sap":82}],194:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Object",{is:require("./_same-value")})},{"./_export":36,"./_same-value":93}],195:[function(require,module,exports){var toObject=require("./_to-object"),$keys=require("./_object-keys");require("./_object-sap")("keys",function(){return function(it){return $keys(toObject(it))}})},{"./_object-keys":80,"./_object-sap":82,"./_to-object":113}],196:[function(require,module,exports){var isObject=require("./_is-object"),meta=require("./_meta").onFreeze;require("./_object-sap")("preventExtensions",function($preventExtensions){return function(it){return $preventExtensions&&isObject(it)?$preventExtensions(meta(it)):it}})},{"./_is-object":53,"./_meta":66,"./_object-sap":82}],197:[function(require,module,exports){var isObject=require("./_is-object"),meta=require("./_meta").onFreeze;require("./_object-sap")("seal",function($seal){return function(it){return $seal&&isObject(it)?$seal(meta(it)):it}})},{"./_is-object":53,"./_meta":66,"./_object-sap":82}],198:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Object",{setPrototypeOf:require("./_set-proto").set})},{"./_export":36,"./_set-proto":94}],199:[function(require,module,exports){"use strict";var classof=require("./_classof"),test={};test[require("./_wks")("toStringTag")]="z",test+""!="[object z]"&&require("./_redefine")(Object.prototype,"toString",function(){return"[object "+classof(this)+"]"},!0)},{"./_classof":21,"./_redefine":91,"./_wks":121}],200:[function(require,module,exports){var $export=require("./_export"),$parseFloat=require("./_parse-float");$export($export.G+$export.F*(parseFloat!=$parseFloat),{parseFloat:$parseFloat})},{"./_export":36,"./_parse-float":85}],201:[function(require,module,exports){var $export=require("./_export"),$parseInt=require("./_parse-int");$export($export.G+$export.F*(parseInt!=$parseInt),{parseInt:$parseInt})},{"./_export":36,"./_parse-int":86}],202:[function(require,module,exports){"use strict";var Internal,GenericPromiseCapability,Wrapper,LIBRARY=require("./_library"),global=require("./_global"),ctx=require("./_ctx"),classof=require("./_classof"),$export=require("./_export"),isObject=require("./_is-object"),aFunction=require("./_a-function"),anInstance=require("./_an-instance"),forOf=require("./_for-of"),speciesConstructor=require("./_species-constructor"),task=require("./_task").set,microtask=require("./_microtask")(),TypeError=global.TypeError,process=global.process,$Promise=global.Promise,process=global.process,isNode="process"==classof(process),empty=function(){},USE_NATIVE=!!function(){try{var promise=$Promise.resolve(1),FakePromise=(promise.constructor={})[require("./_wks")("species")]=function(exec){exec(empty,empty)};return(isNode||"function"==typeof PromiseRejectionEvent)&&promise.then(empty)instanceof FakePromise}catch(e){}}(),sameConstructor=function(a,b){return a===b||a===$Promise&&b===Wrapper},isThenable=function(it){var then;return!(!isObject(it)||"function"!=typeof(then=it.then))&&then},newPromiseCapability=function(C){return sameConstructor($Promise,C)?new PromiseCapability(C):new GenericPromiseCapability(C)},PromiseCapability=GenericPromiseCapability=function(C){var resolve,reject;this.promise=new C(function($$resolve,$$reject){if(void 0!==resolve||void 0!==reject)throw TypeError("Bad Promise constructor");resolve=$$resolve,reject=$$reject}),this.resolve=aFunction(resolve),this.reject=aFunction(reject)},perform=function(exec){try{exec()}catch(e){return{error:e}}},notify=function(promise,isReject){if(!promise._n){promise._n=!0;var chain=promise._c;microtask(function(){for(var value=promise._v,ok=1==promise._s,i=0;chain.length>i;)!function(reaction){var result,then,handler=ok?reaction.ok:reaction.fail,resolve=reaction.resolve,reject=reaction.reject,domain=reaction.domain;try{handler?(ok||(2==promise._h&&onHandleUnhandled(promise),promise._h=1),!0===handler?result=value:(domain&&domain.enter(),result=handler(value),domain&&domain.exit()),result===reaction.promise?reject(TypeError("Promise-chain cycle")):(then=isThenable(result))?then.call(result,resolve,reject):resolve(result)):reject(value)}catch(e){reject(e)}}(chain[i++]);promise._c=[],promise._n=!1,isReject&&!promise._h&&onUnhandled(promise)})}},onUnhandled=function(promise){task.call(global,function(){var abrupt,handler,console,value=promise._v;if(isUnhandled(promise)&&(abrupt=perform(function(){isNode?process.emit("unhandledRejection",value,promise):(handler=global.onunhandledrejection)?handler({promise:promise,reason:value}):(console=global.console)&&console.error&&console.error("Unhandled promise rejection",value)}),promise._h=isNode||isUnhandled(promise)?2:1),promise._a=void 0,abrupt)throw abrupt.error})},isUnhandled=function(promise){
+if(1==promise._h)return!1;for(var reaction,chain=promise._a||promise._c,i=0;chain.length>i;)if(reaction=chain[i++],reaction.fail||!isUnhandled(reaction.promise))return!1;return!0},onHandleUnhandled=function(promise){task.call(global,function(){var handler;isNode?process.emit("rejectionHandled",promise):(handler=global.onrejectionhandled)&&handler({promise:promise,reason:promise._v})})},$reject=function(value){var promise=this;promise._d||(promise._d=!0,promise=promise._w||promise,promise._v=value,promise._s=2,promise._a||(promise._a=promise._c.slice()),notify(promise,!0))},$resolve=function(value){var then,promise=this;if(!promise._d){promise._d=!0,promise=promise._w||promise;try{if(promise===value)throw TypeError("Promise can't be resolved itself");(then=isThenable(value))?microtask(function(){var wrapper={_w:promise,_d:!1};try{then.call(value,ctx($resolve,wrapper,1),ctx($reject,wrapper,1))}catch(e){$reject.call(wrapper,e)}}):(promise._v=value,promise._s=1,notify(promise,!1))}catch(e){$reject.call({_w:promise,_d:!1},e)}}};USE_NATIVE||($Promise=function(executor){anInstance(this,$Promise,"Promise","_h"),aFunction(executor),Internal.call(this);try{executor(ctx($resolve,this,1),ctx($reject,this,1))}catch(err){$reject.call(this,err)}},Internal=function(executor){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},Internal.prototype=require("./_redefine-all")($Promise.prototype,{then:function(onFulfilled,onRejected){var reaction=newPromiseCapability(speciesConstructor(this,$Promise));return reaction.ok="function"!=typeof onFulfilled||onFulfilled,reaction.fail="function"==typeof onRejected&&onRejected,reaction.domain=isNode?process.domain:void 0,this._c.push(reaction),this._a&&this._a.push(reaction),this._s&&notify(this,!1),reaction.promise},catch:function(onRejected){return this.then(void 0,onRejected)}}),PromiseCapability=function(){var promise=new Internal;this.promise=promise,this.resolve=ctx($resolve,promise,1),this.reject=ctx($reject,promise,1)}),$export($export.G+$export.W+$export.F*!USE_NATIVE,{Promise:$Promise}),require("./_set-to-string-tag")($Promise,"Promise"),require("./_set-species")("Promise"),Wrapper=require("./_core").Promise,$export($export.S+$export.F*!USE_NATIVE,"Promise",{reject:function(r){var capability=newPromiseCapability(this);return(0,capability.reject)(r),capability.promise}}),$export($export.S+$export.F*(LIBRARY||!USE_NATIVE),"Promise",{resolve:function(x){if(x instanceof $Promise&&sameConstructor(x.constructor,this))return x;var capability=newPromiseCapability(this);return(0,capability.resolve)(x),capability.promise}}),$export($export.S+$export.F*!(USE_NATIVE&&require("./_iter-detect")(function(iter){$Promise.all(iter).catch(empty)})),"Promise",{all:function(iterable){var C=this,capability=newPromiseCapability(C),resolve=capability.resolve,reject=capability.reject,abrupt=perform(function(){var values=[],index=0,remaining=1;forOf(iterable,!1,function(promise){var $index=index++,alreadyCalled=!1;values.push(void 0),remaining++,C.resolve(promise).then(function(value){alreadyCalled||(alreadyCalled=!0,values[$index]=value,--remaining||resolve(values))},reject)}),--remaining||resolve(values)});return abrupt&&reject(abrupt.error),capability.promise},race:function(iterable){var C=this,capability=newPromiseCapability(C),reject=capability.reject,abrupt=perform(function(){forOf(iterable,!1,function(promise){C.resolve(promise).then(capability.resolve,reject)})});return abrupt&&reject(abrupt.error),capability.promise}})},{"./_a-function":7,"./_an-instance":10,"./_classof":21,"./_core":27,"./_ctx":29,"./_export":36,"./_for-of":41,"./_global":42,"./_is-object":53,"./_iter-detect":58,"./_library":62,"./_microtask":68,"./_redefine-all":90,"./_set-species":95,"./_set-to-string-tag":96,"./_species-constructor":99,"./_task":108,"./_wks":121}],203:[function(require,module,exports){var $export=require("./_export"),aFunction=require("./_a-function"),anObject=require("./_an-object"),rApply=(require("./_global").Reflect||{}).apply,fApply=Function.apply;$export($export.S+$export.F*!require("./_fails")(function(){rApply(function(){})}),"Reflect",{apply:function(target,thisArgument,argumentsList){var T=aFunction(target),L=anObject(argumentsList);return rApply?rApply(T,thisArgument,L):fApply.call(T,thisArgument,L)}})},{"./_a-function":7,"./_an-object":11,"./_export":36,"./_fails":38,"./_global":42}],204:[function(require,module,exports){var $export=require("./_export"),create=require("./_object-create"),aFunction=require("./_a-function"),anObject=require("./_an-object"),isObject=require("./_is-object"),fails=require("./_fails"),bind=require("./_bind"),rConstruct=(require("./_global").Reflect||{}).construct,NEW_TARGET_BUG=fails(function(){function F(){}return!(rConstruct(function(){},[],F)instanceof F)}),ARGS_BUG=!fails(function(){rConstruct(function(){})});$export($export.S+$export.F*(NEW_TARGET_BUG||ARGS_BUG),"Reflect",{construct:function(Target,args){aFunction(Target),anObject(args);var newTarget=arguments.length<3?Target:aFunction(arguments[2]);if(ARGS_BUG&&!NEW_TARGET_BUG)return rConstruct(Target,args,newTarget);if(Target==newTarget){switch(args.length){case 0:return new Target;case 1:return new Target(args[0]);case 2:return new Target(args[0],args[1]);case 3:return new Target(args[0],args[1],args[2]);case 4:return new Target(args[0],args[1],args[2],args[3])}var $args=[null];return $args.push.apply($args,args),new(bind.apply(Target,$args))}var proto=newTarget.prototype,instance=create(isObject(proto)?proto:Object.prototype),result=Function.apply.call(Target,instance,args);return isObject(result)?result:instance}})},{"./_a-function":7,"./_an-object":11,"./_bind":20,"./_export":36,"./_fails":38,"./_global":42,"./_is-object":53,"./_object-create":70}],205:[function(require,module,exports){var dP=require("./_object-dp"),$export=require("./_export"),anObject=require("./_an-object"),toPrimitive=require("./_to-primitive");$export($export.S+$export.F*require("./_fails")(function(){Reflect.defineProperty(dP.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(target,propertyKey,attributes){anObject(target),propertyKey=toPrimitive(propertyKey,!0),anObject(attributes);try{return dP.f(target,propertyKey,attributes),!0}catch(e){return!1}}})},{"./_an-object":11,"./_export":36,"./_fails":38,"./_object-dp":71,"./_to-primitive":114}],206:[function(require,module,exports){var $export=require("./_export"),gOPD=require("./_object-gopd").f,anObject=require("./_an-object");$export($export.S,"Reflect",{deleteProperty:function(target,propertyKey){var desc=gOPD(anObject(target),propertyKey);return!(desc&&!desc.configurable)&&delete target[propertyKey]}})},{"./_an-object":11,"./_export":36,"./_object-gopd":74}],207:[function(require,module,exports){"use strict";var $export=require("./_export"),anObject=require("./_an-object"),Enumerate=function(iterated){this._t=anObject(iterated),this._i=0;var key,keys=this._k=[];for(key in iterated)keys.push(key)};require("./_iter-create")(Enumerate,"Object",function(){var key,that=this,keys=that._k;do{if(that._i>=keys.length)return{value:void 0,done:!0}}while(!((key=keys[that._i++])in that._t));return{value:key,done:!1}}),$export($export.S,"Reflect",{enumerate:function(target){return new Enumerate(target)}})},{"./_an-object":11,"./_export":36,"./_iter-create":56}],208:[function(require,module,exports){var gOPD=require("./_object-gopd"),$export=require("./_export"),anObject=require("./_an-object");$export($export.S,"Reflect",{getOwnPropertyDescriptor:function(target,propertyKey){return gOPD.f(anObject(target),propertyKey)}})},{"./_an-object":11,"./_export":36,"./_object-gopd":74}],209:[function(require,module,exports){var $export=require("./_export"),getProto=require("./_object-gpo"),anObject=require("./_an-object");$export($export.S,"Reflect",{getPrototypeOf:function(target){return getProto(anObject(target))}})},{"./_an-object":11,"./_export":36,"./_object-gpo":78}],210:[function(require,module,exports){function get(target,propertyKey){var desc,proto,receiver=arguments.length<3?target:arguments[2];return anObject(target)===receiver?target[propertyKey]:(desc=gOPD.f(target,propertyKey))?has(desc,"value")?desc.value:void 0!==desc.get?desc.get.call(receiver):void 0:isObject(proto=getPrototypeOf(target))?get(proto,propertyKey,receiver):void 0}var gOPD=require("./_object-gopd"),getPrototypeOf=require("./_object-gpo"),has=require("./_has"),$export=require("./_export"),isObject=require("./_is-object"),anObject=require("./_an-object");$export($export.S,"Reflect",{get:get})},{"./_an-object":11,"./_export":36,"./_has":43,"./_is-object":53,"./_object-gopd":74,"./_object-gpo":78}],211:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Reflect",{has:function(target,propertyKey){return propertyKey in target}})},{"./_export":36}],212:[function(require,module,exports){var $export=require("./_export"),anObject=require("./_an-object"),$isExtensible=Object.isExtensible;$export($export.S,"Reflect",{isExtensible:function(target){return anObject(target),!$isExtensible||$isExtensible(target)}})},{"./_an-object":11,"./_export":36}],213:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Reflect",{ownKeys:require("./_own-keys")})},{"./_export":36,"./_own-keys":84}],214:[function(require,module,exports){var $export=require("./_export"),anObject=require("./_an-object"),$preventExtensions=Object.preventExtensions;$export($export.S,"Reflect",{preventExtensions:function(target){anObject(target);try{return $preventExtensions&&$preventExtensions(target),!0}catch(e){return!1}}})},{"./_an-object":11,"./_export":36}],215:[function(require,module,exports){var $export=require("./_export"),setProto=require("./_set-proto");setProto&&$export($export.S,"Reflect",{setPrototypeOf:function(target,proto){setProto.check(target,proto);try{return setProto.set(target,proto),!0}catch(e){return!1}}})},{"./_export":36,"./_set-proto":94}],216:[function(require,module,exports){function set(target,propertyKey,V){var existingDescriptor,proto,receiver=arguments.length<4?target:arguments[3],ownDesc=gOPD.f(anObject(target),propertyKey);if(!ownDesc){if(isObject(proto=getPrototypeOf(target)))return set(proto,propertyKey,V,receiver);ownDesc=createDesc(0)}return has(ownDesc,"value")?!(!1===ownDesc.writable||!isObject(receiver))&&(existingDescriptor=gOPD.f(receiver,propertyKey)||createDesc(0),existingDescriptor.value=V,dP.f(receiver,propertyKey,existingDescriptor),!0):void 0!==ownDesc.set&&(ownDesc.set.call(receiver,V),!0)}var dP=require("./_object-dp"),gOPD=require("./_object-gopd"),getPrototypeOf=require("./_object-gpo"),has=require("./_has"),$export=require("./_export"),createDesc=require("./_property-desc"),anObject=require("./_an-object"),isObject=require("./_is-object");$export($export.S,"Reflect",{set:set})},{"./_an-object":11,"./_export":36,"./_has":43,"./_is-object":53,"./_object-dp":71,"./_object-gopd":74,"./_object-gpo":78,"./_property-desc":89}],217:[function(require,module,exports){var global=require("./_global"),inheritIfRequired=require("./_inherit-if-required"),dP=require("./_object-dp").f,gOPN=require("./_object-gopn").f,isRegExp=require("./_is-regexp"),$flags=require("./_flags"),$RegExp=global.RegExp,Base=$RegExp,proto=$RegExp.prototype,re2=/a/g,CORRECT_NEW=new $RegExp(/a/g)!==/a/g;if(require("./_descriptors")&&(!CORRECT_NEW||require("./_fails")(function(){return re2[require("./_wks")("match")]=!1,$RegExp(/a/g)!=/a/g||$RegExp(re2)==re2||"/a/i"!=$RegExp(/a/g,"i")}))){$RegExp=function(p,f){var tiRE=this instanceof $RegExp,piRE=isRegExp(p),fiU=void 0===f;return!tiRE&&piRE&&p.constructor===$RegExp&&fiU?p:inheritIfRequired(CORRECT_NEW?new Base(piRE&&!fiU?p.source:p,f):Base((piRE=p instanceof $RegExp)?p.source:p,piRE&&fiU?$flags.call(p):f),tiRE?this:proto,$RegExp)};for(var keys=gOPN(Base),i=0;keys.length>i;)!function(key){key in $RegExp||dP($RegExp,key,{configurable:!0,get:function(){return Base[key]},set:function(it){Base[key]=it}})}(keys[i++]);proto.constructor=$RegExp,$RegExp.prototype=proto,require("./_redefine")(global,"RegExp",$RegExp)}require("./_set-species")("RegExp")},{"./_descriptors":32,"./_fails":38,"./_flags":40,"./_global":42,"./_inherit-if-required":47,"./_is-regexp":54,"./_object-dp":71,"./_object-gopn":76,"./_redefine":91,"./_set-species":95,"./_wks":121}],218:[function(require,module,exports){require("./_descriptors")&&"g"!=/./g.flags&&require("./_object-dp").f(RegExp.prototype,"flags",{configurable:!0,get:require("./_flags")})},{"./_descriptors":32,"./_flags":40,"./_object-dp":71}],219:[function(require,module,exports){require("./_fix-re-wks")("match",1,function(defined,MATCH,$match){return[function(regexp){"use strict";var O=defined(this),fn=void 0==regexp?void 0:regexp[MATCH];return void 0!==fn?fn.call(regexp,O):new RegExp(regexp)[MATCH](String(O))},$match]})},{"./_fix-re-wks":39}],220:[function(require,module,exports){require("./_fix-re-wks")("replace",2,function(defined,REPLACE,$replace){return[function(searchValue,replaceValue){"use strict";var O=defined(this),fn=void 0==searchValue?void 0:searchValue[REPLACE];return void 0!==fn?fn.call(searchValue,O,replaceValue):$replace.call(String(O),searchValue,replaceValue)},$replace]})},{"./_fix-re-wks":39}],221:[function(require,module,exports){require("./_fix-re-wks")("search",1,function(defined,SEARCH,$search){return[function(regexp){"use strict";var O=defined(this),fn=void 0==regexp?void 0:regexp[SEARCH];return void 0!==fn?fn.call(regexp,O):new RegExp(regexp)[SEARCH](String(O))},$search]})},{"./_fix-re-wks":39}],222:[function(require,module,exports){require("./_fix-re-wks")("split",2,function(defined,SPLIT,$split){"use strict";var isRegExp=require("./_is-regexp"),_split=$split,$push=[].push,LENGTH="length";if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[LENGTH]||2!="ab".split(/(?:ab)*/)[LENGTH]||4!=".".split(/(.?)(.?)/)[LENGTH]||".".split(/()()/)[LENGTH]>1||"".split(/.?/)[LENGTH]){var NPCG=void 0===/()??/.exec("")[1];$split=function(separator,limit){var string=String(this);if(void 0===separator&&0===limit)return[];if(!isRegExp(separator))return _split.call(string,separator,limit);var separator2,match,lastIndex,lastLength,i,output=[],flags=(separator.ignoreCase?"i":"")+(separator.multiline?"m":"")+(separator.unicode?"u":"")+(separator.sticky?"y":""),lastLastIndex=0,splitLimit=void 0===limit?4294967295:limit>>>0,separatorCopy=new RegExp(separator.source,flags+"g");for(NPCG||(separator2=new RegExp("^"+separatorCopy.source+"$(?!\\s)",flags));(match=separatorCopy.exec(string))&&!((lastIndex=match.index+match[0][LENGTH])>lastLastIndex&&(output.push(string.slice(lastLastIndex,match.index)),!NPCG&&match[LENGTH]>1&&match[0].replace(separator2,function(){for(i=1;i<arguments[LENGTH]-2;i++)void 0===arguments[i]&&(match[i]=void 0)}),match[LENGTH]>1&&match.index<string[LENGTH]&&$push.apply(output,match.slice(1)),lastLength=match[0][LENGTH],lastLastIndex=lastIndex,output[LENGTH]>=splitLimit));)separatorCopy.lastIndex===match.index&&separatorCopy.lastIndex++;return lastLastIndex===string[LENGTH]?!lastLength&&separatorCopy.test("")||output.push(""):output.push(string.slice(lastLastIndex)),output[LENGTH]>splitLimit?output.slice(0,splitLimit):output}}else"0".split(void 0,0)[LENGTH]&&($split=function(separator,limit){return void 0===separator&&0===limit?[]:_split.call(this,separator,limit)});return[function(separator,limit){var O=defined(this),fn=void 0==separator?void 0:separator[SPLIT];return void 0!==fn?fn.call(separator,O,limit):$split.call(String(O),separator,limit)},$split]})},{"./_fix-re-wks":39,"./_is-regexp":54}],223:[function(require,module,exports){"use strict";require("./es6.regexp.flags");var anObject=require("./_an-object"),$flags=require("./_flags"),DESCRIPTORS=require("./_descriptors"),$toString=/./.toString,define=function(fn){require("./_redefine")(RegExp.prototype,"toString",fn,!0)};require("./_fails")(function(){return"/a/b"!=$toString.call({source:"a",flags:"b"})})?define(function(){var R=anObject(this);return"/".concat(R.source,"/","flags"in R?R.flags:!DESCRIPTORS&&R instanceof RegExp?$flags.call(R):void 0)}):"toString"!=$toString.name&&define(function(){return $toString.call(this)})},{"./_an-object":11,"./_descriptors":32,"./_fails":38,"./_flags":40,"./_redefine":91,"./es6.regexp.flags":218}],224:[function(require,module,exports){"use strict";var strong=require("./_collection-strong");module.exports=require("./_collection")("Set",function(get){return function(){return get(this,arguments.length>0?arguments[0]:void 0)}},{add:function(value){return strong.def(this,value=0===value?0:value,value)}},strong)},{"./_collection":26,"./_collection-strong":23}],225:[function(require,module,exports){"use strict";require("./_string-html")("anchor",function(createHTML){return function(name){return createHTML(this,"a","name",name)}})},{"./_string-html":103}],226:[function(require,module,exports){"use strict";require("./_string-html")("big",function(createHTML){return function(){return createHTML(this,"big","","")}})},{"./_string-html":103}],227:[function(require,module,exports){"use strict";require("./_string-html")("blink",function(createHTML){return function(){return createHTML(this,"blink","","")}})},{"./_string-html":103}],228:[function(require,module,exports){"use strict";require("./_string-html")("bold",function(createHTML){return function(){return createHTML(this,"b","","")}})},{"./_string-html":103}],229:[function(require,module,exports){"use strict";var $export=require("./_export"),$at=require("./_string-at")(!1);$export($export.P,"String",{codePointAt:function(pos){return $at(this,pos)}})},{"./_export":36,"./_string-at":101}],230:[function(require,module,exports){"use strict";var $export=require("./_export"),toLength=require("./_to-length"),context=require("./_string-context"),$endsWith="".endsWith;$export($export.P+$export.F*require("./_fails-is-regexp")("endsWith"),"String",{endsWith:function(searchString){var that=context(this,searchString,"endsWith"),endPosition=arguments.length>1?arguments[1]:void 0,len=toLength(that.length),end=void 0===endPosition?len:Math.min(toLength(endPosition),len),search=String(searchString);return $endsWith?$endsWith.call(that,search,end):that.slice(end-search.length,end)===search}})},{"./_export":36,"./_fails-is-regexp":37,"./_string-context":102,"./_to-length":112}],231:[function(require,module,exports){"use strict";require("./_string-html")("fixed",function(createHTML){return function(){return createHTML(this,"tt","","")}})},{"./_string-html":103}],232:[function(require,module,exports){"use strict";require("./_string-html")("fontcolor",function(createHTML){return function(color){return createHTML(this,"font","color",color)}})},{"./_string-html":103}],233:[function(require,module,exports){"use strict";require("./_string-html")("fontsize",function(createHTML){return function(size){return createHTML(this,"font","size",size)}})},{"./_string-html":103}],234:[function(require,module,exports){var $export=require("./_export"),toIndex=require("./_to-index"),fromCharCode=String.fromCharCode,$fromCodePoint=String.fromCodePoint;$export($export.S+$export.F*(!!$fromCodePoint&&1!=$fromCodePoint.length),"String",{fromCodePoint:function(x){for(var code,res=[],aLen=arguments.length,i=0;aLen>i;){if(code=+arguments[i++],toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(55296+((code-=65536)>>10),code%1024+56320))}return res.join("")}})},{"./_export":36,"./_to-index":109}],235:[function(require,module,exports){"use strict";var $export=require("./_export"),context=require("./_string-context");$export($export.P+$export.F*require("./_fails-is-regexp")("includes"),"String",{includes:function(searchString){return!!~context(this,searchString,"includes").indexOf(searchString,arguments.length>1?arguments[1]:void 0)}})},{"./_export":36,"./_fails-is-regexp":37,"./_string-context":102}],236:[function(require,module,exports){"use strict";require("./_string-html")("italics",function(createHTML){return function(){return createHTML(this,"i","","")}})},{"./_string-html":103}],237:[function(require,module,exports){"use strict";var $at=require("./_string-at")(!0);require("./_iter-define")(String,"String",function(iterated){this._t=String(iterated),this._i=0},function(){var point,O=this._t,index=this._i;return index>=O.length?{value:void 0,done:!0}:(point=$at(O,index),this._i+=point.length,{value:point,done:!1})})},{"./_iter-define":57,"./_string-at":101}],238:[function(require,module,exports){"use strict";require("./_string-html")("link",function(createHTML){return function(url){return createHTML(this,"a","href",url)}})},{"./_string-html":103}],239:[function(require,module,exports){var $export=require("./_export"),toIObject=require("./_to-iobject"),toLength=require("./_to-length");$export($export.S,"String",{raw:function(callSite){for(var tpl=toIObject(callSite.raw),len=toLength(tpl.length),aLen=arguments.length,res=[],i=0;len>i;)res.push(String(tpl[i++])),i<aLen&&res.push(String(arguments[i]));return res.join("")}})},{"./_export":36,"./_to-iobject":111,"./_to-length":112}],240:[function(require,module,exports){var $export=require("./_export");$export($export.P,"String",{repeat:require("./_string-repeat")})},{"./_export":36,"./_string-repeat":105}],241:[function(require,module,exports){"use strict";require("./_string-html")("small",function(createHTML){return function(){return createHTML(this,"small","","")}})},{"./_string-html":103}],242:[function(require,module,exports){"use strict";var $export=require("./_export"),toLength=require("./_to-length"),context=require("./_string-context"),$startsWith="".startsWith;$export($export.P+$export.F*require("./_fails-is-regexp")("startsWith"),"String",{startsWith:function(searchString){var that=context(this,searchString,"startsWith"),index=toLength(Math.min(arguments.length>1?arguments[1]:void 0,that.length)),search=String(searchString);return $startsWith?$startsWith.call(that,search,index):that.slice(index,index+search.length)===search}})},{"./_export":36,"./_fails-is-regexp":37,"./_string-context":102,"./_to-length":112}],243:[function(require,module,exports){"use strict";require("./_string-html")("strike",function(createHTML){return function(){return createHTML(this,"strike","","")}})},{"./_string-html":103}],244:[function(require,module,exports){"use strict";require("./_string-html")("sub",function(createHTML){return function(){return createHTML(this,"sub","","")}})},{"./_string-html":103}],245:[function(require,module,exports){"use strict";require("./_string-html")("sup",function(createHTML){return function(){return createHTML(this,"sup","","")}})},{"./_string-html":103}],246:[function(require,module,exports){"use strict";require("./_string-trim")("trim",function($trim){return function(){return $trim(this,3)}})},{"./_string-trim":106}],247:[function(require,module,exports){"use strict";var global=require("./_global"),has=require("./_has"),DESCRIPTORS=require("./_descriptors"),$export=require("./_export"),redefine=require("./_redefine"),META=require("./_meta").KEY,$fails=require("./_fails"),shared=require("./_shared"),setToStringTag=require("./_set-to-string-tag"),uid=require("./_uid"),wks=require("./_wks"),wksExt=require("./_wks-ext"),wksDefine=require("./_wks-define"),keyOf=require("./_keyof"),enumKeys=require("./_enum-keys"),isArray=require("./_is-array"),anObject=require("./_an-object"),toIObject=require("./_to-iobject"),toPrimitive=require("./_to-primitive"),createDesc=require("./_property-desc"),_create=require("./_object-create"),gOPNExt=require("./_object-gopn-ext"),$GOPD=require("./_object-gopd"),$DP=require("./_object-dp"),$keys=require("./_object-keys"),gOPD=$GOPD.f,dP=$DP.f,gOPN=gOPNExt.f,$Symbol=global.Symbol,$JSON=global.JSON,_stringify=$JSON&&$JSON.stringify,HIDDEN=wks("_hidden"),TO_PRIMITIVE=wks("toPrimitive"),isEnum={}.propertyIsEnumerable,SymbolRegistry=shared("symbol-registry"),AllSymbols=shared("symbols"),OPSymbols=shared("op-symbols"),ObjectProto=Object.prototype,USE_NATIVE="function"==typeof $Symbol,QObject=global.QObject,setter=!QObject||!QObject.prototype||!QObject.prototype.findChild,setSymbolDesc=DESCRIPTORS&&$fails(function(){return 7!=_create(dP({},"a",{get:function(){return dP(this,"a",{value:7}).a}})).a})?function(it,key,D){var protoDesc=gOPD(ObjectProto,key);protoDesc&&delete ObjectProto[key],dP(it,key,D),protoDesc&&it!==ObjectProto&&dP(ObjectProto,key,protoDesc)}:dP,wrap=function(tag){var sym=AllSymbols[tag]=_create($Symbol.prototype);return sym._k=tag,sym},isSymbol=USE_NATIVE&&"symbol"==typeof $Symbol.iterator?function(it){return"symbol"==typeof it}:function(it){return it instanceof $Symbol},$defineProperty=function(it,key,D){return it===ObjectProto&&$defineProperty(OPSymbols,key,D),anObject(it),key=toPrimitive(key,!0),anObject(D),has(AllSymbols,key)?(D.enumerable?(has(it,HIDDEN)&&it[HIDDEN][key]&&(it[HIDDEN][key]=!1),D=_create(D,{enumerable:createDesc(0,!1)})):(has(it,HIDDEN)||dP(it,HIDDEN,createDesc(1,{})),it[HIDDEN][key]=!0),setSymbolDesc(it,key,D)):dP(it,key,D)},$defineProperties=function(it,P){anObject(it);for(var key,keys=enumKeys(P=toIObject(P)),i=0,l=keys.length;l>i;)$defineProperty(it,key=keys[i++],P[key]);return it},$create=function(it,P){return void 0===P?_create(it):$defineProperties(_create(it),P)},$propertyIsEnumerable=function(key){var E=isEnum.call(this,key=toPrimitive(key,!0));return!(this===ObjectProto&&has(AllSymbols,key)&&!has(OPSymbols,key))&&(!(E||!has(this,key)||!has(AllSymbols,key)||has(this,HIDDEN)&&this[HIDDEN][key])||E)},$getOwnPropertyDescriptor=function(it,key){if(it=toIObject(it),key=toPrimitive(key,!0),it!==ObjectProto||!has(AllSymbols,key)||has(OPSymbols,key)){var D=gOPD(it,key);return!D||!has(AllSymbols,key)||has(it,HIDDEN)&&it[HIDDEN][key]||(D.enumerable=!0),D}},$getOwnPropertyNames=function(it){for(var key,names=gOPN(toIObject(it)),result=[],i=0;names.length>i;)has(AllSymbols,key=names[i++])||key==HIDDEN||key==META||result.push(key);return result},$getOwnPropertySymbols=function(it){for(var key,IS_OP=it===ObjectProto,names=gOPN(IS_OP?OPSymbols:toIObject(it)),result=[],i=0;names.length>i;)!has(AllSymbols,key=names[i++])||IS_OP&&!has(ObjectProto,key)||result.push(AllSymbols[key]);return result};USE_NATIVE||($Symbol=function(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor!");var tag=uid(arguments.length>0?arguments[0]:void 0),$set=function(value){this===ObjectProto&&$set.call(OPSymbols,value),has(this,HIDDEN)&&has(this[HIDDEN],tag)&&(this[HIDDEN][tag]=!1),setSymbolDesc(this,tag,createDesc(1,value))};return DESCRIPTORS&&setter&&setSymbolDesc(ObjectProto,tag,{configurable:!0,set:$set}),wrap(tag)},redefine($Symbol.prototype,"toString",function(){return this._k}),$GOPD.f=$getOwnPropertyDescriptor,$DP.f=$defineProperty,require("./_object-gopn").f=gOPNExt.f=$getOwnPropertyNames,require("./_object-pie").f=$propertyIsEnumerable,require("./_object-gops").f=$getOwnPropertySymbols,DESCRIPTORS&&!require("./_library")&&redefine(ObjectProto,"propertyIsEnumerable",$propertyIsEnumerable,!0),wksExt.f=function(name){return wrap(wks(name))}),$export($export.G+$export.W+$export.F*!USE_NATIVE,{Symbol:$Symbol});for(var symbols="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),i=0;symbols.length>i;)wks(symbols[i++]);for(var symbols=$keys(wks.store),i=0;symbols.length>i;)wksDefine(symbols[i++]);$export($export.S+$export.F*!USE_NATIVE,"Symbol",{for:function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=$Symbol(key)},keyFor:function(key){if(isSymbol(key))return keyOf(SymbolRegistry,key);throw TypeError(key+" is not a symbol!")},useSetter:function(){setter=!0},useSimple:function(){setter=!1}}),$export($export.S+$export.F*!USE_NATIVE,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols}),$JSON&&$export($export.S+$export.F*(!USE_NATIVE||$fails(function(){var S=$Symbol();return"[null]"!=_stringify([S])||"{}"!=_stringify({a:S})||"{}"!=_stringify(Object(S))})),"JSON",{stringify:function(it){if(void 0!==it&&!isSymbol(it)){for(var replacer,$replacer,args=[it],i=1;arguments.length>i;)args.push(arguments[i++]);return replacer=args[1],"function"==typeof replacer&&($replacer=replacer),!$replacer&&isArray(replacer)||(replacer=function(key,value){if($replacer&&(value=$replacer.call(this,key,value)),!isSymbol(value))return value}),args[1]=replacer,_stringify.apply($JSON,args)}}}),$Symbol.prototype[TO_PRIMITIVE]||require("./_hide")($Symbol.prototype,TO_PRIMITIVE,$Symbol.prototype.valueOf),setToStringTag($Symbol,"Symbol"),setToStringTag(Math,"Math",!0),setToStringTag(global.JSON,"JSON",!0)},{"./_an-object":11,"./_descriptors":32,"./_enum-keys":35,"./_export":36,"./_fails":38,"./_global":42,"./_has":43,"./_hide":44,"./_is-array":51,"./_keyof":61,"./_library":62,"./_meta":66,"./_object-create":70,"./_object-dp":71,"./_object-gopd":74,"./_object-gopn":76,"./_object-gopn-ext":75,"./_object-gops":77,"./_object-keys":80,"./_object-pie":81,"./_property-desc":89,"./_redefine":91,"./_set-to-string-tag":96,"./_shared":98,"./_to-iobject":111,"./_to-primitive":114,"./_uid":118,"./_wks":121,"./_wks-define":119,"./_wks-ext":120}],248:[function(require,module,exports){"use strict";var $export=require("./_export"),$typed=require("./_typed"),buffer=require("./_typed-buffer"),anObject=require("./_an-object"),toIndex=require("./_to-index"),toLength=require("./_to-length"),isObject=require("./_is-object"),ArrayBuffer=require("./_global").ArrayBuffer,speciesConstructor=require("./_species-constructor"),$ArrayBuffer=buffer.ArrayBuffer,$DataView=buffer.DataView,$isView=$typed.ABV&&ArrayBuffer.isView,$slice=$ArrayBuffer.prototype.slice,VIEW=$typed.VIEW;$export($export.G+$export.W+$export.F*(ArrayBuffer!==$ArrayBuffer),{ArrayBuffer:$ArrayBuffer}),$export($export.S+$export.F*!$typed.CONSTR,"ArrayBuffer",{isView:function(it){return $isView&&$isView(it)||isObject(it)&&VIEW in it}}),$export($export.P+$export.U+$export.F*require("./_fails")(function(){return!new $ArrayBuffer(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(start,end){if(void 0!==$slice&&void 0===end)return $slice.call(anObject(this),start);for(var len=anObject(this).byteLength,first=toIndex(start,len),final=toIndex(void 0===end?len:end,len),result=new(speciesConstructor(this,$ArrayBuffer))(toLength(final-first)),viewS=new $DataView(this),viewT=new $DataView(result),index=0;first<final;)viewT.setUint8(index++,viewS.getUint8(first++));return result}}),require("./_set-species")("ArrayBuffer")},{"./_an-object":11,"./_export":36,"./_fails":38,"./_global":42,"./_is-object":53,"./_set-species":95,"./_species-constructor":99,"./_to-index":109,"./_to-length":112,"./_typed":117,"./_typed-buffer":116}],249:[function(require,module,exports){var $export=require("./_export");$export($export.G+$export.W+$export.F*!require("./_typed").ABV,{DataView:require("./_typed-buffer").DataView})},{"./_export":36,"./_typed":117,"./_typed-buffer":116}],250:[function(require,module,exports){require("./_typed-array")("Float32",4,function(init){return function(data,byteOffset,length){return init(this,data,byteOffset,length)}})},{"./_typed-array":115}],251:[function(require,module,exports){require("./_typed-array")("Float64",8,function(init){return function(data,byteOffset,length){return init(this,data,byteOffset,length)}})},{"./_typed-array":115}],252:[function(require,module,exports){require("./_typed-array")("Int16",2,function(init){return function(data,byteOffset,length){return init(this,data,byteOffset,length)}})},{"./_typed-array":115}],253:[function(require,module,exports){require("./_typed-array")("Int32",4,function(init){
+return function(data,byteOffset,length){return init(this,data,byteOffset,length)}})},{"./_typed-array":115}],254:[function(require,module,exports){require("./_typed-array")("Int8",1,function(init){return function(data,byteOffset,length){return init(this,data,byteOffset,length)}})},{"./_typed-array":115}],255:[function(require,module,exports){require("./_typed-array")("Uint16",2,function(init){return function(data,byteOffset,length){return init(this,data,byteOffset,length)}})},{"./_typed-array":115}],256:[function(require,module,exports){require("./_typed-array")("Uint32",4,function(init){return function(data,byteOffset,length){return init(this,data,byteOffset,length)}})},{"./_typed-array":115}],257:[function(require,module,exports){require("./_typed-array")("Uint8",1,function(init){return function(data,byteOffset,length){return init(this,data,byteOffset,length)}})},{"./_typed-array":115}],258:[function(require,module,exports){require("./_typed-array")("Uint8",1,function(init){return function(data,byteOffset,length){return init(this,data,byteOffset,length)}},!0)},{"./_typed-array":115}],259:[function(require,module,exports){"use strict";var InternalMap,each=require("./_array-methods")(0),redefine=require("./_redefine"),meta=require("./_meta"),assign=require("./_object-assign"),weak=require("./_collection-weak"),isObject=require("./_is-object"),getWeak=meta.getWeak,isExtensible=Object.isExtensible,uncaughtFrozenStore=weak.ufstore,tmp={},wrapper=function(get){return function(){return get(this,arguments.length>0?arguments[0]:void 0)}},methods={get:function(key){if(isObject(key)){var data=getWeak(key);return!0===data?uncaughtFrozenStore(this).get(key):data?data[this._i]:void 0}},set:function(key,value){return weak.def(this,key,value)}},$WeakMap=module.exports=require("./_collection")("WeakMap",wrapper,methods,weak,!0,!0);7!=(new $WeakMap).set((Object.freeze||Object)(tmp),7).get(tmp)&&(InternalMap=weak.getConstructor(wrapper),assign(InternalMap.prototype,methods),meta.NEED=!0,each(["delete","has","get","set"],function(key){var proto=$WeakMap.prototype,method=proto[key];redefine(proto,key,function(a,b){if(isObject(a)&&!isExtensible(a)){this._f||(this._f=new InternalMap);var result=this._f[key](a,b);return"set"==key?this:result}return method.call(this,a,b)})}))},{"./_array-methods":16,"./_collection":26,"./_collection-weak":25,"./_is-object":53,"./_meta":66,"./_object-assign":69,"./_redefine":91}],260:[function(require,module,exports){"use strict";var weak=require("./_collection-weak");require("./_collection")("WeakSet",function(get){return function(){return get(this,arguments.length>0?arguments[0]:void 0)}},{add:function(value){return weak.def(this,value,!0)}},weak,!1,!0)},{"./_collection":26,"./_collection-weak":25}],261:[function(require,module,exports){"use strict";var $export=require("./_export"),$includes=require("./_array-includes")(!0);$export($export.P,"Array",{includes:function(el){return $includes(this,el,arguments.length>1?arguments[1]:void 0)}}),require("./_add-to-unscopables")("includes")},{"./_add-to-unscopables":9,"./_array-includes":15,"./_export":36}],262:[function(require,module,exports){var $export=require("./_export"),microtask=require("./_microtask")(),process=require("./_global").process,isNode="process"==require("./_cof")(process);$export($export.G,{asap:function(fn){var domain=isNode&&process.domain;microtask(domain?domain.bind(fn):fn)}})},{"./_cof":22,"./_export":36,"./_global":42,"./_microtask":68}],263:[function(require,module,exports){var $export=require("./_export"),cof=require("./_cof");$export($export.S,"Error",{isError:function(it){return"Error"===cof(it)}})},{"./_cof":22,"./_export":36}],264:[function(require,module,exports){var $export=require("./_export");$export($export.P+$export.R,"Map",{toJSON:require("./_collection-to-json")("Map")})},{"./_collection-to-json":24,"./_export":36}],265:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Math",{iaddh:function(x0,x1,y0,y1){var $x0=x0>>>0,$x1=x1>>>0,$y0=y0>>>0;return $x1+(y1>>>0)+(($x0&$y0|($x0|$y0)&~($x0+$y0>>>0))>>>31)|0}})},{"./_export":36}],266:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Math",{imulh:function(u,v){var $u=+u,$v=+v,u0=65535&$u,v0=65535&$v,u1=$u>>16,v1=$v>>16,t=(u1*v0>>>0)+(u0*v0>>>16);return u1*v1+(t>>16)+((u0*v1>>>0)+(65535&t)>>16)}})},{"./_export":36}],267:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Math",{isubh:function(x0,x1,y0,y1){var $x0=x0>>>0,$x1=x1>>>0,$y0=y0>>>0;return $x1-(y1>>>0)-((~$x0&$y0|~($x0^$y0)&$x0-$y0>>>0)>>>31)|0}})},{"./_export":36}],268:[function(require,module,exports){var $export=require("./_export");$export($export.S,"Math",{umulh:function(u,v){var $u=+u,$v=+v,u0=65535&$u,v0=65535&$v,u1=$u>>>16,v1=$v>>>16,t=(u1*v0>>>0)+(u0*v0>>>16);return u1*v1+(t>>>16)+((u0*v1>>>0)+(65535&t)>>>16)}})},{"./_export":36}],269:[function(require,module,exports){"use strict";var $export=require("./_export"),toObject=require("./_to-object"),aFunction=require("./_a-function"),$defineProperty=require("./_object-dp");require("./_descriptors")&&$export($export.P+require("./_object-forced-pam"),"Object",{__defineGetter__:function(P,getter){$defineProperty.f(toObject(this),P,{get:aFunction(getter),enumerable:!0,configurable:!0})}})},{"./_a-function":7,"./_descriptors":32,"./_export":36,"./_object-dp":71,"./_object-forced-pam":73,"./_to-object":113}],270:[function(require,module,exports){"use strict";var $export=require("./_export"),toObject=require("./_to-object"),aFunction=require("./_a-function"),$defineProperty=require("./_object-dp");require("./_descriptors")&&$export($export.P+require("./_object-forced-pam"),"Object",{__defineSetter__:function(P,setter){$defineProperty.f(toObject(this),P,{set:aFunction(setter),enumerable:!0,configurable:!0})}})},{"./_a-function":7,"./_descriptors":32,"./_export":36,"./_object-dp":71,"./_object-forced-pam":73,"./_to-object":113}],271:[function(require,module,exports){var $export=require("./_export"),$entries=require("./_object-to-array")(!0);$export($export.S,"Object",{entries:function(it){return $entries(it)}})},{"./_export":36,"./_object-to-array":83}],272:[function(require,module,exports){var $export=require("./_export"),ownKeys=require("./_own-keys"),toIObject=require("./_to-iobject"),gOPD=require("./_object-gopd"),createProperty=require("./_create-property");$export($export.S,"Object",{getOwnPropertyDescriptors:function(object){for(var key,O=toIObject(object),getDesc=gOPD.f,keys=ownKeys(O),result={},i=0;keys.length>i;)createProperty(result,key=keys[i++],getDesc(O,key));return result}})},{"./_create-property":28,"./_export":36,"./_object-gopd":74,"./_own-keys":84,"./_to-iobject":111}],273:[function(require,module,exports){"use strict";var $export=require("./_export"),toObject=require("./_to-object"),toPrimitive=require("./_to-primitive"),getPrototypeOf=require("./_object-gpo"),getOwnPropertyDescriptor=require("./_object-gopd").f;require("./_descriptors")&&$export($export.P+require("./_object-forced-pam"),"Object",{__lookupGetter__:function(P){var D,O=toObject(this),K=toPrimitive(P,!0);do{if(D=getOwnPropertyDescriptor(O,K))return D.get}while(O=getPrototypeOf(O))}})},{"./_descriptors":32,"./_export":36,"./_object-forced-pam":73,"./_object-gopd":74,"./_object-gpo":78,"./_to-object":113,"./_to-primitive":114}],274:[function(require,module,exports){"use strict";var $export=require("./_export"),toObject=require("./_to-object"),toPrimitive=require("./_to-primitive"),getPrototypeOf=require("./_object-gpo"),getOwnPropertyDescriptor=require("./_object-gopd").f;require("./_descriptors")&&$export($export.P+require("./_object-forced-pam"),"Object",{__lookupSetter__:function(P){var D,O=toObject(this),K=toPrimitive(P,!0);do{if(D=getOwnPropertyDescriptor(O,K))return D.set}while(O=getPrototypeOf(O))}})},{"./_descriptors":32,"./_export":36,"./_object-forced-pam":73,"./_object-gopd":74,"./_object-gpo":78,"./_to-object":113,"./_to-primitive":114}],275:[function(require,module,exports){var $export=require("./_export"),$values=require("./_object-to-array")(!1);$export($export.S,"Object",{values:function(it){return $values(it)}})},{"./_export":36,"./_object-to-array":83}],276:[function(require,module,exports){"use strict";var $export=require("./_export"),global=require("./_global"),core=require("./_core"),microtask=require("./_microtask")(),OBSERVABLE=require("./_wks")("observable"),aFunction=require("./_a-function"),anObject=require("./_an-object"),anInstance=require("./_an-instance"),redefineAll=require("./_redefine-all"),hide=require("./_hide"),forOf=require("./_for-of"),RETURN=forOf.RETURN,getMethod=function(fn){return null==fn?void 0:aFunction(fn)},cleanupSubscription=function(subscription){var cleanup=subscription._c;cleanup&&(subscription._c=void 0,cleanup())},subscriptionClosed=function(subscription){return void 0===subscription._o},closeSubscription=function(subscription){subscriptionClosed(subscription)||(subscription._o=void 0,cleanupSubscription(subscription))},Subscription=function(observer,subscriber){anObject(observer),this._c=void 0,this._o=observer,observer=new SubscriptionObserver(this);try{var cleanup=subscriber(observer),subscription=cleanup;null!=cleanup&&("function"==typeof cleanup.unsubscribe?cleanup=function(){subscription.unsubscribe()}:aFunction(cleanup),this._c=cleanup)}catch(e){return void observer.error(e)}subscriptionClosed(this)&&cleanupSubscription(this)};Subscription.prototype=redefineAll({},{unsubscribe:function(){closeSubscription(this)}});var SubscriptionObserver=function(subscription){this._s=subscription};SubscriptionObserver.prototype=redefineAll({},{next:function(value){var subscription=this._s;if(!subscriptionClosed(subscription)){var observer=subscription._o;try{var m=getMethod(observer.next);if(m)return m.call(observer,value)}catch(e){try{closeSubscription(subscription)}finally{throw e}}}},error:function(value){var subscription=this._s;if(subscriptionClosed(subscription))throw value;var observer=subscription._o;subscription._o=void 0;try{var m=getMethod(observer.error);if(!m)throw value;value=m.call(observer,value)}catch(e){try{cleanupSubscription(subscription)}finally{throw e}}return cleanupSubscription(subscription),value},complete:function(value){var subscription=this._s;if(!subscriptionClosed(subscription)){var observer=subscription._o;subscription._o=void 0;try{var m=getMethod(observer.complete);value=m?m.call(observer,value):void 0}catch(e){try{cleanupSubscription(subscription)}finally{throw e}}return cleanupSubscription(subscription),value}}});var $Observable=function(subscriber){anInstance(this,$Observable,"Observable","_f")._f=aFunction(subscriber)};redefineAll($Observable.prototype,{subscribe:function(observer){return new Subscription(observer,this._f)},forEach:function(fn){var that=this;return new(core.Promise||global.Promise)(function(resolve,reject){aFunction(fn);var subscription=that.subscribe({next:function(value){try{return fn(value)}catch(e){reject(e),subscription.unsubscribe()}},error:reject,complete:resolve})})}}),redefineAll($Observable,{from:function(x){var C="function"==typeof this?this:$Observable,method=getMethod(anObject(x)[OBSERVABLE]);if(method){var observable=anObject(method.call(x));return observable.constructor===C?observable:new C(function(observer){return observable.subscribe(observer)})}return new C(function(observer){var done=!1;return microtask(function(){if(!done){try{if(forOf(x,!1,function(it){if(observer.next(it),done)return RETURN})===RETURN)return}catch(e){if(done)throw e;return void observer.error(e)}observer.complete()}}),function(){done=!0}})},of:function(){for(var i=0,l=arguments.length,items=Array(l);i<l;)items[i]=arguments[i++];return new("function"==typeof this?this:$Observable)(function(observer){var done=!1;return microtask(function(){if(!done){for(var i=0;i<items.length;++i)if(observer.next(items[i]),done)return;observer.complete()}}),function(){done=!0}})}}),hide($Observable.prototype,OBSERVABLE,function(){return this}),$export($export.G,{Observable:$Observable}),require("./_set-species")("Observable")},{"./_a-function":7,"./_an-instance":10,"./_an-object":11,"./_core":27,"./_export":36,"./_for-of":41,"./_global":42,"./_hide":44,"./_microtask":68,"./_redefine-all":90,"./_set-species":95,"./_wks":121}],277:[function(require,module,exports){var metadata=require("./_metadata"),anObject=require("./_an-object"),toMetaKey=metadata.key,ordinaryDefineOwnMetadata=metadata.set;metadata.exp({defineMetadata:function(metadataKey,metadataValue,target,targetKey){ordinaryDefineOwnMetadata(metadataKey,metadataValue,anObject(target),toMetaKey(targetKey))}})},{"./_an-object":11,"./_metadata":67}],278:[function(require,module,exports){var metadata=require("./_metadata"),anObject=require("./_an-object"),toMetaKey=metadata.key,getOrCreateMetadataMap=metadata.map,store=metadata.store;metadata.exp({deleteMetadata:function(metadataKey,target){var targetKey=arguments.length<3?void 0:toMetaKey(arguments[2]),metadataMap=getOrCreateMetadataMap(anObject(target),targetKey,!1);if(void 0===metadataMap||!metadataMap.delete(metadataKey))return!1;if(metadataMap.size)return!0;var targetMetadata=store.get(target);return targetMetadata.delete(targetKey),!!targetMetadata.size||store.delete(target)}})},{"./_an-object":11,"./_metadata":67}],279:[function(require,module,exports){var Set=require("./es6.set"),from=require("./_array-from-iterable"),metadata=require("./_metadata"),anObject=require("./_an-object"),getPrototypeOf=require("./_object-gpo"),ordinaryOwnMetadataKeys=metadata.keys,toMetaKey=metadata.key,ordinaryMetadataKeys=function(O,P){var oKeys=ordinaryOwnMetadataKeys(O,P),parent=getPrototypeOf(O);if(null===parent)return oKeys;var pKeys=ordinaryMetadataKeys(parent,P);return pKeys.length?oKeys.length?from(new Set(oKeys.concat(pKeys))):pKeys:oKeys};metadata.exp({getMetadataKeys:function(target){return ordinaryMetadataKeys(anObject(target),arguments.length<2?void 0:toMetaKey(arguments[1]))}})},{"./_an-object":11,"./_array-from-iterable":14,"./_metadata":67,"./_object-gpo":78,"./es6.set":224}],280:[function(require,module,exports){var metadata=require("./_metadata"),anObject=require("./_an-object"),getPrototypeOf=require("./_object-gpo"),ordinaryHasOwnMetadata=metadata.has,ordinaryGetOwnMetadata=metadata.get,toMetaKey=metadata.key,ordinaryGetMetadata=function(MetadataKey,O,P){if(ordinaryHasOwnMetadata(MetadataKey,O,P))return ordinaryGetOwnMetadata(MetadataKey,O,P);var parent=getPrototypeOf(O);return null!==parent?ordinaryGetMetadata(MetadataKey,parent,P):void 0};metadata.exp({getMetadata:function(metadataKey,target){return ordinaryGetMetadata(metadataKey,anObject(target),arguments.length<3?void 0:toMetaKey(arguments[2]))}})},{"./_an-object":11,"./_metadata":67,"./_object-gpo":78}],281:[function(require,module,exports){var metadata=require("./_metadata"),anObject=require("./_an-object"),ordinaryOwnMetadataKeys=metadata.keys,toMetaKey=metadata.key;metadata.exp({getOwnMetadataKeys:function(target){return ordinaryOwnMetadataKeys(anObject(target),arguments.length<2?void 0:toMetaKey(arguments[1]))}})},{"./_an-object":11,"./_metadata":67}],282:[function(require,module,exports){var metadata=require("./_metadata"),anObject=require("./_an-object"),ordinaryGetOwnMetadata=metadata.get,toMetaKey=metadata.key;metadata.exp({getOwnMetadata:function(metadataKey,target){return ordinaryGetOwnMetadata(metadataKey,anObject(target),arguments.length<3?void 0:toMetaKey(arguments[2]))}})},{"./_an-object":11,"./_metadata":67}],283:[function(require,module,exports){var metadata=require("./_metadata"),anObject=require("./_an-object"),getPrototypeOf=require("./_object-gpo"),ordinaryHasOwnMetadata=metadata.has,toMetaKey=metadata.key,ordinaryHasMetadata=function(MetadataKey,O,P){if(ordinaryHasOwnMetadata(MetadataKey,O,P))return!0;var parent=getPrototypeOf(O);return null!==parent&&ordinaryHasMetadata(MetadataKey,parent,P)};metadata.exp({hasMetadata:function(metadataKey,target){return ordinaryHasMetadata(metadataKey,anObject(target),arguments.length<3?void 0:toMetaKey(arguments[2]))}})},{"./_an-object":11,"./_metadata":67,"./_object-gpo":78}],284:[function(require,module,exports){var metadata=require("./_metadata"),anObject=require("./_an-object"),ordinaryHasOwnMetadata=metadata.has,toMetaKey=metadata.key;metadata.exp({hasOwnMetadata:function(metadataKey,target){return ordinaryHasOwnMetadata(metadataKey,anObject(target),arguments.length<3?void 0:toMetaKey(arguments[2]))}})},{"./_an-object":11,"./_metadata":67}],285:[function(require,module,exports){var metadata=require("./_metadata"),anObject=require("./_an-object"),aFunction=require("./_a-function"),toMetaKey=metadata.key,ordinaryDefineOwnMetadata=metadata.set;metadata.exp({metadata:function(metadataKey,metadataValue){return function(target,targetKey){ordinaryDefineOwnMetadata(metadataKey,metadataValue,(void 0!==targetKey?anObject:aFunction)(target),toMetaKey(targetKey))}}})},{"./_a-function":7,"./_an-object":11,"./_metadata":67}],286:[function(require,module,exports){var $export=require("./_export");$export($export.P+$export.R,"Set",{toJSON:require("./_collection-to-json")("Set")})},{"./_collection-to-json":24,"./_export":36}],287:[function(require,module,exports){"use strict";var $export=require("./_export"),$at=require("./_string-at")(!0);$export($export.P,"String",{at:function(pos){return $at(this,pos)}})},{"./_export":36,"./_string-at":101}],288:[function(require,module,exports){"use strict";var $export=require("./_export"),defined=require("./_defined"),toLength=require("./_to-length"),isRegExp=require("./_is-regexp"),getFlags=require("./_flags"),RegExpProto=RegExp.prototype,$RegExpStringIterator=function(regexp,string){this._r=regexp,this._s=string};require("./_iter-create")($RegExpStringIterator,"RegExp String",function(){var match=this._r.exec(this._s);return{value:match,done:null===match}}),$export($export.P,"String",{matchAll:function(regexp){if(defined(this),!isRegExp(regexp))throw TypeError(regexp+" is not a regexp!");var S=String(this),flags="flags"in RegExpProto?String(regexp.flags):getFlags.call(regexp),rx=new RegExp(regexp.source,~flags.indexOf("g")?flags:"g"+flags);return rx.lastIndex=toLength(regexp.lastIndex),new $RegExpStringIterator(rx,S)}})},{"./_defined":31,"./_export":36,"./_flags":40,"./_is-regexp":54,"./_iter-create":56,"./_to-length":112}],289:[function(require,module,exports){"use strict";var $export=require("./_export"),$pad=require("./_string-pad");$export($export.P,"String",{padEnd:function(maxLength){return $pad(this,maxLength,arguments.length>1?arguments[1]:void 0,!1)}})},{"./_export":36,"./_string-pad":104}],290:[function(require,module,exports){"use strict";var $export=require("./_export"),$pad=require("./_string-pad");$export($export.P,"String",{padStart:function(maxLength){return $pad(this,maxLength,arguments.length>1?arguments[1]:void 0,!0)}})},{"./_export":36,"./_string-pad":104}],291:[function(require,module,exports){"use strict";require("./_string-trim")("trimLeft",function($trim){return function(){return $trim(this,1)}},"trimStart")},{"./_string-trim":106}],292:[function(require,module,exports){"use strict";require("./_string-trim")("trimRight",function($trim){return function(){return $trim(this,2)}},"trimEnd")},{"./_string-trim":106}],293:[function(require,module,exports){require("./_wks-define")("asyncIterator")},{"./_wks-define":119}],294:[function(require,module,exports){require("./_wks-define")("observable")},{"./_wks-define":119}],295:[function(require,module,exports){var $export=require("./_export");$export($export.S,"System",{global:require("./_global")})},{"./_export":36,"./_global":42}],296:[function(require,module,exports){for(var $iterators=require("./es6.array.iterator"),redefine=require("./_redefine"),global=require("./_global"),hide=require("./_hide"),Iterators=require("./_iterators"),wks=require("./_wks"),ITERATOR=wks("iterator"),TO_STRING_TAG=wks("toStringTag"),ArrayValues=Iterators.Array,collections=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],i=0;i<5;i++){var key,NAME=collections[i],Collection=global[NAME],proto=Collection&&Collection.prototype;if(proto){proto[ITERATOR]||hide(proto,ITERATOR,ArrayValues),proto[TO_STRING_TAG]||hide(proto,TO_STRING_TAG,NAME),Iterators[NAME]=ArrayValues;for(key in $iterators)proto[key]||redefine(proto,key,$iterators[key],!0)}}},{"./_global":42,"./_hide":44,"./_iterators":60,"./_redefine":91,"./_wks":121,"./es6.array.iterator":134}],297:[function(require,module,exports){var $export=require("./_export"),$task=require("./_task");$export($export.G+$export.B,{setImmediate:$task.set,clearImmediate:$task.clear})},{"./_export":36,"./_task":108}],298:[function(require,module,exports){var global=require("./_global"),$export=require("./_export"),invoke=require("./_invoke"),partial=require("./_partial"),navigator=global.navigator,MSIE=!!navigator&&/MSIE .\./.test(navigator.userAgent),wrap=function(set){return MSIE?function(fn,time){return set(invoke(partial,[].slice.call(arguments,2),"function"==typeof fn?fn:Function(fn)),time)}:set};$export($export.G+$export.B+$export.F*MSIE,{setTimeout:wrap(global.setTimeout),setInterval:wrap(global.setInterval)})},{"./_export":36,"./_global":42,"./_invoke":48,"./_partial":87}],299:[function(require,module,exports){require("./modules/es6.symbol"),require("./modules/es6.object.create"),require("./modules/es6.object.define-property"),require("./modules/es6.object.define-properties"),require("./modules/es6.object.get-own-property-descriptor"),require("./modules/es6.object.get-prototype-of"),require("./modules/es6.object.keys"),require("./modules/es6.object.get-own-property-names"),require("./modules/es6.object.freeze"),require("./modules/es6.object.seal"),require("./modules/es6.object.prevent-extensions"),require("./modules/es6.object.is-frozen"),require("./modules/es6.object.is-sealed"),require("./modules/es6.object.is-extensible"),require("./modules/es6.object.assign"),require("./modules/es6.object.is"),require("./modules/es6.object.set-prototype-of"),require("./modules/es6.object.to-string"),require("./modules/es6.function.bind"),require("./modules/es6.function.name"),require("./modules/es6.function.has-instance"),require("./modules/es6.parse-int"),require("./modules/es6.parse-float"),require("./modules/es6.number.constructor"),require("./modules/es6.number.to-fixed"),require("./modules/es6.number.to-precision"),require("./modules/es6.number.epsilon"),require("./modules/es6.number.is-finite"),require("./modules/es6.number.is-integer"),require("./modules/es6.number.is-nan"),require("./modules/es6.number.is-safe-integer"),require("./modules/es6.number.max-safe-integer"),require("./modules/es6.number.min-safe-integer"),require("./modules/es6.number.parse-float"),require("./modules/es6.number.parse-int"),require("./modules/es6.math.acosh"),require("./modules/es6.math.asinh"),require("./modules/es6.math.atanh"),require("./modules/es6.math.cbrt"),require("./modules/es6.math.clz32"),require("./modules/es6.math.cosh"),require("./modules/es6.math.expm1"),require("./modules/es6.math.fround"),require("./modules/es6.math.hypot"),require("./modules/es6.math.imul"),require("./modules/es6.math.log10"),require("./modules/es6.math.log1p"),require("./modules/es6.math.log2"),require("./modules/es6.math.sign"),require("./modules/es6.math.sinh"),require("./modules/es6.math.tanh"),require("./modules/es6.math.trunc"),require("./modules/es6.string.from-code-point"),require("./modules/es6.string.raw"),require("./modules/es6.string.trim"),require("./modules/es6.string.iterator"),require("./modules/es6.string.code-point-at"),require("./modules/es6.string.ends-with"),require("./modules/es6.string.includes"),require("./modules/es6.string.repeat"),require("./modules/es6.string.starts-with"),require("./modules/es6.string.anchor"),require("./modules/es6.string.big"),require("./modules/es6.string.blink"),require("./modules/es6.string.bold"),require("./modules/es6.string.fixed"),require("./modules/es6.string.fontcolor"),require("./modules/es6.string.fontsize"),require("./modules/es6.string.italics"),require("./modules/es6.string.link"),require("./modules/es6.string.small"),require("./modules/es6.string.strike"),require("./modules/es6.string.sub"),require("./modules/es6.string.sup"),require("./modules/es6.date.now"),require("./modules/es6.date.to-json"),require("./modules/es6.date.to-iso-string"),require("./modules/es6.date.to-string"),require("./modules/es6.date.to-primitive"),require("./modules/es6.array.is-array"),require("./modules/es6.array.from"),require("./modules/es6.array.of"),require("./modules/es6.array.join"),require("./modules/es6.array.slice"),require("./modules/es6.array.sort"),require("./modules/es6.array.for-each"),require("./modules/es6.array.map"),require("./modules/es6.array.filter"),require("./modules/es6.array.some"),require("./modules/es6.array.every"),require("./modules/es6.array.reduce"),require("./modules/es6.array.reduce-right"),require("./modules/es6.array.index-of"),require("./modules/es6.array.last-index-of"),require("./modules/es6.array.copy-within"),require("./modules/es6.array.fill"),require("./modules/es6.array.find"),require("./modules/es6.array.find-index"),require("./modules/es6.array.species"),require("./modules/es6.array.iterator"),require("./modules/es6.regexp.constructor"),require("./modules/es6.regexp.to-string"),require("./modules/es6.regexp.flags"),require("./modules/es6.regexp.match"),require("./modules/es6.regexp.replace"),require("./modules/es6.regexp.search"),require("./modules/es6.regexp.split"),require("./modules/es6.promise"),require("./modules/es6.map"),require("./modules/es6.set"),require("./modules/es6.weak-map"),require("./modules/es6.weak-set"),require("./modules/es6.typed.array-buffer"),require("./modules/es6.typed.data-view"),require("./modules/es6.typed.int8-array"),require("./modules/es6.typed.uint8-array"),require("./modules/es6.typed.uint8-clamped-array"),require("./modules/es6.typed.int16-array"),require("./modules/es6.typed.uint16-array"),require("./modules/es6.typed.int32-array"),require("./modules/es6.typed.uint32-array"),require("./modules/es6.typed.float32-array"),require("./modules/es6.typed.float64-array"),require("./modules/es6.reflect.apply"),require("./modules/es6.reflect.construct"),require("./modules/es6.reflect.define-property"),require("./modules/es6.reflect.delete-property"),require("./modules/es6.reflect.enumerate"),require("./modules/es6.reflect.get"),require("./modules/es6.reflect.get-own-property-descriptor"),require("./modules/es6.reflect.get-prototype-of"),require("./modules/es6.reflect.has"),require("./modules/es6.reflect.is-extensible"),require("./modules/es6.reflect.own-keys"),require("./modules/es6.reflect.prevent-extensions"),require("./modules/es6.reflect.set"),require("./modules/es6.reflect.set-prototype-of"),require("./modules/es7.array.includes"),require("./modules/es7.string.at"),require("./modules/es7.string.pad-start"),require("./modules/es7.string.pad-end"),require("./modules/es7.string.trim-left"),require("./modules/es7.string.trim-right"),require("./modules/es7.string.match-all"),require("./modules/es7.symbol.async-iterator"),require("./modules/es7.symbol.observable"),require("./modules/es7.object.get-own-property-descriptors"),require("./modules/es7.object.values"),require("./modules/es7.object.entries"),require("./modules/es7.object.define-getter"),require("./modules/es7.object.define-setter"),require("./modules/es7.object.lookup-getter"),require("./modules/es7.object.lookup-setter"),require("./modules/es7.map.to-json"),require("./modules/es7.set.to-json"),require("./modules/es7.system.global"),require("./modules/es7.error.is-error"),require("./modules/es7.math.iaddh"),require("./modules/es7.math.isubh"),require("./modules/es7.math.imulh"),require("./modules/es7.math.umulh"),require("./modules/es7.reflect.define-metadata"),require("./modules/es7.reflect.delete-metadata"),require("./modules/es7.reflect.get-metadata"),require("./modules/es7.reflect.get-metadata-keys"),require("./modules/es7.reflect.get-own-metadata"),require("./modules/es7.reflect.get-own-metadata-keys"),require("./modules/es7.reflect.has-metadata"),require("./modules/es7.reflect.has-own-metadata"),require("./modules/es7.reflect.metadata"),require("./modules/es7.asap"),require("./modules/es7.observable"),require("./modules/web.timers"),require("./modules/web.immediate"),require("./modules/web.dom.iterable"),module.exports=require("./modules/_core")},{"./modules/_core":27,"./modules/es6.array.copy-within":124,"./modules/es6.array.every":125,"./modules/es6.array.fill":126,"./modules/es6.array.filter":127,"./modules/es6.array.find":129,"./modules/es6.array.find-index":128,"./modules/es6.array.for-each":130,"./modules/es6.array.from":131,"./modules/es6.array.index-of":132,"./modules/es6.array.is-array":133,"./modules/es6.array.iterator":134,"./modules/es6.array.join":135,"./modules/es6.array.last-index-of":136,"./modules/es6.array.map":137,"./modules/es6.array.of":138,"./modules/es6.array.reduce":140,"./modules/es6.array.reduce-right":139,"./modules/es6.array.slice":141,"./modules/es6.array.some":142,"./modules/es6.array.sort":143,"./modules/es6.array.species":144,"./modules/es6.date.now":145,"./modules/es6.date.to-iso-string":146,"./modules/es6.date.to-json":147,"./modules/es6.date.to-primitive":148,"./modules/es6.date.to-string":149,"./modules/es6.function.bind":150,"./modules/es6.function.has-instance":151,"./modules/es6.function.name":152,"./modules/es6.map":153,"./modules/es6.math.acosh":154,"./modules/es6.math.asinh":155,"./modules/es6.math.atanh":156,"./modules/es6.math.cbrt":157,"./modules/es6.math.clz32":158,"./modules/es6.math.cosh":159,"./modules/es6.math.expm1":160,"./modules/es6.math.fround":161,"./modules/es6.math.hypot":162,"./modules/es6.math.imul":163,"./modules/es6.math.log10":164,"./modules/es6.math.log1p":165,"./modules/es6.math.log2":166,"./modules/es6.math.sign":167,"./modules/es6.math.sinh":168,"./modules/es6.math.tanh":169,"./modules/es6.math.trunc":170,"./modules/es6.number.constructor":171,"./modules/es6.number.epsilon":172,"./modules/es6.number.is-finite":173,"./modules/es6.number.is-integer":174,"./modules/es6.number.is-nan":175,"./modules/es6.number.is-safe-integer":176,"./modules/es6.number.max-safe-integer":177,"./modules/es6.number.min-safe-integer":178,"./modules/es6.number.parse-float":179,"./modules/es6.number.parse-int":180,"./modules/es6.number.to-fixed":181,"./modules/es6.number.to-precision":182,"./modules/es6.object.assign":183,"./modules/es6.object.create":184,"./modules/es6.object.define-properties":185,"./modules/es6.object.define-property":186,"./modules/es6.object.freeze":187,"./modules/es6.object.get-own-property-descriptor":188,"./modules/es6.object.get-own-property-names":189,"./modules/es6.object.get-prototype-of":190,"./modules/es6.object.is":194,"./modules/es6.object.is-extensible":191,"./modules/es6.object.is-frozen":192,"./modules/es6.object.is-sealed":193,"./modules/es6.object.keys":195,"./modules/es6.object.prevent-extensions":196,"./modules/es6.object.seal":197,"./modules/es6.object.set-prototype-of":198,"./modules/es6.object.to-string":199,"./modules/es6.parse-float":200,"./modules/es6.parse-int":201,"./modules/es6.promise":202,"./modules/es6.reflect.apply":203,"./modules/es6.reflect.construct":204,"./modules/es6.reflect.define-property":205,"./modules/es6.reflect.delete-property":206,"./modules/es6.reflect.enumerate":207,"./modules/es6.reflect.get":210,"./modules/es6.reflect.get-own-property-descriptor":208,"./modules/es6.reflect.get-prototype-of":209,"./modules/es6.reflect.has":211,"./modules/es6.reflect.is-extensible":212,"./modules/es6.reflect.own-keys":213,"./modules/es6.reflect.prevent-extensions":214,"./modules/es6.reflect.set":216,"./modules/es6.reflect.set-prototype-of":215,"./modules/es6.regexp.constructor":217,"./modules/es6.regexp.flags":218,
+"./modules/es6.regexp.match":219,"./modules/es6.regexp.replace":220,"./modules/es6.regexp.search":221,"./modules/es6.regexp.split":222,"./modules/es6.regexp.to-string":223,"./modules/es6.set":224,"./modules/es6.string.anchor":225,"./modules/es6.string.big":226,"./modules/es6.string.blink":227,"./modules/es6.string.bold":228,"./modules/es6.string.code-point-at":229,"./modules/es6.string.ends-with":230,"./modules/es6.string.fixed":231,"./modules/es6.string.fontcolor":232,"./modules/es6.string.fontsize":233,"./modules/es6.string.from-code-point":234,"./modules/es6.string.includes":235,"./modules/es6.string.italics":236,"./modules/es6.string.iterator":237,"./modules/es6.string.link":238,"./modules/es6.string.raw":239,"./modules/es6.string.repeat":240,"./modules/es6.string.small":241,"./modules/es6.string.starts-with":242,"./modules/es6.string.strike":243,"./modules/es6.string.sub":244,"./modules/es6.string.sup":245,"./modules/es6.string.trim":246,"./modules/es6.symbol":247,"./modules/es6.typed.array-buffer":248,"./modules/es6.typed.data-view":249,"./modules/es6.typed.float32-array":250,"./modules/es6.typed.float64-array":251,"./modules/es6.typed.int16-array":252,"./modules/es6.typed.int32-array":253,"./modules/es6.typed.int8-array":254,"./modules/es6.typed.uint16-array":255,"./modules/es6.typed.uint32-array":256,"./modules/es6.typed.uint8-array":257,"./modules/es6.typed.uint8-clamped-array":258,"./modules/es6.weak-map":259,"./modules/es6.weak-set":260,"./modules/es7.array.includes":261,"./modules/es7.asap":262,"./modules/es7.error.is-error":263,"./modules/es7.map.to-json":264,"./modules/es7.math.iaddh":265,"./modules/es7.math.imulh":266,"./modules/es7.math.isubh":267,"./modules/es7.math.umulh":268,"./modules/es7.object.define-getter":269,"./modules/es7.object.define-setter":270,"./modules/es7.object.entries":271,"./modules/es7.object.get-own-property-descriptors":272,"./modules/es7.object.lookup-getter":273,"./modules/es7.object.lookup-setter":274,"./modules/es7.object.values":275,"./modules/es7.observable":276,"./modules/es7.reflect.define-metadata":277,"./modules/es7.reflect.delete-metadata":278,"./modules/es7.reflect.get-metadata":280,"./modules/es7.reflect.get-metadata-keys":279,"./modules/es7.reflect.get-own-metadata":282,"./modules/es7.reflect.get-own-metadata-keys":281,"./modules/es7.reflect.has-metadata":283,"./modules/es7.reflect.has-own-metadata":284,"./modules/es7.reflect.metadata":285,"./modules/es7.set.to-json":286,"./modules/es7.string.at":287,"./modules/es7.string.match-all":288,"./modules/es7.string.pad-end":289,"./modules/es7.string.pad-start":290,"./modules/es7.string.trim-left":291,"./modules/es7.string.trim-right":292,"./modules/es7.symbol.async-iterator":293,"./modules/es7.symbol.observable":294,"./modules/es7.system.global":295,"./modules/web.dom.iterable":296,"./modules/web.immediate":297,"./modules/web.timers":298}],300:[function(require,module,exports){"use strict";module.exports=require("./src/js/main")},{"./src/js/main":306}],301:[function(require,module,exports){"use strict";function oldAdd(element,className){var classes=element.className.split(" ");classes.indexOf(className)<0&&classes.push(className),element.className=classes.join(" ")}function oldRemove(element,className){var classes=element.className.split(" "),idx=classes.indexOf(className);idx>=0&&classes.splice(idx,1),element.className=classes.join(" ")}exports.add=function(element,className){element.classList?element.classList.add(className):oldAdd(element,className)},exports.remove=function(element,className){element.classList?element.classList.remove(className):oldRemove(element,className)},exports.list=function(element){return element.classList?Array.prototype.slice.apply(element.classList):element.className.split(" ")}},{}],302:[function(require,module,exports){"use strict";function cssGet(element,styleName){return window.getComputedStyle(element)[styleName]}function cssSet(element,styleName,styleValue){return"number"==typeof styleValue&&(styleValue=styleValue.toString()+"px"),element.style[styleName]=styleValue,element}function cssMultiSet(element,obj){for(var key in obj){var val=obj[key];"number"==typeof val&&(val=val.toString()+"px"),element.style[key]=val}return element}var DOM={};DOM.e=function(tagName,className){var element=document.createElement(tagName);return element.className=className,element},DOM.appendTo=function(child,parent){return parent.appendChild(child),child},DOM.css=function(element,styleNameOrObject,styleValue){return"object"==typeof styleNameOrObject?cssMultiSet(element,styleNameOrObject):void 0===styleValue?cssGet(element,styleNameOrObject):cssSet(element,styleNameOrObject,styleValue)},DOM.matches=function(element,query){return void 0!==element.matches?element.matches(query):void 0!==element.matchesSelector?element.matchesSelector(query):void 0!==element.webkitMatchesSelector?element.webkitMatchesSelector(query):void 0!==element.mozMatchesSelector?element.mozMatchesSelector(query):void 0!==element.msMatchesSelector?element.msMatchesSelector(query):void 0},DOM.remove=function(element){void 0!==element.remove?element.remove():element.parentNode&&element.parentNode.removeChild(element)},DOM.queryChildren=function(element,selector){return Array.prototype.filter.call(element.childNodes,function(child){return DOM.matches(child,selector)})},module.exports=DOM},{}],303:[function(require,module,exports){"use strict";var EventElement=function(element){this.element=element,this.events={}};EventElement.prototype.bind=function(eventName,handler){void 0===this.events[eventName]&&(this.events[eventName]=[]),this.events[eventName].push(handler),this.element.addEventListener(eventName,handler,!1)},EventElement.prototype.unbind=function(eventName,handler){var isHandlerProvided=void 0!==handler;this.events[eventName]=this.events[eventName].filter(function(hdlr){return!(!isHandlerProvided||hdlr===handler)||(this.element.removeEventListener(eventName,hdlr,!1),!1)},this)},EventElement.prototype.unbindAll=function(){for(var name in this.events)this.unbind(name)};var EventManager=function(){this.eventElements=[]};EventManager.prototype.eventElement=function(element){var ee=this.eventElements.filter(function(eventElement){return eventElement.element===element})[0];return void 0===ee&&(ee=new EventElement(element),this.eventElements.push(ee)),ee},EventManager.prototype.bind=function(element,eventName,handler){this.eventElement(element).bind(eventName,handler)},EventManager.prototype.unbind=function(element,eventName,handler){this.eventElement(element).unbind(eventName,handler)},EventManager.prototype.unbindAll=function(){for(var i=0;i<this.eventElements.length;i++)this.eventElements[i].unbindAll()},EventManager.prototype.once=function(element,eventName,handler){var ee=this.eventElement(element),onceHandler=function(e){ee.unbind(eventName,onceHandler),handler(e)};ee.bind(eventName,onceHandler)},module.exports=EventManager},{}],304:[function(require,module,exports){"use strict";module.exports=function(){function s4(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return s4()+s4()+"-"+s4()+"-"+s4()+"-"+s4()+"-"+s4()+s4()+s4()}}()},{}],305:[function(require,module,exports){"use strict";var cls=require("./class"),dom=require("./dom"),toInt=exports.toInt=function(x){return parseInt(x,10)||0},clone=exports.clone=function(obj){if(obj){if(obj.constructor===Array)return obj.map(clone);if("object"==typeof obj){var result={};for(var key in obj)result[key]=clone(obj[key]);return result}return obj}return null};exports.extend=function(original,source){var result=clone(original);for(var key in source)result[key]=clone(source[key]);return result},exports.isEditable=function(el){return dom.matches(el,"input,[contenteditable]")||dom.matches(el,"select,[contenteditable]")||dom.matches(el,"textarea,[contenteditable]")||dom.matches(el,"button,[contenteditable]")},exports.removePsClasses=function(element){for(var clsList=cls.list(element),i=0;i<clsList.length;i++){var className=clsList[i];0===className.indexOf("ps-")&&cls.remove(element,className)}},exports.outerWidth=function(element){return toInt(dom.css(element,"width"))+toInt(dom.css(element,"paddingLeft"))+toInt(dom.css(element,"paddingRight"))+toInt(dom.css(element,"borderLeftWidth"))+toInt(dom.css(element,"borderRightWidth"))},exports.startScrolling=function(element,axis){cls.add(element,"ps-in-scrolling"),void 0!==axis?cls.add(element,"ps-"+axis):(cls.add(element,"ps-x"),cls.add(element,"ps-y"))},exports.stopScrolling=function(element,axis){cls.remove(element,"ps-in-scrolling"),void 0!==axis?cls.remove(element,"ps-"+axis):(cls.remove(element,"ps-x"),cls.remove(element,"ps-y"))},exports.env={isWebKit:"WebkitAppearance"in document.documentElement.style,supportsTouch:"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,supportsIePointer:null!==window.navigator.msMaxTouchPoints}},{"./class":301,"./dom":302}],306:[function(require,module,exports){"use strict";var destroy=require("./plugin/destroy"),initialize=require("./plugin/initialize"),update=require("./plugin/update");module.exports={initialize:initialize,update:update,destroy:destroy}},{"./plugin/destroy":308,"./plugin/initialize":316,"./plugin/update":320}],307:[function(require,module,exports){"use strict";module.exports={handlers:["click-rail","drag-scrollbar","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipePropagation:!0,useBothWheelAxes:!1,wheelPropagation:!1,wheelSpeed:1,theme:"default"}},{}],308:[function(require,module,exports){"use strict";var _=require("../lib/helper"),dom=require("../lib/dom"),instances=require("./instances");module.exports=function(element){var i=instances.get(element);i&&(i.event.unbindAll(),dom.remove(i.scrollbarX),dom.remove(i.scrollbarY),dom.remove(i.scrollbarXRail),dom.remove(i.scrollbarYRail),_.removePsClasses(element),instances.remove(element))}},{"../lib/dom":302,"../lib/helper":305,"./instances":317}],309:[function(require,module,exports){"use strict";function bindClickRailHandler(element,i){function pageOffset(el){return el.getBoundingClientRect()}var stopPropagation=function(e){e.stopPropagation()};i.event.bind(i.scrollbarY,"click",stopPropagation),i.event.bind(i.scrollbarYRail,"click",function(e){var positionTop=e.pageY-window.pageYOffset-pageOffset(i.scrollbarYRail).top,direction=positionTop>i.scrollbarYTop?1:-1;updateScroll(element,"top",element.scrollTop+direction*i.containerHeight),updateGeometry(element),e.stopPropagation()}),i.event.bind(i.scrollbarX,"click",stopPropagation),i.event.bind(i.scrollbarXRail,"click",function(e){var positionLeft=e.pageX-window.pageXOffset-pageOffset(i.scrollbarXRail).left,direction=positionLeft>i.scrollbarXLeft?1:-1;updateScroll(element,"left",element.scrollLeft+direction*i.containerWidth),updateGeometry(element),e.stopPropagation()})}var instances=require("../instances"),updateGeometry=require("../update-geometry"),updateScroll=require("../update-scroll");module.exports=function(element){bindClickRailHandler(element,instances.get(element))}},{"../instances":317,"../update-geometry":318,"../update-scroll":319}],310:[function(require,module,exports){"use strict";function bindMouseScrollXHandler(element,i){function updateScrollLeft(deltaX){var newLeft=currentLeft+deltaX*i.railXRatio,maxLeft=Math.max(0,i.scrollbarXRail.getBoundingClientRect().left)+i.railXRatio*(i.railXWidth-i.scrollbarXWidth);i.scrollbarXLeft=newLeft<0?0:newLeft>maxLeft?maxLeft:newLeft;var scrollLeft=_.toInt(i.scrollbarXLeft*(i.contentWidth-i.containerWidth)/(i.containerWidth-i.railXRatio*i.scrollbarXWidth))-i.negativeScrollAdjustment;updateScroll(element,"left",scrollLeft)}var currentLeft=null,currentPageX=null,mouseMoveHandler=function(e){updateScrollLeft(e.pageX-currentPageX),updateGeometry(element),e.stopPropagation(),e.preventDefault()},mouseUpHandler=function(){_.stopScrolling(element,"x"),i.event.unbind(i.ownerDocument,"mousemove",mouseMoveHandler)};i.event.bind(i.scrollbarX,"mousedown",function(e){currentPageX=e.pageX,currentLeft=_.toInt(dom.css(i.scrollbarX,"left"))*i.railXRatio,_.startScrolling(element,"x"),i.event.bind(i.ownerDocument,"mousemove",mouseMoveHandler),i.event.once(i.ownerDocument,"mouseup",mouseUpHandler),e.stopPropagation(),e.preventDefault()})}function bindMouseScrollYHandler(element,i){function updateScrollTop(deltaY){var newTop=currentTop+deltaY*i.railYRatio,maxTop=Math.max(0,i.scrollbarYRail.getBoundingClientRect().top)+i.railYRatio*(i.railYHeight-i.scrollbarYHeight);i.scrollbarYTop=newTop<0?0:newTop>maxTop?maxTop:newTop;var scrollTop=_.toInt(i.scrollbarYTop*(i.contentHeight-i.containerHeight)/(i.containerHeight-i.railYRatio*i.scrollbarYHeight));updateScroll(element,"top",scrollTop)}var currentTop=null,currentPageY=null,mouseMoveHandler=function(e){updateScrollTop(e.pageY-currentPageY),updateGeometry(element),e.stopPropagation(),e.preventDefault()},mouseUpHandler=function(){_.stopScrolling(element,"y"),i.event.unbind(i.ownerDocument,"mousemove",mouseMoveHandler)};i.event.bind(i.scrollbarY,"mousedown",function(e){currentPageY=e.pageY,currentTop=_.toInt(dom.css(i.scrollbarY,"top"))*i.railYRatio,_.startScrolling(element,"y"),i.event.bind(i.ownerDocument,"mousemove",mouseMoveHandler),i.event.once(i.ownerDocument,"mouseup",mouseUpHandler),e.stopPropagation(),e.preventDefault()})}var _=require("../../lib/helper"),dom=require("../../lib/dom"),instances=require("../instances"),updateGeometry=require("../update-geometry"),updateScroll=require("../update-scroll");module.exports=function(element){var i=instances.get(element);bindMouseScrollXHandler(element,i),bindMouseScrollYHandler(element,i)}},{"../../lib/dom":302,"../../lib/helper":305,"../instances":317,"../update-geometry":318,"../update-scroll":319}],311:[function(require,module,exports){"use strict";function bindKeyboardHandler(element,i){function shouldPreventDefault(deltaX,deltaY){var scrollTop=element.scrollTop;if(0===deltaX){if(!i.scrollbarYActive)return!1;if(0===scrollTop&&deltaY>0||scrollTop>=i.contentHeight-i.containerHeight&&deltaY<0)return!i.settings.wheelPropagation}var scrollLeft=element.scrollLeft;if(0===deltaY){if(!i.scrollbarXActive)return!1;if(0===scrollLeft&&deltaX<0||scrollLeft>=i.contentWidth-i.containerWidth&&deltaX>0)return!i.settings.wheelPropagation}return!0}var hovered=!1;i.event.bind(element,"mouseenter",function(){hovered=!0}),i.event.bind(element,"mouseleave",function(){hovered=!1});var shouldPrevent=!1;i.event.bind(i.ownerDocument,"keydown",function(e){if(!(e.isDefaultPrevented&&e.isDefaultPrevented()||e.defaultPrevented)){var focused=dom.matches(i.scrollbarX,":focus")||dom.matches(i.scrollbarY,":focus");if(hovered||focused){var activeElement=document.activeElement?document.activeElement:i.ownerDocument.activeElement;if(activeElement){if("IFRAME"===activeElement.tagName)activeElement=activeElement.contentDocument.activeElement;else for(;activeElement.shadowRoot;)activeElement=activeElement.shadowRoot.activeElement;if(_.isEditable(activeElement))return}var deltaX=0,deltaY=0;switch(e.which){case 37:deltaX=e.metaKey?-i.contentWidth:e.altKey?-i.containerWidth:-30;break;case 38:deltaY=e.metaKey?i.contentHeight:e.altKey?i.containerHeight:30;break;case 39:deltaX=e.metaKey?i.contentWidth:e.altKey?i.containerWidth:30;break;case 40:deltaY=e.metaKey?-i.contentHeight:e.altKey?-i.containerHeight:-30;break;case 33:deltaY=90;break;case 32:deltaY=e.shiftKey?90:-90;break;case 34:deltaY=-90;break;case 35:deltaY=e.ctrlKey?-i.contentHeight:-i.containerHeight;break;case 36:deltaY=e.ctrlKey?element.scrollTop:i.containerHeight;break;default:return}updateScroll(element,"top",element.scrollTop-deltaY),updateScroll(element,"left",element.scrollLeft+deltaX),updateGeometry(element),shouldPrevent=shouldPreventDefault(deltaX,deltaY),shouldPrevent&&e.preventDefault()}}})}var _=require("../../lib/helper"),dom=require("../../lib/dom"),instances=require("../instances"),updateGeometry=require("../update-geometry"),updateScroll=require("../update-scroll");module.exports=function(element){bindKeyboardHandler(element,instances.get(element))}},{"../../lib/dom":302,"../../lib/helper":305,"../instances":317,"../update-geometry":318,"../update-scroll":319}],312:[function(require,module,exports){"use strict";function bindMouseWheelHandler(element,i){function shouldPreventDefault(deltaX,deltaY){var scrollTop=element.scrollTop;if(0===deltaX){if(!i.scrollbarYActive)return!1;if(0===scrollTop&&deltaY>0||scrollTop>=i.contentHeight-i.containerHeight&&deltaY<0)return!i.settings.wheelPropagation}var scrollLeft=element.scrollLeft;if(0===deltaY){if(!i.scrollbarXActive)return!1;if(0===scrollLeft&&deltaX<0||scrollLeft>=i.contentWidth-i.containerWidth&&deltaX>0)return!i.settings.wheelPropagation}return!0}function getDeltaFromEvent(e){var deltaX=e.deltaX,deltaY=-1*e.deltaY;return void 0!==deltaX&&void 0!==deltaY||(deltaX=-1*e.wheelDeltaX/6,deltaY=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(deltaX*=10,deltaY*=10),deltaX!==deltaX&&deltaY!==deltaY&&(deltaX=0,deltaY=e.wheelDelta),e.shiftKey?[-deltaY,-deltaX]:[deltaX,deltaY]}function shouldBeConsumedByChild(deltaX,deltaY){var child=element.querySelector("textarea:hover, select[multiple]:hover, .ps-child:hover");if(child){if(!window.getComputedStyle(child).overflow.match(/(scroll|auto)/))return!1;var maxScrollTop=child.scrollHeight-child.clientHeight;if(maxScrollTop>0&&!(0===child.scrollTop&&deltaY>0||child.scrollTop===maxScrollTop&&deltaY<0))return!0;var maxScrollLeft=child.scrollLeft-child.clientWidth;if(maxScrollLeft>0&&!(0===child.scrollLeft&&deltaX<0||child.scrollLeft===maxScrollLeft&&deltaX>0))return!0}return!1}function mousewheelHandler(e){var delta=getDeltaFromEvent(e),deltaX=delta[0],deltaY=delta[1];shouldBeConsumedByChild(deltaX,deltaY)||(shouldPrevent=!1,i.settings.useBothWheelAxes?i.scrollbarYActive&&!i.scrollbarXActive?(deltaY?updateScroll(element,"top",element.scrollTop-deltaY*i.settings.wheelSpeed):updateScroll(element,"top",element.scrollTop+deltaX*i.settings.wheelSpeed),shouldPrevent=!0):i.scrollbarXActive&&!i.scrollbarYActive&&(deltaX?updateScroll(element,"left",element.scrollLeft+deltaX*i.settings.wheelSpeed):updateScroll(element,"left",element.scrollLeft-deltaY*i.settings.wheelSpeed),shouldPrevent=!0):(updateScroll(element,"top",element.scrollTop-deltaY*i.settings.wheelSpeed),updateScroll(element,"left",element.scrollLeft+deltaX*i.settings.wheelSpeed)),updateGeometry(element),(shouldPrevent=shouldPrevent||shouldPreventDefault(deltaX,deltaY))&&(e.stopPropagation(),e.preventDefault()))}var shouldPrevent=!1;void 0!==window.onwheel?i.event.bind(element,"wheel",mousewheelHandler):void 0!==window.onmousewheel&&i.event.bind(element,"mousewheel",mousewheelHandler)}var instances=require("../instances"),updateGeometry=require("../update-geometry"),updateScroll=require("../update-scroll");module.exports=function(element){bindMouseWheelHandler(element,instances.get(element))}},{"../instances":317,"../update-geometry":318,"../update-scroll":319}],313:[function(require,module,exports){"use strict";function bindNativeScrollHandler(element,i){i.event.bind(element,"scroll",function(){updateGeometry(element)})}var instances=require("../instances"),updateGeometry=require("../update-geometry");module.exports=function(element){bindNativeScrollHandler(element,instances.get(element))}},{"../instances":317,"../update-geometry":318}],314:[function(require,module,exports){"use strict";function bindSelectionHandler(element,i){function getRangeNode(){var selection=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===selection.toString().length?null:selection.getRangeAt(0).commonAncestorContainer}function startScrolling(){scrollingLoop||(scrollingLoop=setInterval(function(){if(!instances.get(element))return void clearInterval(scrollingLoop);updateScroll(element,"top",element.scrollTop+scrollDiff.top),updateScroll(element,"left",element.scrollLeft+scrollDiff.left),updateGeometry(element)},50))}function stopScrolling(){scrollingLoop&&(clearInterval(scrollingLoop),scrollingLoop=null),_.stopScrolling(element)}var scrollingLoop=null,scrollDiff={top:0,left:0},isSelected=!1;i.event.bind(i.ownerDocument,"selectionchange",function(){element.contains(getRangeNode())?isSelected=!0:(isSelected=!1,stopScrolling())}),i.event.bind(window,"mouseup",function(){isSelected&&(isSelected=!1,stopScrolling())}),i.event.bind(window,"keyup",function(){isSelected&&(isSelected=!1,stopScrolling())}),i.event.bind(window,"mousemove",function(e){if(isSelected){var mousePosition={x:e.pageX,y:e.pageY},containerGeometry={left:element.offsetLeft,right:element.offsetLeft+element.offsetWidth,top:element.offsetTop,bottom:element.offsetTop+element.offsetHeight};mousePosition.x<containerGeometry.left+3?(scrollDiff.left=-5,_.startScrolling(element,"x")):mousePosition.x>containerGeometry.right-3?(scrollDiff.left=5,_.startScrolling(element,"x")):scrollDiff.left=0,mousePosition.y<containerGeometry.top+3?(scrollDiff.top=containerGeometry.top+3-mousePosition.y<5?-5:-20,_.startScrolling(element,"y")):mousePosition.y>containerGeometry.bottom-3?(scrollDiff.top=mousePosition.y-containerGeometry.bottom+3<5?5:20,_.startScrolling(element,"y")):scrollDiff.top=0,0===scrollDiff.top&&0===scrollDiff.left?stopScrolling():startScrolling()}})}var _=require("../../lib/helper"),instances=require("../instances"),updateGeometry=require("../update-geometry"),updateScroll=require("../update-scroll");module.exports=function(element){bindSelectionHandler(element,instances.get(element))}},{"../../lib/helper":305,"../instances":317,"../update-geometry":318,"../update-scroll":319}],315:[function(require,module,exports){"use strict";function bindTouchHandler(element,i,supportsTouch,supportsIePointer){function shouldPreventDefault(deltaX,deltaY){var scrollTop=element.scrollTop,scrollLeft=element.scrollLeft,magnitudeX=Math.abs(deltaX),magnitudeY=Math.abs(deltaY);if(magnitudeY>magnitudeX){if(deltaY<0&&scrollTop===i.contentHeight-i.containerHeight||deltaY>0&&0===scrollTop)return!i.settings.swipePropagation}else if(magnitudeX>magnitudeY&&(deltaX<0&&scrollLeft===i.contentWidth-i.containerWidth||deltaX>0&&0===scrollLeft))return!i.settings.swipePropagation;return!0}function applyTouchMove(differenceX,differenceY){updateScroll(element,"top",element.scrollTop-differenceY),updateScroll(element,"left",element.scrollLeft-differenceX),updateGeometry(element)}function globalTouchStart(){inGlobalTouch=!0}function globalTouchEnd(){inGlobalTouch=!1}function getTouch(e){return e.targetTouches?e.targetTouches[0]:e}function shouldHandle(e){return!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE)}function touchStart(e){if(shouldHandle(e)){inLocalTouch=!0;var touch=getTouch(e);startOffset.pageX=touch.pageX,startOffset.pageY=touch.pageY,startTime=(new Date).getTime(),null!==easingLoop&&clearInterval(easingLoop),e.stopPropagation()}}function touchMove(e){if(!inLocalTouch&&i.settings.swipePropagation&&touchStart(e),!inGlobalTouch&&inLocalTouch&&shouldHandle(e)){var touch=getTouch(e),currentOffset={pageX:touch.pageX,pageY:touch.pageY},differenceX=currentOffset.pageX-startOffset.pageX,differenceY=currentOffset.pageY-startOffset.pageY;applyTouchMove(differenceX,differenceY),startOffset=currentOffset;var currentTime=(new Date).getTime(),timeGap=currentTime-startTime;timeGap>0&&(speed.x=differenceX/timeGap,speed.y=differenceY/timeGap,startTime=currentTime),shouldPreventDefault(differenceX,differenceY)&&(e.stopPropagation(),e.preventDefault())}}function touchEnd(){!inGlobalTouch&&inLocalTouch&&(inLocalTouch=!1,clearInterval(easingLoop),easingLoop=setInterval(function(){return instances.get(element)&&(speed.x||speed.y)?Math.abs(speed.x)<.01&&Math.abs(speed.y)<.01?void clearInterval(easingLoop):(applyTouchMove(30*speed.x,30*speed.y),speed.x*=.8,void(speed.y*=.8)):void clearInterval(easingLoop)},10))}var startOffset={},startTime=0,speed={},easingLoop=null,inGlobalTouch=!1,inLocalTouch=!1;supportsTouch?(i.event.bind(window,"touchstart",globalTouchStart),i.event.bind(window,"touchend",globalTouchEnd),i.event.bind(element,"touchstart",touchStart),i.event.bind(element,"touchmove",touchMove),i.event.bind(element,"touchend",touchEnd)):supportsIePointer&&(window.PointerEvent?(i.event.bind(window,"pointerdown",globalTouchStart),i.event.bind(window,"pointerup",globalTouchEnd),i.event.bind(element,"pointerdown",touchStart),i.event.bind(element,"pointermove",touchMove),i.event.bind(element,"pointerup",touchEnd)):window.MSPointerEvent&&(i.event.bind(window,"MSPointerDown",globalTouchStart),i.event.bind(window,"MSPointerUp",globalTouchEnd),i.event.bind(element,"MSPointerDown",touchStart),i.event.bind(element,"MSPointerMove",touchMove),i.event.bind(element,"MSPointerUp",touchEnd)))}var _=require("../../lib/helper"),instances=require("../instances"),updateGeometry=require("../update-geometry"),updateScroll=require("../update-scroll");module.exports=function(element){if(_.env.supportsTouch||_.env.supportsIePointer){bindTouchHandler(element,instances.get(element),_.env.supportsTouch,_.env.supportsIePointer)}}},{"../../lib/helper":305,"../instances":317,"../update-geometry":318,"../update-scroll":319}],316:[function(require,module,exports){"use strict";var _=require("../lib/helper"),cls=require("../lib/class"),instances=require("./instances"),updateGeometry=require("./update-geometry"),handlers={"click-rail":require("./handler/click-rail"),"drag-scrollbar":require("./handler/drag-scrollbar"),keyboard:require("./handler/keyboard"),wheel:require("./handler/mouse-wheel"),touch:require("./handler/touch"),selection:require("./handler/selection")},nativeScrollHandler=require("./handler/native-scroll");module.exports=function(element,userSettings){userSettings="object"==typeof userSettings?userSettings:{},cls.add(element,"ps-container");var i=instances.add(element);i.settings=_.extend(i.settings,userSettings),cls.add(element,"ps-theme-"+i.settings.theme),i.settings.handlers.forEach(function(handlerName){handlers[handlerName](element)}),nativeScrollHandler(element),updateGeometry(element)}},{"../lib/class":301,"../lib/helper":305,"./handler/click-rail":309,"./handler/drag-scrollbar":310,"./handler/keyboard":311,"./handler/mouse-wheel":312,"./handler/native-scroll":313,"./handler/selection":314,"./handler/touch":315,"./instances":317,"./update-geometry":318}],317:[function(require,module,exports){"use strict";function Instance(element){function focus(){cls.add(element,"ps-focus")}function blur(){cls.remove(element,"ps-focus")}var i=this;i.settings=_.clone(defaultSettings),i.containerWidth=null,i.containerHeight=null,i.contentWidth=null,i.contentHeight=null,i.isRtl="rtl"===dom.css(element,"direction"),i.isNegativeScroll=function(){var originalScrollLeft=element.scrollLeft,result=null;return element.scrollLeft=-1,result=element.scrollLeft<0,element.scrollLeft=originalScrollLeft,result}(),i.negativeScrollAdjustment=i.isNegativeScroll?element.scrollWidth-element.clientWidth:0,i.event=new EventManager,i.ownerDocument=element.ownerDocument||document,i.scrollbarXRail=dom.appendTo(dom.e("div","ps-scrollbar-x-rail"),element),i.scrollbarX=dom.appendTo(dom.e("div","ps-scrollbar-x"),i.scrollbarXRail),i.scrollbarX.setAttribute("tabindex",0),i.event.bind(i.scrollbarX,"focus",focus),i.event.bind(i.scrollbarX,"blur",blur),i.scrollbarXActive=null,i.scrollbarXWidth=null,i.scrollbarXLeft=null,i.scrollbarXBottom=_.toInt(dom.css(i.scrollbarXRail,"bottom")),i.isScrollbarXUsingBottom=i.scrollbarXBottom===i.scrollbarXBottom,i.scrollbarXTop=i.isScrollbarXUsingBottom?null:_.toInt(dom.css(i.scrollbarXRail,"top")),i.railBorderXWidth=_.toInt(dom.css(i.scrollbarXRail,"borderLeftWidth"))+_.toInt(dom.css(i.scrollbarXRail,"borderRightWidth")),dom.css(i.scrollbarXRail,"display","block"),i.railXMarginWidth=_.toInt(dom.css(i.scrollbarXRail,"marginLeft"))+_.toInt(dom.css(i.scrollbarXRail,"marginRight")),dom.css(i.scrollbarXRail,"display",""),i.railXWidth=null,i.railXRatio=null,i.scrollbarYRail=dom.appendTo(dom.e("div","ps-scrollbar-y-rail"),element),i.scrollbarY=dom.appendTo(dom.e("div","ps-scrollbar-y"),i.scrollbarYRail),i.scrollbarY.setAttribute("tabindex",0),i.event.bind(i.scrollbarY,"focus",focus),i.event.bind(i.scrollbarY,"blur",blur),i.scrollbarYActive=null,i.scrollbarYHeight=null,i.scrollbarYTop=null,i.scrollbarYRight=_.toInt(dom.css(i.scrollbarYRail,"right")),i.isScrollbarYUsingRight=i.scrollbarYRight===i.scrollbarYRight,i.scrollbarYLeft=i.isScrollbarYUsingRight?null:_.toInt(dom.css(i.scrollbarYRail,"left")),i.scrollbarYOuterWidth=i.isRtl?_.outerWidth(i.scrollbarY):null,i.railBorderYWidth=_.toInt(dom.css(i.scrollbarYRail,"borderTopWidth"))+_.toInt(dom.css(i.scrollbarYRail,"borderBottomWidth")),dom.css(i.scrollbarYRail,"display","block"),i.railYMarginHeight=_.toInt(dom.css(i.scrollbarYRail,"marginTop"))+_.toInt(dom.css(i.scrollbarYRail,"marginBottom")),dom.css(i.scrollbarYRail,"display",""),i.railYHeight=null,i.railYRatio=null}function getId(element){return element.getAttribute("data-ps-id")}function setId(element,id){element.setAttribute("data-ps-id",id)}function removeId(element){element.removeAttribute("data-ps-id")}var _=require("../lib/helper"),cls=require("../lib/class"),defaultSettings=require("./default-setting"),dom=require("../lib/dom"),EventManager=require("../lib/event-manager"),guid=require("../lib/guid"),instances={};exports.add=function(element){var newId=guid();return setId(element,newId),instances[newId]=new Instance(element),instances[newId]},exports.remove=function(element){delete instances[getId(element)],removeId(element)},exports.get=function(element){return instances[getId(element)]}},{"../lib/class":301,"../lib/dom":302,"../lib/event-manager":303,"../lib/guid":304,"../lib/helper":305,"./default-setting":307}],318:[function(require,module,exports){"use strict";function getThumbSize(i,thumbSize){return i.settings.minScrollbarLength&&(thumbSize=Math.max(thumbSize,i.settings.minScrollbarLength)),i.settings.maxScrollbarLength&&(thumbSize=Math.min(thumbSize,i.settings.maxScrollbarLength)),thumbSize}function updateCss(element,i){var xRailOffset={width:i.railXWidth};i.isRtl?xRailOffset.left=i.negativeScrollAdjustment+element.scrollLeft+i.containerWidth-i.contentWidth:xRailOffset.left=element.scrollLeft,i.isScrollbarXUsingBottom?xRailOffset.bottom=i.scrollbarXBottom-element.scrollTop:xRailOffset.top=i.scrollbarXTop+element.scrollTop,dom.css(i.scrollbarXRail,xRailOffset);var yRailOffset={top:element.scrollTop,height:i.railYHeight};i.isScrollbarYUsingRight?i.isRtl?yRailOffset.right=i.contentWidth-(i.negativeScrollAdjustment+element.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth:yRailOffset.right=i.scrollbarYRight-element.scrollLeft:i.isRtl?yRailOffset.left=i.negativeScrollAdjustment+element.scrollLeft+2*i.containerWidth-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth:yRailOffset.left=i.scrollbarYLeft+element.scrollLeft,dom.css(i.scrollbarYRail,yRailOffset),dom.css(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth}),dom.css(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}var _=require("../lib/helper"),cls=require("../lib/class"),dom=require("../lib/dom"),instances=require("./instances"),updateScroll=require("./update-scroll");module.exports=function(element){var i=instances.get(element);i.containerWidth=element.clientWidth,i.containerHeight=element.clientHeight,i.contentWidth=element.scrollWidth,i.contentHeight=element.scrollHeight;var existingRails;element.contains(i.scrollbarXRail)||(existingRails=dom.queryChildren(element,".ps-scrollbar-x-rail"),existingRails.length>0&&existingRails.forEach(function(rail){dom.remove(rail)}),dom.appendTo(i.scrollbarXRail,element)),
+element.contains(i.scrollbarYRail)||(existingRails=dom.queryChildren(element,".ps-scrollbar-y-rail"),existingRails.length>0&&existingRails.forEach(function(rail){dom.remove(rail)}),dom.appendTo(i.scrollbarYRail,element)),!i.settings.suppressScrollX&&i.containerWidth+i.settings.scrollXMarginOffset<i.contentWidth?(i.scrollbarXActive=!0,i.railXWidth=i.containerWidth-i.railXMarginWidth,i.railXRatio=i.containerWidth/i.railXWidth,i.scrollbarXWidth=getThumbSize(i,_.toInt(i.railXWidth*i.containerWidth/i.contentWidth)),i.scrollbarXLeft=_.toInt((i.negativeScrollAdjustment+element.scrollLeft)*(i.railXWidth-i.scrollbarXWidth)/(i.contentWidth-i.containerWidth))):i.scrollbarXActive=!1,!i.settings.suppressScrollY&&i.containerHeight+i.settings.scrollYMarginOffset<i.contentHeight?(i.scrollbarYActive=!0,i.railYHeight=i.containerHeight-i.railYMarginHeight,i.railYRatio=i.containerHeight/i.railYHeight,i.scrollbarYHeight=getThumbSize(i,_.toInt(i.railYHeight*i.containerHeight/i.contentHeight)),i.scrollbarYTop=_.toInt(element.scrollTop*(i.railYHeight-i.scrollbarYHeight)/(i.contentHeight-i.containerHeight))):i.scrollbarYActive=!1,i.scrollbarXLeft>=i.railXWidth-i.scrollbarXWidth&&(i.scrollbarXLeft=i.railXWidth-i.scrollbarXWidth),i.scrollbarYTop>=i.railYHeight-i.scrollbarYHeight&&(i.scrollbarYTop=i.railYHeight-i.scrollbarYHeight),updateCss(element,i),i.scrollbarXActive?cls.add(element,"ps-active-x"):(cls.remove(element,"ps-active-x"),i.scrollbarXWidth=0,i.scrollbarXLeft=0,updateScroll(element,"left",0)),i.scrollbarYActive?cls.add(element,"ps-active-y"):(cls.remove(element,"ps-active-y"),i.scrollbarYHeight=0,i.scrollbarYTop=0,updateScroll(element,"top",0))}},{"../lib/class":301,"../lib/dom":302,"../lib/helper":305,"./instances":317,"./update-scroll":319}],319:[function(require,module,exports){"use strict";var lastTop,lastLeft,instances=require("./instances"),createDOMEvent=function(name){var event=document.createEvent("Event");return event.initEvent(name,!0,!0),event};module.exports=function(element,axis,value){if(void 0===element)throw"You must provide an element to the update-scroll function";if(void 0===axis)throw"You must provide an axis to the update-scroll function";if(void 0===value)throw"You must provide a value to the update-scroll function";"top"===axis&&value<=0&&(element.scrollTop=value=0,element.dispatchEvent(createDOMEvent("ps-y-reach-start"))),"left"===axis&&value<=0&&(element.scrollLeft=value=0,element.dispatchEvent(createDOMEvent("ps-x-reach-start")));var i=instances.get(element);"top"===axis&&value>=i.contentHeight-i.containerHeight&&(value=i.contentHeight-i.containerHeight,value-element.scrollTop<=1?value=element.scrollTop:element.scrollTop=value,element.dispatchEvent(createDOMEvent("ps-y-reach-end"))),"left"===axis&&value>=i.contentWidth-i.containerWidth&&(value=i.contentWidth-i.containerWidth,value-element.scrollLeft<=1?value=element.scrollLeft:element.scrollLeft=value,element.dispatchEvent(createDOMEvent("ps-x-reach-end"))),lastTop||(lastTop=element.scrollTop),lastLeft||(lastLeft=element.scrollLeft),"top"===axis&&value<lastTop&&element.dispatchEvent(createDOMEvent("ps-scroll-up")),"top"===axis&&value>lastTop&&element.dispatchEvent(createDOMEvent("ps-scroll-down")),"left"===axis&&value<lastLeft&&element.dispatchEvent(createDOMEvent("ps-scroll-left")),"left"===axis&&value>lastLeft&&element.dispatchEvent(createDOMEvent("ps-scroll-right")),"top"===axis&&(element.scrollTop=lastTop=value,element.dispatchEvent(createDOMEvent("ps-scroll-y"))),"left"===axis&&(element.scrollLeft=lastLeft=value,element.dispatchEvent(createDOMEvent("ps-scroll-x")))}},{"./instances":317}],320:[function(require,module,exports){"use strict";var _=require("../lib/helper"),dom=require("../lib/dom"),instances=require("./instances"),updateGeometry=require("./update-geometry"),updateScroll=require("./update-scroll");module.exports=function(element){var i=instances.get(element);i&&(i.negativeScrollAdjustment=i.isNegativeScroll?element.scrollWidth-element.clientWidth:0,dom.css(i.scrollbarXRail,"display","block"),dom.css(i.scrollbarYRail,"display","block"),i.railXMarginWidth=_.toInt(dom.css(i.scrollbarXRail,"marginLeft"))+_.toInt(dom.css(i.scrollbarXRail,"marginRight")),i.railYMarginHeight=_.toInt(dom.css(i.scrollbarYRail,"marginTop"))+_.toInt(dom.css(i.scrollbarYRail,"marginBottom")),dom.css(i.scrollbarXRail,"display","none"),dom.css(i.scrollbarYRail,"display","none"),updateGeometry(element),updateScroll(element,"top",element.scrollTop),updateScroll(element,"left",element.scrollLeft),dom.css(i.scrollbarXRail,"display",""),dom.css(i.scrollbarYRail,"display",""))}},{"../lib/dom":302,"../lib/helper":305,"./instances":317,"./update-geometry":318,"./update-scroll":319}],321:[function(require,module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,runClearTimeout(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}var cachedSetTimeout,cachedClearTimeout,process=module.exports={};!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(name){return[]},process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},{}],322:[function(require,module,exports){(function(global){!function(global){"use strict";function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return generator._invoke=makeInvokeMethod(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}function defineIteratorMethods(prototype){["next","throw","return"].forEach(function(method){prototype[method]=function(arg){return this._invoke(method,arg)}})}function AsyncIterator(generator){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==typeof value&&hasOwn.call(value,"__await")?Promise.resolve(value.__await).then(function(value){invoke("next",value,resolve,reject)},function(err){invoke("throw",err,resolve,reject)}):Promise.resolve(value).then(function(unwrapped){result.value=unwrapped,resolve(result)},reject)}reject(record.arg)}function enqueue(method,arg){function callInvokeWithMethodAndArg(){return new Promise(function(resolve,reject){invoke(method,arg,resolve,reject)})}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}"object"==typeof global.process&&global.process.domain&&(invoke=global.process.domain.bind(invoke));var previousPromise;this._invoke=enqueue}function makeInvokeMethod(innerFn,self,context){var state=GenStateSuspendedStart;return function(method,arg){if(state===GenStateExecuting)throw new Error("Generator is already running");if(state===GenStateCompleted){if("throw"===method)throw arg;return doneResult()}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if(state===GenStateSuspendedStart)throw state=GenStateCompleted,context.arg;context.dispatchException(context.arg)}else"return"===context.method&&context.abrupt("return",context.arg);state=GenStateExecuting;var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?GenStateCompleted:GenStateSuspendedYield,record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done}}"throw"===record.type&&(state=GenStateCompleted,context.method="throw",context.arg=record.arg)}}}function maybeInvokeDelegate(delegate,context){var method=delegate.iterator[context.method];if(method===undefined){if(context.delegate=null,"throw"===context.method){if(delegate.iterator.return&&(context.method="return",context.arg=undefined,maybeInvokeDelegate(delegate,context),"throw"===context.method))return ContinueSentinel;context.method="throw",context.arg=new TypeError("The iterator does not provide a 'throw' method")}return ContinueSentinel}var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=undefined),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel)}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i<iterable.length;)if(hasOwn.call(iterable,i))return next.value=iterable[i],next.done=!1,next;return next.value=undefined,next.done=!0,next};return next.next=next}}return{next:doneResult}}function doneResult(){return{value:undefined,done:!0}}var undefined,Op=Object.prototype,hasOwn=Op.hasOwnProperty,$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag",inModule="object"==typeof module,runtime=global.regeneratorRuntime;if(runtime)return void(inModule&&(module.exports=runtime));runtime=global.regeneratorRuntime=inModule?module.exports:{},runtime.wrap=wrap;var GenStateSuspendedStart="suspendedStart",GenStateSuspendedYield="suspendedYield",GenStateExecuting="executing",GenStateCompleted="completed",ContinueSentinel={},IteratorPrototype={};IteratorPrototype[iteratorSymbol]=function(){return this};var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);GeneratorFunction.prototype=Gp.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunctionPrototype[toStringTagSymbol]=GeneratorFunction.displayName="GeneratorFunction",runtime.isGeneratorFunction=function(genFun){var ctor="function"==typeof genFun&&genFun.constructor;return!!ctor&&(ctor===GeneratorFunction||"GeneratorFunction"===(ctor.displayName||ctor.name))},runtime.mark=function(genFun){return Object.setPrototypeOf?Object.setPrototypeOf(genFun,GeneratorFunctionPrototype):(genFun.__proto__=GeneratorFunctionPrototype,toStringTagSymbol in genFun||(genFun[toStringTagSymbol]="GeneratorFunction")),genFun.prototype=Object.create(Gp),genFun},runtime.awrap=function(arg){return{__await:arg}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[asyncIteratorSymbol]=function(){return this},runtime.AsyncIterator=AsyncIterator,runtime.async=function(innerFn,outerFn,self,tryLocsList){var iter=new AsyncIterator(wrap(innerFn,outerFn,self,tryLocsList));return runtime.isGeneratorFunction(outerFn)?iter:iter.next().then(function(result){return result.done?result.value:iter.next()})},defineIteratorMethods(Gp),Gp[toStringTagSymbol]="Generator",Gp[iteratorSymbol]=function(){return this},Gp.toString=function(){return"[object Generator]"},runtime.keys=function(object){var keys=[];for(var key in object)keys.push(key);return keys.reverse(),function next(){for(;keys.length;){var key=keys.pop();if(key in object)return next.value=key,next.done=!1,next}return next.done=!0,next}},runtime.values=values,Context.prototype={constructor:Context,reset:function(skipTempReset){if(this.prev=0,this.next=0,this.sent=this._sent=undefined,this.done=!1,this.delegate=null,this.method="next",this.arg=undefined,this.tryEntries.forEach(resetTryEntry),!skipTempReset)for(var name in this)"t"===name.charAt(0)&&hasOwn.call(this,name)&&!isNaN(+name.slice(1))&&(this[name]=undefined)},stop:function(){this.done=!0;var rootEntry=this.tryEntries[0],rootRecord=rootEntry.completion;if("throw"===rootRecord.type)throw rootRecord.arg;return this.rval},dispatchException:function(exception){function handle(loc,caught){return record.type="throw",record.arg=exception,context.next=loc,caught&&(context.method="next",context.arg=undefined),!!caught}if(this.done)throw exception;for(var context=this,i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0);if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}else if(hasCatch){if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0)}else{if(!hasFinally)throw new Error("try statement without catch or finally");if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc)}}}},abrupt:function(type,arg){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev<entry.finallyLoc){var finallyEntry=entry;break}}finallyEntry&&("break"===type||"continue"===type)&&finallyEntry.tryLoc<=arg&&arg<=finallyEntry.finallyLoc&&(finallyEntry=null);var record=finallyEntry?finallyEntry.completion:{};return record.type=type,record.arg=arg,finallyEntry?(this.method="next",this.next=finallyEntry.finallyLoc,ContinueSentinel):this.complete(record)},complete:function(record,afterLoc){if("throw"===record.type)throw record.arg;return"break"===record.type||"continue"===record.type?this.next=record.arg:"return"===record.type?(this.rval=this.arg=record.arg,this.method="return",this.next="end"):"normal"===record.type&&afterLoc&&(this.next=afterLoc),ContinueSentinel},finish:function(finallyLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},catch:function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc},"next"===this.method&&(this.arg=undefined),ContinueSentinel}}}("object"==typeof global?global:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],323:[function(require,module,exports){(function(global){module.exports=function(){if(global.Blob)try{return new Blob(["asdf"],{type:"text/plain"}),Blob}catch(err){}var Builder=global.WebKitBlobBuilder||global.MozBlobBuilder||global.MSBlobBuilder;return function(parts,bag){var builder=new Builder,endings=bag.endings,type=bag.type;if(endings)for(var i=0,len=parts.length;i<len;++i)builder.append(parts[i],endings);else for(var i=0,len=parts.length;i<len;++i)builder.append(parts[i]);return type?builder.getBlob(type):builder.getBlob()}}()}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],324:[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}var _rex=require("./rex"),_async=require("async"),async=_interopRequireWildcard(_async),_util=require("./helpers/util"),util=_interopRequireWildcard(_util),_serverstate=require("./helpers/serverstate"),serverstate=_interopRequireWildcard(_serverstate);_rex.rexApp.directive("async",function(){return{restrict:"AC",link:function link($scope,element,_ref,controller){var asyncValues=_ref.asyncValues,asyncShow=_ref.asyncShow,asyncDisabled=_ref.asyncDisabled,asyncClick=_ref.asyncClick;asyncShow&&element.hide();var _asyncValues=null,handler=function handler(){var callback=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,promises=eval(asyncValues);async.map(promises,function(promise,callback){promise.then(function(value){callback(null,value)})},function(err,results){$scope.$$postDigest(function(){_asyncValues=results;var asyncValues=_asyncValues;if(asyncShow){var show=eval(asyncShow);show?element.show():element.hide()}if(asyncDisabled){var disabled=eval(asyncDisabled);element.prop("disabled",disabled)}callback&&callback(asyncValues)})})};handler(function(){asyncClick&&element.click(function(){var asyncValues=_asyncValues;eval(asyncClick)})}),setInterval(function(){handler(function(asyncValues){})},400)}}})},{"./helpers/serverstate":326,"./helpers/util":327,"./rex":331,async:1}],325:[function(require,module,exports){"use strict";function makeOfflineResource(node,callback){(0,_serverstate.isLocalServer)().then(function(isLocal){if(isLocal){var installPath=localStorage.getItem("installPath"),progressId=_uuid.uuid2.newuuid(),makeOfflineUri="api/bundles?vids="+node.packageUId+"&progressId="+progressId+"&location="+installPath;$http.get(makeOfflineUri).then(function(data,status,headers,config){callback(null,progressId)},function(response){callback(response.data)})}else callback("error: not localserver")})}function runOfflineResource(node,callback){(0,_serverstate.isLocalServer)().then(function(isLocal){isLocal?$http.get(node.link).then(function(data,status,headers,config){callback(null)},function(response){callback(response)}):callback("error: not localserver")})}function downloadDependencies(dependencies,callback){var vids=dependencies.map(function(dependency){return dependency.id+("UNVERSIONED"!==dependency.version?"__"+dependency.version:"")}).reduce(function(dep1,dep2){return dep1+"::"+dep2}),progressId=_uuid.uuid2.newuuid(),bundleUrl="api/bundles?vids="+vids+"&progressId="+progressId;$http.get(bundleUrl).then(function(data,status,headers,config){callback(null,progressId)},function(response){callback(response)})}function isOffline(node){return node||(console.log("null node"),console.log((new Error).stack)),new Promise(function(resolve,reject){(0,_serverstate.isInOfflineMode)().then(function(offline){resolve(offline||node.offline)})})}function setInstallPath(rootScope){localStorage.getItem("installPath")||localStorage.setItem("installPath",rootScope.defaultContentPath)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeOfflineResource=makeOfflineResource,exports.runOfflineResource=runOfflineResource,exports.downloadDependencies=downloadDependencies,exports.isOffline=isOffline,exports.setInstallPath=setInstallPath;var _serverstate=require("./serverstate"),_uuid=require("./uuid2"),$http=angular.injector(["ng"]).get("$http");angular.injector(["ng"]).get("$window"),angular.injector(["ng"]).get("$q")},{"./serverstate":326,"./uuid2":328}],326:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function onServerReady(callback){serverStateManager.getServerState(function(state){"ready"===state.serverStatus?callback():setTimeout(function(){onServerReady(callback)},100)})}function isLocalServer(){return new Promise(function(resolve,reject){serverStateManager.getServerStateStale(function(serverState){resolve("localserver"===serverState.serverMode)})})}function isInOfflineMode(){return new Promise(function(resolve,reject){serverStateManager.getServerState(function(serverState){resolve(!serverState.useRemoteContent)})})}function setMode(offline){return $http.post("api/serverstate",{useRemoteContent:!offline}).then(function(){var apiFilterLink=localStorage.getItem("actualLink");return $http.get("api/use?packages="+apiFilterLink)}).then(function(){document.location.href="/"})}function onProductsChanged(callback){function timeoutRecurse(callback){setTimeout(function(){onProductsChanged(callback)},600)}serverStateManager.getServerState(function(state){state.ccs&&!0===state.ccs.productsChanged?callback(function(){timeoutRecurse(callback)}):timeoutRecurse(callback)})}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();exports.onServerReady=onServerReady,exports.isLocalServer=isLocalServer,exports.isInOfflineMode=isInOfflineMode,exports.setMode=setMode,exports.onProductsChanged=onProductsChanged;var _valueCache=require("./value-cache"),$http=angular.injector(["ng"]).get("$http"),ServerStateManager=function(){function ServerStateManager(){_classCallCheck(this,ServerStateManager),this.serverState=new _valueCache.ValueCache(1e3,function(callback){$http.get("api/serverstate").then(function(data,status,header,config){callback(data.data)})})}return _createClass(ServerStateManager,[{key:"getServerState",value:function(callback){this.serverState.getValue(function(value){callback(value)})}},{key:"getServerStateStale",value:function(callback){this.serverState.getValueStale(function(value){callback(value)})}}]),ServerStateManager}(),serverStateManager=new ServerStateManager},{"./value-cache":329}],327:[function(require,module,exports){"use strict";function getLocalPackageChanges(callback){$http.post("localpkg/scan").then(function(data,status,headers,config){callback(data.data)})}function hasLocalPackages(callback){getLocalPackageChanges(function(changed){var hasLocal=changed.added.length>0;callback(hasLocal)})}function goToMainPage(){(0,_serverstate.onServerReady)(function(){$window.location.href="/"})}function getPackageBundle(node,loc){var vids,defer=$q.defer(),id=_uuid.uuid2.newuuid();return vids="package"===loc?"Latest"===node.selectedVersion?node.id+"__"+node.latestVersion:node.id+"__"+node.selectedVersion:node.packageUId,$http.get("api/bundle?vid="+vids+"&progressId="+id).then(function(data,status,header,config){var res=angular.fromJson(data);defer.resolve(res.data)},function(response){defer.resolve(response)}),defer.promise}function isInTirexContentFolder(filePath){var defer=$q.defer();return $http({url:"api/isTirexContent/"+encodeURIComponent(filePath),method:"GET"}).success(function(data,status,headers,config){defer.resolve("true"===data)}),defer.promise}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLocalPackageChanges=getLocalPackageChanges,exports.hasLocalPackages=hasLocalPackages,exports.goToMainPage=goToMainPage,exports.getPackageBundle=getPackageBundle,exports.isInTirexContentFolder=isInTirexContentFolder;var _serverstate=require("./serverstate"),_uuid=require("./uuid2"),$http=angular.injector(["ng"]).get("$http"),$window=angular.injector(["ng"]).get("$window"),$q=angular.injector(["ng"]).get("$q")},{"./serverstate":326,"./uuid2":328}],328:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();exports.uuid2=function(){function uuid2(){_classCallCheck(this,uuid2)}return _createClass(uuid2,null,[{key:"newuuid",value:function(){for(var s=[],hexDigits="0123456789abcdef",i=0;i<36;i++)s[i]=hexDigits.substr(Math.floor(16*Math.random()),1);return s[14]="4",s[19]=hexDigits.substr(3&s[19]|8,1),s[8]=s[13]=s[18]=s[23]="-",s.join("")}},{key:"newguid",value:function(){return uuid2._s4()+uuid2._s4()+"-"+uuid2._s4()+"-"+uuid2._s4()+"-"+uuid2._s4()+"-"+uuid2._s4()+uuid2._s4()+uuid2._s4()}},{key:"_s4",value:function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}}]),uuid2}()},{}],329:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),$q=(angular.injector(["ng"]).get("$http"),angular.injector(["ng"]).get("$q"));exports.ValueCache=function(){function ValueCache(lifetime,updateFn){_classCallCheck(this,ValueCache),this.cachedValue=null,this.timeStamp=-1/0,this.lifetime=lifetime,this.updateFn=updateFn,this.pending=!1,this.onPendingDone=null}return _createClass(ValueCache,[{key:"getValue",value:function(callback){var _this=this;if(Date.now()-this.timeStamp>this.lifetime)if(this.pending)this.onPendingDone.then(function(newValue){callback(newValue)});else{var q=$q.defer();this.pending=!0,this.onPendingDone=q.promise,this.updateFn(function(newValue){_this.pending=!1,_this.timeStamp=Date.now(),_this.cachedValue=newValue,callback(_this.cachedValue),q.resolve(_this.cachedValue)})}else callback(this.cachedValue)}},{key:"getValueStale",value:function(callback){this.timeStamp===-1/0?this.getValue(callback):callback(this.cachedValue)}}]),ValueCache}()},{}],330:[function(require,module,exports){"use strict";var _serverstate=(require("./ui/import"),require("./helpers/serverstate")),_util=require("./helpers/util"),_uuid=require("./helpers/uuid2");require("babel-polyfill"),angular.element(document).ready(function(){window.javaCancelRetry&&window.javaCancelRetry()}),angular.module("loadingPage",["ngCookies","ngRoute","ui.select2","ui.bootstrap","ngJScrollPane","angular-intro"]).config(function($routeProvider,$locationProvider){$routeProvider.when("/",{templateUrl:"templates/loading.html",controller:"LoadingController",reloadOnSearch:!1})}).controller("LoadingController",function($scope,$http,$modal,$timeout,$interval){(0,_serverstate.isLocalServer)().then(function(isLocal){isLocal?(0,_util.getLocalPackageChanges)(function(changed){changed.added.length>0?($scope.importPackagesMessage="Importing Packages",$scope.import=function(){var timerTask=!1;$scope.show_progress=!0,$scope.id=_uuid.uuid2.newuuid(),$scope.progress=10;var timer=$timeout(function(){$scope.waitingMessage="Preparing Download",timerTask=$interval(function(){$http({method:"GET",url:"api/progress/"+$scope.id}).success(function(data,status,headers,config){var res=angular.fromJson(data);206===status||304===status?($scope.progress=res.progress,$scope.waitingMessage=res.message):res.done&&(timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waitingMessage="",(0,_util.goToMainPage)())}).error(function(data,status,headers,config){})},250)},1);$scope.$apply(),$http({method:"GET",url:"api/packages?importAll&progressId="+$scope.id}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waitingMessage=""})},$scope.import()):(0,_util.goToMainPage)()}):(0,_util.goToMainPage)()})})},{"./helpers/serverstate":326,"./helpers/util":327,"./helpers/uuid2":328,"./ui/import":332,"babel-polyfill":2}],331:[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}function updateScrollBar(){
+var pscontainer=document.getElementById("step5");Ps.destroy(pscontainer),Ps.initialize(pscontainer),pscontainer.scrollTop=0,Ps.update(pscontainer);var treecontainer=document.getElementById("tree");Ps.destroy(treecontainer),Ps.initialize(treecontainer),Ps.update(treecontainer)}function doUseRequest(url,$http){var q=Promise.defer();return doUseRequest.promise&&doUseRequest.url===url?doUseRequest.promise.then(function(err,data){q.resolve(err,data)}):(doUseRequest.url=url,doUseRequest.promise=new Promise(function(resolve,reject){$http({url:url,method:"GET"}).success(function(data,status,headers,config){q.resolve(null,data)}).error(function(data,status,headers,config){q.resolve(status,null)})})),q.promise}function sendAnalytics($scope,_http,_location_path,_nodelink){$scope.analyticsDevtool="",$scope.analyticsDevice="",$scope.analyticsPath="",$scope.analyticsName="";var re,analytics_pageload_url="api/analytics/sendPageView?";_nodelink+="/",_location_path+="/",re=/.*\/(.*)\//.exec(_nodelink),re&&($scope.analyticsName=encodeURIComponent(re[1])),analytics_pageload_url+="analyticsName="+$scope.analyticsName,re=/((link)|(path))=(.*)\/(.*)\//.exec(_nodelink),re&&($scope.analyticsPath=encodeURIComponent(re[4]),analytics_pageload_url+="&analyticsPath="+$scope.analyticsPath),re=/Device\/(.*?)\//.exec(_location_path),re&&($scope.analyticsDevice=encodeURIComponent(re[1])),re=/DevTool\/(.*?)\//.exec(_location_path),re&&($scope.analyticsDevtool=encodeURIComponent(re[1])),_http({url:analytics_pageload_url,method:"GET"}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){})}function openLinkInTab(uri,target){null==target&&(target="_blank");var link=angular.element('<a href="'+uri+'" target="'+target+'"></a>');angular.element(document.body).append(link),link[0].click(),link.remove()}function openLinkSilently(uri,$http,$modal,$scope){$http({method:"GET",url:uri}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){$modal.open({templateUrl:"importError",windowClass:"installedModal",scope:$scope,controller:function($scope,$modalInstance){var errorMessage=data.substring(data.indexOf("<pre>")+5,data.indexOf("</pre>"));errorMessage=errorMessage.replace(/&apos;/g,'"').replace(/&gt;/g,">"),$scope.errorMessage=errorMessage,$scope.agree=function(){$modalInstance.dismiss("cancel")}}})})}function refreshTree($scope,node,action,$location){var tree=$("#jstree").jstree(!0),selectedNode=tree.get_selected(!0)[0];(0,_serverstate.isLocalServer)().then(function(isLocal){if(isLocal){if(!$scope.serverState.useRemoteContent&&"remove"===action){var trimPathToParent=function(parentNode,isCurrent){var uripath=$location.search();if("link"in uripath){var paths=uripath.link.split("/");if(""==paths[paths.length-1]&&paths.pop(),paths.length>1){for(isCurrent&&paths.pop();paths.length>0&&1===parentNode.children.length;)paths.pop(),parentNode=tree.get_node(parentNode.parent);0===paths.length&&($scope.selectedTreeNode.emptyTree=!0)}var nodeLink=paths.join("/");$location.search("link",nodeLink)}};if(node.text===selectedNode.original.title){var parentNode=tree.get_node(selectedNode.parent);trimPathToParent(parentNode,!0)}else 1===selectedNode.children.length&&selectedNode.children.forEach(function(id){var childNode=tree.get_node(id);node.text===childNode.original.title&&trimPathToParent(selectedNode,!1)})}tree.refresh(!0,!0)}})}function rediscoverProduct1($http,$scope,node,action,$location){$http({method:"POST",url:"/ide/rediscoverProducts"}).success(function(data,status,headers,config){$scope.waitingMessage="",refreshTree($scope,node,action,$location)}).error(function(data,status,headers,config){})}function rediscoverProduct($http,$scope,$modalInstance,node,action,$location){$http({method:"POST",url:"/ide/rediscoverProducts"}).success(function(data,status,headers,config){$scope.waitingMessage="",refreshTree($scope,node,action,$location),$modalInstance.close()}).error(function(data,status,headers,config){})}function downloadDependency($scope,$http,$timeout,$interval,$modal,timer,uuid2,node,action,$location,$q,dwnldLoc,$sce,$rootScope){function compare(a,b){return a.require<b.require?-1:a.require>b.require?1:0}var defer=$q.defer();$modal.open({backdrop:"static",keyboard:!1,templateUrl:"packageDependencies",windowClass:"dependencyModal",scope:$scope,controller:function($scope,$modalInstance){$scope.show_progress_screen=!1,$scope.dependencies.sort(compare),$scope.canCancel=!0,$scope.messageHeader="Additional items have been identified. Select which optional items to install and click OK to continue:",angular.forEach($scope.dependencies,function(dependency){dependency.isDisabled="mandatory"===dependency.require,dependency.selected=!0,dependency.showDescription=!1,dependency.isMandatory?dependency.requirement="Required":dependency.requirement="Optional"}),$scope.toggleSelection=function(dependency){dependency.isDisabled||(dependency.selected=!dependency.selected)},$scope.install=function(){var temp="",licenseDeclined=!1;async.waterfall([function(callback){angular.forEach($scope.dependencies,function(dependency){dependency.selected&&(temp+=dependency.id,"UNVERSIONED"!==dependency.version&&(temp+="__"+dependency.version),temp+="::")}),async.eachSeries($scope.dependencies,function(dependency,callback){dependency.selected&&dependency.license?($rootScope.licenseUrl=$sce.trustAsResourceUrl("content/"+dependency.license),$modal.open({templateUrl:"downloadLicense",windowClass:"app-modal-window",controller:function($scope,$modalInstance){$scope.agree=function(){$modalInstance.close(),callback(null,licenseDeclined)},$scope.disagree=function(){licenseDeclined=!0,$modalInstance.close(),callback("Declined licnese for "+dependency.package)}}})):callback(null,licenseDeclined)},function(err,results){callback(licenseDeclined||err?"Need to accept all licenses to continue":null)})},function(callback){if(""===temp||licenseDeclined)rediscoverProduct($http,$scope,$modalInstance,node,action,$location),defer.resolve("defer resolved");else{var vids=temp.substring(0,temp.length-2),timerTask=!1;timer=!1,$scope.show_progress_screen=!0,$scope.waitingScreen=!0,$scope.waitingMessage="Preparing Download",$scope.id2=uuid2.newuuid(),$scope.progressBar=0,timer=$timeout(function(){$scope.canceled=!1,timerTask=$interval(function(){$http({method:"GET",url:"api/progress/"+$scope.id2}).success(function(data,status,headers,config){var res=angular.fromJson(data);$scope.canCancel=res.canCancel,206!==status&&304!==status||($scope.progressBar=res.progress,$scope.waitingMessage=res.message),!0===res.done&&(timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$modalInstance.dismiss(),$scope.util.uiManager.downloadConfirmation(node,dwnldLoc,res.error).then(function(){rediscoverProduct($http,$scope,$modalInstance,node,action,$location),defer.resolve("defer resolved")}))}).error(function(data,status,headers,config){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1)})},2e3)},1e3),$http({method:"GET",url:"api/bundles?vids="+vids+"&progressId="+$scope.id2}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waiting=!1,$scope.waitingMessage="",$modalInstance.dismiss()})}}],function(err){$modalInstance.dismiss(),$scope.util.uiManager.downloadConfirmation(node,dwnldLoc).then(function(){rediscoverProduct($http,$scope,$modalInstance,node,action,$location),defer.resolve("defer resolved")})})},$scope.cancel=function(){$http({method:"GET",url:"api/progress/"+$scope.id+"?cancel=true"}).success(function(data,status,headers,config){$modalInstance.dismiss(),timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.util.uiManager.downloadConfirmation(node,dwnldLoc).then(function(){rediscoverProduct($http,$scope,$modalInstance,node,action,$location),defer.resolve("defer resolved")})}).error(function(data,status,headers,config){$modalInstance.dismiss(),$scope.util.uiManager.downloadConfirmation(node,dwnldLoc).then(function(){rediscoverProduct($http,$scope,$modalInstance,node,action,$location),defer.resolve("defer resolved")})})}}});return defer.promise}function configureAce(data){require("brace/theme/eclipse"),require("brace/mode/c_cpp");var editor=ace.edit("editor");editor.$blockScrolling=1/0,editor.setTheme("ace/theme/eclipse"),editor.setReadOnly(!0),editor.commands.removeCommand("find"),editor.getSession().setMode("ace/mode/c_cpp"),editor.setValue(data||""),editor.clearSelection()}function sendDataToTealium(dataType,data){if(data){var sameData=!1;prevTealiumData&&prevTealiumData===JSON.stringify(data)?sameData=!0:prevTealiumData=JSON.stringify(data),sameData||(dataType===UTAG_SEND_TYPE.view?utag.view(data):dataType===UTAG_SEND_TYPE.link&&utag.link(data))}}function prepareTealiumView(contentGroup,pageName,decodeComponents){if(!contentGroup||!pageName)return null;if(decodeComponents){var URIComponents=contentGroup.split("/");URIComponents.forEach(function(str,i){URIComponents[i]=decodeURIComponent(str)}),contentGroup=URIComponents.join("/")}var viewObj={};return viewObj.tcContentGroup=contentGroup,viewObj.tcPageName=pageName,viewObj.no_view=!0,viewObj}function prepareTealiumLink(event,document){if(!event||!document)return null;event===UTAG_LINK_TYPE.download&&(document="dl-"+document);var linkObj={};return linkObj.event_name=event,linkObj.document_name=document,linkObj}function doOverviewRequest(url,$scope,$http){doOverviewRequest.promise&&doOverviewRequest.url===url?doOverviewRequest.promise.then(function(err,data){err?$scope.status=err:$scope.overview=angular.fromJson(data)}):(doOverviewRequest.url=url,doOverviewRequest.promise=new Promise(function(resolve,reject){$http({url:url,method:"GET"}).success(function(data,status,headers,config){$scope.overview=angular.fromJson(data),resolve(null,data)}).error(function(data,status,headers,config){$scope.status=status,resolve(status,null)})}))}function nodeSelectionChanged(node){if(void 0===node||!node)return!1;node.headerBgColor="#ebebeb",node.isLeaf=!1,node.content&&0!=node.content.length||(node.isLeaf=!0,node.headerBgColor="#ffffff")}function isMarkdown(node){return".md"===node.parentContent.link.substr(-3)}function mdToHtml(body){var htmlBody=body,iframe=document.getElementById("custom-page");if(null!=iframe){htmlBody="",htmlBody+="<!DOCTYPE html>",htmlBody+="<head>",htmlBody+='<link rel="stylesheet" href="stylesheets/markdown.css">',htmlBody+="</head>",htmlBody+="<body>",htmlBody+=marked(body),htmlBody+="</body>",htmlBody+="</html>";var iframeDoc=iframe.contentWindow.document;iframeDoc.open("text/html","replace"),iframeDoc.write(htmlBody),iframeDoc.close()}return htmlBody}function updateConfigFile($http,$scope,$rootScope,$q){$http({url:"api/packages",method:"GET"}).success(function(data,status,headers,config){$scope.packages=angular.fromJson(data),$rootScope.packages=$scope.packages,$http({method:"POST",url:"userconfig/create",data:{packages:JSON.parse(localStorage.getItem("currentPackageList")),remotePackages:JSON.parse(localStorage.getItem("packageList")),displayNumChildren:localStorage.getItem("displayNumChildren"),actualLink:localStorage.getItem("actualLink"),url:localStorage.getItem("filterLink")}}).success(function(data){})})}function makePackageObject($rootScope,$http,$q,$scope){$q.defer();$rootScope.packageObj=new Object,$rootScope.packageList=[],$rootScope.packages=$rootScope.packages.sort(function(pkg1,pkg2){for(var _map=[pkg1,pkg2].map(function(pkg){return pkg.version.split(".").map(function(versionBit){return parseInt(versionBit)})}),_map2=_slicedToArray(_map,2),ver1=_map2[0],ver2=_map2[1],i=0;i<Math.min(ver1.length,ver2.length)&&ver1[i]===ver2[i];i++);return i===Math.min(ver1.length,ver2.length)?ver1.length>ver2.length?-1:ver1.length===ver2.length?0:1:ver1[i]<ver2[i]?-1:1}),angular.forEach($rootScope.packages,function(_package){$rootScope.packageList.push(_package.name+"--"+_package.version),$rootScope.packageObj[_package.id]||($rootScope.packageObj[_package.id]=new Object,$rootScope.packageObj[_package.id].versions=new Array,$rootScope.packageObj[_package.id].id=_package.id,$rootScope.packageObj[_package.id].name=_package.name,$rootScope.packageObj[_package.id].image=_package.image,$rootScope.packageObj[_package.id].locals=new Array),$rootScope.packageObj[_package.id].versions.push(_package.version),$rootScope.packageObj[_package.id].locals.push(_package.local+"--"+_package.version),$rootScope.packageObj[_package.id].latestVersion=_package.version,$rootScope.packageObj[_package.id].selectedPackage=_package});var tempactualLink="";angular.forEach($rootScope.packageObj,function(_package){_package.selectedVersion="Latest","Latest"!=_package.versions[_package.versions.length-1]&&_package.versions.push("Latest"),tempactualLink+=_package.id+"__"+_package.latestVersion,tempactualLink+="::"});var oldPackages=JSON.parse(localStorage.getItem("currentPackageList"))||[];if(Array.isArray(oldPackages)||(oldPackages=[]),$scope.packageObj=$rootScope.packageObj,localStorage.setItem("currentPackageList",JSON.stringify($rootScope.packageList)),tempactualLink=tempactualLink.substring(0,tempactualLink.lastIndexOf("::",tempactualLink.length-1)),localStorage.setItem("displayNumChildren",localStorage.getItem("displayNumChildren")||"off"),localStorage.setItem("filterLink",localStorage.getItem("filterLink")||"all__latest"),localStorage.setItem("selectedPackages",localStorage.getItem("selectedPackages")||JSON.stringify($rootScope.packageList)),localStorage.setItem("packageList",localStorage.getItem("currentPackageList")),"all__latest"===localStorage.getItem("filterLink")){$rootScope.filterLink="all__latest",$rootScope.actualLink="",angular.forEach($rootScope.packageObj,function(_package){$rootScope.actualLink+=_package.id+"__"+_package.latestVersion,$rootScope.actualLink+="::"});var str=$rootScope.actualLink;$rootScope.actualLink=str.substring(0,str.lastIndexOf("::",str.length-1)),localStorage.setItem("filterLink",$rootScope.filterLink),localStorage.setItem("actualLink",$rootScope.actualLink)}else if("none"===localStorage.getItem("filterLink"))localStorage.setItem("actualLink","");else{$rootScope.filterLink=localStorage.getItem("filterLink"),$rootScope.actualLink="";for(var arr=$rootScope.filterLink.split("::"),i=0;i<arr.length;i++){var temp=arr[i].split("__");$rootScope.actualLink+=temp[0]+"__","latest"===temp[1]?void 0!=$rootScope.packageObj[temp[0]]&&($rootScope.actualLink+=$rootScope.packageObj[temp[0]].latestVersion):$rootScope.actualLink+=temp[1],$rootScope.actualLink+="::"}var _str=$rootScope.actualLink;$rootScope.actualLink=_str.substring(0,_str.lastIndexOf("::",_str.length-1)),localStorage.setItem("actualLink",$rootScope.actualLink)}return Promise.resolve()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.rexApp=void 0;var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_util=require("./helpers/util"),_offline=require("./helpers/offline"),_serverstate=require("./helpers/serverstate"),_offline2=require("./ui/offline"),_import=require("./ui/import"),_perfectScrollbar=require("perfect-scrollbar"),Ps=_interopRequireWildcard(_perfectScrollbar),_brace=require("brace"),ace=_interopRequireWildcard(_brace),_async=require("async"),async=_interopRequireWildcard(_async);require("babel-polyfill");var BUILTIN_NODES_21={software:{id:"software",text:"Software"},devices:{id:"devices",text:"Device Documentation"},devtools:{id:"devtools",text:"Development Tools"}},rexApp=exports.rexApp=angular.module("rexApp",["ngCookies","ngRoute","ui.select2","ui.bootstrap","ngJScrollPane","angular-intro"]).config(function($routeProvider,$locationProvider){$routeProvider.when("/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/Device/:deviceId/Package/:packageId/Search/:search/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/DevTool/:devtoolId/Package/:packageId/Search/:search/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/Device/:deviceId/Search/:search/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/DevTool/:devtoolId/Search/:search/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/Package/:packageId/Search/:search/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/Device/:deviceId/Package/:packageId/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/DevTool/:devtoolId/Package/:packageId/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/Device/:deviceId/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/Search/:search/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/DevTool/:devtoolId/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/Package/:packageId/",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/All",{templateUrl:"templates/device.html",controller:"DeviceController",reloadOnSearch:!1}).when("/refresh",{templateUrl:"refresh.html",controller:"RefreshController",reloadOnSearch:!1}).when("/ace",{templateUrl:"templates/ace.html",controller:"AceController",reloadOnSearch:!1})}),$q=angular.injector(["ng"]).get("$q"),homePackagePickerQ=$q.defer(),ppUpdateDone=($q.defer(),$q.defer()),isFirstVisitP=$q.defer();rexApp.service("Util",function(){function Helpers(_ref){var $scope=_ref.$scope,$q=(_ref.$rootScope,_ref.$q),$modal=_ref.$modal,helpers=(_ref.$cookieStore,_ref.$sce,{$scope:$scope,$q:$q,$modal:$modal});return helpers.onLocalServerFirstVisit=function(callback){var promise=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Helpers.onLocalServerFirstVisitSubscribers?Helpers.onLocalServerFirstVisitSubscribers.push(callback):Helpers.onLocalServerFirstVisitSubscribers=[callback],promise&&(Helpers.onLocalServerFirstVisitPromises?Helpers.onLocalServerFirstVisitPromises.push(promise):Helpers.onLocalServerFirstVisitPromises=[promise]),(0,_serverstate.isLocalServer)().then(function(isLocal){isLocal&&angular.element(document).ready(function(){$http.get("api/hasVisited").then(function(data,status,headers,config){var isFirst=!data.data.hasVisited;localStorage.getItem("first")||localStorage.setItem("first",isFirst),isFirstVisitP.resolve(isFirst),isFirst&&Helpers.onLocalServerFirstVisitSubscribers.map(function(callback){callback()}),Helpers.onLocalServerFirstVisitSubscribers=[],Helpers.onLocalServerFirstVisitPromises&&(Helpers.onLocalServerFirstVisitPromises.map(function(p){p.resolve(isFirst)}),Helpers.onLocalServerFirstVisitPromises=[])})})})},helpers}function UIManager(aUtil){return{util:aUtil,runOffline:function(node){(0,_offline.isOffline)(node).then(function(isOffline){isOffline?(0,_offline.runOfflineResource)(node):this._showRunOfflineConfirmation(function(callbacks){(0,_offline.runOfflineResource)(node)})})},makeOffline:function(node){(0,_offline.isOffline)(node).then(function(isOffline){isOffline?(0,_offline.makeOfflineResource)(node):this._showProgress(function(callbacks){(0,_offline.makeOfflineResource)(node,callbacks)})})},downloadConfirmation:function(node,loc,error){var defer=this.util.helpers.$q.defer();return this.util.helpers.$modal.open({backdrop:"static",keyboard:!1,templateUrl:"templates/notifcation.html",windowClass:"installedModal",controller:function($scope,$modalInstance){(0,_util.getPackageBundle)(node,loc).then(function(res){$scope.filePath=res.localPackagePath,!$scope.filePath||error?$scope.message=""!=error?error:"There was an error in downloading the file. Please try again.":$scope.message="Content has been successfully downloaded into "+$scope.filePath,$scope.$digest()}),$scope.agree=function(){defer.resolve("defer resolved"),$modalInstance.dismiss("cancel")}}}),defer.promise},_showRunOfflineConfirmation:function(onModalControllerInit){this.util.helpers.$modal.open({templateUrl:"RunExecutableMessage",windowClass:"remove-modal-window",scope:this.util.helpers.$scope,controller:function($scope,$modalInstance){$scope.agree=function(){onDone()};var onDone=function(){$modalInstance.dismiss("cancel")};onModalControllerInit({onDone:onDone})}})},_showProgress:function(onModalControllerInit){this.util.helpers.$modal.open({backdrop:"static",keyboard:!1,templateUrl:"downloadProgress",windowClass:"dependencyModal",scope:this.util.helpers.$scope,controller:function($scope,$modalInstance){$scope.show_progress_screen=!0,$scope.waitingScreen=!0,onModalControllerInit({onUpdateProgress:function(data){$scope.progress=data.progress,$scope.waitingMessage=data.message},onDone:function(){$scope.show_progress_screen=!1,$scope.waitingScreen=!1,$modalInstance.close()}})}})}}}function Util(fromController){var helpers=new Helpers(fromController),util={helpers:helpers};return util.uiManager=new UIManager(util),util}var $http=angular.injector(["ng"]).get("$http");angular.injector(["ng"]).get("$q");return Util}),rexApp.service("MetaService",function(){var title="",_metaDescription="",_metaKeywords="";return{set:function(newTitle,newMetaDescription,newKeywords){_metaKeywords=newKeywords,_metaDescription=newMetaDescription,title=newTitle},metaTitle:function(){return title},metaDescription:function(){return _metaDescription},metaKeywords:function(){return _metaKeywords}}}),rexApp.service("HiLite",function(){var skipTags=new RegExp("^(?:EM|SCRIPT|FORM|SPAN)$"),colors=["#ff6","#a0ffff","#9f9","#f99","#f6f"],wordColor=[],colorIdx=0,matchRegex="";return{setMatchType:function(type){switch(type){case"left":this.openLeft=!1,this.openRight=!0;break;case"right":this.openLeft=!0,this.openRight=!1;break;case"open":this.openLeft=this.openRight=!0;break;default:this.openLeft=this.openRight=!1}},setRegex:function(input){input=input.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w'-]+/g,"|");var re="("+input+")";this.openLeft||(re="\\b"+re),this.openRight||(re+="\\b"),matchRegex=new RegExp(re,"i")},getRegex:function(){var retval=matchRegex.toString();return retval=retval.replace(/(^\/(\\b)?|\(|\)|(\\b)?\/i$)/g,""),retval=retval.replace(/\|/g," ")},hiliteWords:function(node){if(void 0!==node&&node&&(this.targetNode=node,matchRegex&&!skipTags.test(node.nodeName))){if(node.hasChildNodes())for(var i=0;i<node.childNodes.length;i++)this.hiliteWords(node.childNodes[i]);if(3==node.nodeType&&(nv=node.nodeValue)&&(regs=matchRegex.exec(nv))){wordColor[regs[0].toLowerCase()]||(wordColor[regs[0].toLowerCase()]=colors[colorIdx++%colors.length]);var match=document.createElement("EM");match.appendChild(document.createTextNode(regs[0])),match.style.backgroundColor=wordColor[regs[0].toLowerCase()],match.style.fontStyle="inherit",match.style.color="#000";var after=node.splitText(regs.index);after.nodeValue=after.nodeValue.substring(regs[0].length),node.parentNode.insertBefore(match,after)}}},remove:function(){for(var arr=document.getElementsByTagName("EM");arr.length&&(el=arr[0]);){var parent=el.parentNode;parent.replaceChild(el.firstChild,el),parent.normalize()}},apply:function(input){this.remove(),void 0!==input&&input&&(this.setRegex(input),this.hiliteWords(null))}}}),rexApp.service("LayoutManager",function($location){var _layout;return{setLayout:function(layout){_layout=layout},changeUrlWithTreeCollapse:function(newUrl){"collapsetree"in $location.search()?$location.url(newUrl).search("collapsetree",""):$location.url(newUrl)},expandTree:function(){_layout.open("west")},collapseTree:function(){_layout.close("west")},toggleTree:function(){_layout.toggle("west")},treeClosed:function(){return!!_layout&&_layout.west.state.isClosed}}}),rexApp.factory("uuid2",[function(){function s4(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return{newuuid:function(){for(var s=[],hexDigits="0123456789abcdef",i=0;i<36;i++)s[i]=hexDigits.substr(Math.floor(16*Math.random()),1);return s[14]="4",s[19]=hexDigits.substr(3&s[19]|8,1),s[8]=s[13]=s[18]=s[23]="-",s.join("")},newguid:function(){return s4()+s4()+"-"+s4()+"-"+s4()+"-"+s4()+"-"+s4()+s4()+s4()}}}]),rexApp.controller("RefreshController",function($scope,$q,$http,$interval,$cookieStore,$cookies,$rootScope,$timeout,Util){function clearLogData(){$scope.refreshUrl="about:blank"}function filterData(){clearLogData(),dataArray.forEach(function(data){filterFn(data.lvl)&&logData.insertAdjacentHTML("beforeend",data.msg)})}function filterFn(level){return!!($scope.infoFilter&&"info"==level||$scope.warnFilter&&"warn"==level||$scope.errorFilter&&"error"==level||void 0==level)}$scope.util=Util({$scope:$scope,$q:$q,$http:$http}),$scope.filterButton="Show All",$scope.filterValues={error:!0,warning:!0,info:!0},$scope.refreshStarted=!1,$scope.refreshComplete=!1,$scope.searchQuery="",$scope.search="",$scope.showAllFilters=function(buttonText){if("Show All"===buttonText){for(var value in $scope.filterValues)$scope.filterValues[value]=!0;$scope.filterButton="Show Default"}else{for(var value in $scope.filterValues)$scope.filterValues[value]=!1;$scope.filterValues.error=!0,$scope.filterButton="Show All"}};var getLastRefreshTime=function(){$http({url:"api/getLastRefreshTime",method:"GET"}).success(function(data){void 0===$scope.lastRefreshTime&&($scope.lastRefreshTime=data)})};$interval(getLastRefreshTime,1e4);!function(){$http({url:"api/packages",method:"GET"}).success(function(data){$scope.packages=angular.fromJson(data),$("#package-selector").select2(),$rootScope.packages=$scope.packages,angular.forEach($cookieStore,function(v,k){$cookieStore.remove(k)}),makePackageObject($rootScope,$http,$q,$scope)}).error(function(data,status){$scope.status=status})}(),getLastRefreshTime();var logData=document.getElementById("log-data"),dataArray=(document.getElementById("loading-icon"),new Array);$scope.infoFilter=!0,$scope.warnFilter=!0,$scope.errorFilter=!0,$scope.refreshFilter=!0,$scope.task2Filter=!0,$scope.task3Filter=!0,$scope.task4Filter=!0,$scope.refreshUrl="about:blank",$scope.toggleFilter=function(filter){$scope[filter]=!$scope[filter],filterData()},$scope.toggleTask=function(filter){},$scope.trustSource=function(src){return $sce.trustAsResourceUrl(src)},$scope.editMaintenanceMode=function(direction){if($scope.changeModes=!0,direction)var nextState="on";else var nextState="off";$scope.showState="",$scope.maintenanceMessage="",$http({url:"api/maintenance-mode?switch="+nextState,method:"GET"}).success(function(data,status,headers,config){$scope.changeModes=!1,$scope.showState="("+nextState+")",$scope.maintenanceMessage=data}).error(function(data,status,headers,config){})},$scope.checkMaintenanceMode=function(){$http({url:"api/get-maintenance-mode",method:"GET"}).success(function(data,status,headers,config){"on"==data?($scope.toggler=!0,$scope.showState="(on)"):($scope.toggler=!1,$scope.showState="(off)")}).error(function(data,status,headers,config){})},$scope.doRefresh=function(refreshAll){$scope.refreshComplete=!1,$scope.refreshStarted=!0,clearLogData(),dataArray=new Array,$scope.status="Refreshing Packages. Please wait...";var packageQuery="",packageSelector=$("#package-selector");void 0!==refreshAll&&"all"===refreshAll?(packageSelector.select2("val","undefined"),$scope.packages=null,packageQuery="all"):(packageSelector.select2("val").forEach(function(packageName){packageQuery+=packageName+"&p="}),packageQuery=packageQuery.slice(0,-3));$scope.refreshFilter,$scope.task2Filter,$scope.task3Filter,$scope.task4Filter;if(""===packageQuery)$scope.status="You must select at least 1 package";else{var SSEListener=function(event){var refreshData=JSON.parse(event.data);switch(refreshData.type){case"critical":refreshData.type="error",refreshData.class="log-error";break;case"error":refreshData.class="log-error";break;case"warning":refreshData.class="log-warning";break;case"info":refreshData.class="log-info"}refreshData.type=refreshData.type.toUpperCase(),$scope.DBRefreshData.push(refreshData),Number(refreshData.id)%200==0&&$scope.$apply(function(){scrollToBottomOfWindow()}),("**** Process Complete ****"===refreshData.data||refreshData.data.containsError(refreshErrorMsgs))&&removeSSEListener()},removeSSEListener=function(){event.removeEventListener("data",SSEListener),event.close(),$scope.$apply(function(){$scope.refreshComplete=!0})},scrollToBottomOfWindow=function(){var divWindow=document.getElementById("log-window");divWindow.scrollTop=divWindow.scrollHeight},url="api/refresh?p="+packageQuery,url=url+"&mode=refreshPage";$scope.refreshUrl=url,$scope.DBRefreshData=[];var event=new EventSource(url);event.addEventListener("data",SSEListener);var refreshErrorMsgs=["An error occurred while refreshing macros","An error occured while refreshing devices","An error occured while refreshing devtools","An error occured while refreshing resources","Done: Database was not refreshed","**** Could not refresh ****"];String.prototype.containsError=function(list){for(var _i=0;_i<list.length;_i++)if(this.toString()===list[_i])return!0;return!1}}},$scope.clearRefreshWindow=function(){for(;$scope.DBRefreshData.length>0;)$scope.DBRefreshData.pop();$scope.refreshComplete=!1,$scope.refreshStarted=!1,$scope.search="",$scope.searchQuery=""},$scope.applySearchFilter=function(){$scope.search=$scope.searchQuery},$scope.clearSearchFilter=function(){$scope.search="",$scope.searchQuery=""}}),rexApp.filter("refreshFilter",function(){return function(items,filterValues){var out=[];return angular.forEach(items,function(item){filterValues[item.type.toLowerCase()]&&out.push(item)}),out}}),rexApp.controller("CookieController",function($rootScope,$scope,$http,$location,$cookies,Util){$scope.util=Util({$scope:$scope}),$rootScope.ccsCloud="",$rootScope.uid=null,$rootScope.importLater=null,$http({url:$rootScope.ccsCloud+"/api/queryUserStatus/",method:"GET"}).success(function(data,status,headers,config){var res=angular.fromJson(data);$rootScope.uid=res.uid}).error(function(data,status,headers,config){}),socket.on("login",function(data){$rootScope.uid=data.uid,$.fancybox.close(),null!=$rootScope.importLater&&$http({withCredentials:!0,url:$rootScope.importLater,method:"GET"}).success(function(data,status,headers,config){$rootScope.importLater=null}).error(function(data,status,headers,config){$rootScope.importLater=null})}),socket.on("logout",function(message){$rootScope.uid=null}),$scope.logout=function(){$http({url:$rootScope.ccsCloud+"/logout",method:"GET"}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){})}});var testAndSet=!1,getLinkTo=function(){var hrefParams=document.location.hash.split("?");if(hrefParams.length>=2){hrefParams[1].split("&");for(var _i2=0;_i2<hrefParams.length;_i2++){var param=hrefParams[_i2].split("=");if("link"===param[0])return param[1]}}};rexApp.controller("DeviceController",function($scope,$q,$rootScope,$route,$timeout,$http,$location,$modal,$cookieStore,$cookies,$routeParams,MetaService,HiLite,$window,$interval,uuid2,Util){$scope.util=Util({$scope:$scope,$cookieStore:$cookieStore,uuid2:uuid2,$modal:$modal}),updateScrollBar()
+;var isAllSelectedFunction=function(){for(var id in $scope.packageObj)if(!$scope.packageObj[id].selected)return!1;return!0};$scope.deviceId=$routeParams.deviceId,$scope.devtoolId=$routeParams.devtoolId,$scope.search=$routeParams.search,multi_versions?$rootScope.filterLink=$routeParams.packageId:$scope.packageId=$routeParams.packageId,$rootScope.metaservice=MetaService,$scope.title="TI Resource Explorer",$scope.keywords="Devices, Development Tools, Libraries",$scope.description="Access examples, libraries, executables and documentation for your Texas Instruments device and development board",void 0!==$scope.deviceId&&($scope.title=$scope.deviceId+" | "+$scope.title,$scope.keywords=$scope.deviceId+", Libraries, executables, examples, documents",$scope.description="Access examples, libraries, executables and documentation for "+$scope.deviceId),void 0!==$scope.devtoolId&&($scope.title=$scope.devtoolId+" | "+$scope.title,$scope.keywords=$scope.devtoolId+", Libraries, executables, examples, documents",$scope.description="Access examples, libraries, executables and documentation for "+$scope.devtoolId),$rootScope.metaservice.set($scope.title,$scope.description,$scope.keywords),$scope.showTree=!0,-1==$location.absUrl().indexOf("localhost")&&$http({url:"http://"+$location.host()+":"+$location.port()+"/analytics",method:"GET"}).success(function(data,status,headers,config){$http.post("api/storeanalyticstate",data,{headers:{"Content-Type":"text/plain;charset=UTF-8"}}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){console.log("failed to connect to api/storeanalyticstate")})}).error(function(data,status,headers,config){console.log("failed to connect to https://"+$location.host()+":"+$location.port()+"/analytics")}),$http({url:"api/packages",method:"GET"}).success(function(data,status,headers,config){$scope.packages=angular.fromJson(data),$rootScope.packages=$scope.packages,angular.forEach($cookieStore,function(v,k){$cookieStore.remove(k)}),makePackageObject($rootScope,$http,$q,$scope).then(function(){var ddUrl="api/devicesanddevtools";multi_versions?ddUrl+="?package="+localStorage.getItem("actualLink"):void 0!==$scope.packageId&&(ddUrl+="?package="+$scope.packageId);var deferred=$q.defer();$http({url:ddUrl,method:"GET"}).success(function(data,status,headers,config){$scope.deviceAndDevtool=angular.fromJson(data),$rootScope.deviceAndDevtool=angular.fromJson(data),deferred.resolve()}).error(function(data,status,headers,config){console.log("ddUrl error"),$scope.status=status,deferred.reject()})})}).error(function(data,status,headers,config){$scope.status=status});!function poll(){$timeout(function(){$http({url:"api/packages",method:"GET"}).success(function(data,status,headers,config){$scope.packages=angular.fromJson(data),$rootScope.packages=$scope.packages,makePackageObject($rootScope,$http,$q,$scope)}).error(function(data,status,headers,config){$scope.status=status}),poll()},36e4)}(),$scope.browseAll=function(){document.location="#/",location.reload(),$route.reload()},$scope.allPackages=function(){var p="";void 0!==$scope.deviceId&&""!==$scope.deviceId&&(p+="/Device/"+$scope.deviceId),void 0!==$scope.devtoolId&&""!==$scope.devtoolId&&(p+="/DevTool/"+$scope.devtoolId),void 0!==$scope.search&&""!==$scope.search&&(p="/Search/"+$scope.search),$location.path(p)};var timer=!1;$scope.searchTree=function(keyEvent){if($scope.search,13===keyEvent.which){sendDataToTealium(UTAG_SEND_TYPE.link,prepareTealiumLink(UTAG_LINK_TYPE.search,$scope.search)),"off"===localStorage.getItem("displayNumChildren")&&($rootScope.inSearchMode=!0);var redirectTo="";void 0!==$scope.deviceId&&(redirectTo+="/Device/"+$scope.deviceId),void 0!==$scope.devtoolId&&(redirectTo+="/DevTool/"+$scope.devtoolId),void 0!==$scope.packageId&&(redirectTo+="/Package/"+$scope.packageId),void 0!==$scope.search&&""!==$scope.search&&(redirectTo+="/Search/"+$scope.search),redirectTo+="?link=",$location.url(redirectTo)}},$scope.clearFilter=function(){$rootScope.inSearchMode=!1,$scope.search="";var redirectTo="";void 0!==$scope.deviceId&&(redirectTo+="/Device/"+$scope.deviceId),void 0!==$scope.devtoolId&&(redirectTo+="/DevTool/"+$scope.devtoolId),void 0!==$scope.packageId&&(redirectTo+="/Package/"+$scope.packageId),$scope.selectedPath={path:"",device:$routeParams.deviceId,devtool:$routeParams.devtoolId,packageId:$routeParams.packageId,search:$scope.search},angular.element("#jstree").jstree(!0).refresh(-1),$location.path(redirectTo)},$scope.deviceDevToolsDropDown={query:function(_query){function populateDropdown(){for(var i=0;i<$scope.deviceAndDevtool.devtools.length;i++)if(void 0!==$scope.deviceAndDevtool.devtools[i].name&&$scope.deviceAndDevtool.devtools[i].name.toUpperCase().indexOf(_query.term.toUpperCase())>-1){var obj={};obj.text=$scope.deviceAndDevtool.devtools[i].name,obj.id="#/DevTool/"+$scope.deviceAndDevtool.devtools[i].name,obj.image=$scope.deviceAndDevtool.devtools[i].image,void 0!==$scope.packageId&&""!==$scope.packageId&&(obj.id+="/Package/"+$scope.packageId),obj.id+="?link=",myresults.push(obj)}var separator1={};separator1.text="Devices",myresults.push(separator1);for(var i=0;i<$scope.deviceAndDevtool.devices.length;i++)if(void 0!==$scope.deviceAndDevtool.devices[i].name&&$scope.deviceAndDevtool.devices[i].name.toUpperCase().indexOf(_query.term.toUpperCase())>-1){var obj={};obj.text=$scope.deviceAndDevtool.devices[i].name,obj.id="#/Device/"+$scope.deviceAndDevtool.devices[i].name,void 0!==$scope.packageId&&""!==$scope.packageId&&(obj.id+="/Package/"+$scope.packageId),obj.id+="?link=",myresults.push(obj)}_query.callback({results:myresults})}var myresults=new Array;myresults[0]={text:"Show All",id:"#/All"};var separator2={};separator2.text="Development Tools",myresults.push(separator2),void 0!=$scope.deviceAndDevtool?populateDropdown():$scope.$watch(function(scope){return void 0===scope.deviceAndDevtool},function(){populateDropdown()})},formatResult:function(data,term){if(!data.id)return"<div class='select2-user-result'><strong>"+data.text+"</strong></div>";if("Show All"===data.text)return"<div class='select2-user-result'><strong>"+data.text+"</strong></div>";return"<div class='select2-user-result'>&nbsp;&nbsp;&nbsp;"+(void 0!==data.image&&data.image?"<img src='content/"+data.image+"' width='50' /> ":"<img src='//www.ti.com/graphics/folders/partimages/MSP430F5259.jpg' width='50' /> ")+data.text+"</div>"},formatSelection:function(data){if(!data.id)return"<div class='select2-user-result'><strong>"+data.text+"</strong></div>";if($scope.deviceObj=data,"Show All"===data.text)return"<div class='select2-user-result'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+data.text+"</strong></div>";return"<div class='select2-user-result'>&nbsp;&nbsp;&nbsp;"+(void 0!==data.image&&data.image?"<img src='content/"+data.image+"' height='15' /> ":"<img src='//www.ti.com/graphics/folders/partimages/MSP430F5259.jpg' height='15' /> ")+data.text+"</div>"},initSelection:function(element,callback){$scope.deviceObj&&$scope.deviceObj.text&&sendDataToTealium(UTAG_SEND_TYPE.link,prepareTealiumLink(UTAG_LINK_TYPE.selection,$scope.deviceObj.text)),callback($scope.deviceObj)},escapeMarkup:function(m){return m}},$scope.additionalFiltersDropDown={query:function(_query2){var myresults=new Array,s="";void 0!==$scope.search&&""!==$scope.search&&(s="/Search/"+$scope.search);var separator2={};separator2.text="Device Families",myresults.push(separator2),myresults.push({text:"All",id:"#"+s});for(var i=0;i<$scope.packages.length;i++)if($scope.packages[i].name.toUpperCase().indexOf(_query2.term.toUpperCase())>-1){var obj={};obj.text=$scope.packages[i].name,obj.id="#/Package/"+$scope.packages[i].name+s,obj.id+="?link=",myresults.push(obj)}_query2.callback({results:myresults})},formatResult:function(data,term){if(!data.id)return"<div class='select2-user-result'><strong>"+data.text+"</strong></div>";if("Show All"===data.text)return"<div class='select2-user-result'><strong>"+data.text+"</strong></div>";return"<div class='select2-user-result'>&nbsp;&nbsp;&nbsp;"+data.text+"</div>"},formatSelection:function(data){if(!data.id)return"<div class='select2-user-result'><strong>"+data.text+"</strong></div>";if($scope.deviceObj=data,"Show All"===data.text)return"<div class='select2-user-result'><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+data.text+"</strong></div>";return"<div class='select2-user-result'>&nbsp;&nbsp;&nbsp;"+data.text+"</div>"},initSelection:function(element,callback){callback($scope.deviceObj)},escapeMarkup:function(m){return m}},$scope.showBadge=!1,$scope.preferenceSelector=function(){(0,_offline.setInstallPath)($rootScope);$modal.open({templateUrl:"preferenceSelector",windowClass:"preferenceModal",scope:$scope,controller:function($scope,$modalInstance){localStorage.getItem("displayNumChildren")&&"undefined"!==localStorage.getItem("displayNumChildren")?$scope.switchValue=localStorage.getItem("displayNumChildren"):$scope.switchValue="off",$scope.defaultInstall=localStorage.getItem("installPath"),$scope.message="",$scope.localPackages=[],$scope.searchPath=function(){$http({url:"localpkg/?searchpath",method:"GET"}).success(function(data,status,headers,config){$scope.localPackages=angular.fromJson(data),0===$scope.localPackages.length?$scope.message="No local packages detected.":$scope.message="List of local packages found:"}).error(function(data,status,headers,config){$scope.status=status})};var FolderPaths=function(paths){this._folderPaths=paths,this.resetFolderPaths()};FolderPaths.prototype.getFolderPaths=function(){return this._folderPaths},FolderPaths.prototype.canEditFolderPaths=function(){return this._editFolderPaths},FolderPaths.prototype.addFolderPath=function(path){return path?!!(this.canEditFolderPaths()&&this._folderPaths.indexOf(path)<0)&&(this._folderPaths.push(path),$scope.newFolderPath="",$scope.errMsg="",!0):($scope.errMsg="Cannot add empty folder path",!1)},FolderPaths.prototype.removeFolderPath=function(path){if(path==$scope.defaultInstall)$scope.errMsg="Cannot remove default install path. Please add or select another folder as default before removing this one.";else{var idx=this._folderPaths.indexOf(path);if(this.canEditFolderPaths()&&idx>-1)return this._folderPaths.splice(idx,1),$scope.errMsg="",!0}return!1},FolderPaths.prototype.removeAllFolderPaths=function(){this._folderPaths=[]},FolderPaths.prototype.resetFolderPaths=function(onReset){this._editFolderPaths=!1;var self=this;FolderPaths.getSavedFolderPaths(function(paths){self._folderPaths=paths.slice(),self._folderPaths.includes($scope.defaultInstall)||self._folderPaths.push($scope.defaultInstall),self._editFolderPaths=!0,onReset&&onReset()})},FolderPaths.getSavedFolderPaths=function(onGetPaths){$http.get("/localpkg/?searchpath").then(function(data,status,headers,config){var paths=data.data;onGetPaths&&onGetPaths(paths)})},$scope.setDefaultInstall=function(path){localStorage.setItem("installPath",path),$scope.defaultInstall=localStorage.getItem("installPath"),console.log($scope.defaultInstall)},$scope.folderPaths=new FolderPaths([]),$scope.onPreferencesClicked=function(){$scope.folderPaths.resetFolderPaths()},$scope.save=function(){(0,_serverstate.isLocalServer)().then(function(isLocal){isLocal&&FolderPaths.getSavedFolderPaths(function(oldPaths){var newPaths=$scope.folderPaths.getFolderPaths(),deletedPaths=$(oldPaths).not(newPaths).get(),addedPaths=$(newPaths).not(oldPaths).get();angular.forEach(addedPaths,function(path,idx){$http.put("/localpkg/addPath",{searchpath:path})}),angular.forEach(deletedPaths,function(path,idx){$http.put("/localpkg/removePath",{searchpath:path})})})}),"on"===$scope.switchValue?localStorage.setItem("displayNumChildren","on"):($scope.switchValue="off")&&localStorage.setItem("displayNumChildren","off"),$http({url:"api/serverstate",method:"GET"}).success(function(data,status,headers,config){$scope.serverState=angular.fromJson(data),"localserver"===$scope.serverState.serverMode&&$http({url:"userconfig/create",method:"POST",data:{packages:JSON.parse(localStorage.getItem("currentPackageList")),remotePackages:JSON.parse(localStorage.getItem("packageList")),displayNumChildren:localStorage.getItem("displayNumChildren"),actualLink:localStorage.getItem("actualLink"),url:localStorage.getItem("filterLink")}}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){})}),$("#jstree").jstree("refresh"),$modalInstance.close()},$scope.cancel=function(){$modalInstance.dismiss("cancel"),$scope.folderPaths.removeAllFolderPaths()}}})},$scope.packagePicker=function(){var startup=arguments.length>0&&void 0!==arguments[0]&&arguments[0];$modal.open({templateUrl:startup?"templates/busy.html":"packagePicker",windowClass:"packageModal",scope:$scope,controller:function($scope,$modalInstance){function versionChanged(selectedVersion,id){$scope.packageObj[id].selected=!0,$scope.packageObj[id].selectedVersion=selectedVersion,$scope.isAllSelected=isAllSelectedFunction()}function selectionChanged(selected,id){$scope.packageObj[id].selected=selected,$scope.isAllSelected=isAllSelectedFunction()}if($scope.packageObj=$rootScope.packageObj,null!==JSON.parse(localStorage.getItem("selectedPackages"))&&JSON.parse(localStorage.getItem("selectedPackages")).length>0){if("all__latest"===localStorage.getItem("filterLink"))angular.forEach($scope.packageObj,function(_package){_package.selected=!0,_package.selectedVersion="Latest"});else for(var packageList=localStorage.getItem("filterLink").split("::"),i=0;i<packageList.length;i++){var temp=packageList[i].split("__");void 0!=$rootScope.packageObj[temp[0]]&&($scope.packageObj[temp[0]].selected=!0,"latest"==temp[1]?$scope.packageObj[temp[0]].selectedVersion="Latest":$scope.packageObj[temp[0]].selectedVersion=temp[1])}$scope.isAllSelected=isAllSelectedFunction()}else void 0!==JSON.parse(localStorage.getItem("selectedPackages"))&&""===JSON.parse(localStorage.getItem("selectedPackages"))?(angular.forEach($scope.packageObj,function(_package){_package.selected=!1,_package.selectedVersion="Latest"}),$scope.isAllSelected=!1):(angular.forEach($scope.packageObj,function(_package){_package.selected=!0,_package.selectedVersion="Latest"}),$scope.isAllSelected=!0);$scope.ok=function(){$rootScope.packageObj=$scope.packageObj,$rootScope.isAllSelected=isAllSelectedFunction();var selectedPackages=new Array;angular.forEach($scope.packageObj,function(_package){_package.selected&&selectedPackages.push({name:_package.name,id:_package.id,selectedVersion:_package.selectedVersion})}),$modalInstance.close(selectedPackages)},$scope.cancel=function(){$modalInstance.dismiss("cancel")},$scope.optionToggled=function(selected,id){selectionChanged(selected,id)},$scope.versionToggled=function(selectedVersion,id){versionChanged(selectedVersion,id)},$scope.selectAll=function(){var toggledStatus=!$scope.isAllSelected;angular.forEach($scope.packageObj,function(_package){_package.selected=toggledStatus}),$scope.isAllSelected=!toggledStatus},startup&&ppUpdateDone.promise.then(function(){Object.keys($rootScope.packageObj).map(function(id){var pkg=$rootScope.packageObj[id];pkg.selectedPackage.deprecates&&pkg.selectedPackage.deprecates.map(function(id){$rootScope.packageObj[id].selected=!1})}),Object.keys($rootScope.packageObj).map(function(id){var pkg=$rootScope.packageObj[id];$scope.optionToggled(pkg.selected,pkg.id)}),$scope.ok()})}}).result.then(function(selectedPackages){var prevlinkTo=getLinkTo();if(0===selectedPackages.length)localStorage.setItem("filterLink","none"),localStorage.setItem("selectedPackages",JSON.stringify("")),document.location="#/",location.reload();else{var filterLink="",linkTo="?link="+prevlinkTo,count=0;angular.forEach(selectedPackages,function(_package){"Latest"!=_package.selectedVersion?(count++,filterLink+=_package.id+"__"+_package.selectedVersion):filterLink+=_package.id+"__latest",filterLink+="::"});var str=filterLink;filterLink=str.substring(0,str.lastIndexOf("::",str.length-1)),0===count&&$rootScope.isAllSelected&&(filterLink="all__latest"),localStorage.setItem("filterLink",filterLink),localStorage.setItem("selectedPackages",JSON.stringify(selectedPackages)),prevlinkTo?document.location="#/Package/include="+filterLink+linkTo:(document.location="#/",location.reload())}(0,_serverstate.isLocalServer)().then(function(isLocal){isLocal?$http({method:"POST",url:"userconfig/create",data:{packages:$rootScope.packageList,remotePackages:JSON.parse(localStorage.getItem("packageList")),displayNumChildren:localStorage.getItem("displayNumChildren"),actualLink:localStorage.getItem("actualLink"),url:localStorage.getItem("filterLink")}}).success(function(data){console.log("Created user configuration JSON"),location.reload()}):location.reload()})},function(){})},(0,_serverstate.isLocalServer)().then(function(isLocal){isLocal||ppUpdateDone.promise.then(function(){})}),$scope.installedPackages=function(){$modal.open({backdrop:"static",keyboard:!1,templateUrl:"installedPackages",windowClass:"installedModal",scope:$scope,controller:function($scope,$modalInstance,Util){function compare(a,b){return a.id<b.id?-1:a.id>b.id?1:0}$scope.util=Util({$scope:$scope,$http:$http}),$scope.messageHeader="scanning",$scope.removeDisabled=!0,$scope.importDisabled=!0,$scope.changesFound=!1,(0,_util.getLocalPackageChanges)(function(changed){0===changed.added.length&&0===changed.removed.length?$scope.messageHeader="No packages detected at this time.":($scope.changesFound=!0,changed.added.length>0&&($scope.importMessage="List of packages detected:",$scope.installed=changed.added,$scope.installed.sort(compare),$scope.importDisabled=!1),changed.removed.length>0&&($scope.removeMessage="List of packages removed:",$scope.removedList=changed.removed,$scope.removeDisabled=!1)),$scope.$apply()}),$scope.toggleIcn=function(_package){return _package.showDescription?"glyphicon glyphicon-collapse-up":"glyphicon glyphicon-collapse-down"},$scope.import=function(){var timerTask=!1;$scope.show_progress=!0,$scope.id=uuid2.newuuid(),$scope.progress=0,timer=$timeout(function(){$scope.waiting=!0,$scope.waitingMessage="Preparing Download",$scope.canceled=!1,timerTask=$interval(function(){$http({method:"GET",url:"api/progress/"+$scope.id}).success(function(data,status,headers,config){var res=angular.fromJson(data);if(206===status||304===status)$scope.progress=res.progress,$scope.waitingMessage=res.message;else if(res.done){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1);var tree=$("#jstree").jstree(!0);tree.refresh(!0,!0),$scope.waitingMessage="",$modalInstance.close()}}).error(function(data,status,headers,config){})},2e3)},1e3),$http({method:"GET",url:"api/packages?importAll&progressId="+$scope.id}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waiting=!1,$scope.waitingMessage=""})},$scope.close=function(){$("#jstree").jstree(!0).refresh(!0,!0),$modalInstance.dismiss("cancel")}}})},testAndSet||((0,_serverstate.isLocalServer)().then(function(isLocal){isLocal&&$scope.util.helpers.onLocalServerFirstVisit(function(){$http({url:"api/packages",method:"GET"}).success(function(data){$scope.packages=angular.fromJson(data),$rootScope.packages=$scope.packages,makePackageObject($rootScope,$http,$q,$scope).then(function(){$http({method:"GET",url:"api/use?packages="+localStorage.getItem("actualLink")}).success(function(data,status,headers,config){})})})})}),testAndSet=!0)}),rexApp.controller("homePackageController",function($scope,$rootScope,$q,$http,$location,$cookies,$route,$cookieStore,$routeParams,$modal,Util){function versionChanged2(selectedVersion,id){$scope.packageObj[id].selected=!0,$scope.packageObj[id].selectedVersion=selectedVersion,$scope.isAllSelected=isAllSelectedFunction()}function selectionChanged(selected,id){$scope.packageObj[id].selected=selected,$scope.isAllSelected=isAllSelectedFunction()}function getPackageObj(){var defer=$q.defer();return $http({url:"api/packages",method:"GET"}).success(function(data,status,headers,config){$scope.packages=angular.fromJson(data),$rootScope.packages=$scope.packages,makePackageObject($rootScope,$http,$q,$scope).then(function(){$scope.packageObj=$rootScope.packageObj,defer.resolve("defer resolved")})}),defer.promise}$scope.util=Util({$scope:$scope,$q:$q,$cookieStore:$cookieStore,$modal:$modal,$http:$http});var isAllSelectedFunction=function(){for(var id in $scope.packageObj)if(!$scope.packageObj[id].selected)return!1;return!0};(function(){var homedefer=$q.defer();return getPackageObj().then(function(){if("undefined"!=localStorage.getItem("selectedPackages"))if(null!==JSON.parse(localStorage.getItem("selectedPackages"))&&JSON.parse(localStorage.getItem("selectedPackages")).length>0){if("all__latest"===localStorage.getItem("filterLink"))angular.forEach($scope.packageObj,function(_package){_package.selected=!0,_package.selectedVersion="Latest"});else for(var packageList=localStorage.getItem("filterLink").split("::"),i=0;i<packageList.length;i++){var temp=packageList[i].split("__");if(void 0!=$scope.packageObj[temp[0]])if($scope.packageObj[temp[0]].selected=!0,"latest"==temp[1])$scope.packageObj[temp[0]].selectedVersion="Latest";else for(var j=0;j<$scope.packageObj[temp[0]].versions.length;j++){if($scope.packageObj[temp[0]].versions[j]===temp[1]){$scope.packageObj[temp[0]].selectedVersion=temp[1];break}j===$scope.packageObj[temp[0]].versions.length-1&&($scope.packageObj[temp[0]].selectedVersion="Latest",localStorage.setItem("filterLink",localStorage.getItem("filterLink").replace(temp[0]+"__"+temp[1],temp[0]+"__latest")),localStorage.setItem("actualLink",localStorage.getItem("actualLink").replace(temp[0]+"__"+temp[1],temp[0]+"__"+$scope.packageObj[temp[0]].latestVersion)),(0,_serverstate.isLocalServer)().then(function(isLocal){isLocal&&$http({method:"POST",url:"userconfig/create",data:{packages:JSON.parse(localStorage.getItem("currentPackageList")),remotePackages:JSON.parse(localStorage.getItem("packageList")),displayNumChildren:localStorage.getItem("displayNumChildren"),actualLink:localStorage.getItem("actualLink"),url:localStorage.getItem("filterLink")}}).success(function(data){document.location="#/",$route.reload()})}))}}$scope.isAllSelected=isAllSelectedFunction()}else void 0!==JSON.parse(localStorage.getItem("selectedPackages"))&&""===JSON.parse(localStorage.getItem("selectedPackages"))?(angular.forEach($scope.packageObj,function(_package){_package.selected=!1,_package.selectedVersion="Latest"}),$scope.isAllSelected=!1):(angular.forEach($scope.packageObj,function(_package){_package.selected=!0,_package.selectedVersion="Latest"}),$scope.isAllSelected=!0);else angular.forEach($scope.packageObj,function(_package){_package.selected=!0,_package.selectedVersion="Latest"}),$scope.isAllSelected=!0;homedefer.resolve("defer resolved")}),homedefer.promise})().then(function(){$scope.ok2=function(){$rootScope.isAllSelected=isAllSelectedFunction();var selectedPackages=new Array;if(angular.forEach($scope.packageObj,function(_package){_package.selected&&selectedPackages.push({name:_package.name,id:_package.id,selectedVersion:_package.selectedVersion})}),0===selectedPackages.length){localStorage.setItem("filterLink","none"),localStorage.setItem("selectedPackages",JSON.stringify(""));var apiFilterlink="";localStorage.setItem("actualLink",apiFilterlink)}else{var apiFilterlink="",filterLink="",count=(getLinkTo(),0);angular.forEach(selectedPackages,function(_package){"Latest"===_package.selectedVersion?apiFilterlink+=_package.id+"__"+$rootScope.packageObj[_package.id].latestVersion:apiFilterlink+=_package.id+"__"+_package.selectedVersion,"Latest"!=_package.selectedVersion?(count++,filterLink+=_package.id+"__"+_package.selectedVersion):filterLink+=_package.id+"__latest",apiFilterlink+="::",filterLink+="::"});var str=filterLink;filterLink=str.substring(0,str.lastIndexOf("::",str.length-1)),0===count&&$rootScope.isAllSelected&&(filterLink="all__latest"),apiFilterlink=apiFilterlink.substring(0,apiFilterlink.lastIndexOf("::",apiFilterlink.length-1)),localStorage.setItem("filterLink",filterLink),localStorage.setItem("actualLink",apiFilterlink),localStorage.setItem("selectedPackages",JSON.stringify(selectedPackages))}(0,_serverstate.isLocalServer)().then(function(isLocal){isLocal?doUseRequest("api/use?packages="+apiFilterlink,$http).then(function(err,data){$http({method:"POST",url:"userconfig/create",data:{packages:$rootScope.packageList,remotePackages:JSON.parse(localStorage.getItem("packageList")),displayNumChildren:localStorage.getItem("displayNumChildren"),actualLink:localStorage.getItem("actualLink"),url:localStorage.getItem("filterLink")}}).success(function(data){document.location="#/"})}):(document.location="#/",$("#jstree").jstree("refresh"))})},$scope.selectAll2=function(){var toggledStatus=!$scope.isAllSelected;angular.forEach($scope.packageObj,function(_package){_package.selected=toggledStatus}),$scope.isAllSelected=!toggledStatus,$scope.ok2()},$scope.optionToggled2=function(selected,id){selectionChanged(selected,id),$scope.ok2()},$scope.versionToggled2=function(selectedVersion,id){$("#jstree").jstree("refresh"),versionChanged2(selectedVersion,id),$scope.ok2()}}).then(function(){homePackagePickerQ.resolve(),0===$(".select2-user-result").length&&0===$("#searchinput").val().length&&document.addEventListener("selectionChanged",function(){Object.keys($rootScope.packageObj).map(function(id){var pkg=$rootScope.packageObj[id];!pkg.selected||!1!==pkg.selected&&!0!==pkg.selected||$scope.optionToggled2(pkg.selected,pkg.id)}),$scope.$digest(),$("#jstree").jstree("refresh")})})}),rexApp.controller("SearchController",function($scope,$http,$location,$cookies,$cookieStore,$routeParams,$rootScope,Util){$scope.util=Util({$scope:$scope,$q:$q,$cookieStore:$cookieStore,$http:$http}),$scope.searchKeywordDropDown={query:function(_query3){var myresults=new Array,obj={};obj.text=_query3.term,obj.id="#",void 0!==$scope.deviceId&&(obj.id+="/Device/"+$scope.deviceId),void 0!==$scope.devtoolId&&(obj.id+="/DevTool/"+$scope.devtoolId),void 0!==$scope.packageId&&(obj.id+="/Package/"+$scope.packageId),""!==_query3.term&&(obj.id+="/Search/"+_query3.term),obj.id+="?link=",myresults.push(obj),_query3.callback({results:myresults})},formatResult:function(data,term){return"<div class='select2-user-result'>"+data.text+"</div>"},formatSelection:function(data){return $scope.searchId=data.text,$scope.searchObj=data,"<div class='select2-user-result'>"+data.text+"</div>"},escapeMarkup:function(m){return m}}});var multi_versions=!0,UTAG_SEND_TYPE={view:"t_view",link:"t_link"},UTAG_LINK_TYPE={search:"tirexSearch",download:"tirexDownloadPackage",selection:"tirexSelection"},prevTealiumData=void 0,first=!0;rexApp.controller("OverviewController",function($sce,$scope,$q,$rootScope,$route,$http,$location,$cookies,$cookieStore,$routeParams,$modal,$timeout,$interval,uuid2,LayoutManager,Util){function origImport(node){var importLink=node.importProject,list_of_devices=node.devicesVariants,license=node.license,license_key=license+"_agreed",agreed=$cookieStore.get(license_key);if(void 0==(void 0===license?"undefined":_typeof(license))||null==license||void 0!==agreed&&agreed){$rootScope.importLater=null;var importL=importLink.replace(/\\/g,"/");if(void 0===$scope.deviceId&&void 0!==list_of_devices){$scope.Options=list_of_devices;$modal.open({templateUrl:"importVariantSelection",size:"sm",scope:$scope,controller:function($scope,$modalInstance){$scope.selectedOption=$scope.Options[0],$scope.ok=function(){$modalInstance.close($scope.selectedOption)},$scope.cancel=function(){$modalInstance.dismiss("cancel")},$scope.getSelectedOptionClass=function(option){return option},$scope.optionClicked=function(Option){$scope.selectedOption=Option}}}).result.then(function(selectedItem){importL=importL.replace("{coreTypeId}",selectedItem),"all__latest"===localStorage.getItem("filterLink")&&localStorage.setItem("filterLink",localStorage.getItem("actualLink").replace(/__[0-9.]+/g,"__latest")),localStorage.setItem("filterLink",localStorage.getItem("filterLink").replace(node.packageId+"__latest",node.packageUId)),$scope.isLocalServer()?(updateConfigFile($http,$scope,$rootScope,$q),openLinkSilently(importL,$http,$modal,$scope)):openLinkInTab(importL,"ccscloud")},function(){})}else"all__latest"===localStorage.getItem("filterLink")&&localStorage.setItem("filterLink",localStorage.getItem("actualLink").replace(/__[0-9.]+/g,"__latest")),localStorage.setItem("filterLink",localStorage.getItem("filterLink").replace(node.packageId+"__latest",node.packageUId)),$scope.isLocalServer()?(updateConfigFile($http,$scope,$rootScope,$q),openLinkSilently(importL,$http,$modal,$scope)):openLinkInTab(importL,"ccscloud")}else{$scope.licenseUrl=$sce.trustAsResourceUrl("content/"+license);$modal.open({templateUrl:"downloadLicense",windowClass:"app-modal-window",scope:$scope,controller:function($scope,$modalInstance){$scope.agree=function(){$cookieStore.put(license_key,!0),agreed=!0,$modalInstance.close(agreed)},$scope.disagree=function(){agreed=!1,$modalInstance.close(agreed)}}}).result.then(function(agreed){if(agreed){$rootScope.importLater=null;var importL=importLink.replace(/\\/g,"/");if(void 0===$scope.deviceId&&void 0!==list_of_devices){$scope.Options=list_of_devices;$modal.open({templateUrl:"importVariantSelection",size:"sm",scope:$scope,controller:function($scope,$modalInstance){$scope.selectedOption=$scope.Options[0],$scope.ok=function(){$modalInstance.close($scope.selectedOption)},$scope.cancel=function(){$modalInstance.dismiss("cancel")},$scope.getSelectedOptionClass=function(option){return option},$scope.optionClicked=function(Option){$scope.selectedOption=Option}}}).result.then(function(selectedItem){importL=importL.replace("{coreTypeId}",selectedItem),"all__latest"===localStorage.getItem("filterLink")&&localStorage.setItem("filterLink",localStorage.getItem("actualLink").replace(/__[0-9.]+/g,"__latest")),localStorage.setItem("filterLink",localStorage.getItem("filterLink").replace(node.packageId+"__latest",node.packageUId)),$scope.isLocalServer()?(updateConfigFile($http,$scope,$rootScope,$q),openLinkSilently(importL,$http,$modal,$scope)):openLinkInTab(importL,"ccscloud")},function(){})}else"all__latest"===localStorage.getItem("filterLink")&&localStorage.setItem("filterLink",localStorage.getItem("actualLink").replace(/__[0-9.]+/g,"__latest")),localStorage.setItem("filterLink",localStorage.getItem("filterLink").replace(node.packageId+"__latest",node.packageUId)),$scope.isLocalServer()?(updateConfigFile($http,$scope,$rootScope,$q),openLinkSilently(importL,$http,$modal,$scope)):openLinkInTab(importL,"ccscloud")}})}}function origEnergiaImport(importLink,createLink,list_of_devices,node){$rootScope.importLater=null;var importL=importLink.replace(/\\/g,"/");importLink.indexOf("{energiaBoardId}")>0&&null!=list_of_devices?($scope.Options=list_of_devices,$modal.open({templateUrl:"importEnergiaBoardSelection",size:"sm",scope:$scope,controller:function($scope,$modalInstance){$scope.selectedOption=$scope.Options[0].id,$scope.ok=function(){$modalInstance.close($scope.selectedOption)},$scope.cancel=function(){$modalInstance.dismiss("cancel")},$scope.getSelectedOptionClass=function(option){return option},$scope.optionClicked=function(Option){$scope.selectedOption=Option}}}).result.then(function(selectedItem){importL=importL.replace("{energiaBoardId}",selectedItem),"all__latest"===localStorage.getItem("filterLink")&&localStorage.setItem("filterLink",localStorage.getItem("actualLink").replace(/__[0-9.]+/g,"__latest")),localStorage.setItem("filterLink",localStorage.getItem("filterLink").replace(node.packageId+"__latest",node.packageUId)),$scope.isLocalServer()?(updateConfigFile($http,$scope,$rootScope,$q),openLinkSilently(importL,$http,$modal,$scope)):openLinkInTab(importL,"ccscloud")
+},function(){})):("all__latest"===localStorage.getItem("filterLink")&&localStorage.setItem("filterLink",localStorage.getItem("actualLink").replace(/__[0-9.]+/g,"__latest")),localStorage.setItem("filterLink",localStorage.getItem("filterLink").replace(node.packageId+"__latest",node.packageUId)),$scope.isLocalServer()?(updateConfigFile($http,$scope,$rootScope,$q),openLinkSilently(importL,$http,$modal,$scope)):openLinkInTab(importL,"ccscloud"))}function removeOfflineConfirmation(node){$modal.open({templateUrl:"removeWarning",windowClass:"remove-modal-window",scope:$scope,controller:function($scope,$modalInstance){$scope.packageName=node.package,$scope.packageVersion=node.packageUId.substring(node.packageUId.lastIndexOf("__")+2,node.packageUId.length),$scope.message="Uninstalling means the entire package "+$scope.packageName+" - v:"+$scope.packageVersion+" will be deleted. Are you sure you want to continue?",$scope.agree=function(){$scope.isLocalServer()&&($modalInstance.dismiss("cancel"),$("[test_id=progress-bar-div]").attr("is-processing","true"),processOfflineFile(node,"remove",node.removeofflineLink).then(function(){$("[test_id=progress-bar-div]").attr("is-processing","false")}))},$scope.disagree=function(){$modalInstance.dismiss("cancel")}}})}function cannotRemoveOfflineWarning(node){$modal.open({backdrop:"static",keyboard:!1,templateUrl:"templates/notifcation.html",windowClass:"remove-modal-window",scope:$scope,controller:function($scope,$modalInstance){$scope.packageName=node.package,$scope.packageVersion=node.packageUId.substring(node.packageUId.lastIndexOf("__")+2,node.packageUId.length),$scope.message=$scope.packageName+" - v:"+$scope.packageVersion+" is an imported package, thus cannot be removed from within Resource Explorer.",$scope.agree=function(){$modalInstance.dismiss("cancel")}}})}function downloadprogress($scope,$timeout,$interval,$http,$location,$modal,timer,timerTask,node,action,actionLink,uuid2){var defer=$q.defer();return $modal.open({backdrop:"static",keyboard:!1,templateUrl:"downloadProgress",windowClass:"dependencyModal",scope:$scope,controller:function($scope,$modalInstance){$scope.showCancel="remove"!==action,$scope.show_progress_screen=!0,$scope.waitingScreen=!0,timer=$timeout(function(){$scope.waitingMessage="remove"===action?"Removing":"Preparing",$scope.canceled=!1,timerTask=$interval(function(){$http({method:"GET",url:"api/progress/"+$scope.id}).success(function(data,status,headers,config){var res=angular.fromJson(data);$scope.canCancel=res.canCancel,206===status||304===status?($scope.progress=res.progress,$scope.waitingMessage=res.message):!0===res.done&&(timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waitingMessage="",$scope.show_progress_screen=!1,$scope.waitingScreen=!1,$modalInstance.close(data))}).error(function(data,status,headers,config){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),defer.reject("defer is rejected")})},2e3)},1e3),$scope.cancel=function(){$http({method:"GET",url:"api/progress/"+$scope.id+"?cancel=true"}).success(function(data,status,headers,config){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$modalInstance.dismiss()})}}}).result.then(function(data){defer.resolve();var res=angular.fromJson(data);if($scope.canceled||$scope.isLocalServer()||!res||$http({method:"HEAD",url:res.result}).success(function(data,status,headers){if(200===status){var packageName=node.package.replace(/ /g,"_")+"__"+node.packageVersion,element=document.createElement("a");element.id="TEST",element.href=res.result,element.setAttribute("download",packageName),element.setAttribute("target","_self"),document.body.appendChild(element),element.click()}}).error(function(data,status,headers){$modal.open({backdrop:"static",keyboard:!1,templateUrl:"templates/notifcation.html",windowClass:"installedModal",controller:function($scope,$modalInstance){$scope.message="This package is not supported on "+navigator.platform,$scope.agree=function(){$modalInstance.dismiss("cancel"),$("#jstree").jstree(!0)}}})}),"add"===action){"all__latest"===localStorage.getItem("filterLink")&&localStorage.setItem("filterLink",localStorage.getItem("actualLink").replace(/__[0-9.]+/g,"__latest"));var myId=node.packageUId.substring(0,node.packageUId.indexOf("__"));localStorage.setItem("filterLink",localStorage.getItem("filterLink").replace(myId+"__latest",node.packageUId))}null!=res.result&&0!=res.result.length&&$scope.isLocalServer()?($scope.dependencies=res.result,downloadDependency($scope,$http,$timeout,$interval,$modal,timer,uuid2,node,action,$location,$q,"tree",$sce,$rootScope).then(function(){updateConfigFile($http,$scope,$rootScope,$q)})):$scope.isLocalServer()&&(updateConfigFile($http,$scope,$rootScope,$q),"add"===action?$scope.util.uiManager.downloadConfirmation(node,"tree",res.error).then(function(){rediscoverProduct1($http,$scope,node,action,$location)}):rediscoverProduct1($http,$scope,node,action,$location))}),$http({method:"GET",url:actionLink+"&progressId="+$scope.id}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.selectedNode.waiting=!1,$scope.waitingMessage="",defer.reject("defer is rejected")}),defer.promise}function truncateDesc(str){$timeout(function(){var desc=void 0;if(str){desc=str;var descContainer=document.getElementById("descContainer"),descTextContainer=document.getElementById("descTextContainer"),descTextElement=document.getElementById("descTextElement");if(null===descTextElement)return void console.log("No description");var currentWidth=descContainer.offsetWidth,textLines=(descTextContainer.clientWidth,descTextElement.getClientRects().length);Number(window.getComputedStyle(descTextElement).fontSize.slice(0,window.getComputedStyle(descTextElement).fontSize.length-2));if(textLines>1){descTextElement.innerHTML="x";var fontWidth=descTextElement.offsetWidth,allowedChars=Math.floor(currentWidth/fontWidth)-5;desc=desc.slice(0,allowedChars)+" ...",descTextElement.innerHTML=desc}descTextElement.innerHTML=desc}},500)}$scope.util=Util({$scope:$scope,$q:$q,$cookieStore:$cookieStore,$rootScope:$rootScope,$route:$route,$sce:$sce,$location:$location,uuid2:uuid2,$modal:$modal,$http:$http}),$scope.$watch("selectedTreeNode.aceContent",function(){$scope.selectedTreeNode&&configureAce($scope.selectedTreeNode.aceContent)}),$scope.openLinkInBrowser=function(SCEurl,title){if(!SCEurl||!title)return void console.log("Error openinig web resource in browser");var url=SCEurl.toString()+"&openInBrowser=true";$http.get(url)},$scope.browserNavigate=function(direction){direction&&("back"===direction?window.history.back():"forward"===direction&&window.history.forward())},$scope.deviceId=$routeParams.deviceId,$scope.devtoolId=$routeParams.devtoolId,multi_versions?$rootScope.filterLink=$routeParams.packageId:$scope.packageId=$routeParams.packageId,$scope.selectedNode={},$scope.selectedNode.waiting=!1,$scope.selectedNode.show_progress=!0,$scope.paneConfig={scrollbarMargin:15,scrollbarWidth:15,arrowSize:16,showArrows:!1};var theDevice=$scope.deviceId,theDevTool=$scope.devtoolId;if(multi_versions)var thePackage=$rootScope.filterLink;else var thePackage=$scope.packageId;if($scope.selectedPath={path:"",device:theDevice,devtool:theDevTool,packageId:thePackage,search:$scope.search},void 0!==theDevice){var theUrl="api/resources?device="+theDevice;multi_versions?theUrl+="&package="+localStorage.getItem("actualLink"):void 0!==$scope.packageId&&(theUrl+="&packageId="+$scope.packageId),void 0!==$scope.search&&(theUrl+="&search="+$scope.search)}else if(void 0!==theDevTool){var theUrl="api/resources?devtool="+theDevTool;multi_versions?theUrl+="&package="+localStorage.getItem("actualLink"):void 0!==$scope.packageId&&(theUrl+="&packageId="+$scope.packageId),void 0!==$scope.search&&(theUrl+="&search="+$scope.search)}else if(void 0!==thePackage){if(multi_versions)theUrl="api/resources?package="+localStorage.getItem("actualLink");else var theUrl="api/resources?package="+$scope.packageId;void 0!==$scope.search&&(theUrl+="&search="+$scope.search)}else if(void 0!==$scope.search){var theUrl="api/resources?search="+$scope.search;multi_versions&&(theUrl+="&package="+localStorage.getItem("actualLink"))}theUrl&&doOverviewRequest(theUrl,$scope,$http),$scope.import=function(node){if($scope.isLocalServer()&&!$scope.isOffline(node)){$modal.open({templateUrl:"AutoImport",windowClass:"remove-modal-window",scope:$scope,controller:function($scope,$modalInstance){$scope.agree=function(){$modalInstance.dismiss("cancel")},$scope.disagree=function(){$modalInstance.dismiss("cancel")}}})}else origImport(node)},$scope.importEnergia=function(importLink,createLink,list_of_devices,node){if($scope.isLocalServer()&&!$scope.isOffline(node)){$modal.open({templateUrl:"AutoImport",windowClass:"remove-modal-window",scope:$scope,controller:function($scope,$modalInstance){$scope.agree=function(){$modalInstance.dismiss("cancel")},$scope.disagree=function(){$modalInstance.dismiss("cancel")}}})}else origEnergiaImport(importLink,createLink,list_of_devices,node)},$scope.download=function(downloadLink){$scope.selectedNode.show_progress=!0;var agreed=$cookieStore.get("agreed");if(void 0!==agreed&&agreed)return void openLinkInTab(downloadLink,"download");$modal.open({templateUrl:"downloadLicense",windowClass:"app-modal-window",scope:$scope,controller:function($scope,$modalInstance){$scope.agree=function(){$cookieStore.put("agreed",!0),openLinkInTab(downloadLink,"download"),$modalInstance.dismiss("cancel")},$scope.disagree=function(){$modalInstance.dismiss("cancel")}}})},$scope.isPackageOffline=function(node){if(!(node.locals.length>0))return!1;for(var i=0;i<node.locals.length;i++){if("Latest"===node.selectedVersion)var versionIndex=node.latestVersion;else var versionIndex=node.selectedVersion;if(node.locals[i].indexOf(versionIndex)>0){var value=node.locals[i].split("--");return"undefined"!==value[0]&&value[0]}}},$scope.showFilePath=function(node){(0,_util.getPackageBundle)(node,"package").then(function(res){"partial"===res.local?$scope.partialText="Partial":"full"===res.local?$scope.partialText="Yes":$scope.partialText="No",res.localPackagePath?$scope.filePath=res.localPackagePath:$scope.filePath="N/A"});$modal.open({templateUrl:"showFilePath",windowClass:"badgeModal",scope:$scope,controller:function($scope,$modalInstance){$scope.agree=function(){$modalInstance.dismiss("cancel")}}})},$scope.homedownload=function(node){if("Latest"===node.selectedVersion)var vids=node.id+"__"+node.latestVersion;else var vids=node.id+"__"+node.selectedVersion;$scope.id=uuid2.newuuid();$modal.open({backdrop:"static",keyboard:!1,templateUrl:"downloadProgress",windowClass:"dependencyModal",scope:$scope,controller:function($scope,$modalInstance){timer=$timeout(function(){var timerTask=!1;timer=!1,$scope.show_progress_screen=!0,$scope.waitingScreen=!0,$scope.waitingMessage="Preparing Download",$scope.canceled=!1,timerTask=$interval(function(){$http({method:"GET",url:"api/progress/"+$scope.id}).success(function(data,status,headers,config){var res=angular.fromJson(data);if(206===status||304===status)$scope.progress=res.progress,$scope.waitingMessage=res.message;else if(!0===res.done){if(timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waitingMessage="",$scope.show_progress_screen=!1,$scope.waitingScreen=!1,"all__latest"===localStorage.getItem("filterLink")&&localStorage.setItem("filterLink",localStorage.getItem("actualLink").replace(/__[0-9.]+/g,"__latest")),localStorage.setItem("filterLink",localStorage.getItem("filterLink").replace(node.id+"__latest",node.id+"__"+versionIndex)),$rootScope.packageObj[node.id].selectedVersion=versionIndex,$scope.packageObj[node.id].selectedVersion=versionIndex,!$scope.canceled&&!$scope.isLocalServer()){var res=angular.fromJson(data),element=document.createElement("a");element.href=res.result,element.setAttribute("download","true"),element.setAttribute("target","_self"),document.body.appendChild(element),element.click()}$modalInstance.close()}}).error(function(data,status,headers,config){console.log("api/progress error")})},2e3)},1e3)}});$http({method:"GET",url:"api/bundle?vid="+vids+"&progressId="+$scope.id+"&download=true&os="+navigator.platform}).success(function(data,status,headers,config){console.log("download api/bundle success")}).error(function(data,status,headers,config){console.log(" downlaod api/bundle error"),timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.show_progress_screen=!1,$scope.waitingScreen=!1})},$scope.homemakeOffline=function(node){if($("[test_id=progress-bar-div]").attr("is-processing","true"),"Latest"===node.selectedVersion)var vids=node.id+"__"+node.latestVersion,versionIndex=node.latestVersion;else var vids=node.id+"__"+node.selectedVersion,versionIndex=node.selectedVersion;async.waterfall([function(callback){$scope.id=uuid2.newuuid();var license=$scope.packageObj[node.id].selectedPackage.license;if(console.log($scope.packageObj[node.id].selectedPackage),!license)return setImmediate(callback);$scope.licenseUrl=$sce.trustAsResourceUrl("content/"+license),(0,_offline2.showLicense)(node,$modal,{scope:$scope,onAgree:callback,onCancel:function(err){callback(err||"early exit")}})},function(callback){$modal.open({backdrop:"static",keyboard:!1,templateUrl:"downloadProgress",windowClass:"dependencyModal",scope:$scope,controller:function($scope,$modalInstance){timer=$timeout(function(){var timerTask=!1;timer=!1,$scope.show_progress_screen=!0,$scope.showCancel=!0,$scope.waitingScreen=!0,$scope.waitingMessage="Preparing Download",$scope.canceled=!1,timerTask=$interval(function(){$http({method:"GET",url:"api/progress/"+$scope.id}).success(function(data,status,headers,config){var res=angular.fromJson(data);$scope.canCancel=res.canCancel,206===status||304===status?($scope.progress=res.progress,$scope.waitingMessage=res.message):!0===res.done&&(timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waitingMessage="",$scope.show_progress_screen=!1,$scope.waitingScreen=!1,$modalInstance.close(data))}).error(function(data,status,headers,config){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$modalInstance.close(data)})},2e3)},1e3),$scope.cancel=function(){$http({method:"GET",url:"api/progress/"+$scope.id+"?cancel=true"}).success(function(data,status,headers,config){console.log("success"),timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waitingMessage="",$scope.show_progress_screen=!1,$scope.waitingScreen=!1,$modalInstance.dismiss()})}}}).result.then(function(data){var res=angular.fromJson(data);if($("[test_id=progress-bar-div]").attr("is-processing","false"),!$scope.canceled&&!$scope.isLocalServer()){var res=angular.fromJson(data),element=document.createElement("a");element.href=res.result,element.setAttribute("download","true"),element.setAttribute("target","_self"),document.body.appendChild(element),element.click()}for(var i=0;i<$rootScope.packageObj[node.id].locals.length;i++)$rootScope.packageObj[node.id].locals[i].indexOf(versionIndex)>0&&null==res.error&&($rootScope.packageObj[node.id].locals[i]="full--"+versionIndex,$scope.packageObj[node.id].locals[i]="full--"+versionIndex);"all__latest"===localStorage.getItem("filterLink")&&localStorage.setItem("filterLink",localStorage.getItem("actualLink").replace(/__[0-9.]+/g,"__latest")),localStorage.setItem("filterLink",localStorage.getItem("filterLink").replace(node.id+"__latest",node.id+"__"+versionIndex)),$rootScope.packageObj[node.id].selectedVersion=versionIndex,$scope.packageObj[node.id].selectedVersion=versionIndex,null!=res.result&&0!=res.result.length?($scope.dependencies=res.result,downloadDependency($scope,$http,$timeout,$interval,$modal,timer,uuid2,node,"remove",$location,$q,"package",$sce,$rootScope).then(function(){updateConfigFile($http,$scope,$rootScope,$q)})):$scope.util.uiManager.downloadConfirmation(node,"package",res.error).then(function(){updateConfigFile($http,$scope,$rootScope,$q),rediscoverProduct1($http,$scope,node,"remove",$location)})})}]),$http({method:"GET",url:"api/bundles?vids="+vids+"&progressId="+$scope.id}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waiting=!1,$scope.waitingMessage=""})},$scope.makeOfflineFile=function(node){(0,_offline.setInstallPath)($rootScope),(0,_offline2.makeOffline)(node,$modal,$rootScope,$sce,function(err){err||$http.post("/ide/rediscoverProducts").then(function(){refreshTree($scope,node,"",$location)})})},$scope.runOfflineFile=function(node){(0,_offline2.runOffline)(node,$modal,function(err){err||$http.post("/ide/rediscoverProducts").then(function(){refreshTree($scope,node,"",$location)})})},$scope.removeOfflineFile=function(node){(0,_util.getPackageBundle)(node).then(function(res){return(0,_util.isInTirexContentFolder)(res.localPackagePath)}).then(function(canRemove){canRemove?removeOfflineConfirmation(node):cannotRemoveOfflineWarning(node)})},$scope.downloadFile=function(node){sendDataToTealium(UTAG_SEND_TYPE.link,prepareTealiumLink(UTAG_LINK_TYPE.download,node.packageUId)),$("[test_id=progress-bar-div]").attr("is-processing","true");var remoteServerBaseUrl=window.location.origin;processOfflineFile(node,"download",node.downloadLink+"&os="+navigator.platform+"&devModeZip="+remoteServerBaseUrl).then(function(){$("[test_id=progress-bar-div]").attr("is-processing","false")})};var timer=!1,timerTask=!1,processOfflineFile=function(node,action,actionLink){var defer1=$q.defer();$scope.selectedNode.show_progress=!0;var license=node.license,agreed=!1;if(void 0!=(void 0===license?"undefined":_typeof(license))&&null!=license&&"remove"!==action){$scope.licenseUrl=$sce.trustAsResourceUrl("content/"+license);$modal.open({templateUrl:"downloadLicense",windowClass:"app-modal-window",scope:$scope,controller:function($scope,$modalInstance){$scope.agree=function(){agreed=!0,$modalInstance.close(agreed)},$scope.disagree=function(){agreed=!1,$modalInstance.close(agreed)}}}).result.then(function(agreed){if(agreed){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.id=uuid2.newuuid(),$scope.progress=0,$scope.doneOffline=!1;downloadprogress($scope,$timeout,$interval,$http,$location,$modal,timer,timerTask,node,action,actionLink,uuid2).then(function(){defer1.resolve("Defer1 resolved")})}})}else{timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.id=uuid2.newuuid(),$scope.progress=0;downloadprogress($scope,$timeout,$interval,$http,$location,$modal,timer,timerTask,node,action,actionLink,uuid2).then(function(){defer1.resolve("Defer1 resolved")})}return defer1.promise};$scope.cancelDownload=function(){$scope.canceled=!0,$scope.selectedNode.waiting=!1,$scope.waitingMessage="",timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1)},$scope.goUp=function(treeNode){var parentUrl,parentNodeName,lastSlash,myNode,node=treeNode.parentContent;if(null!=node){if($scope.selectedNode.waiting=!0,$scope.selectedTreeNode.showAce=!1,$scope.selectedTreeNode.showFrame=!1,"/"===node.url.substring(0,1)&&(node.url=node.url.substring(1)),-1!==node.url.indexOf("path=")&&-1!==node.url.indexOf("package=")&&node.url.indexOf("path=")<node.url.indexOf("package=")){myNode=node.url;var urlPackage=node.url.substring(node.url.indexOf("&package"));myNode=myNode.substring(0,myNode.indexOf("&package="));var urlPath=myNode.substring(myNode.indexOf("?path="));lastSlash=urlPath.lastIndexOf("/"),-1!==lastSlash?(parentNodeName=urlPath.substring(lastSlash+1).replace(/%20/g," "),urlPath=urlPath.substring(0,lastSlash),parentUrl="api/resources"+urlPath+urlPackage):(parentUrl="api",parentNodeName=urlPath.replace(/%20/g," ").replace("?path=","").trim())}else{if(!(-1!==node.url.indexOf("path=")&&-1!==node.url.indexOf("package=")&&node.url.indexOf("path=")>node.url.indexOf("package=")))return;myNode=node.url;var urlPath=myNode.substring(myNode.indexOf("&path="));myNode=myNode.substring(0,myNode.indexOf("&path="));var urlPackage=myNode.substring(myNode.indexOf("?package="));lastSlash=urlPath.lastIndexOf("/"),-1!==lastSlash?(parentNodeName=urlPath.substring(lastSlash+1).replace(/%20/g," "),urlPath=urlPath.substring(0,lastSlash),parentUrl="api/resources"+urlPackage+urlPath):(parentUrl="api",parentNodeName=urlPath.replace(/%20/g," ").replace("&path=","").trim())}parentNodeName=decodeURIComponent(parentNodeName),$http({url:node.url,method:"GET"}).success(function(data,status,headers,config){$scope.selectedTreeNode.content=angular.fromJson(data),"api"!==parentUrl?$http({url:parentUrl,method:"GET"}).success(function(data1,status1,headers1,config1){for(var parentNodes=angular.fromJson(data1),i=0;i<parentNodes.length;i++)if(parentNodes[i].text===parentNodeName){$scope.selectedTreeNode.parentContent=parentNodes[i];break}if(null!=$scope.selectedTreeNode.parentContent.overviewLink){var iframeSrc="content/"+$scope.selectedTreeNode.parentContent.overviewLink;$scope.selectedTreeNode.weblink=$sce.trustAsResourceUrl(iframeSrc)}$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1,nodeSelectionChanged($scope.selectedTreeNode)}).error(function(data1,status1,headers1,config1){var lastEquals=parentNodeName.lastIndexOf("=");$scope.selectedTreeNode.parentContent.text=lastEquals>=0?parentNodeName.substring(lastEquals+1):"/",$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1}):($scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1)}).error(function(data,status,headers,config){$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1});var tree=$("#jstree").jstree(!0),matchingTreeNode=angular.element("a[title='"+parentNodeName+"']"),packageName=node._package;matchingTreeNode.each(function(){var node=tree.get_node(this);node.original._package===packageName&&node.children.forEach(function(id){tree.get_node(id).id===treeNode.id&&tree.select_node(node)})});var sendLink=urlPath;sendLink.indexOf("?path=")>-1?sendLink=sendLink.replace("?path=",""):urlPath.indexOf("&path=")>-1&&(sendLink=sendLink.replace("&path=","")),sendDataToTealium(UTAG_SEND_TYPE.view,prepareTealiumView(sendLink+"/"+parentNodeName,parentNodeName,!0))}},$scope.hoverOnSlider=function(_package){$scope.theContent=_package,$scope.showContent=!0},$scope.goToPackage=function(_package){$scope.selectedTreeNode.id=_package.name,document.location="#/?link=Software/"+_package.name,$route.reload()},$scope.openLink=function(currentNode,childNode,type){$scope.selectedNode.waiting=!0,$scope.selectedNode.show_progress=!1,$scope.selectedTreeNode=currentNode,$scope.selectedTreeNode.parentContent=childNode;var span=currentNode.url.search(/ - v| - \(/);span>0&&(currentNode.url=currentNode.url.substring(0,span));var pathI=$scope.selectedTreeNode.url.indexOf("path");if(-1!=pathI){var searchI=$scope.selectedTreeNode.url.indexOf("search"),packageI=$scope.selectedTreeNode.url.indexOf("package"),minIndex=Math.min(packageI,searchI),maxIndex=Math.max(packageI,searchI);$scope.selectedTreeNode.url=-1==minIndex&&-1==maxIndex||minIndex<pathI&&maxIndex<pathI?currentNode.url+"/"+encodeURIComponent(childNode.text):pathI>minIndex&&pathI<maxIndex?currentNode.url.substring(0,pathI)+currentNode.url.substring(pathI,maxIndex-1)+"/"+encodeURIComponent(childNode.text)+"&"+currentNode.url.substring(maxIndex):-1==minIndex&&-1!=maxIndex?currentNode.url.substring(0,maxIndex-1)+"/"+encodeURIComponent(childNode.text)+"&"+currentNode.url.substring(maxIndex):currentNode.url.substring(0,pathI)+currentNode.url.substring(pathI,minIndex-1)+"/"+encodeURIComponent(childNode.text)+"&"+currentNode.url.substring(minIndex)}else-1==$scope.selectedTreeNode.url.indexOf("?")?$scope.selectedTreeNode.url=$scope.selectedTreeNode.url+"?path="+encodeURIComponent(childNode.text):$scope.selectedTreeNode.url=$scope.selectedTreeNode.url+"&path="+encodeURIComponent(childNode.text);if($scope.selectedTreeNode.showAce=!1,$scope.selectedTreeNode.showFrame=!1,sendAnalytics($scope,$http,$location.path(),$scope.selectedTreeNode.url),null!=$scope.selectedTreeNode.parentContent)if($scope.title="TI Resource Explorer",$scope.keywords="Devices, Development Tools, Libraries",$scope.description="Access examples, libraries, executables and documentation for your Texas Instruments device and development board",void 0!=$scope.selectedTreeNode.parentContent.text&&($scope.title=$scope.selectedTreeNode.parentContent.text+" | TI Resource Explorer"),void 0!=$scope.selectedTreeNode.parentContent.description&&($scope.description=$scope.selectedTreeNode.parentContent.description),void 0!=$scope.selectedTreeNode.parentContent.tags&&($scope.keywords=$scope.selectedTreeNode.parentContent.tags+", Libraries, executables, examples, documents"),$scope.$root.metaservice.set($scope.title,$scope.description,$scope.keywords),"folder"===childNode.type)$http({url:currentNode.url,method:"GET"}).success(function(data,status,headers,config){if($scope.selectedTreeNode.content=angular.fromJson(data),$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1,null!=currentNode.parentContent.overviewLink){$scope.selectedTreeNode.showAce=!1,$scope.selectedTreeNode.showFrame=!0;var iframeSrc="content/"+currentNode.parentContent.overviewLink;$scope.selectedTreeNode.weblink=$sce.trustAsResourceUrl(iframeSrc),$scope.selectedTreeNode.content=null,$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1}}).error(function(data,status,headers,config){});else if("file"===$scope.selectedTreeNode.parentContent.resourceType||"project.energia"==$scope.selectedTreeNode.parentContent.resourceType){var link=$scope.selectedTreeNode.parentContent.link;if(".c"===$scope.selectedTreeNode.parentContent.link.substr(-2)||".cpp"===$scope.selectedTreeNode.parentContent.link.substr(-4)||".asm"===$scope.selectedTreeNode.parentContent.link.substr(-4)||".cmd"===$scope.selectedTreeNode.parentContent.link.substr(-4)||".ino"===$scope.selectedTreeNode.parentContent.link.substr(-4)||".h"===$scope.selectedTreeNode.parentContent.link.substr(-2))$scope.selectedTreeNode.showAce=!0,$scope.selectedTreeNode.showFrame=!1,$http({url:link,method:"GET"}).success(function(data,status,headers,config){$scope.selectedTreeNode.aceContent=data,$scope.selectedTreeNode.content=null,$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1}).error(function(data,status,headers,config){$scope.selectedTreeNode.content=null,$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1});else{if($scope.selectedTreeNode.showAce=!1,$scope.selectedTreeNode.showFrame=!0,".txt"===$scope.selectedTreeNode.parentContent.link.substr(-4)||".pdf"===$scope.selectedTreeNode.parentContent.link.substr(-4)||".icf"===$scope.selectedTreeNode.parentContent.link.substr(-4)||".htm"===$scope.selectedTreeNode.parentContent.link.substr(-4)||".html"===$scope.selectedTreeNode.parentContent.link.substr(-5)){var iframeSrc=$scope.selectedTreeNode.parentContent.link;$scope.selectedTreeNode.weblink=$sce.trustAsResourceUrl(iframeSrc)}else isMarkdown($scope.selectedTreeNode)?$http({url:link,method:"GET"}).success(function(data,status,headers,config){mdToHtml(data),$scope.selectedTreeNode.content=null,$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1}).error(function(data,status,headers,config){$scope.selectedTreeNode.content=null,$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1}):$scope.selectedTreeNode.showFrame=!1;$scope.selectedTreeNode.content=null,$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1}}else if("web.app"===$scope.selectedTreeNode.parentContent.resourceType||"folder"===$scope.selectedTreeNode.parentContent.resourceType){var link=$scope.selectedTreeNode.parentContent.link;$scope.selectedTreeNode.showAce=!1,$scope.selectedTreeNode.showFrame=!0;var iframeSrc=$scope.selectedTreeNode.parentContent.link;$scope.selectedTreeNode.weblink=$sce.trustAsResourceUrl(iframeSrc),$scope.selectedTreeNode.content=null,$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1}else if("weblink"===$scope.selectedTreeNode.parentContent.type){$scope.selectedTreeNode.showAce=!1,$scope.selectedTreeNode.showFrame=!0;var iframeSrc=$scope.selectedTreeNode.parentContent.link;$scope.selectedTreeNode.weblink=$sce.trustAsResourceUrl(iframeSrc),$scope.selectedTreeNode.content=null,$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1}else if(null!=$scope.selectedTreeNode.parentContent.overviewLink){$scope.selectedTreeNode.showAce=!1,$scope.selectedTreeNode.showFrame=!0;var iframeSrc=$scope.selectedTreeNode.parentContent.overviewLink;$scope.selectedTreeNode.weblink=$sce.trustAsResourceUrl(iframeSrc),$scope.selectedTreeNode.content=null,$scope.selectedTreeNode.show=!0,$scope.selectedNode.waiting=!1}var tree=$("#jstree").jstree(!0);angular.element("a[title='"+childNode.text+"']").each(function(){tree.get_node(this).parent===currentNode.id&&$(this).click().addClass("jstree-clicked")});var returned_url=currentNode.url,pathI=returned_url.indexOf("path");if(-1!=pathI){var packageI=returned_url.indexOf("package"),searchI=returned_url.indexOf("search"),minIndex=Math.min(packageI,searchI),maxIndex=Math.max(packageI,searchI);returned_url=-1==minIndex&&-1==maxIndex||minIndex<pathI&&maxIndex<pathI?currentNode.url.substring(pathI+5):pathI>minIndex&&pathI<maxIndex?currentNode.url.substring(pathI+5,maxIndex-1):-1==minIndex&&-1!=maxIndex?currentNode.url.substring(pathI+5,maxIndex):currentNode.url.substring(pathI+5,minIndex);var nodelink="?link="+returned_url;if(-1==$location.path().indexOf(nodelink)){var newUrl;newUrl=($location.path().indexOf("/link"),$location.path()+nodelink);var sendLink=returned_url;"&"===sendLink[sendLink.length-1]&&(sendLink=sendLink.substr(0,sendLink.length-1)),sendDataToTealium(UTAG_SEND_TYPE.view,prepareTealiumView(sendLink,childNode.text,!0)),LayoutManager.changeUrlWithTreeCollapse(newUrl)}}nodeSelectionChanged($scope.selectedTreeNode)},$scope.nodeChanged=function(newNode){newNode.subid},$scope.markUpIcon=function(node){return"true"===node.offline?"overlay overlaySE glyphicon glyphicon-arrow-down offline":"partial"===node.offline?"overlay overlaySE glyphicon glyphicon-arrow-down partial":void node.localonly},$scope.collapseTree=function(){LayoutManager.collapseTree()},$scope.expandTree=function(){LayoutManager.expandTree()},$scope.toggleTree=function(){LayoutManager.toggleTree()},first&&(angular.element("#step5").map(function(key,element){Ps.initialize(element)}),angular.element("#tree").map(function(key,element){Ps.initialize(element)}),first=!1),$scope.$watch("selectedTreeNode.parentContent.description",function(){$scope.selectedTreeNode&&(truncateDesc($scope.selectedTreeNode.parentContent.description),$rootScope.$broadcast("description",{text:$scope.selectedTreeNode.parentContent.description}))});var description=void 0;$scope.$on("description",function(event,desc){description=desc.text}),window.onresize=function(){description&&$scope.$apply(function(){truncateDesc(description)})}}),rexApp.filter("to_trusted",["$sce",function($sce){return function(text){return $sce.trustAsHtml(text)}}]),rexApp.filter("to_trusted_resource",["$sce",function($sce){return function(url){return $sce.trustAsResourceUrl(url)}}]),rexApp.filter("dataFilter",function(){return function(input,uppercase){input=input||"";for(var out="",i=0;i<input.length;i++)out=input.charAt(i)+out;return uppercase&&(out=out.toUpperCase()),out}}),rexApp.directive("initializeSlider",function($timeout){return{link:function(scope,element,attrs){element.bind("load",function(){var packageImg=new Image
+;packageImg.src=attrs.src;var th=element.parent().height(),targetleft=Math.floor((element.parent().width()-Math.floor(packageImg.width*th/packageImg.height))/2),clonedSlide=document.getElementsByClassName(scope.package.image);$(clonedSlide).css({height:th,left:targetleft}),scope.selectedTreeNode.showSlider=!1,$timeout(function(){$("#package-images").slick({centerMode:!0,arrows:!0,slidesToScroll:1,autoplay:!0,autoplaySpeed:2e3,variableWidth:!0,nextArrow:".btn-prev",prevArrow:".btn-next"}).on("init",function(){scope.selectedTreeNode.showSlider=!0})})})}}}),rexApp.directive("fancybox",function($compile,$timeout){return{link:function($scope,element,attrs){element.fancybox({hideOnOverlayClick:!1,hideOnContentClick:!1,enableEscapeButton:!1,showNavArrows:!1,onComplete:function(){$timeout(function(){$compile($("#fancybox-content"))($scope),$scope.$apply(),$.fancybox.resize()})}})}}}),rexApp.directive("jstree",function($sce,$q,$http,$location,$cookieStore,$cookies,$timeout,$parse,LayoutManager,$route,$rootScope,Util){return{restrict:"A",require:"?ngModel",scope:{selectedNode:"=?",selectedNodeChanged:"=",selectedPath:"=?",analyticsDevice:"=?",analyticsDevtool:"=?",analyticsPath:"=?",analyticsName:"=?"},link:function(scope,treeElement,attrs){function packageVersion(node){if("on"===localStorage.getItem("displayNumChildren")||!0===$rootScope.inSearchMode)var span=node.text.indexOf(" - (");var temp=-1===span?node.text:node.text.substring(0,span),list=localStorage.getItem("filterLink").split("::");if("all__latest"===list[0]){for(var id in $rootScope.packageObj)if($rootScope.packageObj[id].name===temp)return $rootScope.packageObj[id].latestVersion}else for(var i=0;i<list.length;i++){var obj=list[i].split("__");if(packageName(obj[0])===temp)return"latest"===obj[1]?$rootScope.packageObj[obj[0]].latestVersion:obj[1]}return""}function packageName(id){for(var i=0;i<packages.length;i++)if(id===packages[i].id)return packages[i].name;return-1}function recurseMarkup(node,data){var nodeDOM=$("#"+node.id),nodeIcon=nodeDOM.find("a > i:first");0!==nodeIcon.prev().length&&nodeIcon.prev().hasClass("overlay")||appendOverlay(nodeIcon,node.original),node.state.opened&&node.children.forEach(function(childID){recurseMarkup(data.instance.get_node(childID),data)})}function appendOverlay(elem,node){"true"===node.offline?elem.before('<span class="tree-overlay overlaySE glyphicon glyphicon-arrow-down offline" />'):"partial"===node.offline?elem.before('<span class="tree-overlay overlaySE glyphicon glyphicon-arrow-down partial" />'):node.localonly}scope.util=Util({$scope:scope,$http:$http,$q:$q});var packages=[];(function(){var ajxdefer=$q.defer();return $.ajax({type:"GET",url:"api/packages",async:!0,success:function(data){packages=angular.fromJson(data),$rootScope.packages=packages,angular.forEach($cookieStore,function(v,k){$cookieStore.remove(k)}),makePackageObject($rootScope,$http,$q,scope).then(function(){ajxdefer.resolve("defer resolved")})}}),ajxdefer.promise})().then(function(){function expandAndSelect(ids){ids=ids.slice(),function expandIds(){1==ids.length?(treeElement.jstree("deselect_node",treeElement.jstree("get_selected")),treeElement.jstree("select_node",ids[0])):treeElement.jstree("open_node",ids[0],function(){ids.splice(0,1),expandIds()})}()}function getPaths(){var uripath=$location.search();if("link"in uripath){var paths=uripath.link.split("/");return""==paths[paths.length-1]&&paths.pop(),paths}return[]}scope.selectedNode=scope.selectedNode||{},scope.displayNumChildren=!1;var rootNodes=[],selectedPath=scope.selectedPath,tree=treeElement.jstree({core:{animation:0,worker:!1,check_callback:!0,data:{url:function(node){var selectedPath=scope.selectedPath,url="api/resources";if("/All"===$location.path()||"/"===$location.path()?(rootNodes.push(node),scope.selectedNode.showWelcome=!0):scope.selectedNode.showWelcome=!1,"#"===node.id)void 0!==selectedPath.device?(url="api/resources?device="+selectedPath.device,multi_versions?url+="&package="+localStorage.getItem("actualLink"):void 0!==scope.packageId&&(url+="&package="+scope.packageId),void 0!==selectedPath.search&&(url+="&search="+selectedPath.search)):void 0!==selectedPath.devtool?(url="api/resources?devtool="+selectedPath.devtool,multi_versions?url+="&package="+localStorage.getItem("actualLink"):void 0!==$scope.packageId&&(url+="&package="+scope.packageId),void 0!==selectedPath.search&&(url+="&search="+selectedPath.search)):void 0!==selectedPath.packageId?(url=multi_versions?"api/resources?package="+localStorage.getItem("actualLink"):"api/resources?package="+selectedPath.packageId,void 0!==selectedPath.search&&(url+="&search="+selectedPath.search)):void 0!==selectedPath.search&&(url="api/resources?search="+selectedPath.search,multi_versions&&(url+="&package="+localStorage.getItem("actualLink")));else{for(var path="",i=node.parents.length-2;i>=0;i--){var nodInfo=$("#"+node.parents[i]),node_name=nodInfo.children("a").text(),re=/ - v| - \(/,span=node_name.search(re);span>0&&(node_name=node_name.substring(0,span)),""!=node_name&&(path=path+encodeURIComponent(node_name)+"/")}var text=node.text,re=/ - v| - \(/,span=text.search(re);span>0&&(text=text.substring(0,span)),text=encodeURIComponent(text),path+=text,url="api/resources?path="+path,void 0!==selectedPath.device?(url="api/resources?device="+selectedPath.device,multi_versions?url+="&package="+localStorage.getItem("actualLink"):void 0!==selectedPath.packageId&&(url+="&package="+selectedPath.packageId),void 0!==selectedPath.search&&(url+="&search="+selectedPath.search),url+="&path="+path):void 0!==selectedPath.devtool?(url="api/resources?devtool="+selectedPath.devtool,multi_versions?url+="&package="+localStorage.getItem("actualLink"):void 0!==selectedPath.packageId&&(url+="&package="+selectedPath.packageId),void 0!==selectedPath.search&&(url+="&search="+selectedPath.search),url+="&path="+path):multi_versions||void 0===selectedPath.packageId?(url=void 0!==selectedPath.search?"api/resources?search="+selectedPath.search+"&path="+path:"api/resources?path="+path,multi_versions&&(url+="&package="+localStorage.getItem("actualLink"))):(url="api/resources?package="+selectedPath.packageId,void 0!==selectedPath.search&&(url+="&search="+selectedPath.search),url+="&path="+path)}if(void 0!==node.state&&void 0!==node.state.selected&&node.state.selected){scope.selectedNode.waiting=!0;var n=node;n.parentUrl=node.original.url,"/"===n.parentUrl.substring(0,1)&&(n.parentUrl=n.parentUrl.substring(1));var nodeName=node.text,re=/ - v| - \(/,span=nodeName.search(re);span>0&&(nodeName=nodeName.substring(0,span));var pathI=n.parentUrl.indexOf("path");if(-1!=pathI){var searchI=n.parentUrl.indexOf("search"),packageI=n.parentUrl.indexOf("package"),maxIndex=Math.max(searchI,packageI);n.url=-1==maxIndex||pathI>maxIndex?n.parentUrl+"/"+encodeURIComponent(nodeName):n.parentUrl.substring(0,maxIndex-1)+"/"+encodeURIComponent(nodeName)+"&"+n.parentUrl.substring(maxIndex)}if(scope.selectedNode.id=node.id,scope.selectedNode.url=n.url,scope.selectedNode.path=n.a_attr.path,scope.selectedNode.text=n.text,void 0!==n.url&&null!=n.url?$http({url:n.url,method:"GET"}).success(function(data,status,headers,config){scope.selectedNode.content=angular.fromJson(data),scope.selectedNode.show=!0,scope.selectedNode.waiting=!1}).error(function(data,status,headers,config){}):(scope.selectedNode.content=null,scope.selectedNode.show=!1),void 0!==n.parentUrl&&null!=n.parentUrl&&"api"!==n.parentUrl){scope.selectedNode.waiting=!0,scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!1;var re=/ - v| - \(/,span=n.parentUrl.search(re);span>0&&(n.parentUrl=n.parentUrl.substring(0,span)),$http({url:n.parentUrl,method:"GET"}).success(function(data,status,headers,config){var parentContent=angular.fromJson(data);scope.selectedNode.show=!0;var span=n.text.search(/ - v| - \(/),nodeName=n.text;span>0&&(nodeName=nodeName.substring(0,span));for(var i=0;i<parentContent.length;i++)parentContent[i].text===nodeName&&(scope.selectedNode.parentContent=parentContent[i]);if(null!=scope.selectedNode.parentContent.overviewDescription&&"undefined"!=scope.selectedNode.parentContent.overviewDescription&&(scope.title=scope.selectedNode.parentContent.text+" | TI Resource Explorer",scope.keywords=scope.selectedNode.parentContent.text+", Libraries, executables, examples, documents",scope.description=scope.selectedNode.parentContent.text+" - "+String(scope.selectedNode.parentContent.overviewDescription).replace(/<[^>]+>/gm,""),scope.$root.metaservice.set(scope.title,scope.description,scope.keywords)),scope.selectedNode.parentContent)if("file"===scope.selectedNode.parentContent.resourceType||"project.energia"==scope.selectedNode.parentContent.resourceType)if(".c"===scope.selectedNode.parentContent.link.substr(-2)||".cpp"===scope.selectedNode.parentContent.link.substr(-4)||".asm"===scope.selectedNode.parentContent.link.substr(-4)||".cmd"===scope.selectedNode.parentContent.link.substr(-4)||".ino"===scope.selectedNode.parentContent.link.substr(-4)||".h"===scope.selectedNode.parentContent.link.substr(-2)){scope.selectedNode.showAce=!0,scope.selectedNode.showFrame=!1;var link="content/"+scope.selectedNode.parentContent.link;$http({url:link,method:"GET"}).success(function(data,status,headers,config){scope.selectedNode.aceContent=data,scope.selectedNode.waiting=!1}).error(function(data,status,headers,config){scope.selectedNode.waiting=!1})}else{if(scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!0,scope.selectedNode.show=!1,".txt"===scope.selectedNode.parentContent.link.substr(-4)||".pdf"===scope.selectedNode.parentContent.link.substr(-4)||".icf"===scope.selectedNode.parentContent.link.substr(-4)||".htm"===scope.selectedNode.parentContent.link.substr(-4)||".html"===scope.selectedNode.parentContent.link.substr(-5)){var iframeSrc=scope.selectedNode.parentContent.link;scope.selectedNode.weblink=$sce.trustAsResourceUrl(iframeSrc)}else if(isMarkdown(scope.selectedNode)){var link=scope.selectedNode.parentContent.link;$http({url:link,method:"GET"}).success(function(data,status,headers,config){mdToHtml(data),scope.selectedNode.waiting=!1}).error(function(data,status,headers,config){$scope.selectedNode.waiting=!1})}else scope.selectedNode.showFrame=!1;scope.selectedNode.show=!0,scope.selectedNode.waiting=!1}else if("web.app"===scope.selectedNode.parentContent.resourceType||"folder"===scope.selectedNode.parentContent.resourceType){scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!0;var iframeSrc=scope.selectedNode.parentContent.link;scope.selectedNode.weblink=$sce.trustAsResourceUrl(iframeSrc),scope.selectedNode.waiting=!1}else if("weblink"===scope.selectedNode.parentContent.type){scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!0;var iframeSrc=scope.selectedNode.parentContent.link;scope.selectedNode.weblink=$sce.trustAsResourceUrl(iframeSrc),scope.selectedNode.waiting=!1}else if(null!=scope.selectedNode.parentContent.overviewLink){scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!0;var iframeSrc="content/"+scope.selectedNode.parentContent.overviewLink;scope.selectedNode.weblink=$sce.trustAsResourceUrl(iframeSrc),scope.selectedNode.waiting=!1}else scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!1,scope.selectedNode.waiting=!1}).error(function(data,status,headers,config){})}else scope.selectedNode.parentContent=null,scope.selectedNode.waiting=!1}return"api/resources"===url&&(url+="?package="+localStorage.getItem("actualLink")),url},dataFilter:function(data){var j=angular.fromJson(data);scope.selectedNode.emptyTree=!1,0==j.length&&(scope.selectedNode.emptyTree=!0);var paths=getPaths(),resourceTitle=paths[paths.length-1],parentTitle=paths[paths.length-2],tirexDesktop=!0;"remoteserver"===angular.element(document.getElementById("hamMenuIcon")).scope().serverState.serverMode&&(tirexDesktop=!1);for(var i=0;i<j.length;i++){var appendNumChildrenText=function(){"on"===localStorage.getItem("displayNumChildren")||!0===$rootScope.inSearchMode?j[i].text=j[i].text+" - ("+j[i].numChildren+")":j[i].text=j[i].text};j[i].title=j[i].text,j[i].a_attr={title:j[i].text};var newVersionAvailable=!1;if(j[i].resourceType){if("packageOverview"===j[i].resourceType&&j[i].packageVersion&&(j[i].type="package",j[i].text=j[i].text+" - v:"+j[i].packageVersion,scope.packageObj[j[i].packageId]&&scope.packageObj[j[i].packageId].versions.length>2)){var versions=scope.packageObj[j[i].packageId].versions,versionsAvailable=versions.length;j[i].packageVersion!==versions[versionsAvailable-2]&&(newVersionAvailable=!0)}}else newVersionAvailable=!1;if(newVersionAvailable){var prepend="Newer version available, ",tooltipHelp=prepend+"go to Home Page to select version";tirexDesktop||(tooltipHelp=prepend+"go to Package Picker to select version"),j[i].type="pinnedFolder",j[i].a_attr={title:tooltipHelp,class:"treeNodeHighlight"}}void 0!==j[i].state&&$.inArray(j[i].title,paths)>-1&&(j[i].state.opened||(j[i].state.opened=!0)),null!=j[i].icon&&(j[i].icon="content/"+j[i].icon.replace(/\\/g,"/")),"Devices"===j[i].text?j[i].type="devices":"Libraries"===j[i].text?j[i].type="libraries":"Development Tools"===j[i].text?j[i].type="kits":"weblink"===j[i].type?(j[i].type="link",j[i].link.lastIndexOf(".pdf")>0&&(j[i].type="pdf")):"file"===j[i].resourceType?(j[i].type="file",j[i].link.lastIndexOf(".pdf")>0?j[i].type="pdf":j[i].link.lastIndexOf(".cmd")>0?j[i].type="cmd":j[i].link.lastIndexOf(".zip")>0?j[i].type="zip":j[i].link.lastIndexOf(".ino")>0?j[i].type="c":".c"===j[i].link.substr(-2)||".cpp"===j[i].link.substr(-4)?j[i].type="c":j[i].link.lastIndexOf(".asm")>0?j[i].type="asm":".h"===j[i].link.substr(-2)?j[i].type="h":".htm"!==j[i].link.substr(-4)&&".html"!==j[i].link.substr(-5)||(j[i].type="link")):"folder"===j[i].resourceType?j[i].type="folder":"file.executable"===j[i].resourceType?(j[i].type="exec",j[i].a_attr={title:j[i].text+" : A desktop application example that can be downloaded to your PC to run"}):"web.app"===j[i].resourceType?(j[i].type="app",j[i].a_attr={title:j[i].text+" : A web based application that you can run directly in Resource Explorer"}):"projectSpec"===j[i].resourceType||"project.ccs"===j[i].resourceType||"folder.importable"===j[i].resourceType?(j[i].type="ccs",j[i].a_attr={title:j[i].text+" : A C/C++ Project for Code Composer Studio"}):"project.energia"===j[i].resourceType&&(j[i].type="ino",j[i].a_attr={title:j[i].text+" : Energia Sketch"}),null!=j[i].numChildren&&0!==j[i].numChildren&&(parentTitle===j[i].text?appendNumChildrenText():"C"===j[i].text||"xAssembly"===j[i].text?(j[i].children=!1,appendNumChildrenText(),j[i].numChildren=0):appendNumChildrenText());var returned_url=j[i].url,pathI=j[i].url.indexOf("path");if(-1!=pathI){var packageI=j[i].url.indexOf("package"),searchI=j[i].url.indexOf("search"),minIndex=Math.min(packageI,searchI),maxIndex=Math.max(packageI,searchI);returned_url=-1==minIndex&&-1==maxIndex||minIndex<pathI&&maxIndex<pathI?j[i].url.substring(pathI+5):pathI>minIndex&&pathI<maxIndex?j[i].url.substring(pathI+5,maxIndex-1):-1==minIndex&&-1!=maxIndex?j[i].url.substring(pathI+5,maxIndex-1):j[i].url.substring(pathI+5,minIndex-1)}if(returned_url=returned_url.split("/"),("C"==returned_url[returned_url.length-1]||"xAssembly"==returned_url[returned_url.length-1])&&j[i].text!=resourceTitle&&(j.splice(i,1),i--,1==j.length))break}return angular.toJson(j)}}},search:{search_callback:function(str,nodes){var f=new $.vakata.search(str,!0,{caseSensitive:!1,fuzzy:!1});if(f.search(nodes.text).isMatch)return!0;if(!nodes.original)return!1;if(void 0!==nodes.original.description&&f.search(nodes.original.description).isMatch)return!0;if(void 0!==nodes.original.tags&&nodes.original.tags.length>0)for(i=0;i<nodes.original.tags.length;i++)if(f.search(nodes.original.tags[i]).isMatch)return!0;return!1},fuzzy:!1},types:{folder:{icon:"icns/folder.gif"},file:{icon:"icns/file.gif"},resource:{icon:"icns/file.gif"},zip:{icon:"icns/zip.png"},devices:{icon:"icns/devices.png"},libraries:{icon:"icns/libraries.png"},kits:{icon:"icns/kits.png"},link:{icon:"icns/link.png"},group:{icon:"icns/group.png"},cmd:{icon:"icns/linker_command_file.gif"},ino:{icon:"icns/new_sketch.gif"},c:{icon:"icns/c_file_obj.gif"},h:{icon:"icns/h_file_obj.gif"},ccs:{icon:"icns/ccs_proj.gif"},asm:{icon:"icns/s_file_obj.gif"},pdf:{icon:"icns/pdf.png"},exec:{icon:"icns/exec.gif"},app:{icon:"icns/demo.png"},pinnedFolder:{icon:"icns/pinnedpackage.png"},package:{icon:"icns/package.gif"}},plugins:["types","search","wholerow","unique"]});tree.bind("load_node.jstree",function(e,data){var tree=$(e.target).jstree();"#"==data.node.id?data.node.children.forEach(function(child){var node=tree.get_node(child);1===node.parents.length&&$timeout(function(){recurseMarkup(node,data)})}):data.node.children.forEach(function(root){var childNodes=tree.get_node(root);if(2===childNodes.parents.length){var parentText=tree.get_node(childNodes.parents[0]).text;if("on"===localStorage.getItem("displayNumChildren")||!0===$rootScope.inSearchMode){var parentSpan=parentText.indexOf(" - (");parentText=parentText.substring(0,parentSpan)}parentText===BUILTIN_NODES_21.software.text&&(void 0===packageVersion(childNodes)||""==packageVersion(childNodes)?childNodes.text=childNodes.text:childNodes.text=childNodes.text+" - v:"+packageVersion(childNodes))}})}),tree.bind("after_open.jstree",function(event,data){var paths=getPaths(),tree=data.instance;if(paths.length>0){if(tree.get_selected().length>0)return;var resourceTitle=paths.pop(),parentTitle=paths.pop();void 0===parentTitle&&data.node.original.title===resourceTitle&&tree.select_node(data.node);var parentNode=data.node;if(data.node.original.title!==parentTitle)return;for(var ancestorTitle=paths.pop(),ancestorNodeId=parentNode.parent;ancestorTitle;){var ancestorNode=tree.get_node(ancestorNodeId);if(ancestorNode.original.title!==ancestorTitle)return;ancestorTitle=paths.pop(),ancestorNodeId=ancestorNode.parent}parentNode.children.forEach(function(id){tree.get_node(id).original.title===resourceTitle&&(tree.select_node(id),$timeout(function(){$("#"+id).children(".jstree-anchor").focus()},500))})}else{var resourceTitle;if(void 0!==selectedPath.device)resourceTitle=selectedPath.device;else if(void 0!==selectedPath.devtool)resourceTitle=selectedPath.devtool;else if(void 0!==selectedPath.packageId)resourceTitle=selectedPath.packageId;else{if(void 0===selectedPath.search)return;resourceTitle=selectedPath.search}var wantedResource=tree.element.find("a[title='"+resourceTitle+"']");if(0==wantedResource.length)return;wantedResource=wantedResource[0];var node_id=$(wantedResource).attr("id");tree.select_node(node_id),$timeout(function(){$("#"+node_id).children(".jstree-anchor").focus()},500)}}),tree.bind("select_node.jstree",function(event,data){var pathIndex=data.node.original.url.indexOf("path="),node_title=void 0!==data.node.original.name?data.node.original.name:data.node.a_attr.title,nodelink="";if(pathIndex>-1){nodelink=data.node.original.url.substring(pathIndex+5);var packageIndex=nodelink.indexOf("&");nodelink=packageIndex>-1?"?link="+nodelink.substring(0,packageIndex)+"/"+encodeURIComponent(node_title):"?link="+nodelink+"/"+encodeURIComponent(node_title)}else nodelink="?link="+encodeURIComponent(node_title);if("asm"!=data.node.type&&"c"!=data.node.type||(data.instance.get_node(data.node.parent).text.indexOf("Assembly - (")>-1||data.instance.get_node(data.node.parent).text.indexOf("C - (")>-1)&&-1!=$location.url().indexOf(node_title)&&data.instance.delete_node(data.node.id),-1==$location.path().indexOf(nodelink)){var newUrl;$location.path().indexOf("/link"),newUrl=$location.path()+nodelink;var sendLink=nodelink.replace("?link=","");sendDataToTealium(UTAG_SEND_TYPE.view,prepareTealiumView(sendLink,node_title,!0)),LayoutManager.changeUrlWithTreeCollapse(newUrl),sendAnalytics(scope,$http,$location.path(),nodelink)}}),tree.bind("select_node.jstree",function(event,data){scope.selectedNode.waiting=!0;var n=(data.node.id,data.node);n.parentUrl=data.node.original.url,"/"===n.parentUrl.substring(0,1)&&(n.parentUrl=n.parentUrl.substring(1));var nodeName=data.node.text,re=/ - v| - \(/,span=nodeName.search(re);span>0&&(nodeName=nodeName.substring(0,span));var pathI=n.parentUrl.indexOf("path");if(-1!=pathI){var packageI=n.parentUrl.indexOf("package"),searchI=n.parentUrl.indexOf("search"),minIndex=Math.min(packageI,searchI),maxIndex=Math.max(packageI,searchI);n.url=-1==minIndex&&-1==maxIndex||minIndex<pathI&&maxIndex<pathI?n.parentUrl+"/"+encodeURIComponent(nodeName):pathI>minIndex&&pathI<maxIndex?n.parentUrl.substring(0,maxIndex-1)+"/"+encodeURIComponent(nodeName)+"&"+n.parentUrl.substring(maxIndex):-1==minIndex&&-1!=maxIndex?n.parentUrl.substring(0,maxIndex-1)+"/"+encodeURIComponent(nodeName)+"&"+n.parentUrl.substring(maxIndex):n.parentUrl.substring(0,minIndex-1)+"/"+encodeURIComponent(nodeName)+"&"+n.parentUrl.substring(minIndex)}else-1==n.parentUrl.indexOf("?")?n.url=n.parentUrl+"?path="+encodeURIComponent(nodeName):n.url=n.parentUrl+"&path="+encodeURIComponent(nodeName);if(scope.selectedNode.id=n.id,scope.selectedNode.url=n.url,scope.selectedNode.path=n.a_attr.path,scope.selectedNode.text=n.text,void 0!==n.url&&null!=n.url?$http({url:n.url,method:"GET"}).success(function(data,status,headers,config){scope.selectedNode.content=angular.fromJson(data),scope.selectedNode.show=!0,scope.selectedNode.waiting=!1,nodeSelectionChanged(scope.selectedNode)}).error(function(data,status,headers,config){}):(scope.selectedNode.content=null,scope.selectedNode.show=!1),void 0!==n.parentUrl&&null!=n.parentUrl&&"api"!==n.parentUrl){scope.selectedNode.waiting=!0,scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!1,scope.selectedNode.weblink=$sce.trustAsResourceUrl("about:blank");var re=/ - v| - \(/,span=n.parentUrl.search(re);span>0&&(n.parentUrl=n.parentUrl.substring(0,span)),$http({url:n.parentUrl,method:"GET"}).success(function(data,status,headers,config){var parentContent=angular.fromJson(data);scope.selectedNode.show=!0;var span=n.text.search(/ - v| - \(/),nodeName=n.text;span>0&&(nodeName=nodeName.substring(0,span));for(var i=0;i<parentContent.length;i++)parentContent[i].text===nodeName&&(scope.selectedNode.parentContent=parentContent[i]);if(null!=scope.selectedNode.parentContent)if(scope.title="TI Resource Explorer",scope.keywords="Devices, Development Tools, Libraries",scope.description="Access examples, libraries, executables and documentation for your Texas Instruments device and development board",void 0!=scope.selectedNode.parentContent.text&&(scope.title=scope.selectedNode.parentContent.text+" | TI Resource Explorer"),void 0!=scope.selectedNode.parentContent.description&&(scope.description=scope.selectedNode.parentContent.description),void 0!=scope.selectedNode.parentContent.tags&&(scope.keywords=scope.selectedNode.parentContent.tags+", Libraries, executables, examples, documents"),scope.$root.metaservice.set(scope.title,scope.description,scope.keywords),"file"===scope.selectedNode.parentContent.resourceType||"project.energia"==scope.selectedNode.parentContent.resourceType)if(".c"===scope.selectedNode.parentContent.link.substr(-2)||".cpp"===scope.selectedNode.parentContent.link.substr(-4)||".asm"===scope.selectedNode.parentContent.link.substr(-4)||".cmd"===scope.selectedNode.parentContent.link.substr(-4)||".ino"===scope.selectedNode.parentContent.link.substr(-4)||".h"===scope.selectedNode.parentContent.link.substr(-2)){scope.selectedNode.showAce=!0,scope.selectedNode.showFrame=!1;var link=scope.selectedNode.parentContent.link;$http({url:link,method:"GET"}).success(function(data,status,headers,config){scope.selectedNode.aceContent=data,scope.selectedNode.waiting=!1}).error(function(data,status,headers,config){scope.selectedNode.showFrame=!0,scope.selectedNode.showAce=!1,scope.selectedNode.weblink=$sce.trustAsResourceUrl(link),scope.selectedNode.waiting=!1})}else{if(scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!0,scope.selectedNode.show=!1,".txt"===scope.selectedNode.parentContent.link.substr(-4)||".pdf"===scope.selectedNode.parentContent.link.substr(-4)||".icf"===scope.selectedNode.parentContent.link.substr(-4)||".htm"===scope.selectedNode.parentContent.link.substr(-4)||".html"===scope.selectedNode.parentContent.link.substr(-5)){var iframeSrc=scope.selectedNode.parentContent.link;scope.selectedNode.weblink=$sce.trustAsResourceUrl(iframeSrc)}else if(isMarkdown(scope.selectedNode)){var link=scope.selectedNode.parentContent.link;$http({url:link,method:"GET"}).success(function(data,status,headers,config){mdToHtml(data),scope.selectedNode.waiting=!1}).error(function(data,status,headers,config){scope.selectedNode.waiting=!1})}else scope.selectedNode.showFrame=!1;scope.selectedNode.show=!0,scope.selectedNode.waiting=!1}else if("web.app"===scope.selectedNode.parentContent.resourceType||"folder"===scope.selectedNode.parentContent.resourceType){scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!0;var iframeSrc=scope.selectedNode.parentContent.link;scope.selectedNode.weblink=$sce.trustAsResourceUrl(iframeSrc),scope.selectedNode.waiting=!1}else if("weblink"===scope.selectedNode.parentContent.type){scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!0;var iframeSrc=scope.selectedNode.parentContent.link;scope.selectedNode.weblink=$sce.trustAsResourceUrl(iframeSrc),scope.selectedNode.waiting=!1}else if(null!=scope.selectedNode.parentContent.overviewLink){scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!0;var iframeSrc="content/"+scope.selectedNode.parentContent.overviewLink;iframeSrc=iframeSrc,scope.selectedNode.weblink=$sce.trustAsResourceUrl(iframeSrc),scope.selectedNode.waiting=!1}else scope.selectedNode.showAce=!1,scope.selectedNode.showFrame=!1,scope.selectedNode.waiting=!1;nodeSelectionChanged(scope.selectedNode)}).error(function(data,status,headers,config){})}else scope.selectedNode.parentContent=null,scope.selectedNode.waiting=!1;scope.selectionChanged&&$timeout(function(){scope.selectionChanged(scope.selectedNode)}),nodeSelectionChanged(scope.selectedNode),updateScrollBar()}),tree.bind("open_node.jstree",function(event,data){updateScrollBar(),void 0!==data.node.original.offline&&recurseMarkup(data.node,data)}),scope.$watch("selectedNode.id",function(){var selectedIds=treeElement.jstree("get_selected");if((0==selectedIds.length&&scope.selectedNode.id||1!=selectedIds.length||selectedIds[0]!=scope.selectedNode.id)&&(0!=selectedIds.length&&treeElement.jstree("deselect_node",treeElement.jstree("get_selected")),scope.selectedNode.id)){if(scope.selectedNode.showWelcome)for(var i=0;i<rootNodes.length;i++)if(void 0!=rootNodes[i].text&&-1!=rootNodes[i].text.indexOf(scope.selectedNode.id)){scope.selectedNode.id=rootNodes[i].id;break}treeElement.jstree("select_node",scope.selectedNode.id)}}),scope.$watch("selectedNode.path",function(){if(scope.pathToIdsUrl){var selected=treeElement.jstree("get_selected",!0),prevPath=selected.length?selected[0].a_attr.path:null,newPath=scope.selectedNode.path;1==selected.length&&prevPath==newPath||(newPath?$http.get(scope.pathToIdsUrl,{params:{path:newPath}}).then(function(data){expandAndSelect(data.data)}):scope.selectedNode.id=null)}})})}}}),rexApp.value("ui.config",{uiLayout:{applyDemoStyles:!0,north__size:0,west__size:430,west__resizable:!0,west__slidable:!0,west__spacing_open:3,south__resizable:!0,south__slidable:!0,south__closed:!0,south__spacing_open:3,stateManagement__enabled:!0,stateManagement__autoLoad:!0,stateManagement__autoSave:!0}}),rexApp.directive("uiLayout",["ui.config","$location","$cookieStore","$cookies","LayoutManager",function(uiConfig,$location,$cookieStore,$cookies,LayoutManager){var options=uiConfig.uiLayout||{};return{priority:0,restrict:"EA",compile:function(tElm,tAttrs){if(angular.isUndefined(window.jQuery))throw new Error("ui-jq: Need jQuery, maybe...");if(!angular.isFunction($(tElm).layout))throw new Error("ui-jq: Need jquery.layout, maybe...");return function(scope,iElement,iAttr){options=angular.extend({},options,scope.$eval(tAttrs.uiLayout));var mylayout=$(tElm).layout({applyDemoStyles:!0,north__size:0,west__size:370,west__resizable:!0,west__slidable:!0,west__spacing_open:3,west__onopen:function(){scope.$apply(function(){$location.search("collapsetree",null)})},west__onclose:function(){scope.$apply(function(){$location.search("collapsetree","")})},west__initClosed:!0,west__togglerAlign_closed:"top",west__togglerLength_closed:30,west__spacing_closed:20,west__togglerContent_closed:'<button class="toggleTreeBtn" title="Expand Tree">»</button>',west__togglerLength_open:0,west__childOptions:{north__size:25,north__resizable:!1,north__closable:!1,north__spacing_open:0},south__resizable:!0,south__slidable:!0,south__closed:!0,south__spacing_open:3,south__initClosed:!0,stateManagement__enabled:!0,stateManagement__autoLoad:!0,stateManagement__autoSave:!0});"collapsetree"in $location.search()?mylayout.close("west"):mylayout.open("west"),mylayout.addToggleBtn(".toggleTreeBtn","west"),LayoutManager.setLayout(mylayout)}}}}]),rexApp.directive("uiLayoutCenter",["ui.config",function(uiConfig){return{priority:1,restrict:"EA",transclude:!0,replace:!0,template:'<div class="ui-layout-center"><div class="left-panel-content-container" ng-transclude></div></div>'}}]),rexApp.directive("uiLayoutNorth",["ui.config",function(uiConfig){return{priority:1,restrict:"EA",transclude:!0,replace:!0,template:'<div class="ui-layout-north"><div ng-transclude></div></div>'}}]),rexApp.directive("uiLayoutSouth",["ui.config",function(uiConfig){return{priority:1,restrict:"EA",transclude:!0,replace:!0,template:'<div class="ui-layout-south"><div ng-transclude></div></div>'}}]),rexApp.directive("uiLayoutEast",["ui.config",function(uiConfig){return{priority:1,restrict:"EA",transclude:!0,replace:!0,template:'<div class="ui-layout-east"><div ng-transclude></div></div>'}}]),rexApp.directive("uiLayoutWest",["ui.config",function(uiConfig){return{priority:1,restrict:"EA",transclude:!0,replace:!0,template:'<div class="ui-layout-west"><div ng-transclude></div></div>'}}]),rexApp.directive("focusOn",function($parse){return function(scope,element,attr){var val=$parse(attr.focusOn);scope.$watch(val,function(val){val&&element.focus()})}}),rexApp.directive("select2FocusOn",function($parse,$cookieStore,$http,$cookies,$timeout,$rootScope){return function(scope,element,attr){var val=$parse(attr.select2FocusOn);scope.$watch(val,function(val){val&&$timeout(function(){if(element.select2("focus",!0),void 0!==scope.devtoolId&&null!=scope.devtoolId){var p="#/DevTool/"+scope.devtoolId,selectDevtool=function(){for(var i=0;i<scope.deviceAndDevtool.devtools.length;i++)void 0!==scope.deviceAndDevtool.devtools[i].name&&scope.deviceAndDevtool.devtools[i].name==scope.devtoolId&&(element.select2("data",{id:p,text:scope.devtoolId,image:scope.deviceAndDevtool.devtools[i].image}),element.select2("val",scope.devtoolId))};scope.deviceAndDevtool?selectDevtool():$http({url:"api/devicesanddevtools",method:"GET"}).success(function(data,status,headers,config){scope.deviceAndDevtool=angular.fromJson(data),selectDevtool()})}else if(void 0!==scope.deviceId&&null!=scope.deviceId){var p="#/Device/"+scope.deviceId;element.select2("data",{id:p,text:scope.deviceId}),element.select2("val",scope.deviceId)}else element.tooltip({trigger:"focus",title:"Password tooltip"})},0)})}}),rexApp.directive("disabledImportTooltip",function(){return{link:function(scope,element,attrs){void 0!==scope.c?!scope.isOffline(scope.c)&&scope.isLocalServer():void 0!==scope.selectedTreeNode&&!scope.isOffline(scope.selectedTreeNode.parentContent)&&scope.isLocalServer()}}}),rexApp.directive("offlineDropdown",function($compile){return{link:function(scope,element,attrs){function appendDropdown(elem,node,nodeSrc){if(!(void 0===node||elem.parents(".ng-hide").length>0)){"dropdown"===elem.parent().attr("data-toggle")&&(elem.unwrap(),elem.next().remove(),elem.unwrap()),elem.wrap('<span class="dropdown pull-right"></span>')
+;var strHtml='<ul ng-show="isLocalServer()" class="dropdown-menu"><li><a href="" test_id="make-offline-link" ng-class="{\'disabled-link\':isOffline('+nodeSrc+')}" ng-click="isOffline('+nodeSrc+") || makeOfflineFile("+nodeSrc+')" ng-disabled="isOfflineOrPartial('+nodeSrc+')">Download and install</a></li>';strHtml+='<li><a test_id="remove-offline-link" href="" ng-class="{\'disabled-link\':!isOfflineOrPartial('+nodeSrc+')}" ng-click="!isOfflineOrPartial('+nodeSrc+") || removeOfflineFile("+nodeSrc+')" ng-disabled="!isOfflineOrPartial('+nodeSrc+')">Uninstall</a></li></ul>';var compiledHtml=$compile(strHtml)(scope);elem.after(compiledHtml),elem.wrap('<span data-toggle="dropdown"></span>')}}(0,_serverstate.isLocalServer)().then(function(isLocal){isLocal&&(void 0!==scope.c?appendDropdown(element,scope.c,"c"):scope.$watch("selectedTreeNode.parentContent",function(newValue){void 0!==newValue&&"undefined"==typeof oldValue&&appendDropdown(element,newValue,"selectedTreeNode.parentContent")}))})}}}),rexApp.config(["$tooltipProvider",function($tooltipProvider){$tooltipProvider.setTriggers({placement:"bottom",animation:!0,popupDelay:0,mouseenter:"mouseleave click"})}]);var pageFirstLoad=!0;rexApp.controller("MyController",function($scope,$rootScope,$http,$cookieStore,$cookies,$location,$timeout,$route,$q,$sce,$modal,uuid2,LayoutManager,Util){function compatibilityModalPopup(rejection){$modal.open({backdrop:"static",keyboard:!1,templateUrl:"templates/warning.html",windowClass:"remove-modal-window",scope:$scope,controller:function($scope,$modalInstance){$scope.message=rejection,$scope.title="Connection Rejected",$scope.agree=function(){$modalInstance.close()}}})}$scope.util=Util({$scope:$scope,$q:$q,$cookieStore:$cookieStore,$sce:$sce,uuid2:uuid2,$modal:$modal,$http:$http}),pageFirstLoad&&(pageFirstLoad=!1,function(){function resetState(callback){$http.get("/ide/clearEvent?name=productsChanged").then(function(data,status,headers,config){callback()})}(0,_serverstate.onProductsChanged)(function(callback){(0,_import.installedPackages)($modal,function(modalInstance){modalInstance?modalInstance.result.then(function(){$("#jstree").jstree(!0).refresh(!0,!0),resetState(callback)}):resetState(callback)})})}()),function(){var defer=$q.defer();return $http({url:"api/serverstate",method:"GET"}).success(function(data,status,headers,config){$scope.serverState=angular.fromJson(data),$rootScope.defaultContentPath=$scope.serverState.defaultContentPath,"localserver"===$scope.serverState.serverMode?$("head").append('<link rel="stylesheet" href="stylesheets/rex-desktop.css" type="text/css" />'):$("head").append('<link rel="stylesheet" href="stylesheets/rex-cloud.css" type="text/css" />'),defer.resolve("defer resolved")}),defer.promise}().then(function(){$scope.util.helpers.onLocalServerFirstVisit(function(){$scope.serverState.remoteServerRejected&&compatibilityModalPopup($scope.serverState.remoteServerRejected)}),$scope.areCookiesEnabled=!1;var hamAbout=($("#navMenuToolNameText"),$("#hamAboutHoverBox"));$(window).width()<400&&hamAbout.css("width","270px"),$(window).on("resize",function(){$(window).width()<400?hamAbout.css("width","270px"):hamAbout.css("width","510px")}),$(window).width()<670&&hamAbout.css("width","270px"),$(window).on("resize",function(){$(window).width()<670?hamAbout.css("width","270px"):hamAbout.css("width","510px")}),$scope.showTIToolsMenu=!1,$scope.hideMenuTimeout,$scope.showAppMenu=function(){$(window).width()>720&&(clearInterval($scope.hideMenuTimeout),$scope.showTIToolsMenu=!0)},$scope.hideAppMenu=function(timeout){$(window).width()>720&&($scope.hideMenuTimeout=setInterval(function(){$scope.showTIToolsMenu=!1,clearInterval($scope.hideMenuTimeout),$scope.$digest()},timeout))},$(document).off("click",".disabled-link"),$(document).on("click",".disabled-link",function(e){e.stopPropagation()}),$(document).mouseup(function(e){var needDigest=!1;if($scope.showTIToolsMenu){var container=$("#navMenuLogo");container.is(e.target)||0!==container.has(e.target).length||($scope.showTIToolsMenu=!1,needDigest=!0)}if($scope.showActionHam){if($("#select2-drop-mask").is(e.target))return;if(!0===$scope.showIntro)return;var container=$("#navMenuRightHam");container.is(e.target)||0!==container.has(e.target).length||($scope.showActionHam=!1,needDigest=!0)}needDigest&&$scope.$digest()}),$(".hamHoverBox, #hamAbout, #hamFilter, #hamTour").click(function(e){e.stopPropagation()}),$scope.toggleActionHam=function(){$scope.showActionHam=!$scope.showActionHam,$scope.showHamAbout=!1,$scope.showHamFilter=!1},$scope.toggleHamAbout=function(){$scope.showHamAbout=!$scope.showHamAbout,$scope.showHamFilter=!1,$scope.tirexVersion=$scope.serverState.version},$scope.toggleHamFilter=function(){$scope.showHamFilter=!$scope.showHamFilter,$scope.showHamAbout=!1,$scope.showHamFilter&&$timeout(function(){$scope.openFilterDropDown()},0)},$scope.openFilterDropDown=function(){$scope.packageId?$("#packageFilter-selected").select2("open"):$("#packageFilter").select2("open")},$rootScope.showIntro=!1,$scope.startTour=function(){LayoutManager.expandTree(),$scope.showHamFilter=!0,$rootScope.showIntro=!0,$scope.GuidedTour(),$("#guided-tour-package-images").slick({centerMode:!0,arrows:!0,slidesToScroll:1,autoplay:!0,autoplaySpeed:2e3,variableWidth:!0,nextArrow:".btn-prev",prevArrow:".btn-next"})},$scope.startTourExt=function(){$timeout(function(){angular.element(document.getElementById("hamMenuIcon")).trigger("click"),$scope.startTour()})},$scope.CompletedEvent=function(scope){$route.reload()},$scope.ExitEvent=function(scope){$route.reload()},$scope.ChangeEvent=function(targetElement,scope){},$scope.BeforeChangeEvent=function(targetElement,scope){},$scope.AfterChangeEvent=function(targetElement,scope){},(0,_serverstate.isLocalServer)().then(function(isLocal){$scope.IntroOptions=isLocal?{steps:[{element:document.querySelector("#navMenuDeviceContainer"),intro:"<strong>Guided Tour</strong><br/>Start by selecting your board or device here. This will show resources related to your selection in tree below. You can filter the list of available boards/devices by typing any part of the name in this box.",position:"right"},{element:document.querySelector("#searchinput"),intro:"Search resources in tree containing specified keyword(s).",position:"left"},{element:"#navMenuOffline",intro:"Connect to the cloud server to see all online and offline content. Disconnect from cloud server to only see offline content. ",position:"left"},{element:"#navMenuHome",intro:"Go to home page for access to package level functionality.",position:"left"},{element:"#step5",intro:"<ul><li>Use drop down to select latest or specific package version. Latest always defaults to the newest version.</li><li>Use show checkbox to hide/show package in the tree.</li><li>Use download to install package on local machine.</li></ul>",position:"left"},{element:"#hamMenuIcon",intro:"Use this menu for additional functionalities.",position:"left"},{element:"#navMenuRightHam #hamHoverMenu #mainList #navMenuInstalledPackages",intro:"Scan desktop to import any new available packages. Additional folders to scan can be added from Preferences.",position:"left"},{element:"#step4",intro:"Use this tree to navigate and view the list of resources resulting from your selection and search. <br><br>The three folder icons indicate the following: <br/><ul><li> <a class='icon-size'><img src='icns/folder.gif' height='14'></a> Content has not been installed</li><li> <a class='icon-size'><img src='icns/folder-partial.png' height='14'></a> Some content has been installed and is available offline</li><li> <a class='icon-size'><img src='icns/folder-full.png' height='14'></a> Content is installed and available offline</li></ul>",position:"right"},{element:"#step5",intro:"As you navigate the tree, selected resources will be shown in this pane. You can use buttons available in this pane: <br/><ul><li> <a class='btn btn-info btn-mini icon-size'><img src='icns/ic_laptop_black_24px.svg' height='14'></a> To install resources and make them available offline</li><li> <a class='btn btn-info btn-mini icon-size'><img src='icns/ccs.png' height='14'></a> To import examples into CCStudio</li><li> <a class='btn btn-info btn-mini icon-size'><img src='icns/newwindow.svg' height='14'></a> To open web resources in an external browser</li></ul>",position:"left"}],showStepNumbers:!1,exitOnOverlayClick:!0,exitOnEsc:!0,nextLabel:"<strong>Next</strong>",prevLabel:"<span>Previous</span>",skipLabel:"<strong>Exit</strong>",doneLabel:"Done"}:{steps:[{element:document.querySelector("#navMenuDeviceContainer"),intro:"<strong>Guided Tour</strong><br/>Start by selecting your board or device here. This will show resources related to your selection in tree below. You can filter the list of available boards/devices by typing any part of the name in this box.",position:"right"},{element:document.querySelector("#searchinput"),intro:"Search resources in tree containing specified keyword(s).",position:"left"},{element:"#navMenuPackagePicker",intro:"<ul><li>Use drop down to select latest or specific package version. Latest always defaults to the newest version.</li><li>Use show checkbox to hide/show package in the tree.</li></ul>",position:"left"},{element:"#navMenuHome",intro:"Go to home page for access to package level functionality.",position:"left"},{element:"#hamMenuIcon",intro:"Use this menu for additional functionalities.",position:"left"},{element:"#step4",intro:"Use this tree to navigate and view the list of resources resulting from your selection and search.",position:"right"},{element:"#step5",intro:"As you navigate the tree, selected resources will be shown in this pane. You can use buttons available in this pane: <br/><ul><li> <a class='btn btn-info btn-mini icon-size'><img src='icns/download7.svg' height='14'></a> To download resources to desktop</li><li> <a class='btn btn-info btn-mini icon-size'><img src='icns/cloudCube.svg' height='14'></a> To import examples into CCS cloud</li><li> <a class='btn btn-info btn-mini icon-size'><img src='icns/newwindow.svg' height='14'></a> To open web resources in a new tab</li></ul>",position:"left"}],showStepNumbers:!1,exitOnOverlayClick:!0,exitOnEsc:!0,nextLabel:"<strong>Next</strong>",prevLabel:"<span>Previous</span>",skipLabel:"<strong>Exit</strong>",doneLabel:"Done"}}),$scope.toggleOfflineText=function(){return $scope.serverState.useRemoteContent?"Go Offline":"Go Online"},$scope.cloud=function(){return $scope.serverState.useRemoteContent&&"localserver"===$scope.serverState.serverMode?($scope.placeHolderMessage="Search",!0):($scope.placeHolderMessage="Search",!1)},$scope.toggleStatusIndictator=function(){return $scope.serverState.useRemoteContent?"statusIndicator statusOnline":"statusIndicator statusOffline"},$scope.toggleTooltip=function(){$scope.serverState.useRemoteContent?$scope.tooltipMessage="Click to disconnect from Cloud":$scope.tooltipMessage="Click to connect to Cloud"},$scope.toggleRemoteContent=function(){$scope.serverState.remoteServerRejected?compatibilityModalPopup($scope.serverState.remoteServerRejected):(0,_serverstate.setMode)($scope.serverState.useRemoteContent)},$scope.isLocalServer=function(){return"localserver"===$scope.serverState.serverMode},$scope.downloadTooltip=function(node){if(void 0!==node)return $scope.isLocalServer()?$scope.isOffline(node)?"Uninstall":"Download and install":"Download"},$scope.downloadAllTooltip=function(node){if(void 0!==node)return $scope.isLocalServer()?$scope.isOffline(node)?"Uninstall":"Download and install":"Download"+String.fromCharCode(160)+"All"},$scope.downloadTooltipPlacement=function(){return $scope.isLocalServer()?"left-bottom":"bottom"},$scope.disabledLink=function(node){if($scope.isOffline(node))return"disabled-link"},$scope.downloadIcn=function(){return $scope.isLocalServer()?"icns/ic_laptop_black_24px.svg":"icns/download7.svg"},$scope.importCCStooltip=function(){return $scope.isLocalServer()?"Import"+String.fromCharCode(160)+"to"+String.fromCharCode(160)+"IDE":"Import"+String.fromCharCode(160)+"to"+String.fromCharCode(160)+"CCS"+String.fromCharCode(160)+"cloud"},$scope.importCCSIcn=function(){return $scope.isLocalServer()?"icns/ccs.png":"icns/cloudCube.svg"},$scope.runOfflineTooltip=function(){return"Run"},$scope.runOfflineIcn=function(){return"icns/run.png"},$scope.isOffline=function(node){if(void 0!==node)return!$scope.serverState.useRemoteContent||"true"===node.offline},$scope.isOfflineOrPartial=function(node){if(void 0!==node)return!$scope.serverState.useRemoteContent||!!node.offline},$scope.reloadPage=function(href){window.location=href,window.location.reload()}})})},{"./helpers/offline":325,"./helpers/serverstate":326,"./helpers/util":327,"./ui/import":332,"./ui/offline":333,async:1,"babel-polyfill":2,brace:3,"brace/mode/c_cpp":4,"brace/theme/eclipse":5,"perfect-scrollbar":300}],332:[function(require,module,exports){"use strict";function installedPackages($modal,callback){(0,_util.getLocalPackageChanges)(function(changed){changed.added.length>0?callback(openModal($modal)):callback()})}function openModal($modal){var modalInstance=$modal.open({backdrop:"static",keyboard:!1,templateUrl:"templates/auto-import.html",windowClass:"installedModal",controller:function($scope,$modalInstance,$timeout,$interval){$scope.addedPackagesMessage="Importing",$scope.import=function(){var timerTask=!1;$scope.show_progress=!0,$scope.id=_uuid.uuid2.newuuid(),$scope.progress=0;var timer=$timeout(function(){$scope.waitingMessage="Preparing Download",timerTask=$interval(function(){$http({method:"GET",url:"api/progress/"+$scope.id}).success(function(data,status,headers,config){var res=angular.fromJson(data);206===status||304===status?($scope.progress=res.progress,$scope.waitingMessage=res.message):res.done&&(timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waitingMessage="",modalInstance.close(),(0,_util.goToMainPage)())}).error(function(data,status,headers,config){})},2e3)},1e3);$http({method:"GET",url:"api/packages?importAll&progressId="+$scope.id}).success(function(data,status,headers,config){}).error(function(data,status,headers,config){timerTask&&($interval.cancel(timerTask),timerTask=!1),timer&&($timeout.cancel(timer),timer=!1),$scope.waitingMessage=""})},$scope.import()}});return modalInstance}Object.defineProperty(exports,"__esModule",{value:!0}),exports.installedPackages=installedPackages;var _util=require("../helpers/util"),_uuid=require("../helpers/uuid2"),$http=angular.injector(["ng"]).get("$http")},{"../helpers/util":327,"../helpers/uuid2":328}],333:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function makeOffline(node,$modal,scope,sce,callback){async.waterfall([function(callback){node.allowPartialDownload?callback():confirmWholePackage(node,$modal,{onAgree:callback,onCancel:function(err){callback(err||"early exit")}})},function(callback){node.license?(scope.licenseUrl=sce.trustAsResourceUrl("content/"+node.license),showLicense(node,$modal,{onAgree:callback,onCancel:function(err){callback(err||"early exit")}})):callback()},function(callback){(0,_offline.makeOfflineResource)(node,callback)},function(progressId,callback){$("[test_id=progress-bar-div]").attr("is-processing","true"),(0,_progress.progressBar)($modal,progressId,callback)},function(progressResult,dependencies,callback){$("[test_id=progress-bar-div]").attr("is-processing","false"),dependencies&&dependencies.length>0?Dependencies.handleDependencies(dependencies,$modal,scope,sce,callback):callback(null,progressResult)},function(progressResult,callback){downloadNotifcation(node,$modal,{progressResult:progressResult,onClose:callback})}],function(error){return error&&"early exit"!==error?void downloadNotifcation(node,$modal,{error:error,onClose:function(){callback&&callback(error)}}):callback?callback("early exit"===error?null:error):void 0})}function runOffline(node,$modal,callback){async.waterfall([function(callback){(0,_offline.isOffline)(node).then(function(isOffline){callback(null,isOffline)})},function(isOffline,callback){isOffline?callback():makeOffline(node,$modal,callback)},function(callback){(0,_offline.runOfflineResource)(node,callback)}],callback)}function confirmWholePackage(node,$modal,_ref){var onAgree=_ref.onAgree,onCancel=_ref.onCancel;$modal.open({templateUrl:"templates/confirmation.html",windowClass:"remove-modal-window",controller:function($rootScope,$scope,$modalInstance,$sce){var packageName=node.package,location=localStorage.getItem("installPath"),packageVersion=node.packageUId.substring(node.packageUId.lastIndexOf("__")+2,node.packageUId.length);$scope.message=$sce.trustAsHtml("This will install <b>"+packageName+" - v: "+packageVersion+"</b> in: <br><br> "+location+" <br><br>(Note: Install folder can be changed in preferences)"),$scope.agree=function(){$modalInstance.dismiss("cancel"),onAgree(null)},$scope.disagree=function(){$modalInstance.dismiss("cancel"),onCancel(null)}}})}function showLicense(node,$modal,_ref2){var onAgree=_ref2.onAgree,onCancel=_ref2.onCancel,_ref2$scope=_ref2.scope,scope=void 0===_ref2$scope?null:_ref2$scope,object={templateUrl:"downloadLicense",windowClass:"app-modal-window",controller:function($scope,$modalInstance){$scope.agree=function(){$modalInstance.close(),onAgree(null)},$scope.disagree=function(){$modalInstance.close(),onCancel(null)}}};scope&&(object.scope=scope),$modal.open(object)}function downloadNotifcation(node,$modal,_ref3){var progressResult=_ref3.progressResult,_ref3$error=_ref3.error,error=void 0===_ref3$error?null:_ref3$error,_ref3$onClose=_ref3.onClose,onClose=void 0===_ref3$onClose?null:_ref3$onClose;progressResult===_progress.ProgressResult.SUCCESS||progressResult===_progress.ProgressResult.FAILED?$modal.open({backdrop:"static",keyboard:!1,templateUrl:"templates/notifcation.html",windowClass:"installedModal",controller:function($scope,$modalInstance,$rootScope,$http){error||progressResult===_progress.ProgressResult.FAILED?$scope.message="There was an error in downloading the file. Please try again.":progressResult===_progress.ProgressResult.SUCCESS&&(0,_util.getPackageBundle)(node).then(function(bundle){var filePath=bundle.localPackagePath;$scope.message="Content has been successfully downloaded into "+filePath,$scope.$apply()}),$scope.agree=function(){$modalInstance.dismiss("cancel"),$http({method:"POST",url:"/ide/rediscoverProducts"}).success(function(data,status){$scope.waitingMessage="",$("#jstree").jstree(!0)}).error(function(data,status){console.log("Error")}),onClose&&onClose(error)}}}):error&&_progress.ProgressResult.FAILED&&$modal.open({backdrop:"static",keyboard:!1,templateUrl:"templates/notifcation.html",windowClass:"installedModal",controller:function($scope,$modalInstance){error.code.includes("Incomplete")||error.code.includes("ECONNREFUSED")?$scope.message="Error installing requested package. Check connection and try again.":$scope.message=error,$scope.agree=function(){$modalInstance.dismiss("cancel"),$("#jstree").jstree(!0).refresh(),onClose&&onClose(error)}}})}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();exports.makeOffline=makeOffline,exports.runOffline=runOffline,exports.showLicense=showLicense;var _async=require("async"),async=function(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj}(_async),_util=require("../helpers/util"),_offline=require("../helpers/offline"),_progress=require("./progress"),Dependencies=function(){function Dependencies(){_classCallCheck(this,Dependencies)}return _createClass(Dependencies,null,[{key:"handleDependencies",value:function(dependencies,$modal,scope,sce,callback){async.waterfall([function(callback){Dependencies._confirmDependencies(dependencies,$modal,scope,sce,{onInstall:callback,onCancel:function(err){callback(err||"early exit")}})},function(selectedDependencies,callback){selectedDependencies.length>0?(0,_offline.downloadDependencies)(selectedDependencies,callback):callback("early exit")},function(progressId,callback){(0,_progress.progressBar)($modal,progressId,callback)}],function(err,progressResult){callback("early exit"===progressResult?null:err,progressResult)})}},{key:"_confirmDependencies",value:function(dependencies,$modal,scope,sce,_ref4){var onInstall=_ref4.onInstall,onCancel=_ref4.onCancel;$modal.open({backdrop:"static",keyboard:!1,templateUrl:"templates/dependencies.html",windowClass:"dependencyModal",controller:function($scope,$modalInstance){$scope.dependencies=dependencies,dependencies.sort(function(a,b){return a.require<b.require?-1:a.require>b.require?1:0}),$scope.messageHeader="Additional items have been identified. Select which optional items to install and click OK to continue:",dependencies.map(function(dependency){dependency.isMandatory="mandatory"===dependency.require,dependency.selected=!0,dependency.showDescription=!1,dependency.isMandatory?dependency.requirement="Required":dependency.requirement="Optional"}),$scope.toggleSelection=function(dependency){dependency.isMandatory||(dependency.selected=!dependency.selected)},$scope.install=function(){$modalInstance.dismiss("cancel");var selected=dependencies.filter(function(dependency){return dependency.selected}),licenseDeclined=!1;async.eachSeries(dependencies,function(dependency,callback){var dependencyPackage=scope.packageObj[dependency.id];dependencyPackage?dependencyPackage.selectedPackage.license?(scope.licenseUrl=sce.trustAsResourceUrl("content/"+dependencyPackage.selectedPackage.license),$modal.open({templateUrl:"downloadLicense",windowClass:"app-modal-window",controller:function($scope,$modalInstance){$scope.agree=function(){$modalInstance.close(),callback(null,licenseDeclined)},$scope.disagree=function(){licenseDeclined=!0,$modalInstance.close(),callback(null,licenseDeclined)}}})):callback(null,licenseDeclined):callback(null,!1)},function(err,results){licenseDeclined||err?onCancel(null):onInstall(null,selected)})},$scope.cancel=function(){$modalInstance.dismiss("cancel"),onCancel(null)}}})}}]),Dependencies}()},{"../helpers/offline":325,"../helpers/util":327,"./progress":334,async:1}],334:[function(require,module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function progressBar($modal,progressId){var onDone=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;$modal.open({templateUrl:"templates/progress-bar.html",windowClass:"dependencyModal",backdrop:"static",keyboard:!1,controller:function($scope,$modalInstance){var progressManager=new ProgressManager(progressId);$scope.waitingMessage="Initializing",$scope.cancel=function(){progressManager.cancel()},progressManager.onUpdate(function(data){$scope.progress=data.progress,$scope.waitingMessage=data.message,$scope.$apply()}),progressManager.onDone(function(err,progressResult,result){$modalInstance.close(),onDone&&onDone(progressManager.errorMessage,progressResult,result)}),progressManager.pollProgress()}})}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();exports.progressBar=progressBar;var $http=angular.injector(["ng"]).get("$http"),ProgressResult=exports.ProgressResult={SUCCESS:"success",FAILED:"failed",CANCELED:"canceled",IN_PROGRESS:"in progress"},ProgressManager=function(){function ProgressManager(progressId){_classCallCheck(this,ProgressManager),this.progressId=progressId,this.updateCallbacks=[],this.doneCallbacks=[],this.progressResult=ProgressResult.IN_PROGRESS,this.errorMessage}return _createClass(ProgressManager,[{key:"onUpdate",value:function(callback){this.updateCallbacks.push(callback)}},{key:"onDone",value:function(callback){this.doneCallbacks.push(callback)}},{key:"cancel",value:function(){var _this=this,callback=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;$http.get(this._getCancelUrl()).then(function(data,status,headers,config){_this.progressResult===ProgressResult.IN_PROGRESS&&(_this.progressResult=ProgressResult.CANCELED),callback&&callback()})}},{key:"pollProgress",value:function(err){var _this2=this,_oldStatusCode=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,_result=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;_oldStatusCode||(this.canceled=!1),200!==_oldStatusCode&&this.progressResult===ProgressResult.IN_PROGRESS?$http.get(this._getProgressUri()).then(function(data,status,headers,config){var statusCode=data.status;_this2.updateCallbacks.map(function(onUpdate){onUpdate(data.data)}),_this2.pollProgress(data.data.error,statusCode,data.data.result)}):(this.progressResult===ProgressResult.IN_PROGRESS&&(err?(this.progressResult=ProgressResult.FAILED,this.errorMessage=err):this.progressResult=ProgressResult.SUCCESS),this.doneCallbacks.map(function(onDone){onDone(null,_this2.progressResult,_result)}))}},{key:"_getProgressUri",value:function(){return"api/progress/"+this.progressId}},{key:"_getCancelUrl",value:function(){return this._getProgressUri()+"?cancel=true"}},{key:"_updateProgressResult",value:function(result){this.progressResult===ProgressResult.IN_PROGRESS&&(this.progressResult=result)}}]),ProgressManager}()},{}]},{},[324,325,326,327,328,329,330,331,332,333,334]); \ No newline at end of file
diff --git a/Software/.jxbrowser-data/Cache/f_000014 b/Software/.jxbrowser-data/Cache/f_000014
new file mode 100644
index 000000000..c394538e6
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_000014
@@ -0,0 +1,1144 @@
+<main role="main">
+ <div ng-controller="MyController"
+ ng-intro-options="IntroOptions" ng-intro-method="GuidedTour"
+ ng-intro-oncomplete="CompletedEvent" ng-intro-onexit="ExitEvent"
+ ng-intro-onchange="ChangeEvent" ng-intro-onbeforechange="BeforeChangeEvent"
+ ng-intro-autostart="showIntro">
+ <div class="container-fluid" style="padding:0;margin:0">
+ <header role="nav">
+ <div id="navBar" class="noselect">
+ <div id="navMenuLogo" ng-if="!isLocalServer()"
+ ng-class="showTIToolsMenu?'navMenuListLiActive':'navMenuListLi'" ng-mouseenter="showAppMenu()" ng-click="showTIToolsMenu=!showTIToolsMenu" ng-mouseleave="hideAppMenu(500)">
+ <!-- TI logo image -->
+ <span>
+ <i id="appsIcon" class="material-icons">apps</i>
+ </span>
+ <!-- TI App Drawer -->
+ <div id="tiToolsHoverMenu" ng-show="showTIToolsMenu" class="bubble">
+ <!-- TI Cloud Tools Header -->
+ <div class="tiToolsApp" title="TI Cloud Tools Home Page">
+ <a href="/"><img src="icns/cloud_tools.png" />TI Cloud Tools</a>
+ </div>
+
+ <!-- TI Cloud Apps -->
+ <div class="tiToolsApp" title="Explore Documentation, Examples and Resources for your device">
+ <a href="#/All" ng-click="reloadPage('#/All')"><img src="icns/trex.png"/>Resource Explorer</a>
+ </div>
+ <div class="tiToolsApp" title="Configure device peripherals and pin multiplexing options">
+ <a href="/pinmux/" target="pinmux"><img src="icns/pinmux.png" />TI PinMux</a>
+ </div>
+ <div class="tiToolsApp" title="Edit, Build and download your project to your device">
+ <a href="/ide" target="ccscloud"><img src="icns/ccs_cloud.png" />CCS Cloud IDE</a>
+ </div>
+ <div class="tiToolsApp" title="Check compatibility between LaunchPads and BoosterPacks">
+ <a href="/bpchecker/" target="_self"><img src="icns/bpchecker.png" />BoosterPack Checker</a>
+ </div>
+ <div class="tiToolsApp" title="Explore and interact with other Engineers via forums, videos, and blogs">
+ <a href="http://e2e.ti.com" target="e2e"><img src="icns/launchpad-social-e2e.png" />TI E2E Community</a>
+ </div>
+ <div class="tiToolsApp" title="Explore robust reference design libraries spanning analog, embedded processor and connectivity">
+ <a href="http://www.ti.com/general/docs/refdesignsearch.tsp" target="tidesigns"><img src="icns/TIDesignsLogo.png" style="width:60px;height:auto;padding-top:11px;padding-bottom:12px;" />TI Designs</a>
+ </div>
+ <div class="tiToolsApp" title="TI.com">
+ <a href="http://www.ti.com" target="ti"><img src="icns/ti_logo_red.svg" />TI.com</a>
+ </div>
+ </div>
+ </div>
+ <ul id="navMenuList">
+ <li id="navMenuToolNameContainer" ng-if="!isLocalServer()">
+ <a id="navMenuToolNameText" ng-click="browseAll()" style="padding-right:6px; cursor: pointer;">TI Resource Explorer</a>
+ </li>
+
+ <li test_id="navMenuDeviceContainer" id="navMenuDeviceContainer" class="navMenuListLi">
+ <div class="inner-addon left-addon">
+ <input select2-focus-on="true" ui-select2="deviceDevToolsDropDown"
+ ng-show="!deviceId && !devtoolId" ng-model="deviceDevToolsDropDownmodel"
+ data-placeholder="&nbsp;&nbsp;&nbsp;&nbsp;Select a Device or Board" style="width:380px"
+ onchange="document.location = this.value" />
+ <input ui-select2="deviceDevToolsDropDown" ng-show="deviceId || devtoolId" ng-model="deviceDevToolsDropDownmodel" style="width:380px" onchange="document.location = this.value"/>
+ <span ng-show="!deviceId && !devtoolId" id="searchglass2"class="glyphicon glyphicon-search"> </span>
+ </div>
+ <span ng-show="deviceId || devtoolId" id="searchclear2" class="glyphicon glyphicon-remove-circle" ng-click="browseAll()" ></span>
+ </li>
+ <li id="navMenuRightHam" class="navMenuListLiRight" ng-click="toggleActionHam()">
+ <i id="hamMenuIcon" class="material-icons">menu</i>
+ <!-- the menu -->
+ <div id="hamHoverMenu" ng-show="showActionHam" style="text-align:right;">
+ <ul id="mainList">
+ <li test_id="hamAbout" id="hamAbout" class="link" ng-click="toggleHamAbout()">
+ <i class="glyphicon glyphicon-chevron-left" style="float:left;"></i>
+ <span class="hamMenuText">About</span>
+ <i class="glyphicon glyphicon-question-sign" style="top:2px;padding-left:7px;" aria-hidden="true"></i>
+ <ul test_id="hamAboutHoverBox" id="hamAboutHoverBox" ng-show="showHamAbout" class="hamHoverBox textselect" style="width:510px">
+
+ <div id="aboutMainTextAndImg">
+ <img src="icns/trex.png">
+ <span id="aboutMainText">
+ <u style="font-size:20px">TI Resource Explorer</u>
+ <span style="padding-left:5px">Version: {{tirexVersion}}, includes content from:</span>
+ </span>
+ </div>
+
+ <ul>
+ <li ng-controller="OverviewController" style="cursor: pointer;" ng-click="goToPackage(package.selectedPackage)" ng-repeat="package in packageObj"><strong>{{ package.name }}</strong>:
+ <span ng-repeat="version in package.versions | limitTo:(package.versions.length - 2)"> {{ version }}, </span> <span>{{ package.versions[package.versions.length - 2] }}</span>
+ </li>
+ <!--li ng-repeat="package in packages"><strong>{{package.name}}</strong></li-->
+ </ul>
+
+ <div id="copyrightText">© Copyright <img src="icns/ti_logo_red.svg" style="height:16px;padding:0 1px;"><span style="font-weight:bold;">Texas Instruments</span> 2017. All rights reserved. </div>
+ </ul>
+ </li>
+
+ <li test_id="hamPreference" id="hamPreference" class="link" ng-click="preferenceSelector()">
+ <a href="" ng-click="onPreferencesClicked()">
+ <span class="hamMenuText">Preferences</span>
+ <i class="glyphicon glyphicon-cog" style="top:2px;padding-left:7px;" aria-hidden="true"></i>
+ </a>
+ </li>
+
+ <li id="navMenuInstalledPackages"
+ class="link"
+ ng-click="installedPackages()"
+ async-values="[serverstate.isLocalServer(), serverstate.isInOfflineMode()]"
+ async-show="asyncValues[0] && !asyncValues[1]"
+ async>
+ <a href="">
+ <span class="hamMenuText">Scan Desktop</span>
+ <i class="material-icons" style="font-size: 1.2em; top: 3px; padding-left: 7px;">desktop_windows</i>
+ </a>
+ </li>
+
+ </ul>
+ </div>
+ </li>
+
+ <!-- li id="navMenuTour" class="link" ng-click="startTour()" data-toggle="tooltip" tooltip="Take a Tour" tooltip-placement="bottom">
+ <a href="">
+ <i ng-if="!isLocalServer()" class="glyphicon glyphicon-eye-open" style=" color:white;top:2px;padding-left:7px;" aria-hidden="true"></i>
+ <i ng-if="isLocalServer()" class="glyphicon glyphicon-eye-open" style="top:2px;padding-left:7px;" aria-hidden="true"></i>
+ </a>
+ </li -->
+
+ <li id="navMenuTour" class="link navMenuListLiRight" ng-click="isLocalServer() ? startTourExt() : startTour()" data-toggle="tooltip" tooltip="Take a Tour" tooltip-placement="bottom">
+ <i ng-if="!isLocalServer()" style="color:white; position:relative; top:-0.2em" class="glyphicon glyphicon-eye-open"></i>
+ <i ng-if="isLocalServer()" class="glyphicon glyphicon-eye-open"></i>
+ </li>
+
+ <li test_id="navMenuHome" id="navMenuHome" class="link navMenuListLiRight" ng-click="browseAll()" data-toggle="tooltip" tooltip="Home" tooltip-placement="bottom">
+ <i ng-if="!isLocalServer()" style="color:white; position:relative; top:-0.2em" class="glyphicon glyphicon-home"></i>
+ <i ng-if="isLocalServer()" class="glyphicon glyphicon-home"></i>
+ </li>
+
+ <!--<div id="navMenuBadge" ng-show="isLocalServer() && showBadge" ng-click="badgeDialog()" data-toggle="tooltip" tooltip="New Packages" tooltip-placement="bottom">-->
+ <!--<span class="badge" ng-model="badgeNumber"> {{ badgeNumber }} </span></a>-->
+ <!--</div>-->
+
+ <!-- Pacakge Picker Commented out for local server now since it doesnt work on windows properly -->
+
+ <li ng-if="!isLocalServer()" id="navMenuPackagePicker" class="link" ng-click="packagePicker()" data-toggle="tooltip" tooltip="Package Picker" tooltip-placement="bottom">
+ <i class="material-icons" style="top:-2px;position:relative;">pages</i>
+ </li>
+
+ <li test_id="navMenuOffline" id="navMenuOffline" class="link" style="text-decoration: none !important;"
+ async-values="[serverstate.isLocalServer(), serverstate.isInOfflineMode()]"
+ async-show="asyncValues[0]"
+ ng-click="toggleRemoteContent()"
+ async>
+ <a href="" data-toggle="tooltip" ng-mouseover="toggleTooltip()"
+ tooltip="{{ tooltipMessage }}" tooltip-placement="bottom">
+ <i class="material-icons cloud"
+ style="top:-1px; position: relative;"
+ async-values="[serverstate.isInOfflineMode()]"
+ async-show="!asyncValues[0]"
+ async>
+ cloud_queue </i>
+ <i id="cloudOff" class="material-icons cloud"
+ style="top:-1px; color:red; font-weight:bold; position: relative"
+ async-values="[serverstate.isInOfflineMode()]"
+ async-show="asyncValues[0]"
+ async>
+ cloud_off </i>
+ </a>
+ </li>
+ <!-- div class="statusIndicator" ng-class="toggleStatusIndictator()" aria-hidden="true" ng-if="isLocalServer()"></div-->
+
+ <li id="navMenuSearchContainer" class="navMenuListLiRight" ng-controller="DeviceController">
+ <div class="inner-addon right-addon">
+ <input type="text" ng-model="search"
+ test_id="searchinput"
+ id="searchinput" type="search"
+ class="form-control"
+ placeholder="{{placeHolderMessage}}"
+ ng-keyup="searchTree($event)"
+ >
+ <span id="searchglass" class="glyphicon glyphicon-search" ng-show="!search"></span>
+ <span id="searchclear" class="glyphicon glyphicon-remove-circle"
+ ng-click="clearFilter()" ng-show="search" ></span>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </header>
+
+
+ <script type="text/ng-template" id="importVariantSelection">
+ <!--<div class="modal-header">-->
+ <div class="modal-body">
+ <p>Select the device to import the project for:</p>
+ <form name="myForm">
+ <div ng-repeat="Option in Options">
+ <input type="radio" ng-model="$parent.selectedOption" ng-change="optionClicked(Option)" value="{{Option}}"> {{Option}} </br>
+ </div>
+ </form>
+ </br>
+ <button class="btn btn-primary" ng-click="ok()">OK</button>
+ <button class="btn btn-inverse" ng-click="cancel()">Cancel</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="importEnergiaBoardSelection">
+ <div class="modal-body">
+ <p>Select the device to import the project for:</p>
+ <form name="myForm">
+ <div ng-repeat="Option in Options">
+ <input type="radio" ng-model="$parent.selectedOption" ng-change="optionClicked(Option.id)" value="{{Option.id}}"> {{Option.description}} </br>
+ </div>
+ </form>
+ </br>
+ <button class="btn-info" ng-click="ok()">OK</button>
+ <button class="btn-danger" ng-click="cancel()">Cancel</button>
+ </div>
+ </script>
+
+
+ <script type="text/ng-template" id="downloadLicense">
+ <div class="modal-body">
+ <iframe ng-src="{{licenseUrl}}" height="90%" width="100%"></iframe>
+ <div class="modal-footer">
+ <button class="btn-info" ng-click="agree()">I Have Read And Agree</button>
+ <button class="btn-danger" ng-click="disagree()">Disagree</button>
+ </div>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="removeWarning">
+ <div class="modal-body">
+ <div class="modal-header">
+ <h4>Confirmation</h4>
+ </div>
+ <p>{{message}}</p>
+ <div class="modal-footer" style="margin:0px; padding:10px;">
+ <button class="btn-remove" ng-click="agree()">Yes</button>
+ <button class="btn-exit" ng-click="disagree()">Cancel</button>
+ </div>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="AutoImport">
+ <div class="modal-body">
+ <p>This project resides in the cloud. To use it offline you need a copy of it and its dependencies. Please use the "Install to desktop" button (<img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" style="" height="{{isLocalServer()?16:13}}">), then select the "Download and install" option to install them. After that, click on the "Import to IDE" button again to import the project.</p>
+ <button style="position:relative; left:290px;" class="btn-remove" ng-click="agree()">Ok</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="RunExecutableMessage">
+ <div class="modal-body">
+ <p>This project resides in the cloud. To run it offline you need a copy of it and its dependencies. Please use the "Install to desktop" button (<img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" style="" height="{{isLocalServer()?16:13}}">), then select the "Download and install" option to install them. After that, click on the "Run Locally" button again to run the project.</p>
+ <button style="float:right;" class="btn-remove" ng-click="agree()">Ok</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="importError">
+ <div class="modal-body">
+ <p class="url-wrap">Error importing project. {{errorMessage}}</p>
+ <div class="modal-footer">
+ <button class="btn-remove" ng-click="agree()">Close</button>
+ </div>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="downloadProgress">
+ <div class="modal-body">
+ <div ng-show="show_progress_screen && waitingScreen" style="padding-top: 10px;">
+ <div class="download-message"> {{ waitingMessage }} </div>
+ <div class="progress">
+ <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="{{progress}}" ng-style="{width : ( progress + '%' ) }" >{{progress}}%</div>
+ </div>
+ </div>
+ </div>
+ <div ng-show="show_progress_screen && waitingScreen && showCancel" class="modal-footer">
+ <button type="button" class="btn btn-default" ng-show="showCancel" ng-disabled="!canCancel" ng-click="cancel()">Cancel</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="showFilePath">
+ <div class="modal-header">
+ <h4> Package Location</h4>
+ </div>
+ <div class="modal-body">
+ <p class="text" style="word-wrap: break-word;">Installed locally: {{partialText}}</p>
+ <p class="text" style="word-wrap: break-word;">Installed location: {{filePath}} </p>
+ <div class="modal-footer" style="margin:0px; padding:0px;" >
+ <button class="btn-remove" ng-click="agree()" >Ok</button>
+ </div>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="packagePicker">
+ <div class="modal-body">
+ <div class="panel panel-default">
+ <table class="table table-hover">
+ <tbody>
+ <tr style="background-color:#ebebeb;cursor:auto; font-size:16px">
+ <th>Package</th>
+ <th>Version</th>
+ </tr>
+ <tr ng-repeat="package in packageObj" ng-class="{'checkbox-highlight': package.selected}" ng-click="package.selected = !package.selected; optionToggled(package.selected, package.id)">
+ <td>
+ <div class="checkbox">
+ {{package.name}}
+ </div>
+ </td>
+ <td style="width:180px">
+ <select class="form-control" ng-model="package.selectedVersion" ng-options="version for version in package.versions.slice().reverse()" ng-click="$event.stopPropagation()" ng-change="versionToggled(package.selectedVersion, package.id)">
+ <option> {{ version }} </option>
+ </select>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" ng-click="ok()">OK</button>
+ <button type="button" class="btn btn-default" ng-click="cancel()">Close</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="badgeDialog">
+ <div class="modal-header">
+ New Packages
+ </div>
+ <div class="modal-body" ng-show="{{bool1}}">
+ <div class="info-text">
+ <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
+ <span class="text" ng-model="messageHeader"> {{ messageHeader1 }}</span>
+ </div>
+ <div class="block" style="padding: 10px;"></div>
+ <ul class="list-group">
+ <li class="list-group-item" ng-repeat="package in array1">
+ <span class="name">{{ package }}</span>
+ </li>
+ </ul>
+ </div>
+ <div class="modal-body" ng-show="{{bool2}}">
+ <div class="info-text">
+ <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
+ <span class="text" ng-model="messageHeader"> {{ messageHeader2 }}</span>
+ </div>
+ <div class="block" style="padding: 10px;"></div>
+ <ul class="list-group">
+ <li class="list-group-item" ng-repeat="package in array2">
+ <span class="name">{{ package }}</span>
+ </li>
+ </ul>
+ </div>
+
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" ng-click="ok()">OK</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="packageDependencies">
+ <div class="modal-header">
+ Dependencies
+ </div>
+ <div class="">
+ <div class="info-text">
+ <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
+ <span class="text" ng-model="messageHeader"> {{ messageHeader }}</span>
+ </div>
+ <table class="table table-hover">
+ <tbody>
+ <tr ng-repeat="dependency in dependencies" ng-class="{'checkbox-highlight': dependency.selected}">
+ <td>
+ <div class="checkbox" ng-click="toggleSelection(dependency)" style="width: 92%">
+ <input type="checkbox" ng-disabled="dependency.isDisabled" ng-model="dependency.selected" ng-click="$event.stopPropagation()">
+ <span class="name"> {{ dependency.name }} </span>
+ <span class="version" ng-hide="{{ dependency.version === '' || dependency.version === undefined }}"> - {{ dependency.version }}</span>
+ <span class="name"> ({{dependency.requirement}})</span>
+ <span class="badge" ng-hide="{{ dependency.size === '' || dependency.size === undefined }} "> {{ dependency.size }} </span>
+ </div>
+ <div class="description" data-toggle="tooltip" title="Dependency Information" tooltip-placement="right" ng-click="dependency.showDescription = !dependency.showDescription" ng-hide="{{ dependency.description === '' || dependency.description === undefined }}">
+ <i class="glyphicon glyphicon-list-alt" aria-hidden="true"></i>
+ </div>
+ <div class="description-box">
+ <div class="well nav" ng-hide="!dependency.showDescription"> {{ dependency.description }}</div>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <!-- ng-show="waitingScreen && show_progress_screen"-->
+ <div ng-show="show_progress_screen && waitingScreen" style="padding-top: 10px;">
+ <div class="download-message"> {{ waitingMessage }} </div>
+ <div class="progress">
+ <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="{{ progressBar }}" aria-valuemin="0" aria-valuemax="100" ng-style="{width : ( progressBar + '%' ) }" >{{ progressBar }}%</div>
+ </div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" ng-click="install()" ng-disabled="show_progress_screen">OK</button>
+ <button type="button" class="btn btn-default" ng-click="cancel()" ng-disabled="!canCancel">Cancel</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="progressScreen">
+ <div class="modal-header"> Progress </div>
+ <div class="download-message"> {{ waitingMessage }} </div>
+ <div class="progress">
+ <div class="progress-bar progress-bar-striped active" aria-valuemin="0" aria-valuemax="100" role="progressbar" aria-valuenow="{{ progress }}" aria-valuemin="0" aria-valuemax="100" ng-style="{width : ( progress + '%' ) }" >{{ progress }}%</div>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="installedPackages">
+ <div class="modal-header">
+ Installed Packages
+ </div>
+ <div class="modal-body">
+ <div class="info-text" ng-hide="changesFound">
+ <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
+ <span class="text" ng-model="messageHeader"> {{ messageHeader }}</span>
+ </div>
+ <div class="info-text" ng-hide="importDisabled">
+ <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
+ <span class="text" ng-model="importMessage"> {{ importMessage }}</span>
+ </div>
+ <ul class="list-group" ng-hide="importDisabled">
+ <li class="list-group-item" ng-repeat="package in installed" ng-click="package.showDescription = !package.showDescription">
+ <span class="name">{{ package.name }}</span>
+ <span class="version">- {{ package.version }}</span>
+ <span ng-class="toggleIcn(package)"></span>
+ <span class="message italic"> Local path : {{ package.localPackagePath }}</span>
+ <div class="well" ng-hide="!package.showDescription">{{ package.description }}</div>
+ </li>
+ </ul>
+ <div class="info-text" ng-hide="removeDisabled">
+ <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
+ <span class="text" ng-model="removeMessage"> {{ removeMessage }}</span>
+ </div>
+ <ul class="list-group" ng-hide="removeDisabled">
+ <li class="list-group-item" ng-repeat="package in removedList" ng-click="package.showDescription = !package.showDescription">
+ <span class="name">{{ package.name }}</span>
+ <span class="version">- {{ package.version }}</span>
+ <span ng-class="toggleIcn(package)"></span>
+ <span class="message italic"> Local path : {{ package.localPackagePath }}</span>
+ <div class="well" ng-hide="!package.showDescription">{{ package.description }}</div>
+ </li>
+ </ul>
+ </div>
+ <div ng-show="waiting && show_progress">
+ <div class="download-message"> {{ waitingMessage }} </div>
+ <div class="progress">
+ <div class="progress-bar progress-bar-striped active" aria-valuemin="0" aria-valuemax="100" role="progressbar" aria-valuenow="{{ progress }}" aria-valuemin="0" aria-valuemax="100" ng-style="{width : ( progress + '%' ) }" >{{progress}}%</div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" ng-click="import()" ng-disabled="show_progress || importDisabled">Import</button>
+ <button ng-show="importDisabled || !waiting || !removeDisabled" type="button" class="btn btn-default" ng-click="close()">Cancel</button>
+ </div>
+ </script>
+
+ <script type="text/ng-template" id="preferenceSelector">
+ <div class="modal-body">
+ <div class="modal-header">
+ <div class="text">Settings</div>
+ </div>
+ <ul class="list-group content">
+
+ <li class="list-group-item"
+ async-values="[serverstate.isLocalServer()]"
+ async-show="asyncValues[0]"
+ async>
+ <span style="font-weight: bold;"> Package Folders </span>
+ <br>
+ <ul class="infoList">
+ <li> Specify the folders to scan for installed packages </li>
+ <li> Select the default folder in which to install packages </li>
+ </ul>
+ <table class="scanTable">
+ <th>Path</th>
+ <th>Install Folder</th>
+ <th> </th>
+ <tr ng-repeat="path in folderPaths.getFolderPaths()">
+ <td class="pathCol">
+ {{path}}
+ </td>
+ <td style="width:25%;" class="endCol">
+ <input type="radio" name="installPath" value="{{path}}" ng-click="$parent.setDefaultInstall(path)" ng-model="$parent.defaultInstall" tooltip-placement="bottom" tooltip="Set Default"/>
+ </td>
+ <td style="width:15%;"class="endCol">
+ <button type="button" class="removeBtn btn" ng-click="folderPaths.removeFolderPath(path)"> Remove </button>
+
+ </td>
+ </tr>
+ </table>
+ <div style="margin:0.5em 0 0.5em 0">
+ <input type="text" ng-model="newFolderPath" style="width: 70%;">
+ <button type="button"
+ id="addFolderPath"
+ class="btn btn-default"
+ ng-click="folderPaths.addFolderPath(newFolderPath)"> Add Folder </button>
+ </div>
+ </li>
+ <li class="list-group-item">
+ <span class="device-counter">
+ Show resource count in tree
+ </span>
+ <i class="fa fa-toggle-off"></i>
+ <span test_id="onoffswitch" class="onoffswitch">
+ <label for="onRadio">ON</label>
+ <input id="onRadio" type="radio" value="on" ng-model="switchValue"/>
+ <label test_id="offRadio" for="offRadio">OFF</label>
+ <input id="offRadio" type="radio" value="off" ng-model="switchValue"/>
+ </span>
+ </li>
+ </ul>
+ <div class="modal-footer">
+ <div class="errorBox">{{errMsg}}</div>
+ <button test_id="btn-save" type="button" class="btn btn-default" ng-click="save(installFolder)">Save</button>
+ <button type="button" class="btn btn-default" ng-click="cancel()">Close</button>
+ </div>
+ </div>
+ </script>
+
+ <!-- needed for goolge analytics-->
+ <script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-62823528-1', 'auto');
+ ga('send', 'pageview');
+ </script>
+
+ <div ng-controller="OverviewController" >
+ <ui-layout id="screen" >
+ <div class="progress-bar-div" test_id="progress-bar-div" style="height:0; width:0;"></div>
+ <div id="step4" class="ui-layout-west" ng-show="showTree || deviceId || devtoolId || search"
+ >
+ <div class="ui-layout-north toolbar">
+ <button style="float:right;margin-right:3px" class="toggleTreeBtn" title="Collapse Tree">«</button>
+ </div>
+ <div class="ui-layout-center" id="tree">
+ <div test_id="jstree" jstree id="jstree"
+ style="padding-bottom:10px"
+ selected-node="selectedTreeNode"
+ selected-path="selectedPath"
+ selected-node-changed="nodeChanged"></div>
+ </div>
+ </div>
+
+ <ui-layout-center id="step5" style="height:100%; width: 100%">
+ <div class="left-panel-content">
+ <div ng-show="selectedTreeNode.emptyTree && selectedPath.search != null">
+ </br></br></br>
+ <h4>
+ <strong>No search results found for <span class="text-primary">&ldquo;{{selectedPath.search}}&rdquo;</span> . We are continuously adding more content to Resource Explorer. </strong>
+ </h4>
+ </div>
+
+ <div class="panel panel-default resource-file-display"
+ style="background-color: #ebebeb;"
+ ng-show="selectedTreeNode.parentContent && selectedTreeNode.showAce" >
+ <p/>
+ <table class="table" style="width: 100%;">
+ <tbody>
+ <tr>
+ <th align="center">
+ <img src="icns/new_sketch.gif" ng-show="selectedTreeNode.parentContent.icon == null && selectedTreeNode.parentContent.resourceType == 'project.energia'"/>
+ <img src="icns/new_sketch.gif" ng-show="selectedTreeNode.parentContent.text=='Energia'" />
+ <h1 class="resource-header" style="margin: 0 25px">{{selectedTreeNode.parentContent.text}}</h1>
+ </th>
+ <th valign="center" ng-show="selectedTreeNode.parentContent.description">{{selectedTreeNode.parentContent.description}}</th>
+ <td width="18%" valign="center" align="right" style="padding-right: 24px;">
+ <a ng-click="goUp(selectedTreeNode)"
+ data-toggle="tooltip"
+ tooltip="Up&nbsp;one&nbsp;level"
+ tooltip-placement="bottom"
+ class="btn btn-info btn-mini icon-size"
+ id="{{selectedTreeNode.parentContent.text}}_back"><img src="icns/arrow_back_16.svg" height="12"/></a>
+ <a href="" ng-show="selectedTreeNode.parentContent.importProject" ng-click="import(selectedTreeNode.parentContent)"
+ class="btn btn-info btn-mini icon-size" data-toggle="tooltip" ng-disabled="" tooltip="{{importCCStooltip()}}"
+ tooltip-placement="bottom" id="{{selectedTreeNode.parentContent.name}}_import" disabled-import-tooltip>
+ <img ng-src="{{importCCSIcn()}}" height="{{isLocalServer()?16:12}}" />
+ </a>
+ <a ng-href="" ng-show="selectedTreeNode.parentContent.downloadLink" ng-click="isLocalServer() || downloadFile(selectedTreeNode.parentContent)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{downloadAllTooltip(selectedTreeNode.parentContent)}}" tooltip-placement="{{downloadTooltipPlacement()}}" id="{{selectedTreeNode.parentContent.name}}_download" offline-dropdown>
+ <img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}">
+ </a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <table class="table" style="height:100%; width:100%;">
+ <tbody>
+ <tr>
+ <td valign="center" style="width: 100%">
+ <div style="width: 100%; height: 80vh;" test_id="editor" id="editor">
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div class="panel panel-default resource-file-display" style="background-color: #ebebeb;"
+ ng-show="selectedTreeNode.parentContent && selectedTreeNode.showFrame">
+ <p/>
+ <div class="header-title headerp col-sm-9" id="descContainer">
+ <h1 class="resource-header">{{selectedTreeNode.parentContent.text}}</h1>
+ <span id="descTextContainer" ng-show="selectedTreeNode.parentContent.description" tooltip="{{selectedTreeNode.parentContent.description}}" tooltip-placement="bottom">
+ <strong id="descTextElement">{{selectedTreeNode.parentContent.description}}</strong>
+ </span>
+ <!--&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{{selectedTreeNode.weblink}}-->
+ </div>
+ <div class="headerp text-right col-sm-3">
+ <span ng-if="!isLocalServer()">&nbsp;&nbsp;
+ <a href="{{selectedTreeNode.weblink}}"
+ target="{{selectedTreeNode.parentContent.text}}"
+ class="btn btn-info btn-mini icon-size"
+ data-toggle="tooltip"
+ tooltip="Open in a New tab"
+ tooltip-placement="bottom"
+ id="{{selectedTreeNode.parentContent.text}}_newtab"
+ async>
+ <img src="icns/newwindow.svg" height="12">
+ </a>
+ </span>
+ <span ng-if="isLocalServer()">&nbsp;&nbsp;
+ <a ng-click="openLinkInBrowser(selectedTreeNode.weblink, selectedTreeNode.parentContent.text)"
+ class="btn btn-info btn-mini icon-size"
+ data-toggle="tooltip"
+ tooltip="Open in a default browser"
+ tooltip-placement="bottom"
+ id="{{selectedTreeNode.parentContent.text}}_newtab"
+ async>
+ <img src="icns/newwindow.svg" height="12">
+ </a>
+ </span>
+ <a ng-click="goUp(selectedTreeNode)" data-toggle="tooltip" tooltip="Up one level" tooltip-placement="bottom" class="btn btn-info btn-mini icon-size" id="{{selectedTreeNode.parentContent.text}}_back"><img src="icns/arrow_back_16.svg" height="12"/></a>
+
+ <a ng-click="browserNavigate('back')" ng-if="selectedTreeNode.weblink" data-toggle="tooltip" tooltip="Go back" tooltip-placement="bottom" class="btn btn-info btn-mini icon-size"><i style="color: #696969" class="glyphicon glyphicon-arrow-left" aria-hidden="true"></i></a>
+ <a ng-click="browserNavigate('forward')" ng-if="selectedTreeNode.weblink" data-toggle="tooltip" tooltip="Go forward" tooltip-placement="bottom" class="btn btn-info btn-mini icon-size"><i style="color: #696969" class="glyphicon glyphicon-arrow-right" aria-hidden="true"></i></a>
+
+ <a ng-href="" ng-show="selectedTreeNode.parentContent.downloadLink"
+ class="btn btn-info btn-mini icon-size"
+ data-toggle="tooltip"
+ tooltip="{{downloadTooltip(selectedTreeNode.parentContent)}}"
+ tooltip-placement="{{downloadTooltipPlacement()}}"
+ id="{{selectedTreeNode.parentContent.text}}_download"
+ offline-dropdown
+ async-values="[serverstate.isLocalServer()]"
+ async-click="asyncValues[0] || downloadFile(selectedTreeNode.parentContent)"
+ async><img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}" /></a>
+ </div>
+ <br/>
+ <p/>
+ <iframe test_id="custom-page" id="custom-page" ng-src="{{selectedTreeNode.weblink}}" src="about:blank"
+ style="height: 93%; border: none; background: #FFFFFF;"
+ width="100%" frameborder="0"></iframe>
+ </div>
+
+ <div ng-show="showIntro">
+ <!-- this div is for take a tour, it has to be the same as the package layout code. Have to keep on updating layout code in both places. poor design and needs to be fixed in the future-->
+
+ <img src="images/tirex_logo_256.png" height="130" style="float:right;padding-right:15px;padding-left:30px" />
+ <h2 ng-if="!isLocalServer()" style="margin-top:0px">
+ <strong>Welcome to <span class="text-primary">Resource Explorer</span></strong>
+ </h2>
+ <h2 ng-if="isLocalServer()" style="margin-top:0px">
+ <strong>Welcome to <span class="text-primary">Resource Explorer</span></strong>
+ </h2>
+ <h4>
+ Examples, libraries, executables and documentation for your device and development board
+ </h4>
+ <br>
+ <h3 ng-if="isLocalServer()">Online Viewing</h3>
+ <h4 ng-if="isLocalServer()" ><span class="text-primary">Browse</span> all available software packages using the tree view on the left. For more optimized viewing, select your Device or Development tool first from the dropdown above. You can also select packages and versions below. </h4>
+ <br><br>
+ <div ng-if="isLocalServer()" class="banner"></div>
+ <span ng-if="isLocalServer()" ><br></span>
+ <!--</center>-->
+ <center>
+ <div ng-controller="homePackageController">
+ <h3 ng-if="isLocalServer()" style="text-align:left;">Working Offline</h3>
+ <h4 ng-if="isLocalServer()" style="text-align:left;"><span class="text-primary">Install</span> Individual software packages to your local computer to work offline.</h4>
+ <br>
+ <div class="tile-block">
+ <div class="row" ng-repeat="package in packageObj" ng-class="" ng-click="">
+ <div class="col-md-4 block" style="width: 16em; height: 100%; position: relative;">
+ <div class="checkbox" ng-if="isLocalServer()" style="position: relative; width:10%; float:left; margin-top: -0.5em;">
+ <input type="checkbox" ng-model="package.selected" ng-change="optionToggled2(package.selected, package.id)" ng-click="$event.stopPropagation()">
+ </div>
+ <div ng-if="isLocalServer()" style="position: relative; width:25%; float:left; margin-top:-0.2em;">Show</div>
+ <div class="go-to" ng-click="showFilePath(package)" ng-if="isLocalServer()" style="float:right; text-align: right; cursor: pointer; width:50%; position:relative">
+ <i class="material-icons" ng-show="isPackageOffline(package) === 'full'" style=" color:green; position: relative; float:right; top: -0.2em;">info_outline</i>
+ <i class="material-icons" ng-show="isPackageOffline(package) === 'partial'" style=" color:dark grey; position: relative; float:right; top: -0.2em;">info_outline</i>
+ <i class="material-icons" ng-show="!isPackageOffline(package)" style=" color:#B8B8B8; position: relative; float:right; top: -0.2em;">info_outline</i>
+ </div>
+
+ <div class="container" ng-click="goToPackage(package.selectedPackage)">
+ <img ng-src="content/{{package.selectedPackage.image}}" class="{{package.selectedPackage.image}}"/>
+ </div>
+ <div class="description text-center">
+ <div class="name">{{package.name}}</div>
+ </div>
+ <!-- when it is localserver -->
+ <div class="select-block text-left" ng-if="isLocalServer()">
+ <select class="form-control" ng-model="package.selectedVersion" style="top:1%;" ng-options="version for version in package.versions.slice().reverse()" ng-click="$event.stopPropagation()" ng-change="versionToggled2(package.selectedVersion, package.id)">
+ <option> {{ version }} </option>
+ </select>
+ <div style="margin-bottom: 0.5em;" ng-disabled="!cloud() || isPackageOffline(package) === 'full' " class="btn btn-info btn-mini icon-size" style="top:100%;" ng-click="homemakeOffline(package)">
+ <!--i class="material-icons" style=" font-size: 1.5em;">laptop</i-->
+ <img data-toggle="tooltip" tooltip="Download and install" tooltip-placement="bottom" ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" style="" height="{{isLocalServer()?16:13}}">
+ </div>
+ </div>
+ <!-- when it is remoteserver -->
+ <div class="select-block text-left" ng-if="!isLocalServer()">
+ <div data-toggle="tooltip" tooltip="Download" tooltip-placement="bottom-left" ng-click="homedownload(package)">
+ <!-- button style="width:100%;" class="btn"> <img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}"> Download </button-->
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div>
+ <div ng-show="!showIntro && selectedTreeNode.showWelcome && !selectedTreeNode.show" id="main">
+ <!--<h4><img src="images/arrow-up-red.png" height="50" style="margin-left:50px;vertical-align:baseline">-->
+ <!--<strong><em>Start browsing by selecting your device or development board</em></strong>-->
+ <!--</h4>-->
+ <!--<center>-->
+ <img src="images/tirex_logo_256.png" height="130" style="float:right;padding-right:15px;padding-left:30px" />
+ <h2 ng-if="!isLocalServer()" style="margin-top:0px">
+ <strong>Welcome to <span class="text-primary">Resource Explorer</span></strong>
+ </h2>
+ <h2 ng-if="isLocalServer()" style="margin-top:0px">
+ <strong>Welcome to <span class="text-primary">Resource Explorer</span></strong>
+ </h2>
+ <h4>
+ Examples, libraries, executables and documentation for your device and development board
+ </h4>
+ <br>
+
+ <div class="welcome-page-link"><h4><span class="glyphicon glyphicon-exclamation-sign gi-2x" style="vertical-align: middle; margin-right: 0.2em; color: #f0ad4e; font-size: 1.5em"></span><span style="vertical-align: middle; color: #f0ad4e;">Are you new to Resource Explorer?
+</span></h4>
+ <p>Try the <a ng-click="isLocalServer() ? startTourExt() : startTour()">Quick Tour</a> to help you navigate Resource Explorer.</p>
+ </div>
+ <br>
+ <h4>
+ <div
+ async-values="[serverstate.isInOfflineMode()]"
+ async-show="asyncValues[0]"
+ async>
+ <br> <br>
+ <div test_id="disconnected-warning" class="alert alert-warning">
+ <i class="material-icons">warning</i>
+ <strong>Warning!</strong> Not connected to the cloud server. Working in offline mode.
+ </div>
+ <h4 style="margin-left:6px;"> If you did not want to work offline please see our
+ <a href="http://processors.wiki.ti.com/index.php/Troubleshooting_CCSv7#Resource_Explorer" style="color:#cc0000">troubleshooting guide.</a></h4>
+ <br>
+ </div>
+ </h4>
+ <h3 ng-if="isLocalServer()">Online Viewing</h3>
+ <h4 ng-if="isLocalServer()" ><span class="text-primary">Browse</span> all available software packages using the tree view on the left. For more optimized viewing, select your Device or Development tool first from the dropdown above. You can also select packages and versions below. </h4>
+ <br><br>
+ <div ng-if="isLocalServer()" class="banner"></div>
+ <span ng-if="isLocalServer()" ><br></span>
+ <!--</center>-->
+ <center>
+
+
+ <div ng-controller="homePackageController">
+ <h3 ng-if="isLocalServer()" style="text-align:left;">Working Offline</h3>
+ <h4 ng-if="isLocalServer()" style="text-align:left;"><span class="text-primary">Install</span> Individual software packages to your local computer to work offline.</h4>
+ <br>
+ <!--
+ <div ng-if="isLocalServer()" class="banner" align="right" style="height:3em;">
+ <!-- div class="all">
+ <input type="checkbox" ng-click="selectAll2()" ng-model="isAllSelected" style="margin-right:0.5em; float:left; margin-top: 0px;">
+ <div class="text" style="margin-right:5em; top: -0.25em;" >Select All</div>
+ </div -->
+ <!--
+ <div class="apply-block">
+ <button class="btn btn-secondary" ng-click="ok2()">Apply</button>
+ </div> -->
+ <!-- </div> -->
+
+ <!-- New - Package Tile Layout (Mohammed Baquir) -->
+ <div test_id="tile-block" class="tile-block">
+ <div class="row" ng-repeat="package in packageObj" ng-class="" ng-click="">
+ <div class="col-md-4 block" style="width: 16em; height: 100%; position: relative;">
+ <div class="go-to" ng-click="showFilePath(package)" ng-if="isLocalServer()" style="float:right; text-align: right; cursor: pointer; width:50%; position:relative">
+ <i data-toggle="tooltip" tooltip="Info" tooltip-placement="bottom" class="material-icons" ng-show="isPackageOffline(package) === 'full'" style=" color:green; position: relative; float:right; top: -0.2em;">info_outline</i>
+ <i data-toggle="tooltip" tooltip="Info" tooltip-placement="bottom" class="material-icons" ng-show="isPackageOffline(package) === 'partial'" style=" color:dark grey; position: relative; float:right; top: -0.2em;">info_outline</i>
+ <i data-toggle="tooltip" tooltip="Info" tooltip-placement="bottom" class="material-icons" ng-show="!isPackageOffline(package)" style=" color:#B8B8B8; position: relative; float:right; top: -0.2em;">info_outline</i>
+ </div>
+
+ <div test_id="package-container" class="container" ng-click="goToPackage(package.selectedPackage)">
+ <img ng-src="content/{{package.selectedPackage.image}}" class="{{package.selectedPackage.image}}"/>
+ </div>
+ <div class="description text-center">
+ <div class="name">{{package.name}}</div>
+ </div>
+ <!-- when it is localserver -->
+ <div class="select-block text-left" ng-if="isLocalServer()">
+ <select data-toggle="tooltip" tooltip="Select a package version" tooltip-placement="bottom" class="form-control" ng-model="package.selectedVersion" style="top:1%;" ng-options="version for version in package.versions.slice().reverse()" ng-click="$event.stopPropagation()" ng-change="versionToggled2(package.selectedVersion, package.id)">
+ <option> {{ version }} </option>
+ </select>
+ <div test_id="install-icon" style="margin-bottom: 0.5em;" ng-disabled="!cloud() || isPackageOffline(package) === 'full' " class="btn btn-info btn-mini icon-size" style="top:100%;" ng-click="homemakeOffline(package)">
+ <!--i class="material-icons" style=" font-size: 1.5em;">laptop</i-->
+ <img data-toggle="tooltip" tooltip="Download and install" tooltip-placement="bottom" ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" style="" height="{{isLocalServer()?16:13}}">
+ </div>
+ </div>
+ <!-- when it is remoteserver -->
+ <div class="select-block text-left" ng-if="!isLocalServer()">
+ <div data-toggle="tooltip" tooltip="Download" tooltip-placement="bottom-left" ng-click="homedownload(package)">
+ <!-- button style="width:100%;" class="btn"> <img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}"> Download </button-->
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ </center>
+ <div class="panel panel-default panelp" ng-show="showContent" >
+ <div class="panel-heading"><strong>{{theContent.name}}</strong>
+ </div>
+ <div class="panel-body" style="overflow: auto;">
+ <table>
+ <tr>
+ <td valign="top">
+ <span ng-bind-html="theContent.description | to_trusted" />
+ </td>
+ <td valign="top">
+ <img ng-src="content/{{theContent.image}}" width="150px" title="{{theContent.name}}" />
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </div>
+
+
+ <div class="panel panel-default panelp" ng-show="selectedTreeNode.parentContent && !selectedTreeNode.parentContent.overviewLink && (selectedTreeNode.parentContent.overviewDescription || selectedTreeNode.parentContent.overviewImage )" >
+ <div class="panel-heading"><h1 class="resource-header"><strong>{{selectedTreeNode.parentContent.text}}</strong></h1>
+ </div>
+ <div class="panel-body" style="overflow: auto;">
+ <table>
+ <tr>
+ <td valign="top">
+ <span ng-show="selectedTreeNode.parentContent.overviewDescription !== 'undefined'" ng-bind-html="selectedTreeNode.parentContent.overviewDescription | to_trusted" />
+ </td>
+ <td valign="top">
+ <img ng-if="selectedTreeNode.parentContent.overviewImage" ng-src="content/{{selectedTreeNode.parentContent.overviewImage}}" width="150px" title="{{selectedTreeNode.parentContent.text}}" />
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+
+ <div class="panel panel-default" style="background-color: #ebebeb;" ng-show="selectedTreeNode.parentContent.overviewLink && selectedTreeNode.parentContent.resourceType == 'categoryInfo'">
+ <p/>
+ <div class="headerp col-sm-9" >
+ <h1 class="resource-header">{{selectedTreeNode.parentContent.text}}</h1>
+ <span ng-show="selectedTreeNode.parentContent.description">
+ &nbsp;&nbsp;|&nbsp;&nbsp;<strong>{{selectedTreeNode.parentContent.description}}</strong>
+ </span>
+ <!--&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{{selectedTreeNode.weblink}}-->
+ <span>&nbsp;&nbsp;
+ <a ng-if="!isLocalServer()" href="{{selectedTreeNode.parentContent.overviewLink}}" target="{{selectedTreeNode.parentContent.text}}"
+ class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="Open in a New tab" tooltip-placement="bottom"id="{{selectedTreeNode.parentContent.text}}_newtab"><img src="icns/newwindow.svg" height="12"></a>
+ </span>
+ </div>
+ <div class="headerp text-right col-sm-3">
+ <a ng-click="goUp(selectedTreeNode)" data-toggle="tooltip" tooltip="Up one level" tooltip-placement="bottom" class="btn btn-info btn-mini icon-size" id="{{selectedTreeNode.parentContent.text}}_back"><img src="icns/arrow_back_16.svg" height="12"/></a>
+ <a ng-href="" ng-click="isLocalServer() || downloadFile(selectedTreeNode.parentContent)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{downloadTooltip(selectedTreeNode.parentContent)}}" tooltip-placement="{{downloadTooltipPlacement()}}" id="{{selectedTreeNode.parentContent.text}}_download" offline-dropdown><img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}" /></a>
+ </div>
+ <br/><p/>
+ <iframe ng-src="{{selectedTreeNode.weblink}}" src="about:blank" style="background: #FFFFFF;" width="100%" height="93%" frameborder="0"></iframe>
+ </div>
+
+ <div style="margin-bottom: 30px">
+ <table test_id="file-table" class="table table-hover file-table" ng-show="selectedTreeNode.show && selectedTreeNode.parentContent.overviewLink == null && selectedTreeNode.parentContent.resourceType != 'web.page'" width="100%" >
+ <tbody>
+
+ <!-- Bruce: #12945 - let the color setting done by JS -->
+ <tr style="background-color:{{selectedTreeNode.headerBgColor}}" ng-if="!(selectedTreeNode.parentContent.resourceType=='projectSpec'
+ || selectedTreeNode.parentContent.resourceType=='file'
+ || selectedTreeNode.parentContent.resourceType=='folder.importable'
+ || selectedTreeNode.parentContent.resourceType=='file.executable'
+ || selectedTreeNode.parentContent.resourceType=='executable'
+ || selectedTreeNode.parentContent.resourceType=='project.ccs')">
+ <th align="center">
+ <img src="icns/new_sketch.gif" ng-show="selectedTreeNode.parentContent.icon == null && selectedTreeNode.parentContent.resourceType == 'project.energia'"/>
+ <img src="icns/new_sketch.gif" ng-show="selectedTreeNode.parentContent.text=='Energia'" />
+ <h1 class="resource-header">{{selectedTreeNode.parentContent.text}}</h1></th>
+ <th valign="center">{{selectedTreeNode.parentContent.description}}</th>
+ <td width="18%" valign="center" align="right" style="padding-right: 24px;">
+ <a ng-click="goUp(selectedTreeNode)" data-toggle="tooltip" tooltip="Up one level" tooltip-placement="bottom" class="btn btn-info btn-mini icon-size" id="{{selectedTreeNode.parentContent.text}}_back"><img src="icns/arrow_back_16.svg" height="12"/></a>
+ <a href="" ng-show="selectedTreeNode.parentContent.importProject" ng-click="importEnergia(selectedTreeNode.parentContent.importProject, selectedTreeNode.parentContent.createProject, selectedTreeNode.parentContent.energiaBoards,selectedTreeNode.parentContent)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" ng-disabled="" tooltip="{{importCCStooltip()}}" tooltip-placement="bottom" id="{{selectedTreeNode.parentContent.name}}_import" ><img ng-src="{{importCCSIcn()}}" height="{{isLocalServer()?16:12}}" /></a>
+ <a test_id="download-button" ng-href="" ng-show="selectedTreeNode.parentContent.downloadLink" ng-click="isLocalServer() || downloadFile(selectedTreeNode.parentContent)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{downloadAllTooltip(selectedTreeNode.parentContent)}}" tooltip-placement="{{downloadTooltipPlacement()}}" id="{{selectedTreeNode.parentContent.name}}_download" offline-dropdown><img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}"></a>
+ </td>
+ </tr>
+
+ <!-- Bruce: #12945 - let the color setting done by JS -->
+ <tr style="background-color:{{selectedTreeNode.headerBgColor}}" ng-if="selectedTreeNode.parentContent.resourceType=='projectSpec'
+ || selectedTreeNode.parentContent.resourceType=='project.ccs'
+ || selectedTreeNode.parentContent.resourceType=='folder.importable'
+ || selectedTreeNode.parentContent.resourceType=='file.executable'
+ || selectedTreeNode.parentContent.resourceType=='executable'">
+ <th align="center" style="min-width: 20%">
+ <img src="icns/ccs_proj.gif" ng-show="selectedTreeNode.parentContent.resourceType=='projectSpec' || selectedTreeNode.parentContent.resourceType=='project.ccs'"/>
+ <img src="icns/exec.gif" ng-show="selectedTreeNode.parentContent.resourceType=='file.executable'" />
+ <img src="icns/file.gif" ng-show="selectedTreeNode.parentContent.resourceType=='file'" />
+ <h1 class="resource-header">{{selectedTreeNode.parentContent.text}}</h1>
+ </th>
+ <th valign="center">{{selectedTreeNode.parentContent.description}}</th>
+ <td width="18%" valign="center" align="right" style="padding-right: 24px;">
+ <a ng-click="goUp(selectedTreeNode)" data-toggle="tooltip" tooltip="Up one level" tooltip-placement="bottom" class="btn btn-info btn-mini icon-size" id="{{selectedTreeNode.parentContent.text}}_back"><img src="icns/arrow_back_16.svg" height="12" /></a>
+ <span ng-show="selectedTreeNode.parentContent.importProject && (selectedTreeNode.parentContent.resourceType=='projectSpec' || selectedTreeNode.parentContent.resourceType=='project.ccs')">
+ <a href="" ng-click="import(selectedTreeNode.parentContent)" target="ccscloud" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" ng-disabled="" tooltip="{{importCCStooltip()}}" tooltip-placement="bottom" id="{{selectedTreeNode.parentContent.name}}_import" >
+ <img ng-src="{{importCCSIcn()}}" height="{{isLocalServer()?16:12}}">
+ </a>
+ </span>
+ <span ng-show="selectedTreeNode.parentContent.importProject && selectedTreeNode.parentContent.resourceType=='folder.importable'">
+ <a href="" ng-click="import(selectedTreeNode.parentContent)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" ng-disabled="" tooltip="{{importCCStooltip()}}" tooltip-placement="bottom" id="{{selectedTreeNode.parentContent.name}}_import" >
+ <img ng-src="{{importCCSIcn()}}" height="{{isLocalServer()?16:12}}">
+ </a>
+ </span>
+ <a test_id="download-button" ng-href="" ng-show="selectedTreeNode.parentContent.downloadLink" ng-click="isLocalServer() || downloadFile(selectedTreeNode.parentContent)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{downloadAllTooltip(selectedTreeNode.parentContent)}}" tooltip-placement="{{downloadTooltipPlacement()}}" id="{{selectedTreeNode.parentContent.name}}_download" offline-dropdown><img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}"></a>
+ </td>
+ </tr>
+
+ <tr ng-repeat="c in selectedTreeNode.content" ng-if="c.resourceType=='web.app'" >
+ <td>
+ <a href="" ng-click="openLink(selectedTreeNode, c, 'web.app')">
+ <img src="icns/demo.png" /><span ng-class="markUpIcon(c)" style="width:5px;right:4px"/> {{c.name}}</a>
+ </td>
+ <td valign="center">
+ {{c.description}}
+ </td>
+ <td width="18%" valign="center" align="right" style="padding-right: 24px;">
+ <a ng-href="" test_id="download-button" ng-show="c.downloadLink" ng-click="isLocalServer() || downloadFile(c)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{downloadTooltip(c)}}" tooltip-placement="{{downloadTooltipPlacement()}}" id="{{c.name}}_download" offline-dropdown><img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}"></a>
+ </td>
+ </tr>
+
+ <tr ng-repeat="c in selectedTreeNode.content"
+ ng-if="c.resourceType=='file.executable'">
+ <!-- left area -->
+ <td>
+ <img src="icns/exec.gif" /><span ng-class="markUpIcon(c)"/> {{c.name}}
+ </td>
+
+ <!-- center area -->
+ <td valign="center">
+ {{c.description}}
+ </td>
+
+ <!-- right area -->
+ <td width="18%" valign="center" align="right" style="padding-right: 24px;">
+ <span ng-if="isLocalServer()" class="dropdown pull-right">
+ <a ng-href="" test_id="download-button"
+ ng-click="runOfflineFile(c)"
+ class="btn btn-info btn-mini icon-size dropdown-toggle"
+ data-toggle="tooltip"
+ tooltip="{{runOfflineTooltip(c)}}"
+ tooltip-placement="{{downloadTooltipPlacement()}}"
+ id="{{c.name}}_download" >
+ <img ng-src="{{runOfflineIcn()}}"> </img>
+ </a>
+ <!--
+ <ul ng-show="isLocalServer()" class="dropdown-menu">
+ <li>
+ <a href="" ng-click="util.uiManager.runOffline(c)">
+ <div ng-if="isOfflineOrPartial(c)">
+ Run Locally
+ </div>
+ <div ng-if="!isOfflineOrPartial(c)">
+ Make Offline and Run Locally
+ </div>
+ </a>
+ </li>
+ </ul> -->
+ </span>
+
+ <!-- this seems to appear in a couple of places, we may want to use a directive -->
+ <!-- or something similar to group them all, to make maintaining them easier -->
+ <a ng-href=""
+ test_id="download-button"
+ ng-show="c.downloadLink"
+ ng-click="isLocalServer() || downloadFile(c)"
+ class="btn btn-info btn-mini icon-size"
+ data-toggle="tooltip"
+ tooltip="{{downloadTooltip(c)}}"
+ tooltip-placement="{{downloadTooltipPlacement()}}"
+ id="{{c.name}}_download" offline-dropdown>
+ <img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}">
+ </a>
+ </td>
+ </tr>
+
+ <tr ng-repeat="c in selectedTreeNode.content" ng-if="c.resourceType=='file'" >
+ <td><a href="" ng-click="openLink(selectedTreeNode, c, 'c/asm')">
+ <img src="icns/linker_command_file.gif" ng-show="c.link.lastIndexOf('.cmd')>0"/>
+ <img src="icns/c_file_obj.gif" ng-show="c.link.substr(-2) === '.c'"/>
+ <img src="icns/c_file_obj.gif" ng-show="c.link.substr(-4) === '.cpp'"/>
+ <img src="icns/c_file_obj.gif" ng-show="c.link.substr(-4) === '.ino'"/>
+ <img src="icns/s_file_obj.gif" ng-show="c.link.lastIndexOf('.asm')>0"/>
+ <img src="icns/h_file_obj.gif" ng-show="c.link.substr(-2) === '.h' "/>
+ <img src="icns/link.png" ng-show="c.link.substr(-4) === '.htm' "/>
+ <img src="icns/link.png" ng-show="c.link.substr(-5) === '.html' "/>
+ <img src="icns/pdf.png" ng-show="c.link.lastIndexOf('.pdf')>0"/>
+ <img src="icns/file.gif" ng-show="!(c.link.substr(-2) === '.c' || c.link.substr(-4) === '.cpp' || c.link.lastIndexOf('.ino')>0 || c.link.lastIndexOf('.asm')>0 || c.link.substr(-2) === '.h' || c.link.substr(-4) === '.htm' || c.link.substr(-5) === '.html' || c.link.lastIndexOf('.pdf')>0 || c.link.lastIndexOf('.cmd')>0)"/>
+ <span ng-class="markUpIcon(c)"/>
+ {{c.name}}</a>
+ </td>
+ <td valign="center">{{c.description}}</td>
+ <td width="18%" valign="center" align="right" style="padding-right: 24px;" >
+ <span ng-show="c.importProject" style="display: inline-block;">
+ <a href="" ng-click="import(c)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" ng-disabled="" tooltip="{{importCCStooltip()}}" tooltip-placement="bottom" id="{{c.name}}_import">
+ <img ng-src="{{importCCSIcn()}}" height="{{isLocalServer()?16:12}}" /></a>
+ </span>
+ <!--<a test_id="download-button" ng-href="" ng-show="c.downloadLink" ng-click="isLocalServer() || downloadFile(c)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{downloadTooltip(c)}}" tooltip-placement="{{downloadTooltipPlacement()}}" id="{{c.name}}_download" offline-dropdown><img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}"/></a>-->
+ </td>
+ </tr>
+
+
+ <tr ng-repeat="c in selectedTreeNode.content" ng-if="c.resourceType=='projectSpec' || c.resourceType=='project.ccs' || c.resourceType=='folder.importable'" >
+ <td>
+ <span ng-show="c.type=='folder'">
+ <a href="" ng-click="openLink(selectedTreeNode, c,'proj')"><img src="icns/ccs_proj.gif"><span ng-class="markUpIcon(c)" style="width:5px;right:4px"/> {{c.name}} </a>
+ </span>
+ <span ng-show="c.type!='folder'">
+ <img src="icns/ccs_proj.gif"/><span ng-class="markUpIcon(c)" style="width:5px;right:4px"/> {{c.name}}
+ </span>
+ </td>
+ <td width="63%" valign="center">{{c.description}}</td>
+ <td width="18%" valign="center" align="right" style="padding-right: 24px;">
+ <span ng-show="c.importProject && (c.resourceType=='projectSpec' || c.resourceType=='project.ccs')" style="display: inline-block;">
+ <div>
+ <!--<a href="" ng-click="import(c)" target="ccscloud" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{importCCStooltip()}}" tooltip="{{importCCStooltip()}}" tooltip-placement="bottom" ng-disabled="" id="{{c.name}}_import">-->
+ <!--<img ng-src="{{importCCSIcn()}}" height="{{isLocalServer()?16:12}}"></a>-->
+ </div>
+
+ </span>
+ <span ng-show="c.importProject && c.resourceType=='folder.importable'" >
+ <a href="" ng-click="import(c)" class="btn btn-info btn-mini icon-size" ng-disabled="" tooltip="{{importCCStooltip()}}" tooltip-placement="bottom" id="{{c.name}}_import">
+ <img ng-src="{{importCCSIcn()}}" height="{{isLocalServer()?16:12}}" /></a>
+ </span>
+ <!--<a ng-href="" test_id="download-button" ng-show="c.downloadLink" ng-click="isLocalServer() || downloadFile(c)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{downloadTooltip(c)}}" tooltip-placement="{{downloadTooltipPlacement()}}" id="{{c.name}}_download" offline-dropdown><img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}"/></a>-->
+ </td>
+ </tr>
+
+ <tr ng-repeat="c in selectedTreeNode.content" ng-if="c.resourceType=='overview'" >
+ <td class="jumbotron">
+ <strong>{{c.name}}</strong><hr/>
+ <div ng-bind-html="c.content | to_trusted" /></td>
+ <td width="18%" valign="center">
+ <a ng-href="" test_id="download-button" ng-show="c.downloadLink" ng-click="isLocalServer() || downloadFile(c)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{downloadTooltip(c)}}" tooltip-placement="{{downloadTooltipPlacement()}}" id="{{c.name}}_download" offline-dropdown><img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}"/></a>
+ </td>
+ </tr>
+
+ <tr ng-repeat="c in selectedTreeNode.content" ng-if="c.type=='weblink'" >
+ <td><a href="" ng-click="openLink(selectedTreeNode, c, 'pdf')">
+ <img src="icns/pdf.png" ng-show="c.link.lastIndexOf('.pdf')>0"/>
+ <img src="icns/link.png" ng-show="c.link.lastIndexOf('.pdf')<0"/>
+ <span ng-class="markUpIcon(c)" style="right:7px"/>
+ {{c.name}}</a>
+ </td>
+ <td valign="center">{{c.description}}</td>
+ <!--td width="18%" valign="center"><a href="{{c.downloadLink}}" title="Download"><img src="icns/download16x19.png" height="13"></a OPS: can't download weblinks through the server -->
+ <td width="18%" valign="center" align="right" style="padding-right: 24px;" ><a test_id="download-button" ng-href="" ng-show="c.downloadLink" ng-click="isLocalServer() || downloadFile(c)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{downloadTooltip(c)}}" tooltip-placement="{{downloadTooltipPlacement()}}" id="{{c.name}}_download" offline-dropdown><img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}" /></a>
+ </td>
+ </tr>
+
+ <tr ng-repeat="c in selectedTreeNode.content" ng-if="(c.type=='folder' || c.resourceType=='folder')
+ && !(c.resourceType=='projectSpec' || c.resourceType=='project.ccs' || c.resourceType=='folder.importable')" >
+ <td valign="center">
+ <a href="" ng-click="openLink(selectedTreeNode, c, 'folder')">
+ <img src="icns/folder_closed.gif" ng-if="c.icon == null && c.resourceType!=='project.energia'"/>
+ <img src="icns/new_sketch.gif" ng-if="c.icon == null && c.resourceType == 'project.energia'"/>
+ <img ng-src="content/{{c.icon}}" ng-if="c.icon != null" />
+ <span ng-class="markUpIcon(c)"/>
+ {{c.text}}
+ </a>
+ </td>
+ <td>{{c.description}}</td>
+ <td width="18%" valign="center" align="right" style="padding-right: 24px;" >
+ <a href="" ng-show="c.importProject" ng-click="importEnergia(c.importProject, c.createProject, c.energiaBoards,c)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" ng-disabled="" tooltip="{{importCCStooltip()}}" tooltip-placement="bottom" id="{{c.name}}_import" disabled-import-tooltip>
+ <img ng-src="{{importCCSIcn()}}" height="{{isLocalServer()?16:12}}"/></a>
+ <!--<a test-id="download-button" ng-href="" ng-show="c.downloadLink" ng-click="isLocalServer() || downloadFile(c)" class="btn btn-info btn-mini icon-size" data-toggle="tooltip" tooltip="{{downloadTooltip(c)}}" tooltip-placement="{{downloadTooltipPlacement()}}" id="{{c.name}}_download" offline-dropdown><img ng-src="{{downloadIcn()}}" ng-class="{'grey':isLocalServer()}" height="{{isLocalServer()?16:13}}"/></a>-->
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ </div>
+ </div>
+ </div>
+ </ui-layout-center>
+
+ <div class="ui-layout-south" >
+ <a href="http://www.ti.com/corp/docs/legal/copyright.shtml"
+ name="&lid=EN_US_footer_websitefeedback">&copy; Copyright
+ <span id="copyear">2017</span> -
+ </a> Texas Instruments Incorporated. All rights reserved.
+
+ <div style="float: right; text-align: right;">
+ <div class="social">
+ <span>Follow Us</span> <span><a
+ href="//www.ti.com/facebook" style="color: #000;"
+ name="&lid=EN_US_footer_facebookicon"><img
+ src="//www.ti.com/assets/en/images/homepage/follow-us-facebook.png"
+ alt="Texas Instruments on Facebook" border="0" align="absmiddle" /></a></span>
+ <span><a href="//twitter.com/txinstruments"
+ style="color: #000;" name="&lid=EN_US_footer_twittericon"><img
+ src="//www.ti.com/assets/en/images/homepage/follow-us-twitter.png"
+ alt="Texas Instruments on Twitter" border="0" align="absmiddle" /></a></span>
+ <span><a href="//www.ti.com/linkedin"
+ style="color: #000;" name="&lid=EN_US_footer_linkedin-icon"><img
+ src="//www.ti.com/assets/en/images/homepage/linkedin.png"
+ alt="Texas Instruments on LinkedIn" border="0" align="absmiddle" /></a></span>
+ <span><a
+ href="//plus.google.com/u/0/104292131839044508100/posts?hl=en"
+ style="color: #000;" name="&lid=EN_US_footer_google-icon"><img
+ src="//www.ti.com/assets/en/images/homepage/google.png"
+ alt="Texas Instruments on Google+" border="0" align="absmiddle" /></a></span>
+ <span><a href="http://e2e.ti.com/" style="color: #000;"
+ name="&lid=EN_US_footer_e2e-icon"><img
+ src="//www.ti.com/assets/en/images/homepage/e2e_footer.png"
+ alt="Texas Instruments on e2e" border="0" align="absmiddle" /></a></span>
+ </div>
+ </div>
+ </div>
+
+ </ui-layout>
+
+ </div>
+ </div>
+ </div>
+</main>
+
+
+
diff --git a/Software/.jxbrowser-data/Cache/f_000017 b/Software/.jxbrowser-data/Cache/f_000017
new file mode 100644
index 000000000..cb2c08b32
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_000017
@@ -0,0 +1,83 @@
+(function(){/*
+
+ Copyright The Closure Library Authors.
+ SPDX-License-Identifier: Apache-2.0
+*/
+var m=this||self,n=function(a,b){a=a.split(".");var c=m;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b};var p=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},q=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;return!1};var r=window,t=document,u=function(a,b){t.addEventListener?t.addEventListener(a,b,!1):t.attachEvent&&t.attachEvent("on"+a,b)};var v=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;var w={},x=function(){w.TAGGING=w.TAGGING||[];w.TAGGING[1]=!0};var y=/:[0-9]+$/,A=function(a,b){b&&(b=String(b).toLowerCase());if("protocol"===b||"port"===b)a.protocol=z(a.protocol)||z(r.location.protocol);"port"===b?a.port=String(Number(a.hostname?a.port:r.location.port)||("http"==a.protocol?80:"https"==a.protocol?443:"")):"host"===b&&(a.hostname=(a.hostname||r.location.hostname).replace(y,"").toLowerCase());var c=z(a.protocol);b&&(b=String(b).toLowerCase());switch(b){case "url_no_fragment":b="";a&&a.href&&(b=a.href.indexOf("#"),b=0>b?a.href:a.href.substr(0,
+b));a=b;break;case "protocol":a=c;break;case "host":a=a.hostname.replace(y,"").toLowerCase();break;case "port":a=String(Number(a.port)||("http"==c?80:"https"==c?443:""));break;case "path":a.pathname||a.hostname||x();a="/"==a.pathname.substr(0,1)?a.pathname:"/"+a.pathname;a=a.split("/");a:if(b=a[a.length-1],c=[],Array.prototype.indexOf)b=c.indexOf(b),b="number"==typeof b?b:-1;else{for(var d=0;d<c.length;d++)if(c[d]===b){b=d;break a}b=-1}0<=b&&(a[a.length-1]="");a=a.join("/");break;case "query":a=a.search.replace("?",
+"");break;case "extension":a=a.pathname.split(".");a=1<a.length?a[a.length-1]:"";a=a.split("/")[0];break;case "fragment":a=a.hash.replace("#","");break;default:a=a&&a.href}return a},z=function(a){return a?a.replace(":","").toLowerCase():""},B=function(a){var b=t.createElement("a");a&&(b.href=a);var c=b.pathname;"/"!==c[0]&&(a||x(),c="/"+c);a=b.hostname.replace(y,"");return{href:b.href,protocol:b.protocol,host:b.host,hostname:a,pathname:c,search:b.search,hash:b.hash,port:b.port}};function C(){for(var a=D,b={},c=0;c<a.length;++c)b[a[c]]=c;return b}function E(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";a+=a.toLowerCase()+"0123456789-_";return a+"."}var D,F;function G(a){D=D||E();F=F||C();for(var b=[],c=0;c<a.length;c+=3){var d=c+1<a.length,f=c+2<a.length,e=a.charCodeAt(c),g=d?a.charCodeAt(c+1):0,h=f?a.charCodeAt(c+2):0,k=e>>2;e=(e&3)<<4|g>>4;g=(g&15)<<2|h>>6;h&=63;f||(h=64,d||(g=64));b.push(D[k],D[e],D[g],D[h])}return b.join("")}
+function H(a){function b(k){for(;d<a.length;){var l=a.charAt(d++),M=F[l];if(null!=M)return M;if(!/^[\s\xa0]*$/.test(l))throw Error("Unknown base64 encoding at char: "+l);}return k}D=D||E();F=F||C();for(var c="",d=0;;){var f=b(-1),e=b(0),g=b(64),h=b(64);if(64===h&&-1===f)return c;c+=String.fromCharCode(f<<2|e>>4);64!=g&&(c+=String.fromCharCode(e<<4&240|g>>2),64!=h&&(c+=String.fromCharCode(g<<6&192|h)))}};var I;var N=function(){var a=J,b=K,c=L(),d=function(g){a(g.target||g.srcElement||{})},f=function(g){b(g.target||g.srcElement||{})};if(!c.init){u("mousedown",d);u("keyup",d);u("submit",f);var e=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){b(this);e.call(this)};c.init=!0}},O=function(a,b,c){for(var d=L().decorators,f={},e=0;e<d.length;++e){var g=d[e],h;if(h=!c||g.forms)a:{h=g.domains;var k=a;if(h&&(g.sameHost||k!==t.location.hostname))for(var l=0;l<h.length;l++)if(h[l]instanceof
+RegExp){if(h[l].test(k)){h=!0;break a}}else if(0<=k.indexOf(h[l])){h=!0;break a}h=!1}h&&(h=g.placement,void 0==h&&(h=g.fragment?2:1),h===b&&p(f,g.callback()))}return f},L=function(){var a={};var b=r.google_tag_data;r.google_tag_data=void 0===b?a:b;a=r.google_tag_data;b=a.gl;b&&b.decorators||(b={decorators:[]},a.gl=b);return b};var P=/(.*?)\*(.*?)\*(.*)/,aa=/([^?#]+)(\?[^#]*)?(#.*)?/;function Q(a){return new RegExp("(.*?)(^|&)"+a+"=([^&]*)&?(.*)")}
+var S=function(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];void 0!==d&&d===d&&null!==d&&"[object Object]"!==d.toString()&&(b.push(c),b.push(G(String(d))))}a=b.join("*");return["1",R(a),a].join("*")},R=function(a,b){a=[window.navigator.userAgent,(new Date).getTimezoneOffset(),window.navigator.userLanguage||window.navigator.language,Math.floor((new Date).getTime()/60/1E3)-(void 0===b?0:b),a].join("*");if(!(b=I)){b=Array(256);for(var c=0;256>c;c++){for(var d=c,f=0;8>f;f++)d=d&1?d>>>1^
+3988292384:d>>>1;b[c]=d}}I=b;b=4294967295;for(c=0;c<a.length;c++)b=b>>>8^I[(b^a.charCodeAt(c))&255];return((b^-1)>>>0).toString(36)},ca=function(a){return function(b){var c=B(r.location.href),d=c.search.replace("?","");a:{var f=d.split("&");for(var e=0;e<f.length;e++){var g=f[e].split("=");if("_gl"===decodeURIComponent(g[0]).replace(/\+/g," ")){f=g.slice(1).join("=");break a}}f=void 0}b.query=T(f||"")||{};f=A(c,"fragment");e=f.match(Q("_gl"));b.fragment=T(e&&e[3]||"")||{};a&&ba(c,d,f)}};
+function U(a,b){if(a=Q(a).exec(b)){var c=a[2],d=a[4];b=a[1];d&&(b=b+c+d)}return b}
+var ba=function(a,b,c){function d(e,g){e=U("_gl",e);e.length&&(e=g+e);return e}if(r.history&&r.history.replaceState){var f=Q("_gl");if(f.test(b)||f.test(c))a=A(a,"path"),b=d(b,"?"),c=d(c,"#"),r.history.replaceState({},void 0,""+a+b+c)}},T=function(a){var b=void 0===b?3:b;try{if(a){a:{for(var c=0;3>c;++c){var d=P.exec(a);if(d){var f=d;break a}a=decodeURIComponent(a)}f=void 0}if(f&&"1"===f[1]){var e=f[2],g=f[3];a:{for(f=0;f<b;++f)if(e===R(g,f)){var h=!0;break a}h=!1}if(h){b={};var k=g?g.split("*"):
+[];for(g=0;g<k.length;g+=2)b[k[g]]=H(k[g+1]);return b}}}}catch(l){}};function V(a,b,c,d){function f(k){k=U(a,k);var l=k.charAt(k.length-1);k&&"&"!==l&&(k+="&");return k+h}d=void 0===d?!1:d;var e=aa.exec(c);if(!e)return"";c=e[1];var g=e[2]||"";e=e[3]||"";var h=a+"="+b;d?e="#"+f(e.substring(1)):g="?"+f(g.substring(1));return""+c+g+e}
+function W(a,b){var c="FORM"===(a.tagName||"").toUpperCase(),d=O(b,1,c),f=O(b,2,c);b=O(b,3,c);q(d)&&(d=S(d),c?X("_gl",d,a):Y("_gl",d,a,!1));!c&&q(f)&&(c=S(f),Y("_gl",c,a,!0));for(var e in b)b.hasOwnProperty(e)&&Z(e,b[e],a)}function Z(a,b,c,d){if(c.tagName){if("a"===c.tagName.toLowerCase())return Y(a,b,c,d);if("form"===c.tagName.toLowerCase())return X(a,b,c)}if("string"==typeof c)return V(a,b,c,d)}function Y(a,b,c,d){c.href&&(a=V(a,b,c.href,void 0===d?!1:d),v.test(a)&&(c.href=a))}
+function X(a,b,c){if(c&&c.action){var d=(c.method||"").toLowerCase();if("get"===d){d=c.childNodes||[];for(var f=!1,e=0;e<d.length;e++){var g=d[e];if(g.name===a){g.setAttribute("value",b);f=!0;break}}f||(d=t.createElement("input"),d.setAttribute("type","hidden"),d.setAttribute("name",a),d.setAttribute("value",b),c.appendChild(d))}else"post"===d&&(a=V(a,b,c.action),v.test(a)&&(c.action=a))}}
+var J=function(a){try{a:{for(var b=100;a&&0<b;){if(a.href&&a.nodeName.match(/^a(?:rea)?$/i)){var c=a;break a}a=a.parentNode;b--}c=null}if(c){var d=c.protocol;"http:"!==d&&"https:"!==d||W(c,c.hostname)}}catch(f){}},K=function(a){try{if(a.action){var b=A(B(a.action),"host");W(a,b)}}catch(c){}};n("google_tag_data.glBridge.auto",function(a,b,c,d){N();c="fragment"===c?2:1;a={callback:a,domains:b,fragment:2===c,placement:c,forms:!!d,sameHost:!1};L().decorators.push(a)});n("google_tag_data.glBridge.decorate",function(a,b,c){a=S(a);return Z("_gl",a,b,!!c)});n("google_tag_data.glBridge.generate",S);n("google_tag_data.glBridge.get",function(a,b){var c=ca(!!b);b=L();b.data||(b.data={query:{},fragment:{}},c(b.data));c={};if(b=b.data)p(c,b.query),a&&p(c,b.fragment);return c});})(window);
+(function(){function La(a){var b=1,c;if(a)for(b=0,c=a.length-1;0<=c;c--){var d=a.charCodeAt(c);b=(b<<6&268435455)+d+(d<<14);d=b&266338304;b=0!=d?b^d>>21:b}return b};/*
+
+ Copyright The Closure Library Authors.
+ SPDX-License-Identifier: Apache-2.0
+*/
+var $c=function(a){this.w=a||[]};$c.prototype.set=function(a){this.w[a]=!0};$c.prototype.encode=function(){for(var a=[],b=0;b<this.w.length;b++)this.w[b]&&(a[Math.floor(b/6)]^=1<<b%6);for(b=0;b<a.length;b++)a[b]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(a[b]||0);return a.join("")+"~"};var ha=window.GoogleAnalyticsObject,wa;if(wa=void 0!=ha)wa=-1<(ha.constructor+"").indexOf("String");var Qa;if(Qa=wa){var Za=window.GoogleAnalyticsObject;Qa=Za?Za.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""):""}var gb=Qa||"ga",jd=/^(?:utma\.)?\d+\.\d+$/,kd=/^amp-[\w.-]{22,64}$/,Ba=!1;var vd=new $c;function J(a){vd.set(a)}var Td=function(a){a=Dd(a);a=new $c(a);for(var b=vd.w.slice(),c=0;c<a.w.length;c++)b[c]=b[c]||a.w[c];return(new $c(b)).encode()},Dd=function(a){a=a.get(Gd);ka(a)||(a=[]);return a};var ea=function(a){return"function"==typeof a},ka=function(a){return"[object Array]"==Object.prototype.toString.call(Object(a))},qa=function(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")},D=function(a,b){return 0==a.indexOf(b)},sa=function(a){return a?a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""):""},ra=function(){for(var a=O.navigator.userAgent+(M.cookie?M.cookie:"")+(M.referrer?M.referrer:""),b=a.length,c=O.history.length;0<c;)a+=c--^b++;return[hd()^La(a)&2147483647,Math.round((new Date).getTime()/
+1E3)].join(".")},ta=function(a){var b=M.createElement("img");b.width=1;b.height=1;b.src=a;return b},ua=function(){},K=function(a){if(encodeURIComponent instanceof Function)return encodeURIComponent(a);J(28);return a},L=function(a,b,c,d){try{a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)}catch(e){J(27)}},f=/^[\w\-:/.?=&%!\[\]]+$/,Nd=/^[\w+/_-]+[=]{0,2}$/,be=function(a,b){return E(M.location[b?"href":"search"],a)},E=function(a,b){return(a=a.match("(?:&|#|\\?)"+
+K(b).replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")+"=([^&#]*)"))&&2==a.length?a[1]:""},xa=function(){var a=""+M.location.hostname;return 0==a.indexOf("www.")?a.substring(4):a},de=function(a,b){var c=a.indexOf(b);if(5==c||6==c)if(a=a.charAt(c+b.length),"/"==a||"?"==a||""==a||":"==a)return!0;return!1},ya=function(a,b){var c=M.referrer;if(/^(https?|android-app):\/\//i.test(c)){if(a)return c;a="//"+M.location.hostname;if(!de(c,a))return b&&(b=a.replace(/\./g,"-")+".cdn.ampproject.org",de(c,b))?void 0:
+c}},za=function(a,b){if(1==b.length&&null!=b[0]&&"object"===typeof b[0])return b[0];for(var c={},d=Math.min(a.length+1,b.length),e=0;e<d;e++)if("object"===typeof b[e]){for(var g in b[e])b[e].hasOwnProperty(g)&&(c[g]=b[e][g]);break}else e<a.length&&(c[a[e]]=b[e]);return c};var ee=function(){this.keys=[];this.values={};this.m={}};ee.prototype.set=function(a,b,c){this.keys.push(a);c?this.m[":"+a]=b:this.values[":"+a]=b};ee.prototype.get=function(a){return this.m.hasOwnProperty(":"+a)?this.m[":"+a]:this.values[":"+a]};ee.prototype.map=function(a){for(var b=0;b<this.keys.length;b++){var c=this.keys[b],d=this.get(c);d&&a(c,d)}};var O=window,M=document,va=function(a,b){return setTimeout(a,b)};var F=window,Ea=document,G=function(a){var b=F._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===F["ga-disable-"+a])return!0;try{var c=F.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(g){}a=[];b=String(Ea.cookie||document.cookie).split(";");for(c=0;c<b.length;c++){var d=b[c].split("="),e=d[0].replace(/^\s*|\s*$/g,"");e&&"AMP_TOKEN"==e&&((d=d.slice(1).join("=").replace(/^\s*|\s*$/g,""))&&(d=decodeURIComponent(d)),a.push(d))}for(b=0;b<a.length;b++)if("$OPT_OUT"==a[b])return!0;return Ea.getElementById("__gaOptOutExtension")?
+!0:!1};var Ca=function(a){var b=[],c=M.cookie.split(";");a=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push(e[1])}return b},zc=function(a,b,c,d,e,g,ca){e=G(e)?!1:eb.test(M.location.hostname)||"/"==c&&vc.test(d)?!1:!0;if(!e)return!1;b&&1200<b.length&&(b=b.substring(0,1200));c=a+"="+b+"; path="+c+"; ";g&&(c+="expires="+(new Date((new Date).getTime()+g)).toGMTString()+"; ");d&&"none"!==d&&(c+="domain="+d+";");ca&&(c+=ca+";");d=M.cookie;M.cookie=c;if(!(d=d!=M.cookie))a:{a=
+Ca(a);for(d=0;d<a.length;d++)if(b==a[d]){d=!0;break a}d=!1}return d},Cc=function(a){return encodeURIComponent?encodeURIComponent(a).replace(/\(/g,"%28").replace(/\)/g,"%29"):a},vc=/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/,eb=/(^|\.)doubleclick\.net$/i;var oc,Id=/^.*Version\/?(\d+)[^\d].*$/i,ne=function(){if(void 0!==O.__ga4__)return O.__ga4__;if(void 0===oc){var a=O.navigator.userAgent;if(a){var b=a;try{b=decodeURIComponent(a)}catch(c){}if(a=!(0<=b.indexOf("Chrome"))&&!(0<=b.indexOf("CriOS"))&&(0<=b.indexOf("Safari/")||0<=b.indexOf("Safari,")))b=Id.exec(b),a=11<=(b?Number(b[1]):-1);oc=a}else oc=!1}return oc};var Fa,Ga,fb,Ab,ja=/^https?:\/\/[^/]*cdn\.ampproject\.org\//,Ue=/^(?:www\.|m\.|amp\.)+/,Ub=[],da=function(a){if(ye(a[Kd])){if(void 0===Ab){var b;if(b=(b=De.get())&&b._ga||void 0)Ab=b,J(81)}if(void 0!==Ab)return a[Q]||(a[Q]=Ab),!1}if(a[Kd]){J(67);if(a[ac]&&"cookie"!=a[ac])return!1;if(void 0!==Ab)a[Q]||(a[Q]=Ab);else{a:{b=String(a[W]||xa());var c=String(a[Yb]||"/"),d=Ca(String(a[U]||"_ga"));b=na(d,b,c);if(!b||jd.test(b))b=!0;else if(b=Ca("AMP_TOKEN"),0==b.length)b=!0;else{if(1==b.length&&(b=decodeURIComponent(b[0]),
+"$RETRIEVING"==b||"$OPT_OUT"==b||"$ERROR"==b||"$NOT_FOUND"==b)){b=!0;break a}b=!1}}if(b&&tc(ic,String(a[Na])))return!0}}return!1},ic=function(){Z.D([ua])},tc=function(a,b){var c=Ca("AMP_TOKEN");if(1<c.length)return J(55),!1;c=decodeURIComponent(c[0]||"");if("$OPT_OUT"==c||"$ERROR"==c||G(b))return J(62),!1;if(!ja.test(M.referrer)&&"$NOT_FOUND"==c)return J(68),!1;if(void 0!==Ab)return J(56),va(function(){a(Ab)},0),!0;if(Fa)return Ub.push(a),!0;if("$RETRIEVING"==c)return J(57),va(function(){tc(a,b)},
+1E4),!0;Fa=!0;c&&"$"!=c[0]||(xc("$RETRIEVING",3E4),setTimeout(Mc,3E4),c="");return Pc(c,b)?(Ub.push(a),!0):!1},Pc=function(a,b,c){if(!window.JSON)return J(58),!1;var d=O.XMLHttpRequest;if(!d)return J(59),!1;var e=new d;if(!("withCredentials"in e))return J(60),!1;e.open("POST",(c||"https://ampcid.google.com/v1/publisher:getClientId")+"?key=AIzaSyA65lEHUEizIsNtlbNo-l2K18dT680nsaM",!0);e.withCredentials=!0;e.setRequestHeader("Content-Type","text/plain");e.onload=function(){Fa=!1;if(4==e.readyState){try{200!=
+e.status&&(J(61),Qc("","$ERROR",3E4));var g=JSON.parse(e.responseText);g.optOut?(J(63),Qc("","$OPT_OUT",31536E6)):g.clientId?Qc(g.clientId,g.securityToken,31536E6):!c&&g.alternateUrl?(Ga&&clearTimeout(Ga),Fa=!0,Pc(a,b,g.alternateUrl)):(J(64),Qc("","$NOT_FOUND",36E5))}catch(ca){J(65),Qc("","$ERROR",3E4)}e=null}};d={originScope:"AMP_ECID_GOOGLE"};a&&(d.securityToken=a);e.send(JSON.stringify(d));Ga=va(function(){J(66);Qc("","$ERROR",3E4)},1E4);return!0},Mc=function(){Fa=!1},xc=function(a,b){if(void 0===
+fb){fb="";for(var c=id(),d=0;d<c.length;d++){var e=c[d];if(zc("AMP_TOKEN",encodeURIComponent(a),"/",e,"",b)){fb=e;return}}}zc("AMP_TOKEN",encodeURIComponent(a),"/",fb,"",b)},Qc=function(a,b,c){Ga&&clearTimeout(Ga);b&&xc(b,c);Ab=a;b=Ub;Ub=[];for(c=0;c<b.length;c++)b[c](a)},ye=function(a){a:{if(ja.test(M.referrer)){var b=M.location.hostname.replace(Ue,"");b:{var c=M.referrer;c=c.replace(/^https?:\/\//,"");var d=c.replace(/^[^/]+/,"").split("/"),e=d[2];d=(d="s"==e?d[3]:e)?decodeURIComponent(d):d;if(!d){if(0==
+c.indexOf("xn--")){c="";break b}(c=c.match(/(.*)\.cdn\.ampproject\.org\/?$/))&&2==c.length&&(d=c[1].replace(/-/g,".").replace(/\.\./g,"-"))}c=d?d.replace(Ue,""):""}(d=b===c)||(c="."+c,d=b.substring(b.length-c.length,b.length)===c);if(d){b=!0;break a}else J(78)}b=!1}return b&&!1!==a};var bd=function(a){return(a?"https:":Ba||"https:"==M.location.protocol?"https:":"http:")+"//www.google-analytics.com"},Da=function(a){this.name="len";this.message=a+"-8192"},ba=function(a,b,c){c=c||ua;if(2036>=b.length)wc(a,b,c);else if(8192>=b.length)x(a,b,c)||wd(a,b,c)||wc(a,b,c);else throw ge("len",b.length),new Da(b.length);},pe=function(a,b,c,d){d=d||ua;wd(a+"?"+b,"",d,c)},wc=function(a,b,c){var d=ta(a+"?"+b);d.onload=d.onerror=function(){d.onload=null;d.onerror=null;c()}},wd=function(a,b,c,
+d){var e=O.XMLHttpRequest;if(!e)return!1;var g=new e;if(!("withCredentials"in g))return!1;a=a.replace(/^http:/,"https:");g.open("POST",a,!0);g.withCredentials=!0;g.setRequestHeader("Content-Type","text/plain");g.onreadystatechange=function(){if(4==g.readyState){if(d)try{var ca=g.responseText;if(1>ca.length)ge("xhr","ver","0"),c();else if("1"!=ca.charAt(0))ge("xhr","ver",String(ca.length)),c();else if(3<d.count++)ge("xhr","tmr",""+d.count),c();else if(1==ca.length)c();else{var l=ca.charAt(1);if("d"==
+l)pe("https://stats.g.doubleclick.net/j/collect",d.U,d,c);else if("g"==l){wc("https://www.google.%/ads/ga-audiences".replace("%","com"),d.google,c);var k=ca.substring(2);k&&(/^[a-z.]{1,6}$/.test(k)?wc("https://www.google.%/ads/ga-audiences".replace("%",k),d.google,ua):ge("tld","bcc",k))}else ge("xhr","brc",l),c()}}catch(w){ge("xhr","rsp"),c()}else c();g=null}};g.send(b);return!0},x=function(a,b,c){return O.navigator.sendBeacon?O.navigator.sendBeacon(a,b)?(c(),!0):!1:!1},ge=function(a,b,c){1<=100*
+Math.random()||G("?")||(a=["t=error","_e="+a,"_v=j81","sr=1"],b&&a.push("_f="+b),c&&a.push("_m="+K(c.substring(0,100))),a.push("aip=1"),a.push("z="+hd()),wc(bd(!0)+"/u/d",a.join("&"),ua))};var qc=function(){return O.gaData=O.gaData||{}},h=function(a){var b=qc();return b[a]=b[a]||{}};var Ha=function(){this.M=[]};Ha.prototype.add=function(a){this.M.push(a)};Ha.prototype.D=function(a){try{for(var b=0;b<this.M.length;b++){var c=a.get(this.M[b]);c&&ea(c)&&c.call(O,a)}}catch(d){}b=a.get(Ia);b!=ua&&ea(b)&&(a.set(Ia,ua,!0),setTimeout(b,10))};function Ja(a){if(100!=a.get(Ka)&&La(P(a,Q))%1E4>=100*R(a,Ka))throw"abort";}function Ma(a){if(G(P(a,Na)))throw"abort";}function Oa(){var a=M.location.protocol;if("http:"!=a&&"https:"!=a)throw"abort";}
+function Pa(a){try{O.navigator.sendBeacon?J(42):O.XMLHttpRequest&&"withCredentials"in new O.XMLHttpRequest&&J(40)}catch(c){}a.set(ld,Td(a),!0);a.set(Ac,R(a,Ac)+1);var b=[];ue.map(function(c,d){d.F&&(c=a.get(c),void 0!=c&&c!=d.defaultValue&&("boolean"==typeof c&&(c*=1),b.push(d.F+"="+K(""+c))))});!1===a.get(xe)&&b.push("npa=1");b.push("z="+Bd());a.set(Ra,b.join("&"),!0)}
+function Sa(a){var b=P(a,fa);!b&&a.get(Vd)&&(b="beacon");var c=P(a,gd),d=P(a,oe),e=c||(d?d+"/3":bd(!1)+"/collect");switch(P(a,ad)){case "d":e=c||(d?d+"/32":bd(!1)+"/j/collect");b=a.get(qe)||void 0;pe(e,P(a,Ra),b,a.Z(Ia));break;case "b":e=c||(d?d+"/31":bd(!1)+"/r/collect");default:b?(c=P(a,Ra),d=(d=a.Z(Ia))||ua,"image"==b?wc(e,c,d):"xhr"==b&&wd(e,c,d)||"beacon"==b&&x(e,c,d)||ba(e,c,d)):ba(e,P(a,Ra),a.Z(Ia))}e=P(a,Na);e=h(e);b=e.hitcount;e.hitcount=b?b+1:1;e=P(a,Na);delete h(e).pending_experiments;
+a.set(Ia,ua,!0)}function Hc(a){qc().expId&&a.set(Nc,qc().expId);qc().expVar&&a.set(Oc,qc().expVar);var b=P(a,Na);if(b=h(b).pending_experiments){var c=[];for(d in b)b.hasOwnProperty(d)&&b[d]&&c.push(encodeURIComponent(d)+"."+encodeURIComponent(b[d]));var d=c.join("!")}else d=void 0;d&&a.set(m,d,!0)}function cd(){if(O.navigator&&"preview"==O.navigator.loadPurpose)throw"abort";}function yd(a){var b=O.gaDevIds;ka(b)&&0!=b.length&&a.set("&did",b.join(","),!0)}
+function vb(a){if(!a.get(Na))throw"abort";};var hd=function(){return Math.round(2147483647*Math.random())},Bd=function(){try{var a=new Uint32Array(1);O.crypto.getRandomValues(a);return a[0]&2147483647}catch(b){return hd()}};function Ta(a){var b=R(a,Ua);500<=b&&J(15);var c=P(a,Va);if("transaction"!=c&&"item"!=c){c=R(a,Wa);var d=(new Date).getTime(),e=R(a,Xa);0==e&&a.set(Xa,d);e=Math.round(2*(d-e)/1E3);0<e&&(c=Math.min(c+e,20),a.set(Xa,d));if(0>=c)throw"abort";a.set(Wa,--c)}a.set(Ua,++b)};var Ya=function(){this.data=new ee};Ya.prototype.get=function(a){var b=$a(a),c=this.data.get(a);b&&void 0==c&&(c=ea(b.defaultValue)?b.defaultValue():b.defaultValue);return b&&b.Z?b.Z(this,a,c):c};var P=function(a,b){a=a.get(b);return void 0==a?"":""+a},R=function(a,b){a=a.get(b);return void 0==a||""===a?0:Number(a)};Ya.prototype.Z=function(a){return(a=this.get(a))&&ea(a)?a:ua};
+Ya.prototype.set=function(a,b,c){if(a)if("object"==typeof a)for(var d in a)a.hasOwnProperty(d)&&ab(this,d,a[d],c);else ab(this,a,b,c)};var ab=function(a,b,c,d){if(void 0!=c)switch(b){case Na:wb.test(c)}var e=$a(b);e&&e.o?e.o(a,b,c,d):a.data.set(b,c,d)};var ue=new ee,ve=[],bb=function(a,b,c,d,e){this.name=a;this.F=b;this.Z=d;this.o=e;this.defaultValue=c},$a=function(a){var b=ue.get(a);if(!b)for(var c=0;c<ve.length;c++){var d=ve[c],e=d[0].exec(a);if(e){b=d[1](e);ue.set(b.name,b);break}}return b},yc=function(a){var b;ue.map(function(c,d){d.F==a&&(b=d)});return b&&b.name},S=function(a,b,c,d,e){a=new bb(a,b,c,d,e);ue.set(a.name,a);return a.name},cb=function(a,b){ve.push([new RegExp("^"+a+"$"),b])},T=function(a,b,c){return S(a,b,c,void 0,db)},db=function(){};var hb=T("apiVersion","v"),ib=T("clientVersion","_v");S("anonymizeIp","aip");var jb=S("adSenseId","a"),Va=S("hitType","t"),Ia=S("hitCallback"),Ra=S("hitPayload");S("nonInteraction","ni");S("currencyCode","cu");S("dataSource","ds");var Vd=S("useBeacon",void 0,!1),fa=S("transport");S("sessionControl","sc","");S("sessionGroup","sg");S("queueTime","qt");var Ac=S("_s","_s");S("screenName","cd");var kb=S("location","dl",""),lb=S("referrer","dr"),mb=S("page","dp","");S("hostname","dh");
+var nb=S("language","ul"),ob=S("encoding","de");S("title","dt",function(){return M.title||void 0});cb("contentGroup([0-9]+)",function(a){return new bb(a[0],"cg"+a[1])});var pb=S("screenColors","sd"),qb=S("screenResolution","sr"),rb=S("viewportSize","vp"),sb=S("javaEnabled","je"),tb=S("flashVersion","fl");S("campaignId","ci");S("campaignName","cn");S("campaignSource","cs");S("campaignMedium","cm");S("campaignKeyword","ck");S("campaignContent","cc");
+var ub=S("eventCategory","ec"),xb=S("eventAction","ea"),yb=S("eventLabel","el"),zb=S("eventValue","ev"),Bb=S("socialNetwork","sn"),Cb=S("socialAction","sa"),Db=S("socialTarget","st"),Eb=S("l1","plt"),Fb=S("l2","pdt"),Gb=S("l3","dns"),Hb=S("l4","rrt"),Ib=S("l5","srt"),Jb=S("l6","tcp"),Kb=S("l7","dit"),Lb=S("l8","clt"),Ve=S("l9","_gst"),We=S("l10","_gbt"),Xe=S("l11","_cst"),Ye=S("l12","_cbt"),Mb=S("timingCategory","utc"),Nb=S("timingVar","utv"),Ob=S("timingLabel","utl"),Pb=S("timingValue","utt");
+S("appName","an");S("appVersion","av","");S("appId","aid","");S("appInstallerId","aiid","");S("exDescription","exd");S("exFatal","exf");var Nc=S("expId","xid"),Oc=S("expVar","xvar"),m=S("exp","exp"),Rc=S("_utma","_utma"),Sc=S("_utmz","_utmz"),Tc=S("_utmht","_utmht"),Ua=S("_hc",void 0,0),Xa=S("_ti",void 0,0),Wa=S("_to",void 0,20);cb("dimension([0-9]+)",function(a){return new bb(a[0],"cd"+a[1])});cb("metric([0-9]+)",function(a){return new bb(a[0],"cm"+a[1])});S("linkerParam",void 0,void 0,Bc,db);
+var Ze=T("_cd2l",void 0,!1),ld=S("usage","_u"),Gd=S("_um");S("forceSSL",void 0,void 0,function(){return Ba},function(a,b,c){J(34);Ba=!!c});var ed=S("_j1","jid"),ia=S("_j2","gjid");cb("\\&(.*)",function(a){var b=new bb(a[0],a[1]),c=yc(a[0].substring(1));c&&(b.Z=function(d){return d.get(c)},b.o=function(d,e,g,ca){d.set(c,g,ca)},b.F=void 0);return b});
+var Qb=T("_oot"),dd=S("previewTask"),Rb=S("checkProtocolTask"),md=S("validationTask"),Sb=S("checkStorageTask"),Uc=S("historyImportTask"),Tb=S("samplerTask"),Vb=S("_rlt"),Wb=S("buildHitTask"),Xb=S("sendHitTask"),Vc=S("ceTask"),zd=S("devIdTask"),Cd=S("timingTask"),Ld=S("displayFeaturesTask"),oa=S("customTask"),V=T("name"),Q=T("clientId","cid"),n=T("clientIdTime"),xd=T("storedClientId"),Ad=S("userId","uid"),Na=T("trackingId","tid"),U=T("cookieName",void 0,"_ga"),W=T("cookieDomain"),Yb=T("cookiePath",
+void 0,"/"),Zb=T("cookieExpires",void 0,63072E3),Hd=T("cookieUpdate",void 0,!0),Be=T("cookieFlags",void 0,""),$b=T("legacyCookieDomain"),Wc=T("legacyHistoryImport",void 0,!0),ac=T("storage",void 0,"cookie"),bc=T("allowLinker",void 0,!1),cc=T("allowAnchor",void 0,!0),Ka=T("sampleRate","sf",100),dc=T("siteSpeedSampleRate",void 0,1),ec=T("alwaysSendReferrer",void 0,!1),I=T("_gid","_gid"),la=T("_gcn"),Kd=T("useAmpClientId"),ce=T("_gclid"),fe=T("_gt"),he=T("_ge",void 0,7776E6),ie=T("_gclsrc"),je=T("storeGac",
+void 0,!0),oe=S("_x_19"),gd=S("transportUrl"),Md=S("_r","_r"),qe=S("_dp"),ad=S("_jt",void 0,"n"),Ud=S("allowAdFeatures",void 0,!0),xe=S("allowAdPersonalizationSignals",void 0,!0);function X(a,b,c,d){b[a]=function(){try{return d&&J(d),c.apply(this,arguments)}catch(e){throw ge("exc",a,e&&e.name),e;}}};var Od=function(){this.V=100;this.$=this.fa=!1;this.oa="detourexp";this.groups=1},Ed=function(a){var b=new Od,c;if(b.fa&&b.$)return 0;b.$=!0;if(a){if(b.oa&&void 0!==a.get(b.oa))return R(a,b.oa);if(0==a.get(dc))return 0}if(0==b.V)return 0;void 0===c&&(c=Bd());return 0==c%b.V?Math.floor(c/b.V)%b.groups+1:0};function fc(){var a,b;if((b=(b=O.navigator)?b.plugins:null)&&b.length)for(var c=0;c<b.length&&!a;c++){var d=b[c];-1<d.name.indexOf("Shockwave Flash")&&(a=d.description)}if(!a)try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=e.GetVariable("$version")}catch(g){}if(!a)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),a="WIN 6,0,21,0",e.AllowScriptAccess="always",a=e.GetVariable("$version")}catch(g){}if(!a)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),a=e.GetVariable("$version")}catch(g){}a&&
+(e=a.match(/[\d]+/g))&&3<=e.length&&(a=e[0]+"."+e[1]+" r"+e[2]);return a||void 0};var aa=function(a){var b=Math.min(R(a,dc),100);return La(P(a,Q))%100>=b?!1:!0},gc=function(a){var b={};if(Ec(b)||Fc(b)){var c=b[Eb];void 0==c||Infinity==c||isNaN(c)||(0<c?(Y(b,Gb),Y(b,Jb),Y(b,Ib),Y(b,Fb),Y(b,Hb),Y(b,Kb),Y(b,Lb),Y(b,Ve),Y(b,We),Y(b,Xe),Y(b,Ye),va(function(){a(b)},10)):L(O,"load",function(){gc(a)},!1))}},Ec=function(a){var b=O.performance||O.webkitPerformance;b=b&&b.timing;if(!b)return!1;var c=b.navigationStart;if(0==c)return!1;a[Eb]=b.loadEventStart-c;a[Gb]=b.domainLookupEnd-b.domainLookupStart;
+a[Jb]=b.connectEnd-b.connectStart;a[Ib]=b.responseStart-b.requestStart;a[Fb]=b.responseEnd-b.responseStart;a[Hb]=b.fetchStart-c;a[Kb]=b.domInteractive-c;a[Lb]=b.domContentLoadedEventStart-c;a[Ve]=N.L-c;a[We]=N.ya-c;O.google_tag_manager&&O.google_tag_manager._li&&(b=O.google_tag_manager._li,a[Xe]=b.cst,a[Ye]=b.cbt);return!0},Fc=function(a){if(O.top!=O)return!1;var b=O.external,c=b&&b.onloadT;b&&!b.isValidLoadTime&&(c=void 0);2147483648<c&&(c=void 0);0<c&&b.setPageReadyTime();if(void 0==c)return!1;
+a[Eb]=c;return!0},Y=function(a,b){var c=a[b];if(isNaN(c)||Infinity==c||0>c)a[b]=void 0},Fd=function(a){return function(b){if("pageview"==b.get(Va)&&!a.I){a.I=!0;var c=aa(b),d=0<E(P(b,kb),"gclid").length;(c||d)&&gc(function(e){c&&a.send("timing",e);d&&a.send("adtiming",e)})}}};var hc=!1,mc=function(a){if("cookie"==P(a,ac)){if(a.get(Hd)||P(a,xd)!=P(a,Q)){var b=1E3*R(a,Zb);ma(a,Q,U,b)}(a.get(Hd)||uc(a)!=P(a,I))&&ma(a,I,la,864E5);if(a.get(je)){var c=P(a,ce);if(c){var d=Math.min(R(a,he),1E3*R(a,Zb));d=Math.min(d,1E3*R(a,fe)+d-(new Date).getTime());a.data.set(he,d);b={};var e=P(a,fe),g=P(a,ie),ca=kc(P(a,Yb)),l=lc(P(a,W)),k=P(a,Na);a=P(a,Be);g&&"aw.ds"!=g?b&&(b.ua=!0):(c=["1",e,Cc(c)].join("."),0<d&&(b&&(b.ta=!0),zc("_gac_"+Cc(k),c,ca,l,k,d,a)));le(b)}}else J(75)}},ma=function(a,
+b,c,d){var e=nd(a,b);if(e){c=P(a,c);var g=kc(P(a,Yb)),ca=lc(P(a,W)),l=P(a,Be),k=P(a,Na);if("auto"!=ca)zc(c,e,g,ca,k,d,l)&&(hc=!0);else{J(32);for(var w=id(),Ce=0;Ce<w.length;Ce++)if(ca=w[Ce],a.data.set(W,ca),e=nd(a,b),zc(c,e,g,ca,k,d,l)){hc=!0;return}a.data.set(W,"auto")}}},uc=function(a){var b=Ca(P(a,la));return Xd(a,b)},nc=function(a){if("cookie"==P(a,ac)&&!hc&&(mc(a),!hc))throw"abort";},Yc=function(a){if(a.get(Wc)){var b=P(a,W),c=P(a,$b)||xa(),d=Xc("__utma",c,b);d&&(J(19),a.set(Tc,(new Date).getTime(),
+!0),a.set(Rc,d.R),(b=Xc("__utmz",c,b))&&d.hash==b.hash&&a.set(Sc,b.R))}},nd=function(a,b){b=Cc(P(a,b));var c=lc(P(a,W)).split(".").length;a=jc(P(a,Yb));1<a&&(c+="-"+a);return b?["GA1",c,b].join("."):""},Xd=function(a,b){return na(b,P(a,W),P(a,Yb))},na=function(a,b,c){if(!a||1>a.length)J(12);else{for(var d=[],e=0;e<a.length;e++){var g=a[e];var ca=g.split(".");var l=ca.shift();("GA1"==l||"1"==l)&&1<ca.length?(g=ca.shift().split("-"),1==g.length&&(g[1]="1"),g[0]*=1,g[1]*=1,ca={H:g,s:ca.join(".")}):ca=
+kd.test(g)?{H:[0,0],s:g}:void 0;ca&&d.push(ca)}if(1==d.length)return J(13),d[0].s;if(0==d.length)J(12);else{J(14);d=Gc(d,lc(b).split(".").length,0);if(1==d.length)return d[0].s;d=Gc(d,jc(c),1);1<d.length&&J(41);return d[0]&&d[0].s}}},Gc=function(a,b,c){for(var d=[],e=[],g,ca=0;ca<a.length;ca++){var l=a[ca];l.H[c]==b?d.push(l):void 0==g||l.H[c]<g?(e=[l],g=l.H[c]):l.H[c]==g&&e.push(l)}return 0<d.length?d:e},lc=function(a){return 0==a.indexOf(".")?a.substr(1):a},id=function(){var a=[],b=xa().split(".");
+if(4==b.length){var c=b[b.length-1];if(parseInt(c,10)==c)return["none"]}for(c=b.length-2;0<=c;c--)a.push(b.slice(c).join("."));b=M.location.hostname;eb.test(b)||vc.test(b)||a.push("none");return a},kc=function(a){if(!a)return"/";1<a.length&&a.lastIndexOf("/")==a.length-1&&(a=a.substr(0,a.length-1));0!=a.indexOf("/")&&(a="/"+a);return a},jc=function(a){a=kc(a);return"/"==a?1:a.split("/").length},le=function(a){a.ta&&J(77);a.na&&J(74);a.pa&&J(73);a.ua&&J(69)};function Xc(a,b,c){"none"==b&&(b="");var d=[],e=Ca(a);a="__utma"==a?6:2;for(var g=0;g<e.length;g++){var ca=(""+e[g]).split(".");ca.length>=a&&d.push({hash:ca[0],R:e[g],O:ca})}if(0!=d.length)return 1==d.length?d[0]:Zc(b,d)||Zc(c,d)||Zc(null,d)||d[0]}function Zc(a,b){if(null==a)var c=a=1;else c=La(a),a=La(D(a,".")?a.substring(1):"."+a);for(var d=0;d<b.length;d++)if(b[d].hash==c||b[d].hash==a)return b[d]};var Jc=new RegExp(/^https?:\/\/([^\/:]+)/),De=O.google_tag_data.glBridge,Kc=/(.*)([?&#])(?:_ga=[^&#]*)(?:&?)(.*)/,od=/(.*)([?&#])(?:_gac=[^&#]*)(?:&?)(.*)/;function Bc(a){if(a.get(Ze))return J(35),De.generate($e(a));var b=P(a,Q),c=P(a,I)||"";b="_ga=2."+K(pa(c+b,0)+"."+c+"-"+b);(a=af(a))?(J(44),a="&_gac=1."+K([pa(a.qa,0),a.timestamp,a.qa].join("."))):a="";return b+a}
+function Ic(a,b){var c=new Date,d=O.navigator,e=d.plugins||[];a=[a,d.userAgent,c.getTimezoneOffset(),c.getYear(),c.getDate(),c.getHours(),c.getMinutes()+b];for(b=0;b<e.length;++b)a.push(e[b].description);return La(a.join("."))}function pa(a,b){var c=new Date,d=O.navigator,e=c.getHours()+Math.floor((c.getMinutes()+b)/60);return La([a,d.userAgent,d.language||"",c.getTimezoneOffset(),c.getYear(),c.getDate()+Math.floor(e/24),(24+e)%24,(60+c.getMinutes()+b)%60].join("."))}
+var Dc=function(a){J(48);this.target=a;this.T=!1};Dc.prototype.ca=function(a,b){if(a){if(this.target.get(Ze))return De.decorate($e(this.target),a,b);if(a.tagName){if("a"==a.tagName.toLowerCase()){a.href&&(a.href=qd(this,a.href,b));return}if("form"==a.tagName.toLowerCase())return rd(this,a)}if("string"==typeof a)return qd(this,a,b)}};
+var qd=function(a,b,c){var d=Kc.exec(b);d&&3<=d.length&&(b=d[1]+(d[3]?d[2]+d[3]:""));(d=od.exec(b))&&3<=d.length&&(b=d[1]+(d[3]?d[2]+d[3]:""));a=a.target.get("linkerParam");var e=b.indexOf("?");d=b.indexOf("#");c?b+=(-1==d?"#":"&")+a:(c=-1==e?"?":"&",b=-1==d?b+(c+a):b.substring(0,d)+c+a+b.substring(d));b=b.replace(/&+_ga=/,"&_ga=");return b=b.replace(/&+_gac=/,"&_gac=")},rd=function(a,b){if(b&&b.action)if("get"==b.method.toLowerCase()){a=a.target.get("linkerParam").split("&");for(var c=0;c<a.length;c++){var d=
+a[c].split("="),e=d[1];d=d[0];for(var g=b.childNodes||[],ca=!1,l=0;l<g.length;l++)if(g[l].name==d){g[l].setAttribute("value",e);ca=!0;break}ca||(g=M.createElement("input"),g.setAttribute("type","hidden"),g.setAttribute("name",d),g.setAttribute("value",e),b.appendChild(g))}}else"post"==b.method.toLowerCase()&&(b.action=qd(a,b.action))};
+Dc.prototype.S=function(a,b,c){function d(g){try{g=g||O.event;a:{var ca=g.target||g.srcElement;for(g=100;ca&&0<g;){if(ca.href&&ca.nodeName.match(/^a(?:rea)?$/i)){var l=ca;break a}ca=ca.parentNode;g--}l={}}("http:"==l.protocol||"https:"==l.protocol)&&sd(a,l.hostname||"")&&l.href&&(l.href=qd(e,l.href,b))}catch(k){J(26)}}var e=this;this.target.get(Ze)?De.auto(function(){return $e(e.target)},a,b?"fragment":"",c):(this.T||(this.T=!0,L(M,"mousedown",d,!1),L(M,"keyup",d,!1)),c&&L(M,"submit",function(g){g=
+g||O.event;if((g=g.target||g.srcElement)&&g.action){var ca=g.action.match(Jc);ca&&sd(a,ca[1])&&rd(e,g)}}))};function sd(a,b){if(b==M.location.hostname)return!1;for(var c=0;c<a.length;c++)if(a[c]instanceof RegExp){if(a[c].test(b))return!0}else if(0<=b.indexOf(a[c]))return!0;return!1}function ke(a,b){return b!=Ic(a,0)&&b!=Ic(a,-1)&&b!=Ic(a,-2)&&b!=pa(a,0)&&b!=pa(a,-1)&&b!=pa(a,-2)}function $e(a){var b=af(a);return{_ga:a.get(Q),_gid:a.get(I)||void 0,_gac:b?[b.qa,b.timestamp].join("."):void 0}}
+function af(a){function b(e){return void 0==e||""===e?0:Number(e)}var c=a.get(ce);if(c&&a.get(je)){var d=b(a.get(fe));if(1E3*d+b(a.get(he))<=(new Date).getTime())J(76);else return{timestamp:d,qa:c}}};var p=/^(GTM|OPT)-[A-Z0-9]+$/,q=/;_gaexp=[^;]*/g,r=/;((__utma=)|([^;=]+=GAX?\d+\.))[^;]*/g,Aa=/^https?:\/\/[\w\-.]+\.google.com(:\d+)?\/optimize\/opt-launch\.html\?.*$/,t=function(a){function b(d,e){e&&(c+="&"+d+"="+K(e))}var c="https://www.google-analytics.com/gtm/js?id="+K(a.id);"dataLayer"!=a.B&&b("l",a.B);b("t",a.target);b("cid",a.clientId);b("cidt",a.ka);b("gac",a.la);b("aip",a.ia);a.sync&&b("m","sync");b("cycle",a.G);a.qa&&b("gclid",a.qa);Aa.test(M.referrer)&&b("cb",String(hd()));return c};var Jd=function(a,b,c){this.aa=b;(b=c)||(b=(b=P(a,V))&&"t0"!=b?Wd.test(b)?"_gat_"+Cc(P(a,Na)):"_gat_"+Cc(b):"_gat");this.Y=b;this.ra=null},Rd=function(a,b){var c=b.get(Wb);b.set(Wb,function(e){Pd(a,e,ed);Pd(a,e,ia);var g=c(e);Qd(a,e);return g});var d=b.get(Xb);b.set(Xb,function(e){var g=d(e);if(se(e)){if(ne()!==H(a,e)){J(80);var ca={U:re(a,e,1),google:re(a,e,2),count:0};pe("https://stats.g.doubleclick.net/j/collect",ca.U,ca)}else ta(re(a,e,0));e.set(ed,"",!0)}return g})},Pd=function(a,b,c){!1===b.get(Ud)||
+b.get(c)||("1"==Ca(a.Y)[0]?b.set(c,"",!0):b.set(c,""+hd(),!0))},Qd=function(a,b){se(b)&&zc(a.Y,"1",P(b,Yb),P(b,W),P(b,Na),6E4,P(b,Be))},se=function(a){return!!a.get(ed)&&!1!==a.get(Ud)},re=function(a,b,c){var d=new ee,e=function(ca){$a(ca).F&&d.set($a(ca).F,b.get(ca))};e(hb);e(ib);e(Na);e(Q);e(ed);if(0==c||1==c)e(Ad),e(ia),e(I);d.set($a(ld).F,Td(b));var g="";d.map(function(ca,l){g+=K(ca)+"=";g+=K(""+l)+"&"});g+="z="+hd();0==c?g=a.aa+g:1==c?g="t=dc&aip=1&_r=3&"+g:2==c&&(g="t=sr&aip=1&_r=4&slf_rd=1&"+
+g);return g},H=function(a,b){null===a.ra&&(a.ra=1===Ed(b),a.ra&&J(33));return a.ra},Wd=/^gtm\d+$/;var fd=function(a,b){a=a.b;if(!a.get("dcLoaded")){var c=new $c(Dd(a));c.set(29);a.set(Gd,c.w);b=b||{};var d;b[U]&&(d=Cc(b[U]));b=new Jd(a,"https://stats.g.doubleclick.net/r/collect?t=dc&aip=1&_r=3&",d);Rd(b,a);a.set("dcLoaded",!0)}};var Sd=function(a){if(!a.get("dcLoaded")&&"cookie"==a.get(ac)){var b=new Jd(a);Pd(b,a,ed);Pd(b,a,ia);Qd(b,a);if(se(a)){var c=ne()!==H(b,a);a.set(Md,1,!0);c?(J(79),a.set(ad,"d",!0),a.set(qe,{U:re(b,a,1),google:re(b,a,2),count:0},!0)):a.set(ad,"b",!0)}}};var Lc=function(){var a=O.gaGlobal=O.gaGlobal||{};return a.hid=a.hid||hd()};var wb=/^(UA|YT|MO|GP)-(\d+)-(\d+)$/,pc=function(a){function b(e,g){d.b.data.set(e,g)}function c(e,g){b(e,g);d.filters.add(e)}var d=this;this.b=new Ya;this.filters=new Ha;b(V,a[V]);b(Na,sa(a[Na]));b(U,a[U]);b(W,a[W]||xa());b(Yb,a[Yb]);b(Zb,a[Zb]);b(Hd,a[Hd]);b(Be,a[Be]);b($b,a[$b]);b(Wc,a[Wc]);b(bc,a[bc]);b(cc,a[cc]);b(Ka,a[Ka]);b(dc,a[dc]);b(ec,a[ec]);b(ac,a[ac]);b(Ad,a[Ad]);b(n,a[n]);b(Kd,a[Kd]);b(je,a[je]);b(Ze,a[Ze]);b(oe,a[oe]);b(hb,1);b(ib,"j81");c(Qb,Ma);c(oa,ua);c(dd,cd);c(Rb,Oa);c(md,vb);
+c(Sb,nc);c(Uc,Yc);c(Tb,Ja);c(Vb,Ta);c(Vc,Hc);c(zd,yd);c(Ld,Sd);c(Wb,Pa);c(Xb,Sa);c(Cd,Fd(this));pd(this.b);td(this.b,a[Q]);this.b.set(jb,Lc())},td=function(a,b){var c=P(a,U);a.data.set(la,"_ga"==c?"_gid":c+"_gid");if("cookie"==P(a,ac)){hc=!1;c=Ca(P(a,U));c=Xd(a,c);if(!c){c=P(a,W);var d=P(a,$b)||xa();c=Xc("__utma",d,c);void 0!=c?(J(10),c=c.O[1]+"."+c.O[2]):c=void 0}c&&(hc=!0);if(d=c&&!a.get(Hd))if(d=c.split("."),2!=d.length)d=!1;else if(d=Number(d[1])){var e=R(a,Zb);d=d+e<(new Date).getTime()/1E3}else d=
+!1;d&&(c=void 0);c&&(a.data.set(xd,c),a.data.set(Q,c),(c=uc(a))&&a.data.set(I,c));if(a.get(je)&&(c=a.get(ce),d=a.get(ie),!c||d&&"aw.ds"!=d)){c={};if(M){d=[];e=M.cookie.split(";");for(var g=/^\s*_gac_(UA-\d+-\d+)=\s*(.+?)\s*$/,ca=0;ca<e.length;ca++){var l=e[ca].match(g);l&&d.push({ja:l[1],value:l[2]})}e={};if(d&&d.length)for(g=0;g<d.length;g++)(ca=d[g].value.split("."),"1"!=ca[0]||3!=ca.length)?c&&(c.na=!0):ca[1]&&(e[d[g].ja]?c&&(c.pa=!0):e[d[g].ja]=[],e[d[g].ja].push({timestamp:ca[1],qa:ca[2]}));
+d=e}else d={};d=d[P(a,Na)];le(c);d&&0!=d.length&&(c=d[0],a.data.set(fe,c.timestamp),a.data.set(ce,c.qa))}}if(a.get(Hd)&&(c=be("_ga",!!a.get(cc)),g=be("_gl",!!a.get(cc)),d=De.get(a.get(cc)),e=d._ga,g&&0<g.indexOf("_ga*")&&!e&&J(30),g=d.gclid,ca=d._gac,c||e||g||ca))if(c&&e&&J(36),a.get(bc)||ye(a.get(Kd))){if(e&&(J(38),a.data.set(Q,e),d._gid&&(J(51),a.data.set(I,d._gid))),g?(J(82),a.data.set(ce,g),d.gclsrc&&a.data.set(ie,d.gclsrc)):ca&&(d=ca.split("."))&&2===d.length&&(J(37),a.data.set(ce,d[0]),a.data.set(fe,
+d[1])),c)b:if(d=c.indexOf("."),-1==d)J(22);else{e=c.substring(0,d);g=c.substring(d+1);d=g.indexOf(".");c=g.substring(0,d);g=g.substring(d+1);if("1"==e){if(d=g,ke(d,c)){J(23);break b}}else if("2"==e){d=g.indexOf("-");e="";0<d?(e=g.substring(0,d),d=g.substring(d+1)):d=g.substring(1);if(ke(e+d,c)){J(53);break b}e&&(J(2),a.data.set(I,e))}else{J(22);break b}J(11);a.data.set(Q,d);if(c=be("_gac",!!a.get(cc)))c=c.split("."),"1"!=c[0]||4!=c.length?J(72):ke(c[3],c[1])?J(71):(a.data.set(ce,c[3]),a.data.set(fe,
+c[2]),J(70))}}else J(21);b&&(J(9),a.data.set(Q,K(b)));a.get(Q)||((b=(b=O.gaGlobal&&O.gaGlobal.vid)&&-1!=b.search(jd)?b:void 0)?(J(17),a.data.set(Q,b)):(J(8),a.data.set(Q,ra())));a.get(I)||(J(3),a.data.set(I,ra()));mc(a)},pd=function(a){var b=O.navigator,c=O.screen,d=M.location;a.set(lb,ya(!!a.get(ec),!!a.get(Kd)));if(d){var e=d.pathname||"";"/"!=e.charAt(0)&&(J(31),e="/"+e);a.set(kb,d.protocol+"//"+d.hostname+e+d.search)}c&&a.set(qb,c.width+"x"+c.height);c&&a.set(pb,c.colorDepth+"-bit");c=M.documentElement;
+var g=(e=M.body)&&e.clientWidth&&e.clientHeight,ca=[];c&&c.clientWidth&&c.clientHeight&&("CSS1Compat"===M.compatMode||!g)?ca=[c.clientWidth,c.clientHeight]:g&&(ca=[e.clientWidth,e.clientHeight]);c=0>=ca[0]||0>=ca[1]?"":ca.join("x");a.set(rb,c);a.set(tb,fc());a.set(ob,M.characterSet||M.charset);a.set(sb,b&&"function"===typeof b.javaEnabled&&b.javaEnabled()||!1);a.set(nb,(b&&(b.language||b.browserLanguage)||"").toLowerCase());a.data.set(ce,be("gclid",!0));a.data.set(ie,be("gclsrc",!0));a.data.set(fe,
+Math.round((new Date).getTime()/1E3));if(d&&a.get(cc)&&(b=M.location.hash)){b=b.split(/[?&#]+/);d=[];for(c=0;c<b.length;++c)(D(b[c],"utm_id")||D(b[c],"utm_campaign")||D(b[c],"utm_source")||D(b[c],"utm_medium")||D(b[c],"utm_term")||D(b[c],"utm_content")||D(b[c],"gclid")||D(b[c],"dclid")||D(b[c],"gclsrc"))&&d.push(b[c]);0<d.length&&(b="#"+d.join("&"),a.set(kb,a.get(kb)+b))}};pc.prototype.get=function(a){return this.b.get(a)};pc.prototype.set=function(a,b){this.b.set(a,b)};
+var me={pageview:[mb],event:[ub,xb,yb,zb],social:[Bb,Cb,Db],timing:[Mb,Nb,Pb,Ob]};pc.prototype.send=function(a){if(!(1>arguments.length)){if("string"===typeof arguments[0]){var b=arguments[0];var c=[].slice.call(arguments,1)}else b=arguments[0]&&arguments[0][Va],c=arguments;b&&(c=za(me[b]||[],c),c[Va]=b,this.b.set(c,void 0,!0),this.filters.D(this.b),this.b.data.m={})}};pc.prototype.ma=function(a,b){var c=this;u(a,c,b)||(v(a,function(){u(a,c,b)}),y(String(c.get(V)),a,void 0,b,!0))};var rc=function(a){if("prerender"==M.visibilityState)return!1;a();return!0},z=function(a){if(!rc(a)){J(16);var b=!1,c=function(){if(!b&&rc(a)){b=!0;var d=c,e=M;e.removeEventListener?e.removeEventListener("visibilitychange",d,!1):e.detachEvent&&e.detachEvent("onvisibilitychange",d)}};L(M,"visibilitychange",c)}};var te=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/,sc=function(a){if(ea(a[0]))this.u=a[0];else{var b=te.exec(a[0]);null!=b&&4==b.length&&(this.c=b[1]||"t0",this.K=b[2]||"",this.methodName=b[3],this.a=[].slice.call(a,1),this.K||(this.A="create"==this.methodName,this.i="require"==this.methodName,this.g="provide"==this.methodName,this.ba="remove"==this.methodName),this.i&&(3<=this.a.length?(this.X=this.a[1],this.W=this.a[2]):this.a[1]&&(qa(this.a[1])?this.X=this.a[1]:this.W=this.a[1])));b=a[1];a=a[2];if(!this.methodName)throw"abort";
+if(this.i&&(!qa(b)||""==b))throw"abort";if(this.g&&(!qa(b)||""==b||!ea(a)))throw"abort";if(ud(this.c)||ud(this.K))throw"abort";if(this.g&&"t0"!=this.c)throw"abort";}};function ud(a){return 0<=a.indexOf(".")||0<=a.indexOf(":")};var Yd,Zd,$d,A;Yd=new ee;$d=new ee;A=new ee;Zd={ec:45,ecommerce:46,linkid:47};
+var u=function(a,b,c){b==N||b.get(V);var d=Yd.get(a);if(!ea(d))return!1;b.plugins_=b.plugins_||new ee;if(b.plugins_.get(a))return!0;b.plugins_.set(a,new d(b,c||{}));return!0},y=function(a,b,c,d,e){if(!ea(Yd.get(b))&&!$d.get(b)){Zd.hasOwnProperty(b)&&J(Zd[b]);a=N.j(a);if(p.test(b)){J(52);if(!a)return!0;c=d||{};d={id:b,B:c.dataLayer||"dataLayer",ia:!!a.get("anonymizeIp"),sync:e,G:!1};a.get("&gtm")==b&&(d.G=!0);var g=String(a.get("name"));"t0"!=g&&(d.target=g);G(String(a.get("trackingId")))||(d.clientId=
+String(a.get(Q)),d.ka=Number(a.get(n)),c=c.palindrome?r:q,c=(c=M.cookie.replace(/^|(; +)/g,";").match(c))?c.sort().join("").substring(1):void 0,d.la=c,d.qa=E(a.b.get(kb)||"","gclid"));c=d.B;g=(new Date).getTime();O[c]=O[c]||[];g={"gtm.start":g};e||(g.event="gtm.js");O[c].push(g);c=t(d)}!c&&Zd.hasOwnProperty(b)?(J(39),c=b+".js"):J(43);if(c){if(a){var ca=a.get(oe);qa(ca)||(ca=void 0)}c&&0<=c.indexOf("/")||(c=(ca?ca+"/34":bd(!1)+"/plugins/ua/")+c);ca=ae(c);a=ca.protocol;d=M.location.protocol;if(("https:"==
+a||a==d||("http:"!=a?0:"http:"==d))&&B(ca)){if(ca=ca.url)a=(a=M.querySelector&&M.querySelector("script[nonce]")||null)?a.nonce||a.getAttribute&&a.getAttribute("nonce")||"":"",e?(e="",a&&Nd.test(a)&&(e=' nonce="'+a+'"'),f.test(ca)&&M.write("<script"+e+' src="'+ca+'">\x3c/script>')):(e=M.createElement("script"),e.type="text/javascript",e.async=!0,e.src=ca,a&&e.setAttribute("nonce",a),ca=M.getElementsByTagName("script")[0],ca.parentNode.insertBefore(e,ca));$d.set(b,!0)}}}},v=function(a,b){var c=A.get(a)||
+[];c.push(b);A.set(a,c)},C=function(a,b){Yd.set(a,b);b=A.get(a)||[];for(var c=0;c<b.length;c++)b[c]();A.set(a,[])},B=function(a){var b=ae(M.location.href);if(D(a.url,"https://www.google-analytics.com/gtm/js?id="))return!0;if(a.query||0<=a.url.indexOf("?")||0<=a.path.indexOf("://"))return!1;if(a.host==b.host&&a.port==b.port)return!0;b="http:"==a.protocol?80:443;return"www.google-analytics.com"==a.host&&(a.port||b)==b&&D(a.path,"/plugins/")?!0:!1},ae=function(a){function b(l){var k=l.hostname||"",w=
+0<=k.indexOf("]");k=k.split(w?"]":":")[0].toLowerCase();w&&(k+="]");w=(l.protocol||"").toLowerCase();w=1*l.port||("http:"==w?80:"https:"==w?443:"");l=l.pathname||"";D(l,"/")||(l="/"+l);return[k,""+w,l]}var c=M.createElement("a");c.href=M.location.href;var d=(c.protocol||"").toLowerCase(),e=b(c),g=c.search||"",ca=d+"//"+e[0]+(e[1]?":"+e[1]:"");D(a,"//")?a=d+a:D(a,"/")?a=ca+a:!a||D(a,"?")?a=ca+e[2]+(a||g):0>a.split("/")[0].indexOf(":")&&(a=ca+e[2].substring(0,e[2].lastIndexOf("/"))+"/"+a);c.href=a;
+d=b(c);return{protocol:(c.protocol||"").toLowerCase(),host:d[0],port:d[1],path:d[2],query:c.search||"",url:a||""}};var Z={ga:function(){Z.f=[]}};Z.ga();Z.D=function(a){var b=Z.J.apply(Z,arguments);b=Z.f.concat(b);for(Z.f=[];0<b.length&&!Z.v(b[0])&&!(b.shift(),0<Z.f.length););Z.f=Z.f.concat(b)};Z.J=function(a){for(var b=[],c=0;c<arguments.length;c++)try{var d=new sc(arguments[c]);d.g?C(d.a[0],d.a[1]):(d.i&&(d.ha=y(d.c,d.a[0],d.X,d.W)),b.push(d))}catch(e){}return b};
+Z.v=function(a){try{if(a.u)a.u.call(O,N.j("t0"));else{var b=a.c==gb?N:N.j(a.c);if(a.A){if("t0"==a.c&&(b=N.create.apply(N,a.a),null===b))return!0}else if(a.ba)N.remove(a.c);else if(b)if(a.i){if(a.ha&&(a.ha=y(a.c,a.a[0],a.X,a.W)),!u(a.a[0],b,a.W))return!0}else if(a.K){var c=a.methodName,d=a.a,e=b.plugins_.get(a.K);e[c].apply(e,d)}else b[a.methodName].apply(b,a.a)}}catch(g){}};var N=function(a){J(1);Z.D.apply(Z,[arguments])};N.h={};N.P=[];N.L=0;N.ya=0;N.answer=42;var we=[Na,W,V];N.create=function(a){var b=za(we,[].slice.call(arguments));b[V]||(b[V]="t0");var c=""+b[V];if(N.h[c])return N.h[c];if(da(b))return null;b=new pc(b);N.h[c]=b;N.P.push(b);c=qc().tracker_created;if(ea(c))try{c(b)}catch(d){}return b};N.remove=function(a){for(var b=0;b<N.P.length;b++)if(N.P[b].get(V)==a){N.P.splice(b,1);N.h[a]=null;break}};N.j=function(a){return N.h[a]};N.getAll=function(){return N.P.slice(0)};
+N.N=function(){"ga"!=gb&&J(49);var a=O[gb];if(!a||42!=a.answer){N.L=a&&a.l;N.ya=1*new Date;N.loaded=!0;var b=O[gb]=N;X("create",b,b.create);X("remove",b,b.remove);X("getByName",b,b.j,5);X("getAll",b,b.getAll,6);b=pc.prototype;X("get",b,b.get,7);X("set",b,b.set,4);X("send",b,b.send);X("requireSync",b,b.ma);b=Ya.prototype;X("get",b,b.get);X("set",b,b.set);if("https:"!=M.location.protocol&&!Ba){a:{b=M.getElementsByTagName("script");for(var c=0;c<b.length&&100>c;c++){var d=b[c].src;if(d&&0==d.indexOf(bd(!0)+
+"/analytics")){b=!0;break a}}b=!1}b&&(Ba=!0)}(O.gaplugins=O.gaplugins||{}).Linker=Dc;b=Dc.prototype;C("linker",Dc);X("decorate",b,b.ca,20);X("autoLink",b,b.S,25);C("displayfeatures",fd);C("adfeatures",fd);a=a&&a.q;ka(a)?Z.D.apply(N,a):J(50)}};N.da=function(){for(var a=N.getAll(),b=0;b<a.length;b++)a[b].get(V)};var ze=N.N,Ae=O[gb];Ae&&Ae.r?ze():z(ze);z(function(){Z.D(["provide","render",ua])});})(window);
diff --git a/Software/.jxbrowser-data/Cache/f_000018 b/Software/.jxbrowser-data/Cache/f_000018
new file mode 100644
index 000000000..d286c5b89
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_000018
Binary files differ
diff --git a/Software/.jxbrowser-data/Cache/f_000019 b/Software/.jxbrowser-data/Cache/f_000019
new file mode 100644
index 000000000..77e2e9414
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_000019
Binary files differ
diff --git a/Software/.jxbrowser-data/Cache/f_00001d b/Software/.jxbrowser-data/Cache/f_00001d
new file mode 100644
index 000000000..816d81a82
--- /dev/null
+++ b/Software/.jxbrowser-data/Cache/f_00001d
@@ -0,0 +1,10411 @@
+{
+ "devices": [
+ {
+ "name": "AM3352",
+ "id": "AM3352",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM3352"
+ ],
+ "coreTypes_id": [
+ "AM3352"
+ ]
+ },
+ {
+ "name": "AM3354",
+ "id": "AM3354",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM3354"
+ ],
+ "coreTypes_id": [
+ "AM3354"
+ ]
+ },
+ {
+ "name": "AM3356",
+ "id": "AM3356",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM3356"
+ ],
+ "coreTypes_id": [
+ "AM3356"
+ ]
+ },
+ {
+ "name": "AM3357",
+ "id": "AM3357",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM3357"
+ ],
+ "coreTypes_id": [
+ "AM3357"
+ ]
+ },
+ {
+ "name": "AM3358",
+ "id": "AM3358",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM3358"
+ ],
+ "coreTypes_id": [
+ "AM3358"
+ ]
+ },
+ {
+ "name": "AM3359",
+ "id": "AM3359",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM3359"
+ ],
+ "coreTypes_id": [
+ "AM3359"
+ ]
+ },
+ {
+ "name": "AM4376",
+ "id": "AM4376",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM4376"
+ ],
+ "coreTypes_id": [
+ "AM4376"
+ ]
+ },
+ {
+ "name": "AM4377",
+ "id": "AM4377",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM4377"
+ ],
+ "coreTypes_id": [
+ "AM4377"
+ ]
+ },
+ {
+ "name": "AM4378",
+ "id": "AM4378",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM4378"
+ ],
+ "coreTypes_id": [
+ "AM4378"
+ ]
+ },
+ {
+ "name": "AM4379",
+ "id": "AM4379",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM4379"
+ ],
+ "coreTypes_id": [
+ "AM4379"
+ ]
+ },
+ {
+ "name": "AM5716",
+ "id": "AM5716",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM5716"
+ ],
+ "coreTypes_id": [
+ "AM5716"
+ ]
+ },
+ {
+ "name": "AM5718",
+ "id": "AM5718",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM5718"
+ ],
+ "coreTypes_id": [
+ "AM5718"
+ ]
+ },
+ {
+ "name": "AM5726",
+ "id": "AM5726",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM5726"
+ ],
+ "coreTypes_id": [
+ "AM5726"
+ ]
+ },
+ {
+ "name": "AM5728",
+ "id": "AM5728",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devices",
+ "packageUId": "sitara_devices__1.00.00.00",
+ "coreTypes_name": [
+ "AM5728"
+ ],
+ "coreTypes_id": [
+ "AM5728"
+ ]
+ },
+ {
+ "id": "AWR1243",
+ "name": "AWR1243",
+ "type": "device",
+ "description": "The AWR1243 device is a highly integrated automotive radar sensor in the 76-81 GHz frequency range. It incorporates RF frontend with 3TX and 4RX with full calibration and monitoring engine. For more information, please visit the <a href='http://www.ti.com/product/awr1243'>AWR1243 Product Folder</a>.",
+ "image": "tirex-product-tree/mmwave_devices_1_0_1/images/chipshots/AWR1243.png",
+ "packageVersion": "1.0.0",
+ "packageId": "com.ti.mmwave_devices",
+ "packageUId": "com.ti.mmwave_devices__1.0.0",
+ "coreTypes_name": [
+ ""
+ ],
+ "coreTypes_id": [
+ ""
+ ]
+ },
+ {
+ "id": "AWR1443",
+ "name": "AWR1443",
+ "type": "device",
+ "description": "The AWR1443 device is a highly integrated automotive radar sensor in the 76-81 GHz frequency range. It incorporates RF frontend with 3TX and 4RX with full calibration and monitoring engine, as well as a fully programmable ARM R4F MCU and hardware accelerator for complex FFT and CFAR detection. For more information, please visit the <a href='http://www.ti.com/product/awr1443'>AWR1443 Product Folder</a>.",
+ "image": "tirex-product-tree/mmwave_devices_1_0_1/images/chipshots/AWR1443.png",
+ "packageVersion": "1.0.0",
+ "packageId": "com.ti.mmwave_devices",
+ "packageUId": "com.ti.mmwave_devices__1.0.0",
+ "coreTypes_name": [
+ "Cortex R4"
+ ],
+ "coreTypes_id": [
+ "Cortex_R4_0"
+ ]
+ },
+ {
+ "id": "AWR1642",
+ "name": "AWR1642",
+ "type": "device",
+ "description": "The AWR1642 device is a highly integrated automotive radar sensor in the 76-81 GHz frequency range. It incorporates RF frontend with 2TX and 4RX with full calibration and monitoring engine, as well as a fully programmable ARM R4F MCU and a fully featured C674x DSP. For more information, please visit the <a href='http://www.ti.com/product/awr1642'>AWR1642 Product Folder</a>.",
+ "image": "tirex-product-tree/mmwave_devices_1_0_1/images/chipshots/AWR1642.png",
+ "packageVersion": "1.0.0",
+ "packageId": "com.ti.mmwave_devices",
+ "packageUId": "com.ti.mmwave_devices__1.0.0",
+ "coreTypes_name": [
+ "Cortex R4"
+ ],
+ "coreTypes_id": [
+ "Cortex_R4_0"
+ ]
+ },
+ {
+ "name": "CC1310F128",
+ "id": "CC1310F128",
+ "type": "device",
+ "description": "<p>The CC1310 is a member of the CC26xx and CC13xx family of cost-effective, ultra-low-power, 2.4-GHz and Sub-1 GHz RF devices. Very low active RF and microcontroller (MCU) current consumption, in addition to flexible low-power modes, provide excellent battery lifetime and allow long-range operation on small coin-cell batteries and in energy-harvesting applications.</p><p>The CC1310 device is the first device in a Sub-1 GHz family of cost-effective, ultra-low-power wireless MCUs. The CC1310 device combines a flexible, very low power RF transceiver with a powerful 48-MHz Cortex&reg;-M3 microcontroller in a platform supporting multiple physical layers and RF standards. A dedicated Radio Controller (Cortex&reg;-M0) handles low-level RF protocol commands that are stored in ROM or RAM, thus ensuring ultra-low power and flexibility. The low-power consumption of the CC1310 device does not come at the expense of RF performance; the CC1310 device has excellent sensitivity and robustness (selectivity and blocking) performance.</p><p>Please visit <a href=\"http://www.ti.com/product/cc1310\">the product page</a> for more information.</p>",
+ "packageVersion": "1.11.00.00",
+ "packageId": "cc13x0_devices",
+ "packageUId": "cc13x0_devices__1.11.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC1310F128"
+ ]
+ },
+ {
+ "name": "CC1310F32",
+ "id": "CC1310F32",
+ "type": "device",
+ "description": "<p>The CC1310 is a member of the CC26xx and CC13xx family of cost-effective, ultra-low-power, 2.4-GHz and Sub-1 GHz RF devices. Very low active RF and microcontroller (MCU) current consumption, in addition to flexible low-power modes, provide excellent battery lifetime and allow long-range operation on small coin-cell batteries and in energy-harvesting applications.</p><p>The CC1310 device is the first device in a Sub-1 GHz family of cost-effective, ultra-low-power wireless MCUs. The CC1310 device combines a flexible, very low power RF transceiver with a powerful 48-MHz Cortex&reg;-M3 microcontroller in a platform supporting multiple physical layers and RF standards. A dedicated Radio Controller (Cortex&reg;-M0) handles low-level RF protocol commands that are stored in ROM or RAM, thus ensuring ultra-low power and flexibility. The low-power consumption of the CC1310 device does not come at the expense of RF performance; the CC1310 device has excellent sensitivity and robustness (selectivity and blocking) performance.</p><p>Please visit <a href=\"http://www.ti.com/product/cc1310\">the product page</a> for more information.</p>",
+ "packageVersion": "1.11.00.00",
+ "packageId": "cc13x0_devices",
+ "packageUId": "cc13x0_devices__1.11.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC1310F32"
+ ]
+ },
+ {
+ "name": "CC1310F64",
+ "id": "CC1310F64",
+ "type": "device",
+ "description": "<p>The CC1310 is a member of the CC26xx and CC13xx family of cost-effective, ultra-low-power, 2.4-GHz and Sub-1 GHz RF devices. Very low active RF and microcontroller (MCU) current consumption, in addition to flexible low-power modes, provide excellent battery lifetime and allow long-range operation on small coin-cell batteries and in energy-harvesting applications.</p><p>The CC1310 device is the first device in a Sub-1 GHz family of cost-effective, ultra-low-power wireless MCUs. The CC1310 device combines a flexible, very low power RF transceiver with a powerful 48-MHz Cortex&reg;-M3 microcontroller in a platform supporting multiple physical layers and RF standards. A dedicated Radio Controller (Cortex&reg;-M0) handles low-level RF protocol commands that are stored in ROM or RAM, thus ensuring ultra-low power and flexibility. The low-power consumption of the CC1310 device does not come at the expense of RF performance; the CC1310 device has excellent sensitivity and robustness (selectivity and blocking) performance.</p><p>Please visit <a href=\"http://www.ti.com/product/cc1310\">the product page</a> for more information.</p>",
+ "packageVersion": "1.11.00.00",
+ "packageId": "cc13x0_devices",
+ "packageUId": "cc13x0_devices__1.11.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC1310F64"
+ ]
+ },
+ {
+ "name": "CC1312R1F3",
+ "id": "CC1312R1F3",
+ "type": "device",
+ "description": "<p>The CC1312R1 device is a wireless Sub-1 GHz MCU targeting Wireless M-Bus, Sigfox, KNX Systems and proprietary systems.</p><p>CC1312R1 is a member of the CC26xx and CC13xx family of cost-effective, ultra-low power, 2.4-GHz and Sub-1 GHz RF devices. Very low active RF and microcontroller (MCU) current, in addition to flexible lowpower modes, provide excellent battery lifetime and allows operation on small coin-cell batteries and in energy-harvesting applications.</p><p>The CC1312R1 device combines a flexible, very low-power RF transceiver with a powerful 48-MHz ARM&reg; Cortex&reg;-M4F microcontroller in a platform supporting multiple physical layers and RF standards. A dedicated Radio Controller (ARM&reg; Cortex&reg;-M0) handles low-level RF protocol commands that are stored in ROM or RAM, thus ensuring ultra-low power and great flexibility. The low power consumption of the CC1312R1 device does not come at the expense of RF performance; the CC1312R1 device has excellent sensitivity and robustness (selectivity and blocking) performance.</p><p>The CC1312R1 device is a highly integrated, true single-chip solution incorporating a complete RF system and an on-chip DC-DC converter.</p><p>Sensors can be handled in a very low-power manner by a programmable, autonomous ultra-low power Sensor Controller CPU with 4kB SRAM for program and data. The Sensor Controller, with its fast wake-up and ultra low-power 2MHz mode is ideal to sample, buffer and process both analog and digital sensor data; thus the MCU system is able to maximize sleep time and reduce active power.</p>",
+ "packageVersion": "1.11.00.00",
+ "packageId": "cc13x0_devices",
+ "packageUId": "cc13x0_devices__1.11.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC1312R1F3"
+ ]
+ },
+ {
+ "name": "CC1350F128",
+ "id": "CC1350F128",
+ "type": "device",
+ "description": "<p>The CC1350 is a member of the CC26xx and CC13xx family of cost-effective, ultra-low-power, 2.4-GHz and Sub-1 GHz RF devices. Very low active RF and microcontroller (MCU) current consumption, in addition to flexible low-power modes, provide excellent battery lifetime and allow long-range operation on small coin-cell batteries and in energy-harvesting applications.</p><p>The CC1350 is the first device in the CC13xx and CC26xx family of cost-effective, ultra-low-power wireless MCUs capable of handling both Sub-1 GHz and 2.4-GHz RF frequencies. The CC1350 device combines a flexible, very low-power RF transceiver with a powerful 48-MHz ARM&reg; Cortex&reg;-M3 microcontroller in a platform supporting multiple physical layers and RF standards. A dedicated Radio Controller (Cortex&reg;-M0) handles low-level RF protocol commands that are stored in ROM or RAM, thus ensuring ultra-low power and flexibility to handle both Sub-1 GHz protocols and 2.4 GHz protocols (for example Bluetooth&reg; low energy). This enables the combination of a Sub-1 GHz communication solution that offers the best possible RF range together with a Bluetooth low energy smartphone connection that enables great user experience through a phone application.</p><p>Please visit <a href=\"http://www.ti.com/product/cc1350\">the product page</a> for more information.</p>",
+ "packageVersion": "1.11.00.00",
+ "packageId": "cc13x0_devices",
+ "packageUId": "cc13x0_devices__1.11.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC1350F128"
+ ]
+ },
+ {
+ "name": "CC1352P1F3",
+ "id": "CC1352P1F3",
+ "type": "device",
+ "description": "<p></p>",
+ "packageVersion": "1.11.00.00",
+ "packageId": "cc13x0_devices",
+ "packageUId": "cc13x0_devices__1.11.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC1352P1F3"
+ ]
+ },
+ {
+ "name": "CC1352R1F3",
+ "id": "CC1352R1F3",
+ "type": "device",
+ "description": "<p>The CC1352R1 device is a multi-protocol Sub-1- and 2.4-GHz wireless MCU targeting Wireless M-Bus, Sigfox, KNX Systems, IEEE 802.15.4g, IP-Enabled Smart Objects (6LoWPAN), Thread, ZigBee&reg;, Wi-SUN&reg; and Bluetooth&reg; low energy as well as proprietary systems.</p><p>CC1352R1 is a member of the CC26xx and CC13xx family of cost-effective, ultra-low power, 2.4-GHz and Sub-1 GHz RF devices. Very low active RF and microcontroller (MCU) current, in addition to flexible lowpower modes, provide excellent battery lifetime and allows operation on small coin-cell batteries and in energy-harvesting applications.</p><p>The CC1352R1 device combines a flexible, very low-power RF transceiver with a powerful 48-MHz ARM&reg; Cortex&reg;-M4F microcontroller in a platform supporting multiple physical layers and RF standards. A dedicated Radio Controller (ARM&reg; Cortex&reg;-M0) handles low-level RF protocol commands that are stored in ROM or RAM, thus ensuring ultra-low power and great flexibility. The low power consumption of the CC1352R1 device does not come at the expense of RF performance; the CC1352R1 device has excellent sensitivity and robustness (selectivity and blocking) performance.</p><p>The CC1352R1 device is a highly integrated, true single-chip solution incorporating a complete RF system and an on-chip DC-DC converter.</p><p>Sensors can be handled in a very low-power manner by a programmable, autonomous ultra-low power Sensor Controller CPU with 4kB SRAM for program and data. The Sensor Controller, with its fast wake-up and ultra low-power 2MHz mode is ideal to sample, buffer and process both analog and digital sensor data; thus the MCU system is able to maximize sleep time and reduce active power.</p>",
+ "packageVersion": "1.11.00.00",
+ "packageId": "cc13x0_devices",
+ "packageUId": "cc13x0_devices__1.11.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC1352R1F3"
+ ]
+ },
+ {
+ "name": "CC2620F128",
+ "id": "CC2620F128",
+ "type": "device",
+ "description": "<p>The CC2620 device is a wireless MCU targeting ZigBee&reg; RF4CE remote control applications, both controller and target node.</p><p>The device is a member of the CC26xx family of cost-effective, ultralow power, 2.4-GHz RF devices. Very low active RF and MCU current and low-power mode current consumption provide excellent battery lifetime and allow for operation on small coin cell batteries and in energy-harvesting applications.</p><p>Please visit <a href=\"http://www.ti.com/product/cc2620\">the product page</a> for more information.</p>",
+ "packageVersion": "1.10.00.02",
+ "packageId": "cc26x0_devices",
+ "packageUId": "cc26x0_devices__1.10.00.02",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC2620F128"
+ ]
+ },
+ {
+ "name": "CC2630F128",
+ "id": "CC2630F128",
+ "type": "device",
+ "description": "<p>The CC2630 device is a wireless MCU targeting ZigBee&reg; and 6LoWPAN applications.</p><p>The device is a member of the CC26xx family of cost-effective, ultralow power, 2.4-GHz RF devices. Very low active RF and MCU current and low-power mode current consumption provide excellent battery lifetime and allow for operation on small coin cell batteries and in energy-harvesting applications.<p><p>Please visit <a href=\"http://www.ti.com/product/cc2630\">the product page</a> for more information.<p>",
+ "packageVersion": "1.10.00.02",
+ "packageId": "cc26x0_devices",
+ "packageUId": "cc26x0_devices__1.10.00.02",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC2630F128"
+ ]
+ },
+ {
+ "name": "CC2640F128",
+ "id": "CC2640F128",
+ "type": "device",
+ "description": "<p>The CC2640 device is a wireless MCU targeting Bluetooth&reg; low energy applications.</p><p>The device is a member of the CC26xx family of cost-effective, ultralow power, 2.4-GHz RF devices. Very low active RF and MCU current and low-power mode current consumption provide excellent battery lifetime and allow for operation on small coin cell batteries and in energy-harvesting applications.</p><p>Please visit <a href=\"http://www.ti.com/product/cc2640\">the product page</a> for more information.</p>",
+ "packageVersion": "1.10.00.02",
+ "packageId": "cc26x0_devices",
+ "packageUId": "cc26x0_devices__1.10.00.02",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC2640F128"
+ ]
+ },
+ {
+ "name": "CC2640R2F",
+ "id": "CC2640R2F",
+ "type": "device",
+ "description": "<p>The CC2640R2 (ROM update of CC2640) device is a wireless MCU targeting Bluetooth&reg; low energy applications.</p><p>The device is a member of the CC26xx family of cost-effective, ultralow power, 2.4-GHz RF devices. Very low active RF and MCU current and low-power mode current consumption provide excellent battery lifetime and allow for operation on small coin cell batteries and in energy-harvesting applications.<p><p>Please visit <a href=\"http://www.ti.com/product/cc2640r2f\">the product page</a> for more information.</p>",
+ "packageVersion": "1.10.00.02",
+ "packageId": "cc26x0_devices",
+ "packageUId": "cc26x0_devices__1.10.00.02",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC2640R2F"
+ ]
+ },
+ {
+ "name": "CC2642R1F",
+ "id": "CC2642R1F",
+ "type": "device",
+ "description": "<p>The CC2642R device is a wireless MCU targeting Bluetooth&reg; low energy applications.</p><p>CC2642R is a member of the CC26xx and CC13xx family of cost-effective, ultra-low power, 2.4-GHz and Sub-1 GHz RF devices. Very low active RF and microcontroller (MCU) current, in addition to flexible lowpower modes, provide excellent battery lifetime and allows operation on small coin-cell batteries and in energy-harvesting applications.</p><p>The CC2642R device combines a flexible, very low-power RF transceiver with a powerful 48-MHz ARM&reg; Cortex&reg;-M4F microcontroller in a platform supporting multiple physical layers and RF standards. A dedicated Radio Controller (ARM&reg; Cortex&reg;-M0) handles low-level RF protocol commands that are stored in ROM or RAM, thus ensuring ultra-low power and great flexibility. The low power consumption of the CC2642R device does not come at the expense of RF performance; the CC2642R device has excellent sensitivity and robustness (selectivity and blocking) performance.</p><p>The CC2642R device is a highly integrated, true single-chip solution incorporating a complete RF system and an on-chip DC-DC converter.</p> <p>Sensors can be handled in a very low-power manner by a programmable, autonomous ultra-low power Sensor Controller CPU with 4kB SRAM for program and data. The Sensor Controller, with its fast wake-up and ultra low-power 2MHz mode is ideal to sample, buffer and process both analog and digital sensor data; thus the MCU system is able to maximize sleep time and reduce active power.</p>",
+ "packageVersion": "1.10.00.02",
+ "packageId": "cc26x0_devices",
+ "packageUId": "cc26x0_devices__1.10.00.02",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC2642R1F"
+ ]
+ },
+ {
+ "name": "CC2650F128",
+ "id": "CC2650F128",
+ "type": "device",
+ "description": "<p>The CC2650 device is a wireless MCU targeting Bluetooth&reg;, ZigBee&reg; and 6LoWPAN, and ZigBee RF4CE remote control applications.</p><p>The device is a member of the CC26xx family of cost-effective, ultralow power, 2.4-GHz RF devices. Very low active RF and MCU current and low-power mode current consumption provide excellent battery lifetime and allow for operation on small coin cell batteries and in energy-harvesting applications.</p><p>Please visit <a href=\"http://www.ti.com/product/cc2650\">the product page</a> for more information.</p>",
+ "packageVersion": "1.10.00.02",
+ "packageId": "cc26x0_devices",
+ "packageUId": "cc26x0_devices__1.10.00.02",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC2650F128"
+ ]
+ },
+ {
+ "name": "CC2652R1F",
+ "id": "CC2652R1F",
+ "type": "device",
+ "description": "<p>The CC2652R device is a multi-protocol wireless 2.4-GHz MCU targeting Thread, ZigBee&reg;, Bluetooth&reg; low energy, IEEE 802.15.4g, IP-Enabled Smart Objects (6LoWPAN) and Wi-SUN&reg; as well as proprietary systems.</p><p>CC2652R is a member of the CC26xx and CC13xx family of cost-effective, ultra-low power, 2.4-GHz and Sub-1 GHz RF devices. Very low active RF and microcontroller (MCU) current, in addition to flexible lowpower modes, provide excellent battery lifetime and allows operation on small coin-cell batteries and in energy-harvesting applications.</p><p>The CC2652R device combines a flexible, very low-power RF transceiver with a powerful 48-MHz ARM&reg; Cortex&reg;-M4F microcontroller in a platform supporting multiple physical layers and RF standards. A dedicated Radio Controller (ARM&reg; Cortex&reg;-M0) handles low-level RF protocol commands that are stored in ROM or RAM, thus ensuring ultra-low power and great flexibility. The low power consumption of the CC2652R device does not come at the expense of RF performance; the CC2652R device has excellent sensitivity and robustness (selectivity and blocking) performance.</p><p>The CC2652R device is a highly integrated, true single-chip solution incorporating a complete RF system and an on-chip DC-DC converter.</p><p>Sensors can be handled in a very low-power manner by a programmable, autonomous ultra-low power Sensor Controller CPU with 4kB SRAM for program and data. The Sensor Controller, with its fast wake-up and ultra low-power 2MHz mode is ideal to sample, buffer and process both analog and digital sensor data; thus the MCU system is able to maximize sleep time and reduce active power.</p>",
+ "packageVersion": "1.10.00.02",
+ "packageId": "cc26x0_devices",
+ "packageUId": "cc26x0_devices__1.10.00.02",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC2652R1F"
+ ]
+ },
+ {
+ "name": "CC3200",
+ "id": "CC3200",
+ "type": "device",
+ "description": "CC3200",
+ "packageVersion": "1.00.00.00",
+ "packageId": "cc32xx_devices",
+ "packageUId": "cc32xx_devices__1.00.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC3200"
+ ]
+ },
+ {
+ "name": "CC3220S",
+ "id": "CC3220S",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "cc32xx_devices",
+ "packageUId": "cc32xx_devices__1.00.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC3220S"
+ ]
+ },
+ {
+ "name": "CC3220SF",
+ "id": "CC3220SF",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "cc32xx_devices",
+ "packageUId": "cc32xx_devices__1.00.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.CC3220SF"
+ ]
+ },
+ {
+ "id": "CC430F5123",
+ "type": "devices",
+ "name": "CC430F5123",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F5123"
+ ]
+ },
+ {
+ "id": "CC430F5125",
+ "type": "devices",
+ "name": "CC430F5125",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F5125"
+ ]
+ },
+ {
+ "id": "CC430F5133",
+ "type": "devices",
+ "name": "CC430F5133",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F5133"
+ ]
+ },
+ {
+ "id": "CC430F5135",
+ "type": "devices",
+ "name": "CC430F5135",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F5135"
+ ]
+ },
+ {
+ "id": "CC430F5137",
+ "type": "devices",
+ "name": "CC430F5137",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F5137"
+ ]
+ },
+ {
+ "id": "CC430F5143",
+ "type": "devices",
+ "name": "CC430F5143",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F5143"
+ ]
+ },
+ {
+ "id": "CC430F5145",
+ "type": "devices",
+ "name": "CC430F5145",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F5145"
+ ]
+ },
+ {
+ "id": "CC430F5147",
+ "type": "devices",
+ "name": "CC430F5147",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F5147"
+ ]
+ },
+ {
+ "id": "CC430F6125",
+ "type": "devices",
+ "name": "CC430F6125",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F6125"
+ ]
+ },
+ {
+ "id": "CC430F6126",
+ "type": "devices",
+ "name": "CC430F6126",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F6126"
+ ]
+ },
+ {
+ "id": "CC430F6127",
+ "type": "devices",
+ "name": "CC430F6127",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F6127"
+ ]
+ },
+ {
+ "id": "CC430F6135",
+ "type": "devices",
+ "name": "CC430F6135",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F6135"
+ ]
+ },
+ {
+ "id": "CC430F6137",
+ "type": "devices",
+ "name": "CC430F6137",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F6137"
+ ]
+ },
+ {
+ "id": "CC430F6143",
+ "type": "devices",
+ "name": "CC430F6143",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F6143"
+ ]
+ },
+ {
+ "id": "CC430F6145",
+ "type": "devices",
+ "name": "CC430F6145",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F6145"
+ ]
+ },
+ {
+ "id": "CC430F6147",
+ "type": "devices",
+ "name": "CC430F6147",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "CC430F6147"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F280041",
+ "name": "F280041",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F280041"
+ ],
+ "coreTypes_id": [
+ "F280041"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F280041C",
+ "name": "F280041C",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F280041C"
+ ],
+ "coreTypes_id": [
+ "F280041C"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F280045",
+ "name": "F280045",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F280045"
+ ],
+ "coreTypes_id": [
+ "F280045"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F280049",
+ "name": "F280049",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F280049"
+ ],
+ "coreTypes_id": [
+ "F280049"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F280049C",
+ "name": "F280049C",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F280049C"
+ ],
+ "coreTypes_id": [
+ "F280049C"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F280049M",
+ "name": "F280049M",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F280049M"
+ ],
+ "coreTypes_id": [
+ "F280049M"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28020",
+ "name": "F28020",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28020"
+ ],
+ "coreTypes_id": [
+ "F28020"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28021",
+ "name": "F28021",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28021"
+ ],
+ "coreTypes_id": [
+ "F28021"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28022",
+ "name": "F28022",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28022"
+ ],
+ "coreTypes_id": [
+ "F28022"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F280220",
+ "name": "F280220",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F280220"
+ ],
+ "coreTypes_id": [
+ "F280220"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28023",
+ "name": "F28023",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28023"
+ ],
+ "coreTypes_id": [
+ "F28023"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F280230",
+ "name": "F280230",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F280230"
+ ],
+ "coreTypes_id": [
+ "F280230"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28026",
+ "name": "F28026",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28026"
+ ],
+ "coreTypes_id": [
+ "F28026"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F280260",
+ "name": "F280260",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F280260"
+ ],
+ "coreTypes_id": [
+ "F280260"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28026F",
+ "name": "F28026F",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28026F"
+ ],
+ "coreTypes_id": [
+ "F28026F"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28027",
+ "name": "F28027",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28027"
+ ],
+ "coreTypes_id": [
+ "F28027"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F280270",
+ "name": "F280270",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F280270"
+ ],
+ "coreTypes_id": [
+ "F280270"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28027F",
+ "name": "F28027F",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28027F"
+ ],
+ "coreTypes_id": [
+ "F28027F"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28030",
+ "name": "F28030",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28030"
+ ],
+ "coreTypes_id": [
+ "F28030"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28031",
+ "name": "F28031",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28031"
+ ],
+ "coreTypes_id": [
+ "F28031"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28032",
+ "name": "F28032",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28032"
+ ],
+ "coreTypes_id": [
+ "F28032"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28033",
+ "name": "F28033",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28033"
+ ],
+ "coreTypes_id": [
+ "F28033"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28034",
+ "name": "F28034",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28034"
+ ],
+ "coreTypes_id": [
+ "F28034"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28035",
+ "name": "F28035",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28035"
+ ],
+ "coreTypes_id": [
+ "F28035"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28050",
+ "name": "F28050",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28050"
+ ],
+ "coreTypes_id": [
+ "F28050"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28051",
+ "name": "F28051",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28051"
+ ],
+ "coreTypes_id": [
+ "F28051"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28052",
+ "name": "F28052",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28052"
+ ],
+ "coreTypes_id": [
+ "F28052"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28052F",
+ "name": "F28052F",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28052F"
+ ],
+ "coreTypes_id": [
+ "F28052F"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28052M",
+ "name": "F28052M",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28052M"
+ ],
+ "coreTypes_id": [
+ "F28052M"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28053",
+ "name": "F28053",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28053"
+ ],
+ "coreTypes_id": [
+ "F28053"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28054",
+ "name": "F28054",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28054"
+ ],
+ "coreTypes_id": [
+ "F28054"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28054F",
+ "name": "F28054F",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28054F"
+ ],
+ "coreTypes_id": [
+ "F28054F"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28054M",
+ "name": "F28054M",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28054M"
+ ],
+ "coreTypes_id": [
+ "F28054M"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28055",
+ "name": "F28055",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28055"
+ ],
+ "coreTypes_id": [
+ "F28055"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28062",
+ "name": "F28062",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28062"
+ ],
+ "coreTypes_id": [
+ "F28062"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28062F",
+ "name": "F28062F",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28062F"
+ ],
+ "coreTypes_id": [
+ "F28062F"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28063",
+ "name": "F28063",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28063"
+ ],
+ "coreTypes_id": [
+ "F28063"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28064",
+ "name": "F28064",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28064"
+ ],
+ "coreTypes_id": [
+ "F28064"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28065",
+ "name": "F28065",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28065"
+ ],
+ "coreTypes_id": [
+ "F28065"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28066",
+ "name": "F28066",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28066"
+ ],
+ "coreTypes_id": [
+ "F28066"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28067",
+ "name": "F28067",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28067"
+ ],
+ "coreTypes_id": [
+ "F28067"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28068",
+ "name": "F28068",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28068"
+ ],
+ "coreTypes_id": [
+ "F28068"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28068F",
+ "name": "F28068F",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28068F"
+ ],
+ "coreTypes_id": [
+ "F28068F"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28068M",
+ "name": "F28068M",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28068M"
+ ],
+ "coreTypes_id": [
+ "F28068M"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28069",
+ "name": "F28069",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28069"
+ ],
+ "coreTypes_id": [
+ "F28069"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28069F",
+ "name": "F28069F",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28069F"
+ ],
+ "coreTypes_id": [
+ "F28069F"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28069M",
+ "name": "F28069M",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28069M"
+ ],
+ "coreTypes_id": [
+ "F28069M"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28075",
+ "name": "F28075",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28075"
+ ],
+ "coreTypes_id": [
+ "F28075"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28232",
+ "name": "F28232",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28232"
+ ],
+ "coreTypes_id": [
+ "F28232"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28234",
+ "name": "F28234",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28234"
+ ],
+ "coreTypes_id": [
+ "F28234"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28235",
+ "name": "F28235",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28235"
+ ],
+ "coreTypes_id": [
+ "F28235"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28332",
+ "name": "F28332",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28332"
+ ],
+ "coreTypes_id": [
+ "F28332"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28333",
+ "name": "F28333",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28333"
+ ],
+ "coreTypes_id": [
+ "F28333"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28334",
+ "name": "F28334",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28334"
+ ],
+ "coreTypes_id": [
+ "F28334"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28335",
+ "name": "F28335",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28335"
+ ],
+ "coreTypes_id": [
+ "F28335"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28374D",
+ "name": "F28374D",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28374D"
+ ],
+ "coreTypes_id": [
+ "F28374D"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28374S",
+ "name": "F28374S",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28374S"
+ ],
+ "coreTypes_id": [
+ "F28374S"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28375D",
+ "name": "F28375D",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28375D"
+ ],
+ "coreTypes_id": [
+ "F28375D"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28375S",
+ "name": "F28375S",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28375S"
+ ],
+ "coreTypes_id": [
+ "F28375S"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28376D",
+ "name": "F28376D",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28376D"
+ ],
+ "coreTypes_id": [
+ "F28376D"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28376S",
+ "name": "F28376S",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28376S"
+ ],
+ "coreTypes_id": [
+ "F28376S"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28377D",
+ "name": "F28377D",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28377D"
+ ],
+ "coreTypes_id": [
+ "F28377D"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28377S",
+ "name": "F28377S",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28377S"
+ ],
+ "coreTypes_id": [
+ "F28377S"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28379D",
+ "name": "F28379D",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28379D"
+ ],
+ "coreTypes_id": [
+ "F28379D"
+ ]
+ },
+ {
+ "type": "subfamily",
+ "id": "F28379S",
+ "name": "F28379S",
+ "description": "",
+ "packageVersion": "1.00.04.00",
+ "packageId": "c2000ware_devices_package",
+ "packageUId": "c2000ware_devices_package__1.00.04.00",
+ "coreTypes_name": [
+ "F28379S"
+ ],
+ "coreTypes_id": [
+ "F28379S"
+ ]
+ },
+ {
+ "id": "IWR1443",
+ "name": "IWR1443",
+ "type": "device",
+ "description": "The IWR1443 device is a highly integrated mmWave sensor in the 76-81 GHz frequency range. It incorporates RF frontend with 3TX and 4RX with full calibration and monitoring engine, as well as a fully programmable ARM R4F MCU and hardware accelerator for complex FFT and CFAR detection. For more information, please visit the <a href='http://www.ti.com/product/iwr1443'>IWR1443 Product Folder</a>.",
+ "image": "tirex-product-tree/mmwave_devices_1_0_1/images/chipshots/IWR1443.png",
+ "packageVersion": "1.0.0",
+ "packageId": "com.ti.mmwave_devices",
+ "packageUId": "com.ti.mmwave_devices__1.0.0",
+ "coreTypes_name": [
+ "Cortex R4"
+ ],
+ "coreTypes_id": [
+ "Cortex_R4_0"
+ ]
+ },
+ {
+ "id": "IWR1642",
+ "name": "IWR1642",
+ "type": "device",
+ "description": "The IWR1642 device is a highly integrated mmWave sensor in the 76-81 GHz frequency range. It incorporates RF frontend with 2TX and 4RX with full calibration and monitoring engine, as well as a fully programmable ARM R4F MCU and a fully featured C674x DSP. For more information, please visit the <a href='http://www.ti.com/product/iwr1642'>IWR1642 Product Folder</a>.",
+ "image": "tirex-product-tree/mmwave_devices_1_0_1/images/chipshots/IWR1642.png",
+ "packageVersion": "1.0.0",
+ "packageId": "com.ti.mmwave_devices",
+ "packageUId": "com.ti.mmwave_devices__1.0.0",
+ "coreTypes_name": [
+ "Cortex R4"
+ ],
+ "coreTypes_id": [
+ "Cortex_R4_0"
+ ]
+ },
+ {
+ "id": "MSP430AFE221",
+ "type": "devices",
+ "name": "MSP430AFE221",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430AFE221"
+ ]
+ },
+ {
+ "id": "MSP430AFE222",
+ "type": "devices",
+ "name": "MSP430AFE222",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430AFE222"
+ ]
+ },
+ {
+ "id": "MSP430AFE223",
+ "type": "devices",
+ "name": "MSP430AFE223",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430AFE223"
+ ]
+ },
+ {
+ "id": "MSP430AFE231",
+ "type": "devices",
+ "name": "MSP430AFE231",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430AFE231"
+ ]
+ },
+ {
+ "id": "MSP430AFE232",
+ "type": "devices",
+ "name": "MSP430AFE232",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430AFE232"
+ ]
+ },
+ {
+ "id": "MSP430AFE233",
+ "type": "devices",
+ "name": "MSP430AFE233",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430AFE233"
+ ]
+ },
+ {
+ "id": "MSP430AFE251",
+ "type": "devices",
+ "name": "MSP430AFE251",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430AFE251"
+ ]
+ },
+ {
+ "id": "MSP430AFE252",
+ "type": "devices",
+ "name": "MSP430AFE252",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430AFE252"
+ ]
+ },
+ {
+ "id": "MSP430AFE253",
+ "type": "devices",
+ "name": "MSP430AFE253",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430AFE253"
+ ]
+ },
+ {
+ "id": "MSP430C091",
+ "type": "devices",
+ "name": "MSP430C091",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430C091"
+ ]
+ },
+ {
+ "id": "MSP430C092",
+ "type": "devices",
+ "name": "MSP430C092",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430C092"
+ ]
+ },
+ {
+ "id": "MSP430C1331",
+ "type": "devices",
+ "name": "MSP430C1331",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430C1331"
+ ]
+ },
+ {
+ "id": "MSP430C1351",
+ "type": "devices",
+ "name": "MSP430C1351",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430C1351"
+ ]
+ },
+ {
+ "id": "MSP430F1101A",
+ "type": "devices",
+ "name": "MSP430F1101A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1101A"
+ ]
+ },
+ {
+ "id": "MSP430F1111A",
+ "type": "devices",
+ "name": "MSP430F1111A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1111A"
+ ]
+ },
+ {
+ "id": "MSP430F1121A",
+ "type": "devices",
+ "name": "MSP430F1121A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1121A"
+ ]
+ },
+ {
+ "id": "MSP430F1122",
+ "type": "devices",
+ "name": "MSP430F1122",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1122"
+ ]
+ },
+ {
+ "id": "MSP430F1132",
+ "type": "devices",
+ "name": "MSP430F1132",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1132"
+ ]
+ },
+ {
+ "id": "MSP430F122",
+ "type": "devices",
+ "name": "MSP430F122",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F122"
+ ]
+ },
+ {
+ "id": "MSP430F1222",
+ "type": "devices",
+ "name": "MSP430F1222",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1222"
+ ]
+ },
+ {
+ "id": "MSP430F123",
+ "type": "devices",
+ "name": "MSP430F123",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F123"
+ ]
+ },
+ {
+ "id": "MSP430F1232",
+ "type": "devices",
+ "name": "MSP430F1232",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1232"
+ ]
+ },
+ {
+ "id": "MSP430F133",
+ "type": "devices",
+ "name": "MSP430F133",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F133"
+ ]
+ },
+ {
+ "id": "MSP430F135",
+ "type": "devices",
+ "name": "MSP430F135",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F135"
+ ]
+ },
+ {
+ "id": "MSP430F147",
+ "type": "devices",
+ "name": "MSP430F147",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F147"
+ ]
+ },
+ {
+ "id": "MSP430F1471",
+ "type": "devices",
+ "name": "MSP430F1471",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1471"
+ ]
+ },
+ {
+ "id": "MSP430F148",
+ "type": "devices",
+ "name": "MSP430F148",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F148"
+ ]
+ },
+ {
+ "id": "MSP430F1481",
+ "type": "devices",
+ "name": "MSP430F1481",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1481"
+ ]
+ },
+ {
+ "id": "MSP430F149",
+ "type": "devices",
+ "name": "MSP430F149",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F149"
+ ]
+ },
+ {
+ "id": "MSP430F1491",
+ "type": "devices",
+ "name": "MSP430F1491",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1491"
+ ]
+ },
+ {
+ "id": "MSP430F155",
+ "type": "devices",
+ "name": "MSP430F155",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F155"
+ ]
+ },
+ {
+ "id": "MSP430F156",
+ "type": "devices",
+ "name": "MSP430F156",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F156"
+ ]
+ },
+ {
+ "id": "MSP430F157",
+ "type": "devices",
+ "name": "MSP430F157",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F157"
+ ]
+ },
+ {
+ "id": "MSP430F1610",
+ "type": "devices",
+ "name": "MSP430F1610",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1610"
+ ]
+ },
+ {
+ "id": "MSP430F1611",
+ "type": "devices",
+ "name": "MSP430F1611",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1611"
+ ]
+ },
+ {
+ "id": "MSP430F1612",
+ "type": "devices",
+ "name": "MSP430F1612",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F1612"
+ ]
+ },
+ {
+ "id": "MSP430F167",
+ "type": "devices",
+ "name": "MSP430F167",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F167"
+ ]
+ },
+ {
+ "id": "MSP430F168",
+ "type": "devices",
+ "name": "MSP430F168",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F168"
+ ]
+ },
+ {
+ "id": "MSP430F169",
+ "type": "devices",
+ "name": "MSP430F169",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F169"
+ ]
+ },
+ {
+ "id": "MSP430F2001",
+ "type": "devices",
+ "name": "MSP430F2001",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2001"
+ ]
+ },
+ {
+ "id": "MSP430F2002",
+ "type": "devices",
+ "name": "MSP430F2002",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2002"
+ ]
+ },
+ {
+ "id": "MSP430F2003",
+ "type": "devices",
+ "name": "MSP430F2003",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2003"
+ ]
+ },
+ {
+ "id": "MSP430F2011",
+ "type": "devices",
+ "name": "MSP430F2011",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2011"
+ ]
+ },
+ {
+ "id": "MSP430F2012",
+ "type": "devices",
+ "name": "MSP430F2012",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2012"
+ ]
+ },
+ {
+ "id": "MSP430F2013",
+ "type": "devices",
+ "name": "MSP430F2013",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2013"
+ ]
+ },
+ {
+ "id": "MSP430F2112",
+ "type": "devices",
+ "name": "MSP430F2112",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2112"
+ ]
+ },
+ {
+ "id": "MSP430F2122",
+ "type": "devices",
+ "name": "MSP430F2122",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2122"
+ ]
+ },
+ {
+ "id": "MSP430F2132",
+ "type": "devices",
+ "name": "MSP430F2132",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2132"
+ ]
+ },
+ {
+ "id": "MSP430F2232",
+ "type": "devices",
+ "name": "MSP430F2232",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2232"
+ ]
+ },
+ {
+ "id": "MSP430F2234",
+ "type": "devices",
+ "name": "MSP430F2234",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2234"
+ ]
+ },
+ {
+ "id": "MSP430F2252",
+ "type": "devices",
+ "name": "MSP430F2252",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2252"
+ ]
+ },
+ {
+ "id": "MSP430F2254",
+ "type": "devices",
+ "name": "MSP430F2254",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2254"
+ ]
+ },
+ {
+ "id": "MSP430F2272",
+ "type": "devices",
+ "name": "MSP430F2272",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2272"
+ ]
+ },
+ {
+ "id": "MSP430F2274",
+ "type": "devices",
+ "name": "MSP430F2274",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2274"
+ ]
+ },
+ {
+ "id": "MSP430F233",
+ "type": "devices",
+ "name": "MSP430F233",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F233"
+ ]
+ },
+ {
+ "id": "MSP430F2330",
+ "type": "devices",
+ "name": "MSP430F2330",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2330"
+ ]
+ },
+ {
+ "id": "MSP430F235",
+ "type": "devices",
+ "name": "MSP430F235",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F235"
+ ]
+ },
+ {
+ "id": "MSP430F2350",
+ "type": "devices",
+ "name": "MSP430F2350",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2350"
+ ]
+ },
+ {
+ "id": "MSP430F2370",
+ "type": "devices",
+ "name": "MSP430F2370",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2370"
+ ]
+ },
+ {
+ "id": "MSP430F2410",
+ "type": "devices",
+ "name": "MSP430F2410",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2410"
+ ]
+ },
+ {
+ "id": "MSP430F2416",
+ "type": "devices",
+ "name": "MSP430F2416",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2416"
+ ]
+ },
+ {
+ "id": "MSP430F2417",
+ "type": "devices",
+ "name": "MSP430F2417",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2417"
+ ]
+ },
+ {
+ "id": "MSP430F2418",
+ "type": "devices",
+ "name": "MSP430F2418",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2418"
+ ]
+ },
+ {
+ "id": "MSP430F2419",
+ "type": "devices",
+ "name": "MSP430F2419",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2419"
+ ]
+ },
+ {
+ "id": "MSP430F247",
+ "type": "devices",
+ "name": "MSP430F247",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F247"
+ ]
+ },
+ {
+ "id": "MSP430F2471",
+ "type": "devices",
+ "name": "MSP430F2471",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2471"
+ ]
+ },
+ {
+ "id": "MSP430F248",
+ "type": "devices",
+ "name": "MSP430F248",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F248"
+ ]
+ },
+ {
+ "id": "MSP430F2481",
+ "type": "devices",
+ "name": "MSP430F2481",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2481"
+ ]
+ },
+ {
+ "id": "MSP430F249",
+ "type": "devices",
+ "name": "MSP430F249",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F249"
+ ]
+ },
+ {
+ "id": "MSP430F2491",
+ "type": "devices",
+ "name": "MSP430F2491",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2491"
+ ]
+ },
+ {
+ "id": "MSP430F2616",
+ "type": "devices",
+ "name": "MSP430F2616",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2616"
+ ]
+ },
+ {
+ "id": "MSP430F2617",
+ "type": "devices",
+ "name": "MSP430F2617",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2617"
+ ]
+ },
+ {
+ "id": "MSP430F2618",
+ "type": "devices",
+ "name": "MSP430F2618",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2618"
+ ]
+ },
+ {
+ "id": "MSP430F2619",
+ "type": "devices",
+ "name": "MSP430F2619",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F2619"
+ ]
+ },
+ {
+ "id": "MSP430F412",
+ "type": "devices",
+ "name": "MSP430F412",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F412"
+ ]
+ },
+ {
+ "id": "MSP430F413",
+ "type": "devices",
+ "name": "MSP430F413",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F413"
+ ]
+ },
+ {
+ "id": "MSP430F4132",
+ "type": "devices",
+ "name": "MSP430F4132",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4132"
+ ]
+ },
+ {
+ "id": "MSP430F415",
+ "type": "devices",
+ "name": "MSP430F415",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F415"
+ ]
+ },
+ {
+ "id": "MSP430F4152",
+ "type": "devices",
+ "name": "MSP430F4152",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4152"
+ ]
+ },
+ {
+ "id": "MSP430F417",
+ "type": "devices",
+ "name": "MSP430F417",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F417"
+ ]
+ },
+ {
+ "id": "MSP430F423",
+ "type": "devices",
+ "name": "MSP430F423",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F423"
+ ]
+ },
+ {
+ "id": "MSP430F423A",
+ "type": "devices",
+ "name": "MSP430F423A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F423A"
+ ]
+ },
+ {
+ "id": "MSP430F425",
+ "type": "devices",
+ "name": "MSP430F425",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F425"
+ ]
+ },
+ {
+ "id": "MSP430F4250",
+ "type": "devices",
+ "name": "MSP430F4250",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4250"
+ ]
+ },
+ {
+ "id": "MSP430F425A",
+ "type": "devices",
+ "name": "MSP430F425A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F425A"
+ ]
+ },
+ {
+ "id": "MSP430F4260",
+ "type": "devices",
+ "name": "MSP430F4260",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4260"
+ ]
+ },
+ {
+ "id": "MSP430F427",
+ "type": "devices",
+ "name": "MSP430F427",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F427"
+ ]
+ },
+ {
+ "id": "MSP430F4270",
+ "type": "devices",
+ "name": "MSP430F4270",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4270"
+ ]
+ },
+ {
+ "id": "MSP430F427A",
+ "type": "devices",
+ "name": "MSP430F427A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F427A"
+ ]
+ },
+ {
+ "id": "MSP430F435",
+ "type": "devices",
+ "name": "MSP430F435",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F435"
+ ]
+ },
+ {
+ "id": "MSP430F4351",
+ "type": "devices",
+ "name": "MSP430F4351",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4351"
+ ]
+ },
+ {
+ "id": "MSP430F436",
+ "type": "devices",
+ "name": "MSP430F436",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F436"
+ ]
+ },
+ {
+ "id": "MSP430F4361",
+ "type": "devices",
+ "name": "MSP430F4361",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4361"
+ ]
+ },
+ {
+ "id": "MSP430F437",
+ "type": "devices",
+ "name": "MSP430F437",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F437"
+ ]
+ },
+ {
+ "id": "MSP430F4371",
+ "type": "devices",
+ "name": "MSP430F4371",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4371"
+ ]
+ },
+ {
+ "id": "MSP430F438",
+ "type": "devices",
+ "name": "MSP430F438",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F438"
+ ]
+ },
+ {
+ "id": "MSP430F439",
+ "type": "devices",
+ "name": "MSP430F439",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F439"
+ ]
+ },
+ {
+ "id": "MSP430F447",
+ "type": "devices",
+ "name": "MSP430F447",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F447"
+ ]
+ },
+ {
+ "id": "MSP430F448",
+ "type": "devices",
+ "name": "MSP430F448",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F448"
+ ]
+ },
+ {
+ "id": "MSP430F4481",
+ "type": "devices",
+ "name": "MSP430F4481",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4481"
+ ]
+ },
+ {
+ "id": "MSP430F449",
+ "type": "devices",
+ "name": "MSP430F449",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F449"
+ ]
+ },
+ {
+ "id": "MSP430F4491",
+ "type": "devices",
+ "name": "MSP430F4491",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4491"
+ ]
+ },
+ {
+ "id": "MSP430F4616",
+ "type": "devices",
+ "name": "MSP430F4616",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4616"
+ ]
+ },
+ {
+ "id": "MSP430F46161",
+ "type": "devices",
+ "name": "MSP430F46161",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F46161"
+ ]
+ },
+ {
+ "id": "MSP430F4617",
+ "type": "devices",
+ "name": "MSP430F4617",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4617"
+ ]
+ },
+ {
+ "id": "MSP430F46171",
+ "type": "devices",
+ "name": "MSP430F46171",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F46171"
+ ]
+ },
+ {
+ "id": "MSP430F4618",
+ "type": "devices",
+ "name": "MSP430F4618",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4618"
+ ]
+ },
+ {
+ "id": "MSP430F46181",
+ "type": "devices",
+ "name": "MSP430F46181",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F46181"
+ ]
+ },
+ {
+ "id": "MSP430F4619",
+ "type": "devices",
+ "name": "MSP430F4619",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4619"
+ ]
+ },
+ {
+ "id": "MSP430F46191",
+ "type": "devices",
+ "name": "MSP430F46191",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F46191"
+ ]
+ },
+ {
+ "id": "MSP430F47126",
+ "type": "devices",
+ "name": "MSP430F47126",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F47126"
+ ]
+ },
+ {
+ "id": "MSP430F47127",
+ "type": "devices",
+ "name": "MSP430F47127",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F47127"
+ ]
+ },
+ {
+ "id": "MSP430F47166",
+ "type": "devices",
+ "name": "MSP430F47166",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F47166"
+ ]
+ },
+ {
+ "id": "MSP430F47167",
+ "type": "devices",
+ "name": "MSP430F47167",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F47167"
+ ]
+ },
+ {
+ "id": "MSP430F47176",
+ "type": "devices",
+ "name": "MSP430F47176",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F47176"
+ ]
+ },
+ {
+ "id": "MSP430F47177",
+ "type": "devices",
+ "name": "MSP430F47177",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F47177"
+ ]
+ },
+ {
+ "id": "MSP430F47186",
+ "type": "devices",
+ "name": "MSP430F47186",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F47186"
+ ]
+ },
+ {
+ "id": "MSP430F47187",
+ "type": "devices",
+ "name": "MSP430F47187",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F47187"
+ ]
+ },
+ {
+ "id": "MSP430F47196",
+ "type": "devices",
+ "name": "MSP430F47196",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F47196"
+ ]
+ },
+ {
+ "id": "MSP430F47197",
+ "type": "devices",
+ "name": "MSP430F47197",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F47197"
+ ]
+ },
+ {
+ "id": "MSP430F477",
+ "type": "devices",
+ "name": "MSP430F477",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F477"
+ ]
+ },
+ {
+ "id": "MSP430F478",
+ "type": "devices",
+ "name": "MSP430F478",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F478"
+ ]
+ },
+ {
+ "id": "MSP430F4783",
+ "type": "devices",
+ "name": "MSP430F4783",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4783"
+ ]
+ },
+ {
+ "id": "MSP430F4784",
+ "type": "devices",
+ "name": "MSP430F4784",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4784"
+ ]
+ },
+ {
+ "id": "MSP430F479",
+ "type": "devices",
+ "name": "MSP430F479",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F479"
+ ]
+ },
+ {
+ "id": "MSP430F4793",
+ "type": "devices",
+ "name": "MSP430F4793",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4793"
+ ]
+ },
+ {
+ "id": "MSP430F4794",
+ "type": "devices",
+ "name": "MSP430F4794",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F4794"
+ ]
+ },
+ {
+ "id": "MSP430F5131",
+ "type": "devices",
+ "name": "MSP430F5131",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5131"
+ ]
+ },
+ {
+ "id": "MSP430F5132",
+ "type": "devices",
+ "name": "MSP430F5132",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5132"
+ ]
+ },
+ {
+ "id": "MSP430F5151",
+ "type": "devices",
+ "name": "MSP430F5151",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5151"
+ ]
+ },
+ {
+ "id": "MSP430F5152",
+ "type": "devices",
+ "name": "MSP430F5152",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5152"
+ ]
+ },
+ {
+ "id": "MSP430F5171",
+ "type": "devices",
+ "name": "MSP430F5171",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5171"
+ ]
+ },
+ {
+ "id": "MSP430F5172",
+ "type": "devices",
+ "name": "MSP430F5172",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5172"
+ ]
+ },
+ {
+ "id": "MSP430F5212",
+ "type": "devices",
+ "name": "MSP430F5212",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5212"
+ ]
+ },
+ {
+ "id": "MSP430F5213",
+ "type": "devices",
+ "name": "MSP430F5213",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5213"
+ ]
+ },
+ {
+ "id": "MSP430F5214",
+ "type": "devices",
+ "name": "MSP430F5214",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5214"
+ ]
+ },
+ {
+ "id": "MSP430F5217",
+ "type": "devices",
+ "name": "MSP430F5217",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5217"
+ ]
+ },
+ {
+ "id": "MSP430F5218",
+ "type": "devices",
+ "name": "MSP430F5218",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5218"
+ ]
+ },
+ {
+ "id": "MSP430F5219",
+ "type": "devices",
+ "name": "MSP430F5219",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5219"
+ ]
+ },
+ {
+ "id": "MSP430F5222",
+ "type": "devices",
+ "name": "MSP430F5222",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5222"
+ ]
+ },
+ {
+ "id": "MSP430F5223",
+ "type": "devices",
+ "name": "MSP430F5223",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5223"
+ ]
+ },
+ {
+ "id": "MSP430F5224",
+ "type": "devices",
+ "name": "MSP430F5224",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5224"
+ ]
+ },
+ {
+ "id": "MSP430F5227",
+ "type": "devices",
+ "name": "MSP430F5227",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5227"
+ ]
+ },
+ {
+ "id": "MSP430F5228",
+ "type": "devices",
+ "name": "MSP430F5228",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5228"
+ ]
+ },
+ {
+ "id": "MSP430F5229",
+ "type": "devices",
+ "name": "MSP430F5229",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5229"
+ ]
+ },
+ {
+ "id": "MSP430F5232",
+ "type": "devices",
+ "name": "MSP430F5232",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5232"
+ ]
+ },
+ {
+ "id": "MSP430F5234",
+ "type": "devices",
+ "name": "MSP430F5234",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5234"
+ ]
+ },
+ {
+ "id": "MSP430F5237",
+ "type": "devices",
+ "name": "MSP430F5237",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5237"
+ ]
+ },
+ {
+ "id": "MSP430F5239",
+ "type": "devices",
+ "name": "MSP430F5239",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5239"
+ ]
+ },
+ {
+ "id": "MSP430F5242",
+ "type": "devices",
+ "name": "MSP430F5242",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5242"
+ ]
+ },
+ {
+ "id": "MSP430F5244",
+ "type": "devices",
+ "name": "MSP430F5244",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5244"
+ ]
+ },
+ {
+ "id": "MSP430F5247",
+ "type": "devices",
+ "name": "MSP430F5247",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5247"
+ ]
+ },
+ {
+ "id": "MSP430F5249",
+ "type": "devices",
+ "name": "MSP430F5249",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5249"
+ ]
+ },
+ {
+ "id": "MSP430F5252",
+ "type": "devices",
+ "name": "MSP430F5252",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5252"
+ ]
+ },
+ {
+ "id": "MSP430F5253",
+ "type": "devices",
+ "name": "MSP430F5253",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5253"
+ ]
+ },
+ {
+ "id": "MSP430F5254",
+ "type": "devices",
+ "name": "MSP430F5254",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5254"
+ ]
+ },
+ {
+ "id": "MSP430F5255",
+ "type": "devices",
+ "name": "MSP430F5255",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5255"
+ ]
+ },
+ {
+ "id": "MSP430F5256",
+ "type": "devices",
+ "name": "MSP430F5256",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5256"
+ ]
+ },
+ {
+ "id": "MSP430F5257",
+ "type": "devices",
+ "name": "MSP430F5257",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5257"
+ ]
+ },
+ {
+ "id": "MSP430F5258",
+ "type": "devices",
+ "name": "MSP430F5258",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5258"
+ ]
+ },
+ {
+ "id": "MSP430F5259",
+ "type": "devices",
+ "name": "MSP430F5259",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5259"
+ ]
+ },
+ {
+ "id": "MSP430F5304",
+ "type": "devices",
+ "name": "MSP430F5304",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5304"
+ ]
+ },
+ {
+ "id": "MSP430F5308",
+ "type": "devices",
+ "name": "MSP430F5308",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5308"
+ ]
+ },
+ {
+ "id": "MSP430F5309",
+ "type": "devices",
+ "name": "MSP430F5309",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5309"
+ ]
+ },
+ {
+ "id": "MSP430F5310",
+ "type": "devices",
+ "name": "MSP430F5310",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5310"
+ ]
+ },
+ {
+ "id": "MSP430F5324",
+ "type": "devices",
+ "name": "MSP430F5324",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5324"
+ ]
+ },
+ {
+ "id": "MSP430F5325",
+ "type": "devices",
+ "name": "MSP430F5325",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5325"
+ ]
+ },
+ {
+ "id": "MSP430F5326",
+ "type": "devices",
+ "name": "MSP430F5326",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5326"
+ ]
+ },
+ {
+ "id": "MSP430F5327",
+ "type": "devices",
+ "name": "MSP430F5327",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5327"
+ ]
+ },
+ {
+ "id": "MSP430F5328",
+ "type": "devices",
+ "name": "MSP430F5328",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5328"
+ ]
+ },
+ {
+ "id": "MSP430F5329",
+ "type": "devices",
+ "name": "MSP430F5329",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5329"
+ ]
+ },
+ {
+ "id": "MSP430F5333",
+ "type": "devices",
+ "name": "MSP430F5333",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5333"
+ ]
+ },
+ {
+ "id": "MSP430F5335",
+ "type": "devices",
+ "name": "MSP430F5335",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5335"
+ ]
+ },
+ {
+ "id": "MSP430F5336",
+ "type": "devices",
+ "name": "MSP430F5336",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5336"
+ ]
+ },
+ {
+ "id": "MSP430F5338",
+ "type": "devices",
+ "name": "MSP430F5338",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5338"
+ ]
+ },
+ {
+ "id": "MSP430F5340",
+ "type": "devices",
+ "name": "MSP430F5340",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5340"
+ ]
+ },
+ {
+ "id": "MSP430F5341",
+ "type": "devices",
+ "name": "MSP430F5341",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5341"
+ ]
+ },
+ {
+ "id": "MSP430F5342",
+ "type": "devices",
+ "name": "MSP430F5342",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5342"
+ ]
+ },
+ {
+ "id": "MSP430F5358",
+ "type": "devices",
+ "name": "MSP430F5358",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5358"
+ ]
+ },
+ {
+ "id": "MSP430F5359",
+ "type": "devices",
+ "name": "MSP430F5359",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5359"
+ ]
+ },
+ {
+ "id": "MSP430F5418",
+ "type": "devices",
+ "name": "MSP430F5418",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5418"
+ ]
+ },
+ {
+ "id": "MSP430F5418A",
+ "type": "devices",
+ "name": "MSP430F5418A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5418A"
+ ]
+ },
+ {
+ "id": "MSP430F5419",
+ "type": "devices",
+ "name": "MSP430F5419",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5419"
+ ]
+ },
+ {
+ "id": "MSP430F5419A",
+ "type": "devices",
+ "name": "MSP430F5419A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5419A"
+ ]
+ },
+ {
+ "id": "MSP430F5435",
+ "type": "devices",
+ "name": "MSP430F5435",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5435"
+ ]
+ },
+ {
+ "id": "MSP430F5435A",
+ "type": "devices",
+ "name": "MSP430F5435A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5435A"
+ ]
+ },
+ {
+ "id": "MSP430F5436",
+ "type": "devices",
+ "name": "MSP430F5436",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5436"
+ ]
+ },
+ {
+ "id": "MSP430F5436A",
+ "type": "devices",
+ "name": "MSP430F5436A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5436A"
+ ]
+ },
+ {
+ "id": "MSP430F5437",
+ "type": "devices",
+ "name": "MSP430F5437",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5437"
+ ]
+ },
+ {
+ "id": "MSP430F5437A",
+ "type": "devices",
+ "name": "MSP430F5437A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5437A"
+ ]
+ },
+ {
+ "id": "MSP430F5438",
+ "type": "devices",
+ "name": "MSP430F5438",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5438"
+ ]
+ },
+ {
+ "id": "MSP430F5438A",
+ "type": "devices",
+ "name": "MSP430F5438A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5438A"
+ ]
+ },
+ {
+ "id": "MSP430F5500",
+ "type": "devices",
+ "name": "MSP430F5500",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5500"
+ ]
+ },
+ {
+ "id": "MSP430F5501",
+ "type": "devices",
+ "name": "MSP430F5501",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5501"
+ ]
+ },
+ {
+ "id": "MSP430F5502",
+ "type": "devices",
+ "name": "MSP430F5502",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5502"
+ ]
+ },
+ {
+ "id": "MSP430F5503",
+ "type": "devices",
+ "name": "MSP430F5503",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5503"
+ ]
+ },
+ {
+ "id": "MSP430F5504",
+ "type": "devices",
+ "name": "MSP430F5504",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5504"
+ ]
+ },
+ {
+ "id": "MSP430F5505",
+ "type": "devices",
+ "name": "MSP430F5505",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5505"
+ ]
+ },
+ {
+ "id": "MSP430F5506",
+ "type": "devices",
+ "name": "MSP430F5506",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5506"
+ ]
+ },
+ {
+ "id": "MSP430F5507",
+ "type": "devices",
+ "name": "MSP430F5507",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5507"
+ ]
+ },
+ {
+ "id": "MSP430F5508",
+ "type": "devices",
+ "name": "MSP430F5508",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5508"
+ ]
+ },
+ {
+ "id": "MSP430F5509",
+ "type": "devices",
+ "name": "MSP430F5509",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5509"
+ ]
+ },
+ {
+ "id": "MSP430F5510",
+ "type": "devices",
+ "name": "MSP430F5510",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5510"
+ ]
+ },
+ {
+ "id": "MSP430F5513",
+ "type": "devices",
+ "name": "MSP430F5513",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5513"
+ ]
+ },
+ {
+ "id": "MSP430F5514",
+ "type": "devices",
+ "name": "MSP430F5514",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5514"
+ ]
+ },
+ {
+ "id": "MSP430F5515",
+ "type": "devices",
+ "name": "MSP430F5515",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5515"
+ ]
+ },
+ {
+ "id": "MSP430F5517",
+ "type": "devices",
+ "name": "MSP430F5517",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5517"
+ ]
+ },
+ {
+ "id": "MSP430F5519",
+ "type": "devices",
+ "name": "MSP430F5519",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5519"
+ ]
+ },
+ {
+ "id": "MSP430F5521",
+ "type": "devices",
+ "name": "MSP430F5521",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5521"
+ ]
+ },
+ {
+ "id": "MSP430F5522",
+ "type": "devices",
+ "name": "MSP430F5522",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5522"
+ ]
+ },
+ {
+ "id": "MSP430F5524",
+ "type": "devices",
+ "name": "MSP430F5524",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5524"
+ ]
+ },
+ {
+ "id": "MSP430F5525",
+ "type": "devices",
+ "name": "MSP430F5525",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5525"
+ ]
+ },
+ {
+ "id": "MSP430F5526",
+ "type": "devices",
+ "name": "MSP430F5526",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5526"
+ ]
+ },
+ {
+ "id": "MSP430F5527",
+ "type": "devices",
+ "name": "MSP430F5527",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5527"
+ ]
+ },
+ {
+ "id": "MSP430F5528",
+ "type": "devices",
+ "name": "MSP430F5528",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5528"
+ ]
+ },
+ {
+ "id": "MSP430F5529",
+ "type": "devices",
+ "name": "MSP430F5529",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5529"
+ ]
+ },
+ {
+ "id": "MSP430F5630",
+ "type": "devices",
+ "name": "MSP430F5630",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5630"
+ ]
+ },
+ {
+ "id": "MSP430F5631",
+ "type": "devices",
+ "name": "MSP430F5631",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5631"
+ ]
+ },
+ {
+ "id": "MSP430F5632",
+ "type": "devices",
+ "name": "MSP430F5632",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5632"
+ ]
+ },
+ {
+ "id": "MSP430F5633",
+ "type": "devices",
+ "name": "MSP430F5633",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5633"
+ ]
+ },
+ {
+ "id": "MSP430F5634",
+ "type": "devices",
+ "name": "MSP430F5634",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5634"
+ ]
+ },
+ {
+ "id": "MSP430F5635",
+ "type": "devices",
+ "name": "MSP430F5635",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5635"
+ ]
+ },
+ {
+ "id": "MSP430F5636",
+ "type": "devices",
+ "name": "MSP430F5636",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5636"
+ ]
+ },
+ {
+ "id": "MSP430F5637",
+ "type": "devices",
+ "name": "MSP430F5637",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5637"
+ ]
+ },
+ {
+ "id": "MSP430F5638",
+ "type": "devices",
+ "name": "MSP430F5638",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5638"
+ ]
+ },
+ {
+ "id": "MSP430F5658",
+ "type": "devices",
+ "name": "MSP430F5658",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5658"
+ ]
+ },
+ {
+ "id": "MSP430F5659",
+ "type": "devices",
+ "name": "MSP430F5659",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F5659"
+ ]
+ },
+ {
+ "id": "MSP430F6433",
+ "type": "devices",
+ "name": "MSP430F6433",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6433"
+ ]
+ },
+ {
+ "id": "MSP430F6435",
+ "type": "devices",
+ "name": "MSP430F6435",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6435"
+ ]
+ },
+ {
+ "id": "MSP430F6436",
+ "type": "devices",
+ "name": "MSP430F6436",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6436"
+ ]
+ },
+ {
+ "id": "MSP430F6438",
+ "type": "devices",
+ "name": "MSP430F6438",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6438"
+ ]
+ },
+ {
+ "id": "MSP430F6458",
+ "type": "devices",
+ "name": "MSP430F6458",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6458"
+ ]
+ },
+ {
+ "id": "MSP430F6459",
+ "type": "devices",
+ "name": "MSP430F6459",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6459"
+ ]
+ },
+ {
+ "id": "MSP430F6630",
+ "type": "devices",
+ "name": "MSP430F6630",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6630"
+ ]
+ },
+ {
+ "id": "MSP430F6631",
+ "type": "devices",
+ "name": "MSP430F6631",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6631"
+ ]
+ },
+ {
+ "id": "MSP430F6632",
+ "type": "devices",
+ "name": "MSP430F6632",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6632"
+ ]
+ },
+ {
+ "id": "MSP430F6633",
+ "type": "devices",
+ "name": "MSP430F6633",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6633"
+ ]
+ },
+ {
+ "id": "MSP430F6634",
+ "type": "devices",
+ "name": "MSP430F6634",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6634"
+ ]
+ },
+ {
+ "id": "MSP430F6635",
+ "type": "devices",
+ "name": "MSP430F6635",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6635"
+ ]
+ },
+ {
+ "id": "MSP430F6636",
+ "type": "devices",
+ "name": "MSP430F6636",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6636"
+ ]
+ },
+ {
+ "id": "MSP430F6637",
+ "type": "devices",
+ "name": "MSP430F6637",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6637"
+ ]
+ },
+ {
+ "id": "MSP430F6638",
+ "type": "devices",
+ "name": "MSP430F6638",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6638"
+ ]
+ },
+ {
+ "id": "MSP430F6658",
+ "type": "devices",
+ "name": "MSP430F6658",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6658"
+ ]
+ },
+ {
+ "id": "MSP430F6659",
+ "type": "devices",
+ "name": "MSP430F6659",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6659"
+ ]
+ },
+ {
+ "id": "MSP430F6720",
+ "type": "devices",
+ "name": "MSP430F6720",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6720"
+ ]
+ },
+ {
+ "id": "MSP430F6720A",
+ "type": "devices",
+ "name": "MSP430F6720A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6720A"
+ ]
+ },
+ {
+ "id": "MSP430F6721",
+ "type": "devices",
+ "name": "MSP430F6721",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6721"
+ ]
+ },
+ {
+ "id": "MSP430F6721A",
+ "type": "devices",
+ "name": "MSP430F6721A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6721A"
+ ]
+ },
+ {
+ "id": "MSP430F6723",
+ "type": "devices",
+ "name": "MSP430F6723",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6723"
+ ]
+ },
+ {
+ "id": "MSP430F6723A",
+ "type": "devices",
+ "name": "MSP430F6723A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6723A"
+ ]
+ },
+ {
+ "id": "MSP430F6724",
+ "type": "devices",
+ "name": "MSP430F6724",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6724"
+ ]
+ },
+ {
+ "id": "MSP430F6724A",
+ "type": "devices",
+ "name": "MSP430F6724A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6724A"
+ ]
+ },
+ {
+ "id": "MSP430F6725",
+ "type": "devices",
+ "name": "MSP430F6725",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6725"
+ ]
+ },
+ {
+ "id": "MSP430F6725A",
+ "type": "devices",
+ "name": "MSP430F6725A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6725A"
+ ]
+ },
+ {
+ "id": "MSP430F6726",
+ "type": "devices",
+ "name": "MSP430F6726",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6726"
+ ]
+ },
+ {
+ "id": "MSP430F6726A",
+ "type": "devices",
+ "name": "MSP430F6726A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6726A"
+ ]
+ },
+ {
+ "id": "MSP430F6730",
+ "type": "devices",
+ "name": "MSP430F6730",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6730"
+ ]
+ },
+ {
+ "id": "MSP430F6730A",
+ "type": "devices",
+ "name": "MSP430F6730A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6730A"
+ ]
+ },
+ {
+ "id": "MSP430F6731",
+ "type": "devices",
+ "name": "MSP430F6731",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6731"
+ ]
+ },
+ {
+ "id": "MSP430F6731A",
+ "type": "devices",
+ "name": "MSP430F6731A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6731A"
+ ]
+ },
+ {
+ "id": "MSP430F6733",
+ "type": "devices",
+ "name": "MSP430F6733",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6733"
+ ]
+ },
+ {
+ "id": "MSP430F6733A",
+ "type": "devices",
+ "name": "MSP430F6733A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6733A"
+ ]
+ },
+ {
+ "id": "MSP430F6734",
+ "type": "devices",
+ "name": "MSP430F6734",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6734"
+ ]
+ },
+ {
+ "id": "MSP430F6734A",
+ "type": "devices",
+ "name": "MSP430F6734A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6734A"
+ ]
+ },
+ {
+ "id": "MSP430F6735",
+ "type": "devices",
+ "name": "MSP430F6735",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6735"
+ ]
+ },
+ {
+ "id": "MSP430F6735A",
+ "type": "devices",
+ "name": "MSP430F6735A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6735A"
+ ]
+ },
+ {
+ "id": "MSP430F6736",
+ "type": "devices",
+ "name": "MSP430F6736",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6736"
+ ]
+ },
+ {
+ "id": "MSP430F6736A",
+ "type": "devices",
+ "name": "MSP430F6736A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6736A"
+ ]
+ },
+ {
+ "id": "MSP430F6745",
+ "type": "devices",
+ "name": "MSP430F6745",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6745"
+ ]
+ },
+ {
+ "id": "MSP430F67451",
+ "type": "devices",
+ "name": "MSP430F67451",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67451"
+ ]
+ },
+ {
+ "id": "MSP430F67451A",
+ "type": "devices",
+ "name": "MSP430F67451A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67451A"
+ ]
+ },
+ {
+ "id": "MSP430F6745A",
+ "type": "devices",
+ "name": "MSP430F6745A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6745A"
+ ]
+ },
+ {
+ "id": "MSP430F6746",
+ "type": "devices",
+ "name": "MSP430F6746",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6746"
+ ]
+ },
+ {
+ "id": "MSP430F67461",
+ "type": "devices",
+ "name": "MSP430F67461",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67461"
+ ]
+ },
+ {
+ "id": "MSP430F67461A",
+ "type": "devices",
+ "name": "MSP430F67461A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67461A"
+ ]
+ },
+ {
+ "id": "MSP430F6746A",
+ "type": "devices",
+ "name": "MSP430F6746A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6746A"
+ ]
+ },
+ {
+ "id": "MSP430F6747",
+ "type": "devices",
+ "name": "MSP430F6747",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6747"
+ ]
+ },
+ {
+ "id": "MSP430F67471",
+ "type": "devices",
+ "name": "MSP430F67471",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67471"
+ ]
+ },
+ {
+ "id": "MSP430F67471A",
+ "type": "devices",
+ "name": "MSP430F67471A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67471A"
+ ]
+ },
+ {
+ "id": "MSP430F6747A",
+ "type": "devices",
+ "name": "MSP430F6747A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6747A"
+ ]
+ },
+ {
+ "id": "MSP430F6748",
+ "type": "devices",
+ "name": "MSP430F6748",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6748"
+ ]
+ },
+ {
+ "id": "MSP430F67481",
+ "type": "devices",
+ "name": "MSP430F67481",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67481"
+ ]
+ },
+ {
+ "id": "MSP430F67481A",
+ "type": "devices",
+ "name": "MSP430F67481A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67481A"
+ ]
+ },
+ {
+ "id": "MSP430F6748A",
+ "type": "devices",
+ "name": "MSP430F6748A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6748A"
+ ]
+ },
+ {
+ "id": "MSP430F6749",
+ "type": "devices",
+ "name": "MSP430F6749",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6749"
+ ]
+ },
+ {
+ "id": "MSP430F67491",
+ "type": "devices",
+ "name": "MSP430F67491",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67491"
+ ]
+ },
+ {
+ "id": "MSP430F67491A",
+ "type": "devices",
+ "name": "MSP430F67491A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67491A"
+ ]
+ },
+ {
+ "id": "MSP430F6749A",
+ "type": "devices",
+ "name": "MSP430F6749A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6749A"
+ ]
+ },
+ {
+ "id": "MSP430F67621",
+ "type": "devices",
+ "name": "MSP430F67621",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67621"
+ ]
+ },
+ {
+ "id": "MSP430F67621A",
+ "type": "devices",
+ "name": "MSP430F67621A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67621A"
+ ]
+ },
+ {
+ "id": "MSP430F67641",
+ "type": "devices",
+ "name": "MSP430F67641",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67641"
+ ]
+ },
+ {
+ "id": "MSP430F67641A",
+ "type": "devices",
+ "name": "MSP430F67641A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67641A"
+ ]
+ },
+ {
+ "id": "MSP430F6765",
+ "type": "devices",
+ "name": "MSP430F6765",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6765"
+ ]
+ },
+ {
+ "id": "MSP430F67651",
+ "type": "devices",
+ "name": "MSP430F67651",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67651"
+ ]
+ },
+ {
+ "id": "MSP430F67651A",
+ "type": "devices",
+ "name": "MSP430F67651A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67651A"
+ ]
+ },
+ {
+ "id": "MSP430F6765A",
+ "type": "devices",
+ "name": "MSP430F6765A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6765A"
+ ]
+ },
+ {
+ "id": "MSP430F6766",
+ "type": "devices",
+ "name": "MSP430F6766",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6766"
+ ]
+ },
+ {
+ "id": "MSP430F67661",
+ "type": "devices",
+ "name": "MSP430F67661",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67661"
+ ]
+ },
+ {
+ "id": "MSP430F67661A",
+ "type": "devices",
+ "name": "MSP430F67661A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67661A"
+ ]
+ },
+ {
+ "id": "MSP430F6766A",
+ "type": "devices",
+ "name": "MSP430F6766A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6766A"
+ ]
+ },
+ {
+ "id": "MSP430F6767",
+ "type": "devices",
+ "name": "MSP430F6767",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6767"
+ ]
+ },
+ {
+ "id": "MSP430F67671",
+ "type": "devices",
+ "name": "MSP430F67671",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67671"
+ ]
+ },
+ {
+ "id": "MSP430F67671A",
+ "type": "devices",
+ "name": "MSP430F67671A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67671A"
+ ]
+ },
+ {
+ "id": "MSP430F6767A",
+ "type": "devices",
+ "name": "MSP430F6767A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6767A"
+ ]
+ },
+ {
+ "id": "MSP430F6768",
+ "type": "devices",
+ "name": "MSP430F6768",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6768"
+ ]
+ },
+ {
+ "id": "MSP430F67681",
+ "type": "devices",
+ "name": "MSP430F67681",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67681"
+ ]
+ },
+ {
+ "id": "MSP430F67681A",
+ "type": "devices",
+ "name": "MSP430F67681A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67681A"
+ ]
+ },
+ {
+ "id": "MSP430F6768A",
+ "type": "devices",
+ "name": "MSP430F6768A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6768A"
+ ]
+ },
+ {
+ "id": "MSP430F6769",
+ "type": "devices",
+ "name": "MSP430F6769",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6769"
+ ]
+ },
+ {
+ "id": "MSP430F67691",
+ "type": "devices",
+ "name": "MSP430F67691",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67691"
+ ]
+ },
+ {
+ "id": "MSP430F67691A",
+ "type": "devices",
+ "name": "MSP430F67691A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67691A"
+ ]
+ },
+ {
+ "id": "MSP430F6769A",
+ "type": "devices",
+ "name": "MSP430F6769A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6769A"
+ ]
+ },
+ {
+ "id": "MSP430F6775",
+ "type": "devices",
+ "name": "MSP430F6775",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6775"
+ ]
+ },
+ {
+ "id": "MSP430F67751",
+ "type": "devices",
+ "name": "MSP430F67751",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67751"
+ ]
+ },
+ {
+ "id": "MSP430F67751A",
+ "type": "devices",
+ "name": "MSP430F67751A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67751A"
+ ]
+ },
+ {
+ "id": "MSP430F6775A",
+ "type": "devices",
+ "name": "MSP430F6775A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6775A"
+ ]
+ },
+ {
+ "id": "MSP430F6776",
+ "type": "devices",
+ "name": "MSP430F6776",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6776"
+ ]
+ },
+ {
+ "id": "MSP430F67761",
+ "type": "devices",
+ "name": "MSP430F67761",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67761"
+ ]
+ },
+ {
+ "id": "MSP430F67761A",
+ "type": "devices",
+ "name": "MSP430F67761A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67761A"
+ ]
+ },
+ {
+ "id": "MSP430F6776A",
+ "type": "devices",
+ "name": "MSP430F6776A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6776A"
+ ]
+ },
+ {
+ "id": "MSP430F6777",
+ "type": "devices",
+ "name": "MSP430F6777",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6777"
+ ]
+ },
+ {
+ "id": "MSP430F67771",
+ "type": "devices",
+ "name": "MSP430F67771",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67771"
+ ]
+ },
+ {
+ "id": "MSP430F67771A",
+ "type": "devices",
+ "name": "MSP430F67771A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67771A"
+ ]
+ },
+ {
+ "id": "MSP430F6777A",
+ "type": "devices",
+ "name": "MSP430F6777A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6777A"
+ ]
+ },
+ {
+ "id": "MSP430F6778",
+ "type": "devices",
+ "name": "MSP430F6778",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6778"
+ ]
+ },
+ {
+ "id": "MSP430F67781",
+ "type": "devices",
+ "name": "MSP430F67781",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67781"
+ ]
+ },
+ {
+ "id": "MSP430F67781A",
+ "type": "devices",
+ "name": "MSP430F67781A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67781A"
+ ]
+ },
+ {
+ "id": "MSP430F6778A",
+ "type": "devices",
+ "name": "MSP430F6778A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6778A"
+ ]
+ },
+ {
+ "id": "MSP430F6779",
+ "type": "devices",
+ "name": "MSP430F6779",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6779"
+ ]
+ },
+ {
+ "id": "MSP430F67791",
+ "type": "devices",
+ "name": "MSP430F67791",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67791"
+ ]
+ },
+ {
+ "id": "MSP430F67791A",
+ "type": "devices",
+ "name": "MSP430F67791A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F67791A"
+ ]
+ },
+ {
+ "id": "MSP430F6779A",
+ "type": "devices",
+ "name": "MSP430F6779A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430F6779A"
+ ]
+ },
+ {
+ "id": "MSP430FE4232",
+ "type": "devices",
+ "name": "MSP430FE4232",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FE4232"
+ ]
+ },
+ {
+ "id": "MSP430FE423A",
+ "type": "devices",
+ "name": "MSP430FE423A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FE423A"
+ ]
+ },
+ {
+ "id": "MSP430FE4242",
+ "type": "devices",
+ "name": "MSP430FE4242",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FE4242"
+ ]
+ },
+ {
+ "id": "MSP430FE4252",
+ "type": "devices",
+ "name": "MSP430FE4252",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FE4252"
+ ]
+ },
+ {
+ "id": "MSP430FE425A",
+ "type": "devices",
+ "name": "MSP430FE425A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FE425A"
+ ]
+ },
+ {
+ "id": "MSP430FE427",
+ "type": "devices",
+ "name": "MSP430FE427",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FE427"
+ ]
+ },
+ {
+ "id": "MSP430FE4272",
+ "type": "devices",
+ "name": "MSP430FE4272",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FE4272"
+ ]
+ },
+ {
+ "id": "MSP430FE427A",
+ "type": "devices",
+ "name": "MSP430FE427A",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FE427A"
+ ]
+ },
+ {
+ "id": "MSP430FG4250",
+ "type": "devices",
+ "name": "MSP430FG4250",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG4250"
+ ]
+ },
+ {
+ "id": "MSP430FG4260",
+ "type": "devices",
+ "name": "MSP430FG4260",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG4260"
+ ]
+ },
+ {
+ "id": "MSP430FG4270",
+ "type": "devices",
+ "name": "MSP430FG4270",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG4270"
+ ]
+ },
+ {
+ "id": "MSP430FG437",
+ "type": "devices",
+ "name": "MSP430FG437",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG437"
+ ]
+ },
+ {
+ "id": "MSP430FG438",
+ "type": "devices",
+ "name": "MSP430FG438",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG438"
+ ]
+ },
+ {
+ "id": "MSP430FG439",
+ "type": "devices",
+ "name": "MSP430FG439",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG439"
+ ]
+ },
+ {
+ "id": "MSP430FG4616",
+ "type": "devices",
+ "name": "MSP430FG4616",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG4616"
+ ]
+ },
+ {
+ "id": "MSP430FG4617",
+ "type": "devices",
+ "name": "MSP430FG4617",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG4617"
+ ]
+ },
+ {
+ "id": "MSP430FG4618",
+ "type": "devices",
+ "name": "MSP430FG4618",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG4618"
+ ]
+ },
+ {
+ "id": "MSP430FG4619",
+ "type": "devices",
+ "name": "MSP430FG4619",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG4619"
+ ]
+ },
+ {
+ "id": "MSP430FG477",
+ "type": "devices",
+ "name": "MSP430FG477",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG477"
+ ]
+ },
+ {
+ "id": "MSP430FG478",
+ "type": "devices",
+ "name": "MSP430FG478",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG478"
+ ]
+ },
+ {
+ "id": "MSP430FG479",
+ "type": "devices",
+ "name": "MSP430FG479",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG479"
+ ]
+ },
+ {
+ "id": "MSP430FG6425",
+ "type": "devices",
+ "name": "MSP430FG6425",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG6425"
+ ]
+ },
+ {
+ "id": "MSP430FG6426",
+ "type": "devices",
+ "name": "MSP430FG6426",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG6426"
+ ]
+ },
+ {
+ "id": "MSP430FG6625",
+ "type": "devices",
+ "name": "MSP430FG6625",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG6625"
+ ]
+ },
+ {
+ "id": "MSP430FG6626",
+ "type": "devices",
+ "name": "MSP430FG6626",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FG6626"
+ ]
+ },
+ {
+ "id": "MSP430FR2000",
+ "type": "devices",
+ "name": "MSP430FR2000",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2000"
+ ]
+ },
+ {
+ "id": "MSP430FR2032",
+ "type": "devices",
+ "name": "MSP430FR2032",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2032"
+ ]
+ },
+ {
+ "id": "MSP430FR2033",
+ "type": "devices",
+ "name": "MSP430FR2033",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2033"
+ ]
+ },
+ {
+ "id": "MSP430FR2100",
+ "type": "devices",
+ "name": "MSP430FR2100",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2100"
+ ]
+ },
+ {
+ "id": "MSP430FR2110",
+ "type": "devices",
+ "name": "MSP430FR2110",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2110"
+ ]
+ },
+ {
+ "id": "MSP430FR2111",
+ "type": "devices",
+ "name": "MSP430FR2111",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2111"
+ ]
+ },
+ {
+ "id": "MSP430FR2310",
+ "type": "devices",
+ "name": "MSP430FR2310",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2310"
+ ]
+ },
+ {
+ "id": "MSP430FR2311",
+ "type": "devices",
+ "name": "MSP430FR2311",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2311"
+ ]
+ },
+ {
+ "id": "MSP430FR2422",
+ "type": "devices",
+ "name": "MSP430FR2422",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2422"
+ ]
+ },
+ {
+ "id": "MSP430FR2433",
+ "type": "devices",
+ "name": "MSP430FR2433",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2433"
+ ]
+ },
+ {
+ "id": "MSP430FR2512",
+ "type": "devices",
+ "name": "MSP430FR2512",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2512"
+ ]
+ },
+ {
+ "id": "MSP430FR2522",
+ "type": "devices",
+ "name": "MSP430FR2522",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2522"
+ ]
+ },
+ {
+ "id": "MSP430FR2532",
+ "type": "devices",
+ "name": "MSP430FR2532",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2532"
+ ]
+ },
+ {
+ "id": "MSP430FR2533",
+ "type": "devices",
+ "name": "MSP430FR2533",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2533"
+ ]
+ },
+ {
+ "id": "MSP430FR2632",
+ "type": "devices",
+ "name": "MSP430FR2632",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2632"
+ ]
+ },
+ {
+ "id": "MSP430FR2633",
+ "type": "devices",
+ "name": "MSP430FR2633",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR2633"
+ ]
+ },
+ {
+ "id": "MSP430FR4131",
+ "type": "devices",
+ "name": "MSP430FR4131",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR4131"
+ ]
+ },
+ {
+ "id": "MSP430FR4132",
+ "type": "devices",
+ "name": "MSP430FR4132",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR4132"
+ ]
+ },
+ {
+ "id": "MSP430FR4133",
+ "type": "devices",
+ "name": "MSP430FR4133",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR4133"
+ ]
+ },
+ {
+ "id": "MSP430FR5720",
+ "type": "devices",
+ "name": "MSP430FR5720",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5720"
+ ]
+ },
+ {
+ "id": "MSP430FR5721",
+ "type": "devices",
+ "name": "MSP430FR5721",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5721"
+ ]
+ },
+ {
+ "id": "MSP430FR5722",
+ "type": "devices",
+ "name": "MSP430FR5722",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5722"
+ ]
+ },
+ {
+ "id": "MSP430FR5723",
+ "type": "devices",
+ "name": "MSP430FR5723",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5723"
+ ]
+ },
+ {
+ "id": "MSP430FR5724",
+ "type": "devices",
+ "name": "MSP430FR5724",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5724"
+ ]
+ },
+ {
+ "id": "MSP430FR5725",
+ "type": "devices",
+ "name": "MSP430FR5725",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5725"
+ ]
+ },
+ {
+ "id": "MSP430FR5726",
+ "type": "devices",
+ "name": "MSP430FR5726",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5726"
+ ]
+ },
+ {
+ "id": "MSP430FR5727",
+ "type": "devices",
+ "name": "MSP430FR5727",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5727"
+ ]
+ },
+ {
+ "id": "MSP430FR5728",
+ "type": "devices",
+ "name": "MSP430FR5728",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5728"
+ ]
+ },
+ {
+ "id": "MSP430FR5729",
+ "type": "devices",
+ "name": "MSP430FR5729",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5729"
+ ]
+ },
+ {
+ "id": "MSP430FR5730",
+ "type": "devices",
+ "name": "MSP430FR5730",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5730"
+ ]
+ },
+ {
+ "id": "MSP430FR5731",
+ "type": "devices",
+ "name": "MSP430FR5731",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5731"
+ ]
+ },
+ {
+ "id": "MSP430FR5732",
+ "type": "devices",
+ "name": "MSP430FR5732",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5732"
+ ]
+ },
+ {
+ "id": "MSP430FR5733",
+ "type": "devices",
+ "name": "MSP430FR5733",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5733"
+ ]
+ },
+ {
+ "id": "MSP430FR5734",
+ "type": "devices",
+ "name": "MSP430FR5734",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5734"
+ ]
+ },
+ {
+ "id": "MSP430FR5735",
+ "type": "devices",
+ "name": "MSP430FR5735",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5735"
+ ]
+ },
+ {
+ "id": "MSP430FR5736",
+ "type": "devices",
+ "name": "MSP430FR5736",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5736"
+ ]
+ },
+ {
+ "id": "MSP430FR5737",
+ "type": "devices",
+ "name": "MSP430FR5737",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5737"
+ ]
+ },
+ {
+ "id": "MSP430FR5738",
+ "type": "devices",
+ "name": "MSP430FR5738",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5738"
+ ]
+ },
+ {
+ "id": "MSP430FR5739",
+ "type": "devices",
+ "name": "MSP430FR5739",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5739"
+ ]
+ },
+ {
+ "id": "MSP430FR5847",
+ "type": "devices",
+ "name": "MSP430FR5847",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5847"
+ ]
+ },
+ {
+ "id": "MSP430FR58471",
+ "type": "devices",
+ "name": "MSP430FR58471",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR58471"
+ ]
+ },
+ {
+ "id": "MSP430FR5848",
+ "type": "devices",
+ "name": "MSP430FR5848",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5848"
+ ]
+ },
+ {
+ "id": "MSP430FR5849",
+ "type": "devices",
+ "name": "MSP430FR5849",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5849"
+ ]
+ },
+ {
+ "id": "MSP430FR5857",
+ "type": "devices",
+ "name": "MSP430FR5857",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5857"
+ ]
+ },
+ {
+ "id": "MSP430FR5858",
+ "type": "devices",
+ "name": "MSP430FR5858",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5858"
+ ]
+ },
+ {
+ "id": "MSP430FR5859",
+ "type": "devices",
+ "name": "MSP430FR5859",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5859"
+ ]
+ },
+ {
+ "id": "MSP430FR5867",
+ "type": "devices",
+ "name": "MSP430FR5867",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5867"
+ ]
+ },
+ {
+ "id": "MSP430FR58671",
+ "type": "devices",
+ "name": "MSP430FR58671",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR58671"
+ ]
+ },
+ {
+ "id": "MSP430FR5868",
+ "type": "devices",
+ "name": "MSP430FR5868",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5868"
+ ]
+ },
+ {
+ "id": "MSP430FR5869",
+ "type": "devices",
+ "name": "MSP430FR5869",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5869"
+ ]
+ },
+ {
+ "id": "MSP430FR5870",
+ "type": "devices",
+ "name": "MSP430FR5870",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5870"
+ ]
+ },
+ {
+ "id": "MSP430FR5872",
+ "type": "devices",
+ "name": "MSP430FR5872",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5872"
+ ]
+ },
+ {
+ "id": "MSP430FR58721",
+ "type": "devices",
+ "name": "MSP430FR58721",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR58721"
+ ]
+ },
+ {
+ "id": "MSP430FR5887",
+ "type": "devices",
+ "name": "MSP430FR5887",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5887"
+ ]
+ },
+ {
+ "id": "MSP430FR5888",
+ "type": "devices",
+ "name": "MSP430FR5888",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5888"
+ ]
+ },
+ {
+ "id": "MSP430FR5889",
+ "type": "devices",
+ "name": "MSP430FR5889",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5889"
+ ]
+ },
+ {
+ "id": "MSP430FR58891",
+ "type": "devices",
+ "name": "MSP430FR58891",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR58891"
+ ]
+ },
+ {
+ "id": "MSP430FR5922",
+ "type": "devices",
+ "name": "MSP430FR5922",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5922"
+ ]
+ },
+ {
+ "id": "MSP430FR59221",
+ "type": "devices",
+ "name": "MSP430FR59221",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR59221"
+ ]
+ },
+ {
+ "id": "MSP430FR5947",
+ "type": "devices",
+ "name": "MSP430FR5947",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5947"
+ ]
+ },
+ {
+ "id": "MSP430FR59471",
+ "type": "devices",
+ "name": "MSP430FR59471",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR59471"
+ ]
+ },
+ {
+ "id": "MSP430FR5948",
+ "type": "devices",
+ "name": "MSP430FR5948",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5948"
+ ]
+ },
+ {
+ "id": "MSP430FR5949",
+ "type": "devices",
+ "name": "MSP430FR5949",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5949"
+ ]
+ },
+ {
+ "id": "MSP430FR5957",
+ "type": "devices",
+ "name": "MSP430FR5957",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5957"
+ ]
+ },
+ {
+ "id": "MSP430FR5958",
+ "type": "devices",
+ "name": "MSP430FR5958",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5958"
+ ]
+ },
+ {
+ "id": "MSP430FR5959",
+ "type": "devices",
+ "name": "MSP430FR5959",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5959"
+ ]
+ },
+ {
+ "id": "MSP430FR5962",
+ "type": "devices",
+ "name": "MSP430FR5962",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5962"
+ ]
+ },
+ {
+ "id": "MSP430FR5964",
+ "type": "devices",
+ "name": "MSP430FR5964",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5964"
+ ]
+ },
+ {
+ "id": "MSP430FR5967",
+ "type": "devices",
+ "name": "MSP430FR5967",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5967"
+ ]
+ },
+ {
+ "id": "MSP430FR5968",
+ "type": "devices",
+ "name": "MSP430FR5968",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5968"
+ ]
+ },
+ {
+ "id": "MSP430FR5969",
+ "type": "devices",
+ "name": "MSP430FR5969",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5969"
+ ]
+ },
+ {
+ "id": "MSP430FR59691",
+ "type": "devices",
+ "name": "MSP430FR59691",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR59691"
+ ]
+ },
+ {
+ "id": "MSP430FR5970",
+ "type": "devices",
+ "name": "MSP430FR5970",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5970"
+ ]
+ },
+ {
+ "id": "MSP430FR5972",
+ "type": "devices",
+ "name": "MSP430FR5972",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5972"
+ ]
+ },
+ {
+ "id": "MSP430FR59721",
+ "type": "devices",
+ "name": "MSP430FR59721",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR59721"
+ ]
+ },
+ {
+ "id": "MSP430FR5986",
+ "type": "devices",
+ "name": "MSP430FR5986",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5986"
+ ]
+ },
+ {
+ "id": "MSP430FR5987",
+ "type": "devices",
+ "name": "MSP430FR5987",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5987"
+ ]
+ },
+ {
+ "id": "MSP430FR5988",
+ "type": "devices",
+ "name": "MSP430FR5988",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5988"
+ ]
+ },
+ {
+ "id": "MSP430FR5989",
+ "type": "devices",
+ "name": "MSP430FR5989",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5989"
+ ]
+ },
+ {
+ "id": "MSP430FR59891",
+ "type": "devices",
+ "name": "MSP430FR59891",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR59891"
+ ]
+ },
+ {
+ "id": "MSP430FR5992",
+ "type": "devices",
+ "name": "MSP430FR5992",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5992"
+ ]
+ },
+ {
+ "id": "MSP430FR5994",
+ "type": "devices",
+ "name": "MSP430FR5994",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR5994"
+ ]
+ },
+ {
+ "id": "MSP430FR59941",
+ "type": "devices",
+ "name": "MSP430FR59941",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR59941"
+ ]
+ },
+ {
+ "id": "MSP430FR6035",
+ "type": "devices",
+ "name": "MSP430FR6035",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6035"
+ ]
+ },
+ {
+ "id": "MSP430FR6037",
+ "type": "devices",
+ "name": "MSP430FR6037",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6037"
+ ]
+ },
+ {
+ "id": "MSP430FR60371",
+ "type": "devices",
+ "name": "MSP430FR60371",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR60371"
+ ]
+ },
+ {
+ "id": "MSP430FR6045",
+ "type": "devices",
+ "name": "MSP430FR6045",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6045"
+ ]
+ },
+ {
+ "id": "MSP430FR6047",
+ "type": "devices",
+ "name": "MSP430FR6047",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6047"
+ ]
+ },
+ {
+ "id": "MSP430FR60471",
+ "type": "devices",
+ "name": "MSP430FR60471",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR60471"
+ ]
+ },
+ {
+ "id": "MSP430FR6820",
+ "type": "devices",
+ "name": "MSP430FR6820",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6820"
+ ]
+ },
+ {
+ "id": "MSP430FR6822",
+ "type": "devices",
+ "name": "MSP430FR6822",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6822"
+ ]
+ },
+ {
+ "id": "MSP430FR68221",
+ "type": "devices",
+ "name": "MSP430FR68221",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR68221"
+ ]
+ },
+ {
+ "id": "MSP430FR6870",
+ "type": "devices",
+ "name": "MSP430FR6870",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6870"
+ ]
+ },
+ {
+ "id": "MSP430FR6872",
+ "type": "devices",
+ "name": "MSP430FR6872",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6872"
+ ]
+ },
+ {
+ "id": "MSP430FR68721",
+ "type": "devices",
+ "name": "MSP430FR68721",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR68721"
+ ]
+ },
+ {
+ "id": "MSP430FR6877",
+ "type": "devices",
+ "name": "MSP430FR6877",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6877"
+ ]
+ },
+ {
+ "id": "MSP430FR6879",
+ "type": "devices",
+ "name": "MSP430FR6879",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6879"
+ ]
+ },
+ {
+ "id": "MSP430FR68791",
+ "type": "devices",
+ "name": "MSP430FR68791",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR68791"
+ ]
+ },
+ {
+ "id": "MSP430FR6887",
+ "type": "devices",
+ "name": "MSP430FR6887",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6887"
+ ]
+ },
+ {
+ "id": "MSP430FR6888",
+ "type": "devices",
+ "name": "MSP430FR6888",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6888"
+ ]
+ },
+ {
+ "id": "MSP430FR6889",
+ "type": "devices",
+ "name": "MSP430FR6889",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6889"
+ ]
+ },
+ {
+ "id": "MSP430FR68891",
+ "type": "devices",
+ "name": "MSP430FR68891",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR68891"
+ ]
+ },
+ {
+ "id": "MSP430FR6920",
+ "type": "devices",
+ "name": "MSP430FR6920",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6920"
+ ]
+ },
+ {
+ "id": "MSP430FR6922",
+ "type": "devices",
+ "name": "MSP430FR6922",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6922"
+ ]
+ },
+ {
+ "id": "MSP430FR69221",
+ "type": "devices",
+ "name": "MSP430FR69221",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR69221"
+ ]
+ },
+ {
+ "id": "MSP430FR6927",
+ "type": "devices",
+ "name": "MSP430FR6927",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6927"
+ ]
+ },
+ {
+ "id": "MSP430FR69271",
+ "type": "devices",
+ "name": "MSP430FR69271",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR69271"
+ ]
+ },
+ {
+ "id": "MSP430FR6928",
+ "type": "devices",
+ "name": "MSP430FR6928",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6928"
+ ]
+ },
+ {
+ "id": "MSP430FR6970",
+ "type": "devices",
+ "name": "MSP430FR6970",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6970"
+ ]
+ },
+ {
+ "id": "MSP430FR6972",
+ "type": "devices",
+ "name": "MSP430FR6972",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6972"
+ ]
+ },
+ {
+ "id": "MSP430FR69721",
+ "type": "devices",
+ "name": "MSP430FR69721",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR69721"
+ ]
+ },
+ {
+ "id": "MSP430FR6977",
+ "type": "devices",
+ "name": "MSP430FR6977",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6977"
+ ]
+ },
+ {
+ "id": "MSP430FR6979",
+ "type": "devices",
+ "name": "MSP430FR6979",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6979"
+ ]
+ },
+ {
+ "id": "MSP430FR69791",
+ "type": "devices",
+ "name": "MSP430FR69791",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR69791"
+ ]
+ },
+ {
+ "id": "MSP430FR6987",
+ "type": "devices",
+ "name": "MSP430FR6987",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6987"
+ ]
+ },
+ {
+ "id": "MSP430FR6988",
+ "type": "devices",
+ "name": "MSP430FR6988",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6988"
+ ]
+ },
+ {
+ "id": "MSP430FR6989",
+ "type": "devices",
+ "name": "MSP430FR6989",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR6989"
+ ]
+ },
+ {
+ "id": "MSP430FR69891",
+ "type": "devices",
+ "name": "MSP430FR69891",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FR69891"
+ ]
+ },
+ {
+ "id": "MSP430FW423",
+ "type": "devices",
+ "name": "MSP430FW423",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FW423"
+ ]
+ },
+ {
+ "id": "MSP430FW425",
+ "type": "devices",
+ "name": "MSP430FW425",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FW425"
+ ]
+ },
+ {
+ "id": "MSP430FW427",
+ "type": "devices",
+ "name": "MSP430FW427",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FW427"
+ ]
+ },
+ {
+ "id": "MSP430FW428",
+ "type": "devices",
+ "name": "MSP430FW428",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FW428"
+ ]
+ },
+ {
+ "id": "MSP430FW429",
+ "type": "devices",
+ "name": "MSP430FW429",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430FW429"
+ ]
+ },
+ {
+ "id": "MSP430G2001",
+ "type": "devices",
+ "name": "MSP430G2001",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2001"
+ ]
+ },
+ {
+ "id": "MSP430G2101",
+ "type": "devices",
+ "name": "MSP430G2101",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2101"
+ ]
+ },
+ {
+ "id": "MSP430G2102",
+ "type": "devices",
+ "name": "MSP430G2102",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2102"
+ ]
+ },
+ {
+ "id": "MSP430G2111",
+ "type": "devices",
+ "name": "MSP430G2111",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2111"
+ ]
+ },
+ {
+ "id": "MSP430G2112",
+ "type": "devices",
+ "name": "MSP430G2112",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2112"
+ ]
+ },
+ {
+ "id": "MSP430G2113",
+ "type": "devices",
+ "name": "MSP430G2113",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2113"
+ ]
+ },
+ {
+ "id": "MSP430G2121",
+ "type": "devices",
+ "name": "MSP430G2121",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2121"
+ ]
+ },
+ {
+ "id": "MSP430G2131",
+ "type": "devices",
+ "name": "MSP430G2131",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2131"
+ ]
+ },
+ {
+ "id": "MSP430G2132",
+ "type": "devices",
+ "name": "MSP430G2132",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2132"
+ ]
+ },
+ {
+ "id": "MSP430G2152",
+ "type": "devices",
+ "name": "MSP430G2152",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2152"
+ ]
+ },
+ {
+ "id": "MSP430G2153",
+ "type": "devices",
+ "name": "MSP430G2153",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2153"
+ ]
+ },
+ {
+ "id": "MSP430G2201",
+ "type": "devices",
+ "name": "MSP430G2201",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2201"
+ ]
+ },
+ {
+ "id": "MSP430G2202",
+ "type": "devices",
+ "name": "MSP430G2202",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2202"
+ ]
+ },
+ {
+ "id": "MSP430G2203",
+ "type": "devices",
+ "name": "MSP430G2203",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2203"
+ ]
+ },
+ {
+ "id": "MSP430G2210",
+ "type": "devices",
+ "name": "MSP430G2210",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2210"
+ ]
+ },
+ {
+ "id": "MSP430G2211",
+ "type": "devices",
+ "name": "MSP430G2211",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2211"
+ ]
+ },
+ {
+ "id": "MSP430G2212",
+ "type": "devices",
+ "name": "MSP430G2212",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2212"
+ ]
+ },
+ {
+ "id": "MSP430G2213",
+ "type": "devices",
+ "name": "MSP430G2213",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2213"
+ ]
+ },
+ {
+ "id": "MSP430G2221",
+ "type": "devices",
+ "name": "MSP430G2221",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2221"
+ ]
+ },
+ {
+ "id": "MSP430G2230",
+ "type": "devices",
+ "name": "MSP430G2230",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2230"
+ ]
+ },
+ {
+ "id": "MSP430G2231",
+ "type": "devices",
+ "name": "MSP430G2231",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2231"
+ ]
+ },
+ {
+ "id": "MSP430G2232",
+ "type": "devices",
+ "name": "MSP430G2232",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2232"
+ ]
+ },
+ {
+ "id": "MSP430G2233",
+ "type": "devices",
+ "name": "MSP430G2233",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2233"
+ ]
+ },
+ {
+ "id": "MSP430G2252",
+ "type": "devices",
+ "name": "MSP430G2252",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2252"
+ ]
+ },
+ {
+ "id": "MSP430G2253",
+ "type": "devices",
+ "name": "MSP430G2253",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2253"
+ ]
+ },
+ {
+ "id": "MSP430G2302",
+ "type": "devices",
+ "name": "MSP430G2302",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2302"
+ ]
+ },
+ {
+ "id": "MSP430G2303",
+ "type": "devices",
+ "name": "MSP430G2303",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2303"
+ ]
+ },
+ {
+ "id": "MSP430G2312",
+ "type": "devices",
+ "name": "MSP430G2312",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2312"
+ ]
+ },
+ {
+ "id": "MSP430G2313",
+ "type": "devices",
+ "name": "MSP430G2313",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2313"
+ ]
+ },
+ {
+ "id": "MSP430G2332",
+ "type": "devices",
+ "name": "MSP430G2332",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2332"
+ ]
+ },
+ {
+ "id": "MSP430G2333",
+ "type": "devices",
+ "name": "MSP430G2333",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2333"
+ ]
+ },
+ {
+ "id": "MSP430G2352",
+ "type": "devices",
+ "name": "MSP430G2352",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2352"
+ ]
+ },
+ {
+ "id": "MSP430G2353",
+ "type": "devices",
+ "name": "MSP430G2353",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2353"
+ ]
+ },
+ {
+ "id": "MSP430G2402",
+ "type": "devices",
+ "name": "MSP430G2402",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2402"
+ ]
+ },
+ {
+ "id": "MSP430G2403",
+ "type": "devices",
+ "name": "MSP430G2403",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2403"
+ ]
+ },
+ {
+ "id": "MSP430G2412",
+ "type": "devices",
+ "name": "MSP430G2412",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2412"
+ ]
+ },
+ {
+ "id": "MSP430G2413",
+ "type": "devices",
+ "name": "MSP430G2413",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2413"
+ ]
+ },
+ {
+ "id": "MSP430G2432",
+ "type": "devices",
+ "name": "MSP430G2432",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2432"
+ ]
+ },
+ {
+ "id": "MSP430G2433",
+ "type": "devices",
+ "name": "MSP430G2433",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2433"
+ ]
+ },
+ {
+ "id": "MSP430G2444",
+ "type": "devices",
+ "name": "MSP430G2444",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2444"
+ ]
+ },
+ {
+ "id": "MSP430G2452",
+ "type": "devices",
+ "name": "MSP430G2452",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2452"
+ ]
+ },
+ {
+ "id": "MSP430G2453",
+ "type": "devices",
+ "name": "MSP430G2453",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2453"
+ ]
+ },
+ {
+ "id": "MSP430G2513",
+ "type": "devices",
+ "name": "MSP430G2513",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2513"
+ ]
+ },
+ {
+ "id": "MSP430G2533",
+ "type": "devices",
+ "name": "MSP430G2533",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2533"
+ ]
+ },
+ {
+ "id": "MSP430G2544",
+ "type": "devices",
+ "name": "MSP430G2544",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2544"
+ ]
+ },
+ {
+ "id": "MSP430G2553",
+ "type": "devices",
+ "name": "MSP430G2553",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2553"
+ ]
+ },
+ {
+ "id": "MSP430G2744",
+ "type": "devices",
+ "name": "MSP430G2744",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2744"
+ ]
+ },
+ {
+ "id": "MSP430G2755",
+ "type": "devices",
+ "name": "MSP430G2755",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2755"
+ ]
+ },
+ {
+ "id": "MSP430G2855",
+ "type": "devices",
+ "name": "MSP430G2855",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2855"
+ ]
+ },
+ {
+ "id": "MSP430G2955",
+ "type": "devices",
+ "name": "MSP430G2955",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430G2955"
+ ]
+ },
+ {
+ "id": "MSP430i2020",
+ "type": "devices",
+ "name": "MSP430I2020",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430i2020"
+ ]
+ },
+ {
+ "id": "MSP430i2021",
+ "type": "devices",
+ "name": "MSP430I2021",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430i2021"
+ ]
+ },
+ {
+ "id": "MSP430i2030",
+ "type": "devices",
+ "name": "MSP430I2030",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430i2030"
+ ]
+ },
+ {
+ "id": "MSP430i2031",
+ "type": "devices",
+ "name": "MSP430I2031",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430i2031"
+ ]
+ },
+ {
+ "id": "MSP430i2040",
+ "type": "devices",
+ "name": "MSP430I2040",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430i2040"
+ ]
+ },
+ {
+ "id": "MSP430i2041",
+ "type": "devices",
+ "name": "MSP430I2041",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430i2041"
+ ]
+ },
+ {
+ "id": "MSP430L092",
+ "type": "devices",
+ "name": "MSP430L092",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devices",
+ "packageUId": "msp430_devices__3.80.03.07",
+ "coreTypes_name": [
+ "MSP430"
+ ],
+ "coreTypes_id": [
+ "MSP430L092"
+ ]
+ },
+ {
+ "name": "MSP432E401Y",
+ "id": "MSP432E401Y",
+ "type": "device",
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devices",
+ "packageUId": "msp432_devices__2.10.00.01",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "MSP432E401Y"
+ ]
+ },
+ {
+ "name": "MSP432E411Y",
+ "id": "MSP432E411Y",
+ "type": "device",
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devices",
+ "packageUId": "msp432_devices__2.10.00.01",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "MSP432E411Y"
+ ]
+ },
+ {
+ "name": "MSP432P4011",
+ "id": "MSP432P4011",
+ "type": "device",
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devices",
+ "packageUId": "msp432_devices__2.10.00.01",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "MSP432P4011"
+ ]
+ },
+ {
+ "name": "MSP432P401M",
+ "id": "MSP432P401M",
+ "type": "device",
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devices",
+ "packageUId": "msp432_devices__2.10.00.01",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "MSP432P401M"
+ ]
+ },
+ {
+ "name": "MSP432P401R",
+ "id": "MSP432P401R",
+ "type": "device",
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devices",
+ "packageUId": "msp432_devices__2.10.00.01",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "MSP432P401R"
+ ]
+ },
+ {
+ "name": "MSP432P401V",
+ "id": "MSP432P401V",
+ "type": "device",
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devices",
+ "packageUId": "msp432_devices__2.10.00.01",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "MSP432P401V"
+ ]
+ },
+ {
+ "name": "MSP432P401Y",
+ "id": "MSP432P401Y",
+ "type": "device",
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devices",
+ "packageUId": "msp432_devices__2.10.00.01",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "MSP432P401Y"
+ ]
+ },
+ {
+ "name": "MSP432P4111",
+ "id": "MSP432P4111",
+ "type": "device",
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devices",
+ "packageUId": "msp432_devices__2.10.00.01",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "MSP432P4111"
+ ]
+ },
+ {
+ "name": "MSP432P411V",
+ "id": "MSP432P411V",
+ "type": "device",
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devices",
+ "packageUId": "msp432_devices__2.10.00.01",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "MSP432P411V"
+ ]
+ },
+ {
+ "name": "MSP432P411Y",
+ "id": "MSP432P411Y",
+ "type": "device",
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devices",
+ "packageUId": "msp432_devices__2.10.00.01",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "MSP432P411Y"
+ ]
+ },
+ {
+ "name": "TM4C123GH6PGE",
+ "id": "TM4C123GH6PGE",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devices",
+ "packageUId": "tivac_devices__1.00.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.TM4C123GH6PGE"
+ ]
+ },
+ {
+ "name": "TM4C123GH6PM",
+ "id": "TM4C123GH6PM",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devices",
+ "packageUId": "tivac_devices__1.00.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.TM4C123GH6PM"
+ ]
+ },
+ {
+ "name": "TM4C123X",
+ "id": "TM4C123X",
+ "type": "device",
+ "description": " The TM4C123x Series MCUs integrates ARM® Cortex®-M4F CPU with single-precision floating-point core operating at up to 80MHz and high-performance analog-to- digital converters while still providing low-power modes that consume as little as 1.6 μA. With up to 40 PWM outputs, a generous number of serial communication peripherals, USB OTG, and two CAN controllers, the TM4C123x series provides an excellent baseline for home, building, and industrial applications. </p><p>For more information, go to the <a target='_blank' href= 'http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/c2000_performance/control_automation/tm4c12x/products.page '>product page</a>.",
+ "image": "tirex-product-tree/tivac_devices_1_00_00_00/.metadata/.tirex/.metadata/images/TM4C123X.png",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devices",
+ "packageUId": "tivac_devices__1.00.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.TM4C123X"
+ ]
+ },
+ {
+ "name": "TM4C1294NCPDT",
+ "id": "TM4C1294NCPDT",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devices",
+ "packageUId": "tivac_devices__1.00.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.TM4C1294NCPDT"
+ ]
+ },
+ {
+ "name": "TM4C129ENCPDT",
+ "id": "TM4C129ENCPDT",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devices",
+ "packageUId": "tivac_devices__1.00.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.TM4C129ENCPDT"
+ ]
+ },
+ {
+ "id": "TM4C129X",
+ "name": "TM4C129X",
+ "type": "device",
+ "description": " The TM4C129x MCUs are the industry’s first ARM® Cortex®-M4F based MCUs with integrated Ethernet MAC+PHY, enabling customers to create a new class of highly connected products bridging the cloud and amplifying the ever-growing Internet of Things (IoT). The TM4C129x MCUs offer a 120MHz CPU and many connectivity options, as well as on-chip data protection and an LCD controller to save board space and enable connected applications, such as IoT gateways, linked home/building automation controllers, factory control and automation, connected human-machine interface (HMI), networked sensor gateways, and many other industrial applications. </p><p>For more information, go to the <a target='_blank' href= 'http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/c2000_performance/control_automation/tm4c12x/products.page '>product page</a>.",
+ "image": "tirex-product-tree/tivac_devices_1_00_00_00/.metadata/.tirex/.metadata/images/TM4C129X.png",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devices",
+ "packageUId": "tivac_devices__1.00.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.TM4C129X"
+ ]
+ },
+ {
+ "name": "TM4C129XNCZAD",
+ "id": "TM4C129XNCZAD",
+ "type": "device",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devices",
+ "packageUId": "tivac_devices__1.00.00.00",
+ "coreTypes_name": [
+ "Cortex M"
+ ],
+ "coreTypes_id": [
+ "Cortex M.TM4C129XNCZAD"
+ ]
+ }
+ ],
+ "devtools": [
+ {
+ "id": "AWR1243BOOST",
+ "name": "AWR1243 Automotive EVM",
+ "type": "board",
+ "devices": [
+ "AWR1243"
+ ],
+ "description": "The AWR1243 EVM is an evaluation board for the AWR1243 mmWave high-performance front end. The evaluation platform enables raw capture of ADC data from the front end and evaluation of RF performance.",
+ "image": "tirex-product-tree/mmwave_devtools_0_3_0/images/AWR1243EVM.jpg",
+ "connections": [
+ ""
+ ],
+ "toolsPage": "http://www.ti.com/tool/AWR1243BOOST",
+ "buyLink": "http://www.ti.com/tool/AWR1243BOOST#buy",
+ "packageVersion": "0.3.0",
+ "packageId": "com.ti.mmwave_devtools",
+ "packageUId": "com.ti.mmwave_devtools__0.3.0"
+ },
+ {
+ "id": "AWR1443BOOST",
+ "name": "AWR1443 Automotive EVM",
+ "type": "board",
+ "devices": [
+ "AWR1443"
+ ],
+ "description": "The AWR1443 EVM from Texas Instruments™ is an easy-to-use evaluation board for the AWR1443 mmWave sensing device, with direct connectivity to the microcontroller (MCU) LaunchPad™ Development Kit. The EVM contains everything required to start developing software for on-chip hardware accelerator and low-power ARM® R4F controllers, including onboard emulation for programming and debugging as well as onboard buttons and LEDs for quick integration of a simple user interface.",
+ "image": "tirex-product-tree/mmwave_devtools_0_3_0/images/AWR1443EVM.jpg",
+ "connections": [
+ ""
+ ],
+ "toolsPage": "http://www.ti.com/tool/AWR1443BOOST",
+ "buyLink": "http://www.ti.com/tool/AWR1443BOOST#buy",
+ "packageVersion": "0.3.0",
+ "packageId": "com.ti.mmwave_devtools",
+ "packageUId": "com.ti.mmwave_devtools__0.3.0"
+ },
+ {
+ "id": "AWR1642BOOST",
+ "name": "AWR1642 Automotive EVM",
+ "type": "board",
+ "devices": [
+ "AWR1642"
+ ],
+ "description": "The AWR1642 EVM from Texas Instruments™ is an easy-to-use evaluation board for the AWR1642 mmWave sensing device, with direct connectivity to the microcontroller (MCU) LaunchPad™ Development Kit. The EVM contains everything required to start developing software for on-chip C67x DSP core and low-power ARM® R4F controllers, including onboard emulation for programming and debugging as well as onboard buttons and LEDs for quick integration of a simple user interface.",
+ "image": "tirex-product-tree/mmwave_devtools_0_3_0/images/AWR1642EVM.jpg",
+ "connections": [
+ ""
+ ],
+ "toolsPage": "http://www.ti.com/tool/AWR1642BOOST",
+ "buyLink": "http://www.ti.com/tool/AWR1642BOOST#buy",
+ "packageVersion": "0.3.0",
+ "packageId": "com.ti.mmwave_devtools",
+ "packageUId": "com.ti.mmwave_devtools__0.3.0"
+ },
+ {
+ "name": "BeagleBone Black",
+ "id": "BeagleBone Black",
+ "type": "board",
+ "description": "BeagleBone Black is the quickest & lowest cost path to AM335x development. At just $45 you can boot Linux in under 10-seconds and get started on development in less than 5 minutes with just a single USB cable.",
+ "image": "tirex-product-tree/sitara_devtools_1_00_00_00/.metadata/.tirex/assets/photos/am335x/med_beaglebk_board_sideways.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devtools",
+ "packageUId": "sitara_devtools__1.00.00.00"
+ },
+ {
+ "id": "CC1310DK",
+ "name": "CC1310 Development Kit",
+ "type": "board",
+ "devices": [
+ "CC1310F32",
+ "CC1310F64",
+ "CC1310F128"
+ ],
+ "connections": [
+ "TIXDS100v3_Dot7_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/cc1310emk"
+ ],
+ "image": "tirex-product-tree/cc13xx_devtools/.metadata/.tirex/img/cc1310dk.jpg",
+ "description": "",
+ "packageVersion": "1.01.00.00",
+ "packageId": "cc13xx_devtools",
+ "packageUId": "cc13xx_devtools__1.01.00.00"
+ },
+ {
+ "id": "LAUNCHXL-CC1310",
+ "name": "CC1310 LaunchPad",
+ "type": "board",
+ "devices": [
+ "CC1310F32",
+ "CC1310F64",
+ "CC1310F128"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/launchxl-cc1310"
+ ],
+ "image": "tirex-product-tree/cc13xx_devtools/.metadata/.tirex/img/launchxl-cc1310_p.jpg",
+ "description": "",
+ "packageVersion": "1.01.00.00",
+ "packageId": "cc13xx_devtools",
+ "packageUId": "cc13xx_devtools__1.01.00.00"
+ },
+ {
+ "id": "LAUNCHXL-CC13-90",
+ "name": "CC1310-CC1190 LaunchPad",
+ "type": "board",
+ "devices": [
+ "CC1310F32",
+ "CC1310F64",
+ "CC1310F128"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/launchxl-cc13-90"
+ ],
+ "image": "tirex-product-tree/cc13xx_devtools/.metadata/.tirex/img/launchxl-cc1310-cc1190_p.jpg",
+ "description": "",
+ "packageVersion": "1.01.00.00",
+ "packageId": "cc13xx_devtools",
+ "packageUId": "cc13xx_devtools__1.01.00.00"
+ },
+ {
+ "id": "LAUNCHXL-CC1312R1",
+ "name": "CC1312R LaunchPad",
+ "type": "board",
+ "devices": [
+ "CC1312R1F3"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/launchxl-cc1312r1"
+ ],
+ "image": "tirex-product-tree/cc13xx_devtools/.metadata/.tirex/img/launchxl-cc1350_p.jpg",
+ "description": "",
+ "packageVersion": "1.01.00.00",
+ "packageId": "cc13xx_devtools",
+ "packageUId": "cc13xx_devtools__1.01.00.00"
+ },
+ {
+ "id": "LAUNCHXL-CC1350",
+ "name": "CC1350 LaunchPad",
+ "type": "board",
+ "devices": [
+ "CC1350F128"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/launchxl-cc1350"
+ ],
+ "image": "tirex-product-tree/cc13xx_devtools/.metadata/.tirex/img/launchxl-cc1350_p.jpg",
+ "description": "",
+ "packageVersion": "1.01.00.00",
+ "packageId": "cc13xx_devtools",
+ "packageUId": "cc13xx_devtools__1.01.00.00"
+ },
+ {
+ "id": "CC1350STK",
+ "name": "CC1350 SensorTag",
+ "type": "board",
+ "devices": [
+ "CC1350F128"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/cc1350stk"
+ ],
+ "image": "tirex-product-tree/cc13xx_devtools/.metadata/.tirex/img/cc1350stk.jpg",
+ "description": "",
+ "packageVersion": "1.01.00.00",
+ "packageId": "cc13xx_devtools",
+ "packageUId": "cc13xx_devtools__1.01.00.00"
+ },
+ {
+ "id": "LAUNCHXL-CC1352P-2",
+ "name": "CC1352P-2 LaunchPad",
+ "type": "board",
+ "devices": [
+ "CC1352P1F3"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/launchxl-cc1352p1"
+ ],
+ "image": "tirex-product-tree/cc13xx_devtools/.metadata/.tirex/img/launchxl-cc1350_p.jpg",
+ "description": "",
+ "packageVersion": "1.01.00.00",
+ "packageId": "cc13xx_devtools",
+ "packageUId": "cc13xx_devtools__1.01.00.00"
+ },
+ {
+ "id": "LAUNCHXL-CC1352P1",
+ "name": "CC1352P1 LaunchPad",
+ "type": "board",
+ "devices": [
+ "CC1352P1F3"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/launchxl-cc1352p1"
+ ],
+ "image": "tirex-product-tree/cc13xx_devtools/.metadata/.tirex/img/launchxl-cc1350_p.jpg",
+ "description": "",
+ "packageVersion": "1.01.00.00",
+ "packageId": "cc13xx_devtools",
+ "packageUId": "cc13xx_devtools__1.01.00.00"
+ },
+ {
+ "id": "LAUNCHXL-CC1352R1",
+ "name": "CC1352R LaunchPad",
+ "type": "board",
+ "devices": [
+ "CC1352R1F3"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/launchxl-cc1352r1"
+ ],
+ "image": "tirex-product-tree/cc13xx_devtools/.metadata/.tirex/img/launchxl-cc1350_p.jpg",
+ "description": "",
+ "packageVersion": "1.01.00.00",
+ "packageId": "cc13xx_devtools",
+ "packageUId": "cc13xx_devtools__1.01.00.00"
+ },
+ {
+ "id": "LAUNCHXL-CC2640R2",
+ "name": "CC2640R2 LaunchPad",
+ "type": "board",
+ "devices": [
+ "CC2640R2F"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/launchxl-cc2640r2"
+ ],
+ "image": "tirex-product-tree/cc26xx_devtools/.metadata/.tirex/img/launchxl-cc2640r2.jpg",
+ "description": "",
+ "packageVersion": "1.00.00.07",
+ "packageId": "cc26xx_devtools",
+ "packageUId": "cc26xx_devtools__1.00.00.07"
+ },
+ {
+ "id": "CC2640R2RC",
+ "name": "CC2640R2 Remote Control",
+ "type": "board",
+ "devices": [
+ "CC2640R2F"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "description": "CC2640RF Remote Control (limited availability)",
+ "packageVersion": "1.00.00.07",
+ "packageId": "cc26xx_devtools",
+ "packageUId": "cc26xx_devtools__1.00.00.07"
+ },
+ {
+ "id": "CC2650DK_4XS",
+ "name": "CC2650 Development Kit (4XS)",
+ "type": "board",
+ "devices": [
+ "CC2620F128",
+ "CC2630F128",
+ "CC2640F128",
+ "CC2650F128"
+ ],
+ "connections": [
+ "TIXDS100v3_Dot7_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/cc2650dk"
+ ],
+ "image": "tirex-product-tree/cc26xx_devtools/.metadata/.tirex/img/cc2650dk.jpg",
+ "description": "",
+ "packageVersion": "1.00.00.07",
+ "packageId": "cc26xx_devtools",
+ "packageUId": "cc26xx_devtools__1.00.00.07"
+ },
+ {
+ "id": "CC2650DK_5XD",
+ "name": "CC2650 Development Kit (5XD)",
+ "type": "board",
+ "devices": [
+ "CC2620F128",
+ "CC2630F128",
+ "CC2640F128",
+ "CC2650F128"
+ ],
+ "connections": [
+ "TIXDS100v3_Dot7_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/cc2650dk"
+ ],
+ "image": "tirex-product-tree/cc26xx_devtools/.metadata/.tirex/img/cc2650dk.jpg",
+ "description": "",
+ "packageVersion": "1.00.00.07",
+ "packageId": "cc26xx_devtools",
+ "packageUId": "cc26xx_devtools__1.00.00.07"
+ },
+ {
+ "id": "CC2650DK_7ID",
+ "name": "CC2650 Development Kit (7ID)",
+ "type": "board",
+ "devices": [
+ "CC2620F128",
+ "CC2630F128",
+ "CC2640F128",
+ "CC2650F128"
+ ],
+ "connections": [
+ "TIXDS100v3_Dot7_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/cc2650dk"
+ ],
+ "image": "tirex-product-tree/cc26xx_devtools/.metadata/.tirex/img/cc2650dk.jpg",
+ "description": "",
+ "packageVersion": "1.00.00.07",
+ "packageId": "cc26xx_devtools",
+ "packageUId": "cc26xx_devtools__1.00.00.07"
+ },
+ {
+ "id": "LAUNCHXL-CC2650",
+ "name": "CC2650 LaunchPad",
+ "type": "board",
+ "devices": [
+ "CC2620F128",
+ "CC2630F128",
+ "CC2640F128",
+ "CC2650F128"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/launchxl-cc2650"
+ ],
+ "image": "tirex-product-tree/cc26xx_devtools/.metadata/.tirex/img/launchxl-cc2650.jpg",
+ "description": "",
+ "packageVersion": "1.00.00.07",
+ "packageId": "cc26xx_devtools",
+ "packageUId": "cc26xx_devtools__1.00.00.07"
+ },
+ {
+ "id": "CC2650STK",
+ "name": "CC2650 SensorTag",
+ "type": "board",
+ "devices": [
+ "CC2620F128",
+ "CC2630F128",
+ "CC2640F128",
+ "CC2650F128"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/cc2650stk"
+ ],
+ "image": "tirex-product-tree/cc26xx_devtools/.metadata/.tirex/img/cc2650stk.jpg",
+ "description": "",
+ "packageVersion": "1.00.00.07",
+ "packageId": "cc26xx_devtools",
+ "packageUId": "cc26xx_devtools__1.00.00.07"
+ },
+ {
+ "id": "BOOSTXL-CC2650MA",
+ "name": "CC2650MODA BoosterPack",
+ "type": "board",
+ "devices": [
+ "CC2620F128",
+ "CC2630F128",
+ "CC2640F128",
+ "CC2650F128"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/boostxl-cc2650ma"
+ ],
+ "image": "tirex-product-tree/cc26xx_devtools/.metadata/.tirex/img/boostxl-cc2650ma.jpg",
+ "description": "",
+ "packageVersion": "1.00.00.07",
+ "packageId": "cc26xx_devtools",
+ "packageUId": "cc26xx_devtools__1.00.00.07"
+ },
+ {
+ "id": "LAUNCHXL-CC26X2R1",
+ "name": "CC26x2R LaunchPad",
+ "type": "board",
+ "devices": [
+ "CC2642R1F",
+ "CC2652R1F"
+ ],
+ "connections": [
+ "TIXDS110_Connection.xml"
+ ],
+ "toolsPage": [
+ "http://www.ti.com/tool/launchxl-cc26x2r1"
+ ],
+ "image": "tirex-product-tree/cc26xx_devtools/.metadata/.tirex/img/launchxl-cc2650.jpg",
+ "description": "",
+ "packageVersion": "1.00.00.07",
+ "packageId": "cc26xx_devtools",
+ "packageUId": "cc26xx_devtools__1.00.00.07"
+ },
+ {
+ "id": "CC3200-LAUNCHXL",
+ "name": "CC3200-LAUNCHXL",
+ "type": "board",
+ "description": "The SimpleLink CC3200 Launchpad Kit includes all the hardware you need to start your application development. <br>The Kit includes a CC3200 Launchpad board, a USB cable and a Getting Started Guide. Board includes a high performance PCB antenna for application developers to get started immediately without worrying about further connections.",
+ "image": "tirex-product-tree/cc320x_devtools/simplelinkLaunch.jpg",
+ "devices": [
+ "CC3200"
+ ],
+ "packageVersion": "1.00.00.00",
+ "packageId": "cc32xx_devtools",
+ "packageUId": "cc32xx_devtools__1.00.00.00"
+ },
+ {
+ "name": "CC3220S-LAUNCHXL",
+ "id": "CC3220S-LAUNCHXL",
+ "description": "The SimpleLink CC3220S LaunchPad Kit includes all the hardware you need to start your application development. <br>The Kit includes a CC3220S LaunchPad board, a USB cable and a Getting Started Guide. Board includes a high performance PCB antenna for application developers to get started immediately without worrying about further connections.",
+ "type": "board",
+ "devices": [
+ "CC3220S"
+ ],
+ "packageVersion": "1.00.00.00",
+ "packageId": "cc32xx_devtools",
+ "packageUId": "cc32xx_devtools__1.00.00.00"
+ },
+ {
+ "name": "CC3220SF-LAUNCHXL",
+ "id": "CC3220SF-LAUNCHXL",
+ "description": "The SimpleLink CC3220SF LaunchPad Kit includes all the hardware you need to start your application development. <br>The Kit includes a CC3220SF LaunchPad board, a USB cable and a Getting Started Guide. Board includes a high performance PCB antenna for application developers to get started immediately without worrying about further connections.",
+ "type": "board",
+ "devices": [
+ "CC3220SF"
+ ],
+ "packageVersion": "1.00.00.00",
+ "packageId": "cc32xx_devtools",
+ "packageUId": "cc32xx_devtools__1.00.00.00"
+ },
+ {
+ "name": "DK-TM4C123G",
+ "id": "DK-TM4C123G",
+ "type": "board",
+ "device": [
+ "TM4C123GH6PGE"
+ ],
+ "description": " The TM4C123G Development Kit is a compact and versatile engineering board for TM4C Series TM4C123G ARM® Cortex®™-M4F-based microcontroller (MCU). The development kit design highlights the TM4C123G MCU integrated USB 2.0 On-the-Go/Host/Device interface, CAN, precision analog, sensor hub, and low-power capabilities. The development kit features a TM4C Series TM4C123GH6PGE microcontroller in a 144-LQFP package, a color OLED® display, USB OTG connector, a microSD® card slot, a coin-cell battery for the low-power Hibernate mode, a CAN transceiver, a temperature sensor, a nine-axis sensor for motion tracking, and easy-access through-holes to all of the available device signals.</p><p>For more information, go to the <a target='_blank' href= 'http://www.ti.com/tool/dk-tm4c123g'>tools page</a>.",
+ "image": "tirex-product-tree/tivac_devtools_1_00_00_00/.metadata/.tirex/.metadata/images/dk-tm4c123g.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devtools",
+ "packageUId": "tivac_devtools__1.00.00.00"
+ },
+ {
+ "name": "DK-TM4C129X",
+ "id": "DK-TM4C129X",
+ "type": "board",
+ "device": [
+ "TM4C129XNCZAD"
+ ],
+ "description": " The TM4C129x Connected Development Kit is a versatile and feature-rich engineering platform that highlights the 120-MHz TM4C Series TM4C129XNCZAD ARM® Cortex®-M4F based microcontroller, including an integrated 10/100 Ethernet MAC + PHY as well as many other key features.</p><p>For more information, go to the <a target='_blank' href='http://www.ti.com/tool/dk-tm4c129x'>tools page</a>.",
+ "image": "tirex-product-tree/tivac_devtools_1_00_00_00/.metadata/.tirex/.metadata/images/dk-tm4c129x.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devtools",
+ "packageUId": "tivac_devtools__1.00.00.00"
+ },
+ {
+ "name": "EK-TM4C123GXL",
+ "id": "EK-TM4C123GXL",
+ "type": "board",
+ "device": [
+ "TM4C123GH6PM"
+ ],
+ "description": " The TM4C123G LaunchPad™ board is a low-cost evaluation platform for ARM® Cortex®-M4F-based microcontrollers from Texas Instruments. The design of the TM4C123G LaunchPad highlights the TM4C123GH6PM microcontroller with a USB 2.0 device interface and hibernation module.</p><p>The EK-TM4C123GXL also features programmable user buttons and an RGB LED for custom applications. The stackable headers of the TM4C Series TM4C123G LaunchPad BoosterPack™ XL Plug-in Module make it easy and simple to expand the functionality of the TM4C123G LaunchPad when interfacing to other peripherals with Texas Instruments' MCU BoosterPacks. </p><p>For more information, go to the <a target='_blank' href= 'http://www.ti.com/tool/ek-tm4c123gxl'>tools page</a>.",
+ "image": "tirex-product-tree/tivac_devtools_1_00_00_00/.metadata/.tirex/.metadata/images/ek-tm4c123gxl.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devtools",
+ "packageUId": "tivac_devtools__1.00.00.00"
+ },
+ {
+ "name": "EK-TM4C1294XL",
+ "id": "EK-TM4C1294XL",
+ "type": "board",
+ "device": [
+ "TM4C1294NCPDT"
+ ],
+ "description": " The TM4C1294 Connected LaunchPad™ board is a low-cost evaluation platform for ARM® Cortex®-M4F-based microcontrollers from Texas Instruments. The Connected LaunchPad design highlights the TM4C1294NCPDT microcontroller with its on-chip 10/100 Ethernet MAC and PHY, USB 2.0, hibernation module, motion control pulse- width modulation and a multitude of simultaneous serial connectivity.</p><p>The EK-TM4C1294XL features programmable user buttons and LEDs for custom applications. It also features dual BoosterPack™ XL Plug-in Module headers and a breadboard connector for additional connectivity that makes it easy and simple to expand the functionality of the TM4C1294 Connected LaunchPad when interfacing to other peripherals with Texas Instruments' MCU BoosterPacks. </p><p>For more information, go to the <a target='_blank' href= 'http://www.ti.com/tool/ek-tm4c1294xl'>tools page</a>.",
+ "image": "tirex-product-tree/tivac_devtools_1_00_00_00/.metadata/.tirex/.metadata/images/ek-tm4c1294xl.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devtools",
+ "packageUId": "tivac_devtools__1.00.00.00"
+ },
+ {
+ "name": "EK-TM4C129EXL",
+ "id": "EK-TM4C129EXL",
+ "type": "board",
+ "device": [
+ "TM4C129ENCPDT"
+ ],
+ "description": " The TM4C129 Crypto Connected LaunchPad™ board is a low-cost evaluation platform for ARM® Cortex®-M4F-based microcontrollers from Texas Instruments. The Crypto Connected LaunchPad design highlights the TM4C129ENCPDT microcontroller with its on-chip 10/100 Ethernet MAC and PHY, Crypto Hardware blocks, USB 2.0, hibernation module, motion control pulse-width modulation and a multitude of simultaneous serial connectivity.</p><p>The EK-TM4C129EXL features programmable user buttons and LEDs for custom applications. It also features dual BoosterPack™ XL Plug-in Module headers and a breadboard connector for additional connectivity that makes it easy and simple to expand the functionality of the TM4C1294 Connected LaunchPad when interfacing to other peripherals with Texas Instruments' MCU BoosterPacks.</p><p>For more information, go to the <a target='_blank' href= 'http://www.ti.com/tool/ek-tm4c129exl'>tools page</a>.",
+ "image": "tirex-product-tree/tivac_devtools_1_00_00_00/.metadata/.tirex/.metadata/images/ek-tm4c1294xl.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "tivac_devtools",
+ "packageUId": "tivac_devtools__1.00.00.00"
+ },
+ {
+ "description": "Developing Flow meter design for Water, Gas and Heat meters with the MSP430 FRAM Family is now enabled by the EVM430-FR6989 reference board. The EVM430-FR6989 (Water Meter reference design) kit is an easy-to-use Evaluation Module for the MSP430FR698x family of microcontrollers. It contains everything needed to start developing a flow meter on MSP430FR698x platform based MSP430 MCU, including on-board emulation for programming and debugging.<br><br>This reference design consists of three boards. The main board of the EVM is built with a MSP430FR6989 MCU with LCD display. A battery socket is on the back of the board to provide 3.0 V. Next is the sensors board. The sensor board is designed for LC sensor. The third board in this setup is the motor board. The motor board is to drive the rotor disc to simulate water or gas flow. There is a battery socket on the back of this board.",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/evm430-fr6989_thumb.png",
+ "id": "EVM430-FR6989",
+ "devices": [
+ "MSP430FR6989"
+ ],
+ "type": "board",
+ "name": "EVM430-FR6989",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "The eZ430-Chronos is a highly integrated, wearable wireless development system based for the CC430 in a sports watch. It may be used as a reference platform for watch systems, a personal display for personal area networks, or as a wireless sensor node for remote data collection. Based on the CC430F6137, 1 GHz RF SoC, the eZ430-Chronos is a complete CC430-based development system contained in a watch.<br><br>This tool features:<ul><li>96 segment LCD display</li><li>Integrated pressure sensor</li><li>3-axis accelerometer</li><li>Based on CC430F6137, which has integrated sub-1GHz RF transceiver</li><li>Includes RF USB dongle and USB emulation tool for programming/debugging</li></ul>",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/ez430-chronos_thumb.png",
+ "id": "eZ430-Chronos",
+ "devices": [
+ "CC430F6137"
+ ],
+ "type": "board",
+ "name": "eZ430-Chronos",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "The eZ430-F2013 is a complete MSP430 development tool including all the hardware and software to evaluate the MSP430F2013 and develop a complete project in a convenient USB stick form factor. The eZ430-F2013 supports the Code Composer Studio and IAR Embedded Workbench Integrated Development Environments to provide full emulation with the option of designing with a stand-alone system or detaching the removable target board to integrate into an existing design. The USB port provides enough power to operate the ultra-low-power MSP430 so no external power supply is required.",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/ez430-f2013_thumb.png",
+ "id": "eZ430-F2013",
+ "devices": [
+ "MSP430F2013"
+ ],
+ "type": "board",
+ "name": "eZ430-F2013",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "The eZ430-RF2500 is a complete wireless development tool for the MSP430 and CC2500 that includes all the hardware and software required to develop an entire wireless project with the MSP430 in a convenient USB stick. The tool includes a USB-powered emulator to program and debug your application in-system and two 2.4-GHz wireless target boards featuring the highly integrated MSP430F2274 ultra-low-power MCU. Projects may be developed and instantly deployed using the included battery expansion board and AAA batteries. The demo code utilizes a proprietary 2.4GHz RF stack from Texas Instruments, called SimpliciTI.",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/ez430-rf2500_thumb.png",
+ "id": "eZ430-RF2500",
+ "devices": [
+ "MSP430F2274"
+ ],
+ "type": "board",
+ "name": "eZ430-RF2500",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "id": "IWR1443BOOST",
+ "name": "IWR1443 Industrial EVM",
+ "type": "board",
+ "devices": [
+ "IWR1443"
+ ],
+ "description": "The IWR1443 EVM from Texas Instruments™ is an easy-to-use evaluation board for the IWR1443 mmWave sensing device, with direct connectivity to the microcontroller (MCU) LaunchPad™ Development Kit. The EVM contains everything required to start developing software for on-chip hardware accelerator and low-power ARM® R4F controllers, including onboard emulation for programming and debugging as well as onboard buttons and LEDs for quick integration of a simple user interface.",
+ "image": "tirex-product-tree/mmwave_devtools_0_3_0/images/IWR1443EVM.jpg",
+ "connections": [
+ ""
+ ],
+ "toolsPage": "http://www.ti.com/tool/IWR1443BOOST",
+ "buyLink": "http://www.ti.com/tool/IWR1443BOOST#buy",
+ "packageVersion": "0.3.0",
+ "packageId": "com.ti.mmwave_devtools",
+ "packageUId": "com.ti.mmwave_devtools__0.3.0"
+ },
+ {
+ "id": "IWR1642BOOST",
+ "name": "IWR1642 Industrial EVM",
+ "type": "board",
+ "devices": [
+ "IWR1642"
+ ],
+ "description": "The IWR1642 EVM from Texas Instruments™ is an easy-to-use evaluation board for the IWR1642 mmWave sensing device, with direct connectivity to the microcontroller (MCU) LaunchPad™ Development Kit. The EVM contains everything required to start developing software for on-chip C67x DSP core and low-power ARM® R4F controllers, including onboard emulation for programming and debugging as well as onboard buttons and LEDs for quick integration of a simple user interface.",
+ "image": "tirex-product-tree/mmwave_devtools_0_3_0/images/IWR1642EVM.jpg",
+ "connections": [
+ ""
+ ],
+ "toolsPage": "http://www.ti.com/tool/IWR1642BOOST",
+ "buyLink": "http://www.ti.com/tool/IWR1642BOOST#buy",
+ "packageVersion": "0.3.0",
+ "packageId": "com.ti.mmwave_devtools",
+ "packageUId": "com.ti.mmwave_devtools__0.3.0"
+ },
+ {
+ "id": "MMWAVE-DEVPACK",
+ "name": "mmWave Sensors Development Pack",
+ "type": "board",
+ "devices": [
+ "IWR1443",
+ "IWR1642",
+ "AWR1243",
+ "AWR1443",
+ "AWR1642"
+ ],
+ "description": "The MMWAVE-DEVPACK is an add-on board used with TIs mmwave sensor EVMs (xWR1243BOOST, xWR1443BOOST, and xWR1642BOOST) to provide more interfaces and PC connectivity to the mmwave sensor EVM. It provides an interface for the Radar Studio tool to configure the Radar device and capture the raw ADC data using a capture card, such as the TSW1400.",
+ "image": "tirex-product-tree/mmwave_devtools_0_3_0/images/MMWAVEDEVPACK.jpg",
+ "connections": [
+ ""
+ ],
+ "toolsPage": "http://www.ti.com/tool/MMWAVE-DEVPACK",
+ "buyLink": "http://www.ti.com/tool/MMWAVE-DEVPACK#buy",
+ "packageVersion": "0.3.0",
+ "packageId": "com.ti.mmwave_devtools",
+ "packageUId": "com.ti.mmwave_devtools__0.3.0"
+ },
+ {
+ "description": "<p>The MSP-CAPT-FR2633 MCU Development Kit is an easy to use capacitive sensing development platform for the CapTIvate™ MSP430FR26xx/25xx device family. The kit features the CapTIvate&trade; MSP430FR2633 MCU, which supports self and mutual capacitance sensors with up to 16 sensing IO, enabling up to 64 buttons in mutual mode.</p><p>Using this modular kit with the CapTIvate&trade; Design Center, you can evaluate the performance of MSP430FR2633 MCU using the three included capacitive sensing demo boards. Or, you can develop your own sensing board and experience the power of the CapTIvate&trade; Design Center and the ease of real-time sensor tuning, all without writing a single line of code.</p>",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-capt-fr2633_thumb.png",
+ "id": "MSP-CAPT-FR2633",
+ "devices": [
+ "MSP430FR2633"
+ ],
+ "type": "board",
+ "name": "MSP-CAPT-FR2633",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "The MSP-EXP430F5438 Experimenter Board features the MSP430F5438 MCU, which is capable of up to 25MHz operation. This experimenter board is highly integrated to enable developers to fully evaluate the MSP430F5xx family of devices.<br><br>This experimenter board includes:<ul><li>1 c5-position joystick</li><li>2 push buttons</li><li>2 LEDs138x110 grayscale</li><li>Dot-matrix LCD</li><li>3-axis accelerometer</li><li>Microphone</li><li>3.5mm audio jack</li><li>EM headers that support the many low power RF modules from TI</li></ul>",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430f5438_thumb.png",
+ "id": "MSP-EXP430F5438",
+ "devices": [
+ "MSP430F5438",
+ "MSP430F5438A"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430F5438",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "The MSP430F5529 Experimenter Board (MSP-EXP430F5529) is a complete kit for USB development on the MSP430F5529 device. The MSP430F5529 is from the latest generation of MSP430 devices with integrated USB.<br><br>The MSP-EXP430F5529 features:<ul><li>On-board emulation</li><li>Capacitive touch buttons/slider</li><li>General purpose push buttons & LED</li><li>Micro SD slot</li><li>102x64 dot-matrix, backlit LCD display</li></ul>",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430f5529_thumb.png",
+ "id": "MSP-EXP430F5529",
+ "devices": [
+ "MSP430F5529"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430F5529",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "<p>The MSP430 LaunchPad now has USB! The MSP-EXP430F5529LP LaunchPad is an inexpensive, simple evaluation module for the MSP430F5529 USB microcontroller. It’s an easy way to start developing on the MSP430, with on-board emulation for programming and debugging, as well as buttons and LEDs for simple user interface.</p><p>Rapid prototyping is a snap, thanks to 40-pin BoosterPack expansion headers, as well as a wide range of available BoosterPack plug-in modules. You can quickly add features like wireless, displays, sensors, and much more. The 40-pin interface is compatible with any 20-pin BoosterPack that is compliant with the standard.</p><p>The MSP430F5529 16-bit MCU has 128KB Flash, 8KB RAM, 25MHz CPU speed, integrated USB, and many peripherals plenty to get you started in your development.</p>",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430f5529lp_thumb.png",
+ "id": "MSP-EXP430F5529LP",
+ "devices": [
+ "MSP430F5529"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430F5529LP",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "The MSP-EXP430FR2311 LaunchPad Development Kit is an easy-to-use microcontroller development board for the MSP430FR2311 MCU. It contains everything needed to start developing quickly on the MSP430FR2x FRAM platform, including on-board emulation for programming, debugging and Energy Measurements. The board features on-board buttons and LEDs for integration of a simple user interface and a Optical Sensor interface to get started with your development. The kit comes with a pre-programmed code for testing the light intensity and use of integrated Op-Amp. The MSP430FR2311 microcontroller features embedded FRAM (Ferroelectric Random Access Memory), a non-volatile memory known for its ultra-low power, high endurance and high-speed write capabilities. The device also has integrated Smart Analog Features ( integrated Op-Amp, Comparator, DAC and ADC ) to help connect a variety of industrial sensors enabling single chip implementation for most sensing applications. Rapid prototyping is a snap thanks to 20-pin headers and a wide range of BoosterPack plug-in modules enabling technologies such as wireless connectivity, graphical displays, environmental sensing, and much more.",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430fr2311_thumb.png",
+ "id": "MSP-EXP430FR2311",
+ "devices": [
+ "MSP430FR2311"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430FR2311",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "<p>The MSP-EXP430FR2433 LaunchPad™ Development Kit is an easy-to-use evaluation module (EVM) based on the MSP430FR2433 Value Line Sensing microcontroller (MCU). It contains everything needed to start developing on the ultra-low-power MSP430FR2x Value Line Sensing MCU platform, including on-board debug probe for programming, debugging and energy measurements. The board includes 2 buttons and 2 LEDs for creating a simple user interface. It also supports using a supercapacitor (needs to be purchased and installed by the user) that acts like a rechargeable battering, enabling standalone applications without an external power supply.</p><p>The 16MHz MSP430FR2433 device features 15.5KB of embedded FRAM (Ferroelectric Random Access Memory), a non-volatile memory known for its ultra-low power, high endurance, and high speed write access. Combined with the 4 KB of on-chip SRAM, users have access to 15.5KB of memory to split between their program and data as required. For example, a data logging application may require a large data memory with a relatively small program memory, so the memory may be allocated as required between program and data memory.</p>",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430fr2433_thumb.png",
+ "id": "MSP-EXP430FR2433",
+ "devices": [
+ "MSP430FR2433"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430FR2433",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "<p>The MSP-EXP430FR4133 LaunchPad development kit is an easy-to-use Evaluation Module for the MSP430FR4133 microcontroller. It contains everything needed to start developing on the MSP430 Ultra-low-power FRAM-based microcontroller platform, including on-board emulation for programming, debugging and energy measurements.</p><p>The board features on-board buttons and LEDs for quick integration of a simple user interface as well as a Liquid Crystal Display (LCD) display which showcases the integrated driver with flexible software-configurable pins. The MSP430FR4133 device features embedded FRAM (Ferroelectric Random Access Memory), a non-volatile memory known for its ultra-low power, high endurance and high speed write access.</p><p>Rapid prototyping is simplified by the 20-pin BoosterPack™ plug-in module headers, which support a wide range of available BoosterPacks. You can quickly add features like wireless connectivity, graphical displays, environmental sensing, and much more. Design your own BoosterPack or choose among many already available from TI and third party developers.</p>",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430fr4133_thumb.png",
+ "id": "MSP-EXP430FR4133",
+ "devices": [
+ "MSP430FR4133"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430FR4133",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "The MSP-EXP430FR5739 Experimenter Board is a development platform for the MSP430FR57xx devices. It supports this new generation of MSP430 microcontroller devices with integrated Ferroelectric Random Access Memory (FRAM). The board is compatible with many TI low-power RF wireless evaluation modules. The Experimenter Board helps designers quickly learn and develop using the new MSP430FR57xx MCUs, which provide the industry's lowest overall power consumption, fast data read /write and unbeatable memory endurance.<br><br>NOTE: CCS5.1 and CCS5.2 are not recommended for MSP430FR57xx projects. Find out how to transition MSP430FR57xx projects to CCS5.3 <a href=\"http://processors.wiki.ti.com/index.php/Code_Composer_Studio_Beta_Downloads\">here.</a><br><br>The MSP-EXP430FR5739 kit features:<ul><li>On-board emulation</li><li>3-axis accelerometer</li><li>Calibrated temperature sensor</li><li>MSP430FR5739, which introduces new FRAM non-volatile memory technlogy</li></ul>",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430fr5739_thumb.png",
+ "id": "MSP-EXP430FR5739",
+ "devices": [
+ "MSP430FR5739"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430FR5739",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "<p>The MSP-EXP430FR5969 LaunchPad is an easy-to-use Evaluation Module for the MSP430FR5969 microcontroller. It contains everything needed to start developing on a MSP430 ULP FRAM platform, including on-board emulation for programming, debugging and Energy Measurements. The board features on-board buttons and LEDs for quick integration of a simple user interface as well as a SuperCap allowing standalone applications without external power supply.</p><p>The Evaluation Module is a development platform based on the MSP430FR5969 device. This device features embedded FRAM, a non-volatile memory known for its low power, high endurance and high speed write access.</p><p>Rapid prototyping is a snap thanks to 20-pin headers and a wide range of BoosterPack plug-in modules enabling technologies such as wireless, display drivers, temperature sensing, and much more.</p>",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430fr5969_thumb.png",
+ "id": "MSP-EXP430FR5969",
+ "devices": [
+ "MSP430FR5969"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430FR5969",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "<p>The MSP-EXP430FR5994 LaunchPad Development Kit is an easy-to-use Evaluation Module (EVM) for the MSP430FR5994 microcontroller (MCU). It contains everything needed to start developing on the ultra-low-power MSP430FRx FRAM microcontroller platform, including on-board debug probe for programming, debugging and energy measurements. The board features on-board buttons and LEDs for quick integration of a simple user interface as well as an SD card port allowing the user to interface with SD cards, as well as a super capacitor (super cap) that enables standalone applications without an external power supply.</p><p>The MSP430FR5994 device features 256KB of embedded FRAM (Ferroelectric Random Access Memory), a non-volatile memory known for its ultra-low power, high endurance, and high speed write access. The device also features 8 KB of SRAM, supports CPU speeds of up to 16MHz and has integrated peripherals for communication, ADC, timers, AES encryption, Low-Energy Accelerator (LEA), a new hardware module to the FRAM family, designed for fast, efficient and low-power vector math and more – plenty to get you started in your development.</p><p>Rapid prototyping is simplified by the 40-pin BoosterPack™ Plug-in Module headers, which support a wide range of available BoosterPacks. You can quickly add features like wireless connectivity, graphical displays, environmental sensing, and much more. Design your own BoosterPack or choose among many already available from TI and third party developers.</p><p>Free software development tools are also available, such as TI’s Eclipse-based <a href='http://www.ti.com/tool/ccstudio-msp'>Code Composer Studio (CCS)</a> and <a href='http://www.ti.com/tool/iar-kickstart'>IAR Embedded Workbench</a>. Both of these IDEs support <a href='http://www.ti.com/tool/energytrace?DCMP=ep-mcu-msp&HQS=energytrace'>EnergyTrace++&trade; technology</a> for real-time power profiling and debugging when paired with the MSP430FR5994 LaunchPad.</p>",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430fr5994_thumb.png",
+ "id": "MSP-EXP430FR5994",
+ "devices": [
+ "MSP430FR5994"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430FR5994",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "The MSP-EXP430FR6989 LaunchPad Development Kit is an easy-to-use Evaluation Module (EVM) for the MSP40FR6989 microcontroller (MCU). It contains everything needed to start developing on the ultra-low-power MSP430FRx FRAM microcontroller platform, including on-board emulation for programming, debugging and energy measurements.<br><br>The board features on-board buttons and LEDs for quick integration of a simple user interface as well as a Liquid Crystal Display (LCD) display which showcases the integrated driver that can drive up to 320 segments. It also offers direct access to the Extended Scan Interface, which is a dual analog front-end (AFE) created for low-power rotation detection. The MSP430FR6989 device features ultra-low power consumption, 128 KB of embedded FRAM (Ferroelectric Random Access Memory), a non-volatile memory known for its ultra-low power, high endurance and high speed write access.",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430fr6989_thumb.png",
+ "id": "MSP-EXP430FR6989",
+ "devices": [
+ "MSP430FR6989"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430FR6989",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "The MSP-EXP430G2 LaunchPad is an easy-to-use flash programmer and debugging tool for the MSP430G2xx Value Line microcontrollers. It features everything you need to start developing on an MSP430 microcontroller device. It has on-board emulation for programming and debugging and features a 14/20-pin DIP socket, on-board buttons and LEDs & BoosterPack-compatible pinouts that support a wide range of plug-in modules for added functionality such as wireless, displays & more.<br><br>The MSP-EXP430G2 LaunchPad also comes with 2 MSP430 device, with up to 16kB Flash, 512B RAM, 16MHz CPU speed and integrated peripherals such as 8ch 10-bit ADC, timers, serial communication (UART, I2C & SPI) & more!<br><br>The MSP-EXP430G2 LaunchPad is not supported by the Mac or Linux versions of the Code Composter Studio™ Integrated Development Environment. If you want to work with these operating systems, we suggest you select one of the many other MSP LaunchPads.",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-exp430g2_thumb.png",
+ "id": "MSP-EXP430G2",
+ "devices": [
+ "MSP430G2452",
+ "MSP430G2553"
+ ],
+ "type": "board",
+ "name": "MSP-EXP430G2",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "description": "The MSP-EXPCC430RFx Experimenter Kit is a complete sub-GHz development platform for the CC430 devices from the MSP430 family of ultra-low-power microcontrollers. The kit provides two sub-GHz wireless modules: the MSP-EXP430F6137Rx Base Board with the CC430F6137, and the MSP-EXP430F5137Rx Satellite Board with the CC430F5137.<br>Out of the box, the two modules enable demonstration of a SimpliciTI wireless sensor network and take full advantage of a highly-integrated LCD and PC connection.<br><br>Additionally, the kit also enables a complete development and prototyping environment to design a wireless application. The kit features an on-board emulator for programming and debugging, which enables developers to create new applications on both the Base Board and Satellite Board.",
+ "image": "tirex-product-tree/msp430_devtools_3_80_03_07/.metadata/.tirex/images/msp-expcc430rfx_thumb.png",
+ "id": "MSP-EXPCC430RFx",
+ "devices": [
+ "CC430F5137",
+ "CC430F6137"
+ ],
+ "type": "board",
+ "name": "MSP-EXPCC430RFx",
+ "packageVersion": "3.80.03.07",
+ "packageId": "msp430_devtools",
+ "packageUId": "msp430_devtools__3.80.03.07"
+ },
+ {
+ "id": "MSP-EXP432E401Y",
+ "type": "board",
+ "name": "MSP432E401Y LaunchPad",
+ "image": "tirex-product-tree/msp432_devtools_2_10_00_01/.metadata/.tirex/images/msp-exp432e401y_thumb.png",
+ "description": "<p>The SimpleLink™ Ethernet MSP432E401Y microcontroller LaunchPad™ Development Kit is an intuitive evaluation platform for SimpleLink™ Arm® Cortex®-M4F-based Ethernet MCUs. The Ethernet LaunchPad development kit highlights the MSP432E401Y MCU with integrated Ethernet MAC and PHY and a wide variety of wired communication interfaces including USB-OTG, CAN, Quad-SPI (QSSI), I2C, SPI, UART and other serial protocols. Featuring a 120MHz Arm Cortex-M4F CPU, 1MB of flash, 256kB of SRAM, and advanced cryptographic accelerators, MSP432E4 MCUs offer an ample amount of processing resources for developers to implement wired and wireless connectivity stacks and processing algorithms to develop a robust Ethernet solutions. Developers can leverage a number of SimpleLink wireless MCU BoosterPack™ plug-in modules and SimpleLink SDK plug-ins to seamlessly add wireless connectivity and cloud integration to the application to build IoT-ready, interoperable, and intelligent industrial gateway applications.</p>",
+ "devices": [
+ "MSP432E401Y"
+ ],
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devtools",
+ "packageUId": "msp432_devtools__2.10.00.01"
+ },
+ {
+ "id": "MSP-EXP432P401R",
+ "type": "board",
+ "name": "MSP432P401R LaunchPad - Red 2.x (Red)",
+ "image": "tirex-product-tree/msp432_devtools_2_10_00_01/.metadata/.tirex/images/msp-exp432p401r_thumb.png",
+ "description": "The MSP432P401R LaunchPad enables you to develop high performance applications that benefit from low power operation. It features the MSP432P401R, a 48MHz ARM Cortex M4F with 256kB of Flash, 80uA/MHz active power and 660nA RTC operation, 14-bit 1MSPS differential SAR ADC and AES256 accelerator.<br><br>This Launchpad includes an on-board emulator with EnergyTrace+ Technology, which means you can program and debug your projects without the need for additional tools, while also measuring total system energy consumption.<br><br>All pins of the MSP-EXP432P401R device are fanned out for easy access. These pins make it easy to plug in 20-pin and 40-pin BoosterPacks that add additional functionality including Bluetooth Low Energy, Wifi wireless connectivity, and more.<br><br>The out-of-box application provided with the MSP-EXP432P401R LaunchPad features a graphical user-interface that enables the user to type in the desired beats per minute of an RGB LED, and select from over 16 million color options.<br><br><p>For XMS432P401R Revision C, MSP432P401R Revision C devices and MSP-EXP432P401R – Rev2.x (Red) LaunchPad ONLY. For previous revisions, visit <a href='http://www.ti.com/xms432support'>http://www.ti.com/xms432support</a> before using.</p>",
+ "devices": [
+ "MSP432P401R"
+ ],
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devtools",
+ "packageUId": "msp432_devtools__2.10.00.01"
+ },
+ {
+ "id": "MSP-EXP432P4111",
+ "type": "board",
+ "name": "MSP432P4111 LaunchPad",
+ "image": "tirex-product-tree/msp432_devtools_2_10_00_01/.metadata/.tirex/images/msp-exp432p4111_thumb.png",
+ "description": "The MSP432P4111 LaunchPad enables you to develop high performance applications that benefit from low power operation. It features the MSP432P4111, a 48MHz ARM Cortex M4F with 2MB of Flash and 256kB RAM, 120uA/MHz active power, 850nA RTC operation. MSP432P4111 also offers the industry’s best SAR ADC at 14-bit 1MSPS, an 320 Segment LCD driver, and AES256 accelerator.<br><br>This Launchpad includes an on-board emulator with EnergyTrace+ Technology, which means you can program and debug your projects without the need for additional tools, while also measuring total system energy consumption.<br><br>All pins of the MSP-EXP432P4111 device are fanned out for easy access and connected to the onboard LCD. These pins make it easy to plug in 20-pin and 40-pin BoosterPacks that add additional functionality including Bluetooth Low Energy, Wifi wireless connectivity, Ultrasonic measurement, and more.<br><br>The out-of-box application provided with the MSP-EXP432P4111 LaunchPad features a graphical user-interface that enables the user to type in the desired beats per minute of an RGB LED, and select from over 16 million color options.",
+ "devices": [
+ "MSP432P4111"
+ ],
+ "packageVersion": "2.10.00.01",
+ "packageId": "msp432_devtools",
+ "packageUId": "msp432_devtools__2.10.00.01"
+ },
+ {
+ "name": "TMDSICE3359",
+ "id": "TMDSICE3359",
+ "type": "board",
+ "description": "For industrial communication protocols such as EtherCAT, PROFIBUS, Profinet, Powerlink& Ethernet/IP the Industrial Communications Engine is the optimal platform. The ICE hardware and included software is designed to help integrate the industrial communications interfaces in a broad range of industrial systems.",
+ "image": "tirex-product-tree/sitara_devtools_1_00_00_00/.metadata/.tirex/assets/photos/am335x/med_tmdsice3359_tmdsice3359_board_image.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devtools",
+ "packageUId": "sitara_devtools__1.00.00.00"
+ },
+ {
+ "name": "TMDSSK3358",
+ "id": "TMDSSK3358",
+ "type": "board",
+ "description": "The AM335x Starter Kit (EVM-SK) provides a stable and affordable platform to quickly start evaluation of Sitara™ ARM® Cortex™-A8 AM335x Processors (AM3352, AM3354, AM3356,AM3358) and accelerate development for smart appliance, industrial and networking applications. It is a low-cost development platform based on the ARM Cortex-A8 processor that is integrated with options such as Dual Gigabit Ethernet, DDR3 and LCD touch screen.",
+ "image": "tirex-product-tree/sitara_devtools_1_00_00_00/.metadata/.tirex/assets/photos/am335x/sitara_am335x_gs_tmdssk3358.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devtools",
+ "packageUId": "sitara_devtools__1.00.00.00"
+ },
+ {
+ "name": "TMDXEVM3358",
+ "id": "TMDXEVM3358",
+ "type": "board",
+ "description": "The AM335x Evaluation Module (EVM) enables developers to immediately start evaluating the AM335x processor family (AM3352, AM3354, AM3356, AM3358) and begin building applications such as portable navigation, portable gaming, home/building automation and others.",
+ "image": "tirex-product-tree/sitara_devtools_1_00_00_00/.metadata/.tirex/assets/photos/am335x/med_tmdxevm3358_tmdxevm3358_evm.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devtools",
+ "packageUId": "sitara_devtools__1.00.00.00"
+ },
+ {
+ "name": "TMDXEVM437x",
+ "id": "TMDXEVM437x",
+ "type": "board",
+ "description": "The AM437x Evaluation Module (EVM) enables developers to immediately start evaluating the AM437x processor family (AM4376, AM4377, AM4378 and AM4379 ) and begin building applications such as portable navigation, patient monitoring, home/building automation, barcode scanners, portable data terminals and others.",
+ "image": "tirex-product-tree/sitara_devtools_1_00_00_00/.metadata/.tirex/assets/photos/am437x/evm.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devtools",
+ "packageUId": "sitara_devtools__1.00.00.00"
+ },
+ {
+ "name": "TMDXEVM5728",
+ "id": "TMDXEVM5728",
+ "type": "board",
+ "description": "The AM572x Evaluation Module provides an affordable platform to quickly start evaluation of Sitara™ ARM® Cortex®-A15 AM57x Processors (AM5728, AM5726, AM5718, AM5716) and accelerate development for HMI, machine vision, networking, medical imaging and many other industrial applications.",
+ "image": "tirex-product-tree/sitara_devtools_1_00_00_00/.metadata/.tirex/assets/photos/am57x/evm.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devtools",
+ "packageUId": "sitara_devtools__1.00.00.00"
+ },
+ {
+ "name": "TMDXIDK437X",
+ "id": "TMDXIDK437X",
+ "type": "board",
+ "description": "The AM437x Industrial Development Kit (IDK) is an application development platform for evaluating the industrial communication and control capabilities of Sitara™ AM4379 and AM4377 processors for industrial applications. The AM4379 and AM4377 processors are ideal for industrial communications, industrial control, and industrial drives applications. The AM437x processors integrate a quad-core Programmable Real-time Unit (PRU) that has been architected to implement the real-time communication technologies used in a broad range of industrial automation equipment. It enables low foot print designs with minimal external components and with best in class low power performance.",
+ "image": "tirex-product-tree/sitara_devtools_1_00_00_00/.metadata/.tirex/assets/photos/am437x/idk.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devtools",
+ "packageUId": "sitara_devtools__1.00.00.00"
+ },
+ {
+ "name": "TMDXSK437X",
+ "id": "TMDXSK437X",
+ "type": "board",
+ "description": "The AM437x Starter Kit provides a stable and affordable platform to quickly start evaluation of Sitara™ ARM® Cortex®-A9 AM437x Processors (AM4376, AM4378) and accelerate development for HMI, industrial and networking applications.",
+ "image": "tirex-product-tree/sitara_devtools_1_00_00_00/.metadata/.tirex/assets/photos/am437x/sk.jpg",
+ "packageVersion": "1.00.00.00",
+ "packageId": "sitara_devtools",
+ "packageUId": "sitara_devtools__1.00.00.00"
+ }
+ ]
+} \ No newline at end of file
diff --git a/Software/.jxbrowser-data/Local Storage - EXT/http_localhost.localstorage b/Software/.jxbrowser-data/Local Storage - EXT/http_localhost.localstorage
new file mode 100644
index 000000000..d6ed06970
--- /dev/null
+++ b/Software/.jxbrowser-data/Local Storage - EXT/http_localhost.localstorage
@@ -0,0 +1 @@
+#Mon Mar 23 15:48:34 IST 2020
diff --git a/Software/.jxbrowser-data/Local Storage/http_localhost_49602.localstorage b/Software/.jxbrowser-data/Local Storage/http_localhost_49602.localstorage
new file mode 100644
index 000000000..ccaca33f4
--- /dev/null
+++ b/Software/.jxbrowser-data/Local Storage/http_localhost_49602.localstorage
Binary files differ
diff --git a/Software/.jxbrowser-data/Local Storage/http_localhost_49602.localstorage-journal b/Software/.jxbrowser-data/Local Storage/http_localhost_49602.localstorage-journal
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Software/.jxbrowser-data/Local Storage/http_localhost_49602.localstorage-journal