You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2015/10/13 17:01:25 UTC

[01/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Repository: stratos
Updated Branches:
  refs/heads/stratos-4.1.x 7656e2028 -> 581d345c6


http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/js/member-status-filter.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/js/member-status-filter.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/js/member-status-filter.js
new file mode 100644
index 0000000..da08330
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/js/member-status-filter.js
@@ -0,0 +1,140 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+var applicationId;
+var clusterId;
+var time = '30 Min';
+$(document).ready(function () {
+    loadApplication();
+
+    setTimeout(function () {
+        if (applicationId != null) {
+            loadCluster(applicationId);
+            $('#' + window.frameElement.id).ready(function () {
+                $(this).contents().find('body').contents().find('#application-filter').val(applicationId);
+                publish(time);
+            });
+        }
+    }, 2000);
+
+    setTimeout(function () {
+        if (clusterId != null) {
+            $('#' + window.frameElement.id).ready(function () {
+                $(this).contents().find('body').contents().find('#cluster-filter').val(clusterId);
+                publish(time);
+            });
+        }
+    }, 3000);
+
+
+});
+
+gadgets.HubSettings.onConnect = function () {
+    gadgets.Hub.subscribe("request-params", function (topic, data) {
+        applicationId = data.applicationId;
+        clusterId = data.clusterId;
+        console.log("Application Id: " + applicationId);
+        console.log("Cluster Id: " + clusterId);
+    });
+};
+
+$('body').on('change', '#application-filter', function () {
+    var e = document.getElementById("application-filter");
+    applicationId = e.options[e.selectedIndex].value;
+    loadCluster(applicationId);
+    publish(time);
+});
+
+$('body').on('change', '#cluster-filter', function () {
+    var e = document.getElementById("cluster-filter");
+    clusterId = e.options[e.selectedIndex].value;
+    publish(time);
+});
+
+function loadApplication() {
+    console.log("Getting Application Ids");
+    $.ajax({
+        url: '/portal/apis/applications',
+        dataType: 'json',
+        success: function (result) {
+            console.log(JSON.stringify(result));
+            var applicationIds = [];
+            var records = JSON.parse(JSON.stringify(result));
+            records.forEach(function (record, i) {
+                applicationIds.push(record.ApplicationId);
+            });
+
+            var elem = document.getElementById('application-filter');
+            for (i = 0; i < applicationIds.length; i = i + 1) {
+                var option = document.createElement("option");
+                option.text = applicationIds[i];
+                option.value = applicationIds[i];
+                elem.appendChild(option);
+            }
+            document.getElementById('application').appendChild(elem);
+        }
+    });
+}
+
+function loadCluster(application) {
+    $.ajax({
+        url: '/portal/apis/clusters?applicationId=' + application,
+        dataType: 'json',
+        success: function (result) {
+            var elem = document.getElementById('cluster-filter');
+            var clusterAlias = [];
+            var records = JSON.parse(JSON.stringify(result));
+            records.forEach(function (record, i) {
+                clusterAlias.push(record.ClusterAlias);
+            });
+
+            if (elem != null) {
+                elem.parentNode.removeChild(elem);
+            }
+
+            var clusterList = document.createElement('select');
+            clusterList.id = "cluster-filter";
+
+            var optionList = "";
+
+            optionList += "<option value= 'All Clusters'>All Clusters</option>";
+            for (i = 0; i < clusterAlias.length; i = i + 1) {
+                optionList += "<option value='" + clusterAlias[i] + "'>" + clusterAlias[i] + "</option>";
+            }
+
+            clusterList.innerHTML = optionList;
+            document.getElementById('cluster').appendChild(clusterList);
+        }
+    });
+    if (clusterId == null) {
+        var e = document.getElementById("cluster-filter");
+        clusterId = e.options[e.selectedIndex].value;
+    }
+
+}
+
+function publish(timeInterval) {
+    time = timeInterval;
+    var data = {applicationId: applicationId, clusterId: clusterId, timeInterval: time};
+    gadgets.Hub.publish("member-status-filter", data);
+    console.log("Publishing filter values: " + JSON.stringify(data));
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/artifact.xml
new file mode 100644
index 0000000..79e046d
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="GadgetMemberStatusFilter" version="1.0.0" type="dashboards/gadget" serverRole="DataAnalyticsServer">
+    <file>Member_Status_Filter</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo/artifact.xml
new file mode 100644
index 0000000..f6ae7ee
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="SparkscriptsMemberInfo" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
+    <file>member_information.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo/member_information.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo/member_information.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo/member_information.xml
new file mode 100644
index 0000000..ef838b6
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberInfo/member_information.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Analytics>
+    <Name>member_information</Name>
+    <Script>
+        CREATE TEMPORARY TABLE memberinfo
+        USING CarbonAnalytics
+        OPTIONS (tableName "MEMBER_INFO");
+
+        create temporary table member_details
+        using CarbonJDBC options (dataSource "WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB", tableName "MEMBER_INFORMATION");
+
+        INSERT OVERWRITE TABLE member_details select member_id, instance_type, image_id, host_name,
+        private_IP_addresses, public_IP_addresses, hypervisor, cpu, ram, os_name, os_version from memberinfo;
+    </Script>
+    <CronExpression>29 * * * * ?</CronExpression>
+</Analytics>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle/artifact.xml
new file mode 100644
index 0000000..153da46
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="SparkscriptsMemberLifecycle" version="1.0.0" type="analytics/spark" serverRole="DataAnalyticsServer">
+    <file>member_count.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle/member_count.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle/member_count.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle/member_count.xml
new file mode 100644
index 0000000..efebc24
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/SparkscriptsMemberLifecycle/member_count.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Analytics>
+    <Name>member_count</Name>
+    <Script>
+        CREATE TEMPORARY TABLE memberstatus
+        USING CarbonAnalytics
+        OPTIONS (tableName "MEMBER_LIFECYCLE");
+
+        create temporary table member_count
+        using CarbonJDBC options (dataSource "WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB", tableName "MEMBER_COUNT");
+
+        ;WITH MemberCount as
+        (select application_id, cluster_alias,
+        count(case when member_status='Created' and timestamp &gt; current_time(null)-10000 and
+        timestamp&lt;= current_time(null) then 1 else NULL end) as created_instance_count,
+        count(case when member_status='Initialized' and timestamp &gt; current_time(null)-10000 and
+        timestamp&lt;= current_time(null) then 1 else NULL end) as initialized_instance_count,
+        count(case when member_status='Active' and timestamp &gt; current_time(null)-10000 and
+        timestamp&lt;= current_time(null) then 1 else NULL end) as active_instance_count,
+        count(case when member_status='Terminated' and timestamp &gt; current_time(null)-10000 and
+        timestamp&lt;= current_time(null) then 1 else NULL end) as terminated_instance_count
+        from memberstatus group by application_id, cluster_alias)
+        INSERT INTO table member_count
+        select current_time(null), application_id, cluster_alias,
+        created_instance_count,initialized_instance_count,active_instance_count,
+        terminated_instance_count from MemberCount;
+
+        create temporary table member_status_new
+        using CarbonJDBC options (dataSource "WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB", tableName "MEMBER_STATUS");
+
+        INSERT OVERWRITE TABLE member_status_new select timestamp, application_id, cluster_alias, member_id,
+        member_status from memberstatus;
+    </Script>
+    <CronExpression>0/10 * * * * ?</CronExpression>
+</Analytics>
\ No newline at end of file


[20/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.min.js
new file mode 100644
index 0000000..0444ec4
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.min.js
@@ -0,0 +1,6332 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+!function () {
+    function n(n, t) {
+        return t > n ? -1 : n > t ? 1 : n >= t ? 0 : 0 / 0
+    }
+
+    function t(n) {
+        return null === n ? 0 / 0 : +n
+    }
+
+    function e(n) {
+        return !isNaN(n)
+    }
+
+    function r(n) {
+        return {
+            left: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) < 0 ? r = i + 1 : u = i
+                }
+                return r
+            }, right: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) > 0 ? u = i : r = i + 1
+                }
+                return r
+            }
+        }
+    }
+
+    function u(n) {
+        return n.length
+    }
+
+    function i(n) {
+        for (var t = 1; n * t % 1;)t *= 10;
+        return t
+    }
+
+    function o(n, t) {
+        for (var e in t)Object.defineProperty(n.prototype, e, {value: t[e], enumerable: !1})
+    }
+
+    function a() {
+        this._ = Object.create(null)
+    }
+
+    function c(n) {
+        return (n += "") === da || n[0] === ma ? ma + n : n
+    }
+
+    function l(n) {
+        return (n += "")[0] === ma ? n.slice(1) : n
+    }
+
+    function s(n) {
+        return c(n)in this._
+    }
+
+    function f(n) {
+        return (n = c(n))in this._ && delete this._[n]
+    }
+
+    function h() {
+        var n = [];
+        for (var t in this._)n.push(l(t));
+        return n
+    }
+
+    function g() {
+        var n = 0;
+        for (var t in this._)++n;
+        return n
+    }
+
+    function p() {
+        for (var n in this._)return !1;
+        return !0
+    }
+
+    function v() {
+        this._ = Object.create(null)
+    }
+
+    function d(n, t, e) {
+        return function () {
+            var r = e.apply(t, arguments);
+            return r === t ? n : r
+        }
+    }
+
+    function m(n, t) {
+        if (t in n)return t;
+        t = t.charAt(0).toUpperCase() + t.slice(1);
+        for (var e = 0, r = ya.length; r > e; ++e) {
+            var u = ya[e] + t;
+            if (u in n)return u
+        }
+    }
+
+    function y() {
+    }
+
+    function M() {
+    }
+
+    function x(n) {
+        function t() {
+            for (var t, r = e, u = -1, i = r.length; ++u < i;)(t = r[u].on) && t.apply(this, arguments);
+            return n
+        }
+
+        var e = [], r = new a;
+        return t.on = function (t, u) {
+            var i, o = r.get(t);
+            return arguments.length < 2 ? o && o.on : (o && (o.on = null, e = e.slice(0, i = e.indexOf(o)).concat(e.slice(i + 1)), r.remove(t)), u && e.push(r.set(t, {on: u})), n)
+        }, t
+    }
+
+    function b() {
+        ta.event.preventDefault()
+    }
+
+    function _() {
+        for (var n, t = ta.event; n = t.sourceEvent;)t = n;
+        return t
+    }
+
+    function w(n) {
+        for (var t = new M, e = 0, r = arguments.length; ++e < r;)t[arguments[e]] = x(t);
+        return t.of = function (e, r) {
+            return function (u) {
+                try {
+                    var i = u.sourceEvent = ta.event;
+                    u.target = n, ta.event = u, t[u.type].apply(e, r)
+                } finally {
+                    ta.event = i
+                }
+            }
+        }, t
+    }
+
+    function S(n) {
+        return xa(n, ka), n
+    }
+
+    function k(n) {
+        return "function" == typeof n ? n : function () {
+            return ba(n, this)
+        }
+    }
+
+    function E(n) {
+        return "function" == typeof n ? n : function () {
+            return _a(n, this)
+        }
+    }
+
+    function A(n, t) {
+        function e() {
+            this.removeAttribute(n)
+        }
+
+        function r() {
+            this.removeAttributeNS(n.space, n.local)
+        }
+
+        function u() {
+            this.setAttribute(n, t)
+        }
+
+        function i() {
+            this.setAttributeNS(n.space, n.local, t)
+        }
+
+        function o() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttribute(n) : this.setAttribute(n, e)
+        }
+
+        function a() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttributeNS(n.space, n.local) : this.setAttributeNS(n.space, n.local, e)
+        }
+
+        return n = ta.ns.qualify(n), null == t ? n.local ? r : e : "function" == typeof t ? n.local ? a : o : n.local ? i : u
+    }
+
+    function N(n) {
+        return n.trim().replace(/\s+/g, " ")
+    }
+
+    function C(n) {
+        return new RegExp("(?:^|\\s+)" + ta.requote(n) + "(?:\\s+|$)", "g")
+    }
+
+    function z(n) {
+        return (n + "").trim().split(/^|\s+/)
+    }
+
+    function q(n, t) {
+        function e() {
+            for (var e = -1; ++e < u;)n[e](this, t)
+        }
+
+        function r() {
+            for (var e = -1, r = t.apply(this, arguments); ++e < u;)n[e](this, r)
+        }
+
+        n = z(n).map(L);
+        var u = n.length;
+        return "function" == typeof t ? r : e
+    }
+
+    function L(n) {
+        var t = C(n);
+        return function (e, r) {
+            if (u = e.classList)return r ? u.add(n) : u.remove(n);
+            var u = e.getAttribute("class") || "";
+            r ? (t.lastIndex = 0, t.test(u) || e.setAttribute("class", N(u + " " + n))) : e.setAttribute("class", N(u.replace(t, " ")))
+        }
+    }
+
+    function T(n, t, e) {
+        function r() {
+            this.style.removeProperty(n)
+        }
+
+        function u() {
+            this.style.setProperty(n, t, e)
+        }
+
+        function i() {
+            var r = t.apply(this, arguments);
+            null == r ? this.style.removeProperty(n) : this.style.setProperty(n, r, e)
+        }
+
+        return null == t ? r : "function" == typeof t ? i : u
+    }
+
+    function R(n, t) {
+        function e() {
+            delete this[n]
+        }
+
+        function r() {
+            this[n] = t
+        }
+
+        function u() {
+            var e = t.apply(this, arguments);
+            null == e ? delete this[n] : this[n] = e
+        }
+
+        return null == t ? e : "function" == typeof t ? u : r
+    }
+
+    function D(n) {
+        return "function" == typeof n ? n : (n = ta.ns.qualify(n)).local ? function () {
+            return this.ownerDocument.createElementNS(n.space, n.local)
+        } : function () {
+            return this.ownerDocument.createElementNS(this.namespaceURI, n)
+        }
+    }
+
+    function P() {
+        var n = this.parentNode;
+        n && n.removeChild(this)
+    }
+
+    function U(n) {
+        return {__data__: n}
+    }
+
+    function j(n) {
+        return function () {
+            return Sa(this, n)
+        }
+    }
+
+    function F(t) {
+        return arguments.length || (t = n), function (n, e) {
+            return n && e ? t(n.__data__, e.__data__) : !n - !e
+        }
+    }
+
+    function H(n, t) {
+        for (var e = 0, r = n.length; r > e; e++)for (var u, i = n[e], o = 0, a = i.length; a > o; o++)(u = i[o]) && t(u, o, e);
+        return n
+    }
+
+    function O(n) {
+        return xa(n, Aa), n
+    }
+
+    function Y(n) {
+        var t, e;
+        return function (r, u, i) {
+            var o, a = n[i].update, c = a.length;
+            for (i != e && (e = i, t = 0), u >= t && (t = u + 1); !(o = a[t]) && ++t < c;);
+            return o
+        }
+    }
+
+    function I(n, t, e) {
+        function r() {
+            var t = this[o];
+            t && (this.removeEventListener(n, t, t.$), delete this[o])
+        }
+
+        function u() {
+            var u = c(t, ra(arguments));
+            r.call(this), this.addEventListener(n, this[o] = u, u.$ = e), u._ = t
+        }
+
+        function i() {
+            var t, e = new RegExp("^__on([^.]+)" + ta.requote(n) + "$");
+            for (var r in this)if (t = r.match(e)) {
+                var u = this[r];
+                this.removeEventListener(t[1], u, u.$), delete this[r]
+            }
+        }
+
+        var o = "__on" + n, a = n.indexOf("."), c = Z;
+        a > 0 && (n = n.slice(0, a));
+        var l = Ca.get(n);
+        return l && (n = l, c = V), a ? t ? u : r : t ? y : i
+    }
+
+    function Z(n, t) {
+        return function (e) {
+            var r = ta.event;
+            ta.event = e, t[0] = this.__data__;
+            try {
+                n.apply(this, t)
+            } finally {
+                ta.event = r
+            }
+        }
+    }
+
+    function V(n, t) {
+        var e = Z(n, t);
+        return function (n) {
+            var t = this, r = n.relatedTarget;
+            r && (r === t || 8 & r.compareDocumentPosition(t)) || e.call(t, n)
+        }
+    }
+
+    function X() {
+        var n = ".dragsuppress-" + ++qa, t = "click" + n, e = ta.select(oa).on("touchmove" + n, b).on("dragstart" + n, b).on("selectstart" + n, b);
+        if (za) {
+            var r = ia.style, u = r[za];
+            r[za] = "none"
+        }
+        return function (i) {
+            if (e.on(n, null), za && (r[za] = u), i) {
+                var o = function () {
+                    e.on(t, null)
+                };
+                e.on(t, function () {
+                    b(), o()
+                }, !0), setTimeout(o, 0)
+            }
+        }
+    }
+
+    function $(n, t) {
+        t.changedTouches && (t = t.changedTouches[0]);
+        var e = n.ownerSVGElement || n;
+        if (e.createSVGPoint) {
+            var r = e.createSVGPoint();
+            if (0 > La && (oa.scrollX || oa.scrollY)) {
+                e = ta.select("body").append("svg").style({
+                    position: "absolute",
+                    top: 0,
+                    left: 0,
+                    margin: 0,
+                    padding: 0,
+                    border: "none"
+                }, "important");
+                var u = e[0][0].getScreenCTM();
+                La = !(u.f || u.e), e.remove()
+            }
+            return La ? (r.x = t.pageX, r.y = t.pageY) : (r.x = t.clientX, r.y = t.clientY), r = r.matrixTransform(n.getScreenCTM().inverse()), [r.x, r.y]
+        }
+        var i = n.getBoundingClientRect();
+        return [t.clientX - i.left - n.clientLeft, t.clientY - i.top - n.clientTop]
+    }
+
+    function B() {
+        return ta.event.changedTouches[0].identifier
+    }
+
+    function W() {
+        return ta.event.target
+    }
+
+    function J() {
+        return oa
+    }
+
+    function G(n) {
+        return n > 0 ? 1 : 0 > n ? -1 : 0
+    }
+
+    function K(n, t, e) {
+        return (t[0] - n[0]) * (e[1] - n[1]) - (t[1] - n[1]) * (e[0] - n[0])
+    }
+
+    function Q(n) {
+        return n > 1 ? 0 : -1 > n ? Da : Math.acos(n)
+    }
+
+    function nt(n) {
+        return n > 1 ? ja : -1 > n ? -ja : Math.asin(n)
+    }
+
+    function tt(n) {
+        return ((n = Math.exp(n)) - 1 / n) / 2
+    }
+
+    function et(n) {
+        return ((n = Math.exp(n)) + 1 / n) / 2
+    }
+
+    function rt(n) {
+        return ((n = Math.exp(2 * n)) - 1) / (n + 1)
+    }
+
+    function ut(n) {
+        return (n = Math.sin(n / 2)) * n
+    }
+
+    function it() {
+    }
+
+    function ot(n, t, e) {
+        return this instanceof ot ? (this.h = +n, this.s = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof ot ? new ot(n.h, n.s, n.l) : xt("" + n, bt, ot) : new ot(n, t, e)
+    }
+
+    function at(n, t, e) {
+        function r(n) {
+            return n > 360 ? n -= 360 : 0 > n && (n += 360), 60 > n ? i + (o - i) * n / 60 : 180 > n ? o : 240 > n ? i + (o - i) * (240 - n) / 60 : i
+        }
+
+        function u(n) {
+            return Math.round(255 * r(n))
+        }
+
+        var i, o;
+        return n = isNaN(n) ? 0 : (n %= 360) < 0 ? n + 360 : n, t = isNaN(t) ? 0 : 0 > t ? 0 : t > 1 ? 1 : t, e = 0 > e ? 0 : e > 1 ? 1 : e, o = .5 >= e ? e * (1 + t) : e + t - e * t, i = 2 * e - o, new dt(u(n + 120), u(n), u(n - 120))
+    }
+
+    function ct(n, t, e) {
+        return this instanceof ct ? (this.h = +n, this.c = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof ct ? new ct(n.h, n.c, n.l) : n instanceof st ? ht(n.l, n.a, n.b) : ht((n = _t((n = ta.rgb(n)).r, n.g, n.b)).l, n.a, n.b) : new ct(n, t, e)
+    }
+
+    function lt(n, t, e) {
+        return isNaN(n) && (n = 0), isNaN(t) && (t = 0), new st(e, Math.cos(n *= Fa) * t, Math.sin(n) * t)
+    }
+
+    function st(n, t, e) {
+        return this instanceof st ? (this.l = +n, this.a = +t, void(this.b = +e)) : arguments.length < 2 ? n instanceof st ? new st(n.l, n.a, n.b) : n instanceof ct ? lt(n.h, n.c, n.l) : _t((n = dt(n)).r, n.g, n.b) : new st(n, t, e)
+    }
+
+    function ft(n, t, e) {
+        var r = (n + 16) / 116, u = r + t / 500, i = r - e / 200;
+        return u = gt(u) * Ja, r = gt(r) * Ga, i = gt(i) * Ka, new dt(vt(3.2404542 * u - 1.5371385 * r - .4985314 * i), vt(-.969266 * u + 1.8760108 * r + .041556 * i), vt(.0556434 * u - .2040259 * r + 1.0572252 * i))
+    }
+
+    function ht(n, t, e) {
+        return n > 0 ? new ct(Math.atan2(e, t) * Ha, Math.sqrt(t * t + e * e), n) : new ct(0 / 0, 0 / 0, n)
+    }
+
+    function gt(n) {
+        return n > .206893034 ? n * n * n : (n - 4 / 29) / 7.787037
+    }
+
+    function pt(n) {
+        return n > .008856 ? Math.pow(n, 1 / 3) : 7.787037 * n + 4 / 29
+    }
+
+    function vt(n) {
+        return Math.round(255 * (.00304 >= n ? 12.92 * n : 1.055 * Math.pow(n, 1 / 2.4) - .055))
+    }
+
+    function dt(n, t, e) {
+        return this instanceof dt ? (this.r = ~~n, this.g = ~~t, void(this.b = ~~e)) : arguments.length < 2 ? n instanceof dt ? new dt(n.r, n.g, n.b) : xt("" + n, dt, at) : new dt(n, t, e)
+    }
+
+    function mt(n) {
+        return new dt(n >> 16, 255 & n >> 8, 255 & n)
+    }
+
+    function yt(n) {
+        return mt(n) + ""
+    }
+
+    function Mt(n) {
+        return 16 > n ? "0" + Math.max(0, n).toString(16) : Math.min(255, n).toString(16)
+    }
+
+    function xt(n, t, e) {
+        var r, u, i, o = 0, a = 0, c = 0;
+        if (r = /([a-z]+)\((.*)\)/i.exec(n))switch (u = r[2].split(","), r[1]) {
+            case"hsl":
+                return e(parseFloat(u[0]), parseFloat(u[1]) / 100, parseFloat(u[2]) / 100);
+            case"rgb":
+                return t(St(u[0]), St(u[1]), St(u[2]))
+        }
+        return (i = tc.get(n)) ? t(i.r, i.g, i.b) : (null == n || "#" !== n.charAt(0) || isNaN(i = parseInt(n.slice(1), 16)) || (4 === n.length ? (o = (3840 & i) >> 4, o = o >> 4 | o, a = 240 & i, a = a >> 4 | a, c = 15 & i, c = c << 4 | c) : 7 === n.length && (o = (16711680 & i) >> 16, a = (65280 & i) >> 8, c = 255 & i)), t(o, a, c))
+    }
+
+    function bt(n, t, e) {
+        var r, u, i = Math.min(n /= 255, t /= 255, e /= 255), o = Math.max(n, t, e), a = o - i, c = (o + i) / 2;
+        return a ? (u = .5 > c ? a / (o + i) : a / (2 - o - i), r = n == o ? (t - e) / a + (e > t ? 6 : 0) : t == o ? (e - n) / a + 2 : (n - t) / a + 4, r *= 60) : (r = 0 / 0, u = c > 0 && 1 > c ? 0 : r), new ot(r, u, c)
+    }
+
+    function _t(n, t, e) {
+        n = wt(n), t = wt(t), e = wt(e);
+        var r = pt((.4124564 * n + .3575761 * t + .1804375 * e) / Ja), u = pt((.2126729 * n + .7151522 * t + .072175 * e) / Ga), i = pt((.0193339 * n + .119192 * t + .9503041 * e) / Ka);
+        return st(116 * u - 16, 500 * (r - u), 200 * (u - i))
+    }
+
+    function wt(n) {
+        return (n /= 255) <= .04045 ? n / 12.92 : Math.pow((n + .055) / 1.055, 2.4)
+    }
+
+    function St(n) {
+        var t = parseFloat(n);
+        return "%" === n.charAt(n.length - 1) ? Math.round(2.55 * t) : t
+    }
+
+    function kt(n) {
+        return "function" == typeof n ? n : function () {
+            return n
+        }
+    }
+
+    function Et(n) {
+        return n
+    }
+
+    function At(n) {
+        return function (t, e, r) {
+            return 2 === arguments.length && "function" == typeof e && (r = e, e = null), Nt(t, e, n, r)
+        }
+    }
+
+    function Nt(n, t, e, r) {
+        function u() {
+            var n, t = c.status;
+            if (!t && zt(c) || t >= 200 && 300 > t || 304 === t) {
+                try {
+                    n = e.call(i, c)
+                } catch (r) {
+                    return o.error.call(i, r), void 0
+                }
+                o.load.call(i, n)
+            } else o.error.call(i, c)
+        }
+
+        var i = {}, o = ta.dispatch("beforesend", "progress", "load", "error"), a = {}, c = new XMLHttpRequest, l = null;
+        return !oa.XDomainRequest || "withCredentials"in c || !/^(http(s)?:)?\/\//.test(n) || (c = new XDomainRequest), "onload"in c ? c.onload = c.onerror = u : c.onreadystatechange = function () {
+            c.readyState > 3 && u()
+        }, c.onprogress = function (n) {
+            var t = ta.event;
+            ta.event = n;
+            try {
+                o.progress.call(i, c)
+            } finally {
+                ta.event = t
+            }
+        }, i.header = function (n, t) {
+            return n = (n + "").toLowerCase(), arguments.length < 2 ? a[n] : (null == t ? delete a[n] : a[n] = t + "", i)
+        }, i.mimeType = function (n) {
+            return arguments.length ? (t = null == n ? null : n + "", i) : t
+        }, i.responseType = function (n) {
+            return arguments.length ? (l = n, i) : l
+        }, i.response = function (n) {
+            return e = n, i
+        }, ["get", "post"].forEach(function (n) {
+            i[n] = function () {
+                return i.send.apply(i, [n].concat(ra(arguments)))
+            }
+        }), i.send = function (e, r, u) {
+            if (2 === arguments.length && "function" == typeof r && (u = r, r = null), c.open(e, n, !0), null == t || "accept"in a || (a.accept = t + ",*/*"), c.setRequestHeader)for (var s in a)c.setRequestHeader(s, a[s]);
+            return null != t && c.overrideMimeType && c.overrideMimeType(t), null != l && (c.responseType = l), null != u && i.on("error", u).on("load", function (n) {
+                u(null, n)
+            }), o.beforesend.call(i, c), c.send(null == r ? null : r), i
+        }, i.abort = function () {
+            return c.abort(), i
+        }, ta.rebind(i, o, "on"), null == r ? i : i.get(Ct(r))
+    }
+
+    function Ct(n) {
+        return 1 === n.length ? function (t, e) {
+            n(null == t ? e : null)
+        } : n
+    }
+
+    function zt(n) {
+        var t = n.responseType;
+        return t && "text" !== t ? n.response : n.responseText
+    }
+
+    function qt() {
+        var n = Lt(), t = Tt() - n;
+        t > 24 ? (isFinite(t) && (clearTimeout(ic), ic = setTimeout(qt, t)), uc = 0) : (uc = 1, ac(qt))
+    }
+
+    function Lt() {
+        var n = Date.now();
+        for (oc = ec; oc;)n >= oc.t && (oc.f = oc.c(n - oc.t)), oc = oc.n;
+        return n
+    }
+
+    function Tt() {
+        for (var n, t = ec, e = 1 / 0; t;)t.f ? t = n ? n.n = t.n : ec = t.n : (t.t < e && (e = t.t), t = (n = t).n);
+        return rc = n, e
+    }
+
+    function Rt(n, t) {
+        return t - (n ? Math.ceil(Math.log(n) / Math.LN10) : 1)
+    }
+
+    function Dt(n, t) {
+        var e = Math.pow(10, 3 * va(8 - t));
+        return {
+            scale: t > 8 ? function (n) {
+                return n / e
+            } : function (n) {
+                return n * e
+            }, symbol: n
+        }
+    }
+
+    function Pt(n) {
+        var t = n.decimal, e = n.thousands, r = n.grouping, u = n.currency, i = r && e ? function (n, t) {
+            for (var u = n.length, i = [], o = 0, a = r[0], c = 0; u > 0 && a > 0 && (c + a + 1 > t && (a = Math.max(1, t - c)), i.push(n.substring(u -= a, u + a)), !((c += a + 1) > t));)a = r[o = (o + 1) % r.length];
+            return i.reverse().join(e)
+        } : Et;
+        return function (n) {
+            var e = lc.exec(n), r = e[1] || " ", o = e[2] || ">", a = e[3] || "-", c = e[4] || "", l = e[5], s = +e[6], f = e[7], h = e[8], g = e[9], p = 1, v = "", d = "", m = !1, y = !0;
+            switch (h && (h = +h.substring(1)), (l || "0" === r && "=" === o) && (l = r = "0", o = "="), g) {
+                case"n":
+                    f = !0, g = "g";
+                    break;
+                case"%":
+                    p = 100, d = "%", g = "f";
+                    break;
+                case"p":
+                    p = 100, d = "%", g = "r";
+                    break;
+                case"b":
+                case"o":
+                case"x":
+                case"X":
+                    "#" === c && (v = "0" + g.toLowerCase());
+                case"c":
+                    y = !1;
+                case"d":
+                    m = !0, h = 0;
+                    break;
+                case"s":
+                    p = -1, g = "r"
+            }
+            "$" === c && (v = u[0], d = u[1]), "r" != g || h || (g = "g"), null != h && ("g" == g ? h = Math.max(1, Math.min(21, h)) : ("e" == g || "f" == g) && (h = Math.max(0, Math.min(20, h)))), g = sc.get(g) || Ut;
+            var M = l && f;
+            return function (n) {
+                var e = d;
+                if (m && n % 1)return "";
+                var u = 0 > n || 0 === n && 0 > 1 / n ? (n = -n, "-") : "-" === a ? "" : a;
+                if (0 > p) {
+                    var c = ta.formatPrefix(n, h);
+                    n = c.scale(n), e = c.symbol + d
+                } else n *= p;
+                n = g(n, h);
+                var x, b, _ = n.lastIndexOf(".");
+                if (0 > _) {
+                    var w = y ? n.lastIndexOf("e") : -1;
+                    0 > w ? (x = n, b = "") : (x = n.substring(0, w), b = n.substring(w))
+                } else x = n.substring(0, _), b = t + n.substring(_ + 1);
+                !l && f && (x = i(x, 1 / 0));
+                var S = v.length + x.length + b.length + (M ? 0 : u.length), k = s > S ? new Array(S = s - S + 1).join(r) : "";
+                return M && (x = i(k + x, k.length ? s - b.length : 1 / 0)), u += v, n = x + b, ("<" === o ? u + n + k : ">" === o ? k + u + n : "^" === o ? k.substring(0, S >>= 1) + u + n + k.substring(S) : u + (M ? n : k + n)) + e
+            }
+        }
+    }
+
+    function Ut(n) {
+        return n + ""
+    }
+
+    function jt() {
+        this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0])
+    }
+
+    function Ft(n, t, e) {
+        function r(t) {
+            var e = n(t), r = i(e, 1);
+            return r - t > t - e ? e : r
+        }
+
+        function u(e) {
+            return t(e = n(new hc(e - 1)), 1), e
+        }
+
+        function i(n, e) {
+            return t(n = new hc(+n), e), n
+        }
+
+        function o(n, r, i) {
+            var o = u(n), a = [];
+            if (i > 1)for (; r > o;)e(o) % i || a.push(new Date(+o)), t(o, 1); else for (; r > o;)a.push(new Date(+o)), t(o, 1);
+            return a
+        }
+
+        function a(n, t, e) {
+            try {
+                hc = jt;
+                var r = new jt;
+                return r._ = n, o(r, t, e)
+            } finally {
+                hc = Date
+            }
+        }
+
+        n.floor = n, n.round = r, n.ceil = u, n.offset = i, n.range = o;
+        var c = n.utc = Ht(n);
+        return c.floor = c, c.round = Ht(r), c.ceil = Ht(u), c.offset = Ht(i), c.range = a, n
+    }
+
+    function Ht(n) {
+        return function (t, e) {
+            try {
+                hc = jt;
+                var r = new jt;
+                return r._ = t, n(r, e)._
+            } finally {
+                hc = Date
+            }
+        }
+    }
+
+    function Ot(n) {
+        function t(n) {
+            function t(t) {
+                for (var e, u, i, o = [], a = -1, c = 0; ++a < r;)37 === n.charCodeAt(a) && (o.push(n.slice(c, a)), null != (u = pc[e = n.charAt(++a)]) && (e = n.charAt(++a)), (i = N[e]) && (e = i(t, null == u ? "e" === e ? " " : "0" : u)), o.push(e), c = a + 1);
+                return o.push(n.slice(c, a)), o.join("")
+            }
+
+            var r = n.length;
+            return t.parse = function (t) {
+                var r = {y: 1900, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0, Z: null}, u = e(r, n, t, 0);
+                if (u != t.length)return null;
+                "p"in r && (r.H = r.H % 12 + 12 * r.p);
+                var i = null != r.Z && hc !== jt, o = new (i ? jt : hc);
+                return "j"in r ? o.setFullYear(r.y, 0, r.j) : "w"in r && ("W"in r || "U"in r) ? (o.setFullYear(r.y, 0, 1), o.setFullYear(r.y, 0, "W"in r ? (r.w + 6) % 7 + 7 * r.W - (o.getDay() + 5) % 7 : r.w + 7 * r.U - (o.getDay() + 6) % 7)) : o.setFullYear(r.y, r.m, r.d), o.setHours(r.H + (0 | r.Z / 100), r.M + r.Z % 100, r.S, r.L), i ? o._ : o
+            }, t.toString = function () {
+                return n
+            }, t
+        }
+
+        function e(n, t, e, r) {
+            for (var u, i, o, a = 0, c = t.length, l = e.length; c > a;) {
+                if (r >= l)return -1;
+                if (u = t.charCodeAt(a++), 37 === u) {
+                    if (o = t.charAt(a++), i = C[o in pc ? t.charAt(a++) : o], !i || (r = i(n, e, r)) < 0)return -1
+                } else if (u != e.charCodeAt(r++))return -1
+            }
+            return r
+        }
+
+        function r(n, t, e) {
+            _.lastIndex = 0;
+            var r = _.exec(t.slice(e));
+            return r ? (n.w = w.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function u(n, t, e) {
+            x.lastIndex = 0;
+            var r = x.exec(t.slice(e));
+            return r ? (n.w = b.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function i(n, t, e) {
+            E.lastIndex = 0;
+            var r = E.exec(t.slice(e));
+            return r ? (n.m = A.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function o(n, t, e) {
+            S.lastIndex = 0;
+            var r = S.exec(t.slice(e));
+            return r ? (n.m = k.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function a(n, t, r) {
+            return e(n, N.c.toString(), t, r)
+        }
+
+        function c(n, t, r) {
+            return e(n, N.x.toString(), t, r)
+        }
+
+        function l(n, t, r) {
+            return e(n, N.X.toString(), t, r)
+        }
+
+        function s(n, t, e) {
+            var r = M.get(t.slice(e, e += 2).toLowerCase());
+            return null == r ? -1 : (n.p = r, e)
+        }
+
+        var f = n.dateTime, h = n.date, g = n.time, p = n.periods, v = n.days, d = n.shortDays, m = n.months, y = n.shortMonths;
+        t.utc = function (n) {
+            function e(n) {
+                try {
+                    hc = jt;
+                    var t = new hc;
+                    return t._ = n, r(t)
+                } finally {
+                    hc = Date
+                }
+            }
+
+            var r = t(n);
+            return e.parse = function (n) {
+                try {
+                    hc = jt;
+                    var t = r.parse(n);
+                    return t && t._
+                } finally {
+                    hc = Date
+                }
+            }, e.toString = r.toString, e
+        }, t.multi = t.utc.multi = ae;
+        var M = ta.map(), x = It(v), b = Zt(v), _ = It(d), w = Zt(d), S = It(m), k = Zt(m), E = It(y), A = Zt(y);
+        p.forEach(function (n, t) {
+            M.set(n.toLowerCase(), t)
+        });
+        var N = {
+            a: function (n) {
+                return d[n.getDay()]
+            }, A: function (n) {
+                return v[n.getDay()]
+            }, b: function (n) {
+                return y[n.getMonth()]
+            }, B: function (n) {
+                return m[n.getMonth()]
+            }, c: t(f), d: function (n, t) {
+                return Yt(n.getDate(), t, 2)
+            }, e: function (n, t) {
+                return Yt(n.getDate(), t, 2)
+            }, H: function (n, t) {
+                return Yt(n.getHours(), t, 2)
+            }, I: function (n, t) {
+                return Yt(n.getHours() % 12 || 12, t, 2)
+            }, j: function (n, t) {
+                return Yt(1 + fc.dayOfYear(n), t, 3)
+            }, L: function (n, t) {
+                return Yt(n.getMilliseconds(), t, 3)
+            }, m: function (n, t) {
+                return Yt(n.getMonth() + 1, t, 2)
+            }, M: function (n, t) {
+                return Yt(n.getMinutes(), t, 2)
+            }, p: function (n) {
+                return p[+(n.getHours() >= 12)]
+            }, S: function (n, t) {
+                return Yt(n.getSeconds(), t, 2)
+            }, U: function (n, t) {
+                return Yt(fc.sundayOfYear(n), t, 2)
+            }, w: function (n) {
+                return n.getDay()
+            }, W: function (n, t) {
+                return Yt(fc.mondayOfYear(n), t, 2)
+            }, x: t(h), X: t(g), y: function (n, t) {
+                return Yt(n.getFullYear() % 100, t, 2)
+            }, Y: function (n, t) {
+                return Yt(n.getFullYear() % 1e4, t, 4)
+            }, Z: ie, "%": function () {
+                return "%"
+            }
+        }, C = {
+            a: r,
+            A: u,
+            b: i,
+            B: o,
+            c: a,
+            d: Qt,
+            e: Qt,
+            H: te,
+            I: te,
+            j: ne,
+            L: ue,
+            m: Kt,
+            M: ee,
+            p: s,
+            S: re,
+            U: Xt,
+            w: Vt,
+            W: $t,
+            x: c,
+            X: l,
+            y: Wt,
+            Y: Bt,
+            Z: Jt,
+            "%": oe
+        };
+        return t
+    }
+
+    function Yt(n, t, e) {
+        var r = 0 > n ? "-" : "", u = (r ? -n : n) + "", i = u.length;
+        return r + (e > i ? new Array(e - i + 1).join(t) + u : u)
+    }
+
+    function It(n) {
+        return new RegExp("^(?:" + n.map(ta.requote).join("|") + ")", "i")
+    }
+
+    function Zt(n) {
+        for (var t = new a, e = -1, r = n.length; ++e < r;)t.set(n[e].toLowerCase(), e);
+        return t
+    }
+
+    function Vt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 1));
+        return r ? (n.w = +r[0], e + r[0].length) : -1
+    }
+
+    function Xt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e));
+        return r ? (n.U = +r[0], e + r[0].length) : -1
+    }
+
+    function $t(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e));
+        return r ? (n.W = +r[0], e + r[0].length) : -1
+    }
+
+    function Bt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 4));
+        return r ? (n.y = +r[0], e + r[0].length) : -1
+    }
+
+    function Wt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.y = Gt(+r[0]), e + r[0].length) : -1
+    }
+
+    function Jt(n, t, e) {
+        return /^[+-]\d{4}$/.test(t = t.slice(e, e + 5)) ? (n.Z = -t, e + 5) : -1
+    }
+
+    function Gt(n) {
+        return n + (n > 68 ? 1900 : 2e3)
+    }
+
+    function Kt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.m = r[0] - 1, e + r[0].length) : -1
+    }
+
+    function Qt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.d = +r[0], e + r[0].length) : -1
+    }
+
+    function ne(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 3));
+        return r ? (n.j = +r[0], e + r[0].length) : -1
+    }
+
+    function te(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.H = +r[0], e + r[0].length) : -1
+    }
+
+    function ee(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.M = +r[0], e + r[0].length) : -1
+    }
+
+    function re(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.S = +r[0], e + r[0].length) : -1
+    }
+
+    function ue(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 3));
+        return r ? (n.L = +r[0], e + r[0].length) : -1
+    }
+
+    function ie(n) {
+        var t = n.getTimezoneOffset(), e = t > 0 ? "-" : "+", r = 0 | va(t) / 60, u = va(t) % 60;
+        return e + Yt(r, "0", 2) + Yt(u, "0", 2)
+    }
+
+    function oe(n, t, e) {
+        dc.lastIndex = 0;
+        var r = dc.exec(t.slice(e, e + 1));
+        return r ? e + r[0].length : -1
+    }
+
+    function ae(n) {
+        for (var t = n.length, e = -1; ++e < t;)n[e][0] = this(n[e][0]);
+        return function (t) {
+            for (var e = 0, r = n[e]; !r[1](t);)r = n[++e];
+            return r[0](t)
+        }
+    }
+
+    function ce() {
+    }
+
+    function le(n, t, e) {
+        var r = e.s = n + t, u = r - n, i = r - u;
+        e.t = n - i + (t - u)
+    }
+
+    function se(n, t) {
+        n && xc.hasOwnProperty(n.type) && xc[n.type](n, t)
+    }
+
+    function fe(n, t, e) {
+        var r, u = -1, i = n.length - e;
+        for (t.lineStart(); ++u < i;)r = n[u], t.point(r[0], r[1], r[2]);
+        t.lineEnd()
+    }
+
+    function he(n, t) {
+        var e = -1, r = n.length;
+        for (t.polygonStart(); ++e < r;)fe(n[e], t, 1);
+        t.polygonEnd()
+    }
+
+    function ge() {
+        function n(n, t) {
+            n *= Fa, t = t * Fa / 2 + Da / 4;
+            var e = n - r, o = e >= 0 ? 1 : -1, a = o * e, c = Math.cos(t), l = Math.sin(t), s = i * l, f = u * c + s * Math.cos(a), h = s * o * Math.sin(a);
+            _c.add(Math.atan2(h, f)), r = n, u = c, i = l
+        }
+
+        var t, e, r, u, i;
+        wc.point = function (o, a) {
+            wc.point = n, r = (t = o) * Fa, u = Math.cos(a = (e = a) * Fa / 2 + Da / 4), i = Math.sin(a)
+        }, wc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function pe(n) {
+        var t = n[0], e = n[1], r = Math.cos(e);
+        return [r * Math.cos(t), r * Math.sin(t), Math.sin(e)]
+    }
+
+    function ve(n, t) {
+        return n[0] * t[0] + n[1] * t[1] + n[2] * t[2]
+    }
+
+    function de(n, t) {
+        return [n[1] * t[2] - n[2] * t[1], n[2] * t[0] - n[0] * t[2], n[0] * t[1] - n[1] * t[0]]
+    }
+
+    function me(n, t) {
+        n[0] += t[0], n[1] += t[1], n[2] += t[2]
+    }
+
+    function ye(n, t) {
+        return [n[0] * t, n[1] * t, n[2] * t]
+    }
+
+    function Me(n) {
+        var t = Math.sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
+        n[0] /= t, n[1] /= t, n[2] /= t
+    }
+
+    function xe(n) {
+        return [Math.atan2(n[1], n[0]), nt(n[2])]
+    }
+
+    function be(n, t) {
+        return va(n[0] - t[0]) < Ta && va(n[1] - t[1]) < Ta
+    }
+
+    function _e(n, t) {
+        n *= Fa;
+        var e = Math.cos(t *= Fa);
+        we(e * Math.cos(n), e * Math.sin(n), Math.sin(t))
+    }
+
+    function we(n, t, e) {
+        ++Sc, Ec += (n - Ec) / Sc, Ac += (t - Ac) / Sc, Nc += (e - Nc) / Sc
+    }
+
+    function Se() {
+        function n(n, u) {
+            n *= Fa;
+            var i = Math.cos(u *= Fa), o = i * Math.cos(n), a = i * Math.sin(n), c = Math.sin(u), l = Math.atan2(Math.sqrt((l = e * c - r * a) * l + (l = r * o - t * c) * l + (l = t * a - e * o) * l), t * o + e * a + r * c);
+            kc += l, Cc += l * (t + (t = o)), zc += l * (e + (e = a)), qc += l * (r + (r = c)), we(t, e, r)
+        }
+
+        var t, e, r;
+        Dc.point = function (u, i) {
+            u *= Fa;
+            var o = Math.cos(i *= Fa);
+            t = o * Math.cos(u), e = o * Math.sin(u), r = Math.sin(i), Dc.point = n, we(t, e, r)
+        }
+    }
+
+    function ke() {
+        Dc.point = _e
+    }
+
+    function Ee() {
+        function n(n, t) {
+            n *= Fa;
+            var e = Math.cos(t *= Fa), o = e * Math.cos(n), a = e * Math.sin(n), c = Math.sin(t), l = u * c - i * a, s = i * o - r * c, f = r * a - u * o, h = Math.sqrt(l * l + s * s + f * f), g = r * o + u * a + i * c, p = h && -Q(g) / h, v = Math.atan2(h, g);
+            Lc += p * l, Tc += p * s, Rc += p * f, kc += v, Cc += v * (r + (r = o)), zc += v * (u + (u = a)), qc += v * (i + (i = c)), we(r, u, i)
+        }
+
+        var t, e, r, u, i;
+        Dc.point = function (o, a) {
+            t = o, e = a, Dc.point = n, o *= Fa;
+            var c = Math.cos(a *= Fa);
+            r = c * Math.cos(o), u = c * Math.sin(o), i = Math.sin(a), we(r, u, i)
+        }, Dc.lineEnd = function () {
+            n(t, e), Dc.lineEnd = ke, Dc.point = _e
+        }
+    }
+
+    function Ae(n, t) {
+        function e(e, r) {
+            return e = n(e, r), t(e[0], e[1])
+        }
+
+        return n.invert && t.invert && (e.invert = function (e, r) {
+            return e = t.invert(e, r), e && n.invert(e[0], e[1])
+        }), e
+    }
+
+    function Ne() {
+        return !0
+    }
+
+    function Ce(n, t, e, r, u) {
+        var i = [], o = [];
+        if (n.forEach(function (n) {
+                if (!((t = n.length - 1) <= 0)) {
+                    var t, e = n[0], r = n[t];
+                    if (be(e, r)) {
+                        u.lineStart();
+                        for (var a = 0; t > a; ++a)u.point((e = n[a])[0], e[1]);
+                        return u.lineEnd(), void 0
+                    }
+                    var c = new qe(e, n, null, !0), l = new qe(e, null, c, !1);
+                    c.o = l, i.push(c), o.push(l), c = new qe(r, n, null, !1), l = new qe(r, null, c, !0), c.o = l, i.push(c), o.push(l)
+                }
+            }), o.sort(t), ze(i), ze(o), i.length) {
+            for (var a = 0, c = e, l = o.length; l > a; ++a)o[a].e = c = !c;
+            for (var s, f, h = i[0]; ;) {
+                for (var g = h, p = !0; g.v;)if ((g = g.n) === h)return;
+                s = g.z, u.lineStart();
+                do {
+                    if (g.v = g.o.v = !0, g.e) {
+                        if (p)for (var a = 0, l = s.length; l > a; ++a)u.point((f = s[a])[0], f[1]); else r(g.x, g.n.x, 1, u);
+                        g = g.n
+                    } else {
+                        if (p) {
+                            s = g.p.z;
+                            for (var a = s.length - 1; a >= 0; --a)u.point((f = s[a])[0], f[1])
+                        } else r(g.x, g.p.x, -1, u);
+                        g = g.p
+                    }
+                    g = g.o, s = g.z, p = !p
+                } while (!g.v);
+                u.lineEnd()
+            }
+        }
+    }
+
+    function ze(n) {
+        if (t = n.length) {
+            for (var t, e, r = 0, u = n[0]; ++r < t;)u.n = e = n[r], e.p = u, u = e;
+            u.n = e = n[0], e.p = u
+        }
+    }
+
+    function qe(n, t, e, r) {
+        this.x = n, this.z = t, this.o = e, this.e = r, this.v = !1, this.n = this.p = null
+    }
+
+    function Le(n, t, e, r) {
+        return function (u, i) {
+            function o(t, e) {
+                var r = u(t, e);
+                n(t = r[0], e = r[1]) && i.point(t, e)
+            }
+
+            function a(n, t) {
+                var e = u(n, t);
+                d.point(e[0], e[1])
+            }
+
+            function c() {
+                y.point = a, d.lineStart()
+            }
+
+            function l() {
+                y.point = o, d.lineEnd()
+            }
+
+            function s(n, t) {
+                v.push([n, t]);
+                var e = u(n, t);
+                x.point(e[0], e[1])
+            }
+
+            function f() {
+                x.lineStart(), v = []
+            }
+
+            function h() {
+                s(v[0][0], v[0][1]), x.lineEnd();
+                var n, t = x.clean(), e = M.buffer(), r = e.length;
+                if (v.pop(), p.push(v), v = null, r)if (1 & t) {
+                    n = e[0];
+                    var u, r = n.length - 1, o = -1;
+                    if (r > 0) {
+                        for (b || (i.polygonStart(), b = !0), i.lineStart(); ++o < r;)i.point((u = n[o])[0], u[1]);
+                        i.lineEnd()
+                    }
+                } else r > 1 && 2 & t && e.push(e.pop().concat(e.shift())), g.push(e.filter(Te))
+            }
+
+            var g, p, v, d = t(i), m = u.invert(r[0], r[1]), y = {
+                point: o,
+                lineStart: c,
+                lineEnd: l,
+                polygonStart: function () {
+                    y.point = s, y.lineStart = f, y.lineEnd = h, g = [], p = []
+                },
+                polygonEnd: function () {
+                    y.point = o, y.lineStart = c, y.lineEnd = l, g = ta.merge(g);
+                    var n = Fe(m, p);
+                    g.length ? (b || (i.polygonStart(), b = !0), Ce(g, De, n, e, i)) : n && (b || (i.polygonStart(), b = !0), i.lineStart(), e(null, null, 1, i), i.lineEnd()), b && (i.polygonEnd(), b = !1), g = p = null
+                },
+                sphere: function () {
+                    i.polygonStart(), i.lineStart(), e(null, null, 1, i), i.lineEnd(), i.polygonEnd()
+                }
+            }, M = Re(), x = t(M), b = !1;
+            return y
+        }
+    }
+
+    function Te(n) {
+        return n.length > 1
+    }
+
+    function Re() {
+        var n, t = [];
+        return {
+            lineStart: function () {
+                t.push(n = [])
+            }, point: function (t, e) {
+                n.push([t, e])
+            }, lineEnd: y, buffer: function () {
+                var e = t;
+                return t = [], n = null, e
+            }, rejoin: function () {
+                t.length > 1 && t.push(t.pop().concat(t.shift()))
+            }
+        }
+    }
+
+    function De(n, t) {
+        return ((n = n.x)[0] < 0 ? n[1] - ja - Ta : ja - n[1]) - ((t = t.x)[0] < 0 ? t[1] - ja - Ta : ja - t[1])
+    }
+
+    function Pe(n) {
+        var t, e = 0 / 0, r = 0 / 0, u = 0 / 0;
+        return {
+            lineStart: function () {
+                n.lineStart(), t = 1
+            }, point: function (i, o) {
+                var a = i > 0 ? Da : -Da, c = va(i - e);
+                va(c - Da) < Ta ? (n.point(e, r = (r + o) / 2 > 0 ? ja : -ja), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), n.point(i, r), t = 0) : u !== a && c >= Da && (va(e - u) < Ta && (e -= u * Ta), va(i - a) < Ta && (i -= a * Ta), r = Ue(e, r, i, o), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), t = 0), n.point(e = i, r = o), u = a
+            }, lineEnd: function () {
+                n.lineEnd(), e = r = 0 / 0
+            }, clean: function () {
+                return 2 - t
+            }
+        }
+    }
+
+    function Ue(n, t, e, r) {
+        var u, i, o = Math.sin(n - e);
+        return va(o) > Ta ? Math.atan((Math.sin(t) * (i = Math.cos(r)) * Math.sin(e) - Math.sin(r) * (u = Math.cos(t)) * Math.sin(n)) / (u * i * o)) : (t + r) / 2
+    }
+
+    function je(n, t, e, r) {
+        var u;
+        if (null == n)u = e * ja, r.point(-Da, u), r.point(0, u), r.point(Da, u), r.point(Da, 0), r.point(Da, -u), r.point(0, -u), r.point(-Da, -u), r.point(-Da, 0), r.point(-Da, u); else if (va(n[0] - t[0]) > Ta) {
+            var i = n[0] < t[0] ? Da : -Da;
+            u = e * i / 2, r.point(-i, u), r.point(0, u), r.point(i, u)
+        } else r.point(t[0], t[1])
+    }
+
+    function Fe(n, t) {
+        var e = n[0], r = n[1], u = [Math.sin(e), -Math.cos(e), 0], i = 0, o = 0;
+        _c.reset();
+        for (var a = 0, c = t.length; c > a; ++a) {
+            var l = t[a], s = l.length;
+            if (s)for (var f = l[0], h = f[0], g = f[1] / 2 + Da / 4, p = Math.sin(g), v = Math.cos(g), d = 1; ;) {
+                d === s && (d = 0), n = l[d];
+                var m = n[0], y = n[1] / 2 + Da / 4, M = Math.sin(y), x = Math.cos(y), b = m - h, _ = b >= 0 ? 1 : -1, w = _ * b, S = w > Da, k = p * M;
+                if (_c.add(Math.atan2(k * _ * Math.sin(w), v * x + k * Math.cos(w))), i += S ? b + _ * Pa : b, S ^ h >= e ^ m >= e) {
+                    var E = de(pe(f), pe(n));
+                    Me(E);
+                    var A = de(u, E);
+                    Me(A);
+                    var N = (S ^ b >= 0 ? -1 : 1) * nt(A[2]);
+                    (r > N || r === N && (E[0] || E[1])) && (o += S ^ b >= 0 ? 1 : -1)
+                }
+                if (!d++)break;
+                h = m, p = M, v = x, f = n
+            }
+        }
+        return (-Ta > i || Ta > i && 0 > _c) ^ 1 & o
+    }
+
+    function He(n) {
+        function t(n, t) {
+            return Math.cos(n) * Math.cos(t) > i
+        }
+
+        function e(n) {
+            var e, i, c, l, s;
+            return {
+                lineStart: function () {
+                    l = c = !1, s = 1
+                }, point: function (f, h) {
+                    var g, p = [f, h], v = t(f, h), d = o ? v ? 0 : u(f, h) : v ? u(f + (0 > f ? Da : -Da), h) : 0;
+                    if (!e && (l = c = v) && n.lineStart(), v !== c && (g = r(e, p), (be(e, g) || be(p, g)) && (p[0] += Ta, p[1] += Ta, v = t(p[0], p[1]))), v !== c)s = 0, v ? (n.lineStart(), g = r(p, e), n.point(g[0], g[1])) : (g = r(e, p), n.point(g[0], g[1]), n.lineEnd()), e = g; else if (a && e && o ^ v) {
+                        var m;
+                        d & i || !(m = r(p, e, !0)) || (s = 0, o ? (n.lineStart(), n.point(m[0][0], m[0][1]), n.point(m[1][0], m[1][1]), n.lineEnd()) : (n.point(m[1][0], m[1][1]), n.lineEnd(), n.lineStart(), n.point(m[0][0], m[0][1])))
+                    }
+                    !v || e && be(e, p) || n.point(p[0], p[1]), e = p, c = v, i = d
+                }, lineEnd: function () {
+                    c && n.lineEnd(), e = null
+                }, clean: function () {
+                    return s | (l && c) << 1
+                }
+            }
+        }
+
+        function r(n, t, e) {
+            var r = pe(n), u = pe(t), o = [1, 0, 0], a = de(r, u), c = ve(a, a), l = a[0], s = c - l * l;
+            if (!s)return !e && n;
+            var f = i * c / s, h = -i * l / s, g = de(o, a), p = ye(o, f), v = ye(a, h);
+            me(p, v);
+            var d = g, m = ve(p, d), y = ve(d, d), M = m * m - y * (ve(p, p) - 1);
+            if (!(0 > M)) {
+                var x = Math.sqrt(M), b = ye(d, (-m - x) / y);
+                if (me(b, p), b = xe(b), !e)return b;
+                var _, w = n[0], S = t[0], k = n[1], E = t[1];
+                w > S && (_ = w, w = S, S = _);
+                var A = S - w, N = va(A - Da) < Ta, C = N || Ta > A;
+                if (!N && k > E && (_ = k, k = E, E = _), C ? N ? k + E > 0 ^ b[1] < (va(b[0] - w) < Ta ? k : E) : k <= b[1] && b[1] <= E : A > Da ^ (w <= b[0] && b[0] <= S)) {
+                    var z = ye(d, (-m + x) / y);
+                    return me(z, p), [b, xe(z)]
+                }
+            }
+        }
+
+        function u(t, e) {
+            var r = o ? n : Da - n, u = 0;
+            return -r > t ? u |= 1 : t > r && (u |= 2), -r > e ? u |= 4 : e > r && (u |= 8), u
+        }
+
+        var i = Math.cos(n), o = i > 0, a = va(i) > Ta, c = gr(n, 6 * Fa);
+        return Le(t, e, c, o ? [0, -n] : [-Da, n - Da])
+    }
+
+    function Oe(n, t, e, r) {
+        return function (u) {
+            var i, o = u.a, a = u.b, c = o.x, l = o.y, s = a.x, f = a.y, h = 0, g = 1, p = s - c, v = f - l;
+            if (i = n - c, p || !(i > 0)) {
+                if (i /= p, 0 > p) {
+                    if (h > i)return;
+                    g > i && (g = i)
+                } else if (p > 0) {
+                    if (i > g)return;
+                    i > h && (h = i)
+                }
+                if (i = e - c, p || !(0 > i)) {
+                    if (i /= p, 0 > p) {
+                        if (i > g)return;
+                        i > h && (h = i)
+                    } else if (p > 0) {
+                        if (h > i)return;
+                        g > i && (g = i)
+                    }
+                    if (i = t - l, v || !(i > 0)) {
+                        if (i /= v, 0 > v) {
+                            if (h > i)return;
+                            g > i && (g = i)
+                        } else if (v > 0) {
+                            if (i > g)return;
+                            i > h && (h = i)
+                        }
+                        if (i = r - l, v || !(0 > i)) {
+                            if (i /= v, 0 > v) {
+                                if (i > g)return;
+                                i > h && (h = i)
+                            } else if (v > 0) {
+                                if (h > i)return;
+                                g > i && (g = i)
+                            }
+                            return h > 0 && (u.a = {x: c + h * p, y: l + h * v}), 1 > g && (u.b = {
+                                x: c + g * p,
+                                y: l + g * v
+                            }), u
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    function Ye(n, t, e, r) {
+        function u(r, u) {
+            return va(r[0] - n) < Ta ? u > 0 ? 0 : 3 : va(r[0] - e) < Ta ? u > 0 ? 2 : 1 : va(r[1] - t) < Ta ? u > 0 ? 1 : 0 : u > 0 ? 3 : 2
+        }
+
+        function i(n, t) {
+            return o(n.x, t.x)
+        }
+
+        function o(n, t) {
+            var e = u(n, 1), r = u(t, 1);
+            return e !== r ? e - r : 0 === e ? t[1] - n[1] : 1 === e ? n[0] - t[0] : 2 === e ? n[1] - t[1] : t[0] - n[0]
+        }
+
+        return function (a) {
+            function c(n) {
+                for (var t = 0, e = d.length, r = n[1], u = 0; e > u; ++u)for (var i, o = 1, a = d[u], c = a.length, l = a[0]; c > o; ++o)i = a[o], l[1] <= r ? i[1] > r && K(l, i, n) > 0 && ++t : i[1] <= r && K(l, i, n) < 0 && --t, l = i;
+                return 0 !== t
+            }
+
+            function l(i, a, c, l) {
+                var s = 0, f = 0;
+                if (null == i || (s = u(i, c)) !== (f = u(a, c)) || o(i, a) < 0 ^ c > 0) {
+                    do l.point(0 === s || 3 === s ? n : e, s > 1 ? r : t); while ((s = (s + c + 4) % 4) !== f)
+                } else l.point(a[0], a[1])
+            }
+
+            function s(u, i) {
+                return u >= n && e >= u && i >= t && r >= i
+            }
+
+            function f(n, t) {
+                s(n, t) && a.point(n, t)
+            }
+
+            function h() {
+                C.point = p, d && d.push(m = []), S = !0, w = !1, b = _ = 0 / 0
+            }
+
+            function g() {
+                v && (p(y, M), x && w && A.rejoin(), v.push(A.buffer())), C.point = f, w && a.lineEnd()
+            }
+
+            function p(n, t) {
+                n = Math.max(-Uc, Math.min(Uc, n)), t = Math.max(-Uc, Math.min(Uc, t));
+                var e = s(n, t);
+                if (d && m.push([n, t]), S)y = n, M = t, x = e, S = !1, e && (a.lineStart(), a.point(n, t)); else if (e && w)a.point(n, t); else {
+                    var r = {a: {x: b, y: _}, b: {x: n, y: t}};
+                    N(r) ? (w || (a.lineStart(), a.point(r.a.x, r.a.y)), a.point(r.b.x, r.b.y), e || a.lineEnd(), k = !1) : e && (a.lineStart(), a.point(n, t), k = !1)
+                }
+                b = n, _ = t, w = e
+            }
+
+            var v, d, m, y, M, x, b, _, w, S, k, E = a, A = Re(), N = Oe(n, t, e, r), C = {
+                point: f,
+                lineStart: h,
+                lineEnd: g,
+                polygonStart: function () {
+                    a = A, v = [], d = [], k = !0
+                },
+                polygonEnd: function () {
+                    a = E, v = ta.merge(v);
+                    var t = c([n, r]), e = k && t, u = v.length;
+                    (e || u) && (a.polygonStart(), e && (a.lineStart(), l(null, null, 1, a), a.lineEnd()), u && Ce(v, i, t, l, a), a.polygonEnd()), v = d = m = null
+                }
+            };
+            return C
+        }
+    }
+
+    function Ie(n) {
+        var t = 0, e = Da / 3, r = ir(n), u = r(t, e);
+        return u.parallels = function (n) {
+            return arguments.length ? r(t = n[0] * Da / 180, e = n[1] * Da / 180) : [180 * (t / Da), 180 * (e / Da)]
+        }, u
+    }
+
+    function Ze(n, t) {
+        function e(n, t) {
+            var e = Math.sqrt(i - 2 * u * Math.sin(t)) / u;
+            return [e * Math.sin(n *= u), o - e * Math.cos(n)]
+        }
+
+        var r = Math.sin(n), u = (r + Math.sin(t)) / 2, i = 1 + r * (2 * u - r), o = Math.sqrt(i) / u;
+        return e.invert = function (n, t) {
+            var e = o - t;
+            return [Math.atan2(n, e) / u, nt((i - (n * n + e * e) * u * u) / (2 * u))]
+        }, e
+    }
+
+    function Ve() {
+        function n(n, t) {
+            Fc += u * n - r * t, r = n, u = t
+        }
+
+        var t, e, r, u;
+        Zc.point = function (i, o) {
+            Zc.point = n, t = r = i, e = u = o
+        }, Zc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Xe(n, t) {
+        Hc > n && (Hc = n), n > Yc && (Yc = n), Oc > t && (Oc = t), t > Ic && (Ic = t)
+    }
+
+    function $e() {
+        function n(n, t) {
+            o.push("M", n, ",", t, i)
+        }
+
+        function t(n, t) {
+            o.push("M", n, ",", t), a.point = e
+        }
+
+        function e(n, t) {
+            o.push("L", n, ",", t)
+        }
+
+        function r() {
+            a.point = n
+        }
+
+        function u() {
+            o.push("Z")
+        }
+
+        var i = Be(4.5), o = [], a = {
+            point: n, lineStart: function () {
+                a.point = t
+            }, lineEnd: r, polygonStart: function () {
+                a.lineEnd = u
+            }, polygonEnd: function () {
+                a.lineEnd = r, a.point = n
+            }, pointRadius: function (n) {
+                return i = Be(n), a
+            }, result: function () {
+                if (o.length) {
+                    var n = o.join("");
+                    return o = [], n
+                }
+            }
+        };
+        return a
+    }
+
+    function Be(n) {
+        return "m0," + n + "a" + n + "," + n + " 0 1,1 0," + -2 * n + "a" + n + "," + n + " 0 1,1 0," + 2 * n + "z"
+    }
+
+    function We(n, t) {
+        Ec += n, Ac += t, ++Nc
+    }
+
+    function Je() {
+        function n(n, r) {
+            var u = n - t, i = r - e, o = Math.sqrt(u * u + i * i);
+            Cc += o * (t + n) / 2, zc += o * (e + r) / 2, qc += o, We(t = n, e = r)
+        }
+
+        var t, e;
+        Xc.point = function (r, u) {
+            Xc.point = n, We(t = r, e = u)
+        }
+    }
+
+    function Ge() {
+        Xc.point = We
+    }
+
+    function Ke() {
+        function n(n, t) {
+            var e = n - r, i = t - u, o = Math.sqrt(e * e + i * i);
+            Cc += o * (r + n) / 2, zc += o * (u + t) / 2, qc += o, o = u * n - r * t, Lc += o * (r + n), Tc += o * (u + t), Rc += 3 * o, We(r = n, u = t)
+        }
+
+        var t, e, r, u;
+        Xc.point = function (i, o) {
+            Xc.point = n, We(t = r = i, e = u = o)
+        }, Xc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Qe(n) {
+        function t(t, e) {
+            n.moveTo(t + o, e), n.arc(t, e, o, 0, Pa)
+        }
+
+        function e(t, e) {
+            n.moveTo(t, e), a.point = r
+        }
+
+        function r(t, e) {
+            n.lineTo(t, e)
+        }
+
+        function u() {
+            a.point = t
+        }
+
+        function i() {
+            n.closePath()
+        }
+
+        var o = 4.5, a = {
+            point: t, lineStart: function () {
+                a.point = e
+            }, lineEnd: u, polygonStart: function () {
+                a.lineEnd = i
+            }, polygonEnd: function () {
+                a.lineEnd = u, a.point = t
+            }, pointRadius: function (n) {
+                return o = n, a
+            }, result: y
+        };
+        return a
+    }
+
+    function nr(n) {
+        function t(n) {
+            return (a ? r : e)(n)
+        }
+
+        function e(t) {
+            return rr(t, function (e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            })
+        }
+
+        function r(t) {
+            function e(e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            }
+
+            function r() {
+                M = 0 / 0, S.point = i, t.lineStart()
+            }
+
+            function i(e, r) {
+                var i = pe([e, r]), o = n(e, r);
+                u(M, x, y, b, _, w, M = o[0], x = o[1], y = e, b = i[0], _ = i[1], w = i[2], a, t), t.point(M, x)
+            }
+
+            function o() {
+                S.point = e, t.lineEnd()
+            }
+
+            function c() {
+                r(), S.point = l, S.lineEnd = s
+            }
+
+            function l(n, t) {
+                i(f = n, h = t), g = M, p = x, v = b, d = _, m = w, S.point = i
+            }
+
+            function s() {
+                u(M, x, y, b, _, w, g, p, f, v, d, m, a, t), S.lineEnd = o, o()
+            }
+
+            var f, h, g, p, v, d, m, y, M, x, b, _, w, S = {
+                point: e,
+                lineStart: r,
+                lineEnd: o,
+                polygonStart: function () {
+                    t.polygonStart(), S.lineStart = c
+                },
+                polygonEnd: function () {
+                    t.polygonEnd(), S.lineStart = r
+                }
+            };
+            return S
+        }
+
+        function u(t, e, r, a, c, l, s, f, h, g, p, v, d, m) {
+            var y = s - t, M = f - e, x = y * y + M * M;
+            if (x > 4 * i && d--) {
+                var b = a + g, _ = c + p, w = l + v, S = Math.sqrt(b * b + _ * _ + w * w), k = Math.asin(w /= S), E = va(va(w) - 1) < Ta || va(r - h) < Ta ? (r + h) / 2 : Math.atan2(_, b), A = n(E, k), N = A[0], C = A[1], z = N - t, q = C - e, L = M * z - y * q;
+                (L * L / x > i || va((y * z + M * q) / x - .5) > .3 || o > a * g + c * p + l * v) && (u(t, e, r, a, c, l, N, C, E, b /= S, _ /= S, w, d, m), m.point(N, C), u(N, C, E, b, _, w, s, f, h, g, p, v, d, m))
+            }
+        }
+
+        var i = .5, o = Math.cos(30 * Fa), a = 16;
+        return t.precision = function (n) {
+            return arguments.length ? (a = (i = n * n) > 0 && 16, t) : Math.sqrt(i)
+        }, t
+    }
+
+    function tr(n) {
+        var t = nr(function (t, e) {
+            return n([t * Ha, e * Ha])
+        });
+        return function (n) {
+            return or(t(n))
+        }
+    }
+
+    function er(n) {
+        this.stream = n
+    }
+
+    function rr(n, t) {
+        return {
+            point: t, sphere: function () {
+                n.sphere()
+            }, lineStart: function () {
+                n.lineStart()
+            }, lineEnd: function () {
+                n.lineEnd()
+            }, polygonStart: function () {
+                n.polygonStart()
+            }, polygonEnd: function () {
+                n.polygonEnd()
+            }
+        }
+    }
+
+    function ur(n) {
+        return ir(function () {
+            return n
+        })()
+    }
+
+    function ir(n) {
+        function t(n) {
+            return n = a(n[0] * Fa, n[1] * Fa), [n[0] * h + c, l - n[1] * h]
+        }
+
+        function e(n) {
+            return n = a.invert((n[0] - c) / h, (l - n[1]) / h), n && [n[0] * Ha, n[1] * Ha]
+        }
+
+        function r() {
+            a = Ae(o = lr(m, y, M), i);
+            var n = i(v, d);
+            return c = g - n[0] * h, l = p + n[1] * h, u()
+        }
+
+        function u() {
+            return s && (s.valid = !1, s = null), t
+        }
+
+        var i, o, a, c, l, s, f = nr(function (n, t) {
+            return n = i(n, t), [n[0] * h + c, l - n[1] * h]
+        }), h = 150, g = 480, p = 250, v = 0, d = 0, m = 0, y = 0, M = 0, x = Pc, b = Et, _ = null, w = null;
+        return t.stream = function (n) {
+            return s && (s.valid = !1), s = or(x(o, f(b(n)))), s.valid = !0, s
+        }, t.clipAngle = function (n) {
+            return arguments.length ? (x = null == n ? (_ = n, Pc) : He((_ = +n) * Fa), u()) : _
+        }, t.clipExtent = function (n) {
+            return arguments.length ? (w = n, b = n ? Ye(n[0][0], n[0][1], n[1][0], n[1][1]) : Et, u()) : w
+        }, t.scale = function (n) {
+            return arguments.length ? (h = +n, r()) : h
+        }, t.translate = function (n) {
+            return arguments.length ? (g = +n[0], p = +n[1], r()) : [g, p]
+        }, t.center = function (n) {
+            return arguments.length ? (v = n[0] % 360 * Fa, d = n[1] % 360 * Fa, r()) : [v * Ha, d * Ha]
+        }, t.rotate = function (n) {
+            return arguments.length ? (m = n[0] % 360 * Fa, y = n[1] % 360 * Fa, M = n.length > 2 ? n[2] % 360 * Fa : 0, r()) : [m * Ha, y * Ha, M * Ha]
+        }, ta.rebind(t, f, "precision"), function () {
+            return i = n.apply(this, arguments), t.invert = i.invert && e, r()
+        }
+    }
+
+    function or(n) {
+        return rr(n, function (t, e) {
+            n.point(t * Fa, e * Fa)
+        })
+    }
+
+    function ar(n, t) {
+        return [n, t]
+    }
+
+    function cr(n, t) {
+        return [n > Da ? n - Pa : -Da > n ? n + Pa : n, t]
+    }
+
+    function lr(n, t, e) {
+        return n ? t || e ? Ae(fr(n), hr(t, e)) : fr(n) : t || e ? hr(t, e) : cr
+    }
+
+    function sr(n) {
+        return function (t, e) {
+            return t += n, [t > Da ? t - Pa : -Da > t ? t + Pa : t, e]
+        }
+    }
+
+    function fr(n) {
+        var t = sr(n);
+        return t.invert = sr(-n), t
+    }
+
+    function hr(n, t) {
+        function e(n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * r + a * u;
+            return [Math.atan2(c * i - s * o, a * r - l * u), nt(s * i + c * o)]
+        }
+
+        var r = Math.cos(n), u = Math.sin(n), i = Math.cos(t), o = Math.sin(t);
+        return e.invert = function (n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * i - c * o;
+            return [Math.atan2(c * i + l * o, a * r + s * u), nt(s * r - a * u)]
+        }, e
+    }
+
+    function gr(n, t) {
+        var e = Math.cos(n), r = Math.sin(n);
+        return function (u, i, o, a) {
+            var c = o * t;
+            null != u ? (u = pr(e, u), i = pr(e, i), (o > 0 ? i > u : u > i) && (u += o * Pa)) : (u = n + o * Pa, i = n - .5 * c);
+            for (var l, s = u; o > 0 ? s > i : i > s; s -= c)a.point((l = xe([e, -r * Math.cos(s), -r * Math.sin(s)]))[0], l[1])
+        }
+    }
+
+    function pr(n, t) {
+        var e = pe(t);
+        e[0] -= n, Me(e);
+        var r = Q(-e[1]);
+        return ((-e[2] < 0 ? -r : r) + 2 * Math.PI - Ta) % (2 * Math.PI)
+    }
+
+    function vr(n, t, e) {
+        var r = ta.range(n, t - Ta, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [n, t]
+            })
+        }
+    }
+
+    function dr(n, t, e) {
+        var r = ta.range(n, t - Ta, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [t, n]
+            })
+        }
+    }
+
+    function mr(n) {
+        return n.source
+    }
+
+    function yr(n) {
+        return n.target
+    }
+
+    function Mr(n, t, e, r) {
+        var u = Math.cos(t), i = Math.sin(t), o = Math.cos(r), a = Math.sin(r), c = u * Math.cos(n), l = u * Math.sin(n), s = o * Math.cos(e), f = o * Math.sin(e), h = 2 * Math.asin(Math.sqrt(ut(r - t) + u * o * ut(e - n))), g = 1 / Math.sin(h), p = h ? function (n) {
+            var t = Math.sin(n *= h) * g, e = Math.sin(h - n) * g, r = e * c + t * s, u = e * l + t * f, o = e * i + t * a;
+            return [Math.atan2(u, r) * Ha, Math.atan2(o, Math.sqrt(r * r + u * u)) * Ha]
+        } : function () {
+            return [n * Ha, t * Ha]
+        };
+        return p.distance = h, p
+    }
+
+    function xr() {
+        function n(n, u) {
+            var i = Math.sin(u *= Fa), o = Math.cos(u), a = va((n *= Fa) - t), c = Math.cos(a);
+            $c += Math.atan2(Math.sqrt((a = o * Math.sin(a)) * a + (a = r * i - e * o * c) * a), e * i + r * o * c), t = n, e = i, r = o
+        }
+
+        var t, e, r;
+        Bc.point = function (u, i) {
+            t = u * Fa, e = Math.sin(i *= Fa), r = Math.cos(i), Bc.point = n
+        }, Bc.lineEnd = function () {
+            Bc.point = Bc.lineEnd = y
+        }
+    }
+
+    function br(n, t) {
+        function e(t, e) {
+            var r = Math.cos(t), u = Math.cos(e), i = n(r * u);
+            return [i * u * Math.sin(t), i * Math.sin(e)]
+        }
+
+        return e.invert = function (n, e) {
+            var r = Math.sqrt(n * n + e * e), u = t(r), i = Math.sin(u), o = Math.cos(u);
+            return [Math.atan2(n * i, r * o), Math.asin(r && e * i / r)]
+        }, e
+    }
+
+    function _r(n, t) {
+        function e(n, t) {
+            o > 0 ? -ja + Ta > t && (t = -ja + Ta) : t > ja - Ta && (t = ja - Ta);
+            var e = o / Math.pow(u(t), i);
+            return [e * Math.sin(i * n), o - e * Math.cos(i * n)]
+        }
+
+        var r = Math.cos(n), u = function (n) {
+            return Math.tan(Da / 4 + n / 2)
+        }, i = n === t ? Math.sin(n) : Math.log(r / Math.cos(t)) / Math.log(u(t) / u(n)), o = r * Math.pow(u(n), i) / i;
+        return i ? (e.invert = function (n, t) {
+            var e = o - t, r = G(i) * Math.sqrt(n * n + e * e);
+            return [Math.atan2(n, e) / i, 2 * Math.atan(Math.pow(o / r, 1 / i)) - ja]
+        }, e) : Sr
+    }
+
+    function wr(n, t) {
+        function e(n, t) {
+            var e = i - t;
+            return [e * Math.sin(u * n), i - e * Math.cos(u * n)]
+        }
+
+        var r = Math.cos(n), u = n === t ? Math.sin(n) : (r - Math.cos(t)) / (t - n), i = r / u + n;
+        return va(u) < Ta ? ar : (e.invert = function (n, t) {
+            var e = i - t;
+            return [Math.atan2(n, e) / u, i - G(u) * Math.sqrt(n * n + e * e)]
+        }, e)
+    }
+
+    function Sr(n, t) {
+        return [n, Math.log(Math.tan(Da / 4 + t / 2))]
+    }
+
+    function kr(n) {
+        var t, e = ur(n), r = e.scale, u = e.translate, i = e.clipExtent;
+        return e.scale = function () {
+            var n = r.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.translate = function () {
+            var n = u.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.clipExtent = function (n) {
+            var o = i.apply(e, arguments);
+            if (o === e) {
+                if (t = null == n) {
+                    var a = Da * r(), c = u();
+                    i([[c[0] - a, c[1] - a], [c[0] + a, c[1] + a]])
+                }
+            } else t && (o = null);
+            return o
+        }, e.clipExtent(null)
+    }
+
+    function Er(n, t) {
+        return [Math.log(Math.tan(Da / 4 + t / 2)), -n]
+    }
+
+    function Ar(n) {
+        return n[0]
+    }
+
+    function Nr(n) {
+        return n[1]
+    }
+
+    function Cr(n) {
+        for (var t = n.length, e = [0, 1], r = 2, u = 2; t > u; u++) {
+            for (; r > 1 && K(n[e[r - 2]], n[e[r - 1]], n[u]) <= 0;)--r;
+            e[r++] = u
+        }
+        return e.slice(0, r)
+    }
+
+    function zr(n, t) {
+        return n[0] - t[0] || n[1] - t[1]
+    }
+
+    function qr(n, t, e) {
+        return (e[0] - t[0]) * (n[1] - t[1]) < (e[1] - t[1]) * (n[0] - t[0])
+    }
+
+    function Lr(n, t, e, r) {
+        var u = n[0], i = e[0], o = t[0] - u, a = r[0] - i, c = n[1], l = e[1], s = t[1] - c, f = r[1] - l, h = (a * (c - l) - f * (u - i)) / (f * o - a * s);
+        return [u + h * o, c + h * s]
+    }
+
+    function Tr(n) {
+        var t = n[0], e = n[n.length - 1];
+        return !(t[0] - e[0] || t[1] - e[1])
+    }
+
+    function Rr() {
+        tu(this), this.edge = this.site = this.circle = null
+    }
+
+    function Dr(n) {
+        var t = ol.pop() || new Rr;
+        return t.site = n, t
+    }
+
+    function Pr(n) {
+        Xr(n), rl.remove(n), ol.push(n), tu(n)
+    }
+
+    function Ur(n) {
+        var t = n.circle, e = t.x, r = t.cy, u = {x: e, y: r}, i = n.P, o = n.N, a = [n];
+        Pr(n);
+        for (var c = i; c.circle && va(e - c.circle.x) < Ta && va(r - c.circle.cy) < Ta;)i = c.P, a.unshift(c), Pr(c), c = i;
+        a.unshift(c), Xr(c);
+        for (var l = o; l.circle && va(e - l.circle.x) < Ta && va(r - l.circle.cy) < Ta;)o = l.N, a.push(l), Pr(l), l = o;
+        a.push(l), Xr(l);
+        var s, f = a.length;
+        for (s = 1; f > s; ++s)l = a[s], c = a[s - 1], Kr(l.edge, c.site, l.site, u);
+        c = a[0], l = a[f - 1], l.edge = Jr(c.site, l.site, null, u), Vr(c), Vr(l)
+    }
+
+    function jr(n) {
+        for (var t, e, r, u, i = n.x, o = n.y, a = rl._; a;)if (r = Fr(a, o) - i, r > Ta)a = a.L; else {
+            if (u = i - Hr(a, o), !(u > Ta)) {
+                r > -Ta ? (t = a.P, e = a) : u > -Ta ? (t = a, e = a.N) : t = e = a;
+                break
+            }
+            if (!a.R) {
+                t = a;
+                break
+            }
+            a = a.R
+        }
+        var c = Dr(n);
+        if (rl.insert(t, c), t || e) {
+            if (t === e)return Xr(t), e = Dr(t.site), rl.insert(c, e), c.edge = e.edge = Jr(t.site, c.site), Vr(t), Vr(e), void 0;
+            if (!e)return c.edge = Jr(t.site, c.site), void 0;
+            Xr(t), Xr(e);
+            var l = t.site, s = l.x, f = l.y, h = n.x - s, g = n.y - f, p = e.site, v = p.x - s, d = p.y - f, m = 2 * (h * d - g * v), y = h * h + g * g, M = v * v + d * d, x = {
+                x: (d * y - g * M) / m + s,
+                y: (h * M - v * y) / m + f
+            };
+            Kr(e.edge, l, p, x), c.edge = Jr(l, n, null, x), e.edge = Jr(n, p, null, x), Vr(t), Vr(e)
+        }
+    }
+
+    function Fr(n, t) {
+        var e = n.site, r = e.x, u = e.y, i = u - t;
+        if (!i)return r;
+        var o = n.P;
+        if (!o)return -1 / 0;
+        e = o.site;
+        var a = e.x, c = e.y, l = c - t;
+        if (!l)return a;
+        var s = a - r, f = 1 / i - 1 / l, h = s / l;
+        return f ? (-h + Math.sqrt(h * h - 2 * f * (s * s / (-2 * l) - c + l / 2 + u - i / 2))) / f + r : (r + a) / 2
+    }
+
+    function Hr(n, t) {
+        var e = n.N;
+        if (e)return Fr(e, t);
+        var r = n.site;
+        return r.y === t ? r.x : 1 / 0
+    }
+
+    function Or(n) {
+        this.site = n, this.edges = []
+    }
+
+    function Yr(n) {
+        for (var t, e, r, u, i, o, a, c, l, s, f = n[0][0], h = n[1][0], g = n[0][1], p = n[1][1], v = el, d = v.length; d--;)if (i = v[d], i && i.prepare())for (a = i.edges, c = a.length, o = 0; c > o;)s = a[o].end(), r = s.x, u = s.y, l = a[++o % c].start(), t = l.x, e = l.y, (va(r - t) > Ta || va(u - e) > Ta) && (a.splice(o, 0, new Qr(Gr(i.site, s, va(r - f) < Ta && p - u > Ta ? {
+            x: f,
+            y: va(t - f) < Ta ? e : p
+        } : va(u - p) < Ta && h - r > Ta ? {x: va(e - p) < Ta ? t : h, y: p} : va(r - h) < Ta && u - g > Ta ? {
+            x: h,
+            y: va(t - h) < Ta ? e : g
+        } : va(u - g) < Ta && r - f > Ta ? {x: va(e - g) < Ta ? t : f, y: g} : null), i.site, null)), ++c)
+    }
+
+    function Ir(n, t) {
+        return t.angle - n.angle
+    }
+
+    function Zr() {
+        tu(this), this.x = this.y = this.arc = this.site = this.cy = null
+    }
+
+    function Vr(n) {
+        var t = n.P, e = n.N;
+        if (t && e) {
+            var r = t.site, u = n.site, i = e.site;
+            if (r !== i) {
+                var o = u.x, a = u.y, c = r.x - o, l = r.y - a, s = i.x - o, f = i.y - a, h = 2 * (c * f - l * s);
+                if (!(h >= -Ra)) {
+                    var g = c * c + l * l, p = s * s + f * f, v = (f * g - l * p) / h, d = (c * p - s * g) / h, f = d + a, m = al.pop() || new Zr;
+                    m.arc = n, m.site = u, m.x = v + o, m.y = f + Math.sqrt(v * v + d * d), m.cy = f, n.circle = m;
+                    for (var y = null, M = il._; M;)if (m.y < M.y || m.y === M.y && m.x <= M.x) {
+                        if (!M.L) {
+                            y = M.P;
+                            break
+                        }
+                        M = M.L
+                    } else {
+                        if (!M.R) {
+                            y = M;
+                            break
+                        }
+                        M = M.R
+                    }
+                    il.insert(y, m), y || (ul = m)
+                }
+            }
+        }
+    }
+
+    function Xr(n) {
+        var t = n.circle;
+        t && (t.P || (ul = t.N), il.remove(t), al.push(t), tu(t), n.circle = null)
+    }
+
+    function $r(n) {
+        for (var t, e = tl, r = Oe(n[0][0], n[0][1], n[1][0], n[1][1]), u = e.length; u--;)t = e[u], (!Br(t, n) || !r(t) || va(t.a.x - t.b.x) < Ta && va(t.a.y - t.b.y) < Ta) && (t.a = t.b = null, e.splice(u, 1))
+    }
+
+    function Br(n, t) {
+        var e = n.b;
+        if (e)return !0;
+        var r, u, i = n.a, o = t[0][0], a = t[1][0], c = t[0][1], l = t[1][1], s = n.l, f = n.r, h = s.x, g = s.y, p = f.x, v = f.y, d = (h + p) / 2, m = (g + v) / 2;
+        if (v === g) {
+            if (o > d || d >= a)return;
+            if (h > p) {
+                if (i) {
+                    if (i.y >= l)return
+                } else i = {x: d, y: c};
+                e = {x: d, y: l}
+            } else {
+                if (i) {
+                    if (i.y < c)return
+                } else i = {x: d, y: l};
+                e = {x: d, y: c}
+            }
+        } else if (r = (h - p) / (v - g), u = m - r * d, -1 > r || r > 1)if (h > p) {
+            if (i) {
+                if (i.y >= l)return
+            } else i = {x: (c - u) / r, y: c};
+            e = {x: (l - u) / r, y: l}
+        } else {
+            if (i) {
+                if (i.y < c)return
+            } else i = {x: (l - u) / r, y: l};
+            e = {x: (c - u) / r, y: c}
+        } else if (v > g) {
+            if (i) {
+                if (i.x >= a)return
+            } else i = {x: o, y: r * o + u};
+            e = {x: a, y: r * a + u}
+        } else {
+            if (i) {
+                if (i.x < o)return
+            } else i = {x: a, y: r * a + u};
+            e = {x: o, y: r * o + u}
+        }
+        return n.a = i, n.b = e, !0
+    }
+
+    function Wr(n, t) {
+        this.l = n, this.r = t, this.a = this.b = null
+    }
+
+    function Jr(n, t, e, r) {
+        var u = new Wr(n, t);
+        return tl.push(u), e && Kr(u, n, t, e), r && Kr(u, t, n, r), el[n.i].edges.push(new Qr(u, n, t)), el[t.i].edges.push(new Qr(u, t, n)), u
+    }
+
+    function Gr(n, t, e) {
+        var r = new Wr(n, null);
+        return r.a = t, r.b = e, tl.push(r), r
+    }
+
+    function Kr(n, t, e, r) {
+        n.a || n.b ? n.l === e ? n.b = r : n.a = r : (n.a = r, n.l = t, n.r = e)
+    }
+
+    function Qr(n, t, e) {
+        var r = n.a, u = n.b;
+        this.edge = n, this.site = t, this.angle = e ? Math.atan2(e.y - t.y, e.x - t.x) : n.l === t ? Math.atan2(u.x - r.x, r.y - u.y) : Math.atan2(r.x - u.x, u.y - r.y)
+    }
+
+    function nu() {
+        this._ = null
+    }
+
+    function tu(n) {
+        n.U = n.C = n.L = n.R = n.P = n.N = null
+    }
+
+    function eu(n, t) {
+        var e = t, r = t.R, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.R = r.L, e.R && (e.R.U = e), r.L = e
+    }
+
+    function ru(n, t) {
+        var e = t, r = t.L, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.L = r.R, e.L && (e.L.U = e), r.R = e
+    }
+
+    function uu(n) {
+        for (; n.L;)n = n.L;
+        return n
+    }
+
+    function iu(n, t) {
+        var e, r, u, i = n.sort(ou).pop();
+        for (tl = [], el = new Array(n.length), rl = new nu, il = new nu; ;)if (u = ul, i && (!u || i.y < u.y || i.y === u.y && i.x < u.x))(i.x !== e || i.y !== r) && (el[i.i] = new Or(i), jr(i), e = i.x, r = i.y), i = n.pop(); else {
+            if (!u)break;
+            Ur(u.arc)
+        }
+        t && ($r(t), Yr(t));
+        var o = {cells: el, edges: tl};
+        return rl = il = tl = el = null, o
+    }
+
+    function ou(n, t) {
+        return t.y - n.y || t.x - n.x
+    }
+
+    function au(n, t, e) {
+        return (n.x - e.x) * (t.y - n.y) - (n.x - t.x) * (e.y - n.y)
+    }
+
+    function cu(n) {
+        return n.x
+    }
+
+    function lu(n) {
+        return n.y
+    }
+
+    function su() {
+        return {leaf: !0, nodes: [], point: null, x: null, y: null}
+    }
+
+    function fu(n, t, e, r, u, i) {
+        if (!n(t, e, r, u, i)) {
+            var o = .5 * (e + u), a = .5 * (r + i), c = t.nodes;
+            c[0] && fu(n, c[0], e, r, o, a), c[1] && fu(n, c[1], o, r, u, a), c[2] && fu(n, c[2], e, a, o, i), c[3] && fu(n, c[3], o, a, u, i)
+        }
+    }
+
+    function hu(n, t, e, r, u, i, o) {
+        var a, c = 1 / 0;
+        return function l(n, s, f, h, g) {
+            if (!(s > i || f > o || r > h || u > g)) {
+                if (p = n.point) {
+                    var p, v = t - p[0], d = e - p[1], m = v * v + d * d;
+                    if (c > m) {
+                        var y = Math.sqrt(c = m);
+                        r = t - y, u = e - y, i = t + y, o = e + y, a = p
+                    }
+                }
+                for (var M = n.nodes, x = .5 * (s + h), b = .5 * (f + g), _ = t >= x, w = e >= b, S = w << 1 | _, k = S + 4; k > S; ++S)if (n = M[3 & S])switch (3 & S) {
+                    case 0:
+                        l(n, s, f, x, b);
+                        break;
+                    case 1:
+                        l(n, x, f, h, b);
+                        break;
+                    case 2:
+                        l(n, s, b, x, g);
+                        break;
+                    case 3:
+                        l(n, x, b, h, g)
+                }
+            }
+        }(n, r, u, i, o), a
+    }
+
+    function gu(n, t) {
+        n = ta.rgb(n), t = ta.rgb(t);
+        var e = n.r, r = n.g, u = n.b, i = t.r - e, o = t.g - r, a = t.b - u;
+        return function (n) {
+            return "#" + Mt(Math.round(e + i * n)) + Mt(Math.round(r + o * n)) + Mt(Math.round(u + a * n))
+        }
+    }
+
+    function pu(n, t) {
+        var e, r = {}, u = {};
+        for (e in n)e in t ? r[e] = mu(n[e], t[e]) : u[e] = n[e];
+        for (e in t)e in n || (u[e] = t[e]);
+        return function (n) {
+            for (e in r)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function vu(n, t) {
+        return n = +n, t = +t, function (e) {
+            return n * (1 - e) + t * e
+        }
+    }
+
+    function du(n, t) {
+        var e, r, u, i = ll.lastIndex = sl.lastIndex = 0, o = -1, a = [], c = [];
+        for (n += "", t += ""; (e = ll.exec(n)) && (r = sl.exec(t));)(u = r.index) > i && (u = t.slice(i, u), a[o] ? a[o] += u : a[++o] = u), (e = e[0]) === (r = r[0]) ? a[o] ? a[o] += r : a[++o] = r : (a[++o] = null, c.push({
+            i: o,
+            x: vu(e, r)
+        })), i = sl.lastIndex;
+        return i < t.length && (u = t.slice(i), a[o] ? a[o] += u : a[++o] = u), a.length < 2 ? c[0] ? (t = c[0].x, function (n) {
+            return t(n) + ""
+        }) : function () {
+            return t
+        } : (t = c.length, function (n) {
+            for (var e, r = 0; t > r; ++r)a[(e = c[r]).i] = e.x(n);
+            return a.join("")
+        })
+    }
+
+    function mu(n, t) {
+        for (var e, r = ta.interpolators.length; --r >= 0 && !(e = ta.interpolators[r](n, t)););
+        return e
+    }
+
+    function yu(n, t) {
+        var e, r = [], u = [], i = n.length, o = t.length, a = Math.min(n.length, t.length);
+        for (e = 0; a > e; ++e)r.push(mu(n[e], t[e]));
+        for (; i > e; ++e)u[e] = n[e];
+        for (; o > e; ++e)u[e] = t[e];
+        return function (n) {
+            for (e = 0; a > e; ++e)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function Mu(n) {
+        return function (t) {
+            return 0 >= t ? 0 : t >= 1 ? 1 : n(t)
+        }
+    }
+
+    function xu(n) {
+        return function (t) {
+            return 1 - n(1 - t)
+        }
+    }
+
+    function bu(n) {
+        return function (t) {
+            return .5 * (.5 > t ? n(2 * t) : 2 - n(2 - 2 * t))
+        }
+    }
+
+    function _u(n) {
+        return n * n
+    }
+
+    function wu(n) {
+        return n * n * n
+    }
+
+    function Su(n) {
+        if (0 >= n)return 0;
+        if (n >= 1)return 1;
+        var t = n * n, e = t * n;
+        return 4 * (.5 > n ? e : 3 * (n - t) + e - .75)
+    }
+
+    function ku(n) {
+        return function (t) {
+            return Math.pow(t, n)
+        }
+    }
+
+    function Eu(n) {
+        return 1 - Math.cos(n * ja)
+    }
+
+    function Au(n) {
+        return Math.pow(2, 10 * (n - 1))
+    }
+
+    function Nu(n) {
+        return 1 - Math.sqrt(1 - n * n)
+    }
+
+    function Cu(n, t) {
+        var e;
+        return arguments.length < 2 && (t = .45), arguments.length ? e = t / Pa * Math.asin(1 / n) : (n = 1, e = t / 4), function (r) {
+            return 1 + n * Math.pow(2, -10 * r) * Math.sin((r - e) * Pa / t)
+        }
+    }
+
+    function zu(n) {
+        return n || (n = 1.70158), function (t) {
+            return t * t * ((n + 1) * t - n)
+        }
+    }
+
+    function qu(n) {
+        return 1 / 2.75 > n ? 7.5625 * n * n : 2 / 2.75 > n ? 7.5625 * (n -= 1.5 / 2.75) * n + .75 : 2.5 / 2.75 > n ? 7.5625 * (n -= 2.25 / 2.75) * n + .9375 : 7.5625 * (n -= 2.625 / 2.75) * n + .984375
+    }
+
+    function Lu(n, t) {
+        n = ta.hcl(n), t = ta.hcl(t);
+        var e = n.h, r = n.c, u = n.l, i = t.h - e, o = t.c - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.c : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return lt(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Tu(n, t) {
+        n = ta.hsl(n), t = ta.hsl(t);
+        var e = n.h, r = n.s, u = n.l, i = t.h - e, o = t.s - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.s : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return at(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Ru(n, t) {
+        n = ta.lab(n), t = ta.lab(t);
+        var e = n.l, r = n.a, u = n.b, i = t.l - e, o = t.a - r, a = t.b - u;
+        return function (n) {
+            return ft(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Du(n, t) {
+        return t -= n, function (e) {
+            return Math.round(n + t * e)
+        }
+    }
+
+    function Pu(n) {
+        var t = [n.a, n.b], e = [n.c, n.d], r = ju(t), u = Uu(t, e), i = ju(Fu(e, t, -u)) || 0;
+        t[0] * e[1] < e[0] * t[1] && (t[0] *= -1, t[1] *= -1, r *= -1, u *= -1), this.rotate = (r ? Math.atan2(t[1], t[0]) : Math.atan2(-e[0], e[1])) * Ha, this.translate = [n.e, n.f], this.scale = [r, i], this.skew = i ? Math.atan2(u, i) * Ha : 0
+    }
+
+    function Uu(n, t) {
+        return n[0] * t[0] + n[1] * t[1]
+    }
+
+    function ju(n) {
+        var t = Math.sqrt(Uu(n, n));
+        return t && (n[0] /= t, n[1] /= t), t
+    }
+
+    function Fu(n, t, e) {
+        return n[0] += e * t[0], n[1] += e * t[1], n
+    }
+
+    function Hu(n, t) {
+        var e, r = [], u = [], i = ta.transform(n), o = ta.transform(t), a = i.translate, c = o.translate, l = i.rotate, s = o.rotate, f = i.skew, h = o.skew, g = i.scale, p = o.scale;
+        return a[0] != c[0] || a[1] != c[1] ? (r.push("translate(", null, ",", null, ")"), u.push({
+            i: 1,
+            x: vu(a[0], c[0])
+        }, {
+            i: 3,
+            x: vu(a[1], c[1])
+        })) : c[0] || c[1] ? r.push("translate(" + c + ")") : r.push(""), l != s ? (l - s > 180 ? s += 360 : s - l > 180 && (l += 360), u.push({
+            i: r.push(r.pop() + "rotate(", null, ")") - 2,
+            x: vu(l, s)
+        })) : s && r.push(r.pop() + "rotate(" + s + ")"), f != h ? u.push({
+            i: r.push(r.pop() + "skewX(", null, ")") - 2,
+            x: vu(f, h)
+        }) : h && r.push(r.pop() + "skewX(" + h + ")"), g[0] != p[0] || g[1] != p[1] ? (e = r.push(r.pop() + "scale(", null, ",", null, ")"), u.push({
+            i: e - 4,
+            x: vu(g[0], p[0])
+        }, {
+            i: e - 2,
+            x: vu(g[1], p[1])
+        })) : (1 != p[0] || 1 != p[1]) && r.push(r.pop() + "scale(" + p + ")"), e = u.length, function (n) {
+            for (var t, i = -1; ++i < e;)r[(t = u[i]).i] = t.x(n);
+            return r.join("")
+        }
+    }
+
+    function Ou(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return (e - n) / t
+        }
+    }
+
+    function Yu(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return Math.max(0, Math.min(1, (e - n) / t))
+        }
+    }
+
+    function Iu(n) {
+        for (var t = n.source, e = n.target, r = Vu(t, e), u = [t]; t !== r;)t = t.parent, u.push(t);
+        for (var i = u.length; e !== r;)u.splice(i, 0, e), e = e.parent;
+        return u
+    }
+
+    function Zu(n) {
+        for (var t = [], e = n.parent; null != e;)t.push(n), n = e, e = e.parent;
+        return t.push(n), t
+    }
+
+    function Vu(n, t) {
+        if (n === t)return n;
+        for (var e = Zu(n), r = Zu(t), u = e.pop(), i = r.pop(), o = null; u === i;)o = u, u = e.pop(), i = r.pop();
+        return o
+    }
+
+    function Xu(n) {
+        n.fixed |= 2
+    }
+
+    function $u(n) {
+        n.fixed &= -7
+    }
+
+    function Bu(n) {
+        n.fixed |= 4, n.px = n.x, n.py = n.y
+    }
+
+    function Wu(n) {
+        n.fixed &= -5
+    }
+
+    function Ju(n, t, e) {
+        var r = 0, u = 0;
+        if (n.charge = 0, !n.leaf)for (var i, o = n.nodes, a = o.length, c = -1; ++c < a;)i = o[c], null != i && (Ju(i, t, e), n.charge += i.charge, r += i.charge * i.cx, u += i.charge * i.cy);
+        if (n.point) {
+            n.leaf || (n.point.x += Math.random() - .5, n.point.y += Math.random() - .5);
+            var l = t * e[n.point.index];
+            n.charge += n.pointCharge = l, r += l * n.point.x, u += l * n.point.y
+        }
+        n.cx = r / n.charge, n.cy = u / n.charge
+    }
+
+    function Gu(n, t) {
+        return ta.rebind(n, t, "sort", "children", "value"), n.nodes = n, n.links = ri, n
+    }
+
+    function Ku(n, t) {
+        for (var e = [n]; null != (n = e.pop());)if (t(n), (u = n.children) && (r = u.length))for (var r, u; --r >= 0;)e.push(u[r])
+    }
+
+    function Qu(n, t) {
+        for (var e = [n], r = []; null != (n = e.pop());)if (r.push(n), (i = n.children) && (u = i.length))for (var u, i, o = -1; ++o < u;)e.push(i[o]);
+        for (; null != (n = r.pop());)t(n)

<TRUNCATED>

[02/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/js/jquery-ui.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/js/jquery-ui.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/js/jquery-ui.js
new file mode 100644
index 0000000..31ee9cd
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/js/jquery-ui.js
@@ -0,0 +1,16617 @@
+/*! jQuery UI - v1.11.4 - 2015-03-11
+* http://jqueryui.com
+* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+(function( factory ) {
+	if ( typeof define === "function" && define.amd ) {
+
+		// AMD. Register as an anonymous module.
+		define([ "jquery" ], factory );
+	} else {
+
+		// Browser globals
+		factory( jQuery );
+	}
+}(function( $ ) {
+/*!
+ * jQuery UI Core 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/category/ui-core/
+ */
+
+
+// $.ui might exist from components with no dependencies, e.g., $.ui.position
+$.ui = $.ui || {};
+
+$.extend( $.ui, {
+	version: "1.11.4",
+
+	keyCode: {
+		BACKSPACE: 8,
+		COMMA: 188,
+		DELETE: 46,
+		DOWN: 40,
+		END: 35,
+		ENTER: 13,
+		ESCAPE: 27,
+		HOME: 36,
+		LEFT: 37,
+		PAGE_DOWN: 34,
+		PAGE_UP: 33,
+		PERIOD: 190,
+		RIGHT: 39,
+		SPACE: 32,
+		TAB: 9,
+		UP: 38
+	}
+});
+
+// plugins
+$.fn.extend({
+	scrollParent: function( includeHidden ) {
+		var position = this.css( "position" ),
+			excludeStaticParent = position === "absolute",
+			overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
+			scrollParent = this.parents().filter( function() {
+				var parent = $( this );
+				if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
+					return false;
+				}
+				return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
+			}).eq( 0 );
+
+		return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
+	},
+
+	uniqueId: (function() {
+		var uuid = 0;
+
+		return function() {
+			return this.each(function() {
+				if ( !this.id ) {
+					this.id = "ui-id-" + ( ++uuid );
+				}
+			});
+		};
+	})(),
+
+	removeUniqueId: function() {
+		return this.each(function() {
+			if ( /^ui-id-\d+$/.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().addBack().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: 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.8
+if ( !$.fn.addBack ) {
+	$.fn.addBack = function( selector ) {
+		return this.add( selector == null ?
+			this.prevObject : this.prevObject.filter( selector )
+		);
+	};
+}
+
+// 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
+$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
+
+$.fn.extend({
+	focus: (function( orig ) {
+		return function( delay, fn ) {
+			return typeof delay === "number" ?
+				this.each(function() {
+					var elem = this;
+					setTimeout(function() {
+						$( elem ).focus();
+						if ( fn ) {
+							fn.call( elem );
+						}
+					}, delay );
+				}) :
+				orig.apply( this, arguments );
+		};
+	})( $.fn.focus ),
+
+	disableSelection: (function() {
+		var eventType = "onselectstart" in document.createElement( "div" ) ?
+			"selectstart" :
+			"mousedown";
+
+		return function() {
+			return this.bind( eventType + ".ui-disableSelection", function( event ) {
+				event.preventDefault();
+			});
+		};
+	})(),
+
+	enableSelection: function() {
+		return this.unbind( ".ui-disableSelection" );
+	},
+
+	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;
+	}
+});
+
+// $.ui.plugin is deprecated. Use $.widget() extensions instead.
+$.ui.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, allowDisconnected ) {
+		var i,
+			set = instance.plugins[ name ];
+
+		if ( !set ) {
+			return;
+		}
+
+		if ( !allowDisconnected && ( !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 );
+			}
+		}
+	}
+};
+
+
+/*!
+ * jQuery UI Widget 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/jQuery.widget/
+ */
+
+
+var widget_uuid = 0,
+	widget_slice = Array.prototype.slice;
+
+$.cleanData = (function( orig ) {
+	return function( elems ) {
+		var events, elem, i;
+		for ( i = 0; (elem = elems[i]) != null; i++ ) {
+			try {
+
+				// Only trigger remove when necessary to save time
+				events = $._data( elem, "events" );
+				if ( events && events.remove ) {
+					$( elem ).triggerHandler( "remove" );
+				}
+
+			// http://bugs.jquery.com/ticket/8235
+			} catch ( e ) {}
+		}
+		orig( elems );
+	};
+})( $.cleanData );
+
+$.widget = function( name, base, prototype ) {
+	var fullName, existingConstructor, constructor, basePrototype,
+		// proxiedPrototype allows the provided prototype to remain unmodified
+		// so that it can be used as a mixin for multiple widgets (#8876)
+		proxiedPrototype = {},
+		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 ) ) {
+			proxiedPrototype[ prop ] = value;
+			return;
+		}
+		proxiedPrototype[ 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) : name
+	}, proxiedPrototype, {
+		constructor: constructor,
+		namespace: namespace,
+		widgetName: name,
+		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 );
+
+	return constructor;
+};
+
+$.widget.extend = function( target ) {
+	var input = widget_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 = widget_slice.call( arguments, 1 ),
+			returnValue = this;
+
+		if ( isMethodCall ) {
+			this.each(function() {
+				var methodValue,
+					instance = $.data( this, fullName );
+				if ( options === "instance" ) {
+					returnValue = instance;
+					return false;
+				}
+				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 {
+
+			// Allow multiple hashes to be passed on init
+			if ( args.length ) {
+				options = $.widget.extend.apply( null, [ options ].concat(args) );
+			}
+
+			this.each(function() {
+				var instance = $.data( this, fullName );
+				if ( instance ) {
+					instance.option( options || {} );
+					if ( instance._init ) {
+						instance._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 = widget_uuid++;
+		this.eventNamespace = "." + this.widgetName + this.uuid;
+
+		this.bindings = $();
+		this.hoverable = $();
+		this.focusable = $();
+
+		if ( element !== 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.options = $.widget.extend( {},
+			this.options,
+			this._getCreateOptions(),
+			options );
+
+		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 )
+			.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 ( arguments.length === 1 ) {
+					return curOption[ key ] === undefined ? null : curOption[ key ];
+				}
+				curOption[ key ] = value;
+			} else {
+				if ( arguments.length === 1 ) {
+					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", !!value );
+
+			// If the widget is becoming disabled, then nothing is interactive
+			if ( value ) {
+				this.hoverable.removeClass( "ui-state-hover" );
+				this.focusable.removeClass( "ui-state-focus" );
+			}
+		}
+
+		return this;
+	},
+
+	enable: function() {
+		return this._setOptions({ disabled: false });
+	},
+	disable: function() {
+		return this._setOptions({ 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 {
+			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 );
+
+		// Clear the stack to avoid memory leaks (#10056)
+		this.bindings = $( this.bindings.not( element ).get() );
+		this.focusable = $( this.focusable.not( element ).get() );
+		this.hoverable = $( this.hoverable.not( element ).get() );
+	},
+
+	_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 ] ) {
+			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();
+			});
+		}
+	};
+});
+
+var widget = $.widget;
+
+
+/*!
+ * jQuery UI Mouse 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/mouse/
+ */
+
+
+var mouseHandled = false;
+$( document ).mouseup( function() {
+	mouseHandled = false;
+});
+
+var mouse = $.widget("ui.mouse", {
+	version: "1.11.4",
+	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 ) {
+			this.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;
+		}
+
+		this._mouseMoved = false;
+
+		// 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);
+		};
+
+		this.document
+			.bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
+			.bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
+
+		event.preventDefault();
+
+		mouseHandled = true;
+		return true;
+	},
+
+	_mouseMove: function(event) {
+		// Only check for mouseups outside the document if you've moved inside the document
+		// at least once. This prevents the firing of mouseup in the case of IE<9, which will
+		// fire a mousemove event if content is placed under the cursor. See #7778
+		// Support: IE <9
+		if ( this._mouseMoved ) {
+			// IE mouseup check - mouseup happened when mouse was out of window
+			if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
+				return this._mouseUp(event);
+
+			// Iframe mouseup check - mouseup occurred in another document
+			} else if ( !event.which ) {
+				return this._mouseUp( event );
+			}
+		}
+
+		if ( event.which || event.button ) {
+			this._mouseMoved = true;
+		}
+
+		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) {
+		this.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);
+		}
+
+		mouseHandled = false;
+		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 UI Position 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/position/
+ */
+
+(function() {
+
+$.ui = $.ui || {};
+
+var cachedScrollbarWidth, supportsOffsetFractions,
+	max = Math.max,
+	abs = Math.abs,
+	round = Math.round,
+	rhorizontal = /left|center|right/,
+	rvertical = /top|center|bottom/,
+	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
+	rposition = /^\w+/,
+	rpercent = /%$/,
+	_position = $.fn.position;
+
+function getOffsets( offsets, width, height ) {
+	return [
+		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
+		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
+	];
+}
+
+function parseCss( element, property ) {
+	return parseInt( $.css( element, property ), 10 ) || 0;
+}
+
+function getDimensions( elem ) {
+	var raw = elem[0];
+	if ( raw.nodeType === 9 ) {
+		return {
+			width: elem.width(),
+			height: elem.height(),
+			offset: { top: 0, left: 0 }
+		};
+	}
+	if ( $.isWindow( raw ) ) {
+		return {
+			width: elem.width(),
+			height: elem.height(),
+			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
+		};
+	}
+	if ( raw.preventDefault ) {
+		return {
+			width: 0,
+			height: 0,
+			offset: { top: raw.pageY, left: raw.pageX }
+		};
+	}
+	return {
+		width: elem.outerWidth(),
+		height: elem.outerHeight(),
+		offset: elem.offset()
+	};
+}
+
+$.position = {
+	scrollbarWidth: function() {
+		if ( cachedScrollbarWidth !== undefined ) {
+			return cachedScrollbarWidth;
+		}
+		var w1, w2,
+			div = $( "<div style='display:block;position:absolute;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.isDocument ? "" :
+				within.element.css( "overflow-x" ),
+			overflowY = within.isWindow || within.isDocument ? "" :
+				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: hasOverflowY ? $.position.scrollbarWidth() : 0,
+			height: hasOverflowX ? $.position.scrollbarWidth() : 0
+		};
+	},
+	getWithinInfo: function( element ) {
+		var withinElement = $( element || window ),
+			isWindow = $.isWindow( withinElement[0] ),
+			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
+		return {
+			element: withinElement,
+			isWindow: isWindow,
+			isDocument: isDocument,
+			offset: withinElement.offset() || { left: 0, top: 0 },
+			scrollLeft: withinElement.scrollLeft(),
+			scrollTop: withinElement.scrollTop(),
+
+			// support: jQuery 1.6.x
+			// jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
+			width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
+			height: isWindow || isDocument ? 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, dimensions,
+		target = $( options.of ),
+		within = $.position.getWithinInfo( options.within ),
+		scrollInfo = $.position.getScrollInfo( within ),
+		collision = ( options.collision || "flip" ).split( " " ),
+		offsets = {};
+
+	dimensions = getDimensions( target );
+	if ( target[0].preventDefault ) {
+		// force left top to allow flipping
+		options.at = "left top";
+	}
+	targetWidth = dimensions.width;
+	targetHeight = dimensions.height;
+	targetOffset = dimensions.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 ( !supportsOffsetFractions ) {
+			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 ( 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 ( 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 ( 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;
+	supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
+
+	testElement.innerHTML = "";
+	testElementParent.removeChild( testElement );
+})();
+
+})();
+
+var position = $.ui.position;
+
+
+/*!
+ * jQuery UI Accordion 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/accordion/
+ */
+
+
+var accordion = $.widget( "ui.accordion", {
+	version: "1.11.4",
+	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
+	},
+
+	hideProps: {
+		borderTopWidth: "hide",
+		borderBottomWidth: "hide",
+		paddingTop: "hide",
+		paddingBottom: "hide",
+		height: "hide"
+	},
+
+	showProps: {
+		borderTopWidth: "show",
+		borderBottomWidth: "show",
+		paddingTop: "show",
+		paddingBottom: "show",
+		height: "show"
+	},
+
+	_create: function() {
+		var options = this.options;
+		this.prevShow = this.prevHide = $();
+		this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
+			// ARIA
+			.attr( "role", "tablist" );
+
+		// don't allow collapsible: false and active: false / null
+		if ( !options.collapsible && (options.active === false || options.active == null) ) {
+			options.active = 0;
+		}
+
+		this._processPanels();
+		// handle negative values
+		if ( options.active < 0 ) {
+			options.active += this.headers.length;
+		}
+		this._refresh();
+	},
+
+	_getCreateEventData: function() {
+		return {
+			header: this.active,
+			panel: !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-state-default " +
+				"ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
+			.removeAttr( "role" )
+			.removeAttr( "aria-expanded" )
+			.removeAttr( "aria-selected" )
+			.removeAttr( "aria-controls" )
+			.removeAttr( "tabIndex" )
+			.removeUniqueId();
+
+		this._destroyIcons();
+
+		// clean up content panels
+		contents = this.headers.next()
+			.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " +
+				"ui-accordion-content ui-accordion-content-active ui-state-disabled" )
+			.css( "display", "" )
+			.removeAttr( "role" )
+			.removeAttr( "aria-hidden" )
+			.removeAttr( "aria-labelledby" )
+			.removeUniqueId();
+
+		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.element
+				.toggleClass( "ui-state-disabled", !!value )
+				.attr( "aria-disabled", value );
+			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 options = this.options;
+		this._processPanels();
+
+		// was collapsed or no panel
+		if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
+			options.active = false;
+			this.active = $();
+		// active false only when collapsible is true
+		} else if ( options.active === false ) {
+			this._activate( 0 );
+		// was active, but active panel is gone
+		} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
+			// all remaining panel are disabled
+			if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
+				options.active = false;
+				this.active = $();
+			// activate previous panel
+			} else {
+				this._activate( Math.max( 0, options.active - 1 ) );
+			}
+		// was active, active panel still exists
+		} else {
+			// make sure active index is correct
+			options.active = this.headers.index( this.active );
+		}
+
+		this._destroyIcons();
+
+		this._refresh();
+	},
+
+	_processPanels: function() {
+		var prevHeaders = this.headers,
+			prevPanels = this.panels;
+
+		this.headers = this.element.find( this.options.header )
+			.addClass( "ui-accordion-header ui-state-default ui-corner-all" );
+
+		this.panels = this.headers.next()
+			.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
+			.filter( ":not(.ui-accordion-content-active)" )
+			.hide();
+
+		// Avoid memory leaks (#10056)
+		if ( prevPanels ) {
+			this._off( prevHeaders.not( this.headers ) );
+			this._off( prevPanels.not( this.panels ) );
+		}
+	},
+
+	_refresh: function() {
+		var maxHeight,
+			options = this.options,
+			heightStyle = options.heightStyle,
+			parent = this.element.parent();
+
+		this.active = this._findActive( options.active )
+			.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
+			.removeClass( "ui-corner-all" );
+		this.active.next()
+			.addClass( "ui-accordion-content-active" )
+			.show();
+
+		this.headers
+			.attr( "role", "tab" )
+			.each(function() {
+				var header = $( this ),
+					headerId = header.uniqueId().attr( "id" ),
+					panel = header.next(),
+					panelId = panel.uniqueId().attr( "id" );
+				header.attr( "aria-controls", panelId );
+				panel.attr( "aria-labelledby", headerId );
+			})
+			.next()
+				.attr( "role", "tabpanel" );
+
+		this.headers
+			.not( this.active )
+			.attr({
+				"aria-selected": "false",
+				"aria-expanded": "false",
+				tabIndex: -1
+			})
+			.next()
+				.attr({
+					"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",
+				"aria-expanded": "true",
+				tabIndex: 0
+			})
+			.next()
+				.attr({
+					"aria-hidden": "false"
+				});
+		}
+
+		this._createIcons();
+
+		this._setupEvents( options.event );
+
+		if ( heightStyle === "fill" ) {
+			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 );
+			});
+
+			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 = {
+			keydown: "_keydown"
+		};
+		if ( event ) {
+			$.each( event.split( " " ), function( index, eventName ) {
+				events[ eventName ] = "_eventHandler";
+			});
+		}
+
+		this._off( this.headers.add( this.headers.next() ) );
+		this._on( this.headers, events );
+		this._on( this.headers.next(), { keydown: "_panelKeyDown" });
+		this._hoverable( this.headers );
+		this._focusable( this.headers );
+	},
+
+	_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-hidden": "true"
+		});
+		toHide.prev().attr({
+			"aria-selected": "false",
+			"aria-expanded": "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,
+				"aria-expanded": "false"
+			});
+		} else if ( toShow.length ) {
+			this.headers.filter(function() {
+				return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
+			})
+			.attr( "tabIndex", -1 );
+		}
+
+		toShow
+			.attr( "aria-hidden", "false" )
+			.prev()
+				.attr({
+					"aria-selected": "true",
+					"aria-expanded": "true",
+					tabIndex: 0
+				});
+	},
+
+	_animate: function( toShow, toHide, data ) {
+		var total, easing, duration,
+			that = this,
+			adjust = 0,
+			boxSizing = toShow.css( "box-sizing" ),
+			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( this.showProps, duration, easing, complete );
+		}
+		if ( !toShow.length ) {
+			return toHide.animate( this.hideProps, duration, easing, complete );
+		}
+
+		total = toShow.show().outerHeight();
+		toHide.animate( this.hideProps, {
+			duration: duration,
+			easing: easing,
+			step: function( now, fx ) {
+				fx.now = Math.round( now );
+			}
+		});
+		toShow
+			.hide()
+			.animate( this.showProps, {
+				duration: duration,
+				easing: easing,
+				complete: complete,
+				step: function( now, fx ) {
+					fx.now = Math.round( now );
+					if ( fx.prop !== "height" ) {
+						if ( boxSizing === "content-box" ) {
+							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 );
+	}
+});
+
+
+/*!
+ * jQuery UI Menu 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/menu/
+ */
+
+
+var menu = $.widget( "ui.menu", {
+	version: "1.11.4",
+	defaultElement: "<ul>",
+	delay: 300,
+	options: {
+		icons: {
+			submenu: "ui-icon-carat-1-e"
+		},
+		items: "> *",
+		menus: "ul",
+		position: {
+			my: "left-1 top",
+			at: "right top"
+		},
+		role: "menu",
+
+		// callbacks
+		blur: null,
+		focus: null,
+		select: null
+	},
+
+	_create: function() {
+		this.activeMenu = this.element;
+
+		// Flag used to prevent firing of the click handler
+		// as the event bubbles up through nested menus
+		this.mouseHandled = false;
+		this.element
+			.uniqueId()
+			.addClass( "ui-menu ui-widget ui-widget-content" )
+			.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
+			.attr({
+				role: this.options.role,
+				tabIndex: 0
+			});
+
+		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": function( event ) {
+				event.preventDefault();
+			},
+			"click .ui-menu-item": function( event ) {
+				var target = $( event.target );
+				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
+					this.select( event );
+
+					// Only set the mouseHandled flag if the event will bubble, see #9469.
+					if ( !event.isPropagationStopped() ) {
+						this.mouseHandled = true;
+					}
+
+					// Open submenu on click
+					if ( target.has( ".ui-menu" ).length ) {
+						this.expand( event );
+					} else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
+
+						// 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 ) {
+				// Ignore mouse events while typeahead is active, see #10458.
+				// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
+				// is over an item in the menu
+				if ( this.previousFilter ) {
+					return;
+				}
+				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( ".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.find( this.options.items ).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 ( this._closeOnDocumentClick( event ) ) {
+					this.collapseAll( event );
+				}
+
+				// Reset the mouseHandled flag
+				this.mouseHandled = false;
+			}
+		});
+	},
+
+	_destroy: function() {
+		// Destroy (sub)menus
+		this.element
+			.removeAttr( "aria-activedescendant" )
+			.find( ".ui-menu" ).addBack()
+				.removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
+				.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" )
+			.removeUniqueId()
+			.removeClass( "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,
+			preventDefault = true;
+
+		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;
+			}
+
+			match = this._filterMenuItems( character );
+			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 );
+				match = this._filterMenuItems( character );
+			}
+
+			if ( match.length ) {
+				this.focus( event, match );
+				this.previousFilter = character;
+				this.filterTimer = this._delay(function() {
+					delete this.previousFilter;
+				}, 1000 );
+			} else {
+				delete this.previousFilter;
+			}
+		}
+
+		if ( preventDefault ) {
+			event.preventDefault();
+		}
+	},
+
+	_activate: function( event ) {
+		if ( !this.active.is( ".ui-state-disabled" ) ) {
+			if ( this.active.is( "[aria-haspopup='true']" ) ) {
+				this.expand( event );
+			} else {
+				this.select( event );
+			}
+		}
+	},
+
+	refresh: function() {
+		var menus, items,
+			that = this,
+			icon = this.options.icons.submenu,
+			submenus = this.element.find( this.options.menus );
+
+		this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
+
+		// Initialize nested menus
+		submenus.filter( ":not(.ui-menu)" )
+			.addClass( "ui-menu ui-widget ui-widget-content ui-front" )
+			.hide()
+			.attr({
+				role: this.options.role,
+				"aria-hidden": "true",
+				"aria-expanded": "false"
+			})
+			.each(function() {
+				var menu = $( this ),
+					item = menu.parent(),
+					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 );
+		items = menus.find( this.options.items );
+
+		// Initialize menu-items containing spaces and/or dashes only as dividers
+		items.not( ".ui-menu-item" ).each(function() {
+			var item = $( this );
+			if ( that._isDivider( item ) ) {
+				item.addClass( "ui-widget-content ui-menu-divider" );
+			}
+		});
+
+		// Don't refresh list items that are already adapted
+		items.not( ".ui-menu-item, .ui-menu-divider" )
+			.addClass( "ui-menu-item" )
+			.uniqueId()
+			.attr({
+				tabIndex: -1,
+				role: this._itemRole()
+			});
+
+		// Add aria-disabled attribute to any disabled menu item
+		items.filter( ".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 ];
+	},
+
+	_setOption: function( key, value ) {
+		if ( key === "icons" ) {
+			this.element.find( ".ui-menu-icon" )
+				.removeClass( this.options.icons.submenu )
+				.addClass( value.submenu );
+		}
+		if ( key === "disabled" ) {
+			this.element
+				.toggleClass( "ui-state-disabled", !!value )
+				.attr( "aria-disabled", value );
+		}
+		this._super( key, value );
+	},
+
+	focus: function( event, item ) {
+		var nested, focused;
+		this.blur( event, event && event.type === "focus" );
+
+		this._scrollIntoView( item );
+
+		this.active = item.first();
+		focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
+		// 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" )
+			.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 && event && ( /^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.outerHeight();
+
+			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.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( ".ui-state-active" ).not( ".ui-state-focus" )
+				.removeClass( "ui-state-active" );
+	},
+
+	_closeOnDocumentClick: function( event ) {
+		return !$( event.target ).closest( ".ui-menu" ).length;
+	},
+
+	_isDivider: function( item ) {
+
+		// Match hyphen, em dash, en dash
+		return !/[^\-\u2014\u2013\s]/.test( item.text() );
+	},
+
+	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 " )
+				.find( this.options.items )
+				.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.find( this.options.items )[ 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.find( this.options.items )
+				[ !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.find( this.options.items ).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 );
+	},
+
+	_filterMenuItems: function(character) {
+		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
+			regex = new RegExp( "^" + escapedCharacter, "i" );
+
+		return this.activeMenu
+			.find( this.options.items )
+
+			// Only match on items, not dividers or other content (#10571)
+			.filter( ".ui-menu-item" )
+			.filter(function() {
+				return regex.test( $.trim( $( this ).text() ) );
+			});
+	}
+});
+
+
+/*!
+ * jQuery UI Autocomplete 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/autocomplete/
+ */
+
+
+$.widget( "ui.autocomplete", {
+	version: "1.11.4",
+	defaultElement: "<input>",
+	options: {
+		appendTo: null,
+		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
+	},
+
+	requestIndex: 0,
+	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,
+			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
+			isTextarea = nodeName === "textarea",
+			isInput = nodeName === "input";
+
+		this.isMultiLine =
+			// Textareas are always multi-line
+			isTextarea ? true :
+			// Inputs are always single-line, even if inside a contentEditable element
+			// IE also treats inputs as contentEditable
+			isInput ? false :
+			// All other element types are determined by whether or not they're contentEditable
+			this.element.prop( "isContentEditable" );
+
+		this.valueMethod = this.element[ isTextarea || isInput ? "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:
+					// 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" ) ) {
+						if ( !this.isMultiLine ) {
+							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;
+					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
+						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 ui-front" )
+			.appendTo( this._appendTo() )
+			.menu({
+				// disable ARIA support, the live region takes care of that
+				role: null
+			})
+			.hide()
+			.menu( "instance" );
+
+		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 ) {
+				var label, item;
+				// support: Firefox
+				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
+				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;
+					}
+				}
+
+				item = ui.item.data( "ui-autocomplete-item" );
+				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 );
+					}
+				}
+
+				// Announce the value in the liveRegion
+				label = ui.item.attr( "aria-label" ) || item.value;
+				if ( label && $.trim( label ).length ) {
+					this.liveRegion.children().hide();
+					$( "<div>" ).text( label ).appendTo( this.liveRegion );
+				}
+			},
+			menuselect: function( event, ui ) {
+				var item = ui.item.data( "ui-autocomplete-item" ),
+					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": "assertive",
+				"aria-relevant": "additions"
+			})
+			.addClass( "ui-helper-hidden-accessible" )
+			.appendTo( this.document[ 0 ].body );
+
+		// 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._appendTo() );
+		}
+		if ( key === "disabled" && value && this.xhr ) {
+			this.xhr.abort();
+		}
+	},
+
+	_appendTo: function() {
+		var element = this.options.appe

<TRUNCATED>

[27/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/artifact.xml
new file mode 100644
index 0000000..d74cd0c
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="GadgetMemberCount" version="1.0.0" type="dashboards/gadget" serverRole="DataAnalyticsServer">
+    <file>Member_Count</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/css/jquery-ui.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/css/jquery-ui.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/css/jquery-ui.css
new file mode 100644
index 0000000..1c22746
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/css/jquery-ui.css
@@ -0,0 +1,1225 @@
+/*! jQuery UI - v1.11.4 - 2015-03-11
+* http://jqueryui.com
+* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureE
 rror=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden {
+	display: none;
+}
+.ui-helper-hidden-accessible {
+	border: 0;
+	clip: rect(0 0 0 0);
+	height: 1px;
+	margin: -1px;
+	overflow: hidden;
+	padding: 0;
+	position: absolute;
+	width: 1px;
+}
+.ui-helper-reset {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	outline: 0;
+	line-height: 1.3;
+	text-decoration: none;
+	font-size: 100%;
+	list-style: none;
+}
+.ui-helper-clearfix:before,
+.ui-helper-clearfix:after {
+	content: "";
+	display: table;
+	border-collapse: collapse;
+}
+.ui-helper-clearfix:after {
+	clear: both;
+}
+.ui-helper-clearfix {
+	min-height: 0; /* support: IE7 */
+}
+.ui-helper-zfix {
+	width: 100%;
+	height: 100%;
+	top: 0;
+	left: 0;
+	position: absolute;
+	opacity: 0;
+	filter:Alpha(Opacity=0); /* support: IE8 */
+}
+
+.ui-front {
+	z-index: 100;
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled {
+	cursor: default !important;
+}
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+	display: block;
+	text-indent: -99999px;
+	overflow: hidden;
+	background-repeat: no-repeat;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay {
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+}
+.ui-accordion .ui-accordion-header {
+	display: block;
+	cursor: pointer;
+	position: relative;
+	margin: 2px 0 0 0;
+	padding: .5em .5em .5em .7em;
+	min-height: 0; /* support: IE7 */
+	font-size: 100%;
+}
+.ui-accordion .ui-accordion-icons {
+	padding-left: 2.2em;
+}
+.ui-accordion .ui-accordion-icons .ui-accordion-icons {
+	padding-left: 2.2em;
+}
+.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
+	position: absolute;
+	left: .5em;
+	top: 50%;
+	margin-top: -8px;
+}
+.ui-accordion .ui-accordion-content {
+	padding: 1em 2.2em;
+	border-top: 0;
+	overflow: auto;
+}
+.ui-autocomplete {
+	position: absolute;
+	top: 0;
+	left: 0;
+	cursor: default;
+}
+.ui-button {
+	display: inline-block;
+	position: relative;
+	padding: 0;
+	line-height: normal;
+	margin-right: .1em;
+	cursor: pointer;
+	vertical-align: middle;
+	text-align: center;
+	overflow: visible; /* removes extra width in IE */
+}
+.ui-button,
+.ui-button:link,
+.ui-button:visited,
+.ui-button:hover,
+.ui-button:active {
+	text-decoration: none;
+}
+/* to make room for the icon, a width needs to be set here */
+.ui-button-icon-only {
+	width: 2.2em;
+}
+/* button elements seem to need a little more width */
+button.ui-button-icon-only {
+	width: 2.4em;
+}
+.ui-button-icons-only {
+	width: 3.4em;
+}
+button.ui-button-icons-only {
+	width: 3.7em;
+}
+
+/* button text element */
+.ui-button .ui-button-text {
+	display: block;
+	line-height: normal;
+}
+.ui-button-text-only .ui-button-text {
+	padding: .4em 1em;
+}
+.ui-button-icon-only .ui-button-text,
+.ui-button-icons-only .ui-button-text {
+	padding: .4em;
+	text-indent: -9999999px;
+}
+.ui-button-text-icon-primary .ui-button-text,
+.ui-button-text-icons .ui-button-text {
+	padding: .4em 1em .4em 2.1em;
+}
+.ui-button-text-icon-secondary .ui-button-text,
+.ui-button-text-icons .ui-button-text {
+	padding: .4em 2.1em .4em 1em;
+}
+.ui-button-text-icons .ui-button-text {
+	padding-left: 2.1em;
+	padding-right: 2.1em;
+}
+/* no icon support for input elements, provide padding by default */
+input.ui-button {
+	padding: .4em 1em;
+}
+
+/* button icon element(s) */
+.ui-button-icon-only .ui-icon,
+.ui-button-text-icon-primary .ui-icon,
+.ui-button-text-icon-secondary .ui-icon,
+.ui-button-text-icons .ui-icon,
+.ui-button-icons-only .ui-icon {
+	position: absolute;
+	top: 50%;
+	margin-top: -8px;
+}
+.ui-button-icon-only .ui-icon {
+	left: 50%;
+	margin-left: -8px;
+}
+.ui-button-text-icon-primary .ui-button-icon-primary,
+.ui-button-text-icons .ui-button-icon-primary,
+.ui-button-icons-only .ui-button-icon-primary {
+	left: .5em;
+}
+.ui-button-text-icon-secondary .ui-button-icon-secondary,
+.ui-button-text-icons .ui-button-icon-secondary,
+.ui-button-icons-only .ui-button-icon-secondary {
+	right: .5em;
+}
+
+/* button sets */
+.ui-buttonset {
+	margin-right: 7px;
+}
+.ui-buttonset .ui-button {
+	margin-left: 0;
+	margin-right: -.3em;
+}
+
+/* workarounds */
+/* reset extra padding in Firefox, see h5bp.com/l */
+input.ui-button::-moz-focus-inner,
+button.ui-button::-moz-focus-inner {
+	border: 0;
+	padding: 0;
+}
+.ui-datepicker {
+	width: 17em;
+	padding: .2em .2em 0;
+	display: none;
+}
+.ui-datepicker .ui-datepicker-header {
+	position: relative;
+	padding: .2em 0;
+}
+.ui-datepicker .ui-datepicker-prev,
+.ui-datepicker .ui-datepicker-next {
+	position: absolute;
+	top: 2px;
+	width: 1.8em;
+	height: 1.8em;
+}
+.ui-datepicker .ui-datepicker-prev-hover,
+.ui-datepicker .ui-datepicker-next-hover {
+	top: 1px;
+}
+.ui-datepicker .ui-datepicker-prev {
+	left: 2px;
+}
+.ui-datepicker .ui-datepicker-next {
+	right: 2px;
+}
+.ui-datepicker .ui-datepicker-prev-hover {
+	left: 1px;
+}
+.ui-datepicker .ui-datepicker-next-hover {
+	right: 1px;
+}
+.ui-datepicker .ui-datepicker-prev span,
+.ui-datepicker .ui-datepicker-next span {
+	display: block;
+	position: absolute;
+	left: 50%;
+	margin-left: -8px;
+	top: 50%;
+	margin-top: -8px;
+}
+.ui-datepicker .ui-datepicker-title {
+	margin: 0 2.3em;
+	line-height: 1.8em;
+	text-align: center;
+}
+.ui-datepicker .ui-datepicker-title select {
+	font-size: 1em;
+	margin: 1px 0;
+}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year {
+	width: 45%;
+}
+.ui-datepicker table {
+	width: 100%;
+	font-size: .9em;
+	border-collapse: collapse;
+	margin: 0 0 .4em;
+}
+.ui-datepicker th {
+	padding: .7em .3em;
+	text-align: center;
+	font-weight: bold;
+	border: 0;
+}
+.ui-datepicker td {
+	border: 0;
+	padding: 1px;
+}
+.ui-datepicker td span,
+.ui-datepicker td a {
+	display: block;
+	padding: .2em;
+	text-align: right;
+	text-decoration: none;
+}
+.ui-datepicker .ui-datepicker-buttonpane {
+	background-image: none;
+	margin: .7em 0 0 0;
+	padding: 0 .2em;
+	border-left: 0;
+	border-right: 0;
+	border-bottom: 0;
+}
+.ui-datepicker .ui-datepicker-buttonpane button {
+	float: right;
+	margin: .5em .2em .4em;
+	cursor: pointer;
+	padding: .2em .6em .3em .6em;
+	width: auto;
+	overflow: visible;
+}
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
+	float: left;
+}
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi {
+	width: auto;
+}
+.ui-datepicker-multi .ui-datepicker-group {
+	float: left;
+}
+.ui-datepicker-multi .ui-datepicker-group table {
+	width: 95%;
+	margin: 0 auto .4em;
+}
+.ui-datepicker-multi-2 .ui-datepicker-group {
+	width: 50%;
+}
+.ui-datepicker-multi-3 .ui-datepicker-group {
+	width: 33.3%;
+}
+.ui-datepicker-multi-4 .ui-datepicker-group {
+	width: 25%;
+}
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
+	border-left-width: 0;
+}
+.ui-datepicker-multi .ui-datepicker-buttonpane {
+	clear: left;
+}
+.ui-datepicker-row-break {
+	clear: both;
+	width: 100%;
+	font-size: 0;
+}
+
+/* RTL support */
+.ui-datepicker-rtl {
+	direction: rtl;
+}
+.ui-datepicker-rtl .ui-datepicker-prev {
+	right: 2px;
+	left: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-next {
+	left: 2px;
+	right: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-prev:hover {
+	right: 1px;
+	left: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-next:hover {
+	left: 1px;
+	right: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane {
+	clear: right;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane button {
+	float: left;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
+.ui-datepicker-rtl .ui-datepicker-group {
+	float: right;
+}
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
+	border-right-width: 0;
+	border-left-width: 1px;
+}
+.ui-dialog {
+	overflow: hidden;
+	position: absolute;
+	top: 0;
+	left: 0;
+	padding: .2em;
+	outline: 0;
+}
+.ui-dialog .ui-dialog-titlebar {
+	padding: .4em 1em;
+	position: relative;
+}
+.ui-dialog .ui-dialog-title {
+	float: left;
+	margin: .1em 0;
+	white-space: nowrap;
+	width: 90%;
+	overflow: hidden;
+	text-overflow: ellipsis;
+}
+.ui-dialog .ui-dialog-titlebar-close {
+	position: absolute;
+	right: .3em;
+	top: 50%;
+	width: 20px;
+	margin: -10px 0 0 0;
+	padding: 1px;
+	height: 20px;
+}
+.ui-dialog .ui-dialog-content {
+	position: relative;
+	border: 0;
+	padding: .5em 1em;
+	background: none;
+	overflow: auto;
+}
+.ui-dialog .ui-dialog-buttonpane {
+	text-align: left;
+	border-width: 1px 0 0 0;
+	background-image: none;
+	margin-top: .5em;
+	padding: .3em 1em .5em .4em;
+}
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
+	float: right;
+}
+.ui-dialog .ui-dialog-buttonpane button {
+	margin: .5em .4em .5em 0;
+	cursor: pointer;
+}
+.ui-dialog .ui-resizable-se {
+	width: 12px;
+	height: 12px;
+	right: -5px;
+	bottom: -5px;
+	background-position: 16px 16px;
+}
+.ui-draggable .ui-dialog-titlebar {
+	cursor: move;
+}
+.ui-draggable-handle {
+	-ms-touch-action: none;
+	touch-action: none;
+}
+.ui-menu {
+	list-style: none;
+	padding: 0;
+	margin: 0;
+	display: block;
+	outline: none;
+}
+.ui-menu .ui-menu {
+	position: absolute;
+}
+.ui-menu .ui-menu-item {
+	position: relative;
+	margin: 0;
+	padding: 3px 1em 3px .4em;
+	cursor: pointer;
+	min-height: 0; /* support: IE7 */
+	/* support: IE10, see #8844 */
+	list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
+}
+.ui-menu .ui-menu-divider {
+	margin: 5px 0;
+	height: 0;
+	font-size: 0;
+	line-height: 0;
+	border-width: 1px 0 0 0;
+}
+.ui-menu .ui-state-focus,
+.ui-menu .ui-state-active {
+	margin: -1px;
+}
+
+/* icon support */
+.ui-menu-icons {
+	position: relative;
+}
+.ui-menu-icons .ui-menu-item {
+	padding-left: 2em;
+}
+
+/* left-aligned */
+.ui-menu .ui-icon {
+	position: absolute;
+	top: 0;
+	bottom: 0;
+	left: .2em;
+	margin: auto 0;
+}
+
+/* right-aligned */
+.ui-menu .ui-menu-icon {
+	left: auto;
+	right: 0;
+}
+.ui-progressbar {
+	height: 2em;
+	text-align: left;
+	overflow: hidden;
+}
+.ui-progressbar .ui-progressbar-value {
+	margin: -1px;
+	height: 100%;
+}
+.ui-progressbar .ui-progressbar-overlay {
+	background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkEC
 QEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8
 aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
+	height: 100%;
+	filter: alpha(opacity=25); /* support: IE8 */
+	opacity: 0.25;
+}
+.ui-progressbar-indeterminate .ui-progressbar-value {
+	background-image: none;
+}
+.ui-resizable {
+	position: relative;
+}
+.ui-resizable-handle {
+	position: absolute;
+	font-size: 0.1px;
+	display: block;
+	-ms-touch-action: none;
+	touch-action: none;
+}
+.ui-resizable-disabled .ui-resizable-handle,
+.ui-resizable-autohide .ui-resizable-handle {
+	display: none;
+}
+.ui-resizable-n {
+	cursor: n-resize;
+	height: 7px;
+	width: 100%;
+	top: -5px;
+	left: 0;
+}
+.ui-resizable-s {
+	cursor: s-resize;
+	height: 7px;
+	width: 100%;
+	bottom: -5px;
+	left: 0;
+}
+.ui-resizable-e {
+	cursor: e-resize;
+	width: 7px;
+	right: -5px;
+	top: 0;
+	height: 100%;
+}
+.ui-resizable-w {
+	cursor: w-resize;
+	width: 7px;
+	left: -5px;
+	top: 0;
+	height: 100%;
+}
+.ui-resizable-se {
+	cursor: se-resize;
+	width: 12px;
+	height: 12px;
+	right: 1px;
+	bottom: 1px;
+}
+.ui-resizable-sw {
+	cursor: sw-resize;
+	width: 9px;
+	height: 9px;
+	left: -5px;
+	bottom: -5px;
+}
+.ui-resizable-nw {
+	cursor: nw-resize;
+	width: 9px;
+	height: 9px;
+	left: -5px;
+	top: -5px;
+}
+.ui-resizable-ne {
+	cursor: ne-resize;
+	width: 9px;
+	height: 9px;
+	right: -5px;
+	top: -5px;
+}
+.ui-selectable {
+	-ms-touch-action: none;
+	touch-action: none;
+}
+.ui-selectable-helper {
+	position: absolute;
+	z-index: 100;
+	border: 1px dotted black;
+}
+.ui-selectmenu-menu {
+	padding: 0;
+	margin: 0;
+	position: absolute;
+	top: 0;
+	left: 0;
+	display: none;
+}
+.ui-selectmenu-menu .ui-menu {
+	overflow: auto;
+	/* Support: IE7 */
+	overflow-x: hidden;
+	padding-bottom: 1px;
+}
+.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
+	font-size: 1em;
+	font-weight: bold;
+	line-height: 1.5;
+	padding: 2px 0.4em;
+	margin: 0.5em 0 0 0;
+	height: auto;
+	border: 0;
+}
+.ui-selectmenu-open {
+	display: block;
+}
+.ui-selectmenu-button {
+	display: inline-block;
+	overflow: hidden;
+	position: relative;
+	text-decoration: none;
+	cursor: pointer;
+}
+.ui-selectmenu-button span.ui-icon {
+	right: 0.5em;
+	left: auto;
+	margin-top: -8px;
+	position: absolute;
+	top: 50%;
+}
+.ui-selectmenu-button span.ui-selectmenu-text {
+	text-align: left;
+	padding: 0.4em 2.1em 0.4em 1em;
+	display: block;
+	line-height: 1.4;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+}
+.ui-slider {
+	position: relative;
+	text-align: left;
+}
+.ui-slider .ui-slider-handle {
+	position: absolute;
+	z-index: 2;
+	width: 1.2em;
+	height: 1.2em;
+	cursor: default;
+	-ms-touch-action: none;
+	touch-action: none;
+}
+.ui-slider .ui-slider-range {
+	position: absolute;
+	z-index: 1;
+	font-size: .7em;
+	display: block;
+	border: 0;
+	background-position: 0 0;
+}
+
+/* support: IE8 - See #6727 */
+.ui-slider.ui-state-disabled .ui-slider-handle,
+.ui-slider.ui-state-disabled .ui-slider-range {
+	filter: inherit;
+}
+
+.ui-slider-horizontal {
+	height: .8em;
+}
+.ui-slider-horizontal .ui-slider-handle {
+	top: -.3em;
+	margin-left: -.6em;
+}
+.ui-slider-horizontal .ui-slider-range {
+	top: 0;
+	height: 100%;
+}
+.ui-slider-horizontal .ui-slider-range-min {
+	left: 0;
+}
+.ui-slider-horizontal .ui-slider-range-max {
+	right: 0;
+}
+
+.ui-slider-vertical {
+	width: .8em;
+	height: 100px;
+}
+.ui-slider-vertical .ui-slider-handle {
+	left: -.3em;
+	margin-left: 0;
+	margin-bottom: -.6em;
+}
+.ui-slider-vertical .ui-slider-range {
+	left: 0;
+	width: 100%;
+}
+.ui-slider-vertical .ui-slider-range-min {
+	bottom: 0;
+}
+.ui-slider-vertical .ui-slider-range-max {
+	top: 0;
+}
+.ui-sortable-handle {
+	-ms-touch-action: none;
+	touch-action: none;
+}
+.ui-spinner {
+	position: relative;
+	display: inline-block;
+	overflow: hidden;
+	padding: 0;
+	vertical-align: middle;
+}
+.ui-spinner-input {
+	border: none;
+	background: none;
+	color: inherit;
+	padding: 0;
+	margin: .2em 0;
+	vertical-align: middle;
+	margin-left: .4em;
+	margin-right: 22px;
+}
+.ui-spinner-button {
+	width: 16px;
+	height: 50%;
+	font-size: .5em;
+	padding: 0;
+	margin: 0;
+	text-align: center;
+	position: absolute;
+	cursor: default;
+	display: block;
+	overflow: hidden;
+	right: 0;
+}
+/* more specificity required here to override default borders */
+.ui-spinner a.ui-spinner-button {
+	border-top: none;
+	border-bottom: none;
+	border-right: none;
+}
+/* vertically center icon */
+.ui-spinner .ui-icon {
+	position: absolute;
+	margin-top: -8px;
+	top: 50%;
+	left: 0;
+}
+.ui-spinner-up {
+	top: 0;
+}
+.ui-spinner-down {
+	bottom: 0;
+}
+
+/* TR overrides */
+.ui-spinner .ui-icon-triangle-1-s {
+	/* need to fix icons sprite */
+	background-position: -65px -16px;
+}
+.ui-tabs {
+	position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+	padding: .2em;
+}
+.ui-tabs .ui-tabs-nav {
+	margin: 0;
+	padding: .2em .2em 0;
+}
+.ui-tabs .ui-tabs-nav li {
+	list-style: none;
+	float: left;
+	position: relative;
+	top: 0;
+	margin: 1px .2em 0 0;
+	border-bottom-width: 0;
+	padding: 0;
+	white-space: nowrap;
+}
+.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
+	float: left;
+	padding: .5em 1em;
+	text-decoration: none;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active {
+	margin-bottom: -1px;
+	padding-bottom: 1px;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
+.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
+.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
+	cursor: text;
+}
+.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
+	cursor: pointer;
+}
+.ui-tabs .ui-tabs-panel {
+	display: block;
+	border-width: 0;
+	padding: 1em 1.4em;
+	background: none;
+}
+.ui-tooltip {
+	padding: 8px;
+	position: absolute;
+	z-index: 9999;
+	max-width: 300px;
+	-webkit-box-shadow: 0 0 5px #aaa;
+	box-shadow: 0 0 5px #aaa;
+}
+body .ui-tooltip {
+	border-width: 2px;
+}
+
+/* Component containers
+----------------------------------*/
+.ui-widget {
+	font-family: Verdana,Arial,sans-serif;
+	font-size: 1.1em;
+}
+.ui-widget .ui-widget {
+	font-size: 1em;
+}
+.ui-widget input,
+.ui-widget select,
+.ui-widget textarea,
+.ui-widget button {
+	font-family: Verdana,Arial,sans-serif;
+	font-size: 1em;
+}
+.ui-widget-content {
+	border: 1px solid #aaaaaa;
+	background: #ffffff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;
+	color: #222222;
+}
+.ui-widget-content a {
+	color: #222222;
+}
+.ui-widget-header {
+	border: 1px solid #aaaaaa;
+	background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
+	color: #222222;
+	font-weight: bold;
+}
+.ui-widget-header a {
+	color: #222222;
+}
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default,
+.ui-widget-content .ui-state-default,
+.ui-widget-header .ui-state-default {
+	border: 1px solid #d3d3d3;
+	background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
+	font-weight: normal;
+	color: #555555;
+}
+.ui-state-default a,
+.ui-state-default a:link,
+.ui-state-default a:visited {
+	color: #555555;
+	text-decoration: none;
+}
+.ui-state-hover,
+.ui-widget-content .ui-state-hover,
+.ui-widget-header .ui-state-hover,
+.ui-state-focus,
+.ui-widget-content .ui-state-focus,
+.ui-widget-header .ui-state-focus {
+	border: 1px solid #999999;
+	background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
+	font-weight: normal;
+	color: #212121;
+}
+.ui-state-hover a,
+.ui-state-hover a:hover,
+.ui-state-hover a:link,
+.ui-state-hover a:visited,
+.ui-state-focus a,
+.ui-state-focus a:hover,
+.ui-state-focus a:link,
+.ui-state-focus a:visited {
+	color: #212121;
+	text-decoration: none;
+}
+.ui-state-active,
+.ui-widget-content .ui-state-active,
+.ui-widget-header .ui-state-active {
+	border: 1px solid #aaaaaa;
+	background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
+	font-weight: normal;
+	color: #212121;
+}
+.ui-state-active a,
+.ui-state-active a:link,
+.ui-state-active a:visited {
+	color: #212121;
+	text-decoration: none;
+}
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight,
+.ui-widget-content .ui-state-highlight,
+.ui-widget-header .ui-state-highlight {
+	border: 1px solid #fcefa1;
+	background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
+	color: #363636;
+}
+.ui-state-highlight a,
+.ui-widget-content .ui-state-highlight a,
+.ui-widget-header .ui-state-highlight a {
+	color: #363636;
+}
+.ui-state-error,
+.ui-widget-content .ui-state-error,
+.ui-widget-header .ui-state-error {
+	border: 1px solid #cd0a0a;
+	background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
+	color: #cd0a0a;
+}
+.ui-state-error a,
+.ui-widget-content .ui-state-error a,
+.ui-widget-header .ui-state-error a {
+	color: #cd0a0a;
+}
+.ui-state-error-text,
+.ui-widget-content .ui-state-error-text,
+.ui-widget-header .ui-state-error-text {
+	color: #cd0a0a;
+}
+.ui-priority-primary,
+.ui-widget-content .ui-priority-primary,
+.ui-widget-header .ui-priority-primary {
+	font-weight: bold;
+}
+.ui-priority-secondary,
+.ui-widget-content .ui-priority-secondary,
+.ui-widget-header .ui-priority-secondary {
+	opacity: .7;
+	filter:Alpha(Opacity=70); /* support: IE8 */
+	font-weight: normal;
+}
+.ui-state-disabled,
+.ui-widget-content .ui-state-disabled,
+.ui-widget-header .ui-state-disabled {
+	opacity: .35;
+	filter:Alpha(Opacity=35); /* support: IE8 */
+	background-image: none;
+}
+.ui-state-disabled .ui-icon {
+	filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
+}
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+	width: 16px;
+	height: 16px;
+}
+.ui-icon,
+.ui-widget-content .ui-icon {
+	background-image: url("images/ui-icons_222222_256x240.png");
+}
+.ui-widget-header .ui-icon {
+	background-image: url("images/ui-icons_222222_256x240.png");
+}
+.ui-state-default .ui-icon {
+	background-image: url("images/ui-icons_888888_256x240.png");
+}
+.ui-state-hover .ui-icon,
+.ui-state-focus .ui-icon {
+	background-image: url("images/ui-icons_454545_256x240.png");
+}
+.ui-state-active .ui-icon {
+	background-image: url("images/ui-icons_454545_256x240.png");
+}
+.ui-state-highlight .ui-icon {
+	background-image: url("images/ui-icons_2e83ff_256x240.png");
+}
+.ui-state-error .ui-icon,
+.ui-state-error-text .ui-icon {
+	background-image: url("images/ui-icons_cd0a0a_256x240.png");
+}
+
+/* positioning */
+.ui-icon-blank { background-position: 16px 16px; }
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-on { background-position: -96px -144px; }
+.ui-icon-radio-off { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all,
+.ui-corner-top,
+.ui-corner-left,
+.ui-corner-tl {
+	border-top-left-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-top,
+.ui-corner-right,
+.ui-corner-tr {
+	border-top-right-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-bottom,
+.ui-corner-left,
+.ui-corner-bl {
+	border-bottom-left-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-bottom,
+.ui-corner-right,
+.ui-corner-br {
+	border-bottom-right-radius: 4px;
+}
+
+/* Overlays */
+.ui-widget-overlay {
+	background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
+	opacity: .3;
+	filter: Alpha(Opacity=30); /* support: IE8 */
+}
+.ui-widget-shadow {
+	margin: -8px 0 0 -8px;
+	padding: 8px;
+	background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
+	opacity: .3;
+	filter: Alpha(Opacity=30); /* support: IE8 */
+	border-radius: 8px;
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/css/style.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/css/style.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/css/style.css
new file mode 100644
index 0000000..1fc8d53
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/css/style.css
@@ -0,0 +1,221 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+@import url('http://fonts.googleapis.com/css?family=Happy+Monkey');
+
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
+  margin: 0;
+  padding: 0;
+  border: 0;
+  font-size: 100%;
+  font: inherit;
+  vertical-align: baseline;
+  outline: none;
+  -webkit-font-smoothing: antialiased;
+  -webkit-text-size-adjust: 100%;
+  -ms-text-size-adjust: 100%;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+html { overflow-y: scroll; }
+body { 
+  font-size: 62.5%;
+  line-height: 1;
+  padding-bottom: 75px;
+  font-family: Helvetica, Arial, sans-serif;
+  background: #f3f3f3 url('paven.png'); /* http://subtlepatterns.com/paven/ */
+}
+
+br { display: block; line-height: 1.6em; } 
+
+article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; }
+ol, ul { list-style: none; }
+
+input, textarea { 
+  -webkit-font-smoothing: antialiased;
+  -webkit-text-size-adjust: 100%;
+  -ms-text-size-adjust: 100%;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  outline: none; 
+}
+
+blockquote, q { quotes: none; }
+blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }
+strong { font-weight: bold; } 
+
+table { border-collapse: collapse; border-spacing: 0; }
+img { border: 0; max-width: 100%; }
+
+h1 {
+  font-family: 'Happy Monkey', 'Helvetica Neue', Arial, sans-serif;
+  font-size: 3.6em;
+  line-height: 1.4em;
+  margin-bottom: 12px;
+  color: #555;
+  text-align: center;
+}
+
+label {
+  display: block;
+  font-size: 1.1em;
+  font-weight: bold;
+  margin-bottom: 4px;
+  color: #777;
+  
+}
+
+
+/* page structure */
+#w {
+  display: block;
+  width: 850px;
+  margin: 0 auto;
+}
+
+#content {
+  display: block;
+  margin-top: 30px;
+  padding: 15px 22px;
+  background: #fff;
+  -webkit-box-shadow: 1px 3px 1px rgba(0,0,0,0.4);
+  -moz-box-shadow: 1px 3px 1px rgba(0,0,0,0.4);
+  box-shadow: 1px 2px 1px rgba(0,0,0,0.4);
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+
+.formrow {
+  display: block;
+  margin-bottom: 40px;
+}
+
+
+/* form styles */
+.basictxt {
+  display: block;
+  padding: 7px 8px;
+  width: 550px;
+  color: #555;
+  font-size: 1.5em;
+  border: 1px solid #ccc;
+  font-family: Helvetica, Arial, sans-serif;
+}
+
+.basictxtarea {
+  display: block;
+  padding: 8px 10px;
+  width: 600px;
+  height: 115px;
+  color: #555;
+  font-size: 1.6em;
+  border: 1px solid #ccc;
+  margin-bottom: 14px;
+  font-family: Helvetica, Arial, sans-serif;
+}
+
+.selectize-control { width: 60%; }
+
+/* button styles: http://codepen.io/ben_jammin/pen/syaCq */
+.button::-moz-focus-inner {
+  border: 0;
+  padding: 0;
+}
+
+.button {
+  display: inline-block;
+  *display: inline;
+  zoom: 1;
+  padding: 6px 20px;
+  margin: 0;
+  cursor: pointer;
+  border: 1px solid #bbb;
+  overflow: visible;
+  font: bold 13px arial, helvetica, sans-serif;
+  text-decoration: none;
+  white-space: nowrap;
+  color: #555;
+  background-color: #ddd;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,1)), to(rgba(255,255,255,0)));
+  background-image: -webkit-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
+  background-image: -moz-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
+  background-image: -ms-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
+  background-image: -o-linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
+  background-image: linear-gradient(top, rgba(255,255,255,1), rgba(255,255,255,0));
+  -webkit-transition: background-color .2s ease-out;
+  -moz-transition: background-color .2s ease-out;
+  -ms-transition: background-color .2s ease-out;
+  -o-transition: background-color .2s ease-out;
+  transition: background-color .2s ease-out;
+  background-clip: padding-box; /* Fix bleeding */
+  -moz-border-radius: 3px;
+  -webkit-border-radius: 3px;
+  border-radius: 3px;
+  -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
+  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
+  box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
+  text-shadow: 0 1px 0 rgba(255,255,255, .9);
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+
+.button:hover {
+  background-color: #eee;
+  color: #555;
+}
+
+.button:active {
+  background: #e9e9e9;
+  position: relative;
+  top: 1px;
+  text-shadow: none;
+  -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
+  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
+  box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
+}
+
+.button[disabled], .button[disabled]:hover, .button[disabled]:active {
+  border-color: #eaeaea;
+  background: #fafafa;
+  cursor: default;
+  position: static;
+  color: #999;
+  /* Usually, !important should be avoided but here it's really needed :) */
+  -moz-box-shadow: none !important;
+  -webkit-box-shadow: none !important;
+  box-shadow: none !important;
+  text-shadow: none !important;
+}
+
+.button.large {
+  padding: 12px 30px;
+  text-transform: uppercase;
+}
+
+.button.large:active {
+  top: 2px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/gadget.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/gadget.json b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/gadget.json
new file mode 100644
index 0000000..c296b82
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/gadget.json
@@ -0,0 +1,23 @@
+{
+  "id": "Member_Details_Filter",
+  "title": "Member Details Filter",
+  "type": "gadget",
+  "thumbnail": "store://gadget/Member_Details_Filter/index.png",
+  "data": {
+    "url": "store://gadget/Member_Details_Filter/index.xml"
+  },
+  "styles": {
+    "borders": false,
+    "title": false
+  },
+  "notify": {
+    "member-details-filter": {
+      "type": "address",
+      "description": "This notifies applicationId and clusterId"
+    }
+  },
+  "cancel": {
+    "type": "boolean",
+    "description": "This notifies cancellation of state selection"
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/index.png
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/index.png b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/index.png
new file mode 100644
index 0000000..7226e02
Binary files /dev/null and b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/index.png differ

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/index.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/index.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/index.xml
new file mode 100644
index 0000000..170bbc3
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/index.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Module>
+    <ModulePrefs title="Member Details Filter" description="Member Details Filter Gadget" height="150">
+        <!-- This is used to import the pubsub-2 feature -->
+        <Require feature="pubsub-2">
+            <!-- This is used to define the channel that the publisher will use to publish messages.
+            In this case the channel has been named my-channel.
+            publish="true" needs to be set to define the gadget as a publisher gadget. -->
+            <Param name="topics">
+                <![CDATA[
+                    <Topic title="member-details-filter" name="member-details-filter" publish="true"/>
+                ]]>
+            </Param>
+        </Require>
+        <Require feature="dynamic-height"/>
+    </ModulePrefs>
+    <Content type="html">
+        <![CDATA[
+        <head>
+            <meta charset="utf-8">
+            <link href="/portal/css/bootstrap.min.css" rel="stylesheet" type="text/css">
+            <script src="/portal/js/jquery-1.10.2.js"></script>
+            <script language="javascript" type="text/javascript" src="js/member-details-filter.js"></script>
+        </head>
+        <body >
+          <form id="member-details" method="post" action="#">
+            <div class="container-fluid">
+                <div class="row">
+                    <div class="col-xs-5" id="application">
+                        <label for="application-filter">Application</label>
+                        <select id="application-filter">
+                            <option value="Select Application" disabled>Select Application</option>
+                        </select>
+                    </div>
+                    <div class="col-xs-4" id="cluster">
+                        <label for="cluster-filter">Cluster</label>
+                        <select id="cluster-filter">
+                            <option value="All Clusters" selected>All Clusters</option>
+                        </select>
+                    </div>
+                </div>
+            </div>
+          </form>
+        </body>
+        ]]>
+    </Content>
+</Module>
\ No newline at end of file


[09/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.min.js
new file mode 100644
index 0000000..0444ec4
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.min.js
@@ -0,0 +1,6332 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+!function () {
+    function n(n, t) {
+        return t > n ? -1 : n > t ? 1 : n >= t ? 0 : 0 / 0
+    }
+
+    function t(n) {
+        return null === n ? 0 / 0 : +n
+    }
+
+    function e(n) {
+        return !isNaN(n)
+    }
+
+    function r(n) {
+        return {
+            left: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) < 0 ? r = i + 1 : u = i
+                }
+                return r
+            }, right: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) > 0 ? u = i : r = i + 1
+                }
+                return r
+            }
+        }
+    }
+
+    function u(n) {
+        return n.length
+    }
+
+    function i(n) {
+        for (var t = 1; n * t % 1;)t *= 10;
+        return t
+    }
+
+    function o(n, t) {
+        for (var e in t)Object.defineProperty(n.prototype, e, {value: t[e], enumerable: !1})
+    }
+
+    function a() {
+        this._ = Object.create(null)
+    }
+
+    function c(n) {
+        return (n += "") === da || n[0] === ma ? ma + n : n
+    }
+
+    function l(n) {
+        return (n += "")[0] === ma ? n.slice(1) : n
+    }
+
+    function s(n) {
+        return c(n)in this._
+    }
+
+    function f(n) {
+        return (n = c(n))in this._ && delete this._[n]
+    }
+
+    function h() {
+        var n = [];
+        for (var t in this._)n.push(l(t));
+        return n
+    }
+
+    function g() {
+        var n = 0;
+        for (var t in this._)++n;
+        return n
+    }
+
+    function p() {
+        for (var n in this._)return !1;
+        return !0
+    }
+
+    function v() {
+        this._ = Object.create(null)
+    }
+
+    function d(n, t, e) {
+        return function () {
+            var r = e.apply(t, arguments);
+            return r === t ? n : r
+        }
+    }
+
+    function m(n, t) {
+        if (t in n)return t;
+        t = t.charAt(0).toUpperCase() + t.slice(1);
+        for (var e = 0, r = ya.length; r > e; ++e) {
+            var u = ya[e] + t;
+            if (u in n)return u
+        }
+    }
+
+    function y() {
+    }
+
+    function M() {
+    }
+
+    function x(n) {
+        function t() {
+            for (var t, r = e, u = -1, i = r.length; ++u < i;)(t = r[u].on) && t.apply(this, arguments);
+            return n
+        }
+
+        var e = [], r = new a;
+        return t.on = function (t, u) {
+            var i, o = r.get(t);
+            return arguments.length < 2 ? o && o.on : (o && (o.on = null, e = e.slice(0, i = e.indexOf(o)).concat(e.slice(i + 1)), r.remove(t)), u && e.push(r.set(t, {on: u})), n)
+        }, t
+    }
+
+    function b() {
+        ta.event.preventDefault()
+    }
+
+    function _() {
+        for (var n, t = ta.event; n = t.sourceEvent;)t = n;
+        return t
+    }
+
+    function w(n) {
+        for (var t = new M, e = 0, r = arguments.length; ++e < r;)t[arguments[e]] = x(t);
+        return t.of = function (e, r) {
+            return function (u) {
+                try {
+                    var i = u.sourceEvent = ta.event;
+                    u.target = n, ta.event = u, t[u.type].apply(e, r)
+                } finally {
+                    ta.event = i
+                }
+            }
+        }, t
+    }
+
+    function S(n) {
+        return xa(n, ka), n
+    }
+
+    function k(n) {
+        return "function" == typeof n ? n : function () {
+            return ba(n, this)
+        }
+    }
+
+    function E(n) {
+        return "function" == typeof n ? n : function () {
+            return _a(n, this)
+        }
+    }
+
+    function A(n, t) {
+        function e() {
+            this.removeAttribute(n)
+        }
+
+        function r() {
+            this.removeAttributeNS(n.space, n.local)
+        }
+
+        function u() {
+            this.setAttribute(n, t)
+        }
+
+        function i() {
+            this.setAttributeNS(n.space, n.local, t)
+        }
+
+        function o() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttribute(n) : this.setAttribute(n, e)
+        }
+
+        function a() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttributeNS(n.space, n.local) : this.setAttributeNS(n.space, n.local, e)
+        }
+
+        return n = ta.ns.qualify(n), null == t ? n.local ? r : e : "function" == typeof t ? n.local ? a : o : n.local ? i : u
+    }
+
+    function N(n) {
+        return n.trim().replace(/\s+/g, " ")
+    }
+
+    function C(n) {
+        return new RegExp("(?:^|\\s+)" + ta.requote(n) + "(?:\\s+|$)", "g")
+    }
+
+    function z(n) {
+        return (n + "").trim().split(/^|\s+/)
+    }
+
+    function q(n, t) {
+        function e() {
+            for (var e = -1; ++e < u;)n[e](this, t)
+        }
+
+        function r() {
+            for (var e = -1, r = t.apply(this, arguments); ++e < u;)n[e](this, r)
+        }
+
+        n = z(n).map(L);
+        var u = n.length;
+        return "function" == typeof t ? r : e
+    }
+
+    function L(n) {
+        var t = C(n);
+        return function (e, r) {
+            if (u = e.classList)return r ? u.add(n) : u.remove(n);
+            var u = e.getAttribute("class") || "";
+            r ? (t.lastIndex = 0, t.test(u) || e.setAttribute("class", N(u + " " + n))) : e.setAttribute("class", N(u.replace(t, " ")))
+        }
+    }
+
+    function T(n, t, e) {
+        function r() {
+            this.style.removeProperty(n)
+        }
+
+        function u() {
+            this.style.setProperty(n, t, e)
+        }
+
+        function i() {
+            var r = t.apply(this, arguments);
+            null == r ? this.style.removeProperty(n) : this.style.setProperty(n, r, e)
+        }
+
+        return null == t ? r : "function" == typeof t ? i : u
+    }
+
+    function R(n, t) {
+        function e() {
+            delete this[n]
+        }
+
+        function r() {
+            this[n] = t
+        }
+
+        function u() {
+            var e = t.apply(this, arguments);
+            null == e ? delete this[n] : this[n] = e
+        }
+
+        return null == t ? e : "function" == typeof t ? u : r
+    }
+
+    function D(n) {
+        return "function" == typeof n ? n : (n = ta.ns.qualify(n)).local ? function () {
+            return this.ownerDocument.createElementNS(n.space, n.local)
+        } : function () {
+            return this.ownerDocument.createElementNS(this.namespaceURI, n)
+        }
+    }
+
+    function P() {
+        var n = this.parentNode;
+        n && n.removeChild(this)
+    }
+
+    function U(n) {
+        return {__data__: n}
+    }
+
+    function j(n) {
+        return function () {
+            return Sa(this, n)
+        }
+    }
+
+    function F(t) {
+        return arguments.length || (t = n), function (n, e) {
+            return n && e ? t(n.__data__, e.__data__) : !n - !e
+        }
+    }
+
+    function H(n, t) {
+        for (var e = 0, r = n.length; r > e; e++)for (var u, i = n[e], o = 0, a = i.length; a > o; o++)(u = i[o]) && t(u, o, e);
+        return n
+    }
+
+    function O(n) {
+        return xa(n, Aa), n
+    }
+
+    function Y(n) {
+        var t, e;
+        return function (r, u, i) {
+            var o, a = n[i].update, c = a.length;
+            for (i != e && (e = i, t = 0), u >= t && (t = u + 1); !(o = a[t]) && ++t < c;);
+            return o
+        }
+    }
+
+    function I(n, t, e) {
+        function r() {
+            var t = this[o];
+            t && (this.removeEventListener(n, t, t.$), delete this[o])
+        }
+
+        function u() {
+            var u = c(t, ra(arguments));
+            r.call(this), this.addEventListener(n, this[o] = u, u.$ = e), u._ = t
+        }
+
+        function i() {
+            var t, e = new RegExp("^__on([^.]+)" + ta.requote(n) + "$");
+            for (var r in this)if (t = r.match(e)) {
+                var u = this[r];
+                this.removeEventListener(t[1], u, u.$), delete this[r]
+            }
+        }
+
+        var o = "__on" + n, a = n.indexOf("."), c = Z;
+        a > 0 && (n = n.slice(0, a));
+        var l = Ca.get(n);
+        return l && (n = l, c = V), a ? t ? u : r : t ? y : i
+    }
+
+    function Z(n, t) {
+        return function (e) {
+            var r = ta.event;
+            ta.event = e, t[0] = this.__data__;
+            try {
+                n.apply(this, t)
+            } finally {
+                ta.event = r
+            }
+        }
+    }
+
+    function V(n, t) {
+        var e = Z(n, t);
+        return function (n) {
+            var t = this, r = n.relatedTarget;
+            r && (r === t || 8 & r.compareDocumentPosition(t)) || e.call(t, n)
+        }
+    }
+
+    function X() {
+        var n = ".dragsuppress-" + ++qa, t = "click" + n, e = ta.select(oa).on("touchmove" + n, b).on("dragstart" + n, b).on("selectstart" + n, b);
+        if (za) {
+            var r = ia.style, u = r[za];
+            r[za] = "none"
+        }
+        return function (i) {
+            if (e.on(n, null), za && (r[za] = u), i) {
+                var o = function () {
+                    e.on(t, null)
+                };
+                e.on(t, function () {
+                    b(), o()
+                }, !0), setTimeout(o, 0)
+            }
+        }
+    }
+
+    function $(n, t) {
+        t.changedTouches && (t = t.changedTouches[0]);
+        var e = n.ownerSVGElement || n;
+        if (e.createSVGPoint) {
+            var r = e.createSVGPoint();
+            if (0 > La && (oa.scrollX || oa.scrollY)) {
+                e = ta.select("body").append("svg").style({
+                    position: "absolute",
+                    top: 0,
+                    left: 0,
+                    margin: 0,
+                    padding: 0,
+                    border: "none"
+                }, "important");
+                var u = e[0][0].getScreenCTM();
+                La = !(u.f || u.e), e.remove()
+            }
+            return La ? (r.x = t.pageX, r.y = t.pageY) : (r.x = t.clientX, r.y = t.clientY), r = r.matrixTransform(n.getScreenCTM().inverse()), [r.x, r.y]
+        }
+        var i = n.getBoundingClientRect();
+        return [t.clientX - i.left - n.clientLeft, t.clientY - i.top - n.clientTop]
+    }
+
+    function B() {
+        return ta.event.changedTouches[0].identifier
+    }
+
+    function W() {
+        return ta.event.target
+    }
+
+    function J() {
+        return oa
+    }
+
+    function G(n) {
+        return n > 0 ? 1 : 0 > n ? -1 : 0
+    }
+
+    function K(n, t, e) {
+        return (t[0] - n[0]) * (e[1] - n[1]) - (t[1] - n[1]) * (e[0] - n[0])
+    }
+
+    function Q(n) {
+        return n > 1 ? 0 : -1 > n ? Da : Math.acos(n)
+    }
+
+    function nt(n) {
+        return n > 1 ? ja : -1 > n ? -ja : Math.asin(n)
+    }
+
+    function tt(n) {
+        return ((n = Math.exp(n)) - 1 / n) / 2
+    }
+
+    function et(n) {
+        return ((n = Math.exp(n)) + 1 / n) / 2
+    }
+
+    function rt(n) {
+        return ((n = Math.exp(2 * n)) - 1) / (n + 1)
+    }
+
+    function ut(n) {
+        return (n = Math.sin(n / 2)) * n
+    }
+
+    function it() {
+    }
+
+    function ot(n, t, e) {
+        return this instanceof ot ? (this.h = +n, this.s = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof ot ? new ot(n.h, n.s, n.l) : xt("" + n, bt, ot) : new ot(n, t, e)
+    }
+
+    function at(n, t, e) {
+        function r(n) {
+            return n > 360 ? n -= 360 : 0 > n && (n += 360), 60 > n ? i + (o - i) * n / 60 : 180 > n ? o : 240 > n ? i + (o - i) * (240 - n) / 60 : i
+        }
+
+        function u(n) {
+            return Math.round(255 * r(n))
+        }
+
+        var i, o;
+        return n = isNaN(n) ? 0 : (n %= 360) < 0 ? n + 360 : n, t = isNaN(t) ? 0 : 0 > t ? 0 : t > 1 ? 1 : t, e = 0 > e ? 0 : e > 1 ? 1 : e, o = .5 >= e ? e * (1 + t) : e + t - e * t, i = 2 * e - o, new dt(u(n + 120), u(n), u(n - 120))
+    }
+
+    function ct(n, t, e) {
+        return this instanceof ct ? (this.h = +n, this.c = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof ct ? new ct(n.h, n.c, n.l) : n instanceof st ? ht(n.l, n.a, n.b) : ht((n = _t((n = ta.rgb(n)).r, n.g, n.b)).l, n.a, n.b) : new ct(n, t, e)
+    }
+
+    function lt(n, t, e) {
+        return isNaN(n) && (n = 0), isNaN(t) && (t = 0), new st(e, Math.cos(n *= Fa) * t, Math.sin(n) * t)
+    }
+
+    function st(n, t, e) {
+        return this instanceof st ? (this.l = +n, this.a = +t, void(this.b = +e)) : arguments.length < 2 ? n instanceof st ? new st(n.l, n.a, n.b) : n instanceof ct ? lt(n.h, n.c, n.l) : _t((n = dt(n)).r, n.g, n.b) : new st(n, t, e)
+    }
+
+    function ft(n, t, e) {
+        var r = (n + 16) / 116, u = r + t / 500, i = r - e / 200;
+        return u = gt(u) * Ja, r = gt(r) * Ga, i = gt(i) * Ka, new dt(vt(3.2404542 * u - 1.5371385 * r - .4985314 * i), vt(-.969266 * u + 1.8760108 * r + .041556 * i), vt(.0556434 * u - .2040259 * r + 1.0572252 * i))
+    }
+
+    function ht(n, t, e) {
+        return n > 0 ? new ct(Math.atan2(e, t) * Ha, Math.sqrt(t * t + e * e), n) : new ct(0 / 0, 0 / 0, n)
+    }
+
+    function gt(n) {
+        return n > .206893034 ? n * n * n : (n - 4 / 29) / 7.787037
+    }
+
+    function pt(n) {
+        return n > .008856 ? Math.pow(n, 1 / 3) : 7.787037 * n + 4 / 29
+    }
+
+    function vt(n) {
+        return Math.round(255 * (.00304 >= n ? 12.92 * n : 1.055 * Math.pow(n, 1 / 2.4) - .055))
+    }
+
+    function dt(n, t, e) {
+        return this instanceof dt ? (this.r = ~~n, this.g = ~~t, void(this.b = ~~e)) : arguments.length < 2 ? n instanceof dt ? new dt(n.r, n.g, n.b) : xt("" + n, dt, at) : new dt(n, t, e)
+    }
+
+    function mt(n) {
+        return new dt(n >> 16, 255 & n >> 8, 255 & n)
+    }
+
+    function yt(n) {
+        return mt(n) + ""
+    }
+
+    function Mt(n) {
+        return 16 > n ? "0" + Math.max(0, n).toString(16) : Math.min(255, n).toString(16)
+    }
+
+    function xt(n, t, e) {
+        var r, u, i, o = 0, a = 0, c = 0;
+        if (r = /([a-z]+)\((.*)\)/i.exec(n))switch (u = r[2].split(","), r[1]) {
+            case"hsl":
+                return e(parseFloat(u[0]), parseFloat(u[1]) / 100, parseFloat(u[2]) / 100);
+            case"rgb":
+                return t(St(u[0]), St(u[1]), St(u[2]))
+        }
+        return (i = tc.get(n)) ? t(i.r, i.g, i.b) : (null == n || "#" !== n.charAt(0) || isNaN(i = parseInt(n.slice(1), 16)) || (4 === n.length ? (o = (3840 & i) >> 4, o = o >> 4 | o, a = 240 & i, a = a >> 4 | a, c = 15 & i, c = c << 4 | c) : 7 === n.length && (o = (16711680 & i) >> 16, a = (65280 & i) >> 8, c = 255 & i)), t(o, a, c))
+    }
+
+    function bt(n, t, e) {
+        var r, u, i = Math.min(n /= 255, t /= 255, e /= 255), o = Math.max(n, t, e), a = o - i, c = (o + i) / 2;
+        return a ? (u = .5 > c ? a / (o + i) : a / (2 - o - i), r = n == o ? (t - e) / a + (e > t ? 6 : 0) : t == o ? (e - n) / a + 2 : (n - t) / a + 4, r *= 60) : (r = 0 / 0, u = c > 0 && 1 > c ? 0 : r), new ot(r, u, c)
+    }
+
+    function _t(n, t, e) {
+        n = wt(n), t = wt(t), e = wt(e);
+        var r = pt((.4124564 * n + .3575761 * t + .1804375 * e) / Ja), u = pt((.2126729 * n + .7151522 * t + .072175 * e) / Ga), i = pt((.0193339 * n + .119192 * t + .9503041 * e) / Ka);
+        return st(116 * u - 16, 500 * (r - u), 200 * (u - i))
+    }
+
+    function wt(n) {
+        return (n /= 255) <= .04045 ? n / 12.92 : Math.pow((n + .055) / 1.055, 2.4)
+    }
+
+    function St(n) {
+        var t = parseFloat(n);
+        return "%" === n.charAt(n.length - 1) ? Math.round(2.55 * t) : t
+    }
+
+    function kt(n) {
+        return "function" == typeof n ? n : function () {
+            return n
+        }
+    }
+
+    function Et(n) {
+        return n
+    }
+
+    function At(n) {
+        return function (t, e, r) {
+            return 2 === arguments.length && "function" == typeof e && (r = e, e = null), Nt(t, e, n, r)
+        }
+    }
+
+    function Nt(n, t, e, r) {
+        function u() {
+            var n, t = c.status;
+            if (!t && zt(c) || t >= 200 && 300 > t || 304 === t) {
+                try {
+                    n = e.call(i, c)
+                } catch (r) {
+                    return o.error.call(i, r), void 0
+                }
+                o.load.call(i, n)
+            } else o.error.call(i, c)
+        }
+
+        var i = {}, o = ta.dispatch("beforesend", "progress", "load", "error"), a = {}, c = new XMLHttpRequest, l = null;
+        return !oa.XDomainRequest || "withCredentials"in c || !/^(http(s)?:)?\/\//.test(n) || (c = new XDomainRequest), "onload"in c ? c.onload = c.onerror = u : c.onreadystatechange = function () {
+            c.readyState > 3 && u()
+        }, c.onprogress = function (n) {
+            var t = ta.event;
+            ta.event = n;
+            try {
+                o.progress.call(i, c)
+            } finally {
+                ta.event = t
+            }
+        }, i.header = function (n, t) {
+            return n = (n + "").toLowerCase(), arguments.length < 2 ? a[n] : (null == t ? delete a[n] : a[n] = t + "", i)
+        }, i.mimeType = function (n) {
+            return arguments.length ? (t = null == n ? null : n + "", i) : t
+        }, i.responseType = function (n) {
+            return arguments.length ? (l = n, i) : l
+        }, i.response = function (n) {
+            return e = n, i
+        }, ["get", "post"].forEach(function (n) {
+            i[n] = function () {
+                return i.send.apply(i, [n].concat(ra(arguments)))
+            }
+        }), i.send = function (e, r, u) {
+            if (2 === arguments.length && "function" == typeof r && (u = r, r = null), c.open(e, n, !0), null == t || "accept"in a || (a.accept = t + ",*/*"), c.setRequestHeader)for (var s in a)c.setRequestHeader(s, a[s]);
+            return null != t && c.overrideMimeType && c.overrideMimeType(t), null != l && (c.responseType = l), null != u && i.on("error", u).on("load", function (n) {
+                u(null, n)
+            }), o.beforesend.call(i, c), c.send(null == r ? null : r), i
+        }, i.abort = function () {
+            return c.abort(), i
+        }, ta.rebind(i, o, "on"), null == r ? i : i.get(Ct(r))
+    }
+
+    function Ct(n) {
+        return 1 === n.length ? function (t, e) {
+            n(null == t ? e : null)
+        } : n
+    }
+
+    function zt(n) {
+        var t = n.responseType;
+        return t && "text" !== t ? n.response : n.responseText
+    }
+
+    function qt() {
+        var n = Lt(), t = Tt() - n;
+        t > 24 ? (isFinite(t) && (clearTimeout(ic), ic = setTimeout(qt, t)), uc = 0) : (uc = 1, ac(qt))
+    }
+
+    function Lt() {
+        var n = Date.now();
+        for (oc = ec; oc;)n >= oc.t && (oc.f = oc.c(n - oc.t)), oc = oc.n;
+        return n
+    }
+
+    function Tt() {
+        for (var n, t = ec, e = 1 / 0; t;)t.f ? t = n ? n.n = t.n : ec = t.n : (t.t < e && (e = t.t), t = (n = t).n);
+        return rc = n, e
+    }
+
+    function Rt(n, t) {
+        return t - (n ? Math.ceil(Math.log(n) / Math.LN10) : 1)
+    }
+
+    function Dt(n, t) {
+        var e = Math.pow(10, 3 * va(8 - t));
+        return {
+            scale: t > 8 ? function (n) {
+                return n / e
+            } : function (n) {
+                return n * e
+            }, symbol: n
+        }
+    }
+
+    function Pt(n) {
+        var t = n.decimal, e = n.thousands, r = n.grouping, u = n.currency, i = r && e ? function (n, t) {
+            for (var u = n.length, i = [], o = 0, a = r[0], c = 0; u > 0 && a > 0 && (c + a + 1 > t && (a = Math.max(1, t - c)), i.push(n.substring(u -= a, u + a)), !((c += a + 1) > t));)a = r[o = (o + 1) % r.length];
+            return i.reverse().join(e)
+        } : Et;
+        return function (n) {
+            var e = lc.exec(n), r = e[1] || " ", o = e[2] || ">", a = e[3] || "-", c = e[4] || "", l = e[5], s = +e[6], f = e[7], h = e[8], g = e[9], p = 1, v = "", d = "", m = !1, y = !0;
+            switch (h && (h = +h.substring(1)), (l || "0" === r && "=" === o) && (l = r = "0", o = "="), g) {
+                case"n":
+                    f = !0, g = "g";
+                    break;
+                case"%":
+                    p = 100, d = "%", g = "f";
+                    break;
+                case"p":
+                    p = 100, d = "%", g = "r";
+                    break;
+                case"b":
+                case"o":
+                case"x":
+                case"X":
+                    "#" === c && (v = "0" + g.toLowerCase());
+                case"c":
+                    y = !1;
+                case"d":
+                    m = !0, h = 0;
+                    break;
+                case"s":
+                    p = -1, g = "r"
+            }
+            "$" === c && (v = u[0], d = u[1]), "r" != g || h || (g = "g"), null != h && ("g" == g ? h = Math.max(1, Math.min(21, h)) : ("e" == g || "f" == g) && (h = Math.max(0, Math.min(20, h)))), g = sc.get(g) || Ut;
+            var M = l && f;
+            return function (n) {
+                var e = d;
+                if (m && n % 1)return "";
+                var u = 0 > n || 0 === n && 0 > 1 / n ? (n = -n, "-") : "-" === a ? "" : a;
+                if (0 > p) {
+                    var c = ta.formatPrefix(n, h);
+                    n = c.scale(n), e = c.symbol + d
+                } else n *= p;
+                n = g(n, h);
+                var x, b, _ = n.lastIndexOf(".");
+                if (0 > _) {
+                    var w = y ? n.lastIndexOf("e") : -1;
+                    0 > w ? (x = n, b = "") : (x = n.substring(0, w), b = n.substring(w))
+                } else x = n.substring(0, _), b = t + n.substring(_ + 1);
+                !l && f && (x = i(x, 1 / 0));
+                var S = v.length + x.length + b.length + (M ? 0 : u.length), k = s > S ? new Array(S = s - S + 1).join(r) : "";
+                return M && (x = i(k + x, k.length ? s - b.length : 1 / 0)), u += v, n = x + b, ("<" === o ? u + n + k : ">" === o ? k + u + n : "^" === o ? k.substring(0, S >>= 1) + u + n + k.substring(S) : u + (M ? n : k + n)) + e
+            }
+        }
+    }
+
+    function Ut(n) {
+        return n + ""
+    }
+
+    function jt() {
+        this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0])
+    }
+
+    function Ft(n, t, e) {
+        function r(t) {
+            var e = n(t), r = i(e, 1);
+            return r - t > t - e ? e : r
+        }
+
+        function u(e) {
+            return t(e = n(new hc(e - 1)), 1), e
+        }
+
+        function i(n, e) {
+            return t(n = new hc(+n), e), n
+        }
+
+        function o(n, r, i) {
+            var o = u(n), a = [];
+            if (i > 1)for (; r > o;)e(o) % i || a.push(new Date(+o)), t(o, 1); else for (; r > o;)a.push(new Date(+o)), t(o, 1);
+            return a
+        }
+
+        function a(n, t, e) {
+            try {
+                hc = jt;
+                var r = new jt;
+                return r._ = n, o(r, t, e)
+            } finally {
+                hc = Date
+            }
+        }
+
+        n.floor = n, n.round = r, n.ceil = u, n.offset = i, n.range = o;
+        var c = n.utc = Ht(n);
+        return c.floor = c, c.round = Ht(r), c.ceil = Ht(u), c.offset = Ht(i), c.range = a, n
+    }
+
+    function Ht(n) {
+        return function (t, e) {
+            try {
+                hc = jt;
+                var r = new jt;
+                return r._ = t, n(r, e)._
+            } finally {
+                hc = Date
+            }
+        }
+    }
+
+    function Ot(n) {
+        function t(n) {
+            function t(t) {
+                for (var e, u, i, o = [], a = -1, c = 0; ++a < r;)37 === n.charCodeAt(a) && (o.push(n.slice(c, a)), null != (u = pc[e = n.charAt(++a)]) && (e = n.charAt(++a)), (i = N[e]) && (e = i(t, null == u ? "e" === e ? " " : "0" : u)), o.push(e), c = a + 1);
+                return o.push(n.slice(c, a)), o.join("")
+            }
+
+            var r = n.length;
+            return t.parse = function (t) {
+                var r = {y: 1900, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0, Z: null}, u = e(r, n, t, 0);
+                if (u != t.length)return null;
+                "p"in r && (r.H = r.H % 12 + 12 * r.p);
+                var i = null != r.Z && hc !== jt, o = new (i ? jt : hc);
+                return "j"in r ? o.setFullYear(r.y, 0, r.j) : "w"in r && ("W"in r || "U"in r) ? (o.setFullYear(r.y, 0, 1), o.setFullYear(r.y, 0, "W"in r ? (r.w + 6) % 7 + 7 * r.W - (o.getDay() + 5) % 7 : r.w + 7 * r.U - (o.getDay() + 6) % 7)) : o.setFullYear(r.y, r.m, r.d), o.setHours(r.H + (0 | r.Z / 100), r.M + r.Z % 100, r.S, r.L), i ? o._ : o
+            }, t.toString = function () {
+                return n
+            }, t
+        }
+
+        function e(n, t, e, r) {
+            for (var u, i, o, a = 0, c = t.length, l = e.length; c > a;) {
+                if (r >= l)return -1;
+                if (u = t.charCodeAt(a++), 37 === u) {
+                    if (o = t.charAt(a++), i = C[o in pc ? t.charAt(a++) : o], !i || (r = i(n, e, r)) < 0)return -1
+                } else if (u != e.charCodeAt(r++))return -1
+            }
+            return r
+        }
+
+        function r(n, t, e) {
+            _.lastIndex = 0;
+            var r = _.exec(t.slice(e));
+            return r ? (n.w = w.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function u(n, t, e) {
+            x.lastIndex = 0;
+            var r = x.exec(t.slice(e));
+            return r ? (n.w = b.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function i(n, t, e) {
+            E.lastIndex = 0;
+            var r = E.exec(t.slice(e));
+            return r ? (n.m = A.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function o(n, t, e) {
+            S.lastIndex = 0;
+            var r = S.exec(t.slice(e));
+            return r ? (n.m = k.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function a(n, t, r) {
+            return e(n, N.c.toString(), t, r)
+        }
+
+        function c(n, t, r) {
+            return e(n, N.x.toString(), t, r)
+        }
+
+        function l(n, t, r) {
+            return e(n, N.X.toString(), t, r)
+        }
+
+        function s(n, t, e) {
+            var r = M.get(t.slice(e, e += 2).toLowerCase());
+            return null == r ? -1 : (n.p = r, e)
+        }
+
+        var f = n.dateTime, h = n.date, g = n.time, p = n.periods, v = n.days, d = n.shortDays, m = n.months, y = n.shortMonths;
+        t.utc = function (n) {
+            function e(n) {
+                try {
+                    hc = jt;
+                    var t = new hc;
+                    return t._ = n, r(t)
+                } finally {
+                    hc = Date
+                }
+            }
+
+            var r = t(n);
+            return e.parse = function (n) {
+                try {
+                    hc = jt;
+                    var t = r.parse(n);
+                    return t && t._
+                } finally {
+                    hc = Date
+                }
+            }, e.toString = r.toString, e
+        }, t.multi = t.utc.multi = ae;
+        var M = ta.map(), x = It(v), b = Zt(v), _ = It(d), w = Zt(d), S = It(m), k = Zt(m), E = It(y), A = Zt(y);
+        p.forEach(function (n, t) {
+            M.set(n.toLowerCase(), t)
+        });
+        var N = {
+            a: function (n) {
+                return d[n.getDay()]
+            }, A: function (n) {
+                return v[n.getDay()]
+            }, b: function (n) {
+                return y[n.getMonth()]
+            }, B: function (n) {
+                return m[n.getMonth()]
+            }, c: t(f), d: function (n, t) {
+                return Yt(n.getDate(), t, 2)
+            }, e: function (n, t) {
+                return Yt(n.getDate(), t, 2)
+            }, H: function (n, t) {
+                return Yt(n.getHours(), t, 2)
+            }, I: function (n, t) {
+                return Yt(n.getHours() % 12 || 12, t, 2)
+            }, j: function (n, t) {
+                return Yt(1 + fc.dayOfYear(n), t, 3)
+            }, L: function (n, t) {
+                return Yt(n.getMilliseconds(), t, 3)
+            }, m: function (n, t) {
+                return Yt(n.getMonth() + 1, t, 2)
+            }, M: function (n, t) {
+                return Yt(n.getMinutes(), t, 2)
+            }, p: function (n) {
+                return p[+(n.getHours() >= 12)]
+            }, S: function (n, t) {
+                return Yt(n.getSeconds(), t, 2)
+            }, U: function (n, t) {
+                return Yt(fc.sundayOfYear(n), t, 2)
+            }, w: function (n) {
+                return n.getDay()
+            }, W: function (n, t) {
+                return Yt(fc.mondayOfYear(n), t, 2)
+            }, x: t(h), X: t(g), y: function (n, t) {
+                return Yt(n.getFullYear() % 100, t, 2)
+            }, Y: function (n, t) {
+                return Yt(n.getFullYear() % 1e4, t, 4)
+            }, Z: ie, "%": function () {
+                return "%"
+            }
+        }, C = {
+            a: r,
+            A: u,
+            b: i,
+            B: o,
+            c: a,
+            d: Qt,
+            e: Qt,
+            H: te,
+            I: te,
+            j: ne,
+            L: ue,
+            m: Kt,
+            M: ee,
+            p: s,
+            S: re,
+            U: Xt,
+            w: Vt,
+            W: $t,
+            x: c,
+            X: l,
+            y: Wt,
+            Y: Bt,
+            Z: Jt,
+            "%": oe
+        };
+        return t
+    }
+
+    function Yt(n, t, e) {
+        var r = 0 > n ? "-" : "", u = (r ? -n : n) + "", i = u.length;
+        return r + (e > i ? new Array(e - i + 1).join(t) + u : u)
+    }
+
+    function It(n) {
+        return new RegExp("^(?:" + n.map(ta.requote).join("|") + ")", "i")
+    }
+
+    function Zt(n) {
+        for (var t = new a, e = -1, r = n.length; ++e < r;)t.set(n[e].toLowerCase(), e);
+        return t
+    }
+
+    function Vt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 1));
+        return r ? (n.w = +r[0], e + r[0].length) : -1
+    }
+
+    function Xt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e));
+        return r ? (n.U = +r[0], e + r[0].length) : -1
+    }
+
+    function $t(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e));
+        return r ? (n.W = +r[0], e + r[0].length) : -1
+    }
+
+    function Bt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 4));
+        return r ? (n.y = +r[0], e + r[0].length) : -1
+    }
+
+    function Wt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.y = Gt(+r[0]), e + r[0].length) : -1
+    }
+
+    function Jt(n, t, e) {
+        return /^[+-]\d{4}$/.test(t = t.slice(e, e + 5)) ? (n.Z = -t, e + 5) : -1
+    }
+
+    function Gt(n) {
+        return n + (n > 68 ? 1900 : 2e3)
+    }
+
+    function Kt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.m = r[0] - 1, e + r[0].length) : -1
+    }
+
+    function Qt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.d = +r[0], e + r[0].length) : -1
+    }
+
+    function ne(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 3));
+        return r ? (n.j = +r[0], e + r[0].length) : -1
+    }
+
+    function te(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.H = +r[0], e + r[0].length) : -1
+    }
+
+    function ee(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.M = +r[0], e + r[0].length) : -1
+    }
+
+    function re(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.S = +r[0], e + r[0].length) : -1
+    }
+
+    function ue(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 3));
+        return r ? (n.L = +r[0], e + r[0].length) : -1
+    }
+
+    function ie(n) {
+        var t = n.getTimezoneOffset(), e = t > 0 ? "-" : "+", r = 0 | va(t) / 60, u = va(t) % 60;
+        return e + Yt(r, "0", 2) + Yt(u, "0", 2)
+    }
+
+    function oe(n, t, e) {
+        dc.lastIndex = 0;
+        var r = dc.exec(t.slice(e, e + 1));
+        return r ? e + r[0].length : -1
+    }
+
+    function ae(n) {
+        for (var t = n.length, e = -1; ++e < t;)n[e][0] = this(n[e][0]);
+        return function (t) {
+            for (var e = 0, r = n[e]; !r[1](t);)r = n[++e];
+            return r[0](t)
+        }
+    }
+
+    function ce() {
+    }
+
+    function le(n, t, e) {
+        var r = e.s = n + t, u = r - n, i = r - u;
+        e.t = n - i + (t - u)
+    }
+
+    function se(n, t) {
+        n && xc.hasOwnProperty(n.type) && xc[n.type](n, t)
+    }
+
+    function fe(n, t, e) {
+        var r, u = -1, i = n.length - e;
+        for (t.lineStart(); ++u < i;)r = n[u], t.point(r[0], r[1], r[2]);
+        t.lineEnd()
+    }
+
+    function he(n, t) {
+        var e = -1, r = n.length;
+        for (t.polygonStart(); ++e < r;)fe(n[e], t, 1);
+        t.polygonEnd()
+    }
+
+    function ge() {
+        function n(n, t) {
+            n *= Fa, t = t * Fa / 2 + Da / 4;
+            var e = n - r, o = e >= 0 ? 1 : -1, a = o * e, c = Math.cos(t), l = Math.sin(t), s = i * l, f = u * c + s * Math.cos(a), h = s * o * Math.sin(a);
+            _c.add(Math.atan2(h, f)), r = n, u = c, i = l
+        }
+
+        var t, e, r, u, i;
+        wc.point = function (o, a) {
+            wc.point = n, r = (t = o) * Fa, u = Math.cos(a = (e = a) * Fa / 2 + Da / 4), i = Math.sin(a)
+        }, wc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function pe(n) {
+        var t = n[0], e = n[1], r = Math.cos(e);
+        return [r * Math.cos(t), r * Math.sin(t), Math.sin(e)]
+    }
+
+    function ve(n, t) {
+        return n[0] * t[0] + n[1] * t[1] + n[2] * t[2]
+    }
+
+    function de(n, t) {
+        return [n[1] * t[2] - n[2] * t[1], n[2] * t[0] - n[0] * t[2], n[0] * t[1] - n[1] * t[0]]
+    }
+
+    function me(n, t) {
+        n[0] += t[0], n[1] += t[1], n[2] += t[2]
+    }
+
+    function ye(n, t) {
+        return [n[0] * t, n[1] * t, n[2] * t]
+    }
+
+    function Me(n) {
+        var t = Math.sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
+        n[0] /= t, n[1] /= t, n[2] /= t
+    }
+
+    function xe(n) {
+        return [Math.atan2(n[1], n[0]), nt(n[2])]
+    }
+
+    function be(n, t) {
+        return va(n[0] - t[0]) < Ta && va(n[1] - t[1]) < Ta
+    }
+
+    function _e(n, t) {
+        n *= Fa;
+        var e = Math.cos(t *= Fa);
+        we(e * Math.cos(n), e * Math.sin(n), Math.sin(t))
+    }
+
+    function we(n, t, e) {
+        ++Sc, Ec += (n - Ec) / Sc, Ac += (t - Ac) / Sc, Nc += (e - Nc) / Sc
+    }
+
+    function Se() {
+        function n(n, u) {
+            n *= Fa;
+            var i = Math.cos(u *= Fa), o = i * Math.cos(n), a = i * Math.sin(n), c = Math.sin(u), l = Math.atan2(Math.sqrt((l = e * c - r * a) * l + (l = r * o - t * c) * l + (l = t * a - e * o) * l), t * o + e * a + r * c);
+            kc += l, Cc += l * (t + (t = o)), zc += l * (e + (e = a)), qc += l * (r + (r = c)), we(t, e, r)
+        }
+
+        var t, e, r;
+        Dc.point = function (u, i) {
+            u *= Fa;
+            var o = Math.cos(i *= Fa);
+            t = o * Math.cos(u), e = o * Math.sin(u), r = Math.sin(i), Dc.point = n, we(t, e, r)
+        }
+    }
+
+    function ke() {
+        Dc.point = _e
+    }
+
+    function Ee() {
+        function n(n, t) {
+            n *= Fa;
+            var e = Math.cos(t *= Fa), o = e * Math.cos(n), a = e * Math.sin(n), c = Math.sin(t), l = u * c - i * a, s = i * o - r * c, f = r * a - u * o, h = Math.sqrt(l * l + s * s + f * f), g = r * o + u * a + i * c, p = h && -Q(g) / h, v = Math.atan2(h, g);
+            Lc += p * l, Tc += p * s, Rc += p * f, kc += v, Cc += v * (r + (r = o)), zc += v * (u + (u = a)), qc += v * (i + (i = c)), we(r, u, i)
+        }
+
+        var t, e, r, u, i;
+        Dc.point = function (o, a) {
+            t = o, e = a, Dc.point = n, o *= Fa;
+            var c = Math.cos(a *= Fa);
+            r = c * Math.cos(o), u = c * Math.sin(o), i = Math.sin(a), we(r, u, i)
+        }, Dc.lineEnd = function () {
+            n(t, e), Dc.lineEnd = ke, Dc.point = _e
+        }
+    }
+
+    function Ae(n, t) {
+        function e(e, r) {
+            return e = n(e, r), t(e[0], e[1])
+        }
+
+        return n.invert && t.invert && (e.invert = function (e, r) {
+            return e = t.invert(e, r), e && n.invert(e[0], e[1])
+        }), e
+    }
+
+    function Ne() {
+        return !0
+    }
+
+    function Ce(n, t, e, r, u) {
+        var i = [], o = [];
+        if (n.forEach(function (n) {
+                if (!((t = n.length - 1) <= 0)) {
+                    var t, e = n[0], r = n[t];
+                    if (be(e, r)) {
+                        u.lineStart();
+                        for (var a = 0; t > a; ++a)u.point((e = n[a])[0], e[1]);
+                        return u.lineEnd(), void 0
+                    }
+                    var c = new qe(e, n, null, !0), l = new qe(e, null, c, !1);
+                    c.o = l, i.push(c), o.push(l), c = new qe(r, n, null, !1), l = new qe(r, null, c, !0), c.o = l, i.push(c), o.push(l)
+                }
+            }), o.sort(t), ze(i), ze(o), i.length) {
+            for (var a = 0, c = e, l = o.length; l > a; ++a)o[a].e = c = !c;
+            for (var s, f, h = i[0]; ;) {
+                for (var g = h, p = !0; g.v;)if ((g = g.n) === h)return;
+                s = g.z, u.lineStart();
+                do {
+                    if (g.v = g.o.v = !0, g.e) {
+                        if (p)for (var a = 0, l = s.length; l > a; ++a)u.point((f = s[a])[0], f[1]); else r(g.x, g.n.x, 1, u);
+                        g = g.n
+                    } else {
+                        if (p) {
+                            s = g.p.z;
+                            for (var a = s.length - 1; a >= 0; --a)u.point((f = s[a])[0], f[1])
+                        } else r(g.x, g.p.x, -1, u);
+                        g = g.p
+                    }
+                    g = g.o, s = g.z, p = !p
+                } while (!g.v);
+                u.lineEnd()
+            }
+        }
+    }
+
+    function ze(n) {
+        if (t = n.length) {
+            for (var t, e, r = 0, u = n[0]; ++r < t;)u.n = e = n[r], e.p = u, u = e;
+            u.n = e = n[0], e.p = u
+        }
+    }
+
+    function qe(n, t, e, r) {
+        this.x = n, this.z = t, this.o = e, this.e = r, this.v = !1, this.n = this.p = null
+    }
+
+    function Le(n, t, e, r) {
+        return function (u, i) {
+            function o(t, e) {
+                var r = u(t, e);
+                n(t = r[0], e = r[1]) && i.point(t, e)
+            }
+
+            function a(n, t) {
+                var e = u(n, t);
+                d.point(e[0], e[1])
+            }
+
+            function c() {
+                y.point = a, d.lineStart()
+            }
+
+            function l() {
+                y.point = o, d.lineEnd()
+            }
+
+            function s(n, t) {
+                v.push([n, t]);
+                var e = u(n, t);
+                x.point(e[0], e[1])
+            }
+
+            function f() {
+                x.lineStart(), v = []
+            }
+
+            function h() {
+                s(v[0][0], v[0][1]), x.lineEnd();
+                var n, t = x.clean(), e = M.buffer(), r = e.length;
+                if (v.pop(), p.push(v), v = null, r)if (1 & t) {
+                    n = e[0];
+                    var u, r = n.length - 1, o = -1;
+                    if (r > 0) {
+                        for (b || (i.polygonStart(), b = !0), i.lineStart(); ++o < r;)i.point((u = n[o])[0], u[1]);
+                        i.lineEnd()
+                    }
+                } else r > 1 && 2 & t && e.push(e.pop().concat(e.shift())), g.push(e.filter(Te))
+            }
+
+            var g, p, v, d = t(i), m = u.invert(r[0], r[1]), y = {
+                point: o,
+                lineStart: c,
+                lineEnd: l,
+                polygonStart: function () {
+                    y.point = s, y.lineStart = f, y.lineEnd = h, g = [], p = []
+                },
+                polygonEnd: function () {
+                    y.point = o, y.lineStart = c, y.lineEnd = l, g = ta.merge(g);
+                    var n = Fe(m, p);
+                    g.length ? (b || (i.polygonStart(), b = !0), Ce(g, De, n, e, i)) : n && (b || (i.polygonStart(), b = !0), i.lineStart(), e(null, null, 1, i), i.lineEnd()), b && (i.polygonEnd(), b = !1), g = p = null
+                },
+                sphere: function () {
+                    i.polygonStart(), i.lineStart(), e(null, null, 1, i), i.lineEnd(), i.polygonEnd()
+                }
+            }, M = Re(), x = t(M), b = !1;
+            return y
+        }
+    }
+
+    function Te(n) {
+        return n.length > 1
+    }
+
+    function Re() {
+        var n, t = [];
+        return {
+            lineStart: function () {
+                t.push(n = [])
+            }, point: function (t, e) {
+                n.push([t, e])
+            }, lineEnd: y, buffer: function () {
+                var e = t;
+                return t = [], n = null, e
+            }, rejoin: function () {
+                t.length > 1 && t.push(t.pop().concat(t.shift()))
+            }
+        }
+    }
+
+    function De(n, t) {
+        return ((n = n.x)[0] < 0 ? n[1] - ja - Ta : ja - n[1]) - ((t = t.x)[0] < 0 ? t[1] - ja - Ta : ja - t[1])
+    }
+
+    function Pe(n) {
+        var t, e = 0 / 0, r = 0 / 0, u = 0 / 0;
+        return {
+            lineStart: function () {
+                n.lineStart(), t = 1
+            }, point: function (i, o) {
+                var a = i > 0 ? Da : -Da, c = va(i - e);
+                va(c - Da) < Ta ? (n.point(e, r = (r + o) / 2 > 0 ? ja : -ja), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), n.point(i, r), t = 0) : u !== a && c >= Da && (va(e - u) < Ta && (e -= u * Ta), va(i - a) < Ta && (i -= a * Ta), r = Ue(e, r, i, o), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), t = 0), n.point(e = i, r = o), u = a
+            }, lineEnd: function () {
+                n.lineEnd(), e = r = 0 / 0
+            }, clean: function () {
+                return 2 - t
+            }
+        }
+    }
+
+    function Ue(n, t, e, r) {
+        var u, i, o = Math.sin(n - e);
+        return va(o) > Ta ? Math.atan((Math.sin(t) * (i = Math.cos(r)) * Math.sin(e) - Math.sin(r) * (u = Math.cos(t)) * Math.sin(n)) / (u * i * o)) : (t + r) / 2
+    }
+
+    function je(n, t, e, r) {
+        var u;
+        if (null == n)u = e * ja, r.point(-Da, u), r.point(0, u), r.point(Da, u), r.point(Da, 0), r.point(Da, -u), r.point(0, -u), r.point(-Da, -u), r.point(-Da, 0), r.point(-Da, u); else if (va(n[0] - t[0]) > Ta) {
+            var i = n[0] < t[0] ? Da : -Da;
+            u = e * i / 2, r.point(-i, u), r.point(0, u), r.point(i, u)
+        } else r.point(t[0], t[1])
+    }
+
+    function Fe(n, t) {
+        var e = n[0], r = n[1], u = [Math.sin(e), -Math.cos(e), 0], i = 0, o = 0;
+        _c.reset();
+        for (var a = 0, c = t.length; c > a; ++a) {
+            var l = t[a], s = l.length;
+            if (s)for (var f = l[0], h = f[0], g = f[1] / 2 + Da / 4, p = Math.sin(g), v = Math.cos(g), d = 1; ;) {
+                d === s && (d = 0), n = l[d];
+                var m = n[0], y = n[1] / 2 + Da / 4, M = Math.sin(y), x = Math.cos(y), b = m - h, _ = b >= 0 ? 1 : -1, w = _ * b, S = w > Da, k = p * M;
+                if (_c.add(Math.atan2(k * _ * Math.sin(w), v * x + k * Math.cos(w))), i += S ? b + _ * Pa : b, S ^ h >= e ^ m >= e) {
+                    var E = de(pe(f), pe(n));
+                    Me(E);
+                    var A = de(u, E);
+                    Me(A);
+                    var N = (S ^ b >= 0 ? -1 : 1) * nt(A[2]);
+                    (r > N || r === N && (E[0] || E[1])) && (o += S ^ b >= 0 ? 1 : -1)
+                }
+                if (!d++)break;
+                h = m, p = M, v = x, f = n
+            }
+        }
+        return (-Ta > i || Ta > i && 0 > _c) ^ 1 & o
+    }
+
+    function He(n) {
+        function t(n, t) {
+            return Math.cos(n) * Math.cos(t) > i
+        }
+
+        function e(n) {
+            var e, i, c, l, s;
+            return {
+                lineStart: function () {
+                    l = c = !1, s = 1
+                }, point: function (f, h) {
+                    var g, p = [f, h], v = t(f, h), d = o ? v ? 0 : u(f, h) : v ? u(f + (0 > f ? Da : -Da), h) : 0;
+                    if (!e && (l = c = v) && n.lineStart(), v !== c && (g = r(e, p), (be(e, g) || be(p, g)) && (p[0] += Ta, p[1] += Ta, v = t(p[0], p[1]))), v !== c)s = 0, v ? (n.lineStart(), g = r(p, e), n.point(g[0], g[1])) : (g = r(e, p), n.point(g[0], g[1]), n.lineEnd()), e = g; else if (a && e && o ^ v) {
+                        var m;
+                        d & i || !(m = r(p, e, !0)) || (s = 0, o ? (n.lineStart(), n.point(m[0][0], m[0][1]), n.point(m[1][0], m[1][1]), n.lineEnd()) : (n.point(m[1][0], m[1][1]), n.lineEnd(), n.lineStart(), n.point(m[0][0], m[0][1])))
+                    }
+                    !v || e && be(e, p) || n.point(p[0], p[1]), e = p, c = v, i = d
+                }, lineEnd: function () {
+                    c && n.lineEnd(), e = null
+                }, clean: function () {
+                    return s | (l && c) << 1
+                }
+            }
+        }
+
+        function r(n, t, e) {
+            var r = pe(n), u = pe(t), o = [1, 0, 0], a = de(r, u), c = ve(a, a), l = a[0], s = c - l * l;
+            if (!s)return !e && n;
+            var f = i * c / s, h = -i * l / s, g = de(o, a), p = ye(o, f), v = ye(a, h);
+            me(p, v);
+            var d = g, m = ve(p, d), y = ve(d, d), M = m * m - y * (ve(p, p) - 1);
+            if (!(0 > M)) {
+                var x = Math.sqrt(M), b = ye(d, (-m - x) / y);
+                if (me(b, p), b = xe(b), !e)return b;
+                var _, w = n[0], S = t[0], k = n[1], E = t[1];
+                w > S && (_ = w, w = S, S = _);
+                var A = S - w, N = va(A - Da) < Ta, C = N || Ta > A;
+                if (!N && k > E && (_ = k, k = E, E = _), C ? N ? k + E > 0 ^ b[1] < (va(b[0] - w) < Ta ? k : E) : k <= b[1] && b[1] <= E : A > Da ^ (w <= b[0] && b[0] <= S)) {
+                    var z = ye(d, (-m + x) / y);
+                    return me(z, p), [b, xe(z)]
+                }
+            }
+        }
+
+        function u(t, e) {
+            var r = o ? n : Da - n, u = 0;
+            return -r > t ? u |= 1 : t > r && (u |= 2), -r > e ? u |= 4 : e > r && (u |= 8), u
+        }
+
+        var i = Math.cos(n), o = i > 0, a = va(i) > Ta, c = gr(n, 6 * Fa);
+        return Le(t, e, c, o ? [0, -n] : [-Da, n - Da])
+    }
+
+    function Oe(n, t, e, r) {
+        return function (u) {
+            var i, o = u.a, a = u.b, c = o.x, l = o.y, s = a.x, f = a.y, h = 0, g = 1, p = s - c, v = f - l;
+            if (i = n - c, p || !(i > 0)) {
+                if (i /= p, 0 > p) {
+                    if (h > i)return;
+                    g > i && (g = i)
+                } else if (p > 0) {
+                    if (i > g)return;
+                    i > h && (h = i)
+                }
+                if (i = e - c, p || !(0 > i)) {
+                    if (i /= p, 0 > p) {
+                        if (i > g)return;
+                        i > h && (h = i)
+                    } else if (p > 0) {
+                        if (h > i)return;
+                        g > i && (g = i)
+                    }
+                    if (i = t - l, v || !(i > 0)) {
+                        if (i /= v, 0 > v) {
+                            if (h > i)return;
+                            g > i && (g = i)
+                        } else if (v > 0) {
+                            if (i > g)return;
+                            i > h && (h = i)
+                        }
+                        if (i = r - l, v || !(0 > i)) {
+                            if (i /= v, 0 > v) {
+                                if (i > g)return;
+                                i > h && (h = i)
+                            } else if (v > 0) {
+                                if (h > i)return;
+                                g > i && (g = i)
+                            }
+                            return h > 0 && (u.a = {x: c + h * p, y: l + h * v}), 1 > g && (u.b = {
+                                x: c + g * p,
+                                y: l + g * v
+                            }), u
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    function Ye(n, t, e, r) {
+        function u(r, u) {
+            return va(r[0] - n) < Ta ? u > 0 ? 0 : 3 : va(r[0] - e) < Ta ? u > 0 ? 2 : 1 : va(r[1] - t) < Ta ? u > 0 ? 1 : 0 : u > 0 ? 3 : 2
+        }
+
+        function i(n, t) {
+            return o(n.x, t.x)
+        }
+
+        function o(n, t) {
+            var e = u(n, 1), r = u(t, 1);
+            return e !== r ? e - r : 0 === e ? t[1] - n[1] : 1 === e ? n[0] - t[0] : 2 === e ? n[1] - t[1] : t[0] - n[0]
+        }
+
+        return function (a) {
+            function c(n) {
+                for (var t = 0, e = d.length, r = n[1], u = 0; e > u; ++u)for (var i, o = 1, a = d[u], c = a.length, l = a[0]; c > o; ++o)i = a[o], l[1] <= r ? i[1] > r && K(l, i, n) > 0 && ++t : i[1] <= r && K(l, i, n) < 0 && --t, l = i;
+                return 0 !== t
+            }
+
+            function l(i, a, c, l) {
+                var s = 0, f = 0;
+                if (null == i || (s = u(i, c)) !== (f = u(a, c)) || o(i, a) < 0 ^ c > 0) {
+                    do l.point(0 === s || 3 === s ? n : e, s > 1 ? r : t); while ((s = (s + c + 4) % 4) !== f)
+                } else l.point(a[0], a[1])
+            }
+
+            function s(u, i) {
+                return u >= n && e >= u && i >= t && r >= i
+            }
+
+            function f(n, t) {
+                s(n, t) && a.point(n, t)
+            }
+
+            function h() {
+                C.point = p, d && d.push(m = []), S = !0, w = !1, b = _ = 0 / 0
+            }
+
+            function g() {
+                v && (p(y, M), x && w && A.rejoin(), v.push(A.buffer())), C.point = f, w && a.lineEnd()
+            }
+
+            function p(n, t) {
+                n = Math.max(-Uc, Math.min(Uc, n)), t = Math.max(-Uc, Math.min(Uc, t));
+                var e = s(n, t);
+                if (d && m.push([n, t]), S)y = n, M = t, x = e, S = !1, e && (a.lineStart(), a.point(n, t)); else if (e && w)a.point(n, t); else {
+                    var r = {a: {x: b, y: _}, b: {x: n, y: t}};
+                    N(r) ? (w || (a.lineStart(), a.point(r.a.x, r.a.y)), a.point(r.b.x, r.b.y), e || a.lineEnd(), k = !1) : e && (a.lineStart(), a.point(n, t), k = !1)
+                }
+                b = n, _ = t, w = e
+            }
+
+            var v, d, m, y, M, x, b, _, w, S, k, E = a, A = Re(), N = Oe(n, t, e, r), C = {
+                point: f,
+                lineStart: h,
+                lineEnd: g,
+                polygonStart: function () {
+                    a = A, v = [], d = [], k = !0
+                },
+                polygonEnd: function () {
+                    a = E, v = ta.merge(v);
+                    var t = c([n, r]), e = k && t, u = v.length;
+                    (e || u) && (a.polygonStart(), e && (a.lineStart(), l(null, null, 1, a), a.lineEnd()), u && Ce(v, i, t, l, a), a.polygonEnd()), v = d = m = null
+                }
+            };
+            return C
+        }
+    }
+
+    function Ie(n) {
+        var t = 0, e = Da / 3, r = ir(n), u = r(t, e);
+        return u.parallels = function (n) {
+            return arguments.length ? r(t = n[0] * Da / 180, e = n[1] * Da / 180) : [180 * (t / Da), 180 * (e / Da)]
+        }, u
+    }
+
+    function Ze(n, t) {
+        function e(n, t) {
+            var e = Math.sqrt(i - 2 * u * Math.sin(t)) / u;
+            return [e * Math.sin(n *= u), o - e * Math.cos(n)]
+        }
+
+        var r = Math.sin(n), u = (r + Math.sin(t)) / 2, i = 1 + r * (2 * u - r), o = Math.sqrt(i) / u;
+        return e.invert = function (n, t) {
+            var e = o - t;
+            return [Math.atan2(n, e) / u, nt((i - (n * n + e * e) * u * u) / (2 * u))]
+        }, e
+    }
+
+    function Ve() {
+        function n(n, t) {
+            Fc += u * n - r * t, r = n, u = t
+        }
+
+        var t, e, r, u;
+        Zc.point = function (i, o) {
+            Zc.point = n, t = r = i, e = u = o
+        }, Zc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Xe(n, t) {
+        Hc > n && (Hc = n), n > Yc && (Yc = n), Oc > t && (Oc = t), t > Ic && (Ic = t)
+    }
+
+    function $e() {
+        function n(n, t) {
+            o.push("M", n, ",", t, i)
+        }
+
+        function t(n, t) {
+            o.push("M", n, ",", t), a.point = e
+        }
+
+        function e(n, t) {
+            o.push("L", n, ",", t)
+        }
+
+        function r() {
+            a.point = n
+        }
+
+        function u() {
+            o.push("Z")
+        }
+
+        var i = Be(4.5), o = [], a = {
+            point: n, lineStart: function () {
+                a.point = t
+            }, lineEnd: r, polygonStart: function () {
+                a.lineEnd = u
+            }, polygonEnd: function () {
+                a.lineEnd = r, a.point = n
+            }, pointRadius: function (n) {
+                return i = Be(n), a
+            }, result: function () {
+                if (o.length) {
+                    var n = o.join("");
+                    return o = [], n
+                }
+            }
+        };
+        return a
+    }
+
+    function Be(n) {
+        return "m0," + n + "a" + n + "," + n + " 0 1,1 0," + -2 * n + "a" + n + "," + n + " 0 1,1 0," + 2 * n + "z"
+    }
+
+    function We(n, t) {
+        Ec += n, Ac += t, ++Nc
+    }
+
+    function Je() {
+        function n(n, r) {
+            var u = n - t, i = r - e, o = Math.sqrt(u * u + i * i);
+            Cc += o * (t + n) / 2, zc += o * (e + r) / 2, qc += o, We(t = n, e = r)
+        }
+
+        var t, e;
+        Xc.point = function (r, u) {
+            Xc.point = n, We(t = r, e = u)
+        }
+    }
+
+    function Ge() {
+        Xc.point = We
+    }
+
+    function Ke() {
+        function n(n, t) {
+            var e = n - r, i = t - u, o = Math.sqrt(e * e + i * i);
+            Cc += o * (r + n) / 2, zc += o * (u + t) / 2, qc += o, o = u * n - r * t, Lc += o * (r + n), Tc += o * (u + t), Rc += 3 * o, We(r = n, u = t)
+        }
+
+        var t, e, r, u;
+        Xc.point = function (i, o) {
+            Xc.point = n, We(t = r = i, e = u = o)
+        }, Xc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Qe(n) {
+        function t(t, e) {
+            n.moveTo(t + o, e), n.arc(t, e, o, 0, Pa)
+        }
+
+        function e(t, e) {
+            n.moveTo(t, e), a.point = r
+        }
+
+        function r(t, e) {
+            n.lineTo(t, e)
+        }
+
+        function u() {
+            a.point = t
+        }
+
+        function i() {
+            n.closePath()
+        }
+
+        var o = 4.5, a = {
+            point: t, lineStart: function () {
+                a.point = e
+            }, lineEnd: u, polygonStart: function () {
+                a.lineEnd = i
+            }, polygonEnd: function () {
+                a.lineEnd = u, a.point = t
+            }, pointRadius: function (n) {
+                return o = n, a
+            }, result: y
+        };
+        return a
+    }
+
+    function nr(n) {
+        function t(n) {
+            return (a ? r : e)(n)
+        }
+
+        function e(t) {
+            return rr(t, function (e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            })
+        }
+
+        function r(t) {
+            function e(e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            }
+
+            function r() {
+                M = 0 / 0, S.point = i, t.lineStart()
+            }
+
+            function i(e, r) {
+                var i = pe([e, r]), o = n(e, r);
+                u(M, x, y, b, _, w, M = o[0], x = o[1], y = e, b = i[0], _ = i[1], w = i[2], a, t), t.point(M, x)
+            }
+
+            function o() {
+                S.point = e, t.lineEnd()
+            }
+
+            function c() {
+                r(), S.point = l, S.lineEnd = s
+            }
+
+            function l(n, t) {
+                i(f = n, h = t), g = M, p = x, v = b, d = _, m = w, S.point = i
+            }
+
+            function s() {
+                u(M, x, y, b, _, w, g, p, f, v, d, m, a, t), S.lineEnd = o, o()
+            }
+
+            var f, h, g, p, v, d, m, y, M, x, b, _, w, S = {
+                point: e,
+                lineStart: r,
+                lineEnd: o,
+                polygonStart: function () {
+                    t.polygonStart(), S.lineStart = c
+                },
+                polygonEnd: function () {
+                    t.polygonEnd(), S.lineStart = r
+                }
+            };
+            return S
+        }
+
+        function u(t, e, r, a, c, l, s, f, h, g, p, v, d, m) {
+            var y = s - t, M = f - e, x = y * y + M * M;
+            if (x > 4 * i && d--) {
+                var b = a + g, _ = c + p, w = l + v, S = Math.sqrt(b * b + _ * _ + w * w), k = Math.asin(w /= S), E = va(va(w) - 1) < Ta || va(r - h) < Ta ? (r + h) / 2 : Math.atan2(_, b), A = n(E, k), N = A[0], C = A[1], z = N - t, q = C - e, L = M * z - y * q;
+                (L * L / x > i || va((y * z + M * q) / x - .5) > .3 || o > a * g + c * p + l * v) && (u(t, e, r, a, c, l, N, C, E, b /= S, _ /= S, w, d, m), m.point(N, C), u(N, C, E, b, _, w, s, f, h, g, p, v, d, m))
+            }
+        }
+
+        var i = .5, o = Math.cos(30 * Fa), a = 16;
+        return t.precision = function (n) {
+            return arguments.length ? (a = (i = n * n) > 0 && 16, t) : Math.sqrt(i)
+        }, t
+    }
+
+    function tr(n) {
+        var t = nr(function (t, e) {
+            return n([t * Ha, e * Ha])
+        });
+        return function (n) {
+            return or(t(n))
+        }
+    }
+
+    function er(n) {
+        this.stream = n
+    }
+
+    function rr(n, t) {
+        return {
+            point: t, sphere: function () {
+                n.sphere()
+            }, lineStart: function () {
+                n.lineStart()
+            }, lineEnd: function () {
+                n.lineEnd()
+            }, polygonStart: function () {
+                n.polygonStart()
+            }, polygonEnd: function () {
+                n.polygonEnd()
+            }
+        }
+    }
+
+    function ur(n) {
+        return ir(function () {
+            return n
+        })()
+    }
+
+    function ir(n) {
+        function t(n) {
+            return n = a(n[0] * Fa, n[1] * Fa), [n[0] * h + c, l - n[1] * h]
+        }
+
+        function e(n) {
+            return n = a.invert((n[0] - c) / h, (l - n[1]) / h), n && [n[0] * Ha, n[1] * Ha]
+        }
+
+        function r() {
+            a = Ae(o = lr(m, y, M), i);
+            var n = i(v, d);
+            return c = g - n[0] * h, l = p + n[1] * h, u()
+        }
+
+        function u() {
+            return s && (s.valid = !1, s = null), t
+        }
+
+        var i, o, a, c, l, s, f = nr(function (n, t) {
+            return n = i(n, t), [n[0] * h + c, l - n[1] * h]
+        }), h = 150, g = 480, p = 250, v = 0, d = 0, m = 0, y = 0, M = 0, x = Pc, b = Et, _ = null, w = null;
+        return t.stream = function (n) {
+            return s && (s.valid = !1), s = or(x(o, f(b(n)))), s.valid = !0, s
+        }, t.clipAngle = function (n) {
+            return arguments.length ? (x = null == n ? (_ = n, Pc) : He((_ = +n) * Fa), u()) : _
+        }, t.clipExtent = function (n) {
+            return arguments.length ? (w = n, b = n ? Ye(n[0][0], n[0][1], n[1][0], n[1][1]) : Et, u()) : w
+        }, t.scale = function (n) {
+            return arguments.length ? (h = +n, r()) : h
+        }, t.translate = function (n) {
+            return arguments.length ? (g = +n[0], p = +n[1], r()) : [g, p]
+        }, t.center = function (n) {
+            return arguments.length ? (v = n[0] % 360 * Fa, d = n[1] % 360 * Fa, r()) : [v * Ha, d * Ha]
+        }, t.rotate = function (n) {
+            return arguments.length ? (m = n[0] % 360 * Fa, y = n[1] % 360 * Fa, M = n.length > 2 ? n[2] % 360 * Fa : 0, r()) : [m * Ha, y * Ha, M * Ha]
+        }, ta.rebind(t, f, "precision"), function () {
+            return i = n.apply(this, arguments), t.invert = i.invert && e, r()
+        }
+    }
+
+    function or(n) {
+        return rr(n, function (t, e) {
+            n.point(t * Fa, e * Fa)
+        })
+    }
+
+    function ar(n, t) {
+        return [n, t]
+    }
+
+    function cr(n, t) {
+        return [n > Da ? n - Pa : -Da > n ? n + Pa : n, t]
+    }
+
+    function lr(n, t, e) {
+        return n ? t || e ? Ae(fr(n), hr(t, e)) : fr(n) : t || e ? hr(t, e) : cr
+    }
+
+    function sr(n) {
+        return function (t, e) {
+            return t += n, [t > Da ? t - Pa : -Da > t ? t + Pa : t, e]
+        }
+    }
+
+    function fr(n) {
+        var t = sr(n);
+        return t.invert = sr(-n), t
+    }
+
+    function hr(n, t) {
+        function e(n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * r + a * u;
+            return [Math.atan2(c * i - s * o, a * r - l * u), nt(s * i + c * o)]
+        }
+
+        var r = Math.cos(n), u = Math.sin(n), i = Math.cos(t), o = Math.sin(t);
+        return e.invert = function (n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * i - c * o;
+            return [Math.atan2(c * i + l * o, a * r + s * u), nt(s * r - a * u)]
+        }, e
+    }
+
+    function gr(n, t) {
+        var e = Math.cos(n), r = Math.sin(n);
+        return function (u, i, o, a) {
+            var c = o * t;
+            null != u ? (u = pr(e, u), i = pr(e, i), (o > 0 ? i > u : u > i) && (u += o * Pa)) : (u = n + o * Pa, i = n - .5 * c);
+            for (var l, s = u; o > 0 ? s > i : i > s; s -= c)a.point((l = xe([e, -r * Math.cos(s), -r * Math.sin(s)]))[0], l[1])
+        }
+    }
+
+    function pr(n, t) {
+        var e = pe(t);
+        e[0] -= n, Me(e);
+        var r = Q(-e[1]);
+        return ((-e[2] < 0 ? -r : r) + 2 * Math.PI - Ta) % (2 * Math.PI)
+    }
+
+    function vr(n, t, e) {
+        var r = ta.range(n, t - Ta, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [n, t]
+            })
+        }
+    }
+
+    function dr(n, t, e) {
+        var r = ta.range(n, t - Ta, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [t, n]
+            })
+        }
+    }
+
+    function mr(n) {
+        return n.source
+    }
+
+    function yr(n) {
+        return n.target
+    }
+
+    function Mr(n, t, e, r) {
+        var u = Math.cos(t), i = Math.sin(t), o = Math.cos(r), a = Math.sin(r), c = u * Math.cos(n), l = u * Math.sin(n), s = o * Math.cos(e), f = o * Math.sin(e), h = 2 * Math.asin(Math.sqrt(ut(r - t) + u * o * ut(e - n))), g = 1 / Math.sin(h), p = h ? function (n) {
+            var t = Math.sin(n *= h) * g, e = Math.sin(h - n) * g, r = e * c + t * s, u = e * l + t * f, o = e * i + t * a;
+            return [Math.atan2(u, r) * Ha, Math.atan2(o, Math.sqrt(r * r + u * u)) * Ha]
+        } : function () {
+            return [n * Ha, t * Ha]
+        };
+        return p.distance = h, p
+    }
+
+    function xr() {
+        function n(n, u) {
+            var i = Math.sin(u *= Fa), o = Math.cos(u), a = va((n *= Fa) - t), c = Math.cos(a);
+            $c += Math.atan2(Math.sqrt((a = o * Math.sin(a)) * a + (a = r * i - e * o * c) * a), e * i + r * o * c), t = n, e = i, r = o
+        }
+
+        var t, e, r;
+        Bc.point = function (u, i) {
+            t = u * Fa, e = Math.sin(i *= Fa), r = Math.cos(i), Bc.point = n
+        }, Bc.lineEnd = function () {
+            Bc.point = Bc.lineEnd = y
+        }
+    }
+
+    function br(n, t) {
+        function e(t, e) {
+            var r = Math.cos(t), u = Math.cos(e), i = n(r * u);
+            return [i * u * Math.sin(t), i * Math.sin(e)]
+        }
+
+        return e.invert = function (n, e) {
+            var r = Math.sqrt(n * n + e * e), u = t(r), i = Math.sin(u), o = Math.cos(u);
+            return [Math.atan2(n * i, r * o), Math.asin(r && e * i / r)]
+        }, e
+    }
+
+    function _r(n, t) {
+        function e(n, t) {
+            o > 0 ? -ja + Ta > t && (t = -ja + Ta) : t > ja - Ta && (t = ja - Ta);
+            var e = o / Math.pow(u(t), i);
+            return [e * Math.sin(i * n), o - e * Math.cos(i * n)]
+        }
+
+        var r = Math.cos(n), u = function (n) {
+            return Math.tan(Da / 4 + n / 2)
+        }, i = n === t ? Math.sin(n) : Math.log(r / Math.cos(t)) / Math.log(u(t) / u(n)), o = r * Math.pow(u(n), i) / i;
+        return i ? (e.invert = function (n, t) {
+            var e = o - t, r = G(i) * Math.sqrt(n * n + e * e);
+            return [Math.atan2(n, e) / i, 2 * Math.atan(Math.pow(o / r, 1 / i)) - ja]
+        }, e) : Sr
+    }
+
+    function wr(n, t) {
+        function e(n, t) {
+            var e = i - t;
+            return [e * Math.sin(u * n), i - e * Math.cos(u * n)]
+        }
+
+        var r = Math.cos(n), u = n === t ? Math.sin(n) : (r - Math.cos(t)) / (t - n), i = r / u + n;
+        return va(u) < Ta ? ar : (e.invert = function (n, t) {
+            var e = i - t;
+            return [Math.atan2(n, e) / u, i - G(u) * Math.sqrt(n * n + e * e)]
+        }, e)
+    }
+
+    function Sr(n, t) {
+        return [n, Math.log(Math.tan(Da / 4 + t / 2))]
+    }
+
+    function kr(n) {
+        var t, e = ur(n), r = e.scale, u = e.translate, i = e.clipExtent;
+        return e.scale = function () {
+            var n = r.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.translate = function () {
+            var n = u.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.clipExtent = function (n) {
+            var o = i.apply(e, arguments);
+            if (o === e) {
+                if (t = null == n) {
+                    var a = Da * r(), c = u();
+                    i([[c[0] - a, c[1] - a], [c[0] + a, c[1] + a]])
+                }
+            } else t && (o = null);
+            return o
+        }, e.clipExtent(null)
+    }
+
+    function Er(n, t) {
+        return [Math.log(Math.tan(Da / 4 + t / 2)), -n]
+    }
+
+    function Ar(n) {
+        return n[0]
+    }
+
+    function Nr(n) {
+        return n[1]
+    }
+
+    function Cr(n) {
+        for (var t = n.length, e = [0, 1], r = 2, u = 2; t > u; u++) {
+            for (; r > 1 && K(n[e[r - 2]], n[e[r - 1]], n[u]) <= 0;)--r;
+            e[r++] = u
+        }
+        return e.slice(0, r)
+    }
+
+    function zr(n, t) {
+        return n[0] - t[0] || n[1] - t[1]
+    }
+
+    function qr(n, t, e) {
+        return (e[0] - t[0]) * (n[1] - t[1]) < (e[1] - t[1]) * (n[0] - t[0])
+    }
+
+    function Lr(n, t, e, r) {
+        var u = n[0], i = e[0], o = t[0] - u, a = r[0] - i, c = n[1], l = e[1], s = t[1] - c, f = r[1] - l, h = (a * (c - l) - f * (u - i)) / (f * o - a * s);
+        return [u + h * o, c + h * s]
+    }
+
+    function Tr(n) {
+        var t = n[0], e = n[n.length - 1];
+        return !(t[0] - e[0] || t[1] - e[1])
+    }
+
+    function Rr() {
+        tu(this), this.edge = this.site = this.circle = null
+    }
+
+    function Dr(n) {
+        var t = ol.pop() || new Rr;
+        return t.site = n, t
+    }
+
+    function Pr(n) {
+        Xr(n), rl.remove(n), ol.push(n), tu(n)
+    }
+
+    function Ur(n) {
+        var t = n.circle, e = t.x, r = t.cy, u = {x: e, y: r}, i = n.P, o = n.N, a = [n];
+        Pr(n);
+        for (var c = i; c.circle && va(e - c.circle.x) < Ta && va(r - c.circle.cy) < Ta;)i = c.P, a.unshift(c), Pr(c), c = i;
+        a.unshift(c), Xr(c);
+        for (var l = o; l.circle && va(e - l.circle.x) < Ta && va(r - l.circle.cy) < Ta;)o = l.N, a.push(l), Pr(l), l = o;
+        a.push(l), Xr(l);
+        var s, f = a.length;
+        for (s = 1; f > s; ++s)l = a[s], c = a[s - 1], Kr(l.edge, c.site, l.site, u);
+        c = a[0], l = a[f - 1], l.edge = Jr(c.site, l.site, null, u), Vr(c), Vr(l)
+    }
+
+    function jr(n) {
+        for (var t, e, r, u, i = n.x, o = n.y, a = rl._; a;)if (r = Fr(a, o) - i, r > Ta)a = a.L; else {
+            if (u = i - Hr(a, o), !(u > Ta)) {
+                r > -Ta ? (t = a.P, e = a) : u > -Ta ? (t = a, e = a.N) : t = e = a;
+                break
+            }
+            if (!a.R) {
+                t = a;
+                break
+            }
+            a = a.R
+        }
+        var c = Dr(n);
+        if (rl.insert(t, c), t || e) {
+            if (t === e)return Xr(t), e = Dr(t.site), rl.insert(c, e), c.edge = e.edge = Jr(t.site, c.site), Vr(t), Vr(e), void 0;
+            if (!e)return c.edge = Jr(t.site, c.site), void 0;
+            Xr(t), Xr(e);
+            var l = t.site, s = l.x, f = l.y, h = n.x - s, g = n.y - f, p = e.site, v = p.x - s, d = p.y - f, m = 2 * (h * d - g * v), y = h * h + g * g, M = v * v + d * d, x = {
+                x: (d * y - g * M) / m + s,
+                y: (h * M - v * y) / m + f
+            };
+            Kr(e.edge, l, p, x), c.edge = Jr(l, n, null, x), e.edge = Jr(n, p, null, x), Vr(t), Vr(e)
+        }
+    }
+
+    function Fr(n, t) {
+        var e = n.site, r = e.x, u = e.y, i = u - t;
+        if (!i)return r;
+        var o = n.P;
+        if (!o)return -1 / 0;
+        e = o.site;
+        var a = e.x, c = e.y, l = c - t;
+        if (!l)return a;
+        var s = a - r, f = 1 / i - 1 / l, h = s / l;
+        return f ? (-h + Math.sqrt(h * h - 2 * f * (s * s / (-2 * l) - c + l / 2 + u - i / 2))) / f + r : (r + a) / 2
+    }
+
+    function Hr(n, t) {
+        var e = n.N;
+        if (e)return Fr(e, t);
+        var r = n.site;
+        return r.y === t ? r.x : 1 / 0
+    }
+
+    function Or(n) {
+        this.site = n, this.edges = []
+    }
+
+    function Yr(n) {
+        for (var t, e, r, u, i, o, a, c, l, s, f = n[0][0], h = n[1][0], g = n[0][1], p = n[1][1], v = el, d = v.length; d--;)if (i = v[d], i && i.prepare())for (a = i.edges, c = a.length, o = 0; c > o;)s = a[o].end(), r = s.x, u = s.y, l = a[++o % c].start(), t = l.x, e = l.y, (va(r - t) > Ta || va(u - e) > Ta) && (a.splice(o, 0, new Qr(Gr(i.site, s, va(r - f) < Ta && p - u > Ta ? {
+            x: f,
+            y: va(t - f) < Ta ? e : p
+        } : va(u - p) < Ta && h - r > Ta ? {x: va(e - p) < Ta ? t : h, y: p} : va(r - h) < Ta && u - g > Ta ? {
+            x: h,
+            y: va(t - h) < Ta ? e : g
+        } : va(u - g) < Ta && r - f > Ta ? {x: va(e - g) < Ta ? t : f, y: g} : null), i.site, null)), ++c)
+    }
+
+    function Ir(n, t) {
+        return t.angle - n.angle
+    }
+
+    function Zr() {
+        tu(this), this.x = this.y = this.arc = this.site = this.cy = null
+    }
+
+    function Vr(n) {
+        var t = n.P, e = n.N;
+        if (t && e) {
+            var r = t.site, u = n.site, i = e.site;
+            if (r !== i) {
+                var o = u.x, a = u.y, c = r.x - o, l = r.y - a, s = i.x - o, f = i.y - a, h = 2 * (c * f - l * s);
+                if (!(h >= -Ra)) {
+                    var g = c * c + l * l, p = s * s + f * f, v = (f * g - l * p) / h, d = (c * p - s * g) / h, f = d + a, m = al.pop() || new Zr;
+                    m.arc = n, m.site = u, m.x = v + o, m.y = f + Math.sqrt(v * v + d * d), m.cy = f, n.circle = m;
+                    for (var y = null, M = il._; M;)if (m.y < M.y || m.y === M.y && m.x <= M.x) {
+                        if (!M.L) {
+                            y = M.P;
+                            break
+                        }
+                        M = M.L
+                    } else {
+                        if (!M.R) {
+                            y = M;
+                            break
+                        }
+                        M = M.R
+                    }
+                    il.insert(y, m), y || (ul = m)
+                }
+            }
+        }
+    }
+
+    function Xr(n) {
+        var t = n.circle;
+        t && (t.P || (ul = t.N), il.remove(t), al.push(t), tu(t), n.circle = null)
+    }
+
+    function $r(n) {
+        for (var t, e = tl, r = Oe(n[0][0], n[0][1], n[1][0], n[1][1]), u = e.length; u--;)t = e[u], (!Br(t, n) || !r(t) || va(t.a.x - t.b.x) < Ta && va(t.a.y - t.b.y) < Ta) && (t.a = t.b = null, e.splice(u, 1))
+    }
+
+    function Br(n, t) {
+        var e = n.b;
+        if (e)return !0;
+        var r, u, i = n.a, o = t[0][0], a = t[1][0], c = t[0][1], l = t[1][1], s = n.l, f = n.r, h = s.x, g = s.y, p = f.x, v = f.y, d = (h + p) / 2, m = (g + v) / 2;
+        if (v === g) {
+            if (o > d || d >= a)return;
+            if (h > p) {
+                if (i) {
+                    if (i.y >= l)return
+                } else i = {x: d, y: c};
+                e = {x: d, y: l}
+            } else {
+                if (i) {
+                    if (i.y < c)return
+                } else i = {x: d, y: l};
+                e = {x: d, y: c}
+            }
+        } else if (r = (h - p) / (v - g), u = m - r * d, -1 > r || r > 1)if (h > p) {
+            if (i) {
+                if (i.y >= l)return
+            } else i = {x: (c - u) / r, y: c};
+            e = {x: (l - u) / r, y: l}
+        } else {
+            if (i) {
+                if (i.y < c)return
+            } else i = {x: (l - u) / r, y: l};
+            e = {x: (c - u) / r, y: c}
+        } else if (v > g) {
+            if (i) {
+                if (i.x >= a)return
+            } else i = {x: o, y: r * o + u};
+            e = {x: a, y: r * a + u}
+        } else {
+            if (i) {
+                if (i.x < o)return
+            } else i = {x: a, y: r * a + u};
+            e = {x: o, y: r * o + u}
+        }
+        return n.a = i, n.b = e, !0
+    }
+
+    function Wr(n, t) {
+        this.l = n, this.r = t, this.a = this.b = null
+    }
+
+    function Jr(n, t, e, r) {
+        var u = new Wr(n, t);
+        return tl.push(u), e && Kr(u, n, t, e), r && Kr(u, t, n, r), el[n.i].edges.push(new Qr(u, n, t)), el[t.i].edges.push(new Qr(u, t, n)), u
+    }
+
+    function Gr(n, t, e) {
+        var r = new Wr(n, null);
+        return r.a = t, r.b = e, tl.push(r), r
+    }
+
+    function Kr(n, t, e, r) {
+        n.a || n.b ? n.l === e ? n.b = r : n.a = r : (n.a = r, n.l = t, n.r = e)
+    }
+
+    function Qr(n, t, e) {
+        var r = n.a, u = n.b;
+        this.edge = n, this.site = t, this.angle = e ? Math.atan2(e.y - t.y, e.x - t.x) : n.l === t ? Math.atan2(u.x - r.x, r.y - u.y) : Math.atan2(r.x - u.x, u.y - r.y)
+    }
+
+    function nu() {
+        this._ = null
+    }
+
+    function tu(n) {
+        n.U = n.C = n.L = n.R = n.P = n.N = null
+    }
+
+    function eu(n, t) {
+        var e = t, r = t.R, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.R = r.L, e.R && (e.R.U = e), r.L = e
+    }
+
+    function ru(n, t) {
+        var e = t, r = t.L, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.L = r.R, e.L && (e.L.U = e), r.R = e
+    }
+
+    function uu(n) {
+        for (; n.L;)n = n.L;
+        return n
+    }
+
+    function iu(n, t) {
+        var e, r, u, i = n.sort(ou).pop();
+        for (tl = [], el = new Array(n.length), rl = new nu, il = new nu; ;)if (u = ul, i && (!u || i.y < u.y || i.y === u.y && i.x < u.x))(i.x !== e || i.y !== r) && (el[i.i] = new Or(i), jr(i), e = i.x, r = i.y), i = n.pop(); else {
+            if (!u)break;
+            Ur(u.arc)
+        }
+        t && ($r(t), Yr(t));
+        var o = {cells: el, edges: tl};
+        return rl = il = tl = el = null, o
+    }
+
+    function ou(n, t) {
+        return t.y - n.y || t.x - n.x
+    }
+
+    function au(n, t, e) {
+        return (n.x - e.x) * (t.y - n.y) - (n.x - t.x) * (e.y - n.y)
+    }
+
+    function cu(n) {
+        return n.x
+    }
+
+    function lu(n) {
+        return n.y
+    }
+
+    function su() {
+        return {leaf: !0, nodes: [], point: null, x: null, y: null}
+    }
+
+    function fu(n, t, e, r, u, i) {
+        if (!n(t, e, r, u, i)) {
+            var o = .5 * (e + u), a = .5 * (r + i), c = t.nodes;
+            c[0] && fu(n, c[0], e, r, o, a), c[1] && fu(n, c[1], o, r, u, a), c[2] && fu(n, c[2], e, a, o, i), c[3] && fu(n, c[3], o, a, u, i)
+        }
+    }
+
+    function hu(n, t, e, r, u, i, o) {
+        var a, c = 1 / 0;
+        return function l(n, s, f, h, g) {
+            if (!(s > i || f > o || r > h || u > g)) {
+                if (p = n.point) {
+                    var p, v = t - p[0], d = e - p[1], m = v * v + d * d;
+                    if (c > m) {
+                        var y = Math.sqrt(c = m);
+                        r = t - y, u = e - y, i = t + y, o = e + y, a = p
+                    }
+                }
+                for (var M = n.nodes, x = .5 * (s + h), b = .5 * (f + g), _ = t >= x, w = e >= b, S = w << 1 | _, k = S + 4; k > S; ++S)if (n = M[3 & S])switch (3 & S) {
+                    case 0:
+                        l(n, s, f, x, b);
+                        break;
+                    case 1:
+                        l(n, x, f, h, b);
+                        break;
+                    case 2:
+                        l(n, s, b, x, g);
+                        break;
+                    case 3:
+                        l(n, x, b, h, g)
+                }
+            }
+        }(n, r, u, i, o), a
+    }
+
+    function gu(n, t) {
+        n = ta.rgb(n), t = ta.rgb(t);
+        var e = n.r, r = n.g, u = n.b, i = t.r - e, o = t.g - r, a = t.b - u;
+        return function (n) {
+            return "#" + Mt(Math.round(e + i * n)) + Mt(Math.round(r + o * n)) + Mt(Math.round(u + a * n))
+        }
+    }
+
+    function pu(n, t) {
+        var e, r = {}, u = {};
+        for (e in n)e in t ? r[e] = mu(n[e], t[e]) : u[e] = n[e];
+        for (e in t)e in n || (u[e] = t[e]);
+        return function (n) {
+            for (e in r)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function vu(n, t) {
+        return n = +n, t = +t, function (e) {
+            return n * (1 - e) + t * e
+        }
+    }
+
+    function du(n, t) {
+        var e, r, u, i = ll.lastIndex = sl.lastIndex = 0, o = -1, a = [], c = [];
+        for (n += "", t += ""; (e = ll.exec(n)) && (r = sl.exec(t));)(u = r.index) > i && (u = t.slice(i, u), a[o] ? a[o] += u : a[++o] = u), (e = e[0]) === (r = r[0]) ? a[o] ? a[o] += r : a[++o] = r : (a[++o] = null, c.push({
+            i: o,
+            x: vu(e, r)
+        })), i = sl.lastIndex;
+        return i < t.length && (u = t.slice(i), a[o] ? a[o] += u : a[++o] = u), a.length < 2 ? c[0] ? (t = c[0].x, function (n) {
+            return t(n) + ""
+        }) : function () {
+            return t
+        } : (t = c.length, function (n) {
+            for (var e, r = 0; t > r; ++r)a[(e = c[r]).i] = e.x(n);
+            return a.join("")
+        })
+    }
+
+    function mu(n, t) {
+        for (var e, r = ta.interpolators.length; --r >= 0 && !(e = ta.interpolators[r](n, t)););
+        return e
+    }
+
+    function yu(n, t) {
+        var e, r = [], u = [], i = n.length, o = t.length, a = Math.min(n.length, t.length);
+        for (e = 0; a > e; ++e)r.push(mu(n[e], t[e]));
+        for (; i > e; ++e)u[e] = n[e];
+        for (; o > e; ++e)u[e] = t[e];
+        return function (n) {
+            for (e = 0; a > e; ++e)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function Mu(n) {
+        return function (t) {
+            return 0 >= t ? 0 : t >= 1 ? 1 : n(t)
+        }
+    }
+
+    function xu(n) {
+        return function (t) {
+            return 1 - n(1 - t)
+        }
+    }
+
+    function bu(n) {
+        return function (t) {
+            return .5 * (.5 > t ? n(2 * t) : 2 - n(2 - 2 * t))
+        }
+    }
+
+    function _u(n) {
+        return n * n
+    }
+
+    function wu(n) {
+        return n * n * n
+    }
+
+    function Su(n) {
+        if (0 >= n)return 0;
+        if (n >= 1)return 1;
+        var t = n * n, e = t * n;
+        return 4 * (.5 > n ? e : 3 * (n - t) + e - .75)
+    }
+
+    function ku(n) {
+        return function (t) {
+            return Math.pow(t, n)
+        }
+    }
+
+    function Eu(n) {
+        return 1 - Math.cos(n * ja)
+    }
+
+    function Au(n) {
+        return Math.pow(2, 10 * (n - 1))
+    }
+
+    function Nu(n) {
+        return 1 - Math.sqrt(1 - n * n)
+    }
+
+    function Cu(n, t) {
+        var e;
+        return arguments.length < 2 && (t = .45), arguments.length ? e = t / Pa * Math.asin(1 / n) : (n = 1, e = t / 4), function (r) {
+            return 1 + n * Math.pow(2, -10 * r) * Math.sin((r - e) * Pa / t)
+        }
+    }
+
+    function zu(n) {
+        return n || (n = 1.70158), function (t) {
+            return t * t * ((n + 1) * t - n)
+        }
+    }
+
+    function qu(n) {
+        return 1 / 2.75 > n ? 7.5625 * n * n : 2 / 2.75 > n ? 7.5625 * (n -= 1.5 / 2.75) * n + .75 : 2.5 / 2.75 > n ? 7.5625 * (n -= 2.25 / 2.75) * n + .9375 : 7.5625 * (n -= 2.625 / 2.75) * n + .984375
+    }
+
+    function Lu(n, t) {
+        n = ta.hcl(n), t = ta.hcl(t);
+        var e = n.h, r = n.c, u = n.l, i = t.h - e, o = t.c - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.c : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return lt(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Tu(n, t) {
+        n = ta.hsl(n), t = ta.hsl(t);
+        var e = n.h, r = n.s, u = n.l, i = t.h - e, o = t.s - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.s : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return at(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Ru(n, t) {
+        n = ta.lab(n), t = ta.lab(t);
+        var e = n.l, r = n.a, u = n.b, i = t.l - e, o = t.a - r, a = t.b - u;
+        return function (n) {
+            return ft(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Du(n, t) {
+        return t -= n, function (e) {
+            return Math.round(n + t * e)
+        }
+    }
+
+    function Pu(n) {
+        var t = [n.a, n.b], e = [n.c, n.d], r = ju(t), u = Uu(t, e), i = ju(Fu(e, t, -u)) || 0;
+        t[0] * e[1] < e[0] * t[1] && (t[0] *= -1, t[1] *= -1, r *= -1, u *= -1), this.rotate = (r ? Math.atan2(t[1], t[0]) : Math.atan2(-e[0], e[1])) * Ha, this.translate = [n.e, n.f], this.scale = [r, i], this.skew = i ? Math.atan2(u, i) * Ha : 0
+    }
+
+    function Uu(n, t) {
+        return n[0] * t[0] + n[1] * t[1]
+    }
+
+    function ju(n) {
+        var t = Math.sqrt(Uu(n, n));
+        return t && (n[0] /= t, n[1] /= t), t
+    }
+
+    function Fu(n, t, e) {
+        return n[0] += e * t[0], n[1] += e * t[1], n
+    }
+
+    function Hu(n, t) {
+        var e, r = [], u = [], i = ta.transform(n), o = ta.transform(t), a = i.translate, c = o.translate, l = i.rotate, s = o.rotate, f = i.skew, h = o.skew, g = i.scale, p = o.scale;
+        return a[0] != c[0] || a[1] != c[1] ? (r.push("translate(", null, ",", null, ")"), u.push({
+            i: 1,
+            x: vu(a[0], c[0])
+        }, {
+            i: 3,
+            x: vu(a[1], c[1])
+        })) : c[0] || c[1] ? r.push("translate(" + c + ")") : r.push(""), l != s ? (l - s > 180 ? s += 360 : s - l > 180 && (l += 360), u.push({
+            i: r.push(r.pop() + "rotate(", null, ")") - 2,
+            x: vu(l, s)
+        })) : s && r.push(r.pop() + "rotate(" + s + ")"), f != h ? u.push({
+            i: r.push(r.pop() + "skewX(", null, ")") - 2,
+            x: vu(f, h)
+        }) : h && r.push(r.pop() + "skewX(" + h + ")"), g[0] != p[0] || g[1] != p[1] ? (e = r.push(r.pop() + "scale(", null, ",", null, ")"), u.push({
+            i: e - 4,
+            x: vu(g[0], p[0])
+        }, {
+            i: e - 2,
+            x: vu(g[1], p[1])
+        })) : (1 != p[0] || 1 != p[1]) && r.push(r.pop() + "scale(" + p + ")"), e = u.length, function (n) {
+            for (var t, i = -1; ++i < e;)r[(t = u[i]).i] = t.x(n);
+            return r.join("")
+        }
+    }
+
+    function Ou(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return (e - n) / t
+        }
+    }
+
+    function Yu(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return Math.max(0, Math.min(1, (e - n) / t))
+        }
+    }
+
+    function Iu(n) {
+        for (var t = n.source, e = n.target, r = Vu(t, e), u = [t]; t !== r;)t = t.parent, u.push(t);
+        for (var i = u.length; e !== r;)u.splice(i, 0, e), e = e.parent;
+        return u
+    }
+
+    function Zu(n) {
+        for (var t = [], e = n.parent; null != e;)t.push(n), n = e, e = e.parent;
+        return t.push(n), t
+    }
+
+    function Vu(n, t) {
+        if (n === t)return n;
+        for (var e = Zu(n), r = Zu(t), u = e.pop(), i = r.pop(), o = null; u === i;)o = u, u = e.pop(), i = r.pop();
+        return o
+    }
+
+    function Xu(n) {
+        n.fixed |= 2
+    }
+
+    function $u(n) {
+        n.fixed &= -7
+    }
+
+    function Bu(n) {
+        n.fixed |= 4, n.px = n.x, n.py = n.y
+    }
+
+    function Wu(n) {
+        n.fixed &= -5
+    }
+
+    function Ju(n, t, e) {
+        var r = 0, u = 0;
+        if (n.charge = 0, !n.leaf)for (var i, o = n.nodes, a = o.length, c = -1; ++c < a;)i = o[c], null != i && (Ju(i, t, e), n.charge += i.charge, r += i.charge * i.cx, u += i.charge * i.cy);
+        if (n.point) {
+            n.leaf || (n.point.x += Math.random() - .5, n.point.y += Math.random() - .5);
+            var l = t * e[n.point.index];
+            n.charge += n.pointCharge = l, r += l * n.point.x, u += l * n.point.y
+        }
+        n.cx = r / n.charge, n.cy = u / n.charge
+    }
+
+    function Gu(n, t) {
+        return ta.rebind(n, t, "sort", "children", "value"), n.nodes = n, n.links = ri, n
+    }
+
+    function Ku(n, t) {
+        for (var e = [n]; null != (n = e.pop());)if (t(n), (u = n.children) && (r = u.length))for (var r, u; --r >= 0;)e.push(u[r])
+    }
+
+    function Qu(n, t) {
+        for (var e = [n], r = []; null != (n = e.pop());)if (r.push(n), (i = n.children) && (u = i.length))for (var u, i, o = -1; ++o < u;)e.push(i[o]);
+        for (; null != (n = r.pop());)t(n)
+    }
+
+    function ni(n) {
+       

<TRUNCATED>

[15/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/vega.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/vega.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/vega.js
new file mode 100644
index 0000000..cd6eb78
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/vega.js
@@ -0,0 +1,8006 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+// Define module using Universal Module Definition pattern
+// https://github.com/umdjs/umd/blob/master/amdWeb.js
+
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // Support AMD. Register as an anonymous module.
+        // NOTE: List all dependencies in AMD style
+        define(['d3.min', 'topojson'], factory);
+    } else {
+        // No AMD. Set module as a global variable
+        // NOTE: Pass dependencies to factory function
+        // (assume that both d3 and topojson are also global.)
+        var tj = (typeof topojson === 'undefined') ? null : topojson;
+        vg = factory(d3, tj);
+    }
+}(
+//NOTE: The dependencies are passed to this function
+    function (d3, topojson) {
+//---------------------------------------------------
+// BEGIN code for this module
+//---------------------------------------------------
+
+        var vg = {
+            version: "1.4.3", // semantic versioning
+            d3: d3,      // stash d3 for use in property functions
+            topojson: topojson // stash topojson similarly
+        };
+// type checking functions
+        var toString = Object.prototype.toString;
+
+        vg.isObject = function (obj) {
+            return obj === Object(obj);
+        };
+
+        vg.isFunction = function (obj) {
+            return toString.call(obj) == '[object Function]';
+        };
+
+        vg.isString = function (obj) {
+            return toString.call(obj) == '[object String]';
+        };
+
+        vg.isArray = Array.isArray || function (obj) {
+                return toString.call(obj) == '[object Array]';
+            };
+
+        vg.isNumber = function (obj) {
+            return toString.call(obj) == '[object Number]';
+        };
+
+        vg.isBoolean = function (obj) {
+            return toString.call(obj) == '[object Boolean]';
+        };
+
+        vg.isTree = function (obj) {
+            return obj && obj.__vgtree__;
+        };
+
+        vg.tree = function (obj, children) {
+            var d = [obj];
+            d.__vgtree__ = true;
+            d.children = children || "children";
+            return d;
+        };
+
+        vg.number = function (s) {
+            return +s;
+        };
+
+        vg.boolean = function (s) {
+            return !!s;
+        };
+
+// utility functions
+
+        vg.identity = function (x) {
+            return x;
+        };
+
+        vg.true = function () {
+            return true;
+        };
+
+        vg.extend = function (obj) {
+            for (var x, name, i = 1, len = arguments.length; i < len; ++i) {
+                x = arguments[i];
+                for (name in x) {
+                    obj[name] = x[name];
+                }
+            }
+            return obj;
+        };
+
+        vg.duplicate = function (obj) {
+            return JSON.parse(JSON.stringify(obj));
+        };
+
+        vg.field = function (f) {
+            return f.split("\\.")
+                .map(function (d) {
+                    return d.split(".");
+                })
+                .reduce(function (a, b) {
+                    if (a.length) {
+                        a[a.length - 1] += "." + b.shift();
+                    }
+                    a.push.apply(a, b);
+                    return a;
+                }, []);
+        };
+
+        vg.accessor = function (f) {
+            var s;
+            return (vg.isFunction(f) || f == null)
+                ? f : vg.isString(f) && (s = vg.field(f)).length > 1
+                ? function (x) {
+                return s.reduce(function (x, f) {
+                    return x[f];
+                }, x);
+            }
+                : function (x) {
+                return x[f];
+            };
+        };
+
+        vg.mutator = function (f) {
+            var s;
+            return vg.isString(f) && (s = vg.field(f)).length > 1
+                ? function (x, v) {
+                for (var i = 0; i < s.length - 1; ++i) x = x[s[i]];
+                x[s[i]] = v;
+            }
+                : function (x, v) {
+                x[f] = v;
+            };
+        };
+
+        vg.comparator = function (sort) {
+            var sign = [];
+            if (sort === undefined) sort = [];
+            sort = vg.array(sort).map(function (f) {
+                var s = 1;
+                if (f[0] === "-") {
+                    s = -1;
+                    f = f.slice(1);
+                }
+                else if (f[0] === "+") {
+                    s = +1;
+                    f = f.slice(1);
+                }
+                sign.push(s);
+                return vg.accessor(f);
+            });
+            return function (a, b) {
+                var i, n, f, x, y;
+                for (i = 0, n = sort.length; i < n; ++i) {
+                    f = sort[i];
+                    x = f(a);
+                    y = f(b);
+                    if (x < y) return -1 * sign[i];
+                    if (x > y) return sign[i];
+                }
+                return 0;
+            };
+        };
+
+        vg.cmp = function (a, b) {
+            return a < b ? -1 : a > b ? 1 : 0;
+        };
+
+        vg.numcmp = function (a, b) {
+            return a - b;
+        };
+
+        vg.array = function (x) {
+            return x != null ? (vg.isArray(x) ? x : [x]) : [];
+        };
+
+        vg.values = function (x) {
+            return (vg.isObject(x) && !vg.isArray(x) && x.values) ? x.values : x;
+        };
+
+        vg.str = function (x) {
+            return vg.isArray(x) ? "[" + x.map(vg.str) + "]"
+                : vg.isObject(x) ? JSON.stringify(x)
+                : vg.isString(x) ? ("'" + vg_escape_str(x) + "'") : x;
+        };
+
+        var escape_str_re = /(^|[^\\])'/g;
+
+        function vg_escape_str(x) {
+            return x.replace(escape_str_re, "$1\\'");
+        }
+
+        vg.keys = function (x) {
+            var keys = [];
+            for (var key in x) keys.push(key);
+            return keys;
+        };
+
+        vg.unique = function (data, f, results) {
+            if (!vg.isArray(data) || data.length == 0) return [];
+            f = f || vg.identity;
+            results = results || [];
+            for (var v, i = 0, n = data.length; i < n; ++i) {
+                v = f(data[i]);
+                if (results.indexOf(v) < 0) results.push(v);
+            }
+            return results;
+        };
+
+        vg.minIndex = function (data, f) {
+            if (!vg.isArray(data) || data.length == 0) return -1;
+            f = f || vg.identity;
+            var idx = 0, min = f(data[0]), v = min;
+            for (var i = 1, n = data.length; i < n; ++i) {
+                v = f(data[i]);
+                if (v < min) {
+                    min = v;
+                    idx = i;
+                }
+            }
+            return idx;
+        };
+
+        vg.maxIndex = function (data, f) {
+            if (!vg.isArray(data) || data.length == 0) return -1;
+            f = f || vg.identity;
+            var idx = 0, max = f(data[0]), v = max;
+            for (var i = 1, n = data.length; i < n; ++i) {
+                v = f(data[i]);
+                if (v > max) {
+                    max = v;
+                    idx = i;
+                }
+            }
+            return idx;
+        };
+
+        vg.truncate = function (s, length, pos, word, ellipsis) {
+            var len = s.length;
+            if (len <= length) return s;
+            ellipsis = ellipsis || "...";
+            var l = Math.max(0, length - ellipsis.length);
+
+            switch (pos) {
+                case "left":
+                    return ellipsis + (word ? vg_truncateOnWord(s, l, 1) : s.slice(len - l));
+                case "middle":
+                case "center":
+                    var l1 = Math.ceil(l / 2), l2 = Math.floor(l / 2);
+                    return (word ? vg_truncateOnWord(s, l1) : s.slice(0, l1)) + ellipsis
+                        + (word ? vg_truncateOnWord(s, l2, 1) : s.slice(len - l2));
+                default:
+                    return (word ? vg_truncateOnWord(s, l) : s.slice(0, l)) + ellipsis;
+            }
+        }
+
+        function vg_truncateOnWord(s, len, rev) {
+            var cnt = 0, tok = s.split(vg_truncate_word_re);
+            if (rev) {
+                s = (tok = tok.reverse())
+                    .filter(function (w) {
+                        cnt += w.length;
+                        return cnt <= len;
+                    })
+                    .reverse();
+            } else {
+                s = tok.filter(function (w) {
+                    cnt += w.length;
+                    return cnt <= len;
+                });
+            }
+            return s.length ? s.join("").trim() : tok[0].slice(0, len);
+        }
+
+        var vg_truncate_word_re = /([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/;
+
+// Logging
+
+        function vg_write(msg) {
+            vg.config.isNode
+                ? process.stderr.write(msg + "\n")
+                : console.log(msg);
+        }
+
+        vg.log = function (msg) {
+            vg_write("[Vega Log] " + msg);
+        };
+
+        vg.error = function (msg) {
+            msg = "[Vega Err] " + msg;
+            vg_write(msg);
+            if (typeof alert !== "undefined") alert(msg);
+        };
+        vg.config = {};
+
+// are we running in node.js?
+// via timetler.com/2012/10/13/environment-detection-in-javascript/
+        vg.config.isNode = typeof exports !== 'undefined' && this.exports !== exports;
+
+// Allows domain restriction when using data loading via XHR.
+// To enable, set it to a list of allowed domains
+// e.g., ['wikipedia.org', 'eff.org']
+        vg.config.domainWhiteList = false;
+
+// If true, disable potentially unsafe transforms (filter, formula)
+// involving possible JavaScript injection attacks.
+        vg.config.safeMode = false;
+
+// base url for loading external data files
+// used only for server-side operation
+        vg.config.baseURL = "";
+
+// version and namepsaces for exported svg
+        vg.config.svgNamespace =
+            'version="1.1" xmlns="http://www.w3.org/2000/svg" ' +
+            'xmlns:xlink="http://www.w3.org/1999/xlink"';
+
+// inset padding for automatic padding calculation
+        vg.config.autopadInset = 5;
+
+// extensible scale lookup table
+// all d3.scale.* instances also supported
+        vg.config.scale = {
+            time: d3.time.scale,
+            utc: d3.time.scale.utc
+        };
+
+// default rendering settings
+        vg.config.render = {
+            lineWidth: 1,
+            lineCap: "butt",
+            font: "sans-serif",
+            fontSize: 11
+        };
+
+// default axis properties
+        vg.config.axis = {
+            orient: "bottom",
+            ticks: 10,
+            padding: 3,
+            axisColor: "#000",
+            gridColor: "#d8d8d8",
+            tickColor: "#000",
+            tickLabelColor: "#000",
+            axisWidth: 1,
+            tickWidth: 1,
+            tickSize: 6,
+            tickLabelFontSize: 11,
+            tickLabelFont: "sans-serif",
+            titleColor: "#000",
+            titleFont: "sans-serif",
+            titleFontSize: 11,
+            titleFontWeight: "bold",
+            titleOffset: 35
+        };
+
+// default legend properties
+        vg.config.legend = {
+            orient: "right",
+            offset: 10,
+            padding: 3,
+            gradientStrokeColor: "#888",
+            gradientStrokeWidth: 1,
+            gradientHeight: 16,
+            gradientWidth: 100,
+            labelColor: "#000",
+            labelFontSize: 10,
+            labelFont: "sans-serif",
+            labelAlign: "left",
+            labelBaseline: "middle",
+            labelOffset: 8,
+            symbolShape: "circle",
+            symbolSize: 50,
+            symbolColor: "#888",
+            symbolStrokeWidth: 1,
+            titleColor: "#000",
+            titleFont: "sans-serif",
+            titleFontSize: 11,
+            titleFontWeight: "bold"
+        };
+
+// default color values
+        vg.config.color = {
+            rgb: [128, 128, 128],
+            lab: [50, 0, 0],
+            hcl: [0, 0, 50],
+            hsl: [0, 0, 0.5]
+        };
+
+// default scale ranges
+        vg.config.range = {
+            category10: [
+                "#1f77b4",
+                "#ff7f0e",
+                "#2ca02c",
+                "#d62728",
+                "#9467bd",
+                "#8c564b",
+                "#e377c2",
+                "#7f7f7f",
+                "#bcbd22",
+                "#17becf"
+            ],
+            category20: [
+                "#1f77b4",
+                "#aec7e8",
+                "#ff7f0e",
+                "#ffbb78",
+                "#2ca02c",
+                "#98df8a",
+                "#d62728",
+                "#ff9896",
+                "#9467bd",
+                "#c5b0d5",
+                "#8c564b",
+                "#c49c94",
+                "#e377c2",
+                "#f7b6d2",
+                "#7f7f7f",
+                "#c7c7c7",
+                "#bcbd22",
+                "#dbdb8d",
+                "#17becf",
+                "#9edae5"
+            ],
+            shapes: [
+                "circle",
+                "cross",
+                "diamond",
+                "square",
+                "triangle-down",
+                "triangle-up"
+            ]
+        };
+        vg.Bounds = (function () {
+            var bounds = function (b) {
+                this.clear();
+                if (b) this.union(b);
+            };
+
+            var prototype = bounds.prototype;
+
+            prototype.clear = function () {
+                this.x1 = +Number.MAX_VALUE;
+                this.y1 = +Number.MAX_VALUE;
+                this.x2 = -Number.MAX_VALUE;
+                this.y2 = -Number.MAX_VALUE;
+                return this;
+            };
+
+            prototype.set = function (x1, y1, x2, y2) {
+                this.x1 = x1;
+                this.y1 = y1;
+                this.x2 = x2;
+                this.y2 = y2;
+                return this;
+            };
+
+            prototype.add = function (x, y) {
+                if (x < this.x1) this.x1 = x;
+                if (y < this.y1) this.y1 = y;
+                if (x > this.x2) this.x2 = x;
+                if (y > this.y2) this.y2 = y;
+                return this;
+            };
+
+            prototype.expand = function (d) {
+                this.x1 -= d;
+                this.y1 -= d;
+                this.x2 += d;
+                this.y2 += d;
+                return this;
+            };
+
+            prototype.round = function () {
+                this.x1 = Math.floor(this.x1);
+                this.y1 = Math.floor(this.y1);
+                this.x2 = Math.ceil(this.x2);
+                this.y2 = Math.ceil(this.y2);
+                return this;
+            };
+
+            prototype.translate = function (dx, dy) {
+                this.x1 += dx;
+                this.x2 += dx;
+                this.y1 += dy;
+                this.y2 += dy;
+                return this;
+            };
+
+            prototype.rotate = function (angle, x, y) {
+                var cos = Math.cos(angle),
+                    sin = Math.sin(angle),
+                    cx = x - x * cos + y * sin,
+                    cy = y - x * sin - y * cos,
+                    x1 = this.x1, x2 = this.x2,
+                    y1 = this.y1, y2 = this.y2;
+
+                return this.clear()
+                    .add(cos * x1 - sin * y1 + cx, sin * x1 + cos * y1 + cy)
+                    .add(cos * x1 - sin * y2 + cx, sin * x1 + cos * y2 + cy)
+                    .add(cos * x2 - sin * y1 + cx, sin * x2 + cos * y1 + cy)
+                    .add(cos * x2 - sin * y2 + cx, sin * x2 + cos * y2 + cy);
+            }
+
+            prototype.union = function (b) {
+                if (b.x1 < this.x1) this.x1 = b.x1;
+                if (b.y1 < this.y1) this.y1 = b.y1;
+                if (b.x2 > this.x2) this.x2 = b.x2;
+                if (b.y2 > this.y2) this.y2 = b.y2;
+                return this;
+            };
+
+            prototype.encloses = function (b) {
+                return b && (
+                        this.x1 <= b.x1 &&
+                        this.x2 >= b.x2 &&
+                        this.y1 <= b.y1 &&
+                        this.y2 >= b.y2
+                    );
+            };
+
+            prototype.intersects = function (b) {
+                return b && !(
+                        this.x2 < b.x1 ||
+                        this.x1 > b.x2 ||
+                        this.y2 < b.y1 ||
+                        this.y1 > b.y2
+                    );
+            };
+
+            prototype.contains = function (x, y) {
+                return !(
+                    x < this.x1 ||
+                    x > this.x2 ||
+                    y < this.y1 ||
+                    y > this.y2
+                );
+            };
+
+            prototype.width = function () {
+                return this.x2 - this.x1;
+            };
+
+            prototype.height = function () {
+                return this.y2 - this.y1;
+            };
+
+            return bounds;
+        })();
+        vg.Gradient = (function () {
+
+            function gradient(type) {
+                this.id = "grad_" + (vg_gradient_id++);
+                this.type = type || "linear";
+                this.stops = [];
+                this.x1 = 0;
+                this.x2 = 1;
+                this.y1 = 0;
+                this.y2 = 0;
+            };
+
+            var prototype = gradient.prototype;
+
+            prototype.stop = function (offset, color) {
+                this.stops.push({
+                    offset: offset,
+                    color: color
+                });
+                return this;
+            };
+
+            return gradient;
+        })();
+
+        var vg_gradient_id = 0;
+        vg.canvas = {};
+        vg.canvas.path = (function () {
+
+            // Path parsing and rendering code taken from fabric.js -- Thanks!
+            var cmdLength = {m: 2, l: 2, h: 1, v: 1, c: 6, s: 4, q: 4, t: 2, a: 7},
+                re = [/([MLHVCSQTAZmlhvcsqtaz])/g, /###/, /(\d)-/g, /\s|,|###/];
+
+            function parse(path) {
+                var result = [],
+                    currentPath,
+                    chunks,
+                    parsed;
+
+                // First, break path into command sequence
+                path = path.slice().replace(re[0], '###$1').split(re[1]).slice(1);
+
+                // Next, parse each command in turn
+                for (var i = 0, j, chunksParsed, len = path.length; i < len; i++) {
+                    currentPath = path[i];
+                    chunks = currentPath.slice(1).trim().replace(re[2], '$1###-').split(re[3]);
+                    chunksParsed = [currentPath.charAt(0)];
+
+                    for (var j = 0, jlen = chunks.length; j < jlen; j++) {
+                        parsed = parseFloat(chunks[j]);
+                        if (!isNaN(parsed)) {
+                            chunksParsed.push(parsed);
+                        }
+                    }
+
+                    var command = chunksParsed[0].toLowerCase(),
+                        commandLength = cmdLength[command];
+
+                    if (chunksParsed.length - 1 > commandLength) {
+                        for (var k = 1, klen = chunksParsed.length; k < klen; k += commandLength) {
+                            result.push([chunksParsed[0]].concat(chunksParsed.slice(k, k + commandLength)));
+                        }
+                    }
+                    else {
+                        result.push(chunksParsed);
+                    }
+                }
+
+                return result;
+            }
+
+            function drawArc(g, x, y, coords, bounds, l, t) {
+                var rx = coords[0];
+                var ry = coords[1];
+                var rot = coords[2];
+                var large = coords[3];
+                var sweep = coords[4];
+                var ex = coords[5];
+                var ey = coords[6];
+                var segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y);
+                for (var i = 0; i < segs.length; i++) {
+                    var bez = segmentToBezier.apply(null, segs[i]);
+                    g.bezierCurveTo.apply(g, bez);
+                    bounds.add(bez[0] - l, bez[1] - t);
+                    bounds.add(bez[2] - l, bez[3] - t);
+                    bounds.add(bez[4] - l, bez[5] - t);
+                }
+            }
+
+            function boundArc(x, y, coords, bounds) {
+                var rx = coords[0];
+                var ry = coords[1];
+                var rot = coords[2];
+                var large = coords[3];
+                var sweep = coords[4];
+                var ex = coords[5];
+                var ey = coords[6];
+                var segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y);
+                for (var i = 0; i < segs.length; i++) {
+                    var bez = segmentToBezier.apply(null, segs[i]);
+                    bounds.add(bez[0], bez[1]);
+                    bounds.add(bez[2], bez[3]);
+                    bounds.add(bez[4], bez[5]);
+                }
+            }
+
+            var arcToSegmentsCache = {},
+                segmentToBezierCache = {},
+                join = Array.prototype.join,
+                argsStr;
+
+            // Copied from Inkscape svgtopdf, thanks!
+            function arcToSegments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
+                argsStr = join.call(arguments);
+                if (arcToSegmentsCache[argsStr]) {
+                    return arcToSegmentsCache[argsStr];
+                }
+
+                var th = rotateX * (Math.PI / 180);
+                var sin_th = Math.sin(th);
+                var cos_th = Math.cos(th);
+                rx = Math.abs(rx);
+                ry = Math.abs(ry);
+                var px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5;
+                var py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5;
+                var pl = (px * px) / (rx * rx) + (py * py) / (ry * ry);
+                if (pl > 1) {
+                    pl = Math.sqrt(pl);
+                    rx *= pl;
+                    ry *= pl;
+                }
+
+                var a00 = cos_th / rx;
+                var a01 = sin_th / rx;
+                var a10 = (-sin_th) / ry;
+                var a11 = (cos_th) / ry;
+                var x0 = a00 * ox + a01 * oy;
+                var y0 = a10 * ox + a11 * oy;
+                var x1 = a00 * x + a01 * y;
+                var y1 = a10 * x + a11 * y;
+
+                var d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
+                var sfactor_sq = 1 / d - 0.25;
+                if (sfactor_sq < 0) sfactor_sq = 0;
+                var sfactor = Math.sqrt(sfactor_sq);
+                if (sweep == large) sfactor = -sfactor;
+                var xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0);
+                var yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0);
+
+                var th0 = Math.atan2(y0 - yc, x0 - xc);
+                var th1 = Math.atan2(y1 - yc, x1 - xc);
+
+                var th_arc = th1 - th0;
+                if (th_arc < 0 && sweep == 1) {
+                    th_arc += 2 * Math.PI;
+                } else if (th_arc > 0 && sweep == 0) {
+                    th_arc -= 2 * Math.PI;
+                }
+
+                var segments = Math.ceil(Math.abs(th_arc / (Math.PI * 0.5 + 0.001)));
+                var result = [];
+                for (var i = 0; i < segments; i++) {
+                    var th2 = th0 + i * th_arc / segments;
+                    var th3 = th0 + (i + 1) * th_arc / segments;
+                    result[i] = [xc, yc, th2, th3, rx, ry, sin_th, cos_th];
+                }
+
+                return (arcToSegmentsCache[argsStr] = result);
+            }
+
+            function segmentToBezier(cx, cy, th0, th1, rx, ry, sin_th, cos_th) {
+                argsStr = join.call(arguments);
+                if (segmentToBezierCache[argsStr]) {
+                    return segmentToBezierCache[argsStr];
+                }
+
+                var a00 = cos_th * rx;
+                var a01 = -sin_th * ry;
+                var a10 = sin_th * rx;
+                var a11 = cos_th * ry;
+
+                var cos_th0 = Math.cos(th0);
+                var sin_th0 = Math.sin(th0);
+                var cos_th1 = Math.cos(th1);
+                var sin_th1 = Math.sin(th1);
+
+                var th_half = 0.5 * (th1 - th0);
+                var sin_th_h2 = Math.sin(th_half * 0.5);
+                var t = (8 / 3) * sin_th_h2 * sin_th_h2 / Math.sin(th_half);
+                var x1 = cx + cos_th0 - t * sin_th0;
+                var y1 = cy + sin_th0 + t * cos_th0;
+                var x3 = cx + cos_th1;
+                var y3 = cy + sin_th1;
+                var x2 = x3 + t * sin_th1;
+                var y2 = y3 - t * cos_th1;
+
+                return (segmentToBezierCache[argsStr] = [
+                    a00 * x1 + a01 * y1, a10 * x1 + a11 * y1,
+                    a00 * x2 + a01 * y2, a10 * x2 + a11 * y2,
+                    a00 * x3 + a01 * y3, a10 * x3 + a11 * y3
+                ]);
+            }
+
+            function render(g, path, l, t) {
+                var current, // current instruction
+                    previous = null,
+                    x = 0, // current x
+                    y = 0, // current y
+                    controlX = 0, // current control point x
+                    controlY = 0, // current control point y
+                    tempX,
+                    tempY,
+                    tempControlX,
+                    tempControlY,
+                    bounds = new vg.Bounds();
+                if (l == undefined) l = 0;
+                if (t == undefined) t = 0;
+
+                g.beginPath();
+
+                for (var i = 0, len = path.length; i < len; ++i) {
+                    current = path[i];
+
+                    switch (current[0]) { // first letter
+
+                        case 'l': // lineto, relative
+                            x += current[1];
+                            y += current[2];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'L': // lineto, absolute
+                            x = current[1];
+                            y = current[2];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'h': // horizontal lineto, relative
+                            x += current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'H': // horizontal lineto, absolute
+                            x = current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'v': // vertical lineto, relative
+                            y += current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'V': // verical lineto, absolute
+                            y = current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'm': // moveTo, relative
+                            x += current[1];
+                            y += current[2];
+                            g.moveTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'M': // moveTo, absolute
+                            x = current[1];
+                            y = current[2];
+                            g.moveTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'c': // bezierCurveTo, relative
+                            tempX = x + current[5];
+                            tempY = y + current[6];
+                            controlX = x + current[3];
+                            controlY = y + current[4];
+                            g.bezierCurveTo(
+                                x + current[1] + l, // x1
+                                y + current[2] + t, // y1
+                                controlX + l, // x2
+                                controlY + t, // y2
+                                tempX + l,
+                                tempY + t
+                            );
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'C': // bezierCurveTo, absolute
+                            x = current[5];
+                            y = current[6];
+                            controlX = current[3];
+                            controlY = current[4];
+                            g.bezierCurveTo(
+                                current[1] + l,
+                                current[2] + t,
+                                controlX + l,
+                                controlY + t,
+                                x + l,
+                                y + t
+                            );
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(x, y);
+                            break;
+
+                        case 's': // shorthand cubic bezierCurveTo, relative
+                                  // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            g.bezierCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                x + current[1] + l,
+                                y + current[2] + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            bounds.add(controlX, controlY);
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(tempX, tempY);
+
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'S': // shorthand cubic bezierCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            g.bezierCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                current[1] + l,
+                                current[2] + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = current[1];
+                            controlY = current[2];
+
+                            break;
+
+                        case 'q': // quadraticCurveTo, relative
+                                  // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            g.quadraticCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'Q': // quadraticCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+
+                            g.quadraticCurveTo(
+                                current[1] + l,
+                                current[2] + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            controlX = current[1];
+                            controlY = current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 't': // shorthand quadraticCurveTo, relative
+
+                            // transform to absolute x,y
+                            tempX = x + current[1];
+                            tempY = y + current[2];
+
+                            if (previous[0].match(/[QqTt]/) === null) {
+                                // If there is no previous command or if the previous command was not a Q, q, T or t,
+                                // assume the control point is coincident with the current point
+                                controlX = x;
+                                controlY = y;
+                            }
+                            else if (previous[0] === 't') {
+                                // calculate reflection of previous control points for t
+                                controlX = 2 * x - tempControlX;
+                                controlY = 2 * y - tempControlY;
+                            }
+                            else if (previous[0] === 'q') {
+                                // calculate reflection of previous control points for q
+                                controlX = 2 * x - controlX;
+                                controlY = 2 * y - controlY;
+                            }
+
+                            tempControlX = controlX;
+                            tempControlY = controlY;
+
+                            g.quadraticCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'T':
+                            tempX = current[1];
+                            tempY = current[2];
+
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            g.quadraticCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'a':
+                            drawArc(g, x + l, y + t, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6] + x + l,
+                                current[7] + y + t
+                            ], bounds, l, t);
+                            x += current[6];
+                            y += current[7];
+                            break;
+
+                        case 'A':
+                            drawArc(g, x + l, y + t, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6] + l,
+                                current[7] + t
+                            ], bounds, l, t);
+                            x = current[6];
+                            y = current[7];
+                            break;
+
+                        case 'z':
+                        case 'Z':
+                            g.closePath();
+                            break;
+                    }
+                    previous = current;
+                }
+                return bounds.translate(l, t);
+            }
+
+            function bounds(path, bounds) {
+                var current, // current instruction
+                    previous = null,
+                    x = 0, // current x
+                    y = 0, // current y
+                    controlX = 0, // current control point x
+                    controlY = 0, // current control point y
+                    tempX,
+                    tempY,
+                    tempControlX,
+                    tempControlY;
+
+                for (var i = 0, len = path.length; i < len; ++i) {
+                    current = path[i];
+
+                    switch (current[0]) { // first letter
+
+                        case 'l': // lineto, relative
+                            x += current[1];
+                            y += current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'L': // lineto, absolute
+                            x = current[1];
+                            y = current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'h': // horizontal lineto, relative
+                            x += current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'H': // horizontal lineto, absolute
+                            x = current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'v': // vertical lineto, relative
+                            y += current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'V': // verical lineto, absolute
+                            y = current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'm': // moveTo, relative
+                            x += current[1];
+                            y += current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'M': // moveTo, absolute
+                            x = current[1];
+                            y = current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'c': // bezierCurveTo, relative
+                            tempX = x + current[5];
+                            tempY = y + current[6];
+                            controlX = x + current[3];
+                            controlY = y + current[4];
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'C': // bezierCurveTo, absolute
+                            x = current[5];
+                            y = current[6];
+                            controlX = current[3];
+                            controlY = current[4];
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(x, y);
+                            break;
+
+                        case 's': // shorthand cubic bezierCurveTo, relative
+                                  // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(tempX, tempY);
+
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'S': // shorthand cubic bezierCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = current[1];
+                            controlY = current[2];
+
+                            break;
+
+                        case 'q': // quadraticCurveTo, relative
+                                  // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'Q': // quadraticCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+
+                            x = tempX;
+                            y = tempY;
+                            controlX = current[1];
+                            controlY = current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 't': // shorthand quadraticCurveTo, relative
+
+                            // transform to absolute x,y
+                            tempX = x + current[1];
+                            tempY = y + current[2];
+
+                            if (previous[0].match(/[QqTt]/) === null) {
+                                // If there is no previous command or if the previous command was not a Q, q, T or t,
+                                // assume the control point is coincident with the current point
+                                controlX = x;
+                                controlY = y;
+                            }
+                            else if (previous[0] === 't') {
+                                // calculate reflection of previous control points for t
+                                controlX = 2 * x - tempControlX;
+                                controlY = 2 * y - tempControlY;
+                            }
+                            else if (previous[0] === 'q') {
+                                // calculate reflection of previous control points for q
+                                controlX = 2 * x - controlX;
+                                controlY = 2 * y - controlY;
+                            }
+
+                            tempControlX = controlX;
+                            tempControlY = controlY;
+
+                            x = tempX;
+                            y = tempY;
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'T':
+                            tempX = current[1];
+                            tempY = current[2];
+
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'a':
+                            boundArc(x, y, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6] + x,
+                                current[7] + y
+                            ], bounds);
+                            x += current[6];
+                            y += current[7];
+                            break;
+
+                        case 'A':
+                            boundArc(x, y, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6],
+                                current[7]
+                            ], bounds);
+                            x = current[6];
+                            y = current[7];
+                            break;
+
+                        case 'z':
+                        case 'Z':
+                            break;
+                    }
+                    previous = current;
+                }
+                return bounds;
+            }
+
+            function area(items) {
+                var o = items[0];
+                var area;
+
+                if (o.orient === "horizontal") {
+                    area = d3.svg.area()
+                        .y(function (d) {
+                            return d.y;
+                        })
+                        .x0(function (d) {
+                            return d.x;
+                        })
+                        .x1(function (d) {
+                            return d.x + d.width;
+                        });
+                } else {
+                    area = d3.svg.area()
+                        .x(function (d) {
+                            return d.x;
+                        })
+                        .y1(function (d) {
+                            return d.y;
+                        })
+                        .y0(function (d) {
+                            return d.y + d.height;
+                        });
+                }
+
+                if (o.interpolate) area.interpolate(o.interpolate);
+                if (o.tension != null) area.tension(o.tension);
+                return area(items);
+            }
+
+            function line(items) {
+                var o = items[0];
+                var line = d3.svg.line()
+                    .x(function (d) {
+                        return d.x;
+                    })
+                    .y(function (d) {
+                        return d.y;
+                    });
+                if (o.interpolate) line.interpolate(o.interpolate);
+                if (o.tension != null) line.tension(o.tension);
+                return line(items);
+            }
+
+            return {
+                parse: parse,
+                render: render,
+                bounds: bounds,
+                area: area,
+                line: line
+            };
+
+        })();
+        vg.canvas.marks = (function () {
+
+            var parsePath = vg.canvas.path.parse,
+                renderPath = vg.canvas.path.render,
+                halfpi = Math.PI / 2,
+                sqrt3 = Math.sqrt(3),
+                tan30 = Math.tan(30 * Math.PI / 180),
+                tmpBounds = new vg.Bounds();
+
+            // path generators
+
+            function arcPath(g, o) {
+                var x = o.x || 0,
+                    y = o.y || 0,
+                    ir = o.innerRadius || 0,
+                    or = o.outerRadius || 0,
+                    sa = (o.startAngle || 0) - Math.PI / 2,
+                    ea = (o.endAngle || 0) - Math.PI / 2;
+                g.beginPath();
+                if (ir === 0) g.moveTo(x, y);
+                else g.arc(x, y, ir, sa, ea, 0);
+                g.arc(x, y, or, ea, sa, 1);
+                g.closePath();
+            }
+
+            function areaPath(g, items) {
+                var o = items[0],
+                    m = o.mark,
+                    p = m.pathCache || (m.pathCache = parsePath(vg.canvas.path.area(items)));
+                renderPath(g, p);
+            }
+
+            function linePath(g, items) {
+                var o = items[0],
+                    m = o.mark,
+                    p = m.pathCache || (m.pathCache = parsePath(vg.canvas.path.line(items)));
+                renderPath(g, p);
+            }
+
+            function pathPath(g, o) {
+                if (o.path == null) return;
+                var p = o.pathCache || (o.pathCache = parsePath(o.path));
+                return renderPath(g, p, o.x, o.y);
+            }
+
+            function symbolPath(g, o) {
+                g.beginPath();
+                var size = o.size != null ? o.size : 100,
+                    x = o.x, y = o.y, r, t, rx, ry;
+
+                if (o.shape == null || o.shape === "circle") {
+                    r = Math.sqrt(size / Math.PI);
+                    g.arc(x, y, r, 0, 2 * Math.PI, 0);
+                    g.closePath();
+                    return;
+                }
+
+                switch (o.shape) {
+                    case "cross":
+                        r = Math.sqrt(size / 5) / 2;
+                        t = 3 * r;
+                        g.moveTo(x - t, y - r);
+                        g.lineTo(x - r, y - r);
+                        g.lineTo(x - r, y - t);
+                        g.lineTo(x + r, y - t);
+                        g.lineTo(x + r, y - r);
+                        g.lineTo(x + t, y - r);
+                        g.lineTo(x + t, y + r);
+                        g.lineTo(x + r, y + r);
+                        g.lineTo(x + r, y + t);
+                        g.lineTo(x - r, y + t);
+                        g.lineTo(x - r, y + r);
+                        g.lineTo(x - t, y + r);
+                        break;
+
+                    case "diamond":
+                        ry = Math.sqrt(size / (2 * tan30));
+                        rx = ry * tan30;
+                        g.moveTo(x, y - ry);
+                        g.lineTo(x + rx, y);
+                        g.lineTo(x, y + ry);
+                        g.lineTo(x - rx, y);
+                        break;
+
+                    case "square":
+                        t = Math.sqrt(size);
+                        r = t / 2;
+                        g.rect(x - r, y - r, t, t);
+                        break;
+
+                    case "triangle-down":
+                        rx = Math.sqrt(size / sqrt3);
+                        ry = rx * sqrt3 / 2;
+                        g.moveTo(x, y + ry);
+                        g.lineTo(x + rx, y - ry);
+                        g.lineTo(x - rx, y - ry);
+                        break;
+
+                    case "triangle-up":
+                        rx = Math.sqrt(size / sqrt3);
+                        ry = rx * sqrt3 / 2;
+                        g.moveTo(x, y - ry);
+                        g.lineTo(x + rx, y + ry);
+                        g.lineTo(x - rx, y + ry);
+                }
+                g.closePath();
+            }
+
+            function lineStroke(g, items) {
+                var o = items[0],
+                    lw = o.strokeWidth,
+                    lc = o.strokeCap;
+                g.lineWidth = lw != null ? lw : vg.config.render.lineWidth;
+                g.lineCap = lc != null ? lc : vg.config.render.lineCap;
+                linePath(g, items);
+            }
+
+            function ruleStroke(g, o) {
+                var x1 = o.x || 0,
+                    y1 = o.y || 0,
+                    x2 = o.x2 != null ? o.x2 : x1,
+                    y2 = o.y2 != null ? o.y2 : y1,
+                    lw = o.strokeWidth,
+                    lc = o.strokeCap;
+
+                g.lineWidth = lw != null ? lw : vg.config.render.lineWidth;
+                g.lineCap = lc != null ? lc : vg.config.render.lineCap;
+                g.beginPath();
+                g.moveTo(x1, y1);
+                g.lineTo(x2, y2);
+            }
+
+            // drawing functions
+
+            function drawPathOne(path, g, o, items) {
+                var fill = o.fill, stroke = o.stroke, opac, lc, lw;
+
+                path(g, items);
+
+                opac = o.opacity == null ? 1 : o.opacity;
+                if (opac == 0 || !fill && !stroke) return;
+
+                if (fill) {
+                    g.globalAlpha = opac * (o.fillOpacity == null ? 1 : o.fillOpacity);
+                    g.fillStyle = color(g, o, fill);
+                    g.fill();
+                }
+
+                if (stroke) {
+                    lw = (lw = o.strokeWidth) != null ? lw : vg.config.render.lineWidth;
+                    if (lw > 0) {
+                        g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                        g.strokeStyle = color(g, o, stroke);
+                        g.lineWidth = lw;
+                        g.lineCap = (lc = o.strokeCap) != null ? lc : vg.config.render.lineCap;
+                        g.vgLineDash(o.strokeDash || null);
+                        g.vgLineDashOffset(o.strokeDashOffset || 0);
+                        g.stroke();
+                    }
+                }
+            }
+
+            function drawPathAll(path, g, scene, bounds) {
+                var i, len, item;
+                for (i = 0, len = scene.items.length; i < len; ++i) {
+                    item = scene.items[i];
+                    if (bounds && !bounds.intersects(item.bounds))
+                        continue; // bounds check
+                    drawPathOne(path, g, item, item);
+                }
+            }
+
+            function drawRect(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items,
+                    o, fill, stroke, opac, lc, lw, x, y, w, h;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    x = o.x || 0;
+                    y = o.y || 0;
+                    w = o.width || 0;
+                    h = o.height || 0;
+
+                    opac = o.opacity == null ? 1 : o.opacity;
+                    if (opac == 0) continue;
+
+                    if (fill = o.fill) {
+                        g.globalAlpha = opac * (o.fillOpacity == null ? 1 : o.fillOpacity);
+                        g.fillStyle = color(g, o, fill);
+                        g.fillRect(x, y, w, h);
+                    }
+
+                    if (stroke = o.stroke) {
+                        lw = (lw = o.strokeWidth) != null ? lw : vg.config.render.lineWidth;
+                        if (lw > 0) {
+                            g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                            g.strokeStyle = color(g, o, stroke);
+                            g.lineWidth = lw;
+                            g.lineCap = (lc = o.strokeCap) != null ? lc : vg.config.render.lineCap;
+                            g.vgLineDash(o.strokeDash || null);
+                            g.vgLineDashOffset(o.strokeDashOffset || 0);
+                            g.strokeRect(x, y, w, h);
+                        }
+                    }
+                }
+            }
+
+            function drawRule(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items,
+                    o, stroke, opac, lc, lw, x1, y1, x2, y2;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    x1 = o.x || 0;
+                    y1 = o.y || 0;
+                    x2 = o.x2 != null ? o.x2 : x1;
+                    y2 = o.y2 != null ? o.y2 : y1;
+
+                    opac = o.opacity == null ? 1 : o.opacity;
+                    if (opac == 0) continue;
+
+                    if (stroke = o.stroke) {
+                        lw = (lw = o.strokeWidth) != null ? lw : vg.config.render.lineWidth;
+                        if (lw > 0) {
+                            g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                            g.strokeStyle = color(g, o, stroke);
+                            g.lineWidth = lw;
+                            g.lineCap = (lc = o.strokeCap) != null ? lc : vg.config.render.lineCap;
+                            g.vgLineDash(o.strokeDash || null);
+                            g.vgLineDashOffset(o.strokeDashOffset || 0);
+                            g.beginPath();
+                            g.moveTo(x1, y1);
+                            g.lineTo(x2, y2);
+                            g.stroke();
+                        }
+                    }
+                }
+            }
+
+            function drawImage(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var renderer = this,
+                    items = scene.items, o;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    if (!(o.image && o.image.url === o.url)) {
+                        o.image = renderer.loadImage(o.url);
+                        o.image.url = o.url;
+                    }
+
+                    var x, y, w, h, opac;
+                    w = o.width || (o.image && o.image.width) || 0;
+                    h = o.height || (o.image && o.image.height) || 0;
+                    x = (o.x || 0) - (o.align === "center"
+                            ? w / 2 : (o.align === "right" ? w : 0));
+                    y = (o.y || 0) - (o.baseline === "middle"
+                            ? h / 2 : (o.baseline === "bottom" ? h : 0));
+
+                    if (o.image.loaded) {
+                        g.globalAlpha = (opac = o.opacity) != null ? opac : 1;
+                        g.drawImage(o.image, x, y, w, h);
+                    }
+                }
+            }
+
+            function drawText(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items,
+                    o, fill, stroke, opac, lw, x, y, r, t;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    g.font = vg.scene.fontString(o);
+                    g.textAlign = o.align || "left";
+                    g.textBaseline = o.baseline || "alphabetic";
+
+                    opac = o.opacity == null ? 1 : o.opacity;
+                    if (opac == 0) continue;
+
+                    x = o.x || 0;
+                    y = o.y || 0;
+                    if (r = o.radius) {
+                        t = (o.theta || 0) - Math.PI / 2;
+                        x += r * Math.cos(t);
+                        y += r * Math.sin(t);
+                    }
+
+                    if (o.angle) {
+                        g.save();
+                        g.translate(x, y);
+                        g.rotate(o.angle * Math.PI / 180);
+                        x = o.dx || 0;
+                        y = o.dy || 0;
+                    } else {
+                        x += (o.dx || 0);
+                        y += (o.dy || 0);
+                    }
+
+                    if (fill = o.fill) {
+                        g.globalAlpha = opac * (o.fillOpacity == null ? 1 : o.fillOpacity);
+                        g.fillStyle = color(g, o, fill);
+                        g.fillText(o.text, x, y);
+                    }
+
+                    if (stroke = o.stroke) {
+                        lw = (lw = o.strokeWidth) != null ? lw : 1;
+                        if (lw > 0) {
+                            g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                            g.strokeStyle = color(o, stroke);
+                            g.lineWidth = lw;
+                            g.strokeText(o.text, x, y);
+                        }
+                    }
+
+                    if (o.angle) g.restore();
+                }
+            }
+
+            function drawAll(pathFunc) {
+                return function (g, scene, bounds) {
+                    drawPathAll(pathFunc, g, scene, bounds);
+                }
+            }
+
+            function drawOne(pathFunc) {
+                return function (g, scene, bounds) {
+                    if (!scene.items.length) return;
+                    if (bounds && !bounds.intersects(scene.items[0].bounds))
+                        return; // bounds check
+                    drawPathOne(pathFunc, g, scene.items[0], scene.items);
+                }
+            }
+
+            function drawGroup(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items, group, axes, legends,
+                    renderer = this, gx, gy, gb, i, n, j, m;
+
+                drawRect(g, scene, bounds);
+
+                for (i = 0, n = items.length; i < n; ++i) {
+                    group = items[i];
+                    axes = group.axisItems || [];
+                    legends = group.legendItems || [];
+                    gx = group.x || 0;
+                    gy = group.y || 0;
+
+                    // render group contents
+                    g.save();
+                    g.translate(gx, gy);
+                    if (group.clip) {
+                        g.beginPath();
+                        g.rect(0, 0, group.width || 0, group.height || 0);
+                        g.clip();
+                    }
+
+                    if (bounds) bounds.translate(-gx, -gy);
+
+                    for (j = 0, m = axes.length; j < m; ++j) {
+                        if (axes[j].def.layer === "back") {
+                            renderer.draw(g, axes[j], bounds);
+                        }
+                    }
+                    for (j = 0, m = group.items.length; j < m; ++j) {
+                        renderer.draw(g, group.items[j], bounds);
+                    }
+                    for (j = 0, m = axes.length; j < m; ++j) {
+                        if (axes[j].def.layer !== "back") {
+                            renderer.draw(g, axes[j], bounds);
+                        }
+                    }
+                    for (j = 0, m = legends.length; j < m; ++j) {
+                        renderer.draw(g, legends[j], bounds);
+                    }
+
+                    if (bounds) bounds.translate(gx, gy);
+                    g.restore();
+                }
+            }
+
+            function color(g, o, value) {
+                return (value.id)
+                    ? gradient(g, value, o.bounds)
+                    : value;
+            }
+
+            function gradient(g, p, b) {
+                var w = b.width(),
+                    h = b.height(),
+                    x1 = b.x1 + p.x1 * w,
+                    y1 = b.y1 + p.y1 * h,
+                    x2 = b.x1 + p.x2 * w,
+                    y2 = b.y1 + p.y2 * h,
+                    grad = g.createLinearGradient(x1, y1, x2, y2),
+                    stop = p.stops,
+                    i, n;
+
+                for (i = 0, n = stop.length; i < n; ++i) {
+                    grad.addColorStop(stop[i].offset, stop[i].color);
+                }
+                return grad;
+            }
+
+            // hit testing
+
+            function pickGroup(g, scene, x, y, gx, gy) {
+                if (scene.items.length === 0 ||
+                    scene.bounds && !scene.bounds.contains(gx, gy)) {
+                    return false;
+                }
+                var items = scene.items, subscene, group, hit, dx, dy,
+                    handler = this, i, j;
+
+                for (i = items.length; --i >= 0;) {
+                    group = items[i];
+                    dx = group.x || 0;
+                    dy = group.y || 0;
+
+                    g.save();
+                    g.translate(dx, dy);
+                    for (j = group.items.length; --j >= 0;) {
+                        subscene = group.items[j];
+                        if (subscene.interactive === false) continue;
+                        hit = handler.pick(subscene, x, y, gx - dx, gy - dy);
+                        if (hit) {
+                            g.restore();
+                            return hit;
+                        }
+                    }
+                    g.restore();
+                }
+
+                return scene.interactive
+                    ? pickAll(hitTests.group, g, scene, x, y, gx, gy)
+                    : false;
+            }
+
+            function pickAll(test, g, scene, x, y, gx, gy) {
+                if (!scene.items.length) return false;
+                var o, b, i;
+
+                if (g._ratio !== 1) {
+                    x *= g._ratio;
+                    y *= g._ratio;
+                }
+
+                for (i = scene.items.length; --i >= 0;) {
+                    o = scene.items[i];
+                    b = o.bounds;
+                    // first hit test against bounding box
+                    if ((b && !b.contains(gx, gy)) || !b) continue;
+                    // if in bounding box, perform more careful test
+                    if (test(g, o, x, y, gx, gy)) return o;
+                }
+                return false;
+            }
+
+            function pickArea(g, scene, x, y, gx, gy) {
+                if (!scene.items.length) return false;
+                var items = scene.items,
+                    o, b, i, di, dd, od, dx, dy;
+
+                b = items[0].bounds;
+                if (b && !b.contains(gx, gy)) return false;
+                if (g._ratio !== 1) {
+                    x *= g._ratio;
+                    y *= g._ratio;
+                }
+                if (!hitTests.area(g, items, x, y)) return false;
+                return items[0];
+            }
+
+            function pickLine(g, scene, x, y, gx, gy) {
+                if (!scene.items.length) return false;
+                var items = scene.items,
+                    o, b, i, di, dd, od, dx, dy;
+
+                b = items[0].bounds;
+                if (b && !b.contains(gx, gy)) return false;
+                if (g._ratio !== 1) {
+                    x *= g._ratio;
+                    y *= g._ratio;
+                }
+                if (!hitTests.line(g, items, x, y)) return false;
+                return items[0];
+            }
+
+            function pick(test) {
+                return function (g, scene, x, y, gx, gy) {
+                    return pickAll(test, g, scene, x, y, gx, gy);
+                };
+            }
+
+            function textHit(g, o, x, y, gx, gy) {
+                if (!o.fontSize) return false;
+                if (!o.angle) return true; // bounds sufficient if no rotation
+
+                var b = vg.scene.bounds.text(o, tmpBounds, true),
+                    a = -o.angle * Math.PI / 180,
+                    cos = Math.cos(a),
+                    sin = Math.sin(a),
+                    x = o.x,
+                    y = o.y,
+                    px = cos * gx - sin * gy + (x - x * cos + y * sin),
+                    py = sin * gx + cos * gy + (y - x * sin - y * cos);
+
+                return b.contains(px, py);
+            }
+
+            var hitTests = {
+                text: textHit,
+                rect: function (g, o, x, y) {
+                    return true;
+                }, // bounds test is sufficient
+                image: function (g, o, x, y) {
+                    return true;
+                }, // bounds test is sufficient
+                group: function (g, o, x, y) {
+                    return o.fill || o.stroke;
+                },
+                rule: function (g, o, x, y) {
+                    if (!g.isPointInStroke) return false;
+                    ruleStroke(g, o);
+                    return g.isPointInStroke(x, y);
+                },
+                line: function (g, s, x, y) {
+                    if (!g.isPointInStroke) return false;
+                    lineStroke(g, s);
+                    return g.isPointInStroke(x, y);
+                },
+                arc: function (g, o, x, y) {
+                    arcPath(g, o);
+                    return g.isPointInPath(x, y);
+                },
+                area: function (g, s, x, y) {
+                    areaPath(g, s);
+                    return g.isPointInPath(x, y);
+                },
+                path: function (g, o, x, y) {
+                    pathPath(g, o);
+                    return g.isPointInPath(x, y);
+                },
+                symbol: function (g, o, x, y) {
+                    symbolPath(g, o);
+                    return g.isPointInPath(x, y);
+                }
+            };
+
+            return {
+                draw: {
+                    group: drawGroup,
+                    area: drawOne(areaPath),
+                    line: drawOne(linePath),
+                    arc: drawAll(arcPath),
+                    path: drawAll(pathPath),
+                    symbol: drawAll(symbolPath),
+                    rect: drawRect,
+                    rule: drawRule,
+                    text: drawText,
+                    image: drawImage,
+                    drawOne: drawOne, // expose for extensibility
+                    drawAll: drawAll  // expose for extensibility
+                },
+                pick: {
+                    group: pickGroup,
+                    area: pickArea,
+                    line: pickLine,
+                    arc: pick(hitTests.arc),
+                    path: pick(hitTests.path),
+                    symbol: pick(hitTests.symbol),
+                    rect: pick(hitTests.rect),
+                    rule: pick(hitTests.rule),
+                    text: pick(hitTests.text),
+                    image: pick(hitTests.image),
+                    pickAll: pickAll  // expose for extensibility
+                }
+            };
+
+        })();
+        vg.canvas.Renderer = (function () {
+            var renderer = function () {
+                this._ctx = null;
+                this._el = null;
+                this._imgload = 0;
+            };
+
+            var prototype = renderer.prototype;
+
+            prototype.initialize = function (el, width, height, pad) {
+                this._el = el;
+
+                if (!el) return this; // early exit if no DOM element
+
+                // select canvas element
+                var canvas = d3.select(el)
+                    .selectAll("canvas.marks")
+                    .data([1]);
+
+                // create new canvas element if needed
+                canvas.enter()
+                    .append("canvas")
+                    .attr("class", "marks");
+
+                // remove extraneous canvas if needed
+                canvas.exit().remove();
+
+                return this.resize(width, height, pad);
+            };
+
+            prototype.resize = function (width, height, pad) {
+                this._width = width;
+                this._height = height;
+                this._padding = pad;
+
+                if (this._el) {
+                    var canvas = d3.select(this._el).select("canvas.marks");
+
+                    // initialize canvas attributes
+                    canvas
+                        .attr("width", width + pad.left + pad.right)
+                        .attr("height", height + pad.top + pad.bottom);
+
+                    // get the canvas graphics context
+                    var s;
+                    this._ctx = canvas.node().getContext("2d");
+                    this._ctx._ratio = (s = scaleCanvas(canvas.node(), this._ctx) || 1);
+                    this._ctx.setTransform(s, 0, 0, s, s * pad.left, s * pad.top);
+                }
+
+                initializeLineDash(this._ctx);
+                return this;
+            };
+
+            function scaleCanvas(canvas, ctx) {
+                // get canvas pixel data
+                var devicePixelRatio = window.devicePixelRatio || 1,
+                    backingStoreRatio = (
+                        ctx.webkitBackingStorePixelRatio ||
+                        ctx.mozBackingStorePixelRatio ||
+                        ctx.msBackingStorePixelRatio ||
+                        ctx.oBackingStorePixelRatio ||
+                        ctx.backingStorePixelRatio) || 1,
+                    ratio = devicePixelRatio / backingStoreRatio;
+
+                if (devicePixelRatio !== backingStoreRatio) {
+                    var w = canvas.width, h = canvas.height;
+                    // set actual and visible canvas size
+                    canvas.setAttribute("width", w * ratio);
+                    canvas.setAttribute("height", h * ratio);
+                    canvas.style.width = w + 'px';
+                    canvas.style.height = h + 'px';
+                }
+                return ratio;
+            }
+
+            function initializeLineDash(ctx) {
+                if (ctx.vgLineDash) return; // already set
+
+                var NODASH = [];
+                if (ctx.setLineDash) {
+                    ctx.vgLineDash = function (dash) {
+                        this.setLineDash(dash || NODASH);
+                    };
+                    ctx.vgLineDashOffset = function (off) {
+                        this.lineDashOffset = off;
+                    };
+                } else if (ctx.webkitLineDash !== undefined) {
+                    ctx.vgLineDash = function (dash) {
+                        this.webkitLineDash = dash || NODASH;
+                    };
+                    ctx.vgLineDashOffset = function (off) {
+                        this.webkitLineDashOffset = off;
+                    };
+                } else if (ctx.mozDash !== undefined) {
+                    ctx.vgLineDash = function (dash) {
+                        this.mozDash = dash;
+                    };
+                    ctx.vgLineDashOffset = function (off) { /* unsupported */
+                    };
+                } else {
+                    ctx.vgLineDash = function (dash) { /* unsupported */
+                    };
+                    ctx.vgLineDashOffset = function (off) { /* unsupported */
+                    };
+                }
+            }
+
+            prototype.context = function (ctx) {
+                if (ctx) {
+                    this._ctx = ctx;
+                    return this;
+                }
+                else return this._ctx;
+            };
+
+            prototype.element = function () {
+                return this._el;
+            };
+
+            prototype.pendingImages = function () {
+                return this._imgload;
+            };
+
+            function translatedBounds(item, bounds) {
+                var b = new vg.Bounds(bounds);
+                while ((item = item.mark.group) != null) {
+                    b.translate(item.x || 0, item.y || 0);
+                }
+                return b;
+            }
+
+            function getBounds(items) {
+                return !items ? null :
+                    vg.array(items).reduce(function (b, item) {
+                        return b.union(translatedBounds(item, item.bounds))
+                            .union(translatedBounds(item, item['bounds:prev']));
+                    }, new vg.Bounds());
+            }
+
+            function setBounds(g, bounds) {
+                var bbox = null;
+                if (bounds) {
+                    bbox = (new vg.Bounds(bounds)).round();
+                    g.beginPath();
+                    g.rect(bbox.x1, bbox.y1, bbox.width(), bbox.height());
+                    g.clip();
+                }
+                return bbox;
+            }
+
+            prototype.render = function (scene, items) {
+                var g = this._ctx,
+                    pad = this._padding,
+                    w = this._width + pad.left + pad.right,
+                    h = this._height + pad.top + pad.bottom,
+                    bb = null, bb2;
+
+                // setup
+                this._scene = scene;
+                g.save();
+                bb = setBounds(g, getBounds(items));
+                g.clearRect(-pad.left, -pad.top, w, h);
+
+                // render
+                this.draw(g, scene, bb);
+
+                // render again to handle possible bounds change
+                if (items) {
+                    g.restore();
+                    g.save();
+                    bb2 = setBounds(g, getBounds(items));
+                    if (!bb.encloses(bb2)) {
+                        g.clearRect(-pad.left, -pad.top, w, h);
+                        this.draw(g, scene, bb2);
+                    }
+                }
+
+                // takedown
+                g.restore();
+                this._scene = null;
+            };
+
+            prototype.draw = function (ctx, scene, bounds) {
+                var marktype = scene.marktype,
+                    renderer = vg.canvas.marks.draw[marktype];
+                renderer.call(this, ctx, scene, bounds);
+            };
+
+            prototype.renderAsync = function (scene) {
+                // TODO make safe for multiple scene rendering?
+                var renderer = this;
+                if (renderer._async_id) {
+                    clearTimeout(renderer._async_id);
+                }
+                renderer._async_id = setTimeout(function () {
+                    renderer.render(scene);
+                    delete renderer._async_id;
+                }, 50);
+            };
+
+            prototype.loadImage = function (uri) {
+                var renderer = this,
+                    scene = renderer._scene,
+                    image = null, url;
+
+                renderer._imgload += 1;
+                if (vg.config.isNode) {
+                    image = new (require("canvas").Image)();
+                    vg.data.load(uri, function (err, data) {
+                        if (err) {
+                            vg.error(err);
+                            return;
+                        }
+                        image.src = data;
+                        image.loaded = true;
+                        renderer._imgload -= 1;
+                    });
+                } else {
+                    image = new Image();
+                    url = vg.config.baseURL + uri;
+                    image.onload = function () {
+                        vg.log("LOAD IMAGE: " + url);
+                        image.loaded = true;
+                        renderer._imgload -= 1;
+                        renderer.renderAsync(scene);
+                    };
+                    image.src = url;
+                }
+
+                return image;
+            };
+
+            return renderer;
+        })();
+        vg.canvas.Handler = (function () {
+            var handler = function (el, model) {
+                this._active = null;
+                this._handlers = {};
+                if (el) this.initialize(el);
+                if (model) this.model(model);
+            };
+
+            var prototype = handler.prototype;
+
+            prototype.initialize = function (el, pad, obj) {
+                this._el = d3.select(el).node();
+                this._canvas = d3.select(el).select("canvas.marks").node();
+                this._padding = pad;
+                this._obj = obj || null;
+
+                // add event listeners
+                var canvas = this._canvas, that = this;
+                events.forEach(function (type) {
+                    canvas.addEventListener(type, function (evt) {
+                        prototype[type].call(that, evt);
+                    });
+                });
+
+                return this;
+            };
+
+            prototype.padding = function (pad) {
+                this._padding = pad;
+                return this;
+            };
+
+            prototype.model = function (model) {
+                if (!arguments.length) return this._model;
+                this._model = model;
+                return this;
+            };
+
+            prototype.handlers = function () {
+                var h = this._handlers;
+                return vg.keys(h).reduce(function (a, k) {
+                    return h[k].reduce(function (a, x) {
+                        return (a.push(x), a);
+                    }, a);
+                }, []);
+            };
+
+            // setup events
+            var events = [
+                "mousedown",
+                "mouseup",
+                "click",
+                "dblclick",
+                "wheel",
+                "keydown",
+                "keypress",
+                "keyup",
+                "mousewheel"
+            ];
+            events.forEach(function (type) {
+                prototype[type] = function (evt) {
+                    this.fire(type, evt);
+                };
+            });
+            events.push("mousemove");
+            events.push("mouseout");
+
+            function eventName(name) {
+                var i = name.indexOf(".");
+                return i < 0 ? name : name.slice(0, i);
+            }
+
+            prototype.mousemove = function (evt) {
+                var pad = this._padding,
+                    b = evt.target.getBoundingClientRect(),
+                    x = evt.clientX - b.left,
+                    y = evt.clientY - b.top,
+                    a = this._active,
+                    p = this.pick(this._model.scene(), x, y, x - pad.left, y - pad.top);
+
+                if (p === a) {
+                    this.fire("mousemove", evt);
+                    return;
+                } else if (a) {
+                    this.fire("mouseout", evt);
+                }
+                this._active = p;
+                if (p) {
+                    this.fire("mouseover", evt);
+                }
+            };
+
+            prototype.mouseout = function (evt) {
+                if (this._active) {
+                    this.fire("mouseout", evt);
+                }
+                this._active = null;
+            };
+
+            // to keep firefox happy
+            prototype.DOMMouseScroll = function (evt) {
+                this.fire("mousewheel", evt);
+            };
+
+            // fire an event
+            prototype.fire = function (type, evt) {
+                var a = this._active,
+                    h = this._handlers[type];
+                if (a && h) {
+                    for (var i = 0, len = h.length; i < len; ++i) {
+                        h[i].handler.call(this._obj, evt, a);
+                    }
+                }
+            };
+
+            // add an event handler
+            prototype.on = function (type, handler) {
+                var name = eventName(type),
+                    h = t

<TRUNCATED>

[23/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/d3.geomap.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/d3.geomap.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/d3.geomap.css
new file mode 100644
index 0000000..032984c
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/d3.geomap.css
@@ -0,0 +1,48 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+text {
+    fill: #333;
+    font-size: 12px;
+}
+
+.background {
+    fill: none;
+    pointer-events: all;
+}
+
+.unit {
+    cursor: pointer;
+    fill: #ccc;
+    stroke: #000;
+    stroke-width: 0.4px;
+}
+
+.legend-bg {
+    fill: #fff;
+    fill-opacity: 0.8;
+}
+
+.legend-bar {
+    stroke: #333;
+    stroke-width: 1px;
+}
+
+/*# sourceMappingURL=geomap.css.map */

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/igviz.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/igviz.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/igviz.css
new file mode 100644
index 0000000..627f176
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/igviz.css
@@ -0,0 +1,86 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+#rect {
+    fill: none;
+    stroke: rgb(0, 0, 0);
+    stroke-width: 2;
+}
+
+#rectCurve {
+    fill: none;
+    stroke: rgb(0, 0, 0);
+    stroke-width: 0.5;
+}
+
+.axis path,
+.axis line {
+    fill: none;
+    shape-rendering: crispEdges;
+    stroke: grey;
+    stroke-width: 2;
+}
+
+.line {
+    fill: none;
+    stroke: steelblue;
+    stroke-width: 1.5px;
+}
+
+.label {
+    font-size: 16.844px !important;
+}
+
+/* arc tween shit*/
+.background {
+    fill: #FFFFFF;
+    fill-opacity: 0.01;
+}
+
+.component {
+    fill: #e1e1e1;
+}
+
+.component .label {
+    font-family: Myriad, "Helvetic Neue", Helvetica, Arial;
+    text-anchor: middle;
+    fill: #0000FF;
+}
+
+.arc {
+    stroke-weight: 0.1;
+    fill: #4e8fff;
+}
+
+.arc2 {
+    stroke-weight: 0.1;
+    fill: #3660b0;
+}
+
+.label {
+    font-family: Myriad, "Helvetic Neue", Helvetica, Arial;
+    text-anchor: middle;
+}
+
+.labelArc {
+    font-family: Myriad, "Helvetic Neue", Helvetica, Arial;
+    text-anchor: middle;
+    fill: #0000FF;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/gadget.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/gadget.json b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/gadget.json
new file mode 100644
index 0000000..1d9cb1f
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/gadget.json
@@ -0,0 +1,19 @@
+{
+  "id": "Member_Details",
+  "title": "Member Details",
+  "type": "gadget",
+  "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png",
+  "data": {
+    "url": "local://store/carbon.super/gadget/Member_Information/index.xml"
+  },
+  "listen": {
+    "member-details-filter": {
+      "type": "address",
+      "description": "Used to filter based on state"
+    },
+    "auto-update": {
+      "type": "boolean",
+      "description": "Used to filter based on state"
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/index.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/index.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/index.xml
new file mode 100644
index 0000000..75ce04c
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/index.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Module>
+    <ModulePrefs title="Bar Chart"
+                 author="WSO2 Gadget Server"
+                 height="230"
+                 scrolling="true"
+                 tags="charts,bar,visualization,data"
+                 description="A generic Bar Chart gadget, that takes a json datasource as an input. It can be configured to fetch data in defined intervals. This gadget can be used to create dashboards with statistical data. This gadget can be reused as an iframe in any web page as it is self contained.">
+        <!-- This is used to import the pubsub-2 feature -->
+        <Require feature="pubsub-2">
+            <Param name="topics">
+                <![CDATA[
+                    <Topic title="member-details-filter" name="member-details-filter"
+                    description="Subscribes to member-status-filter channel" type="object"
+                    subscribe="true"/>
+                ]]>
+            </Param>
+        </Require>
+    </ModulePrefs>
+    <UserPref name="dataSource"
+              display_name="Data Source"
+              default_value="/portal/gadgets/bar-chart/datasource/dataFile4.jag">
+    </UserPref>
+    <!--UserPref name="options"
+              display_name="Chart Options"
+              default_value="/portal/gadgets/bar-chart/js/options-bar.js">
+    </UserPref-->
+    <UserPref name="updateGraph"
+              display_name="Update Interval (s)"
+              default_value="No">
+    </UserPref>
+    <Content type="html">
+        <![CDATA[
+             <html>
+             <head>
+                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+                <title>Bar Chart</title>
+                <link href="css/flot-graph.css" rel="stylesheet" type="text/css">
+                <link href="css/igviz.css" rel="stylesheet" type="text/css">
+                <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
+                <link href="css/d3.geomap.css" rel="stylesheet" type="text/css">
+                <script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script>
+                <script language="javascript" type="text/javascript" src="js/jquery.js"></script>
+                <script language="javascript" type="text/javascript" src="js/d3.min.js"></script>
+                <script language="javascript" type="text/javascript" src="js/vega.js"></script>
+                <script language="javascript" type="text/javascript" src="js/igviz.js"></script>
+                <script language="javascript" type="text/javascript" src="js/gadgetconf.js"></script>
+                <script language="javascript" type="text/javascript" src="js/outputAdapterUiLibrary.js"></script>
+                <script language="javascript" type="text/javascript" src="js/main.js"></script>
+                <script language="javascript" type="text/javascript" src="js/d3.geomap.dependencies.min.js"></script>
+                <script language="javascript" type="text/javascript" src="js/d3.geomap.min.js"></script>
+
+            </head>
+
+            <body>
+                <div id="placeholder" class="demo-placeholder" style="height:90%"></div>
+                <script language="javascript" type="text/javascript">
+                  if(jQuery("#placeholder").html() == ""){
+                    jQuery("#placeholder").append('<div id="noChart"><table><tr><td style="padding:30px 20px 0px 20px"><img src="../../portal/images/noEvents.png" align="left" style="width:24;height:24"/></td><td><br/><b><p><br/>Please select an application and cluster to view data</p></b></td></tr></table></div>');
+                  }
+                </script>
+            </body>
+            </html>
+    ]]>
+    </Content>
+</Module>
+
+


[03/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/artifact.xml
new file mode 100644
index 0000000..593f037
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="GadgetMemberStatus" version="1.0.0" type="dashboards/gadget" serverRole="DataAnalyticsServer">
+    <file>Member_Status</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/css/jquery-ui.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/css/jquery-ui.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/css/jquery-ui.css
new file mode 100644
index 0000000..1c22746
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/css/jquery-ui.css
@@ -0,0 +1,1225 @@
+/*! jQuery UI - v1.11.4 - 2015-03-11
+* http://jqueryui.com
+* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureE
 rror=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden {
+	display: none;
+}
+.ui-helper-hidden-accessible {
+	border: 0;
+	clip: rect(0 0 0 0);
+	height: 1px;
+	margin: -1px;
+	overflow: hidden;
+	padding: 0;
+	position: absolute;
+	width: 1px;
+}
+.ui-helper-reset {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	outline: 0;
+	line-height: 1.3;
+	text-decoration: none;
+	font-size: 100%;
+	list-style: none;
+}
+.ui-helper-clearfix:before,
+.ui-helper-clearfix:after {
+	content: "";
+	display: table;
+	border-collapse: collapse;
+}
+.ui-helper-clearfix:after {
+	clear: both;
+}
+.ui-helper-clearfix {
+	min-height: 0; /* support: IE7 */
+}
+.ui-helper-zfix {
+	width: 100%;
+	height: 100%;
+	top: 0;
+	left: 0;
+	position: absolute;
+	opacity: 0;
+	filter:Alpha(Opacity=0); /* support: IE8 */
+}
+
+.ui-front {
+	z-index: 100;
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled {
+	cursor: default !important;
+}
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+	display: block;
+	text-indent: -99999px;
+	overflow: hidden;
+	background-repeat: no-repeat;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay {
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+}
+.ui-accordion .ui-accordion-header {
+	display: block;
+	cursor: pointer;
+	position: relative;
+	margin: 2px 0 0 0;
+	padding: .5em .5em .5em .7em;
+	min-height: 0; /* support: IE7 */
+	font-size: 100%;
+}
+.ui-accordion .ui-accordion-icons {
+	padding-left: 2.2em;
+}
+.ui-accordion .ui-accordion-icons .ui-accordion-icons {
+	padding-left: 2.2em;
+}
+.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
+	position: absolute;
+	left: .5em;
+	top: 50%;
+	margin-top: -8px;
+}
+.ui-accordion .ui-accordion-content {
+	padding: 1em 2.2em;
+	border-top: 0;
+	overflow: auto;
+}
+.ui-autocomplete {
+	position: absolute;
+	top: 0;
+	left: 0;
+	cursor: default;
+}
+.ui-button {
+	display: inline-block;
+	position: relative;
+	padding: 0;
+	line-height: normal;
+	margin-right: .1em;
+	cursor: pointer;
+	vertical-align: middle;
+	text-align: center;
+	overflow: visible; /* removes extra width in IE */
+}
+.ui-button,
+.ui-button:link,
+.ui-button:visited,
+.ui-button:hover,
+.ui-button:active {
+	text-decoration: none;
+}
+/* to make room for the icon, a width needs to be set here */
+.ui-button-icon-only {
+	width: 2.2em;
+}
+/* button elements seem to need a little more width */
+button.ui-button-icon-only {
+	width: 2.4em;
+}
+.ui-button-icons-only {
+	width: 3.4em;
+}
+button.ui-button-icons-only {
+	width: 3.7em;
+}
+
+/* button text element */
+.ui-button .ui-button-text {
+	display: block;
+	line-height: normal;
+}
+.ui-button-text-only .ui-button-text {
+	padding: .4em 1em;
+}
+.ui-button-icon-only .ui-button-text,
+.ui-button-icons-only .ui-button-text {
+	padding: .4em;
+	text-indent: -9999999px;
+}
+.ui-button-text-icon-primary .ui-button-text,
+.ui-button-text-icons .ui-button-text {
+	padding: .4em 1em .4em 2.1em;
+}
+.ui-button-text-icon-secondary .ui-button-text,
+.ui-button-text-icons .ui-button-text {
+	padding: .4em 2.1em .4em 1em;
+}
+.ui-button-text-icons .ui-button-text {
+	padding-left: 2.1em;
+	padding-right: 2.1em;
+}
+/* no icon support for input elements, provide padding by default */
+input.ui-button {
+	padding: .4em 1em;
+}
+
+/* button icon element(s) */
+.ui-button-icon-only .ui-icon,
+.ui-button-text-icon-primary .ui-icon,
+.ui-button-text-icon-secondary .ui-icon,
+.ui-button-text-icons .ui-icon,
+.ui-button-icons-only .ui-icon {
+	position: absolute;
+	top: 50%;
+	margin-top: -8px;
+}
+.ui-button-icon-only .ui-icon {
+	left: 50%;
+	margin-left: -8px;
+}
+.ui-button-text-icon-primary .ui-button-icon-primary,
+.ui-button-text-icons .ui-button-icon-primary,
+.ui-button-icons-only .ui-button-icon-primary {
+	left: .5em;
+}
+.ui-button-text-icon-secondary .ui-button-icon-secondary,
+.ui-button-text-icons .ui-button-icon-secondary,
+.ui-button-icons-only .ui-button-icon-secondary {
+	right: .5em;
+}
+
+/* button sets */
+.ui-buttonset {
+	margin-right: 7px;
+}
+.ui-buttonset .ui-button {
+	margin-left: 0;
+	margin-right: -.3em;
+}
+
+/* workarounds */
+/* reset extra padding in Firefox, see h5bp.com/l */
+input.ui-button::-moz-focus-inner,
+button.ui-button::-moz-focus-inner {
+	border: 0;
+	padding: 0;
+}
+.ui-datepicker {
+	width: 17em;
+	padding: .2em .2em 0;
+	display: none;
+}
+.ui-datepicker .ui-datepicker-header {
+	position: relative;
+	padding: .2em 0;
+}
+.ui-datepicker .ui-datepicker-prev,
+.ui-datepicker .ui-datepicker-next {
+	position: absolute;
+	top: 2px;
+	width: 1.8em;
+	height: 1.8em;
+}
+.ui-datepicker .ui-datepicker-prev-hover,
+.ui-datepicker .ui-datepicker-next-hover {
+	top: 1px;
+}
+.ui-datepicker .ui-datepicker-prev {
+	left: 2px;
+}
+.ui-datepicker .ui-datepicker-next {
+	right: 2px;
+}
+.ui-datepicker .ui-datepicker-prev-hover {
+	left: 1px;
+}
+.ui-datepicker .ui-datepicker-next-hover {
+	right: 1px;
+}
+.ui-datepicker .ui-datepicker-prev span,
+.ui-datepicker .ui-datepicker-next span {
+	display: block;
+	position: absolute;
+	left: 50%;
+	margin-left: -8px;
+	top: 50%;
+	margin-top: -8px;
+}
+.ui-datepicker .ui-datepicker-title {
+	margin: 0 2.3em;
+	line-height: 1.8em;
+	text-align: center;
+}
+.ui-datepicker .ui-datepicker-title select {
+	font-size: 1em;
+	margin: 1px 0;
+}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year {
+	width: 45%;
+}
+.ui-datepicker table {
+	width: 100%;
+	font-size: .9em;
+	border-collapse: collapse;
+	margin: 0 0 .4em;
+}
+.ui-datepicker th {
+	padding: .7em .3em;
+	text-align: center;
+	font-weight: bold;
+	border: 0;
+}
+.ui-datepicker td {
+	border: 0;
+	padding: 1px;
+}
+.ui-datepicker td span,
+.ui-datepicker td a {
+	display: block;
+	padding: .2em;
+	text-align: right;
+	text-decoration: none;
+}
+.ui-datepicker .ui-datepicker-buttonpane {
+	background-image: none;
+	margin: .7em 0 0 0;
+	padding: 0 .2em;
+	border-left: 0;
+	border-right: 0;
+	border-bottom: 0;
+}
+.ui-datepicker .ui-datepicker-buttonpane button {
+	float: right;
+	margin: .5em .2em .4em;
+	cursor: pointer;
+	padding: .2em .6em .3em .6em;
+	width: auto;
+	overflow: visible;
+}
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
+	float: left;
+}
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi {
+	width: auto;
+}
+.ui-datepicker-multi .ui-datepicker-group {
+	float: left;
+}
+.ui-datepicker-multi .ui-datepicker-group table {
+	width: 95%;
+	margin: 0 auto .4em;
+}
+.ui-datepicker-multi-2 .ui-datepicker-group {
+	width: 50%;
+}
+.ui-datepicker-multi-3 .ui-datepicker-group {
+	width: 33.3%;
+}
+.ui-datepicker-multi-4 .ui-datepicker-group {
+	width: 25%;
+}
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
+	border-left-width: 0;
+}
+.ui-datepicker-multi .ui-datepicker-buttonpane {
+	clear: left;
+}
+.ui-datepicker-row-break {
+	clear: both;
+	width: 100%;
+	font-size: 0;
+}
+
+/* RTL support */
+.ui-datepicker-rtl {
+	direction: rtl;
+}
+.ui-datepicker-rtl .ui-datepicker-prev {
+	right: 2px;
+	left: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-next {
+	left: 2px;
+	right: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-prev:hover {
+	right: 1px;
+	left: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-next:hover {
+	left: 1px;
+	right: auto;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane {
+	clear: right;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane button {
+	float: left;
+}
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
+.ui-datepicker-rtl .ui-datepicker-group {
+	float: right;
+}
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
+	border-right-width: 0;
+	border-left-width: 1px;
+}
+.ui-dialog {
+	overflow: hidden;
+	position: absolute;
+	top: 0;
+	left: 0;
+	padding: .2em;
+	outline: 0;
+}
+.ui-dialog .ui-dialog-titlebar {
+	padding: .4em 1em;
+	position: relative;
+}
+.ui-dialog .ui-dialog-title {
+	float: left;
+	margin: .1em 0;
+	white-space: nowrap;
+	width: 90%;
+	overflow: hidden;
+	text-overflow: ellipsis;
+}
+.ui-dialog .ui-dialog-titlebar-close {
+	position: absolute;
+	right: .3em;
+	top: 50%;
+	width: 20px;
+	margin: -10px 0 0 0;
+	padding: 1px;
+	height: 20px;
+}
+.ui-dialog .ui-dialog-content {
+	position: relative;
+	border: 0;
+	padding: .5em 1em;
+	background: none;
+	overflow: auto;
+}
+.ui-dialog .ui-dialog-buttonpane {
+	text-align: left;
+	border-width: 1px 0 0 0;
+	background-image: none;
+	margin-top: .5em;
+	padding: .3em 1em .5em .4em;
+}
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
+	float: right;
+}
+.ui-dialog .ui-dialog-buttonpane button {
+	margin: .5em .4em .5em 0;
+	cursor: pointer;
+}
+.ui-dialog .ui-resizable-se {
+	width: 12px;
+	height: 12px;
+	right: -5px;
+	bottom: -5px;
+	background-position: 16px 16px;
+}
+.ui-draggable .ui-dialog-titlebar {
+	cursor: move;
+}
+.ui-draggable-handle {
+	-ms-touch-action: none;
+	touch-action: none;
+}
+.ui-menu {
+	list-style: none;
+	padding: 0;
+	margin: 0;
+	display: block;
+	outline: none;
+}
+.ui-menu .ui-menu {
+	position: absolute;
+}
+.ui-menu .ui-menu-item {
+	position: relative;
+	margin: 0;
+	padding: 3px 1em 3px .4em;
+	cursor: pointer;
+	min-height: 0; /* support: IE7 */
+	/* support: IE10, see #8844 */
+	list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
+}
+.ui-menu .ui-menu-divider {
+	margin: 5px 0;
+	height: 0;
+	font-size: 0;
+	line-height: 0;
+	border-width: 1px 0 0 0;
+}
+.ui-menu .ui-state-focus,
+.ui-menu .ui-state-active {
+	margin: -1px;
+}
+
+/* icon support */
+.ui-menu-icons {
+	position: relative;
+}
+.ui-menu-icons .ui-menu-item {
+	padding-left: 2em;
+}
+
+/* left-aligned */
+.ui-menu .ui-icon {
+	position: absolute;
+	top: 0;
+	bottom: 0;
+	left: .2em;
+	margin: auto 0;
+}
+
+/* right-aligned */
+.ui-menu .ui-menu-icon {
+	left: auto;
+	right: 0;
+}
+.ui-progressbar {
+	height: 2em;
+	text-align: left;
+	overflow: hidden;
+}
+.ui-progressbar .ui-progressbar-value {
+	margin: -1px;
+	height: 100%;
+}
+.ui-progressbar .ui-progressbar-overlay {
+	background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkEC
 QEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8
 aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
+	height: 100%;
+	filter: alpha(opacity=25); /* support: IE8 */
+	opacity: 0.25;
+}
+.ui-progressbar-indeterminate .ui-progressbar-value {
+	background-image: none;
+}
+.ui-resizable {
+	position: relative;
+}
+.ui-resizable-handle {
+	position: absolute;
+	font-size: 0.1px;
+	display: block;
+	-ms-touch-action: none;
+	touch-action: none;
+}
+.ui-resizable-disabled .ui-resizable-handle,
+.ui-resizable-autohide .ui-resizable-handle {
+	display: none;
+}
+.ui-resizable-n {
+	cursor: n-resize;
+	height: 7px;
+	width: 100%;
+	top: -5px;
+	left: 0;
+}
+.ui-resizable-s {
+	cursor: s-resize;
+	height: 7px;
+	width: 100%;
+	bottom: -5px;
+	left: 0;
+}
+.ui-resizable-e {
+	cursor: e-resize;
+	width: 7px;
+	right: -5px;
+	top: 0;
+	height: 100%;
+}
+.ui-resizable-w {
+	cursor: w-resize;
+	width: 7px;
+	left: -5px;
+	top: 0;
+	height: 100%;
+}
+.ui-resizable-se {
+	cursor: se-resize;
+	width: 12px;
+	height: 12px;
+	right: 1px;
+	bottom: 1px;
+}
+.ui-resizable-sw {
+	cursor: sw-resize;
+	width: 9px;
+	height: 9px;
+	left: -5px;
+	bottom: -5px;
+}
+.ui-resizable-nw {
+	cursor: nw-resize;
+	width: 9px;
+	height: 9px;
+	left: -5px;
+	top: -5px;
+}
+.ui-resizable-ne {
+	cursor: ne-resize;
+	width: 9px;
+	height: 9px;
+	right: -5px;
+	top: -5px;
+}
+.ui-selectable {
+	-ms-touch-action: none;
+	touch-action: none;
+}
+.ui-selectable-helper {
+	position: absolute;
+	z-index: 100;
+	border: 1px dotted black;
+}
+.ui-selectmenu-menu {
+	padding: 0;
+	margin: 0;
+	position: absolute;
+	top: 0;
+	left: 0;
+	display: none;
+}
+.ui-selectmenu-menu .ui-menu {
+	overflow: auto;
+	/* Support: IE7 */
+	overflow-x: hidden;
+	padding-bottom: 1px;
+}
+.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
+	font-size: 1em;
+	font-weight: bold;
+	line-height: 1.5;
+	padding: 2px 0.4em;
+	margin: 0.5em 0 0 0;
+	height: auto;
+	border: 0;
+}
+.ui-selectmenu-open {
+	display: block;
+}
+.ui-selectmenu-button {
+	display: inline-block;
+	overflow: hidden;
+	position: relative;
+	text-decoration: none;
+	cursor: pointer;
+}
+.ui-selectmenu-button span.ui-icon {
+	right: 0.5em;
+	left: auto;
+	margin-top: -8px;
+	position: absolute;
+	top: 50%;
+}
+.ui-selectmenu-button span.ui-selectmenu-text {
+	text-align: left;
+	padding: 0.4em 2.1em 0.4em 1em;
+	display: block;
+	line-height: 1.4;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+}
+.ui-slider {
+	position: relative;
+	text-align: left;
+}
+.ui-slider .ui-slider-handle {
+	position: absolute;
+	z-index: 2;
+	width: 1.2em;
+	height: 1.2em;
+	cursor: default;
+	-ms-touch-action: none;
+	touch-action: none;
+}
+.ui-slider .ui-slider-range {
+	position: absolute;
+	z-index: 1;
+	font-size: .7em;
+	display: block;
+	border: 0;
+	background-position: 0 0;
+}
+
+/* support: IE8 - See #6727 */
+.ui-slider.ui-state-disabled .ui-slider-handle,
+.ui-slider.ui-state-disabled .ui-slider-range {
+	filter: inherit;
+}
+
+.ui-slider-horizontal {
+	height: .8em;
+}
+.ui-slider-horizontal .ui-slider-handle {
+	top: -.3em;
+	margin-left: -.6em;
+}
+.ui-slider-horizontal .ui-slider-range {
+	top: 0;
+	height: 100%;
+}
+.ui-slider-horizontal .ui-slider-range-min {
+	left: 0;
+}
+.ui-slider-horizontal .ui-slider-range-max {
+	right: 0;
+}
+
+.ui-slider-vertical {
+	width: .8em;
+	height: 100px;
+}
+.ui-slider-vertical .ui-slider-handle {
+	left: -.3em;
+	margin-left: 0;
+	margin-bottom: -.6em;
+}
+.ui-slider-vertical .ui-slider-range {
+	left: 0;
+	width: 100%;
+}
+.ui-slider-vertical .ui-slider-range-min {
+	bottom: 0;
+}
+.ui-slider-vertical .ui-slider-range-max {
+	top: 0;
+}
+.ui-sortable-handle {
+	-ms-touch-action: none;
+	touch-action: none;
+}
+.ui-spinner {
+	position: relative;
+	display: inline-block;
+	overflow: hidden;
+	padding: 0;
+	vertical-align: middle;
+}
+.ui-spinner-input {
+	border: none;
+	background: none;
+	color: inherit;
+	padding: 0;
+	margin: .2em 0;
+	vertical-align: middle;
+	margin-left: .4em;
+	margin-right: 22px;
+}
+.ui-spinner-button {
+	width: 16px;
+	height: 50%;
+	font-size: .5em;
+	padding: 0;
+	margin: 0;
+	text-align: center;
+	position: absolute;
+	cursor: default;
+	display: block;
+	overflow: hidden;
+	right: 0;
+}
+/* more specificity required here to override default borders */
+.ui-spinner a.ui-spinner-button {
+	border-top: none;
+	border-bottom: none;
+	border-right: none;
+}
+/* vertically center icon */
+.ui-spinner .ui-icon {
+	position: absolute;
+	margin-top: -8px;
+	top: 50%;
+	left: 0;
+}
+.ui-spinner-up {
+	top: 0;
+}
+.ui-spinner-down {
+	bottom: 0;
+}
+
+/* TR overrides */
+.ui-spinner .ui-icon-triangle-1-s {
+	/* need to fix icons sprite */
+	background-position: -65px -16px;
+}
+.ui-tabs {
+	position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+	padding: .2em;
+}
+.ui-tabs .ui-tabs-nav {
+	margin: 0;
+	padding: .2em .2em 0;
+}
+.ui-tabs .ui-tabs-nav li {
+	list-style: none;
+	float: left;
+	position: relative;
+	top: 0;
+	margin: 1px .2em 0 0;
+	border-bottom-width: 0;
+	padding: 0;
+	white-space: nowrap;
+}
+.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
+	float: left;
+	padding: .5em 1em;
+	text-decoration: none;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active {
+	margin-bottom: -1px;
+	padding-bottom: 1px;
+}
+.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
+.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
+.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
+	cursor: text;
+}
+.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
+	cursor: pointer;
+}
+.ui-tabs .ui-tabs-panel {
+	display: block;
+	border-width: 0;
+	padding: 1em 1.4em;
+	background: none;
+}
+.ui-tooltip {
+	padding: 8px;
+	position: absolute;
+	z-index: 9999;
+	max-width: 300px;
+	-webkit-box-shadow: 0 0 5px #aaa;
+	box-shadow: 0 0 5px #aaa;
+}
+body .ui-tooltip {
+	border-width: 2px;
+}
+
+/* Component containers
+----------------------------------*/
+.ui-widget {
+	font-family: Verdana,Arial,sans-serif;
+	font-size: 1.1em;
+}
+.ui-widget .ui-widget {
+	font-size: 1em;
+}
+.ui-widget input,
+.ui-widget select,
+.ui-widget textarea,
+.ui-widget button {
+	font-family: Verdana,Arial,sans-serif;
+	font-size: 1em;
+}
+.ui-widget-content {
+	border: 1px solid #aaaaaa;
+	background: #ffffff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;
+	color: #222222;
+}
+.ui-widget-content a {
+	color: #222222;
+}
+.ui-widget-header {
+	border: 1px solid #aaaaaa;
+	background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
+	color: #222222;
+	font-weight: bold;
+}
+.ui-widget-header a {
+	color: #222222;
+}
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default,
+.ui-widget-content .ui-state-default,
+.ui-widget-header .ui-state-default {
+	border: 1px solid #d3d3d3;
+	background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
+	font-weight: normal;
+	color: #555555;
+}
+.ui-state-default a,
+.ui-state-default a:link,
+.ui-state-default a:visited {
+	color: #555555;
+	text-decoration: none;
+}
+.ui-state-hover,
+.ui-widget-content .ui-state-hover,
+.ui-widget-header .ui-state-hover,
+.ui-state-focus,
+.ui-widget-content .ui-state-focus,
+.ui-widget-header .ui-state-focus {
+	border: 1px solid #999999;
+	background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
+	font-weight: normal;
+	color: #212121;
+}
+.ui-state-hover a,
+.ui-state-hover a:hover,
+.ui-state-hover a:link,
+.ui-state-hover a:visited,
+.ui-state-focus a,
+.ui-state-focus a:hover,
+.ui-state-focus a:link,
+.ui-state-focus a:visited {
+	color: #212121;
+	text-decoration: none;
+}
+.ui-state-active,
+.ui-widget-content .ui-state-active,
+.ui-widget-header .ui-state-active {
+	border: 1px solid #aaaaaa;
+	background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
+	font-weight: normal;
+	color: #212121;
+}
+.ui-state-active a,
+.ui-state-active a:link,
+.ui-state-active a:visited {
+	color: #212121;
+	text-decoration: none;
+}
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight,
+.ui-widget-content .ui-state-highlight,
+.ui-widget-header .ui-state-highlight {
+	border: 1px solid #fcefa1;
+	background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
+	color: #363636;
+}
+.ui-state-highlight a,
+.ui-widget-content .ui-state-highlight a,
+.ui-widget-header .ui-state-highlight a {
+	color: #363636;
+}
+.ui-state-error,
+.ui-widget-content .ui-state-error,
+.ui-widget-header .ui-state-error {
+	border: 1px solid #cd0a0a;
+	background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
+	color: #cd0a0a;
+}
+.ui-state-error a,
+.ui-widget-content .ui-state-error a,
+.ui-widget-header .ui-state-error a {
+	color: #cd0a0a;
+}
+.ui-state-error-text,
+.ui-widget-content .ui-state-error-text,
+.ui-widget-header .ui-state-error-text {
+	color: #cd0a0a;
+}
+.ui-priority-primary,
+.ui-widget-content .ui-priority-primary,
+.ui-widget-header .ui-priority-primary {
+	font-weight: bold;
+}
+.ui-priority-secondary,
+.ui-widget-content .ui-priority-secondary,
+.ui-widget-header .ui-priority-secondary {
+	opacity: .7;
+	filter:Alpha(Opacity=70); /* support: IE8 */
+	font-weight: normal;
+}
+.ui-state-disabled,
+.ui-widget-content .ui-state-disabled,
+.ui-widget-header .ui-state-disabled {
+	opacity: .35;
+	filter:Alpha(Opacity=35); /* support: IE8 */
+	background-image: none;
+}
+.ui-state-disabled .ui-icon {
+	filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
+}
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+	width: 16px;
+	height: 16px;
+}
+.ui-icon,
+.ui-widget-content .ui-icon {
+	background-image: url("images/ui-icons_222222_256x240.png");
+}
+.ui-widget-header .ui-icon {
+	background-image: url("images/ui-icons_222222_256x240.png");
+}
+.ui-state-default .ui-icon {
+	background-image: url("images/ui-icons_888888_256x240.png");
+}
+.ui-state-hover .ui-icon,
+.ui-state-focus .ui-icon {
+	background-image: url("images/ui-icons_454545_256x240.png");
+}
+.ui-state-active .ui-icon {
+	background-image: url("images/ui-icons_454545_256x240.png");
+}
+.ui-state-highlight .ui-icon {
+	background-image: url("images/ui-icons_2e83ff_256x240.png");
+}
+.ui-state-error .ui-icon,
+.ui-state-error-text .ui-icon {
+	background-image: url("images/ui-icons_cd0a0a_256x240.png");
+}
+
+/* positioning */
+.ui-icon-blank { background-position: 16px 16px; }
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-on { background-position: -96px -144px; }
+.ui-icon-radio-off { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all,
+.ui-corner-top,
+.ui-corner-left,
+.ui-corner-tl {
+	border-top-left-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-top,
+.ui-corner-right,
+.ui-corner-tr {
+	border-top-right-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-bottom,
+.ui-corner-left,
+.ui-corner-bl {
+	border-bottom-left-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-bottom,
+.ui-corner-right,
+.ui-corner-br {
+	border-bottom-right-radius: 4px;
+}
+
+/* Overlays */
+.ui-widget-overlay {
+	background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
+	opacity: .3;
+	filter: Alpha(Opacity=30); /* support: IE8 */
+}
+.ui-widget-shadow {
+	margin: -8px 0 0 -8px;
+	padding: 8px;
+	background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
+	opacity: .3;
+	filter: Alpha(Opacity=30); /* support: IE8 */
+	border-radius: 8px;
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/css/style.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/css/style.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/css/style.css
new file mode 100644
index 0000000..3582ee4
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/css/style.css
@@ -0,0 +1,253 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+@import url('http://fonts.googleapis.com/css?family=Happy+Monkey');
+
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
+    margin: 0;
+    padding: 0;
+    border: 0;
+    font-size: 100%;
+    font: inherit;
+    vertical-align: baseline;
+    outline: none;
+    -webkit-font-smoothing: antialiased;
+    -webkit-text-size-adjust: 100%;
+    -ms-text-size-adjust: 100%;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+
+html {
+    overflow-y: scroll;
+}
+
+body {
+    font-size: 62.5%;
+    line-height: 1;
+    padding-bottom: 75px;
+    font-family: Helvetica, Arial, sans-serif;
+    background: #f3f3f3 url('paven.png'); /* http://subtlepatterns.com/paven/ */
+}
+
+br {
+    display: block;
+    line-height: 1.6em;
+}
+
+article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
+    display: block;
+}
+
+ol, ul {
+    list-style: none;
+}
+
+input, textarea {
+    -webkit-font-smoothing: antialiased;
+    -webkit-text-size-adjust: 100%;
+    -ms-text-size-adjust: 100%;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+    outline: none;
+}
+
+blockquote, q {
+    quotes: none;
+}
+
+blockquote:before, blockquote:after, q:before, q:after {
+    content: '';
+    content: none;
+}
+
+strong {
+    font-weight: bold;
+}
+
+table {
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+img {
+    border: 0;
+    max-width: 100%;
+}
+
+h1 {
+    font-family: 'Happy Monkey', 'Helvetica Neue', Arial, sans-serif;
+    font-size: 3.6em;
+    line-height: 1.4em;
+    margin-bottom: 12px;
+    color: #555;
+    text-align: center;
+}
+
+label {
+    display: block;
+    font-size: 1.1em;
+    font-weight: bold;
+    margin-bottom: 4px;
+    color: #777;
+
+}
+
+/* page structure */
+#w {
+    display: block;
+    width: 850px;
+    margin: 0 auto;
+}
+
+#content {
+    display: block;
+    margin-top: 30px;
+    padding: 15px 22px;
+    background: #fff;
+    -webkit-box-shadow: 1px 3px 1px rgba(0, 0, 0, 0.4);
+    -moz-box-shadow: 1px 3px 1px rgba(0, 0, 0, 0.4);
+    box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.4);
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.formrow {
+    display: block;
+    margin-bottom: 40px;
+}
+
+/* form styles */
+.basictxt {
+    display: block;
+    padding: 7px 8px;
+    width: 550px;
+    color: #555;
+    font-size: 1.5em;
+    border: 1px solid #ccc;
+    font-family: Helvetica, Arial, sans-serif;
+}
+
+.basictxtarea {
+    display: block;
+    padding: 8px 10px;
+    width: 600px;
+    height: 115px;
+    color: #555;
+    font-size: 1.6em;
+    border: 1px solid #ccc;
+    margin-bottom: 14px;
+    font-family: Helvetica, Arial, sans-serif;
+}
+
+.selectize-control {
+    width: 60%;
+}
+
+/* button styles: http://codepen.io/ben_jammin/pen/syaCq */
+.button::-moz-focus-inner {
+    border: 0;
+    padding: 0;
+}
+
+.button {
+    display: inline-block;
+    *display: inline;
+    zoom: 1;
+    padding: 6px 20px;
+    margin: 0;
+    cursor: pointer;
+    border: 1px solid #bbb;
+    overflow: visible;
+    font: bold 13px arial, helvetica, sans-serif;
+    text-decoration: none;
+    white-space: nowrap;
+    color: #555;
+    background-color: #ddd;
+    background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 1)), to(rgba(255, 255, 255, 0)));
+    background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
+    background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
+    background-image: -ms-linear-gradient(top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
+    background-image: -o-linear-gradient(top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
+    background-image: linear-gradient(top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
+    -webkit-transition: background-color .2s ease-out;
+    -moz-transition: background-color .2s ease-out;
+    -ms-transition: background-color .2s ease-out;
+    -o-transition: background-color .2s ease-out;
+    transition: background-color .2s ease-out;
+    background-clip: padding-box; /* Fix bleeding */
+    -moz-border-radius: 3px;
+    -webkit-border-radius: 3px;
+    border-radius: 3px;
+    -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
+    -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
+    box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 2px -1px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .3) inset;
+    text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+}
+
+.button:hover {
+    background-color: #eee;
+    color: #555;
+}
+
+.button:active {
+    background: #e9e9e9;
+    position: relative;
+    top: 1px;
+    text-shadow: none;
+    -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
+    -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
+    box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
+}
+
+.button[disabled], .button[disabled]:hover, .button[disabled]:active {
+    border-color: #eaeaea;
+    background: #fafafa;
+    cursor: default;
+    position: static;
+    color: #999;
+    /* Usually, !important should be avoided but here it's really needed :) */
+    -moz-box-shadow: none !important;
+    -webkit-box-shadow: none !important;
+    box-shadow: none !important;
+    text-shadow: none !important;
+}
+
+.button.large {
+    padding: 12px 30px;
+    text-transform: uppercase;
+}
+
+.button.large:active {
+    top: 2px;
+}
+
+.btn-div {
+    float: right;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/gadget.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/gadget.json b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/gadget.json
new file mode 100644
index 0000000..c88cb94
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/gadget.json
@@ -0,0 +1,23 @@
+{
+  "id": "Member_Status_Filter",
+  "title": "Member Status Filter",
+  "type": "gadget",
+  "thumbnail": "store://gadget/Member_Status_Filter/index.png",
+  "data": {
+    "url": "store://gadget/Member_Status_Filter/index.xml"
+  },
+  "styles": {
+    "borders": false,
+    "title": false
+  },
+  "notify": {
+    "member-status-filter": {
+      "type": "address",
+      "description": "This notifies time interval"
+    },
+    "cancel": {
+      "type": "boolean",
+      "description": "This notifies cancellation of state selection"
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/index.png
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/index.png b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/index.png
new file mode 100644
index 0000000..887bf48
Binary files /dev/null and b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/index.png differ

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/index.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/index.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/index.xml
new file mode 100644
index 0000000..3300e3d
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatusFilter/Member_Status_Filter/index.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Module>
+    <ModulePrefs title="Member Status Filter" description="Member Status Filter Gadget" height="150">
+        <!-- This is used to import the pubsub-2 feature -->
+        <Require feature="pubsub-2">
+            <Param name="topics">
+                <![CDATA[
+                    <Topic title="member-status-filter" name="member-status-filter" publish="true"/>
+                ]]>
+            </Param>
+        </Require>
+        <Require feature="dynamic-height"/>
+    </ModulePrefs>
+    <Content type="html">
+        <![CDATA[
+        <head>
+            <meta charset="utf-8">
+             <link href="/portal/css/bootstrap.min.css" rel="stylesheet" type="text/css">
+            <script src="/portal/js/jquery-1.10.2.js"></script>
+            <script language="javascript" type="text/javascript" src="js/member-status-filter.js"></script>
+        </head>
+        <body>
+          <form id="member-status" method="post" action="#">
+            <div class="container-fluid">
+                <div class="row">
+                    <div class="col-xs-4" id="application">
+                        <label for="application-filter">Application</label>
+                        <select id="application-filter">
+                            <option value="Select Application" disabled>Select Application</option>
+                        </select>
+                    </div>
+                    <div class="col-xs-3" id="cluster">
+                        <label for="cluster-filter">Cluster</label>
+                        <select id="cluster-filter">
+                            <option value="All Clusters" selected>All Clusters</option>
+                        </select>
+                    </div>
+                    <div class="btn-div col-xs-5" id="time-interval">
+                         <label for="time-selector">Time</label>
+                         <input type="button" class="button" value="30 Min" onClick="publish(this.value)">
+                         <input type="button" class="button" value="1 Hour" onClick="publish(this.value)">
+                         <input type="button" class="button" value="1 Day" onClick="publish(this.value)">
+                         <input type="button" class="button" value="1 Week" onClick="publish(this.value)">
+                         <input type="button" class="button" value="1 Month" onClick="publish(this.value)">
+                    </div>
+                </div>
+            </div>
+          </form>
+        </body>
+        ]]>
+    </Content>
+</Module>
\ No newline at end of file


[13/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/bootstrap.min.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/bootstrap.min.css
new file mode 100644
index 0000000..c65f62d
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/bootstrap.min.css
@@ -0,0 +1,5935 @@
+/*!
+ * Bootstrap v2.2.1
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix {
+    *zoom: 1;
+}
+
+.clearfix:before, .clearfix:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.clearfix:after {
+    clear: both;
+}
+
+.hide-text {
+    font: 0/0 a;
+    color: transparent;
+    text-shadow: none;
+    background-color: transparent;
+    border: 0;
+}
+
+.input-block-level {
+    display: block;
+    width: 100%;
+    min-height: 30px;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+
+article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {
+    display: block;
+}
+
+audio, canvas, video {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+}
+
+audio:not([controls]) {
+    display: none;
+}
+
+html {
+    font-size: 100%;
+    -webkit-text-size-adjust: 100%;
+    -ms-text-size-adjust: 100%;
+}
+
+a:focus {
+    outline: thin dotted #333;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+
+a:hover, a:active {
+    outline: 0;
+}
+
+sub, sup {
+    position: relative;
+    font-size: 75%;
+    line-height: 0;
+    vertical-align: baseline;
+}
+
+sup {
+    top: -0.5em;
+}
+
+sub {
+    bottom: -0.25em;
+}
+
+img {
+    max-width: 100%;
+    width: auto \9;
+    height: auto;
+    vertical-align: middle;
+    border: 0;
+    -ms-interpolation-mode: bicubic;
+}
+
+#map_canvas img, .google-maps img {
+    max-width: none;
+}
+
+button, input, select, textarea {
+    margin: 0;
+    font-size: 100%;
+    vertical-align: middle;
+}
+
+button, input {
+    *overflow: visible;
+    line-height: normal;
+}
+
+button::-moz-focus-inner, input::-moz-focus-inner {
+    padding: 0;
+    border: 0;
+}
+
+button, html input[type="button"], input[type="reset"], input[type="submit"] {
+    -webkit-appearance: button;
+    cursor: pointer;
+}
+
+input[type="search"] {
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+    -webkit-appearance: textfield;
+}
+
+input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button {
+    -webkit-appearance: none;
+}
+
+textarea {
+    overflow: auto;
+    vertical-align: top;
+}
+
+body {
+    margin: 0;
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+    font-size: 14px;
+    line-height: 20px;
+    color: #333333;
+    background-color: #ffffff;
+}
+
+a {
+    color: #0088cc;
+    text-decoration: none;
+}
+
+a:hover {
+    color: #005580;
+    text-decoration: underline;
+}
+
+.img-rounded {
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.img-polaroid {
+    padding: 4px;
+    background-color: #fff;
+    border: 1px solid #ccc;
+    border: 1px solid rgba(0, 0, 0, 0.2);
+    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+    -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+
+.img-circle {
+    -webkit-border-radius: 500px;
+    -moz-border-radius: 500px;
+    border-radius: 500px;
+}
+
+.row {
+    margin-left: -20px;
+    *zoom: 1;
+}
+
+.row:before, .row:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.row:after {
+    clear: both;
+}
+
+[class*="span"] {
+    float: left;
+    min-height: 1px;
+    margin-left: 20px;
+}
+
+.container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
+    width: 940px;
+}
+
+.span12 {
+    width: 940px;
+}
+
+.span11 {
+    width: 860px;
+}
+
+.span10 {
+    width: 780px;
+}
+
+.span9 {
+    width: 700px;
+}
+
+.span8 {
+    width: 620px;
+}
+
+.span7 {
+    width: 540px;
+}
+
+.span6 {
+    width: 460px;
+}
+
+.span5 {
+    width: 380px;
+}
+
+.span4 {
+    width: 300px;
+}
+
+.span3 {
+    width: 220px;
+}
+
+.span2 {
+    width: 140px;
+}
+
+.span1 {
+    width: 60px;
+}
+
+.offset12 {
+    margin-left: 980px;
+}
+
+.offset11 {
+    margin-left: 900px;
+}
+
+.offset10 {
+    margin-left: 820px;
+}
+
+.offset9 {
+    margin-left: 740px;
+}
+
+.offset8 {
+    margin-left: 660px;
+}
+
+.offset7 {
+    margin-left: 580px;
+}
+
+.offset6 {
+    margin-left: 500px;
+}
+
+.offset5 {
+    margin-left: 420px;
+}
+
+.offset4 {
+    margin-left: 340px;
+}
+
+.offset3 {
+    margin-left: 260px;
+}
+
+.offset2 {
+    margin-left: 180px;
+}
+
+.offset1 {
+    margin-left: 100px;
+}
+
+.row-fluid {
+    width: 100%;
+    *zoom: 1;
+}
+
+.row-fluid:before, .row-fluid:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.row-fluid:after {
+    clear: both;
+}
+
+.row-fluid [class*="span"] {
+    display: block;
+    width: 100%;
+    min-height: 30px;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+    float: left;
+    margin-left: 2.127659574468085%;
+    *margin-left: 2.074468085106383%;
+}
+
+.row-fluid [class*="span"]:first-child {
+    margin-left: 0;
+}
+
+.row-fluid .controls-row [class*="span"] + [class*="span"] {
+    margin-left: 2.127659574468085%;
+}
+
+.row-fluid .span12 {
+    width: 100%;
+    *width: 99.94680851063829%;
+}
+
+.row-fluid .span11 {
+    width: 91.48936170212765%;
+    *width: 91.43617021276594%;
+}
+
+.row-fluid .span10 {
+    width: 82.97872340425532%;
+    *width: 82.92553191489361%;
+}
+
+.row-fluid .span9 {
+    width: 74.46808510638297%;
+    *width: 74.41489361702126%;
+}
+
+.row-fluid .span8 {
+    width: 65.95744680851064%;
+    *width: 65.90425531914893%;
+}
+
+.row-fluid .span7 {
+    width: 57.44680851063829%;
+    *width: 57.39361702127659%;
+}
+
+.row-fluid .span6 {
+    width: 48.93617021276595%;
+    *width: 48.88297872340425%;
+}
+
+.row-fluid .span5 {
+    width: 40.42553191489362%;
+    *width: 40.37234042553192%;
+}
+
+.row-fluid .span4 {
+    width: 31.914893617021278%;
+    *width: 31.861702127659576%;
+}
+
+.row-fluid .span3 {
+    width: 23.404255319148934%;
+    *width: 23.351063829787233%;
+}
+
+.row-fluid .span2 {
+    width: 14.893617021276595%;
+    *width: 14.840425531914894%;
+}
+
+.row-fluid .span1 {
+    width: 6.382978723404255%;
+    *width: 6.329787234042553%;
+}
+
+.row-fluid .offset12 {
+    margin-left: 104.25531914893617%;
+    *margin-left: 104.14893617021275%;
+}
+
+.row-fluid .offset12:first-child {
+    margin-left: 102.12765957446808%;
+    *margin-left: 102.02127659574467%;
+}
+
+.row-fluid .offset11 {
+    margin-left: 95.74468085106382%;
+    *margin-left: 95.6382978723404%;
+}
+
+.row-fluid .offset11:first-child {
+    margin-left: 93.61702127659574%;
+    *margin-left: 93.51063829787232%;
+}
+
+.row-fluid .offset10 {
+    margin-left: 87.23404255319149%;
+    *margin-left: 87.12765957446807%;
+}
+
+.row-fluid .offset10:first-child {
+    margin-left: 85.1063829787234%;
+    *margin-left: 84.99999999999999%;
+}
+
+.row-fluid .offset9 {
+    margin-left: 78.72340425531914%;
+    *margin-left: 78.61702127659572%;
+}
+
+.row-fluid .offset9:first-child {
+    margin-left: 76.59574468085106%;
+    *margin-left: 76.48936170212764%;
+}
+
+.row-fluid .offset8 {
+    margin-left: 70.2127659574468%;
+    *margin-left: 70.10638297872339%;
+}
+
+.row-fluid .offset8:first-child {
+    margin-left: 68.08510638297872%;
+    *margin-left: 67.9787234042553%;
+}
+
+.row-fluid .offset7 {
+    margin-left: 61.70212765957446%;
+    *margin-left: 61.59574468085106%;
+}
+
+.row-fluid .offset7:first-child {
+    margin-left: 59.574468085106375%;
+    *margin-left: 59.46808510638297%;
+}
+
+.row-fluid .offset6 {
+    margin-left: 53.191489361702125%;
+    *margin-left: 53.085106382978715%;
+}
+
+.row-fluid .offset6:first-child {
+    margin-left: 51.063829787234035%;
+    *margin-left: 50.95744680851063%;
+}
+
+.row-fluid .offset5 {
+    margin-left: 44.68085106382979%;
+    *margin-left: 44.57446808510638%;
+}
+
+.row-fluid .offset5:first-child {
+    margin-left: 42.5531914893617%;
+    *margin-left: 42.4468085106383%;
+}
+
+.row-fluid .offset4 {
+    margin-left: 36.170212765957444%;
+    *margin-left: 36.06382978723405%;
+}
+
+.row-fluid .offset4:first-child {
+    margin-left: 34.04255319148936%;
+    *margin-left: 33.93617021276596%;
+}
+
+.row-fluid .offset3 {
+    margin-left: 27.659574468085104%;
+    *margin-left: 27.5531914893617%;
+}
+
+.row-fluid .offset3:first-child {
+    margin-left: 25.53191489361702%;
+    *margin-left: 25.425531914893618%;
+}
+
+.row-fluid .offset2 {
+    margin-left: 19.148936170212764%;
+    *margin-left: 19.04255319148936%;
+}
+
+.row-fluid .offset2:first-child {
+    margin-left: 17.02127659574468%;
+    *margin-left: 16.914893617021278%;
+}
+
+.row-fluid .offset1 {
+    margin-left: 10.638297872340425%;
+    *margin-left: 10.53191489361702%;
+}
+
+.row-fluid .offset1:first-child {
+    margin-left: 8.51063829787234%;
+    *margin-left: 8.404255319148938%;
+}
+
+[class*="span"].hide, .row-fluid [class*="span"].hide {
+    display: none;
+}
+
+[class*="span"].pull-right, .row-fluid [class*="span"].pull-right {
+    float: right;
+}
+
+.container {
+    margin-right: auto;
+    margin-left: auto;
+    *zoom: 1;
+}
+
+.container:before, .container:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.container:after {
+    clear: both;
+}
+
+.container-fluid {
+    padding-right: 20px;
+    padding-left: 20px;
+    *zoom: 1;
+}
+
+.container-fluid:before, .container-fluid:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.container-fluid:after {
+    clear: both;
+}
+
+p {
+    margin: 0 0 10px;
+}
+
+.lead {
+    margin-bottom: 20px;
+    font-size: 21px;
+    font-weight: 200;
+    line-height: 30px;
+}
+
+small {
+    font-size: 85%;
+}
+
+strong {
+    font-weight: bold;
+}
+
+em {
+    font-style: italic;
+}
+
+cite {
+    font-style: normal;
+}
+
+.muted {
+    color: #999999;
+}
+
+.text-warning {
+    color: #c09853;
+}
+
+a.text-warning:hover {
+    color: #a47e3c;
+}
+
+.text-error {
+    color: #b94a48;
+}
+
+a.text-error:hover {
+    color: #953b39;
+}
+
+.text-info {
+    color: #3a87ad;
+}
+
+a.text-info:hover {
+    color: #2d6987;
+}
+
+.text-success {
+    color: #468847;
+}
+
+a.text-success:hover {
+    color: #356635;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 10px 0;
+    font-family: inherit;
+    font-weight: bold;
+    line-height: 20px;
+    color: inherit;
+    text-rendering: optimizelegibility;
+}
+
+h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
+    font-weight: normal;
+    line-height: 1;
+    color: #999999;
+}
+
+h1, h2, h3 {
+    line-height: 40px;
+}
+
+h1 {
+    font-size: 38.5px;
+}
+
+h2 {
+    font-size: 31.5px;
+}
+
+h3 {
+    font-size: 24.5px;
+}
+
+h4 {
+    font-size: 17.5px;
+}
+
+h5 {
+    font-size: 14px;
+}
+
+h6 {
+    font-size: 11.9px;
+}
+
+h1 small {
+    font-size: 24.5px;
+}
+
+h2 small {
+    font-size: 17.5px;
+}
+
+h3 small {
+    font-size: 14px;
+}
+
+h4 small {
+    font-size: 14px;
+}
+
+.page-header {
+    padding-bottom: 9px;
+    margin: 20px 0 30px;
+    border-bottom: 1px solid #eeeeee;
+}
+
+ul, ol {
+    padding: 0;
+    margin: 0 0 10px 25px;
+}
+
+ul ul, ul ol, ol ol, ol ul {
+    margin-bottom: 0;
+}
+
+li {
+    line-height: 20px;
+}
+
+ul.unstyled, ol.unstyled {
+    margin-left: 0;
+    list-style: none;
+}
+
+dl {
+    margin-bottom: 20px;
+}
+
+dt, dd {
+    line-height: 20px;
+}
+
+dt {
+    font-weight: bold;
+}
+
+dd {
+    margin-left: 10px;
+}
+
+.dl-horizontal {
+    *zoom: 1;
+}
+
+.dl-horizontal:before, .dl-horizontal:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.dl-horizontal:after {
+    clear: both;
+}
+
+.dl-horizontal dt {
+    float: left;
+    width: 160px;
+    clear: left;
+    text-align: right;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+.dl-horizontal dd {
+    margin-left: 180px;
+}
+
+hr {
+    margin: 20px 0;
+    border: 0;
+    border-top: 1px solid #eeeeee;
+    border-bottom: 1px solid #ffffff;
+}
+
+abbr[title], abbr[data-original-title] {
+    cursor: help;
+    border-bottom: 1px dotted #999999;
+}
+
+abbr.initialism {
+    font-size: 90%;
+    text-transform: uppercase;
+}
+
+blockquote {
+    padding: 0 0 0 15px;
+    margin: 0 0 20px;
+    border-left: 5px solid #eeeeee;
+}
+
+blockquote p {
+    margin-bottom: 0;
+    font-size: 16px;
+    font-weight: 300;
+    line-height: 25px;
+}
+
+blockquote small {
+    display: block;
+    line-height: 20px;
+    color: #999999;
+}
+
+blockquote small:before {
+    content: '\2014 \00A0';
+}
+
+blockquote.pull-right {
+    float: right;
+    padding-right: 15px;
+    padding-left: 0;
+    border-right: 5px solid #eeeeee;
+    border-left: 0;
+}
+
+blockquote.pull-right p, blockquote.pull-right small {
+    text-align: right;
+}
+
+blockquote.pull-right small:before {
+    content: '';
+}
+
+blockquote.pull-right small:after {
+    content: '\00A0 \2014';
+}
+
+q:before, q:after, blockquote:before, blockquote:after {
+    content: "";
+}
+
+address {
+    display: block;
+    margin-bottom: 20px;
+    font-style: normal;
+    line-height: 20px;
+}
+
+code, pre {
+    padding: 0 3px 2px;
+    font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+    font-size: 12px;
+    color: #333333;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+code {
+    padding: 2px 4px;
+    color: #d14;
+    background-color: #f7f7f9;
+    border: 1px solid #e1e1e8;
+}
+
+pre {
+    display: block;
+    padding: 9.5px;
+    margin: 0 0 10px;
+    font-size: 13px;
+    line-height: 20px;
+    word-break: break-all;
+    word-wrap: break-word;
+    white-space: pre;
+    white-space: pre-wrap;
+    background-color: #f5f5f5;
+    border: 1px solid #ccc;
+    border: 1px solid rgba(0, 0, 0, 0.15);
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+pre.prettyprint {
+    margin-bottom: 20px;
+}
+
+pre code {
+    padding: 0;
+    color: inherit;
+    background-color: transparent;
+    border: 0;
+}
+
+.pre-scrollable {
+    max-height: 340px;
+    overflow-y: scroll;
+}
+
+.label, .badge {
+    display: inline-block;
+    padding: 2px 4px;
+    font-size: 11.844px;
+    font-weight: bold;
+    line-height: 14px;
+    color: #ffffff;
+    vertical-align: baseline;
+    white-space: nowrap;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #999999;
+}
+
+.label {
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+.badge {
+    padding-left: 9px;
+    padding-right: 9px;
+    -webkit-border-radius: 9px;
+    -moz-border-radius: 9px;
+    border-radius: 9px;
+}
+
+a.label:hover, a.badge:hover {
+    color: #ffffff;
+    text-decoration: none;
+    cursor: pointer;
+}
+
+.label-important, .badge-important {
+    background-color: #b94a48;
+}
+
+.label-important[href], .badge-important[href] {
+    background-color: #953b39;
+}
+
+.label-warning, .badge-warning {
+    background-color: #f89406;
+}
+
+.label-warning[href], .badge-warning[href] {
+    background-color: #c67605;
+}
+
+.label-success, .badge-success {
+    background-color: #468847;
+}
+
+.label-success[href], .badge-success[href] {
+    background-color: #356635;
+}
+
+.label-info, .badge-info {
+    background-color: #3a87ad;
+}
+
+.label-info[href], .badge-info[href] {
+    background-color: #2d6987;
+}
+
+.label-inverse, .badge-inverse {
+    background-color: #333333;
+}
+
+.label-inverse[href], .badge-inverse[href] {
+    background-color: #1a1a1a;
+}
+
+.btn .label, .btn .badge {
+    position: relative;
+    top: -1px;
+}
+
+.btn-mini .label, .btn-mini .badge {
+    top: 0;
+}
+
+table {
+    max-width: 100%;
+    background-color: transparent;
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+.table {
+    width: 100%;
+    margin-bottom: 20px;
+}
+
+.table th, .table td {
+    padding: 8px;
+    line-height: 20px;
+    text-align: left;
+    vertical-align: top;
+    border-top: 1px solid #dddddd;
+}
+
+.table th {
+    font-weight: bold;
+}
+
+.table thead th {
+    vertical-align: bottom;
+}
+
+.table caption + thead tr:first-child th, .table caption + thead tr:first-child td, .table colgroup + thead tr:first-child th, .table colgroup + thead tr:first-child td, .table thead:first-child tr:first-child th, .table thead:first-child tr:first-child td {
+    border-top: 0;
+}
+
+.table tbody + tbody {
+    border-top: 2px solid #dddddd;
+}
+
+.table-condensed th, .table-condensed td {
+    padding: 4px 5px;
+}
+
+.table-bordered {
+    border: 1px solid #dddddd;
+    border-collapse: separate;
+    *border-collapse: collapse;
+    border-left: 0;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.table-bordered th, .table-bordered td {
+    border-left: 1px solid #dddddd;
+}
+
+.table-bordered caption + thead tr:first-child th, .table-bordered caption + tbody tr:first-child th, .table-bordered caption + tbody tr:first-child td, .table-bordered colgroup + thead tr:first-child th, .table-bordered colgroup + tbody tr:first-child th, .table-bordered colgroup + tbody tr:first-child td, .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td {
+    border-top: 0;
+}
+
+.table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child {
+    -webkit-border-top-left-radius: 4px;
+    border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child {
+    -webkit-border-top-right-radius: 4px;
+    border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child, .table-bordered tfoot:last-child tr:last-child td:first-child {
+    -webkit-border-radius: 0 0 0 4px;
+    -moz-border-radius: 0 0 0 4px;
+    border-radius: 0 0 0 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child, .table-bordered tfoot:last-child tr:last-child td:last-child {
+    -webkit-border-bottom-right-radius: 4px;
+    border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+}
+
+.table-bordered caption + thead tr:first-child th:first-child, .table-bordered caption + tbody tr:first-child td:first-child, .table-bordered colgroup + thead tr:first-child th:first-child, .table-bordered colgroup + tbody tr:first-child td:first-child {
+    -webkit-border-top-left-radius: 4px;
+    border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered caption + thead tr:first-child th:last-child, .table-bordered caption + tbody tr:first-child td:last-child, .table-bordered colgroup + thead tr:first-child th:last-child, .table-bordered colgroup + tbody tr:first-child td:last-child {
+    -webkit-border-top-right-radius: 4px;
+    border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+}
+
+.table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th {
+    background-color: #f9f9f9;
+}
+
+.table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
+    background-color: #f5f5f5;
+}
+
+table td[class*="span"], table th[class*="span"], .row-fluid table td[class*="span"], .row-fluid table th[class*="span"] {
+    display: table-cell;
+    float: none;
+    margin-left: 0;
+}
+
+.table td.span1, .table th.span1 {
+    float: none;
+    width: 44px;
+    margin-left: 0;
+}
+
+.table td.span2, .table th.span2 {
+    float: none;
+    width: 124px;
+    margin-left: 0;
+}
+
+.table td.span3, .table th.span3 {
+    float: none;
+    width: 204px;
+    margin-left: 0;
+}
+
+.table td.span4, .table th.span4 {
+    float: none;
+    width: 284px;
+    margin-left: 0;
+}
+
+.table td.span5, .table th.span5 {
+    float: none;
+    width: 364px;
+    margin-left: 0;
+}
+
+.table td.span6, .table th.span6 {
+    float: none;
+    width: 444px;
+    margin-left: 0;
+}
+
+.table td.span7, .table th.span7 {
+    float: none;
+    width: 524px;
+    margin-left: 0;
+}
+
+.table td.span8, .table th.span8 {
+    float: none;
+    width: 604px;
+    margin-left: 0;
+}
+
+.table td.span9, .table th.span9 {
+    float: none;
+    width: 684px;
+    margin-left: 0;
+}
+
+.table td.span10, .table th.span10 {
+    float: none;
+    width: 764px;
+    margin-left: 0;
+}
+
+.table td.span11, .table th.span11 {
+    float: none;
+    width: 844px;
+    margin-left: 0;
+}
+
+.table td.span12, .table th.span12 {
+    float: none;
+    width: 924px;
+    margin-left: 0;
+}
+
+.table tbody tr.success td {
+    background-color: #dff0d8;
+}
+
+.table tbody tr.error td {
+    background-color: #f2dede;
+}
+
+.table tbody tr.warning td {
+    background-color: #fcf8e3;
+}
+
+.table tbody tr.info td {
+    background-color: #d9edf7;
+}
+
+.table-hover tbody tr.success:hover td {
+    background-color: #d0e9c6;
+}
+
+.table-hover tbody tr.error:hover td {
+    background-color: #ebcccc;
+}
+
+.table-hover tbody tr.warning:hover td {
+    background-color: #faf2cc;
+}
+
+.table-hover tbody tr.info:hover td {
+    background-color: #c4e3f3;
+}
+
+form {
+    margin: 0 0 20px;
+}
+
+fieldset {
+    padding: 0;
+    margin: 0;
+    border: 0;
+}
+
+legend {
+    display: block;
+    width: 100%;
+    padding: 0;
+    margin-bottom: 20px;
+    font-size: 21px;
+    line-height: 40px;
+    color: #333333;
+    border: 0;
+    border-bottom: 1px solid #e5e5e5;
+}
+
+legend small {
+    font-size: 15px;
+    color: #999999;
+}
+
+label, input, button, select, textarea {
+    font-size: 14px;
+    font-weight: normal;
+    line-height: 20px;
+}
+
+input, button, select, textarea {
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+label {
+    display: block;
+    margin-bottom: 5px;
+}
+
+select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
+    display: inline-block;
+    height: 20px;
+    padding: 4px 6px;
+    margin-bottom: 10px;
+    font-size: 14px;
+    line-height: 20px;
+    color: #555555;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    vertical-align: middle;
+}
+
+input, textarea, .uneditable-input {
+    width: 206px;
+}
+
+textarea {
+    height: auto;
+}
+
+textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
+    background-color: #ffffff;
+    border: 1px solid #cccccc;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -webkit-transition: border linear .2s, box-shadow linear .2s;
+    -moz-transition: border linear .2s, box-shadow linear .2s;
+    -o-transition: border linear .2s, box-shadow linear .2s;
+    transition: border linear .2s, box-shadow linear .2s;
+}
+
+textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus {
+    border-color: rgba(82, 168, 236, 0.8);
+    outline: 0;
+    outline: thin dotted \9;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(82, 168, 236, .6);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(82, 168, 236, .6);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(82, 168, 236, .6);
+}
+
+input[type="radio"], input[type="checkbox"] {
+    margin: 4px 0 0;
+    *margin-top: 0;
+    margin-top: 1px \9;
+    line-height: normal;
+    cursor: pointer;
+}
+
+input[type="file"], input[type="image"], input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"] {
+    width: auto;
+}
+
+select, input[type="file"] {
+    height: 30px;
+    *margin-top: 4px;
+    line-height: 30px;
+}
+
+select {
+    width: 220px;
+    border: 1px solid #cccccc;
+    background-color: #ffffff;
+}
+
+select[multiple], select[size] {
+    height: auto;
+}
+
+select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus {
+    outline: thin dotted #333;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+
+.uneditable-input, .uneditable-textarea {
+    color: #999999;
+    background-color: #fcfcfc;
+    border-color: #cccccc;
+    -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+    -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+    cursor: not-allowed;
+}
+
+.uneditable-input {
+    overflow: hidden;
+    white-space: nowrap;
+}
+
+.uneditable-textarea {
+    width: auto;
+    height: auto;
+}
+
+input:-moz-placeholder, textarea:-moz-placeholder {
+    color: #999999;
+}
+
+input:-ms-input-placeholder, textarea:-ms-input-placeholder {
+    color: #999999;
+}
+
+input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
+    color: #999999;
+}
+
+.radio, .checkbox {
+    min-height: 20px;
+    padding-left: 20px;
+}
+
+.radio input[type="radio"], .checkbox input[type="checkbox"] {
+    float: left;
+    margin-left: -20px;
+}
+
+.controls > .radio:first-child, .controls > .checkbox:first-child {
+    padding-top: 5px;
+}
+
+.radio.inline, .checkbox.inline {
+    display: inline-block;
+    padding-top: 5px;
+    margin-bottom: 0;
+    vertical-align: middle;
+}
+
+.radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
+    margin-left: 10px;
+}
+
+.input-mini {
+    width: 60px;
+}
+
+.input-small {
+    width: 90px;
+}
+
+.input-medium {
+    width: 150px;
+}
+
+.input-large {
+    width: 210px;
+}
+
+.input-xlarge {
+    width: 270px;
+}
+
+.input-xxlarge {
+    width: 530px;
+}
+
+input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"] {
+    float: none;
+    margin-left: 0;
+}
+
+.input-append input[class*="span"], .input-append .uneditable-input[class*="span"], .input-prepend input[class*="span"], .input-prepend .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"], .row-fluid .input-prepend [class*="span"], .row-fluid .input-append [class*="span"] {
+    display: inline-block;
+}
+
+input, textarea, .uneditable-input {
+    margin-left: 0;
+}
+
+.controls-row [class*="span"] + [class*="span"] {
+    margin-left: 20px;
+}
+
+input.span12, textarea.span12, .uneditable-input.span12 {
+    width: 926px;
+}
+
+input.span11, textarea.span11, .uneditable-input.span11 {
+    width: 846px;
+}
+
+input.span10, textarea.span10, .uneditable-input.span10 {
+    width: 766px;
+}
+
+input.span9, textarea.span9, .uneditable-input.span9 {
+    width: 686px;
+}
+
+input.span8, textarea.span8, .uneditable-input.span8 {
+    width: 606px;
+}
+
+input.span7, textarea.span7, .uneditable-input.span7 {
+    width: 526px;
+}
+
+input.span6, textarea.span6, .uneditable-input.span6 {
+    width: 446px;
+}
+
+input.span5, textarea.span5, .uneditable-input.span5 {
+    width: 366px;
+}
+
+input.span4, textarea.span4, .uneditable-input.span4 {
+    width: 286px;
+}
+
+input.span3, textarea.span3, .uneditable-input.span3 {
+    width: 206px;
+}
+
+input.span2, textarea.span2, .uneditable-input.span2 {
+    width: 126px;
+}
+
+input.span1, textarea.span1, .uneditable-input.span1 {
+    width: 46px;
+}
+
+.controls-row {
+    *zoom: 1;
+}
+
+.controls-row:before, .controls-row:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.controls-row:after {
+    clear: both;
+}
+
+.controls-row [class*="span"], .row-fluid .controls-row [class*="span"] {
+    float: left;
+}
+
+.controls-row .checkbox[class*="span"], .controls-row .radio[class*="span"] {
+    padding-top: 5px;
+}
+
+input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
+    cursor: not-allowed;
+    background-color: #eeeeee;
+}
+
+input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"][readonly], input[type="checkbox"][readonly] {
+    background-color: transparent;
+}
+
+.control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline {
+    color: #c09853;
+}
+
+.control-group.warning .checkbox, .control-group.warning .radio, .control-group.warning input, .control-group.warning select, .control-group.warning textarea {
+    color: #c09853;
+}
+
+.control-group.warning input, .control-group.warning select, .control-group.warning textarea {
+    border-color: #c09853;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus {
+    border-color: #a47e3c;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+}
+
+.control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on {
+    color: #c09853;
+    background-color: #fcf8e3;
+    border-color: #c09853;
+}
+
+.control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline {
+    color: #b94a48;
+}
+
+.control-group.error .checkbox, .control-group.error .radio, .control-group.error input, .control-group.error select, .control-group.error textarea {
+    color: #b94a48;
+}
+
+.control-group.error input, .control-group.error select, .control-group.error textarea {
+    border-color: #b94a48;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus {
+    border-color: #953b39;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+}
+
+.control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on {
+    color: #b94a48;
+    background-color: #f2dede;
+    border-color: #b94a48;
+}
+
+.control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline {
+    color: #468847;
+}
+
+.control-group.success .checkbox, .control-group.success .radio, .control-group.success input, .control-group.success select, .control-group.success textarea {
+    color: #468847;
+}
+
+.control-group.success input, .control-group.success select, .control-group.success textarea {
+    border-color: #468847;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus {
+    border-color: #356635;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+}
+
+.control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on {
+    color: #468847;
+    background-color: #dff0d8;
+    border-color: #468847;
+}
+
+.control-group.info > label, .control-group.info .help-block, .control-group.info .help-inline {
+    color: #3a87ad;
+}
+
+.control-group.info .checkbox, .control-group.info .radio, .control-group.info input, .control-group.info select, .control-group.info textarea {
+    color: #3a87ad;
+}
+
+.control-group.info input, .control-group.info select, .control-group.info textarea {
+    border-color: #3a87ad;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.info input:focus, .control-group.info select:focus, .control-group.info textarea:focus {
+    border-color: #2d6987;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+}
+
+.control-group.info .input-prepend .add-on, .control-group.info .input-append .add-on {
+    color: #3a87ad;
+    background-color: #d9edf7;
+    border-color: #3a87ad;
+}
+
+input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid {
+    color: #b94a48;
+    border-color: #ee5f5b;
+}
+
+input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus {
+    border-color: #e9322d;
+    -webkit-box-shadow: 0 0 6px #f8b9b7;
+    -moz-box-shadow: 0 0 6px #f8b9b7;
+    box-shadow: 0 0 6px #f8b9b7;
+}
+
+.form-actions {
+    padding: 19px 20px 20px;
+    margin-top: 20px;
+    margin-bottom: 20px;
+    background-color: #f5f5f5;
+    border-top: 1px solid #e5e5e5;
+    *zoom: 1;
+}
+
+.form-actions:before, .form-actions:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.form-actions:after {
+    clear: both;
+}
+
+.help-block, .help-inline {
+    color: #595959;
+}
+
+.help-block {
+    display: block;
+    margin-bottom: 10px;
+}
+
+.help-inline {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    vertical-align: middle;
+    padding-left: 5px;
+}
+
+.input-append, .input-prepend {
+    margin-bottom: 5px;
+    font-size: 0;
+    white-space: nowrap;
+}
+
+.input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input, .input-append .dropdown-menu, .input-prepend .dropdown-menu {
+    font-size: 14px;
+}
+
+.input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input {
+    position: relative;
+    margin-bottom: 0;
+    *margin-left: 0;
+    vertical-align: top;
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-append input:focus, .input-prepend input:focus, .input-append select:focus, .input-prepend select:focus, .input-append .uneditable-input:focus, .input-prepend .uneditable-input:focus {
+    z-index: 2;
+}
+
+.input-append .add-on, .input-prepend .add-on {
+    display: inline-block;
+    width: auto;
+    height: 20px;
+    min-width: 16px;
+    padding: 4px 5px;
+    font-size: 14px;
+    font-weight: normal;
+    line-height: 20px;
+    text-align: center;
+    text-shadow: 0 1px 0 #ffffff;
+    background-color: #eeeeee;
+    border: 1px solid #ccc;
+}
+
+.input-append .add-on, .input-prepend .add-on, .input-append .btn, .input-prepend .btn {
+    vertical-align: top;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.input-append .active, .input-prepend .active {
+    background-color: #a9dba9;
+    border-color: #46a546;
+}
+
+.input-prepend .add-on, .input-prepend .btn {
+    margin-right: -1px;
+}
+
+.input-prepend .add-on:first-child, .input-prepend .btn:first-child {
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.input-append input, .input-append select, .input-append .uneditable-input {
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.input-append input + .btn-group .btn, .input-append select + .btn-group .btn, .input-append .uneditable-input + .btn-group .btn {
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-append .add-on, .input-append .btn, .input-append .btn-group {
+    margin-left: -1px;
+}
+
+.input-append .add-on:last-child, .input-append .btn:last-child {
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append input, .input-prepend.input-append select, .input-prepend.input-append .uneditable-input {
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.input-prepend.input-append input + .btn-group .btn, .input-prepend.input-append select + .btn-group .btn, .input-prepend.input-append .uneditable-input + .btn-group .btn {
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child {
+    margin-right: -1px;
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.input-prepend.input-append .add-on:last-child, .input-prepend.input-append .btn:last-child {
+    margin-left: -1px;
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append .btn-group:first-child {
+    margin-left: 0;
+}
+
+input.search-query {
+    padding-right: 14px;
+    padding-right: 4px \9;
+    padding-left: 14px;
+    padding-left: 4px \9;
+    margin-bottom: 0;
+    -webkit-border-radius: 15px;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+}
+
+.form-search .input-append .search-query, .form-search .input-prepend .search-query {
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.form-search .input-append .search-query {
+    -webkit-border-radius: 14px 0 0 14px;
+    -moz-border-radius: 14px 0 0 14px;
+    border-radius: 14px 0 0 14px;
+}
+
+.form-search .input-append .btn {
+    -webkit-border-radius: 0 14px 14px 0;
+    -moz-border-radius: 0 14px 14px 0;
+    border-radius: 0 14px 14px 0;
+}
+
+.form-search .input-prepend .search-query {
+    -webkit-border-radius: 0 14px 14px 0;
+    -moz-border-radius: 0 14px 14px 0;
+    border-radius: 0 14px 14px 0;
+}
+
+.form-search .input-prepend .btn {
+    -webkit-border-radius: 14px 0 0 14px;
+    -moz-border-radius: 14px 0 0 14px;
+    border-radius: 14px 0 0 14px;
+}
+
+.form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input, .form-search .input-prepend, .form-inline .input-prepend, .form-horizontal .input-prepend, .form-search .input-append, .form-inline .input-append, .form-horizontal .input-append {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    margin-bottom: 0;
+    vertical-align: middle;
+}
+
+.form-search .hide, .form-inline .hide, .form-horizontal .hide {
+    display: none;
+}
+
+.form-search label, .form-inline label, .form-search .btn-group, .form-inline .btn-group {
+    display: inline-block;
+}
+
+.form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend {
+    margin-bottom: 0;
+}
+
+.form-search .radio, .form-search .checkbox, .form-inline .radio, .form-inline .checkbox {
+    padding-left: 0;
+    margin-bottom: 0;
+    vertical-align: middle;
+}
+
+.form-search .radio input[type="radio"], .form-search .checkbox input[type="checkbox"], .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] {
+    float: left;
+    margin-right: 3px;
+    margin-left: 0;
+}
+
+.control-group {
+    margin-bottom: 10px;
+}
+
+legend + .control-group {
+    margin-top: 20px;
+    -webkit-margin-top-collapse: separate;
+}
+
+.form-horizontal .control-group {
+    margin-bottom: 20px;
+    *zoom: 1;
+}
+
+.form-horizontal .control-group:before, .form-horizontal .control-group:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.form-horizontal .control-group:after {
+    clear: both;
+}
+
+.form-horizontal .control-label {
+    float: left;
+    width: 160px;
+    padding-top: 5px;
+    text-align: right;
+}
+
+.form-horizontal .controls {
+    *display: inline-block;
+    *padding-left: 20px;
+    margin-left: 180px;
+    *margin-left: 0;
+}
+
+.form-horizontal .controls:first-child {
+    *padding-left: 180px;
+}
+
+.form-horizontal .help-block {
+    margin-bottom: 0;
+}
+
+.form-horizontal input + .help-block, .form-horizontal select + .help-block, .form-horizontal textarea + .help-block {
+    margin-top: 10px;
+}
+
+.form-horizontal .form-actions {
+    padding-left: 180px;
+}
+
+.btn {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    padding: 4px 12px;
+    margin-bottom: 0;
+    font-size: 14px;
+    line-height: 20px;
+    *line-height: 20px;
+    text-align: center;
+    vertical-align: middle;
+    cursor: pointer;
+    color: #333333;
+    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+    background-color: #f5f5f5;
+    background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+    background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+    background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+    background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
+    border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #e6e6e6;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+    border: 1px solid #bbbbbb;
+    *border: 0;
+    border-bottom-color: #a2a2a2;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    *margin-left: .3em;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+}
+
+.btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled] {
+    color: #333333;
+    background-color: #e6e6e6;
+    *background-color: #d9d9d9;
+}
+
+.btn:active, .btn.active {
+    background-color: #cccccc \9;
+}
+
+.btn:first-child {
+    *margin-left: 0;
+}
+
+.btn:hover {
+    color: #333333;
+    text-decoration: none;
+    background-color: #e6e6e6;
+    *background-color: #d9d9d9;
+    background-position: 0 -15px;
+    -webkit-transition: background-position 0.1s linear;
+    -moz-transition: background-position 0.1s linear;
+    -o-transition: background-position 0.1s linear;
+    transition: background-position 0.1s linear;
+}
+
+.btn:focus {
+    outline: thin dotted #333;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+
+.btn.active, .btn:active {
+    background-color: #e6e6e6;
+    background-color: #d9d9d9 \9;
+    background-image: none;
+    outline: 0;
+    -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+}
+
+.btn.disabled, .btn[disabled] {
+    cursor: default;
+    background-color: #e6e6e6;
+    background-image: none;
+    opacity: 0.65;
+    filter: alpha(opacity=65);
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+}
+
+.btn-large {
+    padding: 11px 19px;
+    font-size: 17.5px;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.btn-large [class^="icon-"], .btn-large [class*=" icon-"] {
+    margin-top: 2px;
+}
+
+.btn-small {
+    padding: 2px 10px;
+    font-size: 11.9px;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+.btn-small [class^="icon-"], .btn-small [class*=" icon-"] {
+    margin-top: 0;
+}
+
+.btn-mini {
+    padding: 1px 6px;
+    font-size: 10.5px;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+.btn-block {
+    display: block;
+    width: 100%;
+    padding-left: 0;
+    padding-right: 0;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+
+.btn-block + .btn-block {
+    margin-top: 5px;
+}
+
+input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block {
+    width: 100%;
+}
+
+.btn-primary.active, .btn-warning.active, .btn-danger.active, .btn-success.active, .btn-info.active, .btn-inverse.active {
+    color: rgba(255, 255, 255, 0.75);
+}
+
+.btn {
+    border-color: #c5c5c5;
+    border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
+}
+
+.btn-primary {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #006dcc;
+    background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+    background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+    background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+    background-image: linear-gradient(to bottom, #0088cc, #0044cc);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
+    border-color: #0044cc #0044cc #002a80;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #0044cc;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-primary:hover, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] {
+    color: #ffffff;
+    background-color: #0044cc;
+    *background-color: #003bb3;
+}
+
+.btn-primary:active, .btn-primary.active {
+    background-color: #003399 \9;
+}
+
+.btn-warning {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #faa732;
+    background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+    background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+    background-image: -o-linear-gradient(top, #fbb450, #f89406);
+    background-image: linear-gradient(to bottom, #fbb450, #f89406);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
+    border-color: #f89406 #f89406 #ad6704;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #f89406;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-warning:hover, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] {
+    color: #ffffff;
+    background-color: #f89406;
+    *background-color: #df8505;
+}
+
+.btn-warning:active, .btn-warning.active {
+    background-color: #c67605 \9;
+}
+
+.btn-danger {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #da4f49;
+    background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+    background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+    background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+    background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
+    border-color: #bd362f #bd362f #802420;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #bd362f;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-danger:hover, .btn-danger:active, .btn-danger.active, .btn-danger.disabled, .btn-danger[disabled] {
+    color: #ffffff;
+    background-color: #bd362f;
+    *background-color: #a9302a;
+}
+
+.btn-danger:active, .btn-danger.active {
+    background-color: #942a25 \9;
+}
+
+.btn-success {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #5bb75b;
+    background-image: -moz-linear-gradient(top, #62c462, #51a351);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+    background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+    background-image: -o-linear-gradient(top, #62c462, #51a351);
+    background-image: linear-gradient(to bottom, #62c462, #51a351);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
+    border-color: #51a351 #51a351 #387038;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #51a351;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-success:hover, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] {
+    color: #ffffff;
+    background-color: #51a351;
+    *background-color: #499249;
+}
+
+.btn-success:active, .btn-success.active {
+    background-color: #408140 \9;
+}
+
+.btn-info {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #49afcd;
+    background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+    background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+    background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+    background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
+    border-color: #2f96b4 #2f96b4 #1f6377;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #2f96b4;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-info:hover, .btn-info:active, .btn-info.active, .btn-info.disabled, .btn-info[disabled] {
+    color: #ffffff;
+    background-color: #2f96b4;
+    *background-color: #2a85a0;
+}
+
+.btn-info:active, .btn-info.active {
+    background-color: #24748c \9;
+}
+
+.btn-inverse {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #363636;
+    background-image: -moz-linear-gradient(top, #444444, #222222);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
+    background-image: -webkit-linear-gradient(top, #444444, #222222);
+    background-image: -o-linear-gradient(top, #444444, #222222);
+    background-image: linear-gradient(to bottom, #444444, #222222);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
+    border-color: #222222 #222222 #000000;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #222222;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-inverse:hover, .btn-inverse:active, .btn-inverse.active, .btn-inverse.disabled, .btn-inverse[disabled] {
+    color: #ffffff;
+    background-color: #222222;
+    *background-color: #151515;
+}
+
+.btn-inverse:active, .btn-inverse.active {
+    background-color: #080808 \9;
+}
+
+button.btn, input[type="submit"].btn {
+    *padding-top: 3px;
+    *padding-bottom: 3px;
+}
+
+button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner {
+    padding: 0;
+    border: 0;
+}
+
+button.btn.btn-large, input[type="submit"].btn.btn-large {
+    *padding-top: 7px;
+    *padding-bottom: 7px;
+}
+
+button.btn.btn-small, input[type="submit"].btn.btn-small {
+    *padding-top: 3px;
+    *padding-bottom: 3px;
+}
+
+button.btn.btn-mini, input[type="submit"].btn.btn-mini {
+    *padding-top: 1px;
+    *padding-bottom: 1px;
+}
+
+.btn-link, .btn-link:active, .btn-link[disabled] {
+    background-color: transparent;
+    background-image: none;
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+}
+
+.btn-link {
+    border-color: transparent;
+    cursor: pointer;
+    color: #0088cc;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.btn-link:hover {
+    color: #005580;
+    text-decoration: underline;
+    background-color: transparent;
+}
+
+.btn-link[disabled]:hover {
+    color: #333333;
+    text-decoration: none;
+}
+
+.btn-group {
+    position: relative;
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    font-size: 0;
+    vertical-align: middle;
+    white-space: nowrap;
+    *margin-left: .3em;
+}
+
+.btn-group:first-child {
+    *margin-left: 0;
+}
+
+.btn-group + .btn-group {
+    margin-left: 5px;
+}
+
+.btn-toolbar {
+    font-size: 0;
+    margin-top: 10px;
+    margin-bottom: 10px;
+}
+
+.btn-toolbar .btn + .btn, .btn-toolbar .btn-group + .btn, .btn-toolbar .btn + .btn-group {
+    margin-left: 5px;
+}
+
+.btn-group > .btn {
+    position: relative;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.btn-group > .btn + .btn {
+    margin-left: -1px;
+}
+
+.btn-group > .btn, .btn-group > .dropdown-menu {
+    font-size: 14px;
+}
+
+.btn-group > .btn-mini {
+    font-size: 11px;
+}
+
+.btn-group > .btn-small {
+    font-size: 12px;
+}
+
+.btn-group > .btn-large {
+    font-size: 16px;
+}
+
+.btn-group > .btn:first-child {
+    margin-left: 0;
+    -webkit-border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+    border-top-left-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+    border-bottom-left-radius: 4px;
+}
+
+.btn-group > .btn:last-child, .btn-group > .dropdown-toggle {
+    -webkit-border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+    border-top-right-radius: 4px;
+    -webkit-border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+    border-bottom-right-radius: 4px;
+}
+
+.btn-group > .btn.large:first-child {
+    margin-left: 0;
+    -webkit-border-top-left-radius: 6px;
+    -moz-border-radius-topleft: 6px;
+    border-top-left-radius: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomleft: 6px;
+    border-bottom-left-radius: 6px;
+}
+
+.btn-group > .btn.large:last-child, .btn-group > .large.dropdown-toggle {
+    -webkit-border-top-right-radius: 6px;
+    -moz-border-radius-topright: 6px;
+    border-top-right-radius: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    border-bottom-right-radius: 6px;
+}
+
+.btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active {
+    z-index: 2;
+}
+
+.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
+    outline: 0;
+}
+
+.btn-group > .btn + .dropdown-toggle {
+    padding-left: 8px;
+    padding-right: 8px;
+    -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, .125), inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, .125), inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 1px 0 0 rgba(255, 255, 255, .125), inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    *padding-top: 5px;
+    *padding-bottom: 5px;
+}
+
+.btn-group > .btn-mini + .dropdown-toggle {
+    padding-left: 5px;
+    padding-right: 5px;
+    *padding-top: 2px;
+    *padding-bottom: 2px;
+}
+
+.btn-group > .btn-small + .dropdown-toggle {
+    *padding-top: 5px;
+    *padding-bottom: 4px;
+}
+
+.btn-group > .btn-large + .dropdown-toggle {
+    padding-left: 12px;
+    padding-right: 12px;
+    *padding-top: 7px;
+    *padding-bottom: 7px;
+}
+
+.btn-group.open .dropdown-toggle {
+    background-image: none;
+    -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+}
+
+.btn-group.open .btn.dropdown-toggle {
+    background-color: #e6e6e6;
+}
+
+.btn-group.open .btn-primary.dropdown-toggle {
+    background-color: #0044cc;
+}
+
+.btn-group.open .btn-warning.dropdown-toggle {
+    background-color: #f89406;
+}
+
+.btn-group.open .btn-danger.dropdown-toggle {
+    background-color: #bd362f;
+}
+
+.btn-group.open .btn-success.dropdown-toggle {
+    background-color: #51a351;
+}
+
+.btn-group.open .btn-info.dropdown-toggle {
+    background-color: #2f96b4;
+}
+
+.btn-group.open .btn-inverse.dropdown-toggle {
+    background-color: #222222;
+}
+
+.btn .caret {
+    margin-top: 8px;
+    margin-left: 0;
+}
+
+.btn-mini .caret, .btn-small .caret, .btn-large .caret {
+    margin-top: 6px;
+}
+
+.btn-large .caret {
+    border-left-width: 5px;
+    border-right-width: 5px;
+    border-top-width: 5px;
+}
+
+.dropup .btn-large .caret {
+    border-bottom-width: 5px;
+}
+
+.btn-primary .caret, .btn-warning .caret, .btn-danger .caret, .btn-info .caret, .btn-success .caret, .btn-inverse .caret {
+    border-top-color: #ffffff;
+    border-bottom-color: #ffffff;
+}
+
+.btn-group-vertical {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+}
+
+.btn-group-vertical .btn {
+    display: block;
+    float: none;
+    width: 100%;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.btn-group-vertical .btn + .btn {
+    margin-left: 0;
+    margin-top: -1px;
+}
+
+.btn-group-vertical .btn:first-child {
+    -webkit-border-radius: 4px 4px 0 0;
+    -moz-border-radius: 4px 4px 0 0;
+    border-radius: 4px 4px 0 0;
+}
+
+.btn-group-vertical .btn:last-child {
+    -webkit-border-radius: 0 0 4px 4px;
+    -moz-border-radius: 0 0 4px 4px;
+    border-radius: 0 0 4px 4px;
+}
+
+.btn-group-vertical .btn-large:first-child {
+    -webkit-border-radius: 6px 6px 0 0;
+    -moz-border-radius: 6px 6px 0 0;
+    border-radius: 6px 6px 0 0;
+}
+
+.btn-group-vertical .btn-large:last-child {
+    -webkit-border-radius: 0 0 6px 6px;
+    -moz-border-radius: 0 0 6px 6px;
+    border-radius: 0 0 6px 6px;
+}
+
+.nav {
+    margin-left: 0;
+    margin-bottom: 20px;
+    list-style: none;
+}
+
+.nav > li > a {
+    display: block;
+}
+
+.nav > li > a:hover {
+    text-decoration: none;
+    background-color: #eeeeee;
+}
+
+.nav > .pull-right {
+    float: right;
+}
+
+.nav-header {
+    display: block;
+    padding: 3px 15px;
+    font-size: 11px;
+    font-weight: bold;
+    line-height: 20px;
+    color: #999999;
+    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+    text-transform: uppercase;
+}
+
+.nav li + .nav-header {
+    margin-top: 9px;
+}
+
+.nav-list {
+    padding-left: 15px;
+    padding-right: 15px;
+    margin-bottom: 0;
+}
+
+.nav-list > li > a, .nav-list .nav-header {
+    margin-left: -15px;
+    margin-right: -15px;
+    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+
+.nav-list > li > a {
+    padding: 3px 15px;
+}
+
+.nav-list > .active > a, .nav-list > .active > a:hover {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+    background-color: #0088cc;
+}
+
+.nav-list [class^="icon-"], .nav-list [class*=" icon-"] {
+    margin-right: 2px;
+}
+
+.nav-list .divider {
+    *width: 100%;
+    height: 1px;
+    margin: 9px 1px;
+    *margin: -5px 0 5px;
+    overflow: hidden;
+    background-color: #e5e5e5;
+    border-bottom: 1px solid #ffffff;
+}
+
+.nav-tabs, .nav-pills {
+    *zoom: 1;
+}
+
+.nav-tabs:before, .nav-pills:before, .nav-tabs:after, .nav-pills:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.nav-tabs:after, .nav-pills:after {
+    clear: both;
+}
+
+.nav-tabs > li, .nav-pills > li {
+    float: left;
+}
+
+.nav-tabs > li > a, .nav-pills > li > a {
+    padding-right: 12px;
+    padding-left: 12px;
+    margin-right: 2px;
+    line-height: 14px;
+}
+
+.nav-tabs {
+    border-bottom: 1px solid #ddd;
+}
+
+.nav-tabs > li {
+    margin-bottom: -1px;
+}
+
+.nav-tabs > li > a {
+    padding-top: 8px;
+    padding-bottom: 8px;
+    line-height: 20px;
+    border: 1px solid transparent;
+    -webkit-border-radius: 4px 4px 0 0;
+    -moz-border-radius: 4px 4px 0 0;
+    border-radius: 4px 4px 0 0;
+}
+
+.nav-tabs > li > a:hover {
+    border-color: #eeeeee #eeeeee #dddddd;
+}
+
+.nav-tabs > .active > a, .nav-tabs > .active > a:hover {
+    color: #555555;
+    background-color: #ffffff;
+    border: 1px solid #ddd;
+    border-bottom-color: transparent;
+    cursor: default;
+}
+
+.nav-pills > li > a {
+    padding-top: 8px;
+    padding-bottom: 8px;
+    margin-top: 2px;
+    margin-bottom: 2px;
+    -webkit-border-radius: 5px;
+    -moz-border-radius: 5px;
+    border-radius: 5px;
+}
+
+.nav-pills > .active > a, .nav-pills > .active > a:hover {
+    color: #ffffff;
+    background-color: #0088cc;
+}
+
+.nav-stacked > li {
+    float: none;
+}
+
+.nav-stacked > li > a {
+    margin-right: 0;
+}
+
+.nav-tabs.nav-stacked {
+    border-bottom: 0;
+}
+
+.nav-tabs.nav-stacked > li > a {
+    border: 1px solid #ddd;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.nav-tabs.nav-stacked > li:first-child > a {
+    -webkit-border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+    border-top-right-radius: 4px;
+    -webkit-border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+    border-top-left-radius: 4px;
+}
+
+.nav-tabs.nav-stacked > li:last-child > a {
+    -webkit-border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+    border-bottom-right-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+    border-bottom-left-radius: 4px;
+}
+
+.nav-tabs.nav-stacked > li > a:hover {
+    border-color: #ddd;
+    z-index: 2;
+}
+
+.nav-pills.nav-stacked > li > a {
+    margin-bottom: 3px;
+}
+
+.nav-pills.nav-stacked > li:last-child > a {
+    margin-bottom: 1px;
+}
+
+.nav-tabs .dropdown-menu {
+    -webkit-border-radius: 0 0 6px 6px;
+    -moz-border-radius: 0 0 6px 6px;
+    border-radius: 0 0 6px 6px;
+}
+
+.nav-pills .dropdown-menu {
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.nav .dropdown-toggle .caret {
+    border-top-color: #0088cc;
+    border-bottom-color: #0088cc;
+    margin-top: 6px;
+}
+
+.nav .dropdown-toggle:hover .caret {
+    border-top-color: #005580;
+    border-bottom-color: #005580;
+}
+
+.nav-tabs .dropdown-toggle .caret {
+    margin-top: 8px;
+}
+
+.nav .active .dropdown-toggle .caret {
+    border-top-color: #fff;
+    border-bottom-color: #fff;
+}
+
+.nav-tabs .active .dropdown-toggle .caret {
+    border-top-color: #555555;
+    border-bottom-color: #555555;
+}
+
+.nav > .dropdown.active > a:hover {
+    cursor: pointer;
+}
+
+.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover {
+    color: #ffffff;
+    background-color: #999999;
+    border-color: #999999;
+}
+
+.nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret {
+    border-top-color: #ffffff;
+    border-bottom-color: #ffffff;
+    opacity: 1;
+    filter: alpha(opacity=100);
+}
+
+.tabs-stacked .open > a:hover {
+    border-color: #999999;
+}
+
+.tabbable {
+    *zoom: 1;
+}
+
+.tabbable:before, .tabbable:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.tabbable:after {
+    clear: both;
+}
+
+.tab-content {
+    overflow: auto;
+}
+
+.tabs-below > .nav-tabs, .tabs-right > .nav-tabs, .tabs-left > .nav-tabs {
+    border-bottom: 0;
+}
+
+.tab-content > .tab-pane, .pill-content > .pill-pane {
+    display: none;
+}
+
+.tab-content > .active, .pill-content > .active {
+    display: block;
+}
+
+.tabs-below > .nav-tabs {
+    border-top: 1px solid #ddd;
+}
+
+.tabs-below > .nav-tabs > li {
+    margin-top: -1px;
+    margin-bottom: 0;
+}
+
+.tabs-below > .nav-tabs > li > a {
+    -webkit-border-radius: 0 0 4px 4px;
+    -moz-border-radius: 0 0 4px 4px;
+    border-radius: 0 0 4px 4px;
+}
+
+.tabs-below > .nav-tabs > li > a:hover {
+    border-bottom-color: transparent;
+    border-top-color: #ddd;
+}
+
+.tabs-below > .nav-tabs > .active > a, .tabs-below > .nav-tabs > .active > a:hover {
+    border-color: transparent #ddd #ddd #ddd;
+}
+
+.tabs-left > .nav-tabs > li, .tabs-right > .nav-tabs > li {
+    float: none;
+}
+
+.tabs-left > .nav-tabs > li > a, .tabs-right > .nav-tabs > li > a {
+    min-width: 74px;
+    margin-right: 0;
+    margin-bottom: 3px;
+}
+
+.tabs-left > .nav-tabs {
+    float: left;
+    margin-right: 19px;
+    border-right: 1px solid #ddd;
+}
+
+.tabs-left > .nav-tabs > li > a {
+    margin-right: -1px;
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.tabs-left > .nav-tabs > li > a:hover {
+    border-color: #eeeeee #dddddd #eeeeee #eeeeee;
+}
+
+.tabs-left > .nav-tabs .active > a, .tabs-left > .nav-tabs .active > a:hover {
+    border-color: #ddd transparent #ddd #ddd;
+    *border-right-color: #ffffff;
+}
+
+.tabs-right > .nav-tabs {
+    float: right;
+    margin-left: 19px;
+    border-left: 1px solid #ddd;
+}
+
+.tabs-right > .nav-tabs > li > a {
+    margin-left: -1px;
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.tabs-right > .nav-tabs > li > a:hover {
+    border-color: #eeeeee #eeeeee #eeeeee #dddddd;
+}
+
+.tabs-right > .nav-tabs .active > a, .tabs-right > .nav-tabs .active > a:hover {
+    border-color: #ddd #ddd #ddd transparent;
+    *border-left-color: #ffffff;
+}
+
+.nav > .disabled > a {
+    color: #999999;
+}
+
+.nav > .disabled > a:hover {
+    text-decoration: none;
+    background-color: transparent;
+    cursor: default;
+}
+
+.navbar {
+    overflow: visible;
+    margin-bottom: 20px;
+    color: #777777;
+    *position: relative;
+    *z-index: 2;
+}
+
+.navbar-inner {
+    min-height: 40px;
+    padding-left: 20px;
+    padding-right: 20px;
+    background-color: #fafafa;
+    background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
+    background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
+    background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
+    background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
+    border: 1px solid #d4d4d4;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+    *zoom: 1;
+}
+
+.navbar-inner:before, .navbar-inner:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.navbar-inner:after {
+    clear: both;
+}
+
+.navbar .container {
+    width: auto;
+}
+
+.nav-collapse.collapse {
+    height: auto;
+    overflow: visible;
+}
+
+.navbar .brand {
+    float: left;
+    display: block;
+    padding: 10px 20px 10px;
+    margin-left: -20px;
+    font-size: 20px;
+    font-weight: 200;
+    color: #777777;
+    text-shadow: 0 1px 0 #ffffff;
+}
+
+.navbar .brand:hover {
+    text-decoration: none;
+}
+
+.navbar-text {
+    margin-bottom: 0;
+    line-height: 40px;
+}
+
+.navbar-link {
+    color: #777777;
+}
+
+.navbar-link:hover {
+    color: #333333;
+}
+
+.navbar .divider-vertical {
+    height: 40px;
+    margin: 0 9px;
+    border-left: 1px solid #f2f2f2;
+    border-right: 1px solid #ffffff;
+}
+
+.navbar .btn, .navbar .btn-group {
+    margin-top: 5px;
+}
+
+.navbar .btn-group .btn, .navbar .input-prepend .btn, .navbar .input-append .btn {
+    margin-top: 0;
+}
+
+.navbar-form {
+    margin-bottom: 0;
+    *zoom: 1;
+}
+
+.navbar-form:before, .navbar-form:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.navbar-form:after {
+    clear: both;
+}
+
+.navbar-form input, .navbar-form select, .navbar-form .radio, .navbar-form .checkbox {
+    margin-top: 5px;
+}
+
+.navbar-form input, .navbar-form select, .navbar-form .btn {
+    display: inline-block;
+    margin-bottom: 0;
+}
+
+.navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] {
+    margin-top: 3px;
+}
+
+.navbar-form .input-append, .navbar-form .input-prepend {
+    margin-top: 6px;
+    white-space: nowrap;
+}
+
+.navbar-form .input-append input, .navbar-form .input-prepend input {
+    margin-top: 0;
+}
+
+.navbar-search {
+    position: relative;
+    float: left;
+    margin-top: 5px;
+    margin-bottom: 0;
+}
+
+.navbar-search .search-query {
+    margin-bottom: 0;
+    padding: 4px 14px;
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+    font-size: 13px;
+    font-weight: normal;
+    line-height: 1;
+    -webkit-border-radius: 15px;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+}
+
+.navbar-static-top {
+    position: static;
+    margin-bottom: 0;
+}
+
+.navbar-static-top .navbar-inner {
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.navbar-fixed-top, .navbar-fixed-bottom {
+    position: fixed;
+    right: 0;
+    left: 0;
+    z-index: 1030;
+    margin-bottom: 0;
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner {
+    border-width: 0 0 1px;
+}
+
+.navbar-fixed-bottom .navbar-inner {
+    border-width: 1px 0 0;
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-fixed-bottom .navbar-inner {
+    padding-left: 0;
+    padding-right: 0;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
+    width: 940px;
+}
+
+.navbar-fixed-top {
+    top: 0;
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner {
+    -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, .1);
+    -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, .1);
+    box-shadow: 0 1px 10px rgba(0, 0, 0, .1);
+}
+
+.navbar-fixed-bottom {
+    bottom: 0;
+}
+
+.navbar-fixed-bottom .navbar-inner {
+    -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, .1);
+    -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, .1);
+    box-shadow: 0 -1px 10px rgba(0, 0, 0, .1);
+}
+
+.navbar .nav {
+    position: relative;
+    left: 0;
+    display: block;
+    float: left;
+    margin: 0 10px 0 0;
+}
+
+.navbar .nav.pull-right {
+    float: right;
+    margin-right: 0;
+}
+
+.navbar .nav > li {
+    float: left;
+}
+
+.navbar .nav > li > a {
+    float: none;
+    padding: 10px 15px 10px;
+    color: #777777;
+    text-decoration: none;
+    text-shadow: 0 1px 0 #ffffff;
+}
+
+.navbar .nav .dropdown-toggle .caret {
+    margin-top: 8px;
+}
+
+.navbar .nav > li > a:focus, .navbar .nav > li > a:hover {
+    background-color: transparent;
+    color: #333333;
+    text-decoration: none;
+}
+
+.navbar .nav > .active > a, .navbar .nav > .active > a:hover, .navbar .nav > .active > a:focus {
+    color: #555555;
+    text-decoration: none;
+    background-color: #e5e5e5;
+    -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+    -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+}
+
+.navbar .btn-navbar {
+    display: none;
+    float: right;
+    padding: 7px 10px;
+    margin-left: 5px;
+    margin-right: 5px;
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #ededed;
+    background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
+    background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
+    background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
+    background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
+    border-color: #e5e5e5 #e5e5e5 #bfbfbf;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #e5e5e5;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .075);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .075);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .075);
+}
+
+.navbar .btn-navbar:hover, .navbar .btn-navbar:active, .navbar .btn-navbar.active, .navbar .btn-navbar.disabled, .navbar .btn-navbar[disabled] {
+    color: #ffffff;
+    background-color: #e5e5e5;
+    *background-color: #d9d9d9;
+}
+
+.navbar .btn-navbar:active, .navbar .btn-navbar.active {
+    background-color: #cccccc \9;
+}
+
+.navbar .btn-navbar .icon-bar {
+    display: block;
+    width: 18px;
+    height: 2px;
+    background-color: #f5f5f5;
+    -webkit-border-radius: 1px;
+    -moz-border-radius: 1px;
+    border-radius: 1px;
+    -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+    -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.btn-navbar .icon-bar + .icon-bar {
+    margin-top: 3px;
+}
+
+.navbar .nav > li > .dropdown-menu:before {
+    content: '';
+    display: inline-block;
+    border-left: 7px solid transparent;
+    border-right: 7px solid transparent;
+    border-bottom: 7px solid #ccc;
+    border-bottom-color: rgba(0, 0, 0, 0.2);
+    position: absolute;
+    top: -7px;
+    left: 9px;
+}
+
+.navbar .nav > li > .dropdown-menu:after {
+    content: '';
+    display: inline-block;
+    border-left: 6px solid transparent;
+    border-right: 6px solid transparent;
+    border-bottom: 6px solid #ffffff;
+    position: absolute;
+    top: -6px;
+    left: 10px;
+}
+
+.navbar-fixed-bottom .nav > li > .dropdown-menu:before {
+    border-top: 7px solid #ccc;
+    border-top-color: rgba(0, 0, 0, 0.2);
+    border-bottom: 0;
+    bottom: -7px;
+    top: auto;
+}
+
+.navbar-fixed-bottom .nav > li > .dropdown-menu:after {
+    border-top: 6px solid #ffffff;
+    border-bottom: 0;
+    bottom: -6px;
+    top: auto;
+}
+
+.navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle {
+    background-color: #e5e5e5;
+    color: #555555;
+}
+
+.navbar .nav li.dropdown > .dropdown-toggle .caret {
+    border-top-color: #777777;
+    border-bottom-color: #777777;
+}
+
+.navbar .nav li.dropdown.open > .dropdown-toggle .caret, .navbar .nav li.dropdown.active > .dropdown-toggle .caret, .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
+    border-top-color: #555555;
+    border-bottom-color: #555555;
+}
+
+.navbar .pull-right > li > .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right {
+    left: auto;
+    right: 0;
+}
+
+.navbar .pull-right > li > .dropdown-menu:before, .navbar .nav > li > .dropdown-menu.pull-right:before {
+    left: auto;
+    right: 12px;
+}
+
+.navbar .pull-right > li > .dropdown-menu:after, .navbar .nav > li > .dropdown-menu.pull-right:after {
+    left: auto;
+    right: 13px;
+}
+
+.navbar .pull-right > li > .dropdown-menu .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {
+    left: auto;
+    right: 100%;
+    margin-left: 0;
+    margin-right: -1px;
+    -webkit-border-radius: 6px 0 6px 6px;
+    -moz-border-radius: 6px 0 6px 6px;
+    border-radius: 6px 0 6px 6px;
+}
+
+.navbar-inverse {
+    color: #999999;
+}
+
+.navbar-inverse .navbar-inner {
+    background-color: #1b1b1b;
+    background-image: -moz-linear-gradient(top, #222222, #111111);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));
+    background-image: -webkit-linear-gradient(top, #222222, #111111);
+    background-image: -o-linear-gradient(top, #222222, #111111);
+    background-image: linear-gradient(to bottom, #222222, #111111);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);
+    border-color: #252525;
+}
+
+.navbar-inverse .brand, .navbar-inverse .nav > li > a {
+    color: #999999;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.navbar-inverse .brand:hover, .navbar-inverse .nav > li > a:hover {
+    color: #ffffff;
+}
+
+.navbar-inverse .nav > li > a:focus, .navbar-inverse .nav > li > a:hover {
+    background-color: transparent;
+    color: #ffffff;
+}
+
+.navbar-inverse .nav .active > a, .navbar-inverse .nav .active > a:hover, .navbar-inverse .nav .active > a:focus {
+    color: #ffffff;
+    background-color: #111111;
+}
+
+.navbar-inverse .navbar-link {
+    color: #999999;
+}
+
+.navbar-inverse .navbar-link:hover {
+    color: #ffffff;
+}
+
+.navbar-inverse .divider-vertical {
+    border-left-color: #111111;
+    border-right-color: #222222;
+}
+
+.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {
+    background-color: #111111;
+    color: #ffffff;
+}
+
+.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {
+    border-top-color: #999999;
+    border-bottom-color: #999999;
+}
+
+.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {
+    border-top-color: #ffffff;
+    border-bottom-color: #ffffff;
+}
+
+.navbar-inverse .navbar-search .search-query {
+    color: #ffffff;
+    background-color: #515151;
+    border-color: #111111;
+    -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .15);
+    -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .15);
+    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .15);
+    -webkit-transition: none;
+    -moz-transition: none;
+    -o-transition: none;
+    transition: none;
+}
+
+.navbar-inverse .navbar-search .search-query:-moz-placeholder {
+    color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query:-ms-input-placeholder {
+    color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {
+    color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query:focus, .navbar-inverse .navbar-search .search-query.focused {
+    padding: 5px 15px;
+    color: #333333;
+    text-shadow: 0 1px 0 #ffffff;
+    background-color: #ffffff;
+    border: 0;
+    -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+    -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+    box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+    outline: 0;
+}
+
+.navbar-inverse .btn-navbar {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #0e0e0e;
+    background-image: -moz-linear-gradient(top, #151515, #040404);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));
+    background-image: -webkit-linear-gradient(top, #151515, #040404);
+    background-image: -o-linear-gradient(top, #151515, #040404);
+    background-image: linear-gradient(to bottom, #151515, #040404);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);
+    border-color: #040404 #040404 #000000;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #040404;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.navbar-inverse .btn-navbar:hover, .navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active, .navbar-inverse .btn-navbar.disabled, .navbar-inverse .btn-navbar[disabled] {
+    color: #ffffff;
+    background-color: #040404;
+    *background-color: #000000;
+}
+
+.navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active {
+    background-color: #000000 \9;
+}
+
+.breadcrumb {
+    padding: 8px 15px;
+    margin: 0 0 20px;
+    list-style: none;
+    background-color: #f5f5f5;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.breadcrumb li {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    text-shadow: 0 1px 0 #ffffff;
+}
+
+.breadcrumb .divider {
+    padding: 0 5px;
+    color: #ccc;
+}
+
+.breadcrumb .active {
+    color: #999999;
+}
+
+.pagination {
+    margin: 20px 0;
+}
+
+.pagination ul {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    margin-left: 0;
+    margin-bottom: 0;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+    -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.pagination ul > li {
+    display: inline;
+}
+
+.pagination ul > li > a, .pagination ul > li > span {
+    float: left;
+    padding: 4px 12px;
+    line-height: 20px;
+    text-decoration: none;
+    background-color: #ffffff;
+    border: 1px solid #dddddd;
+    border-left-width: 0;
+}
+
+.pagination ul > li > a:hover, .pagination ul > .active > a, .pagination ul > .active > span {
+    background-color: #f5f5f5;
+}
+
+.pagination ul > .active > a, .pagination ul > .active > span {
+    color: #999999;
+    cursor: default;
+}
+
+.pagination ul > .disabled > span, .pagination ul > .disabled > a, .pagination ul > .disabled > a:hover {
+    color: #999999;
+    background-color: transparent;
+    cursor: default;
+}
+
+.pagination ul > li:first-child > a, .pagination ul > li:first-child > span {
+    border-left-width: 1px;
+    -webkit-border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+    border-top-left-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+    border-bottom-left-radius: 4px;
+}
+
+.pagination ul > li:last-child > a, .pagination ul > li:last-child > span {
+    -webkit-border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+    border-top-right-radius: 4px;
+    -webkit-border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+    border-bottom-right-radius: 4px;
+}
+
+.pagination-centered {
+    text-align: center;
+}
+
+.pagination-right {
+    text-align: right;
+}
+
+.pagination-large ul > li > a, .pagination-large ul > li > span {
+    padding: 11px 19px;
+    font-size: 17.5px;
+}
+
+.pagination-large ul > li:first-child > a, .pagination-large ul > li:first-child > span {
+    -webkit-border-top-left-radius: 6px;
+    -moz-border-radius-topleft: 6px;
+    border-top-left-radius: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomleft: 6px;
+    border-bottom-left-radius: 6px;
+}
+
+.pagination-large ul > li:last-child > a, .pagination-large ul > li:last-child > span {
+    -webkit-border-top-right-radius: 6px;
+    -moz-border-radius-topright: 6px;
+    border-top-right-radius: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    border-bottom-right-radius: 6px;
+}
+
+.pagination-mini ul > li:first-child > a, .pagination-small ul > li:first-child > a, .pagination-mini ul > li:first-child > span, .pagination-small ul > li:first-child > span {
+    -webkit-border-top-left-radius: 3px;
+    -moz-border-radius-topleft: 3px;
+    border-top-left-radius: 3px;
+    -webkit-border-bottom-left-radius: 3px;
+    -moz-border-radius-bottomleft: 3px;
+    border-bottom-left-radius: 3px;
+}
+
+.pagination-mini ul > li:last-child > a, .pagination-small ul > li:last-child > a, .pagination-mini ul > li:last-child > span, .pagination-small ul > li:last-child > span {
+    -webkit-border-top-right-radius: 3px;
+    -moz-border-radius-topright: 3px;
+    border-top-right-radius: 3px;
+    -webkit-border-bottom-right-radius: 3px;
+    -moz-border-radius-bottomright: 3px;
+    border-bottom-right-radius: 3px;
+}
+
+.pagination-small ul > li > a, .pagination-small ul > li > span {
+    padding: 2px 10px;
+    font-size: 11.9px;
+}
+
+.pagination-mini ul > li > a, .pagination-mini ul > li > span {
+    padding: 1px 6px;
+    font-size: 10.5px;
+}
+
+.pager {
+    margin: 20px 0;
+    list-style: none;
+    text-align: center;
+    *zoom: 1;
+}
+
+.pager:before, .pager:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.pager:after {
+    clear: both;
+}
+
+.pager li {
+    display: inline;
+}
+
+.pager li > a, .pager li > span {
+    display: inline-block;
+    padding: 5px 14px;
+    background-color: #fff;
+    border: 1px solid #ddd;
+    -webkit-border-radius: 15px;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+}
+
+.pager li > a:hover {
+    text-decoration: none;
+    background-color: #f5f5f5;
+}
+
+.pager .next > a, .pager .next > span {
+    float: right;
+}
+
+.pager .previous > a, .pager .previous > span {
+    float: left;
+}
+
+.pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > span {
+    color: #999999;
+    background-color: #fff;
+    cursor: default;
+}
+
+.thumbnails {
+    margin-left: -20px;
+    list-style: none;
+    *zoom: 1;
+}
+
+.thumbnails:before, .thumbnails:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.thumbnails:after {
+    clear: both;
+}
+
+.row-fluid .thumbnails {
+    margin-left: 0;
+}
+
+.thumbnails > li {
+    float: left;
+    margin-bottom: 20px;
+    margin-left: 20px;
+}
+
+.thumbnail {
+    display: block;
+    padding: 4px;
+    line-height: 20px;
+    border: 1px solid #ddd;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 

<TRUNCATED>

[08/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/excanvas.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/excanvas.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/excanvas.min.js
new file mode 100644
index 0000000..815045d
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/excanvas.min.js
@@ -0,0 +1,954 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+if (navigator.appVersion.indexOf("MSIE") != -1 && parseFloat(navigator.appVersion.split("MSIE")[1]) <= 8 && !document.createElement("canvas").getContext)(function () {
+    var m = Math;
+    var mr = m.round;
+    var ms = m.sin;
+    var mc = m.cos;
+    var abs = m.abs;
+    var sqrt = m.sqrt;
+    var Z = 10;
+    var Z2 = Z / 2;
+    var IE_VERSION = +navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];
+
+    function getContext() {
+        return this.context_ || (this.context_ = new CanvasRenderingContext2D_(this))
+    }
+
+    var slice = Array.prototype.slice;
+
+    function bind(f, obj, var_args) {
+        var a = slice.call(arguments,
+            2);
+        return function () {
+            return f.apply(obj, a.concat(slice.call(arguments)))
+        }
+    }
+
+    function encodeHtmlAttribute(s) {
+        return String(s).replace(/&/g, "&amp;").replace(/"/g, "&quot;")
+    }
+
+    function addNamespace(doc, prefix, urn) {
+        if (!doc.namespaces[prefix])doc.namespaces.add(prefix, urn, "#default#VML")
+    }
+
+    function addNamespacesAndStylesheet(doc) {
+        addNamespace(doc, "g_vml_", "urn:schemas-microsoft-com:vml");
+        addNamespace(doc, "g_o_", "urn:schemas-microsoft-com:office:office");
+        if (!doc.styleSheets["ex_canvas_"]) {
+            var ss = doc.createStyleSheet();
+            ss.owningElement.id = "ex_canvas_";
+            ss.cssText = "canvas{display:inline-block;overflow:hidden;" + "text-align:left;width:300px;height:150px}"
+        }
+    }
+
+    addNamespacesAndStylesheet(document);
+    var G_vmlCanvasManager_ = {
+        init: function (opt_doc) {
+            var doc = opt_doc || document;
+            doc.createElement("canvas");
+            doc.attachEvent("onreadystatechange", bind(this.init_, this, doc))
+        }, init_: function (doc) {
+            var els = doc.getElementsByTagName("canvas");
+            for (var i = 0; i < els.length; i++)this.initElement(els[i])
+        }, initElement: function (el) {
+            if (!el.getContext) {
+                el.getContext =
+                    getContext;
+                addNamespacesAndStylesheet(el.ownerDocument);
+                el.innerHTML = "";
+                el.attachEvent("onpropertychange", onPropertyChange);
+                el.attachEvent("onresize", onResize);
+                var attrs = el.attributes;
+                if (attrs.width && attrs.width.specified)el.style.width = attrs.width.nodeValue + "px"; else el.width = el.clientWidth;
+                if (attrs.height && attrs.height.specified)el.style.height = attrs.height.nodeValue + "px"; else el.height = el.clientHeight
+            }
+            return el
+        }
+    };
+
+    function onPropertyChange(e) {
+        var el = e.srcElement;
+        switch (e.propertyName) {
+            case "width":
+                el.getContext().clearRect();
+                el.style.width = el.attributes.width.nodeValue + "px";
+                el.firstChild.style.width = el.clientWidth + "px";
+                break;
+            case "height":
+                el.getContext().clearRect();
+                el.style.height = el.attributes.height.nodeValue + "px";
+                el.firstChild.style.height = el.clientHeight + "px";
+                break
+        }
+    }
+
+    function onResize(e) {
+        var el = e.srcElement;
+        if (el.firstChild) {
+            el.firstChild.style.width = el.clientWidth + "px";
+            el.firstChild.style.height = el.clientHeight + "px"
+        }
+    }
+
+    G_vmlCanvasManager_.init();
+    var decToHex = [];
+    for (var i = 0; i < 16; i++)for (var j = 0; j < 16; j++)decToHex[i *
+    16 + j] = i.toString(16) + j.toString(16);
+    function createMatrixIdentity() {
+        return [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
+    }
+
+    function matrixMultiply(m1, m2) {
+        var result = createMatrixIdentity();
+        for (var x = 0; x < 3; x++)for (var y = 0; y < 3; y++) {
+            var sum = 0;
+            for (var z = 0; z < 3; z++)sum += m1[x][z] * m2[z][y];
+            result[x][y] = sum
+        }
+        return result
+    }
+
+    function copyState(o1, o2) {
+        o2.fillStyle = o1.fillStyle;
+        o2.lineCap = o1.lineCap;
+        o2.lineJoin = o1.lineJoin;
+        o2.lineWidth = o1.lineWidth;
+        o2.miterLimit = o1.miterLimit;
+        o2.shadowBlur = o1.shadowBlur;
+        o2.shadowColor = o1.shadowColor;
+        o2.shadowOffsetX =
+            o1.shadowOffsetX;
+        o2.shadowOffsetY = o1.shadowOffsetY;
+        o2.strokeStyle = o1.strokeStyle;
+        o2.globalAlpha = o1.globalAlpha;
+        o2.font = o1.font;
+        o2.textAlign = o1.textAlign;
+        o2.textBaseline = o1.textBaseline;
+        o2.arcScaleX_ = o1.arcScaleX_;
+        o2.arcScaleY_ = o1.arcScaleY_;
+        o2.lineScale_ = o1.lineScale_
+    }
+
+    var colorData = {
+        aliceblue: "#F0F8FF",
+        antiquewhite: "#FAEBD7",
+        aquamarine: "#7FFFD4",
+        azure: "#F0FFFF",
+        beige: "#F5F5DC",
+        bisque: "#FFE4C4",
+        black: "#000000",
+        blanchedalmond: "#FFEBCD",
+        blueviolet: "#8A2BE2",
+        brown: "#A52A2A",
+        burlywood: "#DEB887",
+        cadetblue: "#5F9EA0",
+        chartreuse: "#7FFF00",
+        chocolate: "#D2691E",
+        coral: "#FF7F50",
+        cornflowerblue: "#6495ED",
+        cornsilk: "#FFF8DC",
+        crimson: "#DC143C",
+        cyan: "#00FFFF",
+        darkblue: "#00008B",
+        darkcyan: "#008B8B",
+        darkgoldenrod: "#B8860B",
+        darkgray: "#A9A9A9",
+        darkgreen: "#006400",
+        darkgrey: "#A9A9A9",
+        darkkhaki: "#BDB76B",
+        darkmagenta: "#8B008B",
+        darkolivegreen: "#556B2F",
+        darkorange: "#FF8C00",
+        darkorchid: "#9932CC",
+        darkred: "#8B0000",
+        darksalmon: "#E9967A",
+        darkseagreen: "#8FBC8F",
+        darkslateblue: "#483D8B",
+        darkslategray: "#2F4F4F",
+        darkslategrey: "#2F4F4F",
+        darkturquoise: "#00CED1",
+        darkviolet: "#9400D3",
+        deeppink: "#FF1493",
+        deepskyblue: "#00BFFF",
+        dimgray: "#696969",
+        dimgrey: "#696969",
+        dodgerblue: "#1E90FF",
+        firebrick: "#B22222",
+        floralwhite: "#FFFAF0",
+        forestgreen: "#228B22",
+        gainsboro: "#DCDCDC",
+        ghostwhite: "#F8F8FF",
+        gold: "#FFD700",
+        goldenrod: "#DAA520",
+        grey: "#808080",
+        greenyellow: "#ADFF2F",
+        honeydew: "#F0FFF0",
+        hotpink: "#FF69B4",
+        indianred: "#CD5C5C",
+        indigo: "#4B0082",
+        ivory: "#FFFFF0",
+        khaki: "#F0E68C",
+        lavender: "#E6E6FA",
+        lavenderblush: "#FFF0F5",
+        lawngreen: "#7CFC00",
+        lemonchiffon: "#FFFACD",
+        lightblue: "#ADD8E6",
+        lightcoral: "#F08080",
+        lightcyan: "#E0FFFF",
+        lightgoldenrodyellow: "#FAFAD2",
+        lightgreen: "#90EE90",
+        lightgrey: "#D3D3D3",
+        lightpink: "#FFB6C1",
+        lightsalmon: "#FFA07A",
+        lightseagreen: "#20B2AA",
+        lightskyblue: "#87CEFA",
+        lightslategray: "#778899",
+        lightslategrey: "#778899",
+        lightsteelblue: "#B0C4DE",
+        lightyellow: "#FFFFE0",
+        limegreen: "#32CD32",
+        linen: "#FAF0E6",
+        magenta: "#FF00FF",
+        mediumaquamarine: "#66CDAA",
+        mediumblue: "#0000CD",
+        mediumorchid: "#BA55D3",
+        mediumpurple: "#9370DB",
+        mediumseagreen: "#3CB371",
+        mediumslateblue: "#7B68EE",
+        mediumspringgreen: "#00FA9A",
+        mediumturquoise: "#48D1CC",
+        mediumvioletred: "#C71585",
+        midnightblue: "#191970",
+        mintcream: "#F5FFFA",
+        mistyrose: "#FFE4E1",
+        moccasin: "#FFE4B5",
+        navajowhite: "#FFDEAD",
+        oldlace: "#FDF5E6",
+        olivedrab: "#6B8E23",
+        orange: "#FFA500",
+        orangered: "#FF4500",
+        orchid: "#DA70D6",
+        palegoldenrod: "#EEE8AA",
+        palegreen: "#98FB98",
+        paleturquoise: "#AFEEEE",
+        palevioletred: "#DB7093",
+        papayawhip: "#FFEFD5",
+        peachpuff: "#FFDAB9",
+        peru: "#CD853F",
+        pink: "#FFC0CB",
+        plum: "#DDA0DD",
+        powderblue: "#B0E0E6",
+        rosybrown: "#BC8F8F",
+        royalblue: "#4169E1",
+        saddlebrown: "#8B4513",
+        salmon: "#FA8072",
+        sandybrown: "#F4A460",
+        seagreen: "#2E8B57",
+        seashell: "#FFF5EE",
+        sienna: "#A0522D",
+        skyblue: "#87CEEB",
+        slateblue: "#6A5ACD",
+        slategray: "#708090",
+        slategrey: "#708090",
+        snow: "#FFFAFA",
+        springgreen: "#00FF7F",
+        steelblue: "#4682B4",
+        tan: "#D2B48C",
+        thistle: "#D8BFD8",
+        tomato: "#FF6347",
+        turquoise: "#40E0D0",
+        violet: "#EE82EE",
+        wheat: "#F5DEB3",
+        whitesmoke: "#F5F5F5",
+        yellowgreen: "#9ACD32"
+    };
+
+    function getRgbHslContent(styleString) {
+        var start = styleString.indexOf("(", 3);
+        var end = styleString.indexOf(")", start + 1);
+        var parts =
+            styleString.substring(start + 1, end).split(",");
+        if (parts.length != 4 || styleString.charAt(3) != "a")parts[3] = 1;
+        return parts
+    }
+
+    function percent(s) {
+        return parseFloat(s) / 100
+    }
+
+    function clamp(v, min, max) {
+        return Math.min(max, Math.max(min, v))
+    }
+
+    function hslToRgb(parts) {
+        var r, g, b, h, s, l;
+        h = parseFloat(parts[0]) / 360 % 360;
+        if (h < 0)h++;
+        s = clamp(percent(parts[1]), 0, 1);
+        l = clamp(percent(parts[2]), 0, 1);
+        if (s == 0)r = g = b = l; else {
+            var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+            var p = 2 * l - q;
+            r = hueToRgb(p, q, h + 1 / 3);
+            g = hueToRgb(p, q, h);
+            b = hueToRgb(p, q, h - 1 / 3)
+        }
+        return "#" +
+            decToHex[Math.floor(r * 255)] + decToHex[Math.floor(g * 255)] + decToHex[Math.floor(b * 255)]
+    }
+
+    function hueToRgb(m1, m2, h) {
+        if (h < 0)h++;
+        if (h > 1)h--;
+        if (6 * h < 1)return m1 + (m2 - m1) * 6 * h; else if (2 * h < 1)return m2; else if (3 * h < 2)return m1 + (m2 - m1) * (2 / 3 - h) * 6; else return m1
+    }
+
+    var processStyleCache = {};
+
+    function processStyle(styleString) {
+        if (styleString in processStyleCache)return processStyleCache[styleString];
+        var str, alpha = 1;
+        styleString = String(styleString);
+        if (styleString.charAt(0) == "#")str = styleString; else if (/^rgb/.test(styleString)) {
+            var parts =
+                getRgbHslContent(styleString);
+            var str = "#", n;
+            for (var i = 0; i < 3; i++) {
+                if (parts[i].indexOf("%") != -1)n = Math.floor(percent(parts[i]) * 255); else n = +parts[i];
+                str += decToHex[clamp(n, 0, 255)]
+            }
+            alpha = +parts[3]
+        } else if (/^hsl/.test(styleString)) {
+            var parts = getRgbHslContent(styleString);
+            str = hslToRgb(parts);
+            alpha = parts[3]
+        } else str = colorData[styleString] || styleString;
+        return processStyleCache[styleString] = {color: str, alpha: alpha}
+    }
+
+    var DEFAULT_STYLE = {style: "normal", variant: "normal", weight: "normal", size: 10, family: "sans-serif"};
+    var fontStyleCache = {};
+
+    function processFontStyle(styleString) {
+        if (fontStyleCache[styleString])return fontStyleCache[styleString];
+        var el = document.createElement("div");
+        var style = el.style;
+        try {
+            style.font = styleString
+        } catch (ex) {
+        }
+        return fontStyleCache[styleString] = {
+            style: style.fontStyle || DEFAULT_STYLE.style,
+            variant: style.fontVariant || DEFAULT_STYLE.variant,
+            weight: style.fontWeight || DEFAULT_STYLE.weight,
+            size: style.fontSize || DEFAULT_STYLE.size,
+            family: style.fontFamily || DEFAULT_STYLE.family
+        }
+    }
+
+    function getComputedStyle(style,
+                              element) {
+        var computedStyle = {};
+        for (var p in style)computedStyle[p] = style[p];
+        var canvasFontSize = parseFloat(element.currentStyle.fontSize), fontSize = parseFloat(style.size);
+        if (typeof style.size == "number")computedStyle.size = style.size; else if (style.size.indexOf("px") != -1)computedStyle.size = fontSize; else if (style.size.indexOf("em") != -1)computedStyle.size = canvasFontSize * fontSize; else if (style.size.indexOf("%") != -1)computedStyle.size = canvasFontSize / 100 * fontSize; else if (style.size.indexOf("pt") != -1)computedStyle.size =
+            fontSize / 0.75; else computedStyle.size = canvasFontSize;
+        computedStyle.size *= 0.981;
+        return computedStyle
+    }
+
+    function buildStyle(style) {
+        return style.style + " " + style.variant + " " + style.weight + " " + style.size + "px " + style.family
+    }
+
+    var lineCapMap = {"butt": "flat", "round": "round"};
+
+    function processLineCap(lineCap) {
+        return lineCapMap[lineCap] || "square"
+    }
+
+    function CanvasRenderingContext2D_(canvasElement) {
+        this.m_ = createMatrixIdentity();
+        this.mStack_ = [];
+        this.aStack_ = [];
+        this.currentPath_ = [];
+        this.strokeStyle = "#000";
+        this.fillStyle =
+            "#000";
+        this.lineWidth = 1;
+        this.lineJoin = "miter";
+        this.lineCap = "butt";
+        this.miterLimit = Z * 1;
+        this.globalAlpha = 1;
+        this.font = "10px sans-serif";
+        this.textAlign = "left";
+        this.textBaseline = "alphabetic";
+        this.canvas = canvasElement;
+        var cssText = "width:" + canvasElement.clientWidth + "px;height:" + canvasElement.clientHeight + "px;overflow:hidden;position:absolute";
+        var el = canvasElement.ownerDocument.createElement("div");
+        el.style.cssText = cssText;
+        canvasElement.appendChild(el);
+        var overlayEl = el.cloneNode(false);
+        overlayEl.style.backgroundColor =
+            "red";
+        overlayEl.style.filter = "alpha(opacity=0)";
+        canvasElement.appendChild(overlayEl);
+        this.element_ = el;
+        this.arcScaleX_ = 1;
+        this.arcScaleY_ = 1;
+        this.lineScale_ = 1
+    }
+
+    var contextPrototype = CanvasRenderingContext2D_.prototype;
+    contextPrototype.clearRect = function () {
+        if (this.textMeasureEl_) {
+            this.textMeasureEl_.removeNode(true);
+            this.textMeasureEl_ = null
+        }
+        this.element_.innerHTML = ""
+    };
+    contextPrototype.beginPath = function () {
+        this.currentPath_ = []
+    };
+    contextPrototype.moveTo = function (aX, aY) {
+        var p = getCoords(this, aX, aY);
+        this.currentPath_.push({
+            type: "moveTo",
+            x: p.x, y: p.y
+        });
+        this.currentX_ = p.x;
+        this.currentY_ = p.y
+    };
+    contextPrototype.lineTo = function (aX, aY) {
+        var p = getCoords(this, aX, aY);
+        this.currentPath_.push({type: "lineTo", x: p.x, y: p.y});
+        this.currentX_ = p.x;
+        this.currentY_ = p.y
+    };
+    contextPrototype.bezierCurveTo = function (aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {
+        var p = getCoords(this, aX, aY);
+        var cp1 = getCoords(this, aCP1x, aCP1y);
+        var cp2 = getCoords(this, aCP2x, aCP2y);
+        bezierCurveTo(this, cp1, cp2, p)
+    };
+    function bezierCurveTo(self, cp1, cp2, p) {
+        self.currentPath_.push({
+            type: "bezierCurveTo", cp1x: cp1.x,
+            cp1y: cp1.y, cp2x: cp2.x, cp2y: cp2.y, x: p.x, y: p.y
+        });
+        self.currentX_ = p.x;
+        self.currentY_ = p.y
+    }
+
+    contextPrototype.quadraticCurveTo = function (aCPx, aCPy, aX, aY) {
+        var cp = getCoords(this, aCPx, aCPy);
+        var p = getCoords(this, aX, aY);
+        var cp1 = {
+            x: this.currentX_ + 2 / 3 * (cp.x - this.currentX_),
+            y: this.currentY_ + 2 / 3 * (cp.y - this.currentY_)
+        };
+        var cp2 = {x: cp1.x + (p.x - this.currentX_) / 3, y: cp1.y + (p.y - this.currentY_) / 3};
+        bezierCurveTo(this, cp1, cp2, p)
+    };
+    contextPrototype.arc = function (aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {
+        aRadius *= Z;
+        var arcType =
+            aClockwise ? "at" : "wa";
+        var xStart = aX + mc(aStartAngle) * aRadius - Z2;
+        var yStart = aY + ms(aStartAngle) * aRadius - Z2;
+        var xEnd = aX + mc(aEndAngle) * aRadius - Z2;
+        var yEnd = aY + ms(aEndAngle) * aRadius - Z2;
+        if (xStart == xEnd && !aClockwise)xStart += 0.125;
+        var p = getCoords(this, aX, aY);
+        var pStart = getCoords(this, xStart, yStart);
+        var pEnd = getCoords(this, xEnd, yEnd);
+        this.currentPath_.push({
+            type: arcType,
+            x: p.x,
+            y: p.y,
+            radius: aRadius,
+            xStart: pStart.x,
+            yStart: pStart.y,
+            xEnd: pEnd.x,
+            yEnd: pEnd.y
+        })
+    };
+    contextPrototype.rect = function (aX, aY, aWidth, aHeight) {
+        this.moveTo(aX,
+            aY);
+        this.lineTo(aX + aWidth, aY);
+        this.lineTo(aX + aWidth, aY + aHeight);
+        this.lineTo(aX, aY + aHeight);
+        this.closePath()
+    };
+    contextPrototype.strokeRect = function (aX, aY, aWidth, aHeight) {
+        var oldPath = this.currentPath_;
+        this.beginPath();
+        this.moveTo(aX, aY);
+        this.lineTo(aX + aWidth, aY);
+        this.lineTo(aX + aWidth, aY + aHeight);
+        this.lineTo(aX, aY + aHeight);
+        this.closePath();
+        this.stroke();
+        this.currentPath_ = oldPath
+    };
+    contextPrototype.fillRect = function (aX, aY, aWidth, aHeight) {
+        var oldPath = this.currentPath_;
+        this.beginPath();
+        this.moveTo(aX, aY);
+        this.lineTo(aX + aWidth, aY);
+        this.lineTo(aX + aWidth, aY + aHeight);
+        this.lineTo(aX, aY + aHeight);
+        this.closePath();
+        this.fill();
+        this.currentPath_ = oldPath
+    };
+    contextPrototype.createLinearGradient = function (aX0, aY0, aX1, aY1) {
+        var gradient = new CanvasGradient_("gradient");
+        gradient.x0_ = aX0;
+        gradient.y0_ = aY0;
+        gradient.x1_ = aX1;
+        gradient.y1_ = aY1;
+        return gradient
+    };
+    contextPrototype.createRadialGradient = function (aX0, aY0, aR0, aX1, aY1, aR1) {
+        var gradient = new CanvasGradient_("gradientradial");
+        gradient.x0_ = aX0;
+        gradient.y0_ = aY0;
+        gradient.r0_ =
+            aR0;
+        gradient.x1_ = aX1;
+        gradient.y1_ = aY1;
+        gradient.r1_ = aR1;
+        return gradient
+    };
+    contextPrototype.drawImage = function (image, var_args) {
+        var dx, dy, dw, dh, sx, sy, sw, sh;
+        var oldRuntimeWidth = image.runtimeStyle.width;
+        var oldRuntimeHeight = image.runtimeStyle.height;
+        image.runtimeStyle.width = "auto";
+        image.runtimeStyle.height = "auto";
+        var w = image.width;
+        var h = image.height;
+        image.runtimeStyle.width = oldRuntimeWidth;
+        image.runtimeStyle.height = oldRuntimeHeight;
+        if (arguments.length == 3) {
+            dx = arguments[1];
+            dy = arguments[2];
+            sx = sy = 0;
+            sw = dw = w;
+            sh = dh = h
+        } else if (arguments.length == 5) {
+            dx = arguments[1];
+            dy = arguments[2];
+            dw = arguments[3];
+            dh = arguments[4];
+            sx = sy = 0;
+            sw = w;
+            sh = h
+        } else if (arguments.length == 9) {
+            sx = arguments[1];
+            sy = arguments[2];
+            sw = arguments[3];
+            sh = arguments[4];
+            dx = arguments[5];
+            dy = arguments[6];
+            dw = arguments[7];
+            dh = arguments[8]
+        } else throw Error("Invalid number of arguments");
+        var d = getCoords(this, dx, dy);
+        var w2 = sw / 2;
+        var h2 = sh / 2;
+        var vmlStr = [];
+        var W = 10;
+        var H = 10;
+        vmlStr.push(" <g_vml_:group", ' coordsize="', Z * W, ",", Z * H, '"', ' coordorigin="0,0"', ' style="width:',
+            W, "px;height:", H, "px;position:absolute;");
+        if (this.m_[0][0] != 1 || this.m_[0][1] || this.m_[1][1] != 1 || this.m_[1][0]) {
+            var filter = [];
+            filter.push("M11=", this.m_[0][0], ",", "M12=", this.m_[1][0], ",", "M21=", this.m_[0][1], ",", "M22=", this.m_[1][1], ",", "Dx=", mr(d.x / Z), ",", "Dy=", mr(d.y / Z), "");
+            var max = d;
+            var c2 = getCoords(this, dx + dw, dy);
+            var c3 = getCoords(this, dx, dy + dh);
+            var c4 = getCoords(this, dx + dw, dy + dh);
+            max.x = m.max(max.x, c2.x, c3.x, c4.x);
+            max.y = m.max(max.y, c2.y, c3.y, c4.y);
+            vmlStr.push("padding:0 ", mr(max.x / Z), "px ", mr(max.y /
+                Z), "px 0;filter:progid:DXImageTransform.Microsoft.Matrix(", filter.join(""), ", sizingmethod='clip');")
+        } else vmlStr.push("top:", mr(d.y / Z), "px;left:", mr(d.x / Z), "px;");
+        vmlStr.push(' ">', '<g_vml_:image src="', image.src, '"', ' style="width:', Z * dw, "px;", " height:", Z * dh, 'px"', ' cropleft="', sx / w, '"', ' croptop="', sy / h, '"', ' cropright="', (w - sx - sw) / w, '"', ' cropbottom="', (h - sy - sh) / h, '"', " />", "</g_vml_:group>");
+        this.element_.insertAdjacentHTML("BeforeEnd", vmlStr.join(""))
+    };
+    contextPrototype.stroke = function (aFill) {
+        var W =
+            10;
+        var H = 10;
+        var chunkSize = 5E3;
+        var min = {x: null, y: null};
+        var max = {x: null, y: null};
+        for (var j = 0; j < this.currentPath_.length; j += chunkSize) {
+            var lineStr = [];
+            var lineOpen = false;
+            lineStr.push("<g_vml_:shape", ' filled="', !!aFill, '"', ' style="position:absolute;width:', W, "px;height:", H, 'px;"', ' coordorigin="0,0"', ' coordsize="', Z * W, ",", Z * H, '"', ' stroked="', !aFill, '"', ' path="');
+            var newSeq = false;
+            for (var i = j; i < Math.min(j + chunkSize, this.currentPath_.length); i++) {
+                if (i % chunkSize == 0 && i > 0)lineStr.push(" m ", mr(this.currentPath_[i -
+                1].x), ",", mr(this.currentPath_[i - 1].y));
+                var p = this.currentPath_[i];
+                var c;
+                switch (p.type) {
+                    case "moveTo":
+                        c = p;
+                        lineStr.push(" m ", mr(p.x), ",", mr(p.y));
+                        break;
+                    case "lineTo":
+                        lineStr.push(" l ", mr(p.x), ",", mr(p.y));
+                        break;
+                    case "close":
+                        lineStr.push(" x ");
+                        p = null;
+                        break;
+                    case "bezierCurveTo":
+                        lineStr.push(" c ", mr(p.cp1x), ",", mr(p.cp1y), ",", mr(p.cp2x), ",", mr(p.cp2y), ",", mr(p.x), ",", mr(p.y));
+                        break;
+                    case "at":
+                    case "wa":
+                        lineStr.push(" ", p.type, " ", mr(p.x - this.arcScaleX_ * p.radius), ",", mr(p.y - this.arcScaleY_ * p.radius),
+                            " ", mr(p.x + this.arcScaleX_ * p.radius), ",", mr(p.y + this.arcScaleY_ * p.radius), " ", mr(p.xStart), ",", mr(p.yStart), " ", mr(p.xEnd), ",", mr(p.yEnd));
+                        break
+                }
+                if (p) {
+                    if (min.x == null || p.x < min.x)min.x = p.x;
+                    if (max.x == null || p.x > max.x)max.x = p.x;
+                    if (min.y == null || p.y < min.y)min.y = p.y;
+                    if (max.y == null || p.y > max.y)max.y = p.y
+                }
+            }
+            lineStr.push(' ">');
+            if (!aFill)appendStroke(this, lineStr); else appendFill(this, lineStr, min, max);
+            lineStr.push("</g_vml_:shape>");
+            this.element_.insertAdjacentHTML("beforeEnd", lineStr.join(""))
+        }
+    };
+    function appendStroke(ctx,
+                          lineStr) {
+        var a = processStyle(ctx.strokeStyle);
+        var color = a.color;
+        var opacity = a.alpha * ctx.globalAlpha;
+        var lineWidth = ctx.lineScale_ * ctx.lineWidth;
+        if (lineWidth < 1)opacity *= lineWidth;
+        lineStr.push("<g_vml_:stroke", ' opacity="', opacity, '"', ' joinstyle="', ctx.lineJoin, '"', ' miterlimit="', ctx.miterLimit, '"', ' endcap="', processLineCap(ctx.lineCap), '"', ' weight="', lineWidth, 'px"', ' color="', color, '" />')
+    }
+
+    function appendFill(ctx, lineStr, min, max) {
+        var fillStyle = ctx.fillStyle;
+        var arcScaleX = ctx.arcScaleX_;
+        var arcScaleY =
+            ctx.arcScaleY_;
+        var width = max.x - min.x;
+        var height = max.y - min.y;
+        if (fillStyle instanceof CanvasGradient_) {
+            var angle = 0;
+            var focus = {x: 0, y: 0};
+            var shift = 0;
+            var expansion = 1;
+            if (fillStyle.type_ == "gradient") {
+                var x0 = fillStyle.x0_ / arcScaleX;
+                var y0 = fillStyle.y0_ / arcScaleY;
+                var x1 = fillStyle.x1_ / arcScaleX;
+                var y1 = fillStyle.y1_ / arcScaleY;
+                var p0 = getCoords(ctx, x0, y0);
+                var p1 = getCoords(ctx, x1, y1);
+                var dx = p1.x - p0.x;
+                var dy = p1.y - p0.y;
+                angle = Math.atan2(dx, dy) * 180 / Math.PI;
+                if (angle < 0)angle += 360;
+                if (angle < 1E-6)angle = 0
+            } else {
+                var p0 = getCoords(ctx,
+                    fillStyle.x0_, fillStyle.y0_);
+                focus = {x: (p0.x - min.x) / width, y: (p0.y - min.y) / height};
+                width /= arcScaleX * Z;
+                height /= arcScaleY * Z;
+                var dimension = m.max(width, height);
+                shift = 2 * fillStyle.r0_ / dimension;
+                expansion = 2 * fillStyle.r1_ / dimension - shift
+            }
+            var stops = fillStyle.colors_;
+            stops.sort(function (cs1, cs2) {
+                return cs1.offset - cs2.offset
+            });
+            var length = stops.length;
+            var color1 = stops[0].color;
+            var color2 = stops[length - 1].color;
+            var opacity1 = stops[0].alpha * ctx.globalAlpha;
+            var opacity2 = stops[length - 1].alpha * ctx.globalAlpha;
+            var colors =
+                [];
+            for (var i = 0; i < length; i++) {
+                var stop = stops[i];
+                colors.push(stop.offset * expansion + shift + " " + stop.color)
+            }
+            lineStr.push('<g_vml_:fill type="', fillStyle.type_, '"', ' method="none" focus="100%"', ' color="', color1, '"', ' color2="', color2, '"', ' colors="', colors.join(","), '"', ' opacity="', opacity2, '"', ' g_o_:opacity2="', opacity1, '"', ' angle="', angle, '"', ' focusposition="', focus.x, ",", focus.y, '" />')
+        } else if (fillStyle instanceof CanvasPattern_) {
+            if (width && height) {
+                var deltaLeft = -min.x;
+                var deltaTop = -min.y;
+                lineStr.push("<g_vml_:fill",
+                    ' position="', deltaLeft / width * arcScaleX * arcScaleX, ",", deltaTop / height * arcScaleY * arcScaleY, '"', ' type="tile"', ' src="', fillStyle.src_, '" />')
+            }
+        } else {
+            var a = processStyle(ctx.fillStyle);
+            var color = a.color;
+            var opacity = a.alpha * ctx.globalAlpha;
+            lineStr.push('<g_vml_:fill color="', color, '" opacity="', opacity, '" />')
+        }
+    }
+
+    contextPrototype.fill = function () {
+        this.stroke(true)
+    };
+    contextPrototype.closePath = function () {
+        this.currentPath_.push({type: "close"})
+    };
+    function getCoords(ctx, aX, aY) {
+        var m = ctx.m_;
+        return {
+            x: Z * (aX * m[0][0] +
+            aY * m[1][0] + m[2][0]) - Z2, y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2
+        }
+    }
+
+    contextPrototype.save = function () {
+        var o = {};
+        copyState(this, o);
+        this.aStack_.push(o);
+        this.mStack_.push(this.m_);
+        this.m_ = matrixMultiply(createMatrixIdentity(), this.m_)
+    };
+    contextPrototype.restore = function () {
+        if (this.aStack_.length) {
+            copyState(this.aStack_.pop(), this);
+            this.m_ = this.mStack_.pop()
+        }
+    };
+    function matrixIsFinite(m) {
+        return isFinite(m[0][0]) && isFinite(m[0][1]) && isFinite(m[1][0]) && isFinite(m[1][1]) && isFinite(m[2][0]) && isFinite(m[2][1])
+    }
+
+    function setM(ctx,
+                  m, updateLineScale) {
+        if (!matrixIsFinite(m))return;
+        ctx.m_ = m;
+        if (updateLineScale) {
+            var det = m[0][0] * m[1][1] - m[0][1] * m[1][0];
+            ctx.lineScale_ = sqrt(abs(det))
+        }
+    }
+
+    contextPrototype.translate = function (aX, aY) {
+        var m1 = [[1, 0, 0], [0, 1, 0], [aX, aY, 1]];
+        setM(this, matrixMultiply(m1, this.m_), false)
+    };
+    contextPrototype.rotate = function (aRot) {
+        var c = mc(aRot);
+        var s = ms(aRot);
+        var m1 = [[c, s, 0], [-s, c, 0], [0, 0, 1]];
+        setM(this, matrixMultiply(m1, this.m_), false)
+    };
+    contextPrototype.scale = function (aX, aY) {
+        this.arcScaleX_ *= aX;
+        this.arcScaleY_ *= aY;
+        var m1 =
+            [[aX, 0, 0], [0, aY, 0], [0, 0, 1]];
+        setM(this, matrixMultiply(m1, this.m_), true)
+    };
+    contextPrototype.transform = function (m11, m12, m21, m22, dx, dy) {
+        var m1 = [[m11, m12, 0], [m21, m22, 0], [dx, dy, 1]];
+        setM(this, matrixMultiply(m1, this.m_), true)
+    };
+    contextPrototype.setTransform = function (m11, m12, m21, m22, dx, dy) {
+        var m = [[m11, m12, 0], [m21, m22, 0], [dx, dy, 1]];
+        setM(this, m, true)
+    };
+    contextPrototype.drawText_ = function (text, x, y, maxWidth, stroke) {
+        var m = this.m_, delta = 1E3, left = 0, right = delta, offset = {x: 0, y: 0}, lineStr = [];
+        var fontStyle = getComputedStyle(processFontStyle(this.font),
+            this.element_);
+        var fontStyleString = buildStyle(fontStyle);
+        var elementStyle = this.element_.currentStyle;
+        var textAlign = this.textAlign.toLowerCase();
+        switch (textAlign) {
+            case "left":
+            case "center":
+            case "right":
+                break;
+            case "end":
+                textAlign = elementStyle.direction == "ltr" ? "right" : "left";
+                break;
+            case "start":
+                textAlign = elementStyle.direction == "rtl" ? "right" : "left";
+                break;
+            default:
+                textAlign = "left"
+        }
+        switch (this.textBaseline) {
+            case "hanging":
+            case "top":
+                offset.y = fontStyle.size / 1.75;
+                break;
+            case "middle":
+                break;
+            default:
+            case null:
+            case "alphabetic":
+            case "ideographic":
+            case "bottom":
+                offset.y =
+                    -fontStyle.size / 2.25;
+                break
+        }
+        switch (textAlign) {
+            case "right":
+                left = delta;
+                right = 0.05;
+                break;
+            case "center":
+                left = right = delta / 2;
+                break
+        }
+        var d = getCoords(this, x + offset.x, y + offset.y);
+        lineStr.push('<g_vml_:line from="', -left, ' 0" to="', right, ' 0.05" ', ' coordsize="100 100" coordorigin="0 0"', ' filled="', !stroke, '" stroked="', !!stroke, '" style="position:absolute;width:1px;height:1px;">');
+        if (stroke)appendStroke(this, lineStr); else appendFill(this, lineStr, {x: -left, y: 0}, {
+            x: right,
+            y: fontStyle.size
+        });
+        var skewM = m[0][0].toFixed(3) +
+            "," + m[1][0].toFixed(3) + "," + m[0][1].toFixed(3) + "," + m[1][1].toFixed(3) + ",0,0";
+        var skewOffset = mr(d.x / Z) + "," + mr(d.y / Z);
+        lineStr.push('<g_vml_:skew on="t" matrix="', skewM, '" ', ' offset="', skewOffset, '" origin="', left, ' 0" />', '<g_vml_:path textpathok="true" />', '<g_vml_:textpath on="true" string="', encodeHtmlAttribute(text), '" style="v-text-align:', textAlign, ";font:", encodeHtmlAttribute(fontStyleString), '" /></g_vml_:line>');
+        this.element_.insertAdjacentHTML("beforeEnd", lineStr.join(""))
+    };
+    contextPrototype.fillText =
+        function (text, x, y, maxWidth) {
+            this.drawText_(text, x, y, maxWidth, false)
+        };
+    contextPrototype.strokeText = function (text, x, y, maxWidth) {
+        this.drawText_(text, x, y, maxWidth, true)
+    };
+    contextPrototype.measureText = function (text) {
+        if (!this.textMeasureEl_) {
+            var s = '<span style="position:absolute;' + "top:-20000px;left:0;padding:0;margin:0;border:none;" + 'white-space:pre;"></span>';
+            this.element_.insertAdjacentHTML("beforeEnd", s);
+            this.textMeasureEl_ = this.element_.lastChild
+        }
+        var doc = this.element_.ownerDocument;
+        this.textMeasureEl_.innerHTML =
+            "";
+        this.textMeasureEl_.style.font = this.font;
+        this.textMeasureEl_.appendChild(doc.createTextNode(text));
+        return {width: this.textMeasureEl_.offsetWidth}
+    };
+    contextPrototype.clip = function () {
+    };
+    contextPrototype.arcTo = function () {
+    };
+    contextPrototype.createPattern = function (image, repetition) {
+        return new CanvasPattern_(image, repetition)
+    };
+    function CanvasGradient_(aType) {
+        this.type_ = aType;
+        this.x0_ = 0;
+        this.y0_ = 0;
+        this.r0_ = 0;
+        this.x1_ = 0;
+        this.y1_ = 0;
+        this.r1_ = 0;
+        this.colors_ = []
+    }
+
+    CanvasGradient_.prototype.addColorStop = function (aOffset,
+                                                       aColor) {
+        aColor = processStyle(aColor);
+        this.colors_.push({offset: aOffset, color: aColor.color, alpha: aColor.alpha})
+    };
+    function CanvasPattern_(image, repetition) {
+        assertImageIsValid(image);
+        switch (repetition) {
+            case "repeat":
+            case null:
+            case "":
+                this.repetition_ = "repeat";
+                break;
+            case "repeat-x":
+            case "repeat-y":
+            case "no-repeat":
+                this.repetition_ = repetition;
+                break;
+            default:
+                throwException("SYNTAX_ERR")
+        }
+        this.src_ = image.src;
+        this.width_ = image.width;
+        this.height_ = image.height
+    }
+
+    function throwException(s) {
+        throw new DOMException_(s);
+    }
+
+    function assertImageIsValid(img) {
+        if (!img || img.nodeType != 1 || img.tagName != "IMG")throwException("TYPE_MISMATCH_ERR");
+        if (img.readyState != "complete")throwException("INVALID_STATE_ERR")
+    }
+
+    function DOMException_(s) {
+        this.code = this[s];
+        this.message = s + ": DOM Exception " + this.code
+    }
+
+    var p = DOMException_.prototype = new Error;
+    p.INDEX_SIZE_ERR = 1;
+    p.DOMSTRING_SIZE_ERR = 2;
+    p.HIERARCHY_REQUEST_ERR = 3;
+    p.WRONG_DOCUMENT_ERR = 4;
+    p.INVALID_CHARACTER_ERR = 5;
+    p.NO_DATA_ALLOWED_ERR = 6;
+    p.NO_MODIFICATION_ALLOWED_ERR = 7;
+    p.NOT_FOUND_ERR = 8;
+    p.NOT_SUPPORTED_ERR =
+        9;
+    p.INUSE_ATTRIBUTE_ERR = 10;
+    p.INVALID_STATE_ERR = 11;
+    p.SYNTAX_ERR = 12;
+    p.INVALID_MODIFICATION_ERR = 13;
+    p.NAMESPACE_ERR = 14;
+    p.INVALID_ACCESS_ERR = 15;
+    p.VALIDATION_ERR = 16;
+    p.TYPE_MISMATCH_ERR = 17;
+    G_vmlCanvasManager = G_vmlCanvasManager_;
+    CanvasRenderingContext2D = CanvasRenderingContext2D_;
+    CanvasGradient = CanvasGradient_;
+    CanvasPattern = CanvasPattern_;
+    DOMException = DOMException_
+})();

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/gadgetconf.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/gadgetconf.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/gadgetconf.js
new file mode 100644
index 0000000..7a47acc
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/gadgetconf.js
@@ -0,0 +1,50 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+var gadgetConfig = {
+    "id": "Member_Status",
+    "title": "Member Status",
+    "datasource": "MEMBER_STATUS",
+    "type": "batch",
+    "columns": [
+        {
+            "COLUMN_NAME": "MemberId",
+            "LABEL_NAME": "Member Id",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "Time",
+            "LABEL_NAME": "Time",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "MemberStatus",
+            "LABEL_NAME": "Member Status",
+            "DATA_TYPE": "varchar"
+        }
+    ],
+    "maxUpdateValue": 10,
+    "chartConfig": {
+        "chartType": "tabular",
+        "xAxis": 1
+    }
+    ,
+    "domain": "carbon.super"
+};
\ No newline at end of file


[14/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/artifact.xml
new file mode 100644
index 0000000..faa288b
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="GadgetMemberInformation" version="1.0.0" type="dashboards/gadget" serverRole="DataAnalyticsServer">
+    <file>Member_Information</file>
+</artifact>
\ No newline at end of file


[37/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/bootstrap.min.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/bootstrap.min.css
new file mode 100644
index 0000000..c65f62d
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/bootstrap.min.css
@@ -0,0 +1,5935 @@
+/*!
+ * Bootstrap v2.2.1
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix {
+    *zoom: 1;
+}
+
+.clearfix:before, .clearfix:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.clearfix:after {
+    clear: both;
+}
+
+.hide-text {
+    font: 0/0 a;
+    color: transparent;
+    text-shadow: none;
+    background-color: transparent;
+    border: 0;
+}
+
+.input-block-level {
+    display: block;
+    width: 100%;
+    min-height: 30px;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+
+article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {
+    display: block;
+}
+
+audio, canvas, video {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+}
+
+audio:not([controls]) {
+    display: none;
+}
+
+html {
+    font-size: 100%;
+    -webkit-text-size-adjust: 100%;
+    -ms-text-size-adjust: 100%;
+}
+
+a:focus {
+    outline: thin dotted #333;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+
+a:hover, a:active {
+    outline: 0;
+}
+
+sub, sup {
+    position: relative;
+    font-size: 75%;
+    line-height: 0;
+    vertical-align: baseline;
+}
+
+sup {
+    top: -0.5em;
+}
+
+sub {
+    bottom: -0.25em;
+}
+
+img {
+    max-width: 100%;
+    width: auto \9;
+    height: auto;
+    vertical-align: middle;
+    border: 0;
+    -ms-interpolation-mode: bicubic;
+}
+
+#map_canvas img, .google-maps img {
+    max-width: none;
+}
+
+button, input, select, textarea {
+    margin: 0;
+    font-size: 100%;
+    vertical-align: middle;
+}
+
+button, input {
+    *overflow: visible;
+    line-height: normal;
+}
+
+button::-moz-focus-inner, input::-moz-focus-inner {
+    padding: 0;
+    border: 0;
+}
+
+button, html input[type="button"], input[type="reset"], input[type="submit"] {
+    -webkit-appearance: button;
+    cursor: pointer;
+}
+
+input[type="search"] {
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+    -webkit-appearance: textfield;
+}
+
+input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button {
+    -webkit-appearance: none;
+}
+
+textarea {
+    overflow: auto;
+    vertical-align: top;
+}
+
+body {
+    margin: 0;
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+    font-size: 14px;
+    line-height: 20px;
+    color: #333333;
+    background-color: #ffffff;
+}
+
+a {
+    color: #0088cc;
+    text-decoration: none;
+}
+
+a:hover {
+    color: #005580;
+    text-decoration: underline;
+}
+
+.img-rounded {
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.img-polaroid {
+    padding: 4px;
+    background-color: #fff;
+    border: 1px solid #ccc;
+    border: 1px solid rgba(0, 0, 0, 0.2);
+    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+    -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+
+.img-circle {
+    -webkit-border-radius: 500px;
+    -moz-border-radius: 500px;
+    border-radius: 500px;
+}
+
+.row {
+    margin-left: -20px;
+    *zoom: 1;
+}
+
+.row:before, .row:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.row:after {
+    clear: both;
+}
+
+[class*="span"] {
+    float: left;
+    min-height: 1px;
+    margin-left: 20px;
+}
+
+.container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
+    width: 940px;
+}
+
+.span12 {
+    width: 940px;
+}
+
+.span11 {
+    width: 860px;
+}
+
+.span10 {
+    width: 780px;
+}
+
+.span9 {
+    width: 700px;
+}
+
+.span8 {
+    width: 620px;
+}
+
+.span7 {
+    width: 540px;
+}
+
+.span6 {
+    width: 460px;
+}
+
+.span5 {
+    width: 380px;
+}
+
+.span4 {
+    width: 300px;
+}
+
+.span3 {
+    width: 220px;
+}
+
+.span2 {
+    width: 140px;
+}
+
+.span1 {
+    width: 60px;
+}
+
+.offset12 {
+    margin-left: 980px;
+}
+
+.offset11 {
+    margin-left: 900px;
+}
+
+.offset10 {
+    margin-left: 820px;
+}
+
+.offset9 {
+    margin-left: 740px;
+}
+
+.offset8 {
+    margin-left: 660px;
+}
+
+.offset7 {
+    margin-left: 580px;
+}
+
+.offset6 {
+    margin-left: 500px;
+}
+
+.offset5 {
+    margin-left: 420px;
+}
+
+.offset4 {
+    margin-left: 340px;
+}
+
+.offset3 {
+    margin-left: 260px;
+}
+
+.offset2 {
+    margin-left: 180px;
+}
+
+.offset1 {
+    margin-left: 100px;
+}
+
+.row-fluid {
+    width: 100%;
+    *zoom: 1;
+}
+
+.row-fluid:before, .row-fluid:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.row-fluid:after {
+    clear: both;
+}
+
+.row-fluid [class*="span"] {
+    display: block;
+    width: 100%;
+    min-height: 30px;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+    float: left;
+    margin-left: 2.127659574468085%;
+    *margin-left: 2.074468085106383%;
+}
+
+.row-fluid [class*="span"]:first-child {
+    margin-left: 0;
+}
+
+.row-fluid .controls-row [class*="span"] + [class*="span"] {
+    margin-left: 2.127659574468085%;
+}
+
+.row-fluid .span12 {
+    width: 100%;
+    *width: 99.94680851063829%;
+}
+
+.row-fluid .span11 {
+    width: 91.48936170212765%;
+    *width: 91.43617021276594%;
+}
+
+.row-fluid .span10 {
+    width: 82.97872340425532%;
+    *width: 82.92553191489361%;
+}
+
+.row-fluid .span9 {
+    width: 74.46808510638297%;
+    *width: 74.41489361702126%;
+}
+
+.row-fluid .span8 {
+    width: 65.95744680851064%;
+    *width: 65.90425531914893%;
+}
+
+.row-fluid .span7 {
+    width: 57.44680851063829%;
+    *width: 57.39361702127659%;
+}
+
+.row-fluid .span6 {
+    width: 48.93617021276595%;
+    *width: 48.88297872340425%;
+}
+
+.row-fluid .span5 {
+    width: 40.42553191489362%;
+    *width: 40.37234042553192%;
+}
+
+.row-fluid .span4 {
+    width: 31.914893617021278%;
+    *width: 31.861702127659576%;
+}
+
+.row-fluid .span3 {
+    width: 23.404255319148934%;
+    *width: 23.351063829787233%;
+}
+
+.row-fluid .span2 {
+    width: 14.893617021276595%;
+    *width: 14.840425531914894%;
+}
+
+.row-fluid .span1 {
+    width: 6.382978723404255%;
+    *width: 6.329787234042553%;
+}
+
+.row-fluid .offset12 {
+    margin-left: 104.25531914893617%;
+    *margin-left: 104.14893617021275%;
+}
+
+.row-fluid .offset12:first-child {
+    margin-left: 102.12765957446808%;
+    *margin-left: 102.02127659574467%;
+}
+
+.row-fluid .offset11 {
+    margin-left: 95.74468085106382%;
+    *margin-left: 95.6382978723404%;
+}
+
+.row-fluid .offset11:first-child {
+    margin-left: 93.61702127659574%;
+    *margin-left: 93.51063829787232%;
+}
+
+.row-fluid .offset10 {
+    margin-left: 87.23404255319149%;
+    *margin-left: 87.12765957446807%;
+}
+
+.row-fluid .offset10:first-child {
+    margin-left: 85.1063829787234%;
+    *margin-left: 84.99999999999999%;
+}
+
+.row-fluid .offset9 {
+    margin-left: 78.72340425531914%;
+    *margin-left: 78.61702127659572%;
+}
+
+.row-fluid .offset9:first-child {
+    margin-left: 76.59574468085106%;
+    *margin-left: 76.48936170212764%;
+}
+
+.row-fluid .offset8 {
+    margin-left: 70.2127659574468%;
+    *margin-left: 70.10638297872339%;
+}
+
+.row-fluid .offset8:first-child {
+    margin-left: 68.08510638297872%;
+    *margin-left: 67.9787234042553%;
+}
+
+.row-fluid .offset7 {
+    margin-left: 61.70212765957446%;
+    *margin-left: 61.59574468085106%;
+}
+
+.row-fluid .offset7:first-child {
+    margin-left: 59.574468085106375%;
+    *margin-left: 59.46808510638297%;
+}
+
+.row-fluid .offset6 {
+    margin-left: 53.191489361702125%;
+    *margin-left: 53.085106382978715%;
+}
+
+.row-fluid .offset6:first-child {
+    margin-left: 51.063829787234035%;
+    *margin-left: 50.95744680851063%;
+}
+
+.row-fluid .offset5 {
+    margin-left: 44.68085106382979%;
+    *margin-left: 44.57446808510638%;
+}
+
+.row-fluid .offset5:first-child {
+    margin-left: 42.5531914893617%;
+    *margin-left: 42.4468085106383%;
+}
+
+.row-fluid .offset4 {
+    margin-left: 36.170212765957444%;
+    *margin-left: 36.06382978723405%;
+}
+
+.row-fluid .offset4:first-child {
+    margin-left: 34.04255319148936%;
+    *margin-left: 33.93617021276596%;
+}
+
+.row-fluid .offset3 {
+    margin-left: 27.659574468085104%;
+    *margin-left: 27.5531914893617%;
+}
+
+.row-fluid .offset3:first-child {
+    margin-left: 25.53191489361702%;
+    *margin-left: 25.425531914893618%;
+}
+
+.row-fluid .offset2 {
+    margin-left: 19.148936170212764%;
+    *margin-left: 19.04255319148936%;
+}
+
+.row-fluid .offset2:first-child {
+    margin-left: 17.02127659574468%;
+    *margin-left: 16.914893617021278%;
+}
+
+.row-fluid .offset1 {
+    margin-left: 10.638297872340425%;
+    *margin-left: 10.53191489361702%;
+}
+
+.row-fluid .offset1:first-child {
+    margin-left: 8.51063829787234%;
+    *margin-left: 8.404255319148938%;
+}
+
+[class*="span"].hide, .row-fluid [class*="span"].hide {
+    display: none;
+}
+
+[class*="span"].pull-right, .row-fluid [class*="span"].pull-right {
+    float: right;
+}
+
+.container {
+    margin-right: auto;
+    margin-left: auto;
+    *zoom: 1;
+}
+
+.container:before, .container:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.container:after {
+    clear: both;
+}
+
+.container-fluid {
+    padding-right: 20px;
+    padding-left: 20px;
+    *zoom: 1;
+}
+
+.container-fluid:before, .container-fluid:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.container-fluid:after {
+    clear: both;
+}
+
+p {
+    margin: 0 0 10px;
+}
+
+.lead {
+    margin-bottom: 20px;
+    font-size: 21px;
+    font-weight: 200;
+    line-height: 30px;
+}
+
+small {
+    font-size: 85%;
+}
+
+strong {
+    font-weight: bold;
+}
+
+em {
+    font-style: italic;
+}
+
+cite {
+    font-style: normal;
+}
+
+.muted {
+    color: #999999;
+}
+
+.text-warning {
+    color: #c09853;
+}
+
+a.text-warning:hover {
+    color: #a47e3c;
+}
+
+.text-error {
+    color: #b94a48;
+}
+
+a.text-error:hover {
+    color: #953b39;
+}
+
+.text-info {
+    color: #3a87ad;
+}
+
+a.text-info:hover {
+    color: #2d6987;
+}
+
+.text-success {
+    color: #468847;
+}
+
+a.text-success:hover {
+    color: #356635;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 10px 0;
+    font-family: inherit;
+    font-weight: bold;
+    line-height: 20px;
+    color: inherit;
+    text-rendering: optimizelegibility;
+}
+
+h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
+    font-weight: normal;
+    line-height: 1;
+    color: #999999;
+}
+
+h1, h2, h3 {
+    line-height: 40px;
+}
+
+h1 {
+    font-size: 38.5px;
+}
+
+h2 {
+    font-size: 31.5px;
+}
+
+h3 {
+    font-size: 24.5px;
+}
+
+h4 {
+    font-size: 17.5px;
+}
+
+h5 {
+    font-size: 14px;
+}
+
+h6 {
+    font-size: 11.9px;
+}
+
+h1 small {
+    font-size: 24.5px;
+}
+
+h2 small {
+    font-size: 17.5px;
+}
+
+h3 small {
+    font-size: 14px;
+}
+
+h4 small {
+    font-size: 14px;
+}
+
+.page-header {
+    padding-bottom: 9px;
+    margin: 20px 0 30px;
+    border-bottom: 1px solid #eeeeee;
+}
+
+ul, ol {
+    padding: 0;
+    margin: 0 0 10px 25px;
+}
+
+ul ul, ul ol, ol ol, ol ul {
+    margin-bottom: 0;
+}
+
+li {
+    line-height: 20px;
+}
+
+ul.unstyled, ol.unstyled {
+    margin-left: 0;
+    list-style: none;
+}
+
+dl {
+    margin-bottom: 20px;
+}
+
+dt, dd {
+    line-height: 20px;
+}
+
+dt {
+    font-weight: bold;
+}
+
+dd {
+    margin-left: 10px;
+}
+
+.dl-horizontal {
+    *zoom: 1;
+}
+
+.dl-horizontal:before, .dl-horizontal:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.dl-horizontal:after {
+    clear: both;
+}
+
+.dl-horizontal dt {
+    float: left;
+    width: 160px;
+    clear: left;
+    text-align: right;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+.dl-horizontal dd {
+    margin-left: 180px;
+}
+
+hr {
+    margin: 20px 0;
+    border: 0;
+    border-top: 1px solid #eeeeee;
+    border-bottom: 1px solid #ffffff;
+}
+
+abbr[title], abbr[data-original-title] {
+    cursor: help;
+    border-bottom: 1px dotted #999999;
+}
+
+abbr.initialism {
+    font-size: 90%;
+    text-transform: uppercase;
+}
+
+blockquote {
+    padding: 0 0 0 15px;
+    margin: 0 0 20px;
+    border-left: 5px solid #eeeeee;
+}
+
+blockquote p {
+    margin-bottom: 0;
+    font-size: 16px;
+    font-weight: 300;
+    line-height: 25px;
+}
+
+blockquote small {
+    display: block;
+    line-height: 20px;
+    color: #999999;
+}
+
+blockquote small:before {
+    content: '\2014 \00A0';
+}
+
+blockquote.pull-right {
+    float: right;
+    padding-right: 15px;
+    padding-left: 0;
+    border-right: 5px solid #eeeeee;
+    border-left: 0;
+}
+
+blockquote.pull-right p, blockquote.pull-right small {
+    text-align: right;
+}
+
+blockquote.pull-right small:before {
+    content: '';
+}
+
+blockquote.pull-right small:after {
+    content: '\00A0 \2014';
+}
+
+q:before, q:after, blockquote:before, blockquote:after {
+    content: "";
+}
+
+address {
+    display: block;
+    margin-bottom: 20px;
+    font-style: normal;
+    line-height: 20px;
+}
+
+code, pre {
+    padding: 0 3px 2px;
+    font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+    font-size: 12px;
+    color: #333333;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+code {
+    padding: 2px 4px;
+    color: #d14;
+    background-color: #f7f7f9;
+    border: 1px solid #e1e1e8;
+}
+
+pre {
+    display: block;
+    padding: 9.5px;
+    margin: 0 0 10px;
+    font-size: 13px;
+    line-height: 20px;
+    word-break: break-all;
+    word-wrap: break-word;
+    white-space: pre;
+    white-space: pre-wrap;
+    background-color: #f5f5f5;
+    border: 1px solid #ccc;
+    border: 1px solid rgba(0, 0, 0, 0.15);
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+pre.prettyprint {
+    margin-bottom: 20px;
+}
+
+pre code {
+    padding: 0;
+    color: inherit;
+    background-color: transparent;
+    border: 0;
+}
+
+.pre-scrollable {
+    max-height: 340px;
+    overflow-y: scroll;
+}
+
+.label, .badge {
+    display: inline-block;
+    padding: 2px 4px;
+    font-size: 11.844px;
+    font-weight: bold;
+    line-height: 14px;
+    color: #ffffff;
+    vertical-align: baseline;
+    white-space: nowrap;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #999999;
+}
+
+.label {
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+.badge {
+    padding-left: 9px;
+    padding-right: 9px;
+    -webkit-border-radius: 9px;
+    -moz-border-radius: 9px;
+    border-radius: 9px;
+}
+
+a.label:hover, a.badge:hover {
+    color: #ffffff;
+    text-decoration: none;
+    cursor: pointer;
+}
+
+.label-important, .badge-important {
+    background-color: #b94a48;
+}
+
+.label-important[href], .badge-important[href] {
+    background-color: #953b39;
+}
+
+.label-warning, .badge-warning {
+    background-color: #f89406;
+}
+
+.label-warning[href], .badge-warning[href] {
+    background-color: #c67605;
+}
+
+.label-success, .badge-success {
+    background-color: #468847;
+}
+
+.label-success[href], .badge-success[href] {
+    background-color: #356635;
+}
+
+.label-info, .badge-info {
+    background-color: #3a87ad;
+}
+
+.label-info[href], .badge-info[href] {
+    background-color: #2d6987;
+}
+
+.label-inverse, .badge-inverse {
+    background-color: #333333;
+}
+
+.label-inverse[href], .badge-inverse[href] {
+    background-color: #1a1a1a;
+}
+
+.btn .label, .btn .badge {
+    position: relative;
+    top: -1px;
+}
+
+.btn-mini .label, .btn-mini .badge {
+    top: 0;
+}
+
+table {
+    max-width: 100%;
+    background-color: transparent;
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+.table {
+    width: 100%;
+    margin-bottom: 20px;
+}
+
+.table th, .table td {
+    padding: 8px;
+    line-height: 20px;
+    text-align: left;
+    vertical-align: top;
+    border-top: 1px solid #dddddd;
+}
+
+.table th {
+    font-weight: bold;
+}
+
+.table thead th {
+    vertical-align: bottom;
+}
+
+.table caption + thead tr:first-child th, .table caption + thead tr:first-child td, .table colgroup + thead tr:first-child th, .table colgroup + thead tr:first-child td, .table thead:first-child tr:first-child th, .table thead:first-child tr:first-child td {
+    border-top: 0;
+}
+
+.table tbody + tbody {
+    border-top: 2px solid #dddddd;
+}
+
+.table-condensed th, .table-condensed td {
+    padding: 4px 5px;
+}
+
+.table-bordered {
+    border: 1px solid #dddddd;
+    border-collapse: separate;
+    *border-collapse: collapse;
+    border-left: 0;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.table-bordered th, .table-bordered td {
+    border-left: 1px solid #dddddd;
+}
+
+.table-bordered caption + thead tr:first-child th, .table-bordered caption + tbody tr:first-child th, .table-bordered caption + tbody tr:first-child td, .table-bordered colgroup + thead tr:first-child th, .table-bordered colgroup + tbody tr:first-child th, .table-bordered colgroup + tbody tr:first-child td, .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td {
+    border-top: 0;
+}
+
+.table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child {
+    -webkit-border-top-left-radius: 4px;
+    border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child {
+    -webkit-border-top-right-radius: 4px;
+    border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child, .table-bordered tfoot:last-child tr:last-child td:first-child {
+    -webkit-border-radius: 0 0 0 4px;
+    -moz-border-radius: 0 0 0 4px;
+    border-radius: 0 0 0 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child, .table-bordered tfoot:last-child tr:last-child td:last-child {
+    -webkit-border-bottom-right-radius: 4px;
+    border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+}
+
+.table-bordered caption + thead tr:first-child th:first-child, .table-bordered caption + tbody tr:first-child td:first-child, .table-bordered colgroup + thead tr:first-child th:first-child, .table-bordered colgroup + tbody tr:first-child td:first-child {
+    -webkit-border-top-left-radius: 4px;
+    border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered caption + thead tr:first-child th:last-child, .table-bordered caption + tbody tr:first-child td:last-child, .table-bordered colgroup + thead tr:first-child th:last-child, .table-bordered colgroup + tbody tr:first-child td:last-child {
+    -webkit-border-top-right-radius: 4px;
+    border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+}
+
+.table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th {
+    background-color: #f9f9f9;
+}
+
+.table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
+    background-color: #f5f5f5;
+}
+
+table td[class*="span"], table th[class*="span"], .row-fluid table td[class*="span"], .row-fluid table th[class*="span"] {
+    display: table-cell;
+    float: none;
+    margin-left: 0;
+}
+
+.table td.span1, .table th.span1 {
+    float: none;
+    width: 44px;
+    margin-left: 0;
+}
+
+.table td.span2, .table th.span2 {
+    float: none;
+    width: 124px;
+    margin-left: 0;
+}
+
+.table td.span3, .table th.span3 {
+    float: none;
+    width: 204px;
+    margin-left: 0;
+}
+
+.table td.span4, .table th.span4 {
+    float: none;
+    width: 284px;
+    margin-left: 0;
+}
+
+.table td.span5, .table th.span5 {
+    float: none;
+    width: 364px;
+    margin-left: 0;
+}
+
+.table td.span6, .table th.span6 {
+    float: none;
+    width: 444px;
+    margin-left: 0;
+}
+
+.table td.span7, .table th.span7 {
+    float: none;
+    width: 524px;
+    margin-left: 0;
+}
+
+.table td.span8, .table th.span8 {
+    float: none;
+    width: 604px;
+    margin-left: 0;
+}
+
+.table td.span9, .table th.span9 {
+    float: none;
+    width: 684px;
+    margin-left: 0;
+}
+
+.table td.span10, .table th.span10 {
+    float: none;
+    width: 764px;
+    margin-left: 0;
+}
+
+.table td.span11, .table th.span11 {
+    float: none;
+    width: 844px;
+    margin-left: 0;
+}
+
+.table td.span12, .table th.span12 {
+    float: none;
+    width: 924px;
+    margin-left: 0;
+}
+
+.table tbody tr.success td {
+    background-color: #dff0d8;
+}
+
+.table tbody tr.error td {
+    background-color: #f2dede;
+}
+
+.table tbody tr.warning td {
+    background-color: #fcf8e3;
+}
+
+.table tbody tr.info td {
+    background-color: #d9edf7;
+}
+
+.table-hover tbody tr.success:hover td {
+    background-color: #d0e9c6;
+}
+
+.table-hover tbody tr.error:hover td {
+    background-color: #ebcccc;
+}
+
+.table-hover tbody tr.warning:hover td {
+    background-color: #faf2cc;
+}
+
+.table-hover tbody tr.info:hover td {
+    background-color: #c4e3f3;
+}
+
+form {
+    margin: 0 0 20px;
+}
+
+fieldset {
+    padding: 0;
+    margin: 0;
+    border: 0;
+}
+
+legend {
+    display: block;
+    width: 100%;
+    padding: 0;
+    margin-bottom: 20px;
+    font-size: 21px;
+    line-height: 40px;
+    color: #333333;
+    border: 0;
+    border-bottom: 1px solid #e5e5e5;
+}
+
+legend small {
+    font-size: 15px;
+    color: #999999;
+}
+
+label, input, button, select, textarea {
+    font-size: 14px;
+    font-weight: normal;
+    line-height: 20px;
+}
+
+input, button, select, textarea {
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+label {
+    display: block;
+    margin-bottom: 5px;
+}
+
+select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
+    display: inline-block;
+    height: 20px;
+    padding: 4px 6px;
+    margin-bottom: 10px;
+    font-size: 14px;
+    line-height: 20px;
+    color: #555555;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    vertical-align: middle;
+}
+
+input, textarea, .uneditable-input {
+    width: 206px;
+}
+
+textarea {
+    height: auto;
+}
+
+textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
+    background-color: #ffffff;
+    border: 1px solid #cccccc;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -webkit-transition: border linear .2s, box-shadow linear .2s;
+    -moz-transition: border linear .2s, box-shadow linear .2s;
+    -o-transition: border linear .2s, box-shadow linear .2s;
+    transition: border linear .2s, box-shadow linear .2s;
+}
+
+textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus {
+    border-color: rgba(82, 168, 236, 0.8);
+    outline: 0;
+    outline: thin dotted \9;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(82, 168, 236, .6);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(82, 168, 236, .6);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(82, 168, 236, .6);
+}
+
+input[type="radio"], input[type="checkbox"] {
+    margin: 4px 0 0;
+    *margin-top: 0;
+    margin-top: 1px \9;
+    line-height: normal;
+    cursor: pointer;
+}
+
+input[type="file"], input[type="image"], input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"] {
+    width: auto;
+}
+
+select, input[type="file"] {
+    height: 30px;
+    *margin-top: 4px;
+    line-height: 30px;
+}
+
+select {
+    width: 220px;
+    border: 1px solid #cccccc;
+    background-color: #ffffff;
+}
+
+select[multiple], select[size] {
+    height: auto;
+}
+
+select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus {
+    outline: thin dotted #333;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+
+.uneditable-input, .uneditable-textarea {
+    color: #999999;
+    background-color: #fcfcfc;
+    border-color: #cccccc;
+    -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+    -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+    cursor: not-allowed;
+}
+
+.uneditable-input {
+    overflow: hidden;
+    white-space: nowrap;
+}
+
+.uneditable-textarea {
+    width: auto;
+    height: auto;
+}
+
+input:-moz-placeholder, textarea:-moz-placeholder {
+    color: #999999;
+}
+
+input:-ms-input-placeholder, textarea:-ms-input-placeholder {
+    color: #999999;
+}
+
+input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
+    color: #999999;
+}
+
+.radio, .checkbox {
+    min-height: 20px;
+    padding-left: 20px;
+}
+
+.radio input[type="radio"], .checkbox input[type="checkbox"] {
+    float: left;
+    margin-left: -20px;
+}
+
+.controls > .radio:first-child, .controls > .checkbox:first-child {
+    padding-top: 5px;
+}
+
+.radio.inline, .checkbox.inline {
+    display: inline-block;
+    padding-top: 5px;
+    margin-bottom: 0;
+    vertical-align: middle;
+}
+
+.radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
+    margin-left: 10px;
+}
+
+.input-mini {
+    width: 60px;
+}
+
+.input-small {
+    width: 90px;
+}
+
+.input-medium {
+    width: 150px;
+}
+
+.input-large {
+    width: 210px;
+}
+
+.input-xlarge {
+    width: 270px;
+}
+
+.input-xxlarge {
+    width: 530px;
+}
+
+input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"] {
+    float: none;
+    margin-left: 0;
+}
+
+.input-append input[class*="span"], .input-append .uneditable-input[class*="span"], .input-prepend input[class*="span"], .input-prepend .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"], .row-fluid .input-prepend [class*="span"], .row-fluid .input-append [class*="span"] {
+    display: inline-block;
+}
+
+input, textarea, .uneditable-input {
+    margin-left: 0;
+}
+
+.controls-row [class*="span"] + [class*="span"] {
+    margin-left: 20px;
+}
+
+input.span12, textarea.span12, .uneditable-input.span12 {
+    width: 926px;
+}
+
+input.span11, textarea.span11, .uneditable-input.span11 {
+    width: 846px;
+}
+
+input.span10, textarea.span10, .uneditable-input.span10 {
+    width: 766px;
+}
+
+input.span9, textarea.span9, .uneditable-input.span9 {
+    width: 686px;
+}
+
+input.span8, textarea.span8, .uneditable-input.span8 {
+    width: 606px;
+}
+
+input.span7, textarea.span7, .uneditable-input.span7 {
+    width: 526px;
+}
+
+input.span6, textarea.span6, .uneditable-input.span6 {
+    width: 446px;
+}
+
+input.span5, textarea.span5, .uneditable-input.span5 {
+    width: 366px;
+}
+
+input.span4, textarea.span4, .uneditable-input.span4 {
+    width: 286px;
+}
+
+input.span3, textarea.span3, .uneditable-input.span3 {
+    width: 206px;
+}
+
+input.span2, textarea.span2, .uneditable-input.span2 {
+    width: 126px;
+}
+
+input.span1, textarea.span1, .uneditable-input.span1 {
+    width: 46px;
+}
+
+.controls-row {
+    *zoom: 1;
+}
+
+.controls-row:before, .controls-row:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.controls-row:after {
+    clear: both;
+}
+
+.controls-row [class*="span"], .row-fluid .controls-row [class*="span"] {
+    float: left;
+}
+
+.controls-row .checkbox[class*="span"], .controls-row .radio[class*="span"] {
+    padding-top: 5px;
+}
+
+input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
+    cursor: not-allowed;
+    background-color: #eeeeee;
+}
+
+input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"][readonly], input[type="checkbox"][readonly] {
+    background-color: transparent;
+}
+
+.control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline {
+    color: #c09853;
+}
+
+.control-group.warning .checkbox, .control-group.warning .radio, .control-group.warning input, .control-group.warning select, .control-group.warning textarea {
+    color: #c09853;
+}
+
+.control-group.warning input, .control-group.warning select, .control-group.warning textarea {
+    border-color: #c09853;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus {
+    border-color: #a47e3c;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+}
+
+.control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on {
+    color: #c09853;
+    background-color: #fcf8e3;
+    border-color: #c09853;
+}
+
+.control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline {
+    color: #b94a48;
+}
+
+.control-group.error .checkbox, .control-group.error .radio, .control-group.error input, .control-group.error select, .control-group.error textarea {
+    color: #b94a48;
+}
+
+.control-group.error input, .control-group.error select, .control-group.error textarea {
+    border-color: #b94a48;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus {
+    border-color: #953b39;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+}
+
+.control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on {
+    color: #b94a48;
+    background-color: #f2dede;
+    border-color: #b94a48;
+}
+
+.control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline {
+    color: #468847;
+}
+
+.control-group.success .checkbox, .control-group.success .radio, .control-group.success input, .control-group.success select, .control-group.success textarea {
+    color: #468847;
+}
+
+.control-group.success input, .control-group.success select, .control-group.success textarea {
+    border-color: #468847;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus {
+    border-color: #356635;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+}
+
+.control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on {
+    color: #468847;
+    background-color: #dff0d8;
+    border-color: #468847;
+}
+
+.control-group.info > label, .control-group.info .help-block, .control-group.info .help-inline {
+    color: #3a87ad;
+}
+
+.control-group.info .checkbox, .control-group.info .radio, .control-group.info input, .control-group.info select, .control-group.info textarea {
+    color: #3a87ad;
+}
+
+.control-group.info input, .control-group.info select, .control-group.info textarea {
+    border-color: #3a87ad;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.info input:focus, .control-group.info select:focus, .control-group.info textarea:focus {
+    border-color: #2d6987;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+}
+
+.control-group.info .input-prepend .add-on, .control-group.info .input-append .add-on {
+    color: #3a87ad;
+    background-color: #d9edf7;
+    border-color: #3a87ad;
+}
+
+input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid {
+    color: #b94a48;
+    border-color: #ee5f5b;
+}
+
+input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus {
+    border-color: #e9322d;
+    -webkit-box-shadow: 0 0 6px #f8b9b7;
+    -moz-box-shadow: 0 0 6px #f8b9b7;
+    box-shadow: 0 0 6px #f8b9b7;
+}
+
+.form-actions {
+    padding: 19px 20px 20px;
+    margin-top: 20px;
+    margin-bottom: 20px;
+    background-color: #f5f5f5;
+    border-top: 1px solid #e5e5e5;
+    *zoom: 1;
+}
+
+.form-actions:before, .form-actions:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.form-actions:after {
+    clear: both;
+}
+
+.help-block, .help-inline {
+    color: #595959;
+}
+
+.help-block {
+    display: block;
+    margin-bottom: 10px;
+}
+
+.help-inline {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    vertical-align: middle;
+    padding-left: 5px;
+}
+
+.input-append, .input-prepend {
+    margin-bottom: 5px;
+    font-size: 0;
+    white-space: nowrap;
+}
+
+.input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input, .input-append .dropdown-menu, .input-prepend .dropdown-menu {
+    font-size: 14px;
+}
+
+.input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input {
+    position: relative;
+    margin-bottom: 0;
+    *margin-left: 0;
+    vertical-align: top;
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-append input:focus, .input-prepend input:focus, .input-append select:focus, .input-prepend select:focus, .input-append .uneditable-input:focus, .input-prepend .uneditable-input:focus {
+    z-index: 2;
+}
+
+.input-append .add-on, .input-prepend .add-on {
+    display: inline-block;
+    width: auto;
+    height: 20px;
+    min-width: 16px;
+    padding: 4px 5px;
+    font-size: 14px;
+    font-weight: normal;
+    line-height: 20px;
+    text-align: center;
+    text-shadow: 0 1px 0 #ffffff;
+    background-color: #eeeeee;
+    border: 1px solid #ccc;
+}
+
+.input-append .add-on, .input-prepend .add-on, .input-append .btn, .input-prepend .btn {
+    vertical-align: top;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.input-append .active, .input-prepend .active {
+    background-color: #a9dba9;
+    border-color: #46a546;
+}
+
+.input-prepend .add-on, .input-prepend .btn {
+    margin-right: -1px;
+}
+
+.input-prepend .add-on:first-child, .input-prepend .btn:first-child {
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.input-append input, .input-append select, .input-append .uneditable-input {
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.input-append input + .btn-group .btn, .input-append select + .btn-group .btn, .input-append .uneditable-input + .btn-group .btn {
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-append .add-on, .input-append .btn, .input-append .btn-group {
+    margin-left: -1px;
+}
+
+.input-append .add-on:last-child, .input-append .btn:last-child {
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append input, .input-prepend.input-append select, .input-prepend.input-append .uneditable-input {
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.input-prepend.input-append input + .btn-group .btn, .input-prepend.input-append select + .btn-group .btn, .input-prepend.input-append .uneditable-input + .btn-group .btn {
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child {
+    margin-right: -1px;
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.input-prepend.input-append .add-on:last-child, .input-prepend.input-append .btn:last-child {
+    margin-left: -1px;
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append .btn-group:first-child {
+    margin-left: 0;
+}
+
+input.search-query {
+    padding-right: 14px;
+    padding-right: 4px \9;
+    padding-left: 14px;
+    padding-left: 4px \9;
+    margin-bottom: 0;
+    -webkit-border-radius: 15px;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+}
+
+.form-search .input-append .search-query, .form-search .input-prepend .search-query {
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.form-search .input-append .search-query {
+    -webkit-border-radius: 14px 0 0 14px;
+    -moz-border-radius: 14px 0 0 14px;
+    border-radius: 14px 0 0 14px;
+}
+
+.form-search .input-append .btn {
+    -webkit-border-radius: 0 14px 14px 0;
+    -moz-border-radius: 0 14px 14px 0;
+    border-radius: 0 14px 14px 0;
+}
+
+.form-search .input-prepend .search-query {
+    -webkit-border-radius: 0 14px 14px 0;
+    -moz-border-radius: 0 14px 14px 0;
+    border-radius: 0 14px 14px 0;
+}
+
+.form-search .input-prepend .btn {
+    -webkit-border-radius: 14px 0 0 14px;
+    -moz-border-radius: 14px 0 0 14px;
+    border-radius: 14px 0 0 14px;
+}
+
+.form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input, .form-search .input-prepend, .form-inline .input-prepend, .form-horizontal .input-prepend, .form-search .input-append, .form-inline .input-append, .form-horizontal .input-append {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    margin-bottom: 0;
+    vertical-align: middle;
+}
+
+.form-search .hide, .form-inline .hide, .form-horizontal .hide {
+    display: none;
+}
+
+.form-search label, .form-inline label, .form-search .btn-group, .form-inline .btn-group {
+    display: inline-block;
+}
+
+.form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend {
+    margin-bottom: 0;
+}
+
+.form-search .radio, .form-search .checkbox, .form-inline .radio, .form-inline .checkbox {
+    padding-left: 0;
+    margin-bottom: 0;
+    vertical-align: middle;
+}
+
+.form-search .radio input[type="radio"], .form-search .checkbox input[type="checkbox"], .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] {
+    float: left;
+    margin-right: 3px;
+    margin-left: 0;
+}
+
+.control-group {
+    margin-bottom: 10px;
+}
+
+legend + .control-group {
+    margin-top: 20px;
+    -webkit-margin-top-collapse: separate;
+}
+
+.form-horizontal .control-group {
+    margin-bottom: 20px;
+    *zoom: 1;
+}
+
+.form-horizontal .control-group:before, .form-horizontal .control-group:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.form-horizontal .control-group:after {
+    clear: both;
+}
+
+.form-horizontal .control-label {
+    float: left;
+    width: 160px;
+    padding-top: 5px;
+    text-align: right;
+}
+
+.form-horizontal .controls {
+    *display: inline-block;
+    *padding-left: 20px;
+    margin-left: 180px;
+    *margin-left: 0;
+}
+
+.form-horizontal .controls:first-child {
+    *padding-left: 180px;
+}
+
+.form-horizontal .help-block {
+    margin-bottom: 0;
+}
+
+.form-horizontal input + .help-block, .form-horizontal select + .help-block, .form-horizontal textarea + .help-block {
+    margin-top: 10px;
+}
+
+.form-horizontal .form-actions {
+    padding-left: 180px;
+}
+
+.btn {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    padding: 4px 12px;
+    margin-bottom: 0;
+    font-size: 14px;
+    line-height: 20px;
+    *line-height: 20px;
+    text-align: center;
+    vertical-align: middle;
+    cursor: pointer;
+    color: #333333;
+    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+    background-color: #f5f5f5;
+    background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+    background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+    background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+    background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
+    border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #e6e6e6;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+    border: 1px solid #bbbbbb;
+    *border: 0;
+    border-bottom-color: #a2a2a2;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    *margin-left: .3em;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+}
+
+.btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled] {
+    color: #333333;
+    background-color: #e6e6e6;
+    *background-color: #d9d9d9;
+}
+
+.btn:active, .btn.active {
+    background-color: #cccccc \9;
+}
+
+.btn:first-child {
+    *margin-left: 0;
+}
+
+.btn:hover {
+    color: #333333;
+    text-decoration: none;
+    background-color: #e6e6e6;
+    *background-color: #d9d9d9;
+    background-position: 0 -15px;
+    -webkit-transition: background-position 0.1s linear;
+    -moz-transition: background-position 0.1s linear;
+    -o-transition: background-position 0.1s linear;
+    transition: background-position 0.1s linear;
+}
+
+.btn:focus {
+    outline: thin dotted #333;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+
+.btn.active, .btn:active {
+    background-color: #e6e6e6;
+    background-color: #d9d9d9 \9;
+    background-image: none;
+    outline: 0;
+    -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+}
+
+.btn.disabled, .btn[disabled] {
+    cursor: default;
+    background-color: #e6e6e6;
+    background-image: none;
+    opacity: 0.65;
+    filter: alpha(opacity=65);
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+}
+
+.btn-large {
+    padding: 11px 19px;
+    font-size: 17.5px;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.btn-large [class^="icon-"], .btn-large [class*=" icon-"] {
+    margin-top: 2px;
+}
+
+.btn-small {
+    padding: 2px 10px;
+    font-size: 11.9px;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+.btn-small [class^="icon-"], .btn-small [class*=" icon-"] {
+    margin-top: 0;
+}
+
+.btn-mini {
+    padding: 1px 6px;
+    font-size: 10.5px;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+.btn-block {
+    display: block;
+    width: 100%;
+    padding-left: 0;
+    padding-right: 0;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+
+.btn-block + .btn-block {
+    margin-top: 5px;
+}
+
+input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block {
+    width: 100%;
+}
+
+.btn-primary.active, .btn-warning.active, .btn-danger.active, .btn-success.active, .btn-info.active, .btn-inverse.active {
+    color: rgba(255, 255, 255, 0.75);
+}
+
+.btn {
+    border-color: #c5c5c5;
+    border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
+}
+
+.btn-primary {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #006dcc;
+    background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+    background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+    background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+    background-image: linear-gradient(to bottom, #0088cc, #0044cc);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
+    border-color: #0044cc #0044cc #002a80;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #0044cc;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-primary:hover, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] {
+    color: #ffffff;
+    background-color: #0044cc;
+    *background-color: #003bb3;
+}
+
+.btn-primary:active, .btn-primary.active {
+    background-color: #003399 \9;
+}
+
+.btn-warning {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #faa732;
+    background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+    background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+    background-image: -o-linear-gradient(top, #fbb450, #f89406);
+    background-image: linear-gradient(to bottom, #fbb450, #f89406);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
+    border-color: #f89406 #f89406 #ad6704;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #f89406;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-warning:hover, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] {
+    color: #ffffff;
+    background-color: #f89406;
+    *background-color: #df8505;
+}
+
+.btn-warning:active, .btn-warning.active {
+    background-color: #c67605 \9;
+}
+
+.btn-danger {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #da4f49;
+    background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+    background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+    background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+    background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
+    border-color: #bd362f #bd362f #802420;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #bd362f;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-danger:hover, .btn-danger:active, .btn-danger.active, .btn-danger.disabled, .btn-danger[disabled] {
+    color: #ffffff;
+    background-color: #bd362f;
+    *background-color: #a9302a;
+}
+
+.btn-danger:active, .btn-danger.active {
+    background-color: #942a25 \9;
+}
+
+.btn-success {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #5bb75b;
+    background-image: -moz-linear-gradient(top, #62c462, #51a351);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+    background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+    background-image: -o-linear-gradient(top, #62c462, #51a351);
+    background-image: linear-gradient(to bottom, #62c462, #51a351);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
+    border-color: #51a351 #51a351 #387038;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #51a351;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-success:hover, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] {
+    color: #ffffff;
+    background-color: #51a351;
+    *background-color: #499249;
+}
+
+.btn-success:active, .btn-success.active {
+    background-color: #408140 \9;
+}
+
+.btn-info {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #49afcd;
+    background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+    background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+    background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+    background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
+    border-color: #2f96b4 #2f96b4 #1f6377;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #2f96b4;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-info:hover, .btn-info:active, .btn-info.active, .btn-info.disabled, .btn-info[disabled] {
+    color: #ffffff;
+    background-color: #2f96b4;
+    *background-color: #2a85a0;
+}
+
+.btn-info:active, .btn-info.active {
+    background-color: #24748c \9;
+}
+
+.btn-inverse {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #363636;
+    background-image: -moz-linear-gradient(top, #444444, #222222);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
+    background-image: -webkit-linear-gradient(top, #444444, #222222);
+    background-image: -o-linear-gradient(top, #444444, #222222);
+    background-image: linear-gradient(to bottom, #444444, #222222);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
+    border-color: #222222 #222222 #000000;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #222222;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-inverse:hover, .btn-inverse:active, .btn-inverse.active, .btn-inverse.disabled, .btn-inverse[disabled] {
+    color: #ffffff;
+    background-color: #222222;
+    *background-color: #151515;
+}
+
+.btn-inverse:active, .btn-inverse.active {
+    background-color: #080808 \9;
+}
+
+button.btn, input[type="submit"].btn {
+    *padding-top: 3px;
+    *padding-bottom: 3px;
+}
+
+button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner {
+    padding: 0;
+    border: 0;
+}
+
+button.btn.btn-large, input[type="submit"].btn.btn-large {
+    *padding-top: 7px;
+    *padding-bottom: 7px;
+}
+
+button.btn.btn-small, input[type="submit"].btn.btn-small {
+    *padding-top: 3px;
+    *padding-bottom: 3px;
+}
+
+button.btn.btn-mini, input[type="submit"].btn.btn-mini {
+    *padding-top: 1px;
+    *padding-bottom: 1px;
+}
+
+.btn-link, .btn-link:active, .btn-link[disabled] {
+    background-color: transparent;
+    background-image: none;
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+}
+
+.btn-link {
+    border-color: transparent;
+    cursor: pointer;
+    color: #0088cc;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.btn-link:hover {
+    color: #005580;
+    text-decoration: underline;
+    background-color: transparent;
+}
+
+.btn-link[disabled]:hover {
+    color: #333333;
+    text-decoration: none;
+}
+
+.btn-group {
+    position: relative;
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    font-size: 0;
+    vertical-align: middle;
+    white-space: nowrap;
+    *margin-left: .3em;
+}
+
+.btn-group:first-child {
+    *margin-left: 0;
+}
+
+.btn-group + .btn-group {
+    margin-left: 5px;
+}
+
+.btn-toolbar {
+    font-size: 0;
+    margin-top: 10px;
+    margin-bottom: 10px;
+}
+
+.btn-toolbar .btn + .btn, .btn-toolbar .btn-group + .btn, .btn-toolbar .btn + .btn-group {
+    margin-left: 5px;
+}
+
+.btn-group > .btn {
+    position: relative;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.btn-group > .btn + .btn {
+    margin-left: -1px;
+}
+
+.btn-group > .btn, .btn-group > .dropdown-menu {
+    font-size: 14px;
+}
+
+.btn-group > .btn-mini {
+    font-size: 11px;
+}
+
+.btn-group > .btn-small {
+    font-size: 12px;
+}
+
+.btn-group > .btn-large {
+    font-size: 16px;
+}
+
+.btn-group > .btn:first-child {
+    margin-left: 0;
+    -webkit-border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+    border-top-left-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+    border-bottom-left-radius: 4px;
+}
+
+.btn-group > .btn:last-child, .btn-group > .dropdown-toggle {
+    -webkit-border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+    border-top-right-radius: 4px;
+    -webkit-border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+    border-bottom-right-radius: 4px;
+}
+
+.btn-group > .btn.large:first-child {
+    margin-left: 0;
+    -webkit-border-top-left-radius: 6px;
+    -moz-border-radius-topleft: 6px;
+    border-top-left-radius: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomleft: 6px;
+    border-bottom-left-radius: 6px;
+}
+
+.btn-group > .btn.large:last-child, .btn-group > .large.dropdown-toggle {
+    -webkit-border-top-right-radius: 6px;
+    -moz-border-radius-topright: 6px;
+    border-top-right-radius: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    border-bottom-right-radius: 6px;
+}
+
+.btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active {
+    z-index: 2;
+}
+
+.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
+    outline: 0;
+}
+
+.btn-group > .btn + .dropdown-toggle {
+    padding-left: 8px;
+    padding-right: 8px;
+    -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, .125), inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, .125), inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 1px 0 0 rgba(255, 255, 255, .125), inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    *padding-top: 5px;
+    *padding-bottom: 5px;
+}
+
+.btn-group > .btn-mini + .dropdown-toggle {
+    padding-left: 5px;
+    padding-right: 5px;
+    *padding-top: 2px;
+    *padding-bottom: 2px;
+}
+
+.btn-group > .btn-small + .dropdown-toggle {
+    *padding-top: 5px;
+    *padding-bottom: 4px;
+}
+
+.btn-group > .btn-large + .dropdown-toggle {
+    padding-left: 12px;
+    padding-right: 12px;
+    *padding-top: 7px;
+    *padding-bottom: 7px;
+}
+
+.btn-group.open .dropdown-toggle {
+    background-image: none;
+    -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+}
+
+.btn-group.open .btn.dropdown-toggle {
+    background-color: #e6e6e6;
+}
+
+.btn-group.open .btn-primary.dropdown-toggle {
+    background-color: #0044cc;
+}
+
+.btn-group.open .btn-warning.dropdown-toggle {
+    background-color: #f89406;
+}
+
+.btn-group.open .btn-danger.dropdown-toggle {
+    background-color: #bd362f;
+}
+
+.btn-group.open .btn-success.dropdown-toggle {
+    background-color: #51a351;
+}
+
+.btn-group.open .btn-info.dropdown-toggle {
+    background-color: #2f96b4;
+}
+
+.btn-group.open .btn-inverse.dropdown-toggle {
+    background-color: #222222;
+}
+
+.btn .caret {
+    margin-top: 8px;
+    margin-left: 0;
+}
+
+.btn-mini .caret, .btn-small .caret, .btn-large .caret {
+    margin-top: 6px;
+}
+
+.btn-large .caret {
+    border-left-width: 5px;
+    border-right-width: 5px;
+    border-top-width: 5px;
+}
+
+.dropup .btn-large .caret {
+    border-bottom-width: 5px;
+}
+
+.btn-primary .caret, .btn-warning .caret, .btn-danger .caret, .btn-info .caret, .btn-success .caret, .btn-inverse .caret {
+    border-top-color: #ffffff;
+    border-bottom-color: #ffffff;
+}
+
+.btn-group-vertical {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+}
+
+.btn-group-vertical .btn {
+    display: block;
+    float: none;
+    width: 100%;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.btn-group-vertical .btn + .btn {
+    margin-left: 0;
+    margin-top: -1px;
+}
+
+.btn-group-vertical .btn:first-child {
+    -webkit-border-radius: 4px 4px 0 0;
+    -moz-border-radius: 4px 4px 0 0;
+    border-radius: 4px 4px 0 0;
+}
+
+.btn-group-vertical .btn:last-child {
+    -webkit-border-radius: 0 0 4px 4px;
+    -moz-border-radius: 0 0 4px 4px;
+    border-radius: 0 0 4px 4px;
+}
+
+.btn-group-vertical .btn-large:first-child {
+    -webkit-border-radius: 6px 6px 0 0;
+    -moz-border-radius: 6px 6px 0 0;
+    border-radius: 6px 6px 0 0;
+}
+
+.btn-group-vertical .btn-large:last-child {
+    -webkit-border-radius: 0 0 6px 6px;
+    -moz-border-radius: 0 0 6px 6px;
+    border-radius: 0 0 6px 6px;
+}
+
+.nav {
+    margin-left: 0;
+    margin-bottom: 20px;
+    list-style: none;
+}
+
+.nav > li > a {
+    display: block;
+}
+
+.nav > li > a:hover {
+    text-decoration: none;
+    background-color: #eeeeee;
+}
+
+.nav > .pull-right {
+    float: right;
+}
+
+.nav-header {
+    display: block;
+    padding: 3px 15px;
+    font-size: 11px;
+    font-weight: bold;
+    line-height: 20px;
+    color: #999999;
+    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+    text-transform: uppercase;
+}
+
+.nav li + .nav-header {
+    margin-top: 9px;
+}
+
+.nav-list {
+    padding-left: 15px;
+    padding-right: 15px;
+    margin-bottom: 0;
+}
+
+.nav-list > li > a, .nav-list .nav-header {
+    margin-left: -15px;
+    margin-right: -15px;
+    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+
+.nav-list > li > a {
+    padding: 3px 15px;
+}
+
+.nav-list > .active > a, .nav-list > .active > a:hover {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+    background-color: #0088cc;
+}
+
+.nav-list [class^="icon-"], .nav-list [class*=" icon-"] {
+    margin-right: 2px;
+}
+
+.nav-list .divider {
+    *width: 100%;
+    height: 1px;
+    margin: 9px 1px;
+    *margin: -5px 0 5px;
+    overflow: hidden;
+    background-color: #e5e5e5;
+    border-bottom: 1px solid #ffffff;
+}
+
+.nav-tabs, .nav-pills {
+    *zoom: 1;
+}
+
+.nav-tabs:before, .nav-pills:before, .nav-tabs:after, .nav-pills:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.nav-tabs:after, .nav-pills:after {
+    clear: both;
+}
+
+.nav-tabs > li, .nav-pills > li {
+    float: left;
+}
+
+.nav-tabs > li > a, .nav-pills > li > a {
+    padding-right: 12px;
+    padding-left: 12px;
+    margin-right: 2px;
+    line-height: 14px;
+}
+
+.nav-tabs {
+    border-bottom: 1px solid #ddd;
+}
+
+.nav-tabs > li {
+    margin-bottom: -1px;
+}
+
+.nav-tabs > li > a {
+    padding-top: 8px;
+    padding-bottom: 8px;
+    line-height: 20px;
+    border: 1px solid transparent;
+    -webkit-border-radius: 4px 4px 0 0;
+    -moz-border-radius: 4px 4px 0 0;
+    border-radius: 4px 4px 0 0;
+}
+
+.nav-tabs > li > a:hover {
+    border-color: #eeeeee #eeeeee #dddddd;
+}
+
+.nav-tabs > .active > a, .nav-tabs > .active > a:hover {
+    color: #555555;
+    background-color: #ffffff;
+    border: 1px solid #ddd;
+    border-bottom-color: transparent;
+    cursor: default;
+}
+
+.nav-pills > li > a {
+    padding-top: 8px;
+    padding-bottom: 8px;
+    margin-top: 2px;
+    margin-bottom: 2px;
+    -webkit-border-radius: 5px;
+    -moz-border-radius: 5px;
+    border-radius: 5px;
+}
+
+.nav-pills > .active > a, .nav-pills > .active > a:hover {
+    color: #ffffff;
+    background-color: #0088cc;
+}
+
+.nav-stacked > li {
+    float: none;
+}
+
+.nav-stacked > li > a {
+    margin-right: 0;
+}
+
+.nav-tabs.nav-stacked {
+    border-bottom: 0;
+}
+
+.nav-tabs.nav-stacked > li > a {
+    border: 1px solid #ddd;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.nav-tabs.nav-stacked > li:first-child > a {
+    -webkit-border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+    border-top-right-radius: 4px;
+    -webkit-border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+    border-top-left-radius: 4px;
+}
+
+.nav-tabs.nav-stacked > li:last-child > a {
+    -webkit-border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+    border-bottom-right-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+    border-bottom-left-radius: 4px;
+}
+
+.nav-tabs.nav-stacked > li > a:hover {
+    border-color: #ddd;
+    z-index: 2;
+}
+
+.nav-pills.nav-stacked > li > a {
+    margin-bottom: 3px;
+}
+
+.nav-pills.nav-stacked > li:last-child > a {
+    margin-bottom: 1px;
+}
+
+.nav-tabs .dropdown-menu {
+    -webkit-border-radius: 0 0 6px 6px;
+    -moz-border-radius: 0 0 6px 6px;
+    border-radius: 0 0 6px 6px;
+}
+
+.nav-pills .dropdown-menu {
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.nav .dropdown-toggle .caret {
+    border-top-color: #0088cc;
+    border-bottom-color: #0088cc;
+    margin-top: 6px;
+}
+
+.nav .dropdown-toggle:hover .caret {
+    border-top-color: #005580;
+    border-bottom-color: #005580;
+}
+
+.nav-tabs .dropdown-toggle .caret {
+    margin-top: 8px;
+}
+
+.nav .active .dropdown-toggle .caret {
+    border-top-color: #fff;
+    border-bottom-color: #fff;
+}
+
+.nav-tabs .active .dropdown-toggle .caret {
+    border-top-color: #555555;
+    border-bottom-color: #555555;
+}
+
+.nav > .dropdown.active > a:hover {
+    cursor: pointer;
+}
+
+.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover {
+    color: #ffffff;
+    background-color: #999999;
+    border-color: #999999;
+}
+
+.nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret {
+    border-top-color: #ffffff;
+    border-bottom-color: #ffffff;
+    opacity: 1;
+    filter: alpha(opacity=100);
+}
+
+.tabs-stacked .open > a:hover {
+    border-color: #999999;
+}
+
+.tabbable {
+    *zoom: 1;
+}
+
+.tabbable:before, .tabbable:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.tabbable:after {
+    clear: both;
+}
+
+.tab-content {
+    overflow: auto;
+}
+
+.tabs-below > .nav-tabs, .tabs-right > .nav-tabs, .tabs-left > .nav-tabs {
+    border-bottom: 0;
+}
+
+.tab-content > .tab-pane, .pill-content > .pill-pane {
+    display: none;
+}
+
+.tab-content > .active, .pill-content > .active {
+    display: block;
+}
+
+.tabs-below > .nav-tabs {
+    border-top: 1px solid #ddd;
+}
+
+.tabs-below > .nav-tabs > li {
+    margin-top: -1px;
+    margin-bottom: 0;
+}
+
+.tabs-below > .nav-tabs > li > a {
+    -webkit-border-radius: 0 0 4px 4px;
+    -moz-border-radius: 0 0 4px 4px;
+    border-radius: 0 0 4px 4px;
+}
+
+.tabs-below > .nav-tabs > li > a:hover {
+    border-bottom-color: transparent;
+    border-top-color: #ddd;
+}
+
+.tabs-below > .nav-tabs > .active > a, .tabs-below > .nav-tabs > .active > a:hover {
+    border-color: transparent #ddd #ddd #ddd;
+}
+
+.tabs-left > .nav-tabs > li, .tabs-right > .nav-tabs > li {
+    float: none;
+}
+
+.tabs-left > .nav-tabs > li > a, .tabs-right > .nav-tabs > li > a {
+    min-width: 74px;
+    margin-right: 0;
+    margin-bottom: 3px;
+}
+
+.tabs-left > .nav-tabs {
+    float: left;
+    margin-right: 19px;
+    border-right: 1px solid #ddd;
+}
+
+.tabs-left > .nav-tabs > li > a {
+    margin-right: -1px;
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.tabs-left > .nav-tabs > li > a:hover {
+    border-color: #eeeeee #dddddd #eeeeee #eeeeee;
+}
+
+.tabs-left > .nav-tabs .active > a, .tabs-left > .nav-tabs .active > a:hover {
+    border-color: #ddd transparent #ddd #ddd;
+    *border-right-color: #ffffff;
+}
+
+.tabs-right > .nav-tabs {
+    float: right;
+    margin-left: 19px;
+    border-left: 1px solid #ddd;
+}
+
+.tabs-right > .nav-tabs > li > a {
+    margin-left: -1px;
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.tabs-right > .nav-tabs > li > a:hover {
+    border-color: #eeeeee #eeeeee #eeeeee #dddddd;
+}
+
+.tabs-right > .nav-tabs .active > a, .tabs-right > .nav-tabs .active > a:hover {
+    border-color: #ddd #ddd #ddd transparent;
+    *border-left-color: #ffffff;
+}
+
+.nav > .disabled > a {
+    color: #999999;
+}
+
+.nav > .disabled > a:hover {
+    text-decoration: none;
+    background-color: transparent;
+    cursor: default;
+}
+
+.navbar {
+    overflow: visible;
+    margin-bottom: 20px;
+    color: #777777;
+    *position: relative;
+    *z-index: 2;
+}
+
+.navbar-inner {
+    min-height: 40px;
+    padding-left: 20px;
+    padding-right: 20px;
+    background-color: #fafafa;
+    background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
+    background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
+    background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
+    background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
+    border: 1px solid #d4d4d4;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+    *zoom: 1;
+}
+
+.navbar-inner:before, .navbar-inner:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.navbar-inner:after {
+    clear: both;
+}
+
+.navbar .container {
+    width: auto;
+}
+
+.nav-collapse.collapse {
+    height: auto;
+    overflow: visible;
+}
+
+.navbar .brand {
+    float: left;
+    display: block;
+    padding: 10px 20px 10px;
+    margin-left: -20px;
+    font-size: 20px;
+    font-weight: 200;
+    color: #777777;
+    text-shadow: 0 1px 0 #ffffff;
+}
+
+.navbar .brand:hover {
+    text-decoration: none;
+}
+
+.navbar-text {
+    margin-bottom: 0;
+    line-height: 40px;
+}
+
+.navbar-link {
+    color: #777777;
+}
+
+.navbar-link:hover {
+    color: #333333;
+}
+
+.navbar .divider-vertical {
+    height: 40px;
+    margin: 0 9px;
+    border-left: 1px solid #f2f2f2;
+    border-right: 1px solid #ffffff;
+}
+
+.navbar .btn, .navbar .btn-group {
+    margin-top: 5px;
+}
+
+.navbar .btn-group .btn, .navbar .input-prepend .btn, .navbar .input-append .btn {
+    margin-top: 0;
+}
+
+.navbar-form {
+    margin-bottom: 0;
+    *zoom: 1;
+}
+
+.navbar-form:before, .navbar-form:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.navbar-form:after {
+    clear: both;
+}
+
+.navbar-form input, .navbar-form select, .navbar-form .radio, .navbar-form .checkbox {
+    margin-top: 5px;
+}
+
+.navbar-form input, .navbar-form select, .navbar-form .btn {
+    display: inline-block;
+    margin-bottom: 0;
+}
+
+.navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] {
+    margin-top: 3px;
+}
+
+.navbar-form .input-append, .navbar-form .input-prepend {
+    margin-top: 6px;
+    white-space: nowrap;
+}
+
+.navbar-form .input-append input, .navbar-form .input-prepend input {
+    margin-top: 0;
+}
+
+.navbar-search {
+    position: relative;
+    float: left;
+    margin-top: 5px;
+    margin-bottom: 0;
+}
+
+.navbar-search .search-query {
+    margin-bottom: 0;
+    padding: 4px 14px;
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+    font-size: 13px;
+    font-weight: normal;
+    line-height: 1;
+    -webkit-border-radius: 15px;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+}
+
+.navbar-static-top {
+    position: static;
+    margin-bottom: 0;
+}
+
+.navbar-static-top .navbar-inner {
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.navbar-fixed-top, .navbar-fixed-bottom {
+    position: fixed;
+    right: 0;
+    left: 0;
+    z-index: 1030;
+    margin-bottom: 0;
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner {
+    border-width: 0 0 1px;
+}
+
+.navbar-fixed-bottom .navbar-inner {
+    border-width: 1px 0 0;
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-fixed-bottom .navbar-inner {
+    padding-left: 0;
+    padding-right: 0;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
+    width: 940px;
+}
+
+.navbar-fixed-top {
+    top: 0;
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner {
+    -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, .1);
+    -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, .1);
+    box-shadow: 0 1px 10px rgba(0, 0, 0, .1);
+}
+
+.navbar-fixed-bottom {
+    bottom: 0;
+}
+
+.navbar-fixed-bottom .navbar-inner {
+    -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, .1);
+    -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, .1);
+    box-shadow: 0 -1px 10px rgba(0, 0, 0, .1);
+}
+
+.navbar .nav {
+    position: relative;
+    left: 0;
+    display: block;
+    float: left;
+    margin: 0 10px 0 0;
+}
+
+.navbar .nav.pull-right {
+    float: right;
+    margin-right: 0;
+}
+
+.navbar .nav > li {
+    float: left;
+}
+
+.navbar .nav > li > a {
+    float: none;
+    padding: 10px 15px 10px;
+    color: #777777;
+    text-decoration: none;
+    text-shadow: 0 1px 0 #ffffff;
+}
+
+.navbar .nav .dropdown-toggle .caret {
+    margin-top: 8px;
+}
+
+.navbar .nav > li > a:focus, .navbar .nav > li > a:hover {
+    background-color: transparent;
+    color: #333333;
+    text-decoration: none;
+}
+
+.navbar .nav > .active > a, .navbar .nav > .active > a:hover, .navbar .nav > .active > a:focus {
+    color: #555555;
+    text-decoration: none;
+    background-color: #e5e5e5;
+    -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+    -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+}
+
+.navbar .btn-navbar {
+    display: none;
+    float: right;
+    padding: 7px 10px;
+    margin-left: 5px;
+    margin-right: 5px;
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #ededed;
+    background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
+    background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
+    background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
+    background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
+    border-color: #e5e5e5 #e5e5e5 #bfbfbf;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #e5e5e5;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .075);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .075);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .075);
+}
+
+.navbar .btn-navbar:hover, .navbar .btn-navbar:active, .navbar .btn-navbar.active, .navbar .btn-navbar.disabled, .navbar .btn-navbar[disabled] {
+    color: #ffffff;
+    background-color: #e5e5e5;
+    *background-color: #d9d9d9;
+}
+
+.navbar .btn-navbar:active, .navbar .btn-navbar.active {
+    background-color: #cccccc \9;
+}
+
+.navbar .btn-navbar .icon-bar {
+    display: block;
+    width: 18px;
+    height: 2px;
+    background-color: #f5f5f5;
+    -webkit-border-radius: 1px;
+    -moz-border-radius: 1px;
+    border-radius: 1px;
+    -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+    -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.btn-navbar .icon-bar + .icon-bar {
+    margin-top: 3px;
+}
+
+.navbar .nav > li > .dropdown-menu:before {
+    content: '';
+    display: inline-block;
+    border-left: 7px solid transparent;
+    border-right: 7px solid transparent;
+    border-bottom: 7px solid #ccc;
+    border-bottom-color: rgba(0, 0, 0, 0.2);
+    position: absolute;
+    top: -7px;
+    left: 9px;
+}
+
+.navbar .nav > li > .dropdown-menu:after {
+    content: '';
+    display: inline-block;
+    border-left: 6px solid transparent;
+    border-right: 6px solid transparent;
+    border-bottom: 6px solid #ffffff;
+    position: absolute;
+    top: -6px;
+    left: 10px;
+}
+
+.navbar-fixed-bottom .nav > li > .dropdown-menu:before {
+    border-top: 7px solid #ccc;
+    border-top-color: rgba(0, 0, 0, 0.2);
+    border-bottom: 0;
+    bottom: -7px;
+    top: auto;
+}
+
+.navbar-fixed-bottom .nav > li > .dropdown-menu:after {
+    border-top: 6px solid #ffffff;
+    border-bottom: 0;
+    bottom: -6px;
+    top: auto;
+}
+
+.navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle {
+    background-color: #e5e5e5;
+    color: #555555;
+}
+
+.navbar .nav li.dropdown > .dropdown-toggle .caret {
+    border-top-color: #777777;
+    border-bottom-color: #777777;
+}
+
+.navbar .nav li.dropdown.open > .dropdown-toggle .caret, .navbar .nav li.dropdown.active > .dropdown-toggle .caret, .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
+    border-top-color: #555555;
+    border-bottom-color: #555555;
+}
+
+.navbar .pull-right > li > .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right {
+    left: auto;
+    right: 0;
+}
+
+.navbar .pull-right > li > .dropdown-menu:before, .navbar .nav > li > .dropdown-menu.pull-right:before {
+    left: auto;
+    right: 12px;
+}
+
+.navbar .pull-right > li > .dropdown-menu:after, .navbar .nav > li > .dropdown-menu.pull-right:after {
+    left: auto;
+    right: 13px;
+}
+
+.navbar .pull-right > li > .dropdown-menu .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {
+    left: auto;
+    right: 100%;
+    margin-left: 0;
+    margin-right: -1px;
+    -webkit-border-radius: 6px 0 6px 6px;
+    -moz-border-radius: 6px 0 6px 6px;
+    border-radius: 6px 0 6px 6px;
+}
+
+.navbar-inverse {
+    color: #999999;
+}
+
+.navbar-inverse .navbar-inner {
+    background-color: #1b1b1b;
+    background-image: -moz-linear-gradient(top, #222222, #111111);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));
+    background-image: -webkit-linear-gradient(top, #222222, #111111);
+    background-image: -o-linear-gradient(top, #222222, #111111);
+    background-image: linear-gradient(to bottom, #222222, #111111);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);
+    border-color: #252525;
+}
+
+.navbar-inverse .brand, .navbar-inverse .nav > li > a {
+    color: #999999;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.navbar-inverse .brand:hover, .navbar-inverse .nav > li > a:hover {
+    color: #ffffff;
+}
+
+.navbar-inverse .nav > li > a:focus, .navbar-inverse .nav > li > a:hover {
+    background-color: transparent;
+    color: #ffffff;
+}
+
+.navbar-inverse .nav .active > a, .navbar-inverse .nav .active > a:hover, .navbar-inverse .nav .active > a:focus {
+    color: #ffffff;
+    background-color: #111111;
+}
+
+.navbar-inverse .navbar-link {
+    color: #999999;
+}
+
+.navbar-inverse .navbar-link:hover {
+    color: #ffffff;
+}
+
+.navbar-inverse .divider-vertical {
+    border-left-color: #111111;
+    border-right-color: #222222;
+}
+
+.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {
+    background-color: #111111;
+    color: #ffffff;
+}
+
+.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {
+    border-top-color: #999999;
+    border-bottom-color: #999999;
+}
+
+.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {
+    border-top-color: #ffffff;
+    border-bottom-color: #ffffff;
+}
+
+.navbar-inverse .navbar-search .search-query {
+    color: #ffffff;
+    background-color: #515151;
+    border-color: #111111;
+    -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .15);
+    -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .15);
+    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .15);
+    -webkit-transition: none;
+    -moz-transition: none;
+    -o-transition: none;
+    transition: none;
+}
+
+.navbar-inverse .navbar-search .search-query:-moz-placeholder {
+    color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query:-ms-input-placeholder {
+    color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {
+    color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query:focus, .navbar-inverse .navbar-search .search-query.focused {
+    padding: 5px 15px;
+    color: #333333;
+    text-shadow: 0 1px 0 #ffffff;
+    background-color: #ffffff;
+    border: 0;
+    -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+    -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+    box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+    outline: 0;
+}
+
+.navbar-inverse .btn-navbar {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #0e0e0e;
+    background-image: -moz-linear-gradient(top, #151515, #040404);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));
+    background-image: -webkit-linear-gradient(top, #151515, #040404);
+    background-image: -o-linear-gradient(top, #151515, #040404);
+    background-image: linear-gradient(to bottom, #151515, #040404);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);
+    border-color: #040404 #040404 #000000;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #040404;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.navbar-inverse .btn-navbar:hover, .navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active, .navbar-inverse .btn-navbar.disabled, .navbar-inverse .btn-navbar[disabled] {
+    color: #ffffff;
+    background-color: #040404;
+    *background-color: #000000;
+}
+
+.navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active {
+    background-color: #000000 \9;
+}
+
+.breadcrumb {
+    padding: 8px 15px;
+    margin: 0 0 20px;
+    list-style: none;
+    background-color: #f5f5f5;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.breadcrumb li {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    text-shadow: 0 1px 0 #ffffff;
+}
+
+.breadcrumb .divider {
+    padding: 0 5px;
+    color: #ccc;
+}
+
+.breadcrumb .active {
+    color: #999999;
+}
+
+.pagination {
+    margin: 20px 0;
+}
+
+.pagination ul {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    margin-left: 0;
+    margin-bottom: 0;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+    -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.pagination ul > li {
+    display: inline;
+}
+
+.pagination ul > li > a, .pagination ul > li > span {
+    float: left;
+    padding: 4px 12px;
+    line-height: 20px;
+    text-decoration: none;
+    background-color: #ffffff;
+    border: 1px solid #dddddd;
+    border-left-width: 0;
+}
+
+.pagination ul > li > a:hover, .pagination ul > .active > a, .pagination ul > .active > span {
+    background-color: #f5f5f5;
+}
+
+.pagination ul > .active > a, .pagination ul > .active > span {
+    color: #999999;
+    cursor: default;
+}
+
+.pagination ul > .disabled > span, .pagination ul > .disabled > a, .pagination ul > .disabled > a:hover {
+    color: #999999;
+    background-color: transparent;
+    cursor: default;
+}
+
+.pagination ul > li:first-child > a, .pagination ul > li:first-child > span {
+    border-left-width: 1px;
+    -webkit-border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+    border-top-left-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+    border-bottom-left-radius: 4px;
+}
+
+.pagination ul > li:last-child > a, .pagination ul > li:last-child > span {
+    -webkit-border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+    border-top-right-radius: 4px;
+    -webkit-border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+    border-bottom-right-radius: 4px;
+}
+
+.pagination-centered {
+    text-align: center;
+}
+
+.pagination-right {
+    text-align: right;
+}
+
+.pagination-large ul > li > a, .pagination-large ul > li > span {
+    padding: 11px 19px;
+    font-size: 17.5px;
+}
+
+.pagination-large ul > li:first-child > a, .pagination-large ul > li:first-child > span {
+    -webkit-border-top-left-radius: 6px;
+    -moz-border-radius-topleft: 6px;
+    border-top-left-radius: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomleft: 6px;
+    border-bottom-left-radius: 6px;
+}
+
+.pagination-large ul > li:last-child > a, .pagination-large ul > li:last-child > span {
+    -webkit-border-top-right-radius: 6px;
+    -moz-border-radius-topright: 6px;
+    border-top-right-radius: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    border-bottom-right-radius: 6px;
+}
+
+.pagination-mini ul > li:first-child > a, .pagination-small ul > li:first-child > a, .pagination-mini ul > li:first-child > span, .pagination-small ul > li:first-child > span {
+    -webkit-border-top-left-radius: 3px;
+    -moz-border-radius-topleft: 3px;
+    border-top-left-radius: 3px;
+    -webkit-border-bottom-left-radius: 3px;
+    -moz-border-radius-bottomleft: 3px;
+    border-bottom-left-radius: 3px;
+}
+
+.pagination-mini ul > li:last-child > a, .pagination-small ul > li:last-child > a, .pagination-mini ul > li:last-child > span, .pagination-small ul > li:last-child > span {
+    -webkit-border-top-right-radius: 3px;
+    -moz-border-radius-topright: 3px;
+    border-top-right-radius: 3px;
+    -webkit-border-bottom-right-radius: 3px;
+    -moz-border-radius-bottomright: 3px;
+    border-bottom-right-radius: 3px;
+}
+
+.pagination-small ul > li > a, .pagination-small ul > li > span {
+    padding: 2px 10px;
+    font-size: 11.9px;
+}
+
+.pagination-mini ul > li > a, .pagination-mini ul > li > span {
+    padding: 1px 6px;
+    font-size: 10.5px;
+}
+
+.pager {
+    margin: 20px 0;
+    list-style: none;
+    text-align: center;
+    *zoom: 1;
+}
+
+.pager:before, .pager:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.pager:after {
+    clear: both;
+}
+
+.pager li {
+    display: inline;
+}
+
+.pager li > a, .pager li > span {
+    display: inline-block;
+    padding: 5px 14px;
+    background-color: #fff;
+    border: 1px solid #ddd;
+    -webkit-border-radius: 15px;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+}
+
+.pager li > a:hover {
+    text-decoration: none;
+    background-color: #f5f5f5;
+}
+
+.pager .next > a, .pager .next > span {
+    float: right;
+}
+
+.pager .previous > a, .pager .previous > span {
+    float: left;
+}
+
+.pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > span {
+    color: #999999;
+    background-color: #fff;
+    cursor: default;
+}
+
+.thumbnails {
+    margin-left: -20px;
+    list-style: none;
+    *zoom: 1;
+}
+
+.thumbnails:before, .thumbnails:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.thumbnails:after {
+    clear: both;
+}
+
+.row-fluid .thumbnails {
+    margin-left: 0;
+}
+
+.thumbnails > li {
+    float: left;
+    margin-bottom: 20px;
+    margin-left: 20px;
+}
+
+.thumbnail {
+    display: block;
+    padding: 4px;
+    line-height: 20px;
+    border: 1px solid #ddd;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+  

<TRUNCATED>

[05/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/main.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/main.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/main.js
new file mode 100644
index 0000000..a103dd6
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/main.js
@@ -0,0 +1,170 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+var datasource, type, columns, filter, maxUpdateValue;
+
+var REFRESH_INTERVAL = 5000;
+var dataLoaded = true;
+
+var timeInterval = '30 Min';
+var applicationId = '';
+var clusterId = '';
+
+//this needs to be loaded from an autogenerated
+datasource = gadgetConfig.datasource;
+filter = gadgetConfig.filter;
+type = gadgetConfig.type;
+var counter = 0;
+maxUpdateValue = gadgetConfig.maxUpdateValue;
+
+gadgets.HubSettings.onConnect = function () {
+    gadgets.Hub.subscribe('member-status-filter', function (topic, data) {
+        clusterId = data['clusterId'];
+        applicationId = data['applicationId'];
+        timeInterval = data['timeInterval'];
+        console.log("Member Filter Value: " + JSON.stringify(data));
+    });
+};
+
+getColumns(datasource);
+
+//load data immediately
+fetchData(drawChart);
+
+// then start periodic polling
+setInterval(function () {
+    fetchData(drawChart);
+}, REFRESH_INTERVAL);
+
+
+function getColumns() {
+    columns = gadgetConfig.columns;
+}
+
+function fetchData(callback) {
+    //if previous operation is not completed, DO NOT fetch data
+    if (!dataLoaded) {
+        console.log("Waiting for data...");
+        return;
+    }
+
+    var application = applicationId;
+    var cluster = clusterId;
+    var time = timeInterval;
+
+    if (application != "") {
+        var request = {
+            tableName: datasource,
+            applicationId: application,
+            clusterId: cluster,
+            time: time
+        };
+        $.ajax({
+            url: "/portal/apis/member-status",
+            method: "GET",
+            data: request,
+            contentType: "application/json",
+            success: function (data) {
+                if (callback != null) {
+                    callback(makeRows(JSON.parse(data)));
+                }
+            }
+        });
+        dataLoaded = false;   //setting the latch to locked position so that we block data fetching until we receive the response from backend
+    }
+}
+
+function makeDataTable(data) {
+    var dataTable = new igviz.DataTable();
+    if (columns.length > 0) {
+        columns.forEach(function (column) {
+            var type = "N";
+            if (column.DATA_TYPE == "varchar" || column.DATA_TYPE == "VARCHAR") {
+                type = "C";
+            } else if (column.DATA_TYPE == "TIME" || column.DATA_TYPE == "time") {
+                type = "T";
+            }
+            dataTable.addColumn(column.LABEL_NAME, type);
+        });
+    }
+    data.forEach(function (row, index) {
+        for (var i = 0; i < row.length; i++) {
+            if (dataTable.metadata.types[i] == "N") {
+                data[index][i] = parseInt(data[index][i]);
+            }
+        }
+    });
+    dataTable.addRows(data);
+    return dataTable;
+}
+
+function makeRows(data) {
+    var rows = [];
+    for (var i = 0; i < data.length; i++) {
+        var record = data[i];
+        var row = columns.map(function (column) {
+            return record[column.COLUMN_NAME];
+        });
+        rows.push(row);
+    }
+    return rows;
+}
+
+function drawChart(data) {
+    var dataTable = makeDataTable(data);
+
+    if (dataTable.data.length != 0) {
+
+        gadgetConfig.chartConfig.width = $("#placeholder").width();
+        gadgetConfig.chartConfig.height = $("#placeholder").height() - 65;
+        var chartType = gadgetConfig.chartConfig.chartType;
+        var xAxis = gadgetConfig.chartConfig.xAxis;
+        var chart;
+        jQuery("#noChart").html("");
+        if (chartType === "bar" && dataTable.metadata.types[xAxis] === "N") {
+            dataTable.metadata.types[xAxis] = "C";
+        }
+
+        if (gadgetConfig.chartConfig.chartType === "tabular" || gadgetConfig.chartConfig.chartType === "singleNumber") {
+            gadgetConfig.chartConfig.height = $("#placeholder").height();
+            chart = igviz.draw("#placeholder", gadgetConfig.chartConfig, dataTable);
+            chart.plot(dataTable.data);
+
+        } else {
+            chart = igviz.setUp("#placeholder", gadgetConfig.chartConfig, dataTable);
+            chart.setXAxis({
+                "labelAngle": -35,
+                "labelAlign": "right",
+                "labelDy": 0,
+                "labelDx": 0,
+                "titleDy": 25
+            })
+                .setYAxis({
+                    "titleDy": -30
+                });
+            chart.plot(dataTable.data);
+        }
+    } else {
+        jQuery("#placeholder").html("");
+        jQuery("#placeholder").append('<div id="noChart"><table><tr><td style="padding:30px 20px 0px 20px"><img src="../../portal/images/noEvents.png" align="left" style="width:24;height:24"/></td><td><br/><b><p><br/>Data is not available for selected application, cluster and time interval</p></b></td></tr></table></div>');
+    }
+    //releasing the latch so that we can request data again from the backend.
+    dataLoaded = true;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/outputAdapterUiLibrary.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/outputAdapterUiLibrary.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/outputAdapterUiLibrary.js
new file mode 100644
index 0000000..f2d2d64
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/outputAdapterUiLibrary.js
@@ -0,0 +1,276 @@
+/*
+ *
+ *
+ *  Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ *
+ */
+
+var CONSTANTS = {
+    webAppName: 'outputui',
+    urlSeperator: '/',
+    urlGetParameter: '?lastUpdatedTime=',
+    tenantUrlAttribute: 't',
+    urlUnsecureTransportHttp: 'http://',
+    urlUnsecureTransportWebsocket: 'ws://',
+    urlSecureTransportWebsocket: 'wss://',
+    urlSecureTransportHttp: 'https://',
+    colon: ':',
+    defaultIntervalTime: 10 * 1000,
+    defaultUserDomain: 'carbon.super',
+    defaultHostName: 'localhost',
+    defaultNonsecurePortNumber: '9763',
+    defaultSecurePortNumber: '9443',
+    defaultMode: 'AUTO',
+    processModeHTTP: 'HTTP',
+    processModeWebSocket: 'WEBSOCKET',
+    processModeAuto: 'AUTO',
+    domain: 'carbon.super',
+    numThousand: 1000,
+    websocketTimeAppender: 400,
+    secureMode: 'SECURED'
+};
+
+
+var websocket = null;
+var webSocketUrl;
+var httpUrl;
+var cepHostName;
+var cepPortNumber;
+var isErrorOccured = false;
+var lastUpdatedtime = -1;
+var polingInterval;
+var stream;
+var streamVersion;
+var firstPollingAttempt;
+var processMode;
+var onSuccessFunction;
+var onErrorFunction;
+var userDomainUrl = "";
+var terminateWebsocketInstance = false;
+var pollingContinue = true;
+var transportToBeUsedHttp;
+var transportToBeUsedWebsocket;
+
+function subscribe(streamName, version, intervalTime, domain,
+                   listeningFuncSuccessData, listeningFuncErrorData, cepHost, cepPort, mode, secureMode) {
+
+    stopPollingProcesses();
+    stream = streamName;
+    streamVersion = version;
+    onSuccessFunction = listeningFuncSuccessData;
+    onErrorFunction = listeningFuncErrorData;
+
+    if (secureMode == CONSTANTS.secureMode) {
+        transportToBeUsedHttp = CONSTANTS.urlSecureTransportHttp;
+        transportToBeUsedWebsocket = CONSTANTS.urlSecureTransportWebsocket;
+    } else {
+        transportToBeUsedHttp = CONSTANTS.urlUnsecureTransportHttp;
+        transportToBeUsedWebsocket = CONSTANTS.urlUnsecureTransportWebsocket;
+    }
+
+    if (intervalTime == null || intervalTime == "") {
+        polingInterval = CONSTANTS.defaultIntervalTime;
+    } else {
+        polingInterval = intervalTime * CONSTANTS.numThousand;
+    }
+
+    if (domain == null || domain == "") {
+        domain = CONSTANTS.defaultUserDomain;
+    }
+
+    if (cepHost == null || cepHost == "") {
+        cepHostName = CONSTANTS.defaultHostName;
+    } else {
+        cepHostName = cepHost;
+    }
+
+    if (cepPort == null || cepPort == "") {
+        if (secureMode == CONSTANTS.secureMode) {
+            cepPortNumber = CONSTANTS.defaultSecurePortNumber;
+        } else {
+            cepPortNumber = CONSTANTS.defaultNonsecurePortNumber;
+        }
+    } else {
+        cepPortNumber = cepPort;
+    }
+
+    if (mode == null || mode == "") {
+        processMode = CONSTANTS.defaultMode;
+    } else {
+        processMode = mode;
+    }
+
+    if (domain != CONSTANTS.domain) {
+        userDomainUrl = CONSTANTS.tenantUrlAttribute + CONSTANTS.urlSeperator + domain + CONSTANTS.urlSeperator;
+
+    }
+    webSocketUrl = transportToBeUsedWebsocket + cepHostName + CONSTANTS.colon + cepPortNumber +
+        CONSTANTS.urlSeperator + CONSTANTS.webAppName + CONSTANTS.urlSeperator + userDomainUrl + stream +
+        CONSTANTS.urlSeperator + streamVersion;
+
+    if (processMode == CONSTANTS.processModeHTTP) {
+        firstPollingAttempt = true;
+        pollingContinue = true;
+        startPoll();
+    } else {
+        initializeWebSocket(webSocketUrl);
+    }
+}
+
+
+/**
+ * Initializing Web Socket
+ */
+function initializeWebSocket(webSocketUrl) {
+    websocket = new WebSocket(webSocketUrl);
+    websocket.onopen = webSocketOnOpen;
+    websocket.onmessage = webSocketOnMessage;
+    websocket.onclose = webSocketOnClose;
+    websocket.onerror = webSocketOnError;
+}
+
+/**
+ * Web socket On Open
+ */
+
+var webSocketOnOpen = function () {
+    // alert("Successfully connected to "+webSocketUrl);
+    //onErrorFunction("Successfully connected to URL:" + webSocketUrl + "\n");
+};
+
+
+/**
+ * On server sends a message
+ */
+var webSocketOnMessage = function (evt) {
+    var event = evt.data;
+    var array = JSON.parse(event);
+    constructPayload(array);
+};
+
+/**
+ * On server close
+ */
+var webSocketOnClose = function (e) {
+
+    if (isErrorOccured) {
+        if (processMode != CONSTANTS.processModeWebSocket) {
+            firstPollingAttempt = true;
+            pollingContinue = true;
+            startPoll();
+        }
+    } else {
+        if (!terminateWebsocketInstance) {
+            waitForSocketConnection(websocket);
+        } else {
+            terminateWebsocketInstance = false;
+        }
+
+    }
+};
+
+/**
+ * On server Error
+ */
+var webSocketOnError = function (err) {
+    var error = "Error: Cannot connect to Websocket URL:" + webSocketUrl + " .Hence closing the connection!";
+
+    onErrorFunction(error);
+    isErrorOccured = true;
+
+};
+
+/**
+ * Gracefully increments the connection retry
+ */
+var waitTime = CONSTANTS.numThousand;
+function waitForSocketConnection(socket, callback) {
+    setTimeout(
+        function () {
+            if (socket.readyState === 1) {
+                initializeWebSocket(webSocketUrl);
+                console.log("Connection is made");
+                if (callback != null) {
+                    callback();
+                }
+                return;
+            } else {
+                websocket = new WebSocket(webSocketUrl);
+                waitTime += CONSTANTS.websocketTimeAppender;
+                waitForSocketConnection(websocket, callback);
+            }
+        }, waitTime);
+}
+
+/**
+ * Polling to retrieve events from http request periodically
+ */
+function startPoll() {
+
+    (function poll() {
+        setTimeout(function () {
+            httpUrl = transportToBeUsedHttp + cepHostName + CONSTANTS.colon + cepPortNumber + CONSTANTS.urlSeperator
+                + CONSTANTS.webAppName + CONSTANTS.urlSeperator + userDomainUrl + stream + CONSTANTS.urlSeperator +
+                streamVersion + CONSTANTS.urlGetParameter + lastUpdatedtime;
+
+            $.getJSON(httpUrl, function (responseText) {
+                if (firstPollingAttempt) {
+                    /*var data = $("textarea#idConsole").val();
+                     $("textarea#idConsole").val(data + "Successfully connected to HTTP.");*/
+                    firstPollingAttempt = false;
+                }
+
+                var eventList = $.parseJSON(responseText.events);
+                if (eventList.length != 0) {
+                    lastUpdatedtime = responseText.lastEventTime;
+                    for (var i = 0; i < eventList.length; i++) {
+                        var arr = eventList[i];
+                        constructPayload(arr);
+                    }
+                }
+                if (pollingContinue) {
+                    startPoll();
+                }
+            })
+                .fail(function (errorData) {
+                    var errorData = JSON.parse(errorData.responseText);
+                    onErrorFunction(errorData.error);
+                });
+        }, polingInterval);
+    })()
+}
+
+function stopPollingProcesses() {
+
+    //stopping the Websocket
+    if (websocket != null) {
+        terminateWebsocketInstance = true;
+        websocket.onclose;
+    }
+    //stopping the HTTPS Request
+    pollingContinue = false;
+
+}
+
+function constructPayload(eventsArray) {
+
+    var streamId = stream + CONSTANTS.colon + streamVersion;
+    var twoDimentionalArray = [eventsArray];
+    onSuccessFunction(streamId, twoDimentionalArray);
+
+}
\ No newline at end of file


[16/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/main.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/main.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/main.js
new file mode 100644
index 0000000..54cfea1
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/main.js
@@ -0,0 +1,168 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+var datasource, type, columns, filter, maxUpdateValue;
+
+var REFRESH_INTERVAL = 5000;
+var dataLoaded = true;
+
+var applicationId = '';
+var clusterId = '';
+
+//this needs to be loaded from an autogenerated
+datasource = gadgetConfig.datasource;
+filter = gadgetConfig.filter;
+type = gadgetConfig.type;
+var counter = 0;
+maxUpdateValue = gadgetConfig.maxUpdateValue;
+
+gadgets.HubSettings.onConnect = function () {
+    gadgets.Hub.subscribe('member-details-filter', function (topic, data) {
+        clusterId = data['clusterId'];
+        applicationId = data['applicationId'];
+        console.log("Member Filter Value:" + JSON.stringify(data));
+    });
+};
+
+
+//first, fetch datasource schema
+getColumns(datasource);
+
+//load data immediately
+fetchData(drawChart);
+
+// then start periodic polling
+setInterval(function () {
+    fetchData(drawChart);
+}, REFRESH_INTERVAL);
+
+
+function getColumns() {
+    columns = gadgetConfig.columns;
+}
+
+function fetchData(callback) {
+    //if previous operation is not completed, DO NOT fetch data
+    if (!dataLoaded) {
+        console.log("Waiting for data...");
+        return;
+    }
+
+    var application = applicationId;
+    var cluster = clusterId;
+
+    if (application != "") {
+        var request = {
+            tableName: datasource,
+            applicationId: application,
+            clusterId: cluster
+        };
+        $.ajax({
+            url: "/portal/apis/member-info",
+            method: "GET",
+            data: request,
+            contentType: "application/json",
+            success: function (data) {
+                if (callback != null) {
+                    callback(makeRows(JSON.parse(data)));
+                }
+            }
+        });
+        dataLoaded = false;   //setting the latch to locked position so that we block data fetching until we receive the response from backend
+    }
+}
+
+function makeDataTable(data) {
+    var dataTable = new igviz.DataTable();
+    if (columns.length > 0) {
+        columns.forEach(function (column) {
+            var type = "N";
+            if (column.DATA_TYPE == "varchar" || column.DATA_TYPE == "VARCHAR") {
+                type = "C";
+            } else if (column.DATA_TYPE == "TIME" || column.DATA_TYPE == "time") {
+                type = "T";
+            }
+            dataTable.addColumn(column.LABEL_NAME, type);
+        });
+    }
+    data.forEach(function (row, index) {
+        for (var i = 0; i < row.length; i++) {
+            if (dataTable.metadata.types[i] == "N") {
+                data[index][i] = parseInt(data[index][i]);
+            }
+        }
+    });
+    dataTable.addRows(data);
+    return dataTable;
+}
+
+function makeRows(data) {
+    var rows = [];
+    for (var i = 0; i < data.length; i++) {
+        var record = data[i];
+        var row = columns.map(function (column) {
+            return record[column.COLUMN_NAME];
+        });
+        rows.push(row);
+    }
+    return rows;
+}
+
+function drawChart(data) {
+    var dataTable = makeDataTable(data);
+    if (dataTable.data.length != 0) {
+        gadgetConfig.chartConfig.width = $("#placeholder").width();
+        gadgetConfig.chartConfig.height = $("#placeholder").height() - 65;
+        var chartType = gadgetConfig.chartConfig.chartType;
+        var xAxis = gadgetConfig.chartConfig.xAxis;
+        var chart;
+        jQuery("#noChart").html("");
+        if (chartType === "bar" && dataTable.metadata.types[xAxis] === "N") {
+            dataTable.metadata.types[xAxis] = "C";
+        }
+
+        if (gadgetConfig.chartConfig.chartType === "tabular" || gadgetConfig.chartConfig.chartType === "singleNumber") {
+            gadgetConfig.chartConfig.height = $("#placeholder").height();
+            chart = igviz.draw("#placeholder", gadgetConfig.chartConfig, dataTable);
+            chart.plot(dataTable.data);
+
+        } else {
+            chart = igviz.setUp("#placeholder", gadgetConfig.chartConfig, dataTable);
+            chart.setXAxis({
+                "labelAngle": -35,
+                "labelAlign": "right",
+                "labelDy": 0,
+                "labelDx": 0,
+                "titleDy": 25
+            })
+                .setYAxis({
+                    "titleDy": -30
+                });
+            chart.plot(dataTable.data);
+        }
+    }
+    else {
+        jQuery("#placeholder").html("");
+        jQuery("#placeholder").append('<div id="noChart"><table><tr><td style="padding:30px 20px 0px 20px"><img src="../../portal/images/noEvents.png" align="left" style="width:24;height:24"/></td><td><br/><b><p><br/>Data is not available for selected application and cluster</p></b></td></tr></table></div>');
+    }
+    //releasing the latch so that we can request data again from the backend.
+    dataLoaded = true;
+}
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/outputAdapterUiLibrary.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/outputAdapterUiLibrary.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/outputAdapterUiLibrary.js
new file mode 100644
index 0000000..f2d2d64
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/outputAdapterUiLibrary.js
@@ -0,0 +1,276 @@
+/*
+ *
+ *
+ *  Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ *  WSO2 Inc. licenses this file to you under the Apache License,
+ *  Version 2.0 (the "License"); you may not use this file except
+ *  in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ *
+ *
+ */
+
+var CONSTANTS = {
+    webAppName: 'outputui',
+    urlSeperator: '/',
+    urlGetParameter: '?lastUpdatedTime=',
+    tenantUrlAttribute: 't',
+    urlUnsecureTransportHttp: 'http://',
+    urlUnsecureTransportWebsocket: 'ws://',
+    urlSecureTransportWebsocket: 'wss://',
+    urlSecureTransportHttp: 'https://',
+    colon: ':',
+    defaultIntervalTime: 10 * 1000,
+    defaultUserDomain: 'carbon.super',
+    defaultHostName: 'localhost',
+    defaultNonsecurePortNumber: '9763',
+    defaultSecurePortNumber: '9443',
+    defaultMode: 'AUTO',
+    processModeHTTP: 'HTTP',
+    processModeWebSocket: 'WEBSOCKET',
+    processModeAuto: 'AUTO',
+    domain: 'carbon.super',
+    numThousand: 1000,
+    websocketTimeAppender: 400,
+    secureMode: 'SECURED'
+};
+
+
+var websocket = null;
+var webSocketUrl;
+var httpUrl;
+var cepHostName;
+var cepPortNumber;
+var isErrorOccured = false;
+var lastUpdatedtime = -1;
+var polingInterval;
+var stream;
+var streamVersion;
+var firstPollingAttempt;
+var processMode;
+var onSuccessFunction;
+var onErrorFunction;
+var userDomainUrl = "";
+var terminateWebsocketInstance = false;
+var pollingContinue = true;
+var transportToBeUsedHttp;
+var transportToBeUsedWebsocket;
+
+function subscribe(streamName, version, intervalTime, domain,
+                   listeningFuncSuccessData, listeningFuncErrorData, cepHost, cepPort, mode, secureMode) {
+
+    stopPollingProcesses();
+    stream = streamName;
+    streamVersion = version;
+    onSuccessFunction = listeningFuncSuccessData;
+    onErrorFunction = listeningFuncErrorData;
+
+    if (secureMode == CONSTANTS.secureMode) {
+        transportToBeUsedHttp = CONSTANTS.urlSecureTransportHttp;
+        transportToBeUsedWebsocket = CONSTANTS.urlSecureTransportWebsocket;
+    } else {
+        transportToBeUsedHttp = CONSTANTS.urlUnsecureTransportHttp;
+        transportToBeUsedWebsocket = CONSTANTS.urlUnsecureTransportWebsocket;
+    }
+
+    if (intervalTime == null || intervalTime == "") {
+        polingInterval = CONSTANTS.defaultIntervalTime;
+    } else {
+        polingInterval = intervalTime * CONSTANTS.numThousand;
+    }
+
+    if (domain == null || domain == "") {
+        domain = CONSTANTS.defaultUserDomain;
+    }
+
+    if (cepHost == null || cepHost == "") {
+        cepHostName = CONSTANTS.defaultHostName;
+    } else {
+        cepHostName = cepHost;
+    }
+
+    if (cepPort == null || cepPort == "") {
+        if (secureMode == CONSTANTS.secureMode) {
+            cepPortNumber = CONSTANTS.defaultSecurePortNumber;
+        } else {
+            cepPortNumber = CONSTANTS.defaultNonsecurePortNumber;
+        }
+    } else {
+        cepPortNumber = cepPort;
+    }
+
+    if (mode == null || mode == "") {
+        processMode = CONSTANTS.defaultMode;
+    } else {
+        processMode = mode;
+    }
+
+    if (domain != CONSTANTS.domain) {
+        userDomainUrl = CONSTANTS.tenantUrlAttribute + CONSTANTS.urlSeperator + domain + CONSTANTS.urlSeperator;
+
+    }
+    webSocketUrl = transportToBeUsedWebsocket + cepHostName + CONSTANTS.colon + cepPortNumber +
+        CONSTANTS.urlSeperator + CONSTANTS.webAppName + CONSTANTS.urlSeperator + userDomainUrl + stream +
+        CONSTANTS.urlSeperator + streamVersion;
+
+    if (processMode == CONSTANTS.processModeHTTP) {
+        firstPollingAttempt = true;
+        pollingContinue = true;
+        startPoll();
+    } else {
+        initializeWebSocket(webSocketUrl);
+    }
+}
+
+
+/**
+ * Initializing Web Socket
+ */
+function initializeWebSocket(webSocketUrl) {
+    websocket = new WebSocket(webSocketUrl);
+    websocket.onopen = webSocketOnOpen;
+    websocket.onmessage = webSocketOnMessage;
+    websocket.onclose = webSocketOnClose;
+    websocket.onerror = webSocketOnError;
+}
+
+/**
+ * Web socket On Open
+ */
+
+var webSocketOnOpen = function () {
+    // alert("Successfully connected to "+webSocketUrl);
+    //onErrorFunction("Successfully connected to URL:" + webSocketUrl + "\n");
+};
+
+
+/**
+ * On server sends a message
+ */
+var webSocketOnMessage = function (evt) {
+    var event = evt.data;
+    var array = JSON.parse(event);
+    constructPayload(array);
+};
+
+/**
+ * On server close
+ */
+var webSocketOnClose = function (e) {
+
+    if (isErrorOccured) {
+        if (processMode != CONSTANTS.processModeWebSocket) {
+            firstPollingAttempt = true;
+            pollingContinue = true;
+            startPoll();
+        }
+    } else {
+        if (!terminateWebsocketInstance) {
+            waitForSocketConnection(websocket);
+        } else {
+            terminateWebsocketInstance = false;
+        }
+
+    }
+};
+
+/**
+ * On server Error
+ */
+var webSocketOnError = function (err) {
+    var error = "Error: Cannot connect to Websocket URL:" + webSocketUrl + " .Hence closing the connection!";
+
+    onErrorFunction(error);
+    isErrorOccured = true;
+
+};
+
+/**
+ * Gracefully increments the connection retry
+ */
+var waitTime = CONSTANTS.numThousand;
+function waitForSocketConnection(socket, callback) {
+    setTimeout(
+        function () {
+            if (socket.readyState === 1) {
+                initializeWebSocket(webSocketUrl);
+                console.log("Connection is made");
+                if (callback != null) {
+                    callback();
+                }
+                return;
+            } else {
+                websocket = new WebSocket(webSocketUrl);
+                waitTime += CONSTANTS.websocketTimeAppender;
+                waitForSocketConnection(websocket, callback);
+            }
+        }, waitTime);
+}
+
+/**
+ * Polling to retrieve events from http request periodically
+ */
+function startPoll() {
+
+    (function poll() {
+        setTimeout(function () {
+            httpUrl = transportToBeUsedHttp + cepHostName + CONSTANTS.colon + cepPortNumber + CONSTANTS.urlSeperator
+                + CONSTANTS.webAppName + CONSTANTS.urlSeperator + userDomainUrl + stream + CONSTANTS.urlSeperator +
+                streamVersion + CONSTANTS.urlGetParameter + lastUpdatedtime;
+
+            $.getJSON(httpUrl, function (responseText) {
+                if (firstPollingAttempt) {
+                    /*var data = $("textarea#idConsole").val();
+                     $("textarea#idConsole").val(data + "Successfully connected to HTTP.");*/
+                    firstPollingAttempt = false;
+                }
+
+                var eventList = $.parseJSON(responseText.events);
+                if (eventList.length != 0) {
+                    lastUpdatedtime = responseText.lastEventTime;
+                    for (var i = 0; i < eventList.length; i++) {
+                        var arr = eventList[i];
+                        constructPayload(arr);
+                    }
+                }
+                if (pollingContinue) {
+                    startPoll();
+                }
+            })
+                .fail(function (errorData) {
+                    var errorData = JSON.parse(errorData.responseText);
+                    onErrorFunction(errorData.error);
+                });
+        }, polingInterval);
+    })()
+}
+
+function stopPollingProcesses() {
+
+    //stopping the Websocket
+    if (websocket != null) {
+        terminateWebsocketInstance = true;
+        websocket.onclose;
+    }
+    //stopping the HTTPS Request
+    pollingContinue = false;
+
+}
+
+function constructPayload(eventsArray) {
+
+    var streamId = stream + CONSTANTS.colon + streamVersion;
+    var twoDimentionalArray = [eventsArray];
+    onSuccessFunction(streamId, twoDimentionalArray);
+
+}
\ No newline at end of file


[35/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.geomap.dependencies.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.geomap.dependencies.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.geomap.dependencies.min.js
new file mode 100644
index 0000000..67087a6
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.geomap.dependencies.min.js
@@ -0,0 +1,8249 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+!function () {
+    function n(n) {
+        return n && (n.ownerDocument || n.document || n).documentElement
+    }
+
+    function t( n) {
+        return n && (n.ownerDocument && n.ownerDocument.defaultView || n.document && n || n.defaultView)
+    }
+
+    function e(n, t) {
+        return t > n ? -1 : n > t ? 1 : n >= t ? 0 : 0 / 0
+    }
+
+    function r(n) {
+        return null === n ? 0 / 0 : +n
+    }
+
+    function u(n) {
+        return !isNaN(n)
+    }
+
+    function i(n) {
+        return {
+            left: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) < 0 ? r = i + 1 : u = i
+                }
+                return r
+            }, right: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) > 0 ? u = i : r = i + 1
+                }
+                return r
+            }
+        }
+    }
+
+    function o(n) {
+        return n.length
+    }
+
+    function a(n) {
+        for (var t = 1; n * t % 1;)t *= 10;
+        return t
+    }
+
+    function c(n, t) {
+        for (var e in t)Object.defineProperty(n.prototype, e, {value: t[e], enumerable: !1})
+    }
+
+    function l() {
+        this._ = Object.create(null)
+    }
+
+    function s(n) {
+        return (n += "") === pa || n[0] === va ? va + n : n
+    }
+
+    function f(n) {
+        return (n += "")[0] === va ? n.slice(1) : n
+    }
+
+    function h(n) {
+        return s(n)in this._
+    }
+
+    function g(n) {
+        return (n = s(n))in this._ && delete this._[n]
+    }
+
+    function p() {
+        var n = [];
+        for (var t in this._)n.push(f(t));
+        return n
+    }
+
+    function v() {
+        var n = 0;
+        for (var t in this._)++n;
+        return n
+    }
+
+    function d() {
+        for (var n in this._)return !1;
+        return !0
+    }
+
+    function m() {
+        this._ = Object.create(null)
+    }
+
+    function y(n) {
+        return n
+    }
+
+    function M(n, t, e) {
+        return function () {
+            var r = e.apply(t, arguments);
+            return r === t ? n : r
+        }
+    }
+
+    function x(n, t) {
+        if (t in n)return t;
+        t = t.charAt(0).toUpperCase() + t.slice(1);
+        for (var e = 0, r = da.length; r > e; ++e) {
+            var u = da[e] + t;
+            if (u in n)return u
+        }
+    }
+
+    function b() {
+    }
+
+    function _() {
+    }
+
+    function w(n) {
+        function t() {
+            for (var t, r = e, u = -1, i = r.length; ++u < i;)(t = r[u].on) && t.apply(this, arguments);
+            return n
+        }
+
+        var e = [], r = new l;
+        return t.on = function (t, u) {
+            var i, o = r.get(t);
+            return arguments.length < 2 ? o && o.on : (o && (o.on = null, e = e.slice(0, i = e.indexOf(o)).concat(e.slice(i + 1)), r.remove(t)), u && e.push(r.set(t, {on: u})), n)
+        }, t
+    }
+
+    function S() {
+        ta.event.preventDefault()
+    }
+
+    function k() {
+        for (var n, t = ta.event; n = t.sourceEvent;)t = n;
+        return t
+    }
+
+    function E(n) {
+        for (var t = new _, e = 0, r = arguments.length; ++e < r;)t[arguments[e]] = w(t);
+        return t.of = function (e, r) {
+            return function (u) {
+                try {
+                    var i = u.sourceEvent = ta.event;
+                    u.target = n, ta.event = u, t[u.type].apply(e, r)
+                } finally {
+                    ta.event = i
+                }
+            }
+        }, t
+    }
+
+    function A(n) {
+        return ya(n, _a), n
+    }
+
+    function N(n) {
+        return "function" == typeof n ? n : function () {
+            return Ma(n, this)
+        }
+    }
+
+    function C(n) {
+        return "function" == typeof n ? n : function () {
+            return xa(n, this)
+        }
+    }
+
+    function z(n, t) {
+        function e() {
+            this.removeAttribute(n)
+        }
+
+        function r() {
+            this.removeAttributeNS(n.space, n.local)
+        }
+
+        function u() {
+            this.setAttribute(n, t)
+        }
+
+        function i() {
+            this.setAttributeNS(n.space, n.local, t)
+        }
+
+        function o() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttribute(n) : this.setAttribute(n, e)
+        }
+
+        function a() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttributeNS(n.space, n.local) : this.setAttributeNS(n.space, n.local, e)
+        }
+
+        return n = ta.ns.qualify(n), null == t ? n.local ? r : e : "function" == typeof t ? n.local ? a : o : n.local ? i : u
+    }
+
+    function q(n) {
+        return n.trim().replace(/\s+/g, " ")
+    }
+
+    function L(n) {
+        return new RegExp("(?:^|\\s+)" + ta.requote(n) + "(?:\\s+|$)", "g")
+    }
+
+    function T(n) {
+        return (n + "").trim().split(/^|\s+/)
+    }
+
+    function R(n, t) {
+        function e() {
+            for (var e = -1; ++e < u;)n[e](this, t)
+        }
+
+        function r() {
+            for (var e = -1, r = t.apply(this, arguments); ++e < u;)n[e](this, r)
+        }
+
+        n = T(n).map(D);
+        var u = n.length;
+        return "function" == typeof t ? r : e
+    }
+
+    function D(n) {
+        var t = L(n);
+        return function (e, r) {
+            if (u = e.classList)return r ? u.add(n) : u.remove(n);
+            var u = e.getAttribute("class") || "";
+            r ? (t.lastIndex = 0, t.test(u) || e.setAttribute("class", q(u + " " + n))) : e.setAttribute("class", q(u.replace(t, " ")))
+        }
+    }
+
+    function P(n, t, e) {
+        function r() {
+            this.style.removeProperty(n)
+        }
+
+        function u() {
+            this.style.setProperty(n, t, e)
+        }
+
+        function i() {
+            var r = t.apply(this, arguments);
+            null == r ? this.style.removeProperty(n) : this.style.setProperty(n, r, e)
+        }
+
+        return null == t ? r : "function" == typeof t ? i : u
+    }
+
+    function U(n, t) {
+        function e() {
+            delete this[n]
+        }
+
+        function r() {
+            this[n] = t
+        }
+
+        function u() {
+            var e = t.apply(this, arguments);
+            null == e ? delete this[n] : this[n] = e
+        }
+
+        return null == t ? e : "function" == typeof t ? u : r
+    }
+
+    function j(n) {
+        function t() {
+            var t = this.ownerDocument, e = this.namespaceURI;
+            return e ? t.createElementNS(e, n) : t.createElement(n)
+        }
+
+        function e() {
+            return this.ownerDocument.createElementNS(n.space, n.local)
+        }
+
+        return "function" == typeof n ? n : (n = ta.ns.qualify(n)).local ? e : t
+    }
+
+    function F() {
+        var n = this.parentNode;
+        n && n.removeChild(this)
+    }
+
+    function H(n) {
+        return {__data__: n}
+    }
+
+    function O(n) {
+        return function () {
+            return ba(this, n)
+        }
+    }
+
+    function I(n) {
+        return arguments.length || (n = e), function (t, e) {
+            return t && e ? n(t.__data__, e.__data__) : !t - !e
+        }
+    }
+
+    function Y(n, t) {
+        for (var e = 0, r = n.length; r > e; e++)for (var u, i = n[e], o = 0, a = i.length; a > o; o++)(u = i[o]) && t(u, o, e);
+        return n
+    }
+
+    function Z(n) {
+        return ya(n, Sa), n
+    }
+
+    function V(n) {
+        var t, e;
+        return function (r, u, i) {
+            var o, a = n[i].update, c = a.length;
+            for (i != e && (e = i, t = 0), u >= t && (t = u + 1); !(o = a[t]) && ++t < c;);
+            return o
+        }
+    }
+
+    function X(n, t, e) {
+        function r() {
+            var t = this[o];
+            t && (this.removeEventListener(n, t, t.$), delete this[o])
+        }
+
+        function u() {
+            var u = c(t, ra(arguments));
+            r.call(this), this.addEventListener(n, this[o] = u, u.$ = e), u._ = t
+        }
+
+        function i() {
+            var t, e = new RegExp("^__on([^.]+)" + ta.requote(n) + "$");
+            for (var r in this)if (t = r.match(e)) {
+                var u = this[r];
+                this.removeEventListener(t[1], u, u.$), delete this[r]
+            }
+        }
+
+        var o = "__on" + n, a = n.indexOf("."), c = $;
+        a > 0 && (n = n.slice(0, a));
+        var l = ka.get(n);
+        return l && (n = l, c = B), a ? t ? u : r : t ? b : i
+    }
+
+    function $(n, t) {
+        return function (e) {
+            var r = ta.event;
+            ta.event = e, t[0] = this.__data__;
+            try {
+                n.apply(this, t)
+            } finally {
+                ta.event = r
+            }
+        }
+    }
+
+    function B(n, t) {
+        var e = $(n, t);
+        return function (n) {
+            var t = this, r = n.relatedTarget;
+            r && (r === t || 8 & r.compareDocumentPosition(t)) || e.call(t, n)
+        }
+    }
+
+    function W(e) {
+        var r = ".dragsuppress-" + ++Aa, u = "click" + r, i = ta.select(t(e)).on("touchmove" + r, S).on("dragstart" + r, S).on("selectstart" + r, S);
+        if (null == Ea && (Ea = "onselectstart"in e ? !1 : x(e.style, "userSelect")), Ea) {
+            var o = n(e).style, a = o[Ea];
+            o[Ea] = "none"
+        }
+        return function (n) {
+            if (i.on(r, null), Ea && (o[Ea] = a), n) {
+                var t = function () {
+                    i.on(u, null)
+                };
+                i.on(u, function () {
+                    S(), t()
+                }, !0), setTimeout(t, 0)
+            }
+        }
+    }
+
+    function J(n, e) {
+        e.changedTouches && (e = e.changedTouches[0]);
+        var r = n.ownerSVGElement || n;
+        if (r.createSVGPoint) {
+            var u = r.createSVGPoint();
+            if (0 > Na) {
+                var i = t(n);
+                if (i.scrollX || i.scrollY) {
+                    r = ta.select("body").append("svg").style({
+                        position: "absolute",
+                        top: 0,
+                        left: 0,
+                        margin: 0,
+                        padding: 0,
+                        border: "none"
+                    }, "important");
+                    var o = r[0][0].getScreenCTM();
+                    Na = !(o.f || o.e), r.remove()
+                }
+            }
+            return Na ? (u.x = e.pageX, u.y = e.pageY) : (u.x = e.clientX, u.y = e.clientY), u = u.matrixTransform(n.getScreenCTM().inverse()), [u.x, u.y]
+        }
+        var a = n.getBoundingClientRect();
+        return [e.clientX - a.left - n.clientLeft, e.clientY - a.top - n.clientTop]
+    }
+
+    function G() {
+        return ta.event.changedTouches[0].identifier
+    }
+
+    function K(n) {
+        return n > 0 ? 1 : 0 > n ? -1 : 0
+    }
+
+    function Q(n, t, e) {
+        return (t[0] - n[0]) * (e[1] - n[1]) - (t[1] - n[1]) * (e[0] - n[0])
+    }
+
+    function nt(n) {
+        return n > 1 ? 0 : -1 > n ? qa : Math.acos(n)
+    }
+
+    function tt(n) {
+        return n > 1 ? Ra : -1 > n ? -Ra : Math.asin(n)
+    }
+
+    function et(n) {
+        return ((n = Math.exp(n)) - 1 / n) / 2
+    }
+
+    function rt(n) {
+        return ((n = Math.exp(n)) + 1 / n) / 2
+    }
+
+    function ut(n) {
+        return ((n = Math.exp(2 * n)) - 1) / (n + 1)
+    }
+
+    function it(n) {
+        return (n = Math.sin(n / 2)) * n
+    }
+
+    function ot() {
+    }
+
+    function at(n, t, e) {
+        return this instanceof at ? (this.h = +n, this.s = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof at ? new at(n.h, n.s, n.l) : bt("" + n, _t, at) : new at(n, t, e)
+    }
+
+    function ct(n, t, e) {
+        function r(n) {
+            return n > 360 ? n -= 360 : 0 > n && (n += 360), 60 > n ? i + (o - i) * n / 60 : 180 > n ? o : 240 > n ? i + (o - i) * (240 - n) / 60 : i
+        }
+
+        function u(n) {
+            return Math.round(255 * r(n))
+        }
+
+        var i, o;
+        return n = isNaN(n) ? 0 : (n %= 360) < 0 ? n + 360 : n, t = isNaN(t) ? 0 : 0 > t ? 0 : t > 1 ? 1 : t, e = 0 > e ? 0 : e > 1 ? 1 : e, o = .5 >= e ? e * (1 + t) : e + t - e * t, i = 2 * e - o, new mt(u(n + 120), u(n), u(n - 120))
+    }
+
+    function lt(n, t, e) {
+        return this instanceof lt ? (this.h = +n, this.c = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof lt ? new lt(n.h, n.c, n.l) : n instanceof ft ? gt(n.l, n.a, n.b) : gt((n = wt((n = ta.rgb(n)).r, n.g, n.b)).l, n.a, n.b) : new lt(n, t, e)
+    }
+
+    function st(n, t, e) {
+        return isNaN(n) && (n = 0), isNaN(t) && (t = 0), new ft(e, Math.cos(n *= Da) * t, Math.sin(n) * t)
+    }
+
+    function ft(n, t, e) {
+        return this instanceof ft ? (this.l = +n, this.a = +t, void(this.b = +e)) : arguments.length < 2 ? n instanceof ft ? new ft(n.l, n.a, n.b) : n instanceof lt ? st(n.h, n.c, n.l) : wt((n = mt(n)).r, n.g, n.b) : new ft(n, t, e)
+    }
+
+    function ht(n, t, e) {
+        var r = (n + 16) / 116, u = r + t / 500, i = r - e / 200;
+        return u = pt(u) * Xa, r = pt(r) * $a, i = pt(i) * Ba, new mt(dt(3.2404542 * u - 1.5371385 * r - .4985314 * i), dt(-.969266 * u + 1.8760108 * r + .041556 * i), dt(.0556434 * u - .2040259 * r + 1.0572252 * i))
+    }
+
+    function gt(n, t, e) {
+        return n > 0 ? new lt(Math.atan2(e, t) * Pa, Math.sqrt(t * t + e * e), n) : new lt(0 / 0, 0 / 0, n)
+    }
+
+    function pt(n) {
+        return n > .206893034 ? n * n * n : (n - 4 / 29) / 7.787037
+    }
+
+    function vt(n) {
+        return n > .008856 ? Math.pow(n, 1 / 3) : 7.787037 * n + 4 / 29
+    }
+
+    function dt(n) {
+        return Math.round(255 * (.00304 >= n ? 12.92 * n : 1.055 * Math.pow(n, 1 / 2.4) - .055))
+    }
+
+    function mt(n, t, e) {
+        return this instanceof mt ? (this.r = ~~n, this.g = ~~t, void(this.b = ~~e)) : arguments.length < 2 ? n instanceof mt ? new mt(n.r, n.g, n.b) : bt("" + n, mt, ct) : new mt(n, t, e)
+    }
+
+    function yt(n) {
+        return new mt(n >> 16, n >> 8 & 255, 255 & n)
+    }
+
+    function Mt(n) {
+        return yt(n) + ""
+    }
+
+    function xt(n) {
+        return 16 > n ? "0" + Math.max(0, n).toString(16) : Math.min(255, n).toString(16)
+    }
+
+    function bt(n, t, e) {
+        var r, u, i, o = 0, a = 0, c = 0;
+        if (r = /([a-z]+)\((.*)\)/i.exec(n))switch (u = r[2].split(","), r[1]) {
+            case"hsl":
+                return e(parseFloat(u[0]), parseFloat(u[1]) / 100, parseFloat(u[2]) / 100);
+            case"rgb":
+                return t(kt(u[0]), kt(u[1]), kt(u[2]))
+        }
+        return (i = Ga.get(n.toLowerCase())) ? t(i.r, i.g, i.b) : (null == n || "#" !== n.charAt(0) || isNaN(i = parseInt(n.slice(1), 16)) || (4 === n.length ? (o = (3840 & i) >> 4, o = o >> 4 | o, a = 240 & i, a = a >> 4 | a, c = 15 & i, c = c << 4 | c) : 7 === n.length && (o = (16711680 & i) >> 16, a = (65280 & i) >> 8, c = 255 & i)), t(o, a, c))
+    }
+
+    function _t(n, t, e) {
+        var r, u, i = Math.min(n /= 255, t /= 255, e /= 255), o = Math.max(n, t, e), a = o - i, c = (o + i) / 2;
+        return a ? (u = .5 > c ? a / (o + i) : a / (2 - o - i), r = n == o ? (t - e) / a + (e > t ? 6 : 0) : t == o ? (e - n) / a + 2 : (n - t) / a + 4, r *= 60) : (r = 0 / 0, u = c > 0 && 1 > c ? 0 : r), new at(r, u, c)
+    }
+
+    function wt(n, t, e) {
+        n = St(n), t = St(t), e = St(e);
+        var r = vt((.4124564 * n + .3575761 * t + .1804375 * e) / Xa), u = vt((.2126729 * n + .7151522 * t + .072175 * e) / $a), i = vt((.0193339 * n + .119192 * t + .9503041 * e) / Ba);
+        return ft(116 * u - 16, 500 * (r - u), 200 * (u - i))
+    }
+
+    function St(n) {
+        return (n /= 255) <= .04045 ? n / 12.92 : Math.pow((n + .055) / 1.055, 2.4)
+    }
+
+    function kt(n) {
+        var t = parseFloat(n);
+        return "%" === n.charAt(n.length - 1) ? Math.round(2.55 * t) : t
+    }
+
+    function Et(n) {
+        return "function" == typeof n ? n : function () {
+            return n
+        }
+    }
+
+    function At(n) {
+        return function (t, e, r) {
+            return 2 === arguments.length && "function" == typeof e && (r = e, e = null), Nt(t, e, n, r)
+        }
+    }
+
+    function Nt(n, t, e, r) {
+        function u() {
+            var n, t = c.status;
+            if (!t && zt(c) || t >= 200 && 300 > t || 304 === t) {
+                try {
+                    n = e.call(i, c)
+                } catch (r) {
+                    return void o.error.call(i, r)
+                }
+                o.load.call(i, n)
+            } else o.error.call(i, c)
+        }
+
+        var i = {}, o = ta.dispatch("beforesend", "progress", "load", "error"), a = {}, c = new XMLHttpRequest, l = null;
+        return !this.XDomainRequest || "withCredentials"in c || !/^(http(s)?:)?\/\//.test(n) || (c = new XDomainRequest), "onload"in c ? c.onload = c.onerror = u : c.onreadystatechange = function () {
+            c.readyState > 3 && u()
+        }, c.onprogress = function (n) {
+            var t = ta.event;
+            ta.event = n;
+            try {
+                o.progress.call(i, c)
+            } finally {
+                ta.event = t
+            }
+        }, i.header = function (n, t) {
+            return n = (n + "").toLowerCase(), arguments.length < 2 ? a[n] : (null == t ? delete a[n] : a[n] = t + "", i)
+        }, i.mimeType = function (n) {
+            return arguments.length ? (t = null == n ? null : n + "", i) : t
+        }, i.responseType = function (n) {
+            return arguments.length ? (l = n, i) : l
+        }, i.response = function (n) {
+            return e = n, i
+        }, ["get", "post"].forEach(function (n) {
+            i[n] = function () {
+                return i.send.apply(i, [n].concat(ra(arguments)))
+            }
+        }), i.send = function (e, r, u) {
+            if (2 === arguments.length && "function" == typeof r && (u = r, r = null), c.open(e, n, !0), null == t || "accept"in a || (a.accept = t + ",*/*"), c.setRequestHeader)for (var s in a)c.setRequestHeader(s, a[s]);
+            return null != t && c.overrideMimeType && c.overrideMimeType(t), null != l && (c.responseType = l), null != u && i.on("error", u).on("load", function (n) {
+                u(null, n)
+            }), o.beforesend.call(i, c), c.send(null == r ? null : r), i
+        }, i.abort = function () {
+            return c.abort(), i
+        }, ta.rebind(i, o, "on"), null == r ? i : i.get(Ct(r))
+    }
+
+    function Ct(n) {
+        return 1 === n.length ? function (t, e) {
+            n(null == t ? e : null)
+        } : n
+    }
+
+    function zt(n) {
+        var t = n.responseType;
+        return t && "text" !== t ? n.response : n.responseText
+    }
+
+    function qt() {
+        var n = Lt(), t = Tt() - n;
+        t > 24 ? (isFinite(t) && (clearTimeout(tc), tc = setTimeout(qt, t)), nc = 0) : (nc = 1, rc(qt))
+    }
+
+    function Lt() {
+        var n = Date.now();
+        for (ec = Ka; ec;)n >= ec.t && (ec.f = ec.c(n - ec.t)), ec = ec.n;
+        return n
+    }
+
+    function Tt() {
+        for (var n, t = Ka, e = 1 / 0; t;)t.f ? t = n ? n.n = t.n : Ka = t.n : (t.t < e && (e = t.t), t = (n = t).n);
+        return Qa = n, e
+    }
+
+    function Rt(n, t) {
+        return t - (n ? Math.ceil(Math.log(n) / Math.LN10) : 1)
+    }
+
+    function Dt(n, t) {
+        var e = Math.pow(10, 3 * ga(8 - t));
+        return {
+            scale: t > 8 ? function (n) {
+                return n / e
+            } : function (n) {
+                return n * e
+            }, symbol: n
+        }
+    }
+
+    function Pt(n) {
+        var t = n.decimal, e = n.thousands, r = n.grouping, u = n.currency, i = r && e ? function (n, t) {
+            for (var u = n.length, i = [], o = 0, a = r[0], c = 0; u > 0 && a > 0 && (c + a + 1 > t && (a = Math.max(1, t - c)), i.push(n.substring(u -= a, u + a)), !((c += a + 1) > t));)a = r[o = (o + 1) % r.length];
+            return i.reverse().join(e)
+        } : y;
+        return function (n) {
+            var e = ic.exec(n), r = e[1] || " ", o = e[2] || ">", a = e[3] || "-", c = e[4] || "", l = e[5], s = +e[6], f = e[7], h = e[8], g = e[9], p = 1, v = "", d = "", m = !1, y = !0;
+            switch (h && (h = +h.substring(1)), (l || "0" === r && "=" === o) && (l = r = "0", o = "="), g) {
+                case"n":
+                    f = !0, g = "g";
+                    break;
+                case"%":
+                    p = 100, d = "%", g = "f";
+                    break;
+                case"p":
+                    p = 100, d = "%", g = "r";
+                    break;
+                case"b":
+                case"o":
+                case"x":
+                case"X":
+                    "#" === c && (v = "0" + g.toLowerCase());
+                case"c":
+                    y = !1;
+                case"d":
+                    m = !0, h = 0;
+                    break;
+                case"s":
+                    p = -1, g = "r"
+            }
+            "$" === c && (v = u[0], d = u[1]), "r" != g || h || (g = "g"), null != h && ("g" == g ? h = Math.max(1, Math.min(21, h)) : ("e" == g || "f" == g) && (h = Math.max(0, Math.min(20, h)))), g = oc.get(g) || Ut;
+            var M = l && f;
+            return function (n) {
+                var e = d;
+                if (m && n % 1)return "";
+                var u = 0 > n || 0 === n && 0 > 1 / n ? (n = -n, "-") : "-" === a ? "" : a;
+                if (0 > p) {
+                    var c = ta.formatPrefix(n, h);
+                    n = c.scale(n), e = c.symbol + d
+                } else n *= p;
+                n = g(n, h);
+                var x, b, _ = n.lastIndexOf(".");
+                if (0 > _) {
+                    var w = y ? n.lastIndexOf("e") : -1;
+                    0 > w ? (x = n, b = "") : (x = n.substring(0, w), b = n.substring(w))
+                } else x = n.substring(0, _), b = t + n.substring(_ + 1);
+                !l && f && (x = i(x, 1 / 0));
+                var S = v.length + x.length + b.length + (M ? 0 : u.length), k = s > S ? new Array(S = s - S + 1).join(r) : "";
+                return M && (x = i(k + x, k.length ? s - b.length : 1 / 0)), u += v, n = x + b, ("<" === o ? u + n + k : ">" === o ? k + u + n : "^" === o ? k.substring(0, S >>= 1) + u + n + k.substring(S) : u + (M ? n : k + n)) + e
+            }
+        }
+    }
+
+    function Ut(n) {
+        return n + ""
+    }
+
+    function jt() {
+        this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0])
+    }
+
+    function Ft(n, t, e) {
+        function r(t) {
+            var e = n(t), r = i(e, 1);
+            return r - t > t - e ? e : r
+        }
+
+        function u(e) {
+            return t(e = n(new cc(e - 1)), 1), e
+        }
+
+        function i(n, e) {
+            return t(n = new cc(+n), e), n
+        }
+
+        function o(n, r, i) {
+            var o = u(n), a = [];
+            if (i > 1)for (; r > o;)e(o) % i || a.push(new Date(+o)), t(o, 1); else for (; r > o;)a.push(new Date(+o)), t(o, 1);
+            return a
+        }
+
+        function a(n, t, e) {
+            try {
+                cc = jt;
+                var r = new jt;
+                return r._ = n, o(r, t, e)
+            } finally {
+                cc = Date
+            }
+        }
+
+        n.floor = n, n.round = r, n.ceil = u, n.offset = i, n.range = o;
+        var c = n.utc = Ht(n);
+        return c.floor = c, c.round = Ht(r), c.ceil = Ht(u), c.offset = Ht(i), c.range = a, n
+    }
+
+    function Ht(n) {
+        return function (t, e) {
+            try {
+                cc = jt;
+                var r = new jt;
+                return r._ = t, n(r, e)._
+            } finally {
+                cc = Date
+            }
+        }
+    }
+
+    function Ot(n) {
+        function t(n) {
+            function t(t) {
+                for (var e, u, i, o = [], a = -1, c = 0; ++a < r;)37 === n.charCodeAt(a) && (o.push(n.slice(c, a)), null != (u = sc[e = n.charAt(++a)]) && (e = n.charAt(++a)), (i = N[e]) && (e = i(t, null == u ? "e" === e ? " " : "0" : u)), o.push(e), c = a + 1);
+                return o.push(n.slice(c, a)), o.join("")
+            }
+
+            var r = n.length;
+            return t.parse = function (t) {
+                var r = {y: 1900, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0, Z: null}, u = e(r, n, t, 0);
+                if (u != t.length)return null;
+                "p"in r && (r.H = r.H % 12 + 12 * r.p);
+                var i = null != r.Z && cc !== jt, o = new (i ? jt : cc);
+                return "j"in r ? o.setFullYear(r.y, 0, r.j) : "w"in r && ("W"in r || "U"in r) ? (o.setFullYear(r.y, 0, 1), o.setFullYear(r.y, 0, "W"in r ? (r.w + 6) % 7 + 7 * r.W - (o.getDay() + 5) % 7 : r.w + 7 * r.U - (o.getDay() + 6) % 7)) : o.setFullYear(r.y, r.m, r.d), o.setHours(r.H + (r.Z / 100 | 0), r.M + r.Z % 100, r.S, r.L), i ? o._ : o
+            }, t.toString = function () {
+                return n
+            }, t
+        }
+
+        function e(n, t, e, r) {
+            for (var u, i, o, a = 0, c = t.length, l = e.length; c > a;) {
+                if (r >= l)return -1;
+                if (u = t.charCodeAt(a++), 37 === u) {
+                    if (o = t.charAt(a++), i = C[o in sc ? t.charAt(a++) : o], !i || (r = i(n, e, r)) < 0)return -1
+                } else if (u != e.charCodeAt(r++))return -1
+            }
+            return r
+        }
+
+        function r(n, t, e) {
+            _.lastIndex = 0;
+            var r = _.exec(t.slice(e));
+            return r ? (n.w = w.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function u(n, t, e) {
+            x.lastIndex = 0;
+            var r = x.exec(t.slice(e));
+            return r ? (n.w = b.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function i(n, t, e) {
+            E.lastIndex = 0;
+            var r = E.exec(t.slice(e));
+            return r ? (n.m = A.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function o(n, t, e) {
+            S.lastIndex = 0;
+            var r = S.exec(t.slice(e));
+            return r ? (n.m = k.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function a(n, t, r) {
+            return e(n, N.c.toString(), t, r)
+        }
+
+        function c(n, t, r) {
+            return e(n, N.x.toString(), t, r)
+        }
+
+        function l(n, t, r) {
+            return e(n, N.X.toString(), t, r)
+        }
+
+        function s(n, t, e) {
+            var r = M.get(t.slice(e, e += 2).toLowerCase());
+            return null == r ? -1 : (n.p = r, e)
+        }
+
+        var f = n.dateTime, h = n.date, g = n.time, p = n.periods, v = n.days, d = n.shortDays, m = n.months, y = n.shortMonths;
+        t.utc = function (n) {
+            function e(n) {
+                try {
+                    cc = jt;
+                    var t = new cc;
+                    return t._ = n, r(t)
+                } finally {
+                    cc = Date
+                }
+            }
+
+            var r = t(n);
+            return e.parse = function (n) {
+                try {
+                    cc = jt;
+                    var t = r.parse(n);
+                    return t && t._
+                } finally {
+                    cc = Date
+                }
+            }, e.toString = r.toString, e
+        }, t.multi = t.utc.multi = ae;
+        var M = ta.map(), x = Yt(v), b = Zt(v), _ = Yt(d), w = Zt(d), S = Yt(m), k = Zt(m), E = Yt(y), A = Zt(y);
+        p.forEach(function (n, t) {
+            M.set(n.toLowerCase(), t)
+        });
+        var N = {
+            a: function (n) {
+                return d[n.getDay()]
+            }, A: function (n) {
+                return v[n.getDay()]
+            }, b: function (n) {
+                return y[n.getMonth()]
+            }, B: function (n) {
+                return m[n.getMonth()]
+            }, c: t(f), d: function (n, t) {
+                return It(n.getDate(), t, 2)
+            }, e: function (n, t) {
+                return It(n.getDate(), t, 2)
+            }, H: function (n, t) {
+                return It(n.getHours(), t, 2)
+            }, I: function (n, t) {
+                return It(n.getHours() % 12 || 12, t, 2)
+            }, j: function (n, t) {
+                return It(1 + ac.dayOfYear(n), t, 3)
+            }, L: function (n, t) {
+                return It(n.getMilliseconds(), t, 3)
+            }, m: function (n, t) {
+                return It(n.getMonth() + 1, t, 2)
+            }, M: function (n, t) {
+                return It(n.getMinutes(), t, 2)
+            }, p: function (n) {
+                return p[+(n.getHours() >= 12)]
+            }, S: function (n, t) {
+                return It(n.getSeconds(), t, 2)
+            }, U: function (n, t) {
+                return It(ac.sundayOfYear(n), t, 2)
+            }, w: function (n) {
+                return n.getDay()
+            }, W: function (n, t) {
+                return It(ac.mondayOfYear(n), t, 2)
+            }, x: t(h), X: t(g), y: function (n, t) {
+                return It(n.getFullYear() % 100, t, 2)
+            }, Y: function (n, t) {
+                return It(n.getFullYear() % 1e4, t, 4)
+            }, Z: ie, "%": function () {
+                return "%"
+            }
+        }, C = {
+            a: r,
+            A: u,
+            b: i,
+            B: o,
+            c: a,
+            d: Qt,
+            e: Qt,
+            H: te,
+            I: te,
+            j: ne,
+            L: ue,
+            m: Kt,
+            M: ee,
+            p: s,
+            S: re,
+            U: Xt,
+            w: Vt,
+            W: $t,
+            x: c,
+            X: l,
+            y: Wt,
+            Y: Bt,
+            Z: Jt,
+            "%": oe
+        };
+        return t
+    }
+
+    function It(n, t, e) {
+        var r = 0 > n ? "-" : "", u = (r ? -n : n) + "", i = u.length;
+        return r + (e > i ? new Array(e - i + 1).join(t) + u : u)
+    }
+
+    function Yt(n) {
+        return new RegExp("^(?:" + n.map(ta.requote).join("|") + ")", "i")
+    }
+
+    function Zt(n) {
+        for (var t = new l, e = -1, r = n.length; ++e < r;)t.set(n[e].toLowerCase(), e);
+        return t
+    }
+
+    function Vt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 1));
+        return r ? (n.w = +r[0], e + r[0].length) : -1
+    }
+
+    function Xt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e));
+        return r ? (n.U = +r[0], e + r[0].length) : -1
+    }
+
+    function $t(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e));
+        return r ? (n.W = +r[0], e + r[0].length) : -1
+    }
+
+    function Bt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 4));
+        return r ? (n.y = +r[0], e + r[0].length) : -1
+    }
+
+    function Wt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.y = Gt(+r[0]), e + r[0].length) : -1
+    }
+
+    function Jt(n, t, e) {
+        return /^[+-]\d{4}$/.test(t = t.slice(e, e + 5)) ? (n.Z = -t, e + 5) : -1
+    }
+
+    function Gt(n) {
+        return n + (n > 68 ? 1900 : 2e3)
+    }
+
+    function Kt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.m = r[0] - 1, e + r[0].length) : -1
+    }
+
+    function Qt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.d = +r[0], e + r[0].length) : -1
+    }
+
+    function ne(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 3));
+        return r ? (n.j = +r[0], e + r[0].length) : -1
+    }
+
+    function te(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.H = +r[0], e + r[0].length) : -1
+    }
+
+    function ee(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.M = +r[0], e + r[0].length) : -1
+    }
+
+    function re(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.S = +r[0], e + r[0].length) : -1
+    }
+
+    function ue(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 3));
+        return r ? (n.L = +r[0], e + r[0].length) : -1
+    }
+
+    function ie(n) {
+        var t = n.getTimezoneOffset(), e = t > 0 ? "-" : "+", r = ga(t) / 60 | 0, u = ga(t) % 60;
+        return e + It(r, "0", 2) + It(u, "0", 2)
+    }
+
+    function oe(n, t, e) {
+        hc.lastIndex = 0;
+        var r = hc.exec(t.slice(e, e + 1));
+        return r ? e + r[0].length : -1
+    }
+
+    function ae(n) {
+        for (var t = n.length, e = -1; ++e < t;)n[e][0] = this(n[e][0]);
+        return function (t) {
+            for (var e = 0, r = n[e]; !r[1](t);)r = n[++e];
+            return r[0](t)
+        }
+    }
+
+    function ce() {
+    }
+
+    function le(n, t, e) {
+        var r = e.s = n + t, u = r - n, i = r - u;
+        e.t = n - i + (t - u)
+    }
+
+    function se(n, t) {
+        n && dc.hasOwnProperty(n.type) && dc[n.type](n, t)
+    }
+
+    function fe(n, t, e) {
+        var r, u = -1, i = n.length - e;
+        for (t.lineStart(); ++u < i;)r = n[u], t.point(r[0], r[1], r[2]);
+        t.lineEnd()
+    }
+
+    function he(n, t) {
+        var e = -1, r = n.length;
+        for (t.polygonStart(); ++e < r;)fe(n[e], t, 1);
+        t.polygonEnd()
+    }
+
+    function ge() {
+        function n(n, t) {
+            n *= Da, t = t * Da / 2 + qa / 4;
+            var e = n - r, o = e >= 0 ? 1 : -1, a = o * e, c = Math.cos(t), l = Math.sin(t), s = i * l, f = u * c + s * Math.cos(a), h = s * o * Math.sin(a);
+            yc.add(Math.atan2(h, f)), r = n, u = c, i = l
+        }
+
+        var t, e, r, u, i;
+        Mc.point = function (o, a) {
+            Mc.point = n, r = (t = o) * Da, u = Math.cos(a = (e = a) * Da / 2 + qa / 4), i = Math.sin(a)
+        }, Mc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function pe(n) {
+        var t = n[0], e = n[1], r = Math.cos(e);
+        return [r * Math.cos(t), r * Math.sin(t), Math.sin(e)]
+    }
+
+    function ve(n, t) {
+        return n[0] * t[0] + n[1] * t[1] + n[2] * t[2]
+    }
+
+    function de(n, t) {
+        return [n[1] * t[2] - n[2] * t[1], n[2] * t[0] - n[0] * t[2], n[0] * t[1] - n[1] * t[0]]
+    }
+
+    function me(n, t) {
+        n[0] += t[0], n[1] += t[1], n[2] += t[2]
+    }
+
+    function ye(n, t) {
+        return [n[0] * t, n[1] * t, n[2] * t]
+    }
+
+    function Me(n) {
+        var t = Math.sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
+        n[0] /= t, n[1] /= t, n[2] /= t
+    }
+
+    function xe(n) {
+        return [Math.atan2(n[1], n[0]), tt(n[2])]
+    }
+
+    function be(n, t) {
+        return ga(n[0] - t[0]) < Ca && ga(n[1] - t[1]) < Ca
+    }
+
+    function _e(n, t) {
+        n *= Da;
+        var e = Math.cos(t *= Da);
+        we(e * Math.cos(n), e * Math.sin(n), Math.sin(t))
+    }
+
+    function we(n, t, e) {
+        ++xc, _c += (n - _c) / xc, wc += (t - wc) / xc, Sc += (e - Sc) / xc
+    }
+
+    function Se() {
+        function n(n, u) {
+            n *= Da;
+            var i = Math.cos(u *= Da), o = i * Math.cos(n), a = i * Math.sin(n), c = Math.sin(u), l = Math.atan2(Math.sqrt((l = e * c - r * a) * l + (l = r * o - t * c) * l + (l = t * a - e * o) * l), t * o + e * a + r * c);
+            bc += l, kc += l * (t + (t = o)), Ec += l * (e + (e = a)), Ac += l * (r + (r = c)), we(t, e, r)
+        }
+
+        var t, e, r;
+        qc.point = function (u, i) {
+            u *= Da;
+            var o = Math.cos(i *= Da);
+            t = o * Math.cos(u), e = o * Math.sin(u), r = Math.sin(i), qc.point = n, we(t, e, r)
+        }
+    }
+
+    function ke() {
+        qc.point = _e
+    }
+
+    function Ee() {
+        function n(n, t) {
+            n *= Da;
+            var e = Math.cos(t *= Da), o = e * Math.cos(n), a = e * Math.sin(n), c = Math.sin(t), l = u * c - i * a, s = i * o - r * c, f = r * a - u * o, h = Math.sqrt(l * l + s * s + f * f), g = r * o + u * a + i * c, p = h && -nt(g) / h, v = Math.atan2(h, g);
+            Nc += p * l, Cc += p * s, zc += p * f, bc += v, kc += v * (r + (r = o)), Ec += v * (u + (u = a)), Ac += v * (i + (i = c)), we(r, u, i)
+        }
+
+        var t, e, r, u, i;
+        qc.point = function (o, a) {
+            t = o, e = a, qc.point = n, o *= Da;
+            var c = Math.cos(a *= Da);
+            r = c * Math.cos(o), u = c * Math.sin(o), i = Math.sin(a), we(r, u, i)
+        }, qc.lineEnd = function () {
+            n(t, e), qc.lineEnd = ke, qc.point = _e
+        }
+    }
+
+    function Ae(n, t) {
+        function e(e, r) {
+            return e = n(e, r), t(e[0], e[1])
+        }
+
+        return n.invert && t.invert && (e.invert = function (e, r) {
+            return e = t.invert(e, r), e && n.invert(e[0], e[1])
+        }), e
+    }
+
+    function Ne() {
+        return !0
+    }
+
+    function Ce(n, t, e, r, u) {
+        var i = [], o = [];
+        if (n.forEach(function (n) {
+                if (!((t = n.length - 1) <= 0)) {
+                    var t, e = n[0], r = n[t];
+                    if (be(e, r)) {
+                        u.lineStart();
+                        for (var a = 0; t > a; ++a)u.point((e = n[a])[0], e[1]);
+                        return void u.lineEnd()
+                    }
+                    var c = new qe(e, n, null, !0), l = new qe(e, null, c, !1);
+                    c.o = l, i.push(c), o.push(l), c = new qe(r, n, null, !1), l = new qe(r, null, c, !0), c.o = l, i.push(c), o.push(l)
+                }
+            }), o.sort(t), ze(i), ze(o), i.length) {
+            for (var a = 0, c = e, l = o.length; l > a; ++a)o[a].e = c = !c;
+            for (var s, f, h = i[0]; ;) {
+                for (var g = h, p = !0; g.v;)if ((g = g.n) === h)return;
+                s = g.z, u.lineStart();
+                do {
+                    if (g.v = g.o.v = !0, g.e) {
+                        if (p)for (var a = 0, l = s.length; l > a; ++a)u.point((f = s[a])[0], f[1]); else r(g.x, g.n.x, 1, u);
+                        g = g.n
+                    } else {
+                        if (p) {
+                            s = g.p.z;
+                            for (var a = s.length - 1; a >= 0; --a)u.point((f = s[a])[0], f[1])
+                        } else r(g.x, g.p.x, -1, u);
+                        g = g.p
+                    }
+                    g = g.o, s = g.z, p = !p
+                } while (!g.v);
+                u.lineEnd()
+            }
+        }
+    }
+
+    function ze(n) {
+        if (t = n.length) {
+            for (var t, e, r = 0, u = n[0]; ++r < t;)u.n = e = n[r], e.p = u, u = e;
+            u.n = e = n[0], e.p = u
+        }
+    }
+
+    function qe(n, t, e, r) {
+        this.x = n, this.z = t, this.o = e, this.e = r, this.v = !1, this.n = this.p = null
+    }
+
+    function Le(n, t, e, r) {
+        return function (u, i) {
+            function o(t, e) {
+                var r = u(t, e);
+                n(t = r[0], e = r[1]) && i.point(t, e)
+            }
+
+            function a(n, t) {
+                var e = u(n, t);
+                d.point(e[0], e[1])
+            }
+
+            function c() {
+                y.point = a, d.lineStart()
+            }
+
+            function l() {
+                y.point = o, d.lineEnd()
+            }
+
+            function s(n, t) {
+                v.push([n, t]);
+                var e = u(n, t);
+                x.point(e[0], e[1])
+            }
+
+            function f() {
+                x.lineStart(), v = []
+            }
+
+            function h() {
+                s(v[0][0], v[0][1]), x.lineEnd();
+                var n, t = x.clean(), e = M.buffer(), r = e.length;
+                if (v.pop(), p.push(v), v = null, r)if (1 & t) {
+                    n = e[0];
+                    var u, r = n.length - 1, o = -1;
+                    if (r > 0) {
+                        for (b || (i.polygonStart(), b = !0), i.lineStart(); ++o < r;)i.point((u = n[o])[0], u[1]);
+                        i.lineEnd()
+                    }
+                } else r > 1 && 2 & t && e.push(e.pop().concat(e.shift())), g.push(e.filter(Te))
+            }
+
+            var g, p, v, d = t(i), m = u.invert(r[0], r[1]), y = {
+                point: o,
+                lineStart: c,
+                lineEnd: l,
+                polygonStart: function () {
+                    y.point = s, y.lineStart = f, y.lineEnd = h, g = [], p = []
+                },
+                polygonEnd: function () {
+                    y.point = o, y.lineStart = c, y.lineEnd = l, g = ta.merge(g);
+                    var n = Fe(m, p);
+                    g.length ? (b || (i.polygonStart(), b = !0), Ce(g, De, n, e, i)) : n && (b || (i.polygonStart(), b = !0), i.lineStart(), e(null, null, 1, i), i.lineEnd()), b && (i.polygonEnd(), b = !1), g = p = null
+                },
+                sphere: function () {
+                    i.polygonStart(), i.lineStart(), e(null, null, 1, i), i.lineEnd(), i.polygonEnd()
+                }
+            }, M = Re(), x = t(M), b = !1;
+            return y
+        }
+    }
+
+    function Te(n) {
+        return n.length > 1
+    }
+
+    function Re() {
+        var n, t = [];
+        return {
+            lineStart: function () {
+                t.push(n = [])
+            }, point: function (t, e) {
+                n.push([t, e])
+            }, lineEnd: b, buffer: function () {
+                var e = t;
+                return t = [], n = null, e
+            }, rejoin: function () {
+                t.length > 1 && t.push(t.pop().concat(t.shift()))
+            }
+        }
+    }
+
+    function De(n, t) {
+        return ((n = n.x)[0] < 0 ? n[1] - Ra - Ca : Ra - n[1]) - ((t = t.x)[0] < 0 ? t[1] - Ra - Ca : Ra - t[1])
+    }
+
+    function Pe(n) {
+        var t, e = 0 / 0, r = 0 / 0, u = 0 / 0;
+        return {
+            lineStart: function () {
+                n.lineStart(), t = 1
+            }, point: function (i, o) {
+                var a = i > 0 ? qa : -qa, c = ga(i - e);
+                ga(c - qa) < Ca ? (n.point(e, r = (r + o) / 2 > 0 ? Ra : -Ra), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), n.point(i, r), t = 0) : u !== a && c >= qa && (ga(e - u) < Ca && (e -= u * Ca), ga(i - a) < Ca && (i -= a * Ca), r = Ue(e, r, i, o), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), t = 0), n.point(e = i, r = o), u = a
+            }, lineEnd: function () {
+                n.lineEnd(), e = r = 0 / 0
+            }, clean: function () {
+                return 2 - t
+            }
+        }
+    }
+
+    function Ue(n, t, e, r) {
+        var u, i, o = Math.sin(n - e);
+        return ga(o) > Ca ? Math.atan((Math.sin(t) * (i = Math.cos(r)) * Math.sin(e) - Math.sin(r) * (u = Math.cos(t)) * Math.sin(n)) / (u * i * o)) : (t + r) / 2
+    }
+
+    function je(n, t, e, r) {
+        var u;
+        if (null == n)u = e * Ra, r.point(-qa, u), r.point(0, u), r.point(qa, u), r.point(qa, 0), r.point(qa, -u), r.point(0, -u), r.point(-qa, -u), r.point(-qa, 0), r.point(-qa, u); else if (ga(n[0] - t[0]) > Ca) {
+            var i = n[0] < t[0] ? qa : -qa;
+            u = e * i / 2, r.point(-i, u), r.point(0, u), r.point(i, u)
+        } else r.point(t[0], t[1])
+    }
+
+    function Fe(n, t) {
+        var e = n[0], r = n[1], u = [Math.sin(e), -Math.cos(e), 0], i = 0, o = 0;
+        yc.reset();
+        for (var a = 0, c = t.length; c > a; ++a) {
+            var l = t[a], s = l.length;
+            if (s)for (var f = l[0], h = f[0], g = f[1] / 2 + qa / 4, p = Math.sin(g), v = Math.cos(g), d = 1; ;) {
+                d === s && (d = 0), n = l[d];
+                var m = n[0], y = n[1] / 2 + qa / 4, M = Math.sin(y), x = Math.cos(y), b = m - h, _ = b >= 0 ? 1 : -1, w = _ * b, S = w > qa, k = p * M;
+                if (yc.add(Math.atan2(k * _ * Math.sin(w), v * x + k * Math.cos(w))), i += S ? b + _ * La : b, S ^ h >= e ^ m >= e) {
+                    var E = de(pe(f), pe(n));
+                    Me(E);
+                    var A = de(u, E);
+                    Me(A);
+                    var N = (S ^ b >= 0 ? -1 : 1) * tt(A[2]);
+                    (r > N || r === N && (E[0] || E[1])) && (o += S ^ b >= 0 ? 1 : -1)
+                }
+                if (!d++)break;
+                h = m, p = M, v = x, f = n
+            }
+        }
+        return (-Ca > i || Ca > i && 0 > yc) ^ 1 & o
+    }
+
+    function He(n) {
+        function t(n, t) {
+            return Math.cos(n) * Math.cos(t) > i
+        }
+
+        function e(n) {
+            var e, i, c, l, s;
+            return {
+                lineStart: function () {
+                    l = c = !1, s = 1
+                }, point: function (f, h) {
+                    var g, p = [f, h], v = t(f, h), d = o ? v ? 0 : u(f, h) : v ? u(f + (0 > f ? qa : -qa), h) : 0;
+                    if (!e && (l = c = v) && n.lineStart(), v !== c && (g = r(e, p), (be(e, g) || be(p, g)) && (p[0] += Ca, p[1] += Ca, v = t(p[0], p[1]))), v !== c)s = 0, v ? (n.lineStart(), g = r(p, e), n.point(g[0], g[1])) : (g = r(e, p), n.point(g[0], g[1]), n.lineEnd()), e = g; else if (a && e && o ^ v) {
+                        var m;
+                        d & i || !(m = r(p, e, !0)) || (s = 0, o ? (n.lineStart(), n.point(m[0][0], m[0][1]), n.point(m[1][0], m[1][1]), n.lineEnd()) : (n.point(m[1][0], m[1][1]), n.lineEnd(), n.lineStart(), n.point(m[0][0], m[0][1])))
+                    }
+                    !v || e && be(e, p) || n.point(p[0], p[1]), e = p, c = v, i = d
+                }, lineEnd: function () {
+                    c && n.lineEnd(), e = null
+                }, clean: function () {
+                    return s | (l && c) << 1
+                }
+            }
+        }
+
+        function r(n, t, e) {
+            var r = pe(n), u = pe(t), o = [1, 0, 0], a = de(r, u), c = ve(a, a), l = a[0], s = c - l * l;
+            if (!s)return !e && n;
+            var f = i * c / s, h = -i * l / s, g = de(o, a), p = ye(o, f), v = ye(a, h);
+            me(p, v);
+            var d = g, m = ve(p, d), y = ve(d, d), M = m * m - y * (ve(p, p) - 1);
+            if (!(0 > M)) {
+                var x = Math.sqrt(M), b = ye(d, (-m - x) / y);
+                if (me(b, p), b = xe(b), !e)return b;
+                var _, w = n[0], S = t[0], k = n[1], E = t[1];
+                w > S && (_ = w, w = S, S = _);
+                var A = S - w, N = ga(A - qa) < Ca, C = N || Ca > A;
+                if (!N && k > E && (_ = k, k = E, E = _), C ? N ? k + E > 0 ^ b[1] < (ga(b[0] - w) < Ca ? k : E) : k <= b[1] && b[1] <= E : A > qa ^ (w <= b[0] && b[0] <= S)) {
+                    var z = ye(d, (-m + x) / y);
+                    return me(z, p), [b, xe(z)]
+                }
+            }
+        }
+
+        function u(t, e) {
+            var r = o ? n : qa - n, u = 0;
+            return -r > t ? u |= 1 : t > r && (u |= 2), -r > e ? u |= 4 : e > r && (u |= 8), u
+        }
+
+        var i = Math.cos(n), o = i > 0, a = ga(i) > Ca, c = gr(n, 6 * Da);
+        return Le(t, e, c, o ? [0, -n] : [-qa, n - qa])
+    }
+
+    function Oe(n, t, e, r) {
+        return function (u) {
+            var i, o = u.a, a = u.b, c = o.x, l = o.y, s = a.x, f = a.y, h = 0, g = 1, p = s - c, v = f - l;
+            if (i = n - c, p || !(i > 0)) {
+                if (i /= p, 0 > p) {
+                    if (h > i)return;
+                    g > i && (g = i)
+                } else if (p > 0) {
+                    if (i > g)return;
+                    i > h && (h = i)
+                }
+                if (i = e - c, p || !(0 > i)) {
+                    if (i /= p, 0 > p) {
+                        if (i > g)return;
+                        i > h && (h = i)
+                    } else if (p > 0) {
+                        if (h > i)return;
+                        g > i && (g = i)
+                    }
+                    if (i = t - l, v || !(i > 0)) {
+                        if (i /= v, 0 > v) {
+                            if (h > i)return;
+                            g > i && (g = i)
+                        } else if (v > 0) {
+                            if (i > g)return;
+                            i > h && (h = i)
+                        }
+                        if (i = r - l, v || !(0 > i)) {
+                            if (i /= v, 0 > v) {
+                                if (i > g)return;
+                                i > h && (h = i)
+                            } else if (v > 0) {
+                                if (h > i)return;
+                                g > i && (g = i)
+                            }
+                            return h > 0 && (u.a = {x: c + h * p, y: l + h * v}), 1 > g && (u.b = {
+                                x: c + g * p,
+                                y: l + g * v
+                            }), u
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    function Ie(n, t, e, r) {
+        function u(r, u) {
+            return ga(r[0] - n) < Ca ? u > 0 ? 0 : 3 : ga(r[0] - e) < Ca ? u > 0 ? 2 : 1 : ga(r[1] - t) < Ca ? u > 0 ? 1 : 0 : u > 0 ? 3 : 2
+        }
+
+        function i(n, t) {
+            return o(n.x, t.x)
+        }
+
+        function o(n, t) {
+            var e = u(n, 1), r = u(t, 1);
+            return e !== r ? e - r : 0 === e ? t[1] - n[1] : 1 === e ? n[0] - t[0] : 2 === e ? n[1] - t[1] : t[0] - n[0]
+        }
+
+        return function (a) {
+            function c(n) {
+                for (var t = 0, e = d.length, r = n[1], u = 0; e > u; ++u)for (var i, o = 1, a = d[u], c = a.length, l = a[0]; c > o; ++o)i = a[o], l[1] <= r ? i[1] > r && Q(l, i, n) > 0 && ++t : i[1] <= r && Q(l, i, n) < 0 && --t, l = i;
+                return 0 !== t
+            }
+
+            function l(i, a, c, l) {
+                var s = 0, f = 0;
+                if (null == i || (s = u(i, c)) !== (f = u(a, c)) || o(i, a) < 0 ^ c > 0) {
+                    do l.point(0 === s || 3 === s ? n : e, s > 1 ? r : t); while ((s = (s + c + 4) % 4) !== f)
+                } else l.point(a[0], a[1])
+            }
+
+            function s(u, i) {
+                return u >= n && e >= u && i >= t && r >= i
+            }
+
+            function f(n, t) {
+                s(n, t) && a.point(n, t)
+            }
+
+            function h() {
+                C.point = p, d && d.push(m = []), S = !0, w = !1, b = _ = 0 / 0
+            }
+
+            function g() {
+                v && (p(y, M), x && w && A.rejoin(), v.push(A.buffer())), C.point = f, w && a.lineEnd()
+            }
+
+            function p(n, t) {
+                n = Math.max(-Tc, Math.min(Tc, n)), t = Math.max(-Tc, Math.min(Tc, t));
+                var e = s(n, t);
+                if (d && m.push([n, t]), S)y = n, M = t, x = e, S = !1, e && (a.lineStart(), a.point(n, t)); else if (e && w)a.point(n, t); else {
+                    var r = {a: {x: b, y: _}, b: {x: n, y: t}};
+                    N(r) ? (w || (a.lineStart(), a.point(r.a.x, r.a.y)), a.point(r.b.x, r.b.y), e || a.lineEnd(), k = !1) : e && (a.lineStart(), a.point(n, t), k = !1)
+                }
+                b = n, _ = t, w = e
+            }
+
+            var v, d, m, y, M, x, b, _, w, S, k, E = a, A = Re(), N = Oe(n, t, e, r), C = {
+                point: f,
+                lineStart: h,
+                lineEnd: g,
+                polygonStart: function () {
+                    a = A, v = [], d = [], k = !0
+                },
+                polygonEnd: function () {
+                    a = E, v = ta.merge(v);
+                    var t = c([n, r]), e = k && t, u = v.length;
+                    (e || u) && (a.polygonStart(), e && (a.lineStart(), l(null, null, 1, a), a.lineEnd()), u && Ce(v, i, t, l, a), a.polygonEnd()), v = d = m = null
+                }
+            };
+            return C
+        }
+    }
+
+    function Ye(n) {
+        var t = 0, e = qa / 3, r = ir(n), u = r(t, e);
+        return u.parallels = function (n) {
+            return arguments.length ? r(t = n[0] * qa / 180, e = n[1] * qa / 180) : [t / qa * 180, e / qa * 180]
+        }, u
+    }
+
+    function Ze(n, t) {
+        function e(n, t) {
+            var e = Math.sqrt(i - 2 * u * Math.sin(t)) / u;
+            return [e * Math.sin(n *= u), o - e * Math.cos(n)]
+        }
+
+        var r = Math.sin(n), u = (r + Math.sin(t)) / 2, i = 1 + r * (2 * u - r), o = Math.sqrt(i) / u;
+        return e.invert = function (n, t) {
+            var e = o - t;
+            return [Math.atan2(n, e) / u, tt((i - (n * n + e * e) * u * u) / (2 * u))]
+        }, e
+    }
+
+    function Ve() {
+        function n(n, t) {
+            Dc += u * n - r * t, r = n, u = t
+        }
+
+        var t, e, r, u;
+        Hc.point = function (i, o) {
+            Hc.point = n, t = r = i, e = u = o
+        }, Hc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Xe(n, t) {
+        Pc > n && (Pc = n), n > jc && (jc = n), Uc > t && (Uc = t), t > Fc && (Fc = t)
+    }
+
+    function $e() {
+        function n(n, t) {
+            o.push("M", n, ",", t, i)
+        }
+
+        function t(n, t) {
+            o.push("M", n, ",", t), a.point = e
+        }
+
+        function e(n, t) {
+            o.push("L", n, ",", t)
+        }
+
+        function r() {
+            a.point = n
+        }
+
+        function u() {
+            o.push("Z")
+        }
+
+        var i = Be(4.5), o = [], a = {
+            point: n, lineStart: function () {
+                a.point = t
+            }, lineEnd: r, polygonStart: function () {
+                a.lineEnd = u
+            }, polygonEnd: function () {
+                a.lineEnd = r, a.point = n
+            }, pointRadius: function (n) {
+                return i = Be(n), a
+            }, result: function () {
+                if (o.length) {
+                    var n = o.join("");
+                    return o = [], n
+                }
+            }
+        };
+        return a
+    }
+
+    function Be(n) {
+        return "m0," + n + "a" + n + "," + n + " 0 1,1 0," + -2 * n + "a" + n + "," + n + " 0 1,1 0," + 2 * n + "z"
+    }
+
+    function We(n, t) {
+        _c += n, wc += t, ++Sc
+    }
+
+    function Je() {
+        function n(n, r) {
+            var u = n - t, i = r - e, o = Math.sqrt(u * u + i * i);
+            kc += o * (t + n) / 2, Ec += o * (e + r) / 2, Ac += o, We(t = n, e = r)
+        }
+
+        var t, e;
+        Ic.point = function (r, u) {
+            Ic.point = n, We(t = r, e = u)
+        }
+    }
+
+    function Ge() {
+        Ic.point = We
+    }
+
+    function Ke() {
+        function n(n, t) {
+            var e = n - r, i = t - u, o = Math.sqrt(e * e + i * i);
+            kc += o * (r + n) / 2, Ec += o * (u + t) / 2, Ac += o, o = u * n - r * t, Nc += o * (r + n), Cc += o * (u + t), zc += 3 * o, We(r = n, u = t)
+        }
+
+        var t, e, r, u;
+        Ic.point = function (i, o) {
+            Ic.point = n, We(t = r = i, e = u = o)
+        }, Ic.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Qe(n) {
+        function t(t, e) {
+            n.moveTo(t + o, e), n.arc(t, e, o, 0, La)
+        }
+
+        function e(t, e) {
+            n.moveTo(t, e), a.point = r
+        }
+
+        function r(t, e) {
+            n.lineTo(t, e)
+        }
+
+        function u() {
+            a.point = t
+        }
+
+        function i() {
+            n.closePath()
+        }
+
+        var o = 4.5, a = {
+            point: t, lineStart: function () {
+                a.point = e
+            }, lineEnd: u, polygonStart: function () {
+                a.lineEnd = i
+            }, polygonEnd: function () {
+                a.lineEnd = u, a.point = t
+            }, pointRadius: function (n) {
+                return o = n, a
+            }, result: b
+        };
+        return a
+    }
+
+    function nr(n) {
+        function t(n) {
+            return (a ? r : e)(n)
+        }
+
+        function e(t) {
+            return rr(t, function (e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            })
+        }
+
+        function r(t) {
+            function e(e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            }
+
+            function r() {
+                M = 0 / 0, S.point = i, t.lineStart()
+            }
+
+            function i(e, r) {
+                var i = pe([e, r]), o = n(e, r);
+                u(M, x, y, b, _, w, M = o[0], x = o[1], y = e, b = i[0], _ = i[1], w = i[2], a, t), t.point(M, x)
+            }
+
+            function o() {
+                S.point = e, t.lineEnd()
+            }
+
+            function c() {
+                r(), S.point = l, S.lineEnd = s
+            }
+
+            function l(n, t) {
+                i(f = n, h = t), g = M, p = x, v = b, d = _, m = w, S.point = i
+            }
+
+            function s() {
+                u(M, x, y, b, _, w, g, p, f, v, d, m, a, t), S.lineEnd = o, o()
+            }
+
+            var f, h, g, p, v, d, m, y, M, x, b, _, w, S = {
+                point: e, lineStart: r, lineEnd: o, polygonStart: function () {
+                    t.polygonStart(), S.lineStart = c
+                }, polygonEnd: function () {
+                    t.polygonEnd(), S.lineStart = r
+                }
+            };
+            return S
+        }
+
+        function u(t, e, r, a, c, l, s, f, h, g, p, v, d, m) {
+            var y = s - t, M = f - e, x = y * y + M * M;
+            if (x > 4 * i && d--) {
+                var b = a + g, _ = c + p, w = l + v, S = Math.sqrt(b * b + _ * _ + w * w), k = Math.asin(w /= S), E = ga(ga(w) - 1) < Ca || ga(r - h) < Ca ? (r + h) / 2 : Math.atan2(_, b), A = n(E, k), N = A[0], C = A[1], z = N - t, q = C - e, L = M * z - y * q;
+                (L * L / x > i || ga((y * z + M * q) / x - .5) > .3 || o > a * g + c * p + l * v) && (u(t, e, r, a, c, l, N, C, E, b /= S, _ /= S, w, d, m), m.point(N, C), u(N, C, E, b, _, w, s, f, h, g, p, v, d, m))
+            }
+        }
+
+        var i = .5, o = Math.cos(30 * Da), a = 16;
+        return t.precision = function (n) {
+            return arguments.length ? (a = (i = n * n) > 0 && 16, t) : Math.sqrt(i)
+        }, t
+    }
+
+    function tr(n) {
+        var t = nr(function (t, e) {
+            return n([t * Pa, e * Pa])
+        });
+        return function (n) {
+            return or(t(n))
+        }
+    }
+
+    function er(n) {
+        this.stream = n
+    }
+
+    function rr(n, t) {
+        return {
+            point: t, sphere: function () {
+                n.sphere()
+            }, lineStart: function () {
+                n.lineStart()
+            }, lineEnd: function () {
+                n.lineEnd()
+            }, polygonStart: function () {
+                n.polygonStart()
+            }, polygonEnd: function () {
+                n.polygonEnd()
+            }
+        }
+    }
+
+    function ur(n) {
+        return ir(function () {
+            return n
+        })()
+    }
+
+    function ir(n) {
+        function t(n) {
+            return n = a(n[0] * Da, n[1] * Da), [n[0] * h + c, l - n[1] * h]
+        }
+
+        function e(n) {
+            return n = a.invert((n[0] - c) / h, (l - n[1]) / h), n && [n[0] * Pa, n[1] * Pa]
+        }
+
+        function r() {
+            a = Ae(o = lr(m, M, x), i);
+            var n = i(v, d);
+            return c = g - n[0] * h, l = p + n[1] * h, u()
+        }
+
+        function u() {
+            return s && (s.valid = !1, s = null), t
+        }
+
+        var i, o, a, c, l, s, f = nr(function (n, t) {
+            return n = i(n, t), [n[0] * h + c, l - n[1] * h]
+        }), h = 150, g = 480, p = 250, v = 0, d = 0, m = 0, M = 0, x = 0, b = Lc, _ = y, w = null, S = null;
+        return t.stream = function (n) {
+            return s && (s.valid = !1), s = or(b(o, f(_(n)))), s.valid = !0, s
+        }, t.clipAngle = function (n) {
+            return arguments.length ? (b = null == n ? (w = n, Lc) : He((w = +n) * Da), u()) : w
+        }, t.clipExtent = function (n) {
+            return arguments.length ? (S = n, _ = n ? Ie(n[0][0], n[0][1], n[1][0], n[1][1]) : y, u()) : S
+        }, t.scale = function (n) {
+            return arguments.length ? (h = +n, r()) : h
+        }, t.translate = function (n) {
+            return arguments.length ? (g = +n[0], p = +n[1], r()) : [g, p]
+        }, t.center = function (n) {
+            return arguments.length ? (v = n[0] % 360 * Da, d = n[1] % 360 * Da, r()) : [v * Pa, d * Pa]
+        }, t.rotate = function (n) {
+            return arguments.length ? (m = n[0] % 360 * Da, M = n[1] % 360 * Da, x = n.length > 2 ? n[2] % 360 * Da : 0, r()) : [m * Pa, M * Pa, x * Pa]
+        }, ta.rebind(t, f, "precision"), function () {
+            return i = n.apply(this, arguments), t.invert = i.invert && e, r()
+        }
+    }
+
+    function or(n) {
+        return rr(n, function (t, e) {
+            n.point(t * Da, e * Da)
+        })
+    }
+
+    function ar(n, t) {
+        return [n, t]
+    }
+
+    function cr(n, t) {
+        return [n > qa ? n - La : -qa > n ? n + La : n, t]
+    }
+
+    function lr(n, t, e) {
+        return n ? t || e ? Ae(fr(n), hr(t, e)) : fr(n) : t || e ? hr(t, e) : cr
+    }
+
+    function sr(n) {
+        return function (t, e) {
+            return t += n, [t > qa ? t - La : -qa > t ? t + La : t, e]
+        }
+    }
+
+    function fr(n) {
+        var t = sr(n);
+        return t.invert = sr(-n), t
+    }
+
+    function hr(n, t) {
+        function e(n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * r + a * u;
+            return [Math.atan2(c * i - s * o, a * r - l * u), tt(s * i + c * o)]
+        }
+
+        var r = Math.cos(n), u = Math.sin(n), i = Math.cos(t), o = Math.sin(t);
+        return e.invert = function (n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * i - c * o;
+            return [Math.atan2(c * i + l * o, a * r + s * u), tt(s * r - a * u)]
+        }, e
+    }
+
+    function gr(n, t) {
+        var e = Math.cos(n), r = Math.sin(n);
+        return function (u, i, o, a) {
+            var c = o * t;
+            null != u ? (u = pr(e, u), i = pr(e, i), (o > 0 ? i > u : u > i) && (u += o * La)) : (u = n + o * La, i = n - .5 * c);
+            for (var l, s = u; o > 0 ? s > i : i > s; s -= c)a.point((l = xe([e, -r * Math.cos(s), -r * Math.sin(s)]))[0], l[1])
+        }
+    }
+
+    function pr(n, t) {
+        var e = pe(t);
+        e[0] -= n, Me(e);
+        var r = nt(-e[1]);
+        return ((-e[2] < 0 ? -r : r) + 2 * Math.PI - Ca) % (2 * Math.PI)
+    }
+
+    function vr(n, t, e) {
+        var r = ta.range(n, t - Ca, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [n, t]
+            })
+        }
+    }
+
+    function dr(n, t, e) {
+        var r = ta.range(n, t - Ca, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [t, n]
+            })
+        }
+    }
+
+    function mr(n) {
+        return n.source
+    }
+
+    function yr(n) {
+        return n.target
+    }
+
+    function Mr(n, t, e, r) {
+        var u = Math.cos(t), i = Math.sin(t), o = Math.cos(r), a = Math.sin(r), c = u * Math.cos(n), l = u * Math.sin(n), s = o * Math.cos(e), f = o * Math.sin(e), h = 2 * Math.asin(Math.sqrt(it(r - t) + u * o * it(e - n))), g = 1 / Math.sin(h), p = h ? function (n) {
+            var t = Math.sin(n *= h) * g, e = Math.sin(h - n) * g, r = e * c + t * s, u = e * l + t * f, o = e * i + t * a;
+            return [Math.atan2(u, r) * Pa, Math.atan2(o, Math.sqrt(r * r + u * u)) * Pa]
+        } : function () {
+            return [n * Pa, t * Pa]
+        };
+        return p.distance = h, p
+    }
+
+    function xr() {
+        function n(n, u) {
+            var i = Math.sin(u *= Da), o = Math.cos(u), a = ga((n *= Da) - t), c = Math.cos(a);
+            Yc += Math.atan2(Math.sqrt((a = o * Math.sin(a)) * a + (a = r * i - e * o * c) * a), e * i + r * o * c), t = n, e = i, r = o
+        }
+
+        var t, e, r;
+        Zc.point = function (u, i) {
+            t = u * Da, e = Math.sin(i *= Da), r = Math.cos(i), Zc.point = n
+        }, Zc.lineEnd = function () {
+            Zc.point = Zc.lineEnd = b
+        }
+    }
+
+    function br(n, t) {
+        function e(t, e) {
+            var r = Math.cos(t), u = Math.cos(e), i = n(r * u);
+            return [i * u * Math.sin(t), i * Math.sin(e)]
+        }
+
+        return e.invert = function (n, e) {
+            var r = Math.sqrt(n * n + e * e), u = t(r), i = Math.sin(u), o = Math.cos(u);
+            return [Math.atan2(n * i, r * o), Math.asin(r && e * i / r)]
+        }, e
+    }
+
+    function _r(n, t) {
+        function e(n, t) {
+            o > 0 ? -Ra + Ca > t && (t = -Ra + Ca) : t > Ra - Ca && (t = Ra - Ca);
+            var e = o / Math.pow(u(t), i);
+            return [e * Math.sin(i * n), o - e * Math.cos(i * n)]
+        }
+
+        var r = Math.cos(n), u = function (n) {
+            return Math.tan(qa / 4 + n / 2)
+        }, i = n === t ? Math.sin(n) : Math.log(r / Math.cos(t)) / Math.log(u(t) / u(n)), o = r * Math.pow(u(n), i) / i;
+        return i ? (e.invert = function (n, t) {
+            var e = o - t, r = K(i) * Math.sqrt(n * n + e * e);
+            return [Math.atan2(n, e) / i, 2 * Math.atan(Math.pow(o / r, 1 / i)) - Ra]
+        }, e) : Sr
+    }
+
+    function wr(n, t) {
+        function e(n, t) {
+            var e = i - t;
+            return [e * Math.sin(u * n), i - e * Math.cos(u * n)]
+        }
+
+        var r = Math.cos(n), u = n === t ? Math.sin(n) : (r - Math.cos(t)) / (t - n), i = r / u + n;
+        return ga(u) < Ca ? ar : (e.invert = function (n, t) {
+            var e = i - t;
+            return [Math.atan2(n, e) / u, i - K(u) * Math.sqrt(n * n + e * e)]
+        }, e)
+    }
+
+    function Sr(n, t) {
+        return [n, Math.log(Math.tan(qa / 4 + t / 2))]
+    }
+
+    function kr(n) {
+        var t, e = ur(n), r = e.scale, u = e.translate, i = e.clipExtent;
+        return e.scale = function () {
+            var n = r.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.translate = function () {
+            var n = u.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.clipExtent = function (n) {
+            var o = i.apply(e, arguments);
+            if (o === e) {
+                if (t = null == n) {
+                    var a = qa * r(), c = u();
+                    i([[c[0] - a, c[1] - a], [c[0] + a, c[1] + a]])
+                }
+            } else t && (o = null);
+            return o
+        }, e.clipExtent(null)
+    }
+
+    function Er(n, t) {
+        return [Math.log(Math.tan(qa / 4 + t / 2)), -n]
+    }
+
+    function Ar(n) {
+        return n[0]
+    }
+
+    function Nr(n) {
+        return n[1]
+    }
+
+    function Cr(n) {
+        for (var t = n.length, e = [0, 1], r = 2, u = 2; t > u; u++) {
+            for (; r > 1 && Q(n[e[r - 2]], n[e[r - 1]], n[u]) <= 0;)--r;
+            e[r++] = u
+        }
+        return e.slice(0, r)
+    }
+
+    function zr(n, t) {
+        return n[0] - t[0] || n[1] - t[1]
+    }
+
+    function qr(n, t, e) {
+        return (e[0] - t[0]) * (n[1] - t[1]) < (e[1] - t[1]) * (n[0] - t[0])
+    }
+
+    function Lr(n, t, e, r) {
+        var u = n[0], i = e[0], o = t[0] - u, a = r[0] - i, c = n[1], l = e[1], s = t[1] - c, f = r[1] - l, h = (a * (c - l) - f * (u - i)) / (f * o - a * s);
+        return [u + h * o, c + h * s]
+    }
+
+    function Tr(n) {
+        var t = n[0], e = n[n.length - 1];
+        return !(t[0] - e[0] || t[1] - e[1])
+    }
+
+    function Rr() {
+        tu(this), this.edge = this.site = this.circle = null
+    }
+
+    function Dr(n) {
+        var t = el.pop() || new Rr;
+        return t.site = n, t
+    }
+
+    function Pr(n) {
+        Xr(n), Qc.remove(n), el.push(n), tu(n)
+    }
+
+    function Ur(n) {
+        var t = n.circle, e = t.x, r = t.cy, u = {x: e, y: r}, i = n.P, o = n.N, a = [n];
+        Pr(n);
+        for (var c = i; c.circle && ga(e - c.circle.x) < Ca && ga(r - c.circle.cy) < Ca;)i = c.P, a.unshift(c), Pr(c), c = i;
+        a.unshift(c), Xr(c);
+        for (var l = o; l.circle && ga(e - l.circle.x) < Ca && ga(r - l.circle.cy) < Ca;)o = l.N, a.push(l), Pr(l), l = o;
+        a.push(l), Xr(l);
+        var s, f = a.length;
+        for (s = 1; f > s; ++s)l = a[s], c = a[s - 1], Kr(l.edge, c.site, l.site, u);
+        c = a[0], l = a[f - 1], l.edge = Jr(c.site, l.site, null, u), Vr(c), Vr(l)
+    }
+
+    function jr(n) {
+        for (var t, e, r, u, i = n.x, o = n.y, a = Qc._; a;)if (r = Fr(a, o) - i, r > Ca)a = a.L; else {
+            if (u = i - Hr(a, o), !(u > Ca)) {
+                r > -Ca ? (t = a.P, e = a) : u > -Ca ? (t = a, e = a.N) : t = e = a;
+                break
+            }
+            if (!a.R) {
+                t = a;
+                break
+            }
+            a = a.R
+        }
+        var c = Dr(n);
+        if (Qc.insert(t, c), t || e) {
+            if (t === e)return Xr(t), e = Dr(t.site), Qc.insert(c, e), c.edge = e.edge = Jr(t.site, c.site), Vr(t), void Vr(e);
+            if (!e)return void(c.edge = Jr(t.site, c.site));
+            Xr(t), Xr(e);
+            var l = t.site, s = l.x, f = l.y, h = n.x - s, g = n.y - f, p = e.site, v = p.x - s, d = p.y - f, m = 2 * (h * d - g * v), y = h * h + g * g, M = v * v + d * d, x = {
+                x: (d * y - g * M) / m + s,
+                y: (h * M - v * y) / m + f
+            };
+            Kr(e.edge, l, p, x), c.edge = Jr(l, n, null, x), e.edge = Jr(n, p, null, x), Vr(t), Vr(e)
+        }
+    }
+
+    function Fr(n, t) {
+        var e = n.site, r = e.x, u = e.y, i = u - t;
+        if (!i)return r;
+        var o = n.P;
+        if (!o)return -1 / 0;
+        e = o.site;
+        var a = e.x, c = e.y, l = c - t;
+        if (!l)return a;
+        var s = a - r, f = 1 / i - 1 / l, h = s / l;
+        return f ? (-h + Math.sqrt(h * h - 2 * f * (s * s / (-2 * l) - c + l / 2 + u - i / 2))) / f + r : (r + a) / 2
+    }
+
+    function Hr(n, t) {
+        var e = n.N;
+        if (e)return Fr(e, t);
+        var r = n.site;
+        return r.y === t ? r.x : 1 / 0
+    }
+
+    function Or(n) {
+        this.site = n, this.edges = []
+    }
+
+    function Ir(n) {
+        for (var t, e, r, u, i, o, a, c, l, s, f = n[0][0], h = n[1][0], g = n[0][1], p = n[1][1], v = Kc, d = v.length; d--;)if (i = v[d], i && i.prepare())for (a = i.edges, c = a.length, o = 0; c > o;)s = a[o].end(), r = s.x, u = s.y, l = a[++o % c].start(), t = l.x, e = l.y, (ga(r - t) > Ca || ga(u - e) > Ca) && (a.splice(o, 0, new Qr(Gr(i.site, s, ga(r - f) < Ca && p - u > Ca ? {
+            x: f,
+            y: ga(t - f) < Ca ? e : p
+        } : ga(u - p) < Ca && h - r > Ca ? {x: ga(e - p) < Ca ? t : h, y: p} : ga(r - h) < Ca && u - g > Ca ? {
+            x: h,
+            y: ga(t - h) < Ca ? e : g
+        } : ga(u - g) < Ca && r - f > Ca ? {x: ga(e - g) < Ca ? t : f, y: g} : null), i.site, null)), ++c)
+    }
+
+    function Yr(n, t) {
+        return t.angle - n.angle
+    }
+
+    function Zr() {
+        tu(this), this.x = this.y = this.arc = this.site = this.cy = null
+    }
+
+    function Vr(n) {
+        var t = n.P, e = n.N;
+        if (t && e) {
+            var r = t.site, u = n.site, i = e.site;
+            if (r !== i) {
+                var o = u.x, a = u.y, c = r.x - o, l = r.y - a, s = i.x - o, f = i.y - a, h = 2 * (c * f - l * s);
+                if (!(h >= -za)) {
+                    var g = c * c + l * l, p = s * s + f * f, v = (f * g - l * p) / h, d = (c * p - s * g) / h, f = d + a, m = rl.pop() || new Zr;
+                    m.arc = n, m.site = u, m.x = v + o, m.y = f + Math.sqrt(v * v + d * d), m.cy = f, n.circle = m;
+                    for (var y = null, M = tl._; M;)if (m.y < M.y || m.y === M.y && m.x <= M.x) {
+                        if (!M.L) {
+                            y = M.P;
+                            break
+                        }
+                        M = M.L
+                    } else {
+                        if (!M.R) {
+                            y = M;
+                            break
+                        }
+                        M = M.R
+                    }
+                    tl.insert(y, m), y || (nl = m)
+                }
+            }
+        }
+    }
+
+    function Xr(n) {
+        var t = n.circle;
+        t && (t.P || (nl = t.N), tl.remove(t), rl.push(t), tu(t), n.circle = null)
+    }
+
+    function $r(n) {
+        for (var t, e = Gc, r = Oe(n[0][0], n[0][1], n[1][0], n[1][1]), u = e.length; u--;)t = e[u], (!Br(t, n) || !r(t) || ga(t.a.x - t.b.x) < Ca && ga(t.a.y - t.b.y) < Ca) && (t.a = t.b = null, e.splice(u, 1))
+    }
+
+    function Br(n, t) {
+        var e = n.b;
+        if (e)return !0;
+        var r, u, i = n.a, o = t[0][0], a = t[1][0], c = t[0][1], l = t[1][1], s = n.l, f = n.r, h = s.x, g = s.y, p = f.x, v = f.y, d = (h + p) / 2, m = (g + v) / 2;
+        if (v === g) {
+            if (o > d || d >= a)return;
+            if (h > p) {
+                if (i) {
+                    if (i.y >= l)return
+                } else i = {x: d, y: c};
+                e = {x: d, y: l}
+            } else {
+                if (i) {
+                    if (i.y < c)return
+                } else i = {x: d, y: l};
+                e = {x: d, y: c}
+            }
+        } else if (r = (h - p) / (v - g), u = m - r * d, -1 > r || r > 1)if (h > p) {
+            if (i) {
+                if (i.y >= l)return
+            } else i = {x: (c - u) / r, y: c};
+            e = {x: (l - u) / r, y: l}
+        } else {
+            if (i) {
+                if (i.y < c)return
+            } else i = {x: (l - u) / r, y: l};
+            e = {x: (c - u) / r, y: c}
+        } else if (v > g) {
+            if (i) {
+                if (i.x >= a)return
+            } else i = {x: o, y: r * o + u};
+            e = {x: a, y: r * a + u}
+        } else {
+            if (i) {
+                if (i.x < o)return
+            } else i = {x: a, y: r * a + u};
+            e = {x: o, y: r * o + u}
+        }
+        return n.a = i, n.b = e, !0
+    }
+
+    function Wr(n, t) {
+        this.l = n, this.r = t, this.a = this.b = null
+    }
+
+    function Jr(n, t, e, r) {
+        var u = new Wr(n, t);
+        return Gc.push(u), e && Kr(u, n, t, e), r && Kr(u, t, n, r), Kc[n.i].edges.push(new Qr(u, n, t)), Kc[t.i].edges.push(new Qr(u, t, n)), u
+    }
+
+    function Gr(n, t, e) {
+        var r = new Wr(n, null);
+        return r.a = t, r.b = e, Gc.push(r), r
+    }
+
+    function Kr(n, t, e, r) {
+        n.a || n.b ? n.l === e ? n.b = r : n.a = r : (n.a = r, n.l = t, n.r = e)
+    }
+
+    function Qr(n, t, e) {
+        var r = n.a, u = n.b;
+        this.edge = n, this.site = t, this.angle = e ? Math.atan2(e.y - t.y, e.x - t.x) : n.l === t ? Math.atan2(u.x - r.x, r.y - u.y) : Math.atan2(r.x - u.x, u.y - r.y)
+    }
+
+    function nu() {
+        this._ = null
+    }
+
+    function tu(n) {
+        n.U = n.C = n.L = n.R = n.P = n.N = null
+    }
+
+    function eu(n, t) {
+        var e = t, r = t.R, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.R = r.L, e.R && (e.R.U = e), r.L = e
+    }
+
+    function ru(n, t) {
+        var e = t, r = t.L, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.L = r.R, e.L && (e.L.U = e), r.R = e
+    }
+
+    function uu(n) {
+        for (; n.L;)n = n.L;
+        return n
+    }
+
+    function iu(n, t) {
+        var e, r, u, i = n.sort(ou).pop();
+        for (Gc = [], Kc = new Array(n.length), Qc = new nu, tl = new nu; ;)if (u = nl, i && (!u || i.y < u.y || i.y === u.y && i.x < u.x))(i.x !== e || i.y !== r) && (Kc[i.i] = new Or(i), jr(i), e = i.x, r = i.y), i = n.pop(); else {
+            if (!u)break;
+            Ur(u.arc)
+        }
+        t && ($r(t), Ir(t));
+        var o = {cells: Kc, edges: Gc};
+        return Qc = tl = Gc = Kc = null, o
+    }
+
+    function ou(n, t) {
+        return t.y - n.y || t.x - n.x
+    }
+
+    function au(n, t, e) {
+        return (n.x - e.x) * (t.y - n.y) - (n.x - t.x) * (e.y - n.y)
+    }
+
+    function cu(n) {
+        return n.x
+    }
+
+    function lu(n) {
+        return n.y
+    }
+
+    function su() {
+        return {leaf: !0, nodes: [], point: null, x: null, y: null}
+    }
+
+    function fu(n, t, e, r, u, i) {
+        if (!n(t, e, r, u, i)) {
+            var o = .5 * (e + u), a = .5 * (r + i), c = t.nodes;
+            c[0] && fu(n, c[0], e, r, o, a), c[1] && fu(n, c[1], o, r, u, a), c[2] && fu(n, c[2], e, a, o, i), c[3] && fu(n, c[3], o, a, u, i)
+        }
+    }
+
+    function hu(n, t, e, r, u, i, o) {
+        var a, c = 1 / 0;
+        return function l(n, s, f, h, g) {
+            if (!(s > i || f > o || r > h || u > g)) {
+                if (p = n.point) {
+                    var p, v = t - n.x, d = e - n.y, m = v * v + d * d;
+                    if (c > m) {
+                        var y = Math.sqrt(c = m);
+                        r = t - y, u = e - y, i = t + y, o = e + y, a = p
+                    }
+                }
+                for (var M = n.nodes, x = .5 * (s + h), b = .5 * (f + g), _ = t >= x, w = e >= b, S = w << 1 | _, k = S + 4; k > S; ++S)if (n = M[3 & S])switch (3 & S) {
+                    case 0:
+                        l(n, s, f, x, b);
+                        break;
+                    case 1:
+                        l(n, x, f, h, b);
+                        break;
+                    case 2:
+                        l(n, s, b, x, g);
+                        break;
+                    case 3:
+                        l(n, x, b, h, g)
+                }
+            }
+        }(n, r, u, i, o), a
+    }
+
+    function gu(n, t) {
+        n = ta.rgb(n), t = ta.rgb(t);
+        var e = n.r, r = n.g, u = n.b, i = t.r - e, o = t.g - r, a = t.b - u;
+        return function (n) {
+            return "#" + xt(Math.round(e + i * n)) + xt(Math.round(r + o * n)) + xt(Math.round(u + a * n))
+        }
+    }
+
+    function pu(n, t) {
+        var e, r = {}, u = {};
+        for (e in n)e in t ? r[e] = mu(n[e], t[e]) : u[e] = n[e];
+        for (e in t)e in n || (u[e] = t[e]);
+        return function (n) {
+            for (e in r)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function vu(n, t) {
+        return n = +n, t = +t, function (e) {
+            return n * (1 - e) + t * e
+        }
+    }
+
+    function du(n, t) {
+        var e, r, u, i = il.lastIndex = ol.lastIndex = 0, o = -1, a = [], c = [];
+        for (n += "", t += ""; (e = il.exec(n)) && (r = ol.exec(t));)(u = r.index) > i && (u = t.slice(i, u), a[o] ? a[o] += u : a[++o] = u), (e = e[0]) === (r = r[0]) ? a[o] ? a[o] += r : a[++o] = r : (a[++o] = null, c.push({
+            i: o,
+            x: vu(e, r)
+        })), i = ol.lastIndex;
+        return i < t.length && (u = t.slice(i), a[o] ? a[o] += u : a[++o] = u), a.length < 2 ? c[0] ? (t = c[0].x, function (n) {
+            return t(n) + ""
+        }) : function () {
+            return t
+        } : (t = c.length, function (n) {
+            for (var e, r = 0; t > r; ++r)a[(e = c[r]).i] = e.x(n);
+            return a.join("")
+        })
+    }
+
+    function mu(n, t) {
+        for (var e, r = ta.interpolators.length; --r >= 0 && !(e = ta.interpolators[r](n, t)););
+        return e
+    }
+
+    function yu(n, t) {
+        var e, r = [], u = [], i = n.length, o = t.length, a = Math.min(n.length, t.length);
+        for (e = 0; a > e; ++e)r.push(mu(n[e], t[e]));
+        for (; i > e; ++e)u[e] = n[e];
+        for (; o > e; ++e)u[e] = t[e];
+        return function (n) {
+            for (e = 0; a > e; ++e)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function Mu(n) {
+        return function (t) {
+            return 0 >= t ? 0 : t >= 1 ? 1 : n(t)
+        }
+    }
+
+    function xu(n) {
+        return function (t) {
+            return 1 - n(1 - t)
+        }
+    }
+
+    function bu(n) {
+        return function (t) {
+            return .5 * (.5 > t ? n(2 * t) : 2 - n(2 - 2 * t))
+        }
+    }
+
+    function _u(n) {
+        return n * n
+    }
+
+    function wu(n) {
+        return n * n * n
+    }
+
+    function Su(n) {
+        if (0 >= n)return 0;
+        if (n >= 1)return 1;
+        var t = n * n, e = t * n;
+        return 4 * (.5 > n ? e : 3 * (n - t) + e - .75)
+    }
+
+    function ku(n) {
+        return function (t) {
+            return Math.pow(t, n)
+        }
+    }
+
+    function Eu(n) {
+        return 1 - Math.cos(n * Ra)
+    }
+
+    function Au(n) {
+        return Math.pow(2, 10 * (n - 1))
+    }
+
+    function Nu(n) {
+        return 1 - Math.sqrt(1 - n * n)
+    }
+
+    function Cu(n, t) {
+        var e;
+        return arguments.length < 2 && (t = .45), arguments.length ? e = t / La * Math.asin(1 / n) : (n = 1, e = t / 4), function (r) {
+            return 1 + n * Math.pow(2, -10 * r) * Math.sin((r - e) * La / t)
+        }
+    }
+
+    function zu(n) {
+        return n || (n = 1.70158), function (t) {
+            return t * t * ((n + 1) * t - n)
+        }
+    }
+
+    function qu(n) {
+        return 1 / 2.75 > n ? 7.5625 * n * n : 2 / 2.75 > n ? 7.5625 * (n -= 1.5 / 2.75) * n + .75 : 2.5 / 2.75 > n ? 7.5625 * (n -= 2.25 / 2.75) * n + .9375 : 7.5625 * (n -= 2.625 / 2.75) * n + .984375
+    }
+
+    function Lu(n, t) {
+        n = ta.hcl(n), t = ta.hcl(t);
+        var e = n.h, r = n.c, u = n.l, i = t.h - e, o = t.c - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.c : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return st(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Tu(n, t) {
+        n = ta.hsl(n), t = ta.hsl(t);
+        var e = n.h, r = n.s, u = n.l, i = t.h - e, o = t.s - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.s : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return ct(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Ru(n, t) {
+        n = ta.lab(n), t = ta.lab(t);
+        var e = n.l, r = n.a, u = n.b, i = t.l - e, o = t.a - r, a = t.b - u;
+        return function (n) {
+            return ht(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Du(n, t) {
+        return t -= n, function (e) {
+            return Math.round(n + t * e)
+        }
+    }
+
+    function Pu(n) {
+        var t = [n.a, n.b], e = [n.c, n.d], r = ju(t), u = Uu(t, e), i = ju(Fu(e, t, -u)) || 0;
+        t[0] * e[1] < e[0] * t[1] && (t[0] *= -1, t[1] *= -1, r *= -1, u *= -1), this.rotate = (r ? Math.atan2(t[1], t[0]) : Math.atan2(-e[0], e[1])) * Pa, this.translate = [n.e, n.f], this.scale = [r, i], this.skew = i ? Math.atan2(u, i) * Pa : 0
+    }
+
+    function Uu(n, t) {
+        return n[0] * t[0] + n[1] * t[1]
+    }
+
+    function ju(n) {
+        var t = Math.sqrt(Uu(n, n));
+        return t && (n[0] /= t, n[1] /= t), t
+    }
+
+    function Fu(n, t, e) {
+        return n[0] += e * t[0], n[1] += e * t[1], n
+    }
+
+    function Hu(n, t) {
+        var e, r = [], u = [], i = ta.transform(n), o = ta.transform(t), a = i.translate, c = o.translate, l = i.rotate, s = o.rotate, f = i.skew, h = o.skew, g = i.scale, p = o.scale;
+        return a[0] != c[0] || a[1] != c[1] ? (r.push("translate(", null, ",", null, ")"), u.push({
+            i: 1,
+            x: vu(a[0], c[0])
+        }, {
+            i: 3,
+            x: vu(a[1], c[1])
+        })) : r.push(c[0] || c[1] ? "translate(" + c + ")" : ""), l != s ? (l - s > 180 ? s += 360 : s - l > 180 && (l += 360), u.push({
+            i: r.push(r.pop() + "rotate(", null, ")") - 2,
+            x: vu(l, s)
+        })) : s && r.push(r.pop() + "rotate(" + s + ")"), f != h ? u.push({
+            i: r.push(r.pop() + "skewX(", null, ")") - 2,
+            x: vu(f, h)
+        }) : h && r.push(r.pop() + "skewX(" + h + ")"), g[0] != p[0] || g[1] != p[1] ? (e = r.push(r.pop() + "scale(", null, ",", null, ")"), u.push({
+            i: e - 4,
+            x: vu(g[0], p[0])
+        }, {
+            i: e - 2,
+            x: vu(g[1], p[1])
+        })) : (1 != p[0] || 1 != p[1]) && r.push(r.pop() + "scale(" + p + ")"), e = u.length, function (n) {
+            for (var t, i = -1; ++i < e;)r[(t = u[i]).i] = t.x(n);
+            return r.join("")
+        }
+    }
+
+    function Ou(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return (e - n) / t
+        }
+    }
+
+    function Iu(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return Math.max(0, Math.min(1, (e - n) / t))
+        }
+    }
+
+    function Yu(n) {
+        for (var t = n.source, e = n.target, r = Vu(t, e), u = [t]; t !== r;)t = t.parent, u.push(t);
+        for (var i = u.length; e !== r;)u.splice(i, 0, e), e = e.parent;
+        return u
+    }
+
+    function Zu(n) {
+        for (var t = [], e = n.parent; null != e;)t.push(n), n = e, e = e.parent;
+        return t.push(n), t
+    }
+
+    function Vu(n, t) {
+        if (n === t)return n;
+        for (var e = Zu(n), r = Zu(t), u = e.pop(), i = r.pop(), o = null; u === i;)o = u, u = e.pop(), i = r.pop();
+        return o
+    }
+
+    function Xu(n) {
+        n.fixed |= 2
+    }
+
+    function $u(n) {
+        n.fixed &= -7
+    }
+
+    function Bu(n) {
+        n.fixed |= 4, n.px = n.x, n.py = n.y
+    }
+
+    function Wu(n) {
+        n.fixed &= -5
+    }
+
+    function Ju(n, t, e) {
+        var r = 0, u = 0;
+        if (n.charge = 0, !n.leaf)for (var i, o = n.nodes, a = o.length, c = -1; ++c < a;)i = o[c], null != i && (Ju(i, t, e), n.charge += i.charge, r += i.charge * i.cx, u += i.charge * i.cy);
+        if (n.point) {
+            n.leaf || (n.point.x += Math.random() - .5, n.point.y += Math.random() - .5);
+            var l = t * e[n.point.index];
+            n.charge += n.pointCharge = l, r += l * n.point.x, u += l * n.point.y
+        }
+        n.cx = r / n.charge, n.cy = u / n.charge
+    }
+
+    function Gu(n, t) {
+        return ta.rebind(n, t, "sort", "children", "value"), n.nodes = n, n.links = ri, n
+    }
+
+    function Ku(n, t) {
+       

<TRUNCATED>

[30/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/jquery.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/jquery.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/jquery.js
new file mode 100644
index 0000000..d332fe2
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/jquery.js
@@ -0,0 +1,9496 @@
+/*!
+ * jQuery JavaScript Library v1.8.3
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
+ */
+(function (window, undefined) {
+    var
+    // A central reference to the root jQuery(document)
+        rootjQuery,
+
+    // The deferred used on DOM ready
+        readyList,
+
+    // Use the correct document accordingly with window argument (sandbox)
+        document = window.document,
+        location = window.location,
+        navigator = window.navigator,
+
+    // Map over jQuery in case of overwrite
+        _jQuery = window.jQuery,
+
+    // Map over the $ in case of overwrite
+        _$ = window.$,
+
+    // Save a reference to some core methods
+        core_push = Array.prototype.push,
+        core_slice = Array.prototype.slice,
+        core_indexOf = Array.prototype.indexOf,
+        core_toString = Object.prototype.toString,
+        core_hasOwn = Object.prototype.hasOwnProperty,
+        core_trim = String.prototype.trim,
+
+    // Define a local copy of jQuery
+        jQuery = function (selector, context) {
+            // The jQuery object is actually just the init constructor 'enhanced'
+            return new jQuery.fn.init(selector, context, rootjQuery);
+        },
+
+    // Used for matching numbers
+        core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
+
+    // Used for detecting and trimming whitespace
+        core_rnotwhite = /\S/,
+        core_rspace = /\s+/,
+
+    // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+        rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+    // A simple way to check for HTML strings
+    // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+        rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+    // Match a standalone tag
+        rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+    // JSON RegExp
+        rvalidchars = /^[\],:{}\s]*$/,
+        rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+        rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+        rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
+
+    // Matches dashed string for camelizing
+        rmsPrefix = /^-ms-/,
+        rdashAlpha = /-([\da-z])/gi,
+
+    // Used by jQuery.camelCase as callback to replace()
+        fcamelCase = function (all, letter) {
+            return ( letter + "" ).toUpperCase();
+        },
+
+    // The ready event handler and self cleanup method
+        DOMContentLoaded = function () {
+            if (document.addEventListener) {
+                document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
+                jQuery.ready();
+            } else if (document.readyState === "complete") {
+                // we're here because readyState === "complete" in oldIE
+                // which is good enough for us to call the dom ready!
+                document.detachEvent("onreadystatechange", DOMContentLoaded);
+                jQuery.ready();
+            }
+        },
+
+    // [[Class]] -> type pairs
+        class2type = {};
+
+    jQuery.fn = jQuery.prototype = {
+        constructor: jQuery,
+        init: function (selector, context, rootjQuery) {
+            var match, elem, ret, doc;
+
+            // Handle $(""), $(null), $(undefined), $(false)
+            if (!selector) {
+                return this;
+            }
+
+            // Handle $(DOMElement)
+            if (selector.nodeType) {
+                this.context = this[0] = selector;
+                this.length = 1;
+                return this;
+            }
+
+            // Handle HTML strings
+            if (typeof selector === "string") {
+                if (selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector.length >= 3) {
+                    // Assume that strings that start and end with <> are HTML and skip the regex check
+                    match = [null, selector, null];
+
+                } else {
+                    match = rquickExpr.exec(selector);
+                }
+
+                // Match html or make sure no context is specified for #id
+                if (match && (match[1] || !context)) {
+
+                    // HANDLE: $(html) -> $(array)
+                    if (match[1]) {
+                        context = context instanceof jQuery ? context[0] : context;
+                        doc = ( context && context.nodeType ? context.ownerDocument || context : document );
+
+                        // scripts is true for back-compat
+                        selector = jQuery.parseHTML(match[1], doc, true);
+                        if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
+                            this.attr.call(selector, context, true);
+                        }
+
+                        return jQuery.merge(this, selector);
+
+                        // HANDLE: $(#id)
+                    } else {
+                        elem = document.getElementById(match[2]);
+
+                        // Check parentNode to catch when Blackberry 4.6 returns
+                        // nodes that are no longer in the document #6963
+                        if (elem && elem.parentNode) {
+                            // Handle the case where IE and Opera return items
+                            // by name instead of ID
+                            if (elem.id !== match[2]) {
+                                return rootjQuery.find(selector);
+                            }
+
+                            // Otherwise, we inject the element directly into the jQuery object
+                            this.length = 1;
+                            this[0] = elem;
+                        }
+
+                        this.context = document;
+                        this.selector = selector;
+                        return this;
+                    }
+
+                    // HANDLE: $(expr, $(...))
+                } else if (!context || context.jquery) {
+                    return ( context || rootjQuery ).find(selector);
+
+                    // HANDLE: $(expr, context)
+                    // (which is just equivalent to: $(context).find(expr)
+                } else {
+                    return this.constructor(context).find(selector);
+                }
+
+                // HANDLE: $(function)
+                // Shortcut for document ready
+            } else if (jQuery.isFunction(selector)) {
+                return rootjQuery.ready(selector);
+            }
+
+            if (selector.selector !== undefined) {
+                this.selector = selector.selector;
+                this.context = selector.context;
+            }
+
+            return jQuery.makeArray(selector, this);
+        },
+
+        // Start with an empty selector
+        selector: "",
+
+        // The current version of jQuery being used
+        jquery: "1.8.3",
+
+        // The default length of a jQuery object is 0
+        length: 0,
+
+        // The number of elements contained in the matched element set
+        size: function () {
+            return this.length;
+        },
+
+        toArray: function () {
+            return core_slice.call(this);
+        },
+
+        // Get the Nth element in the matched element set OR
+        // Get the whole matched element set as a clean array
+        get: function (num) {
+            return num == null ?
+
+                // Return a 'clean' array
+                this.toArray() :
+
+                // Return just the object
+                ( num < 0 ? this[this.length + num] : this[num] );
+        },
+
+        // Take an array of elements and push it onto the stack
+        // (returning the new matched element set)
+        pushStack: function (elems, name, selector) {
+
+            // Build a new jQuery matched element set
+            var ret = jQuery.merge(this.constructor(), elems);
+
+            // Add the old object onto the stack (as a reference)
+            ret.prevObject = this;
+
+            ret.context = this.context;
+
+            if (name === "find") {
+                ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+            } else if (name) {
+                ret.selector = this.selector + "." + name + "(" + selector + ")";
+            }
+
+            // Return the newly-formed element set
+            return ret;
+        },
+
+        // Execute a callback for every element in the matched set.
+        // (You can seed the arguments with an array of args, but this is
+        // only used internally.)
+        each: function (callback, args) {
+            return jQuery.each(this, callback, args);
+        },
+
+        ready: function (fn) {
+            // Add the callback
+            jQuery.ready.promise().done(fn);
+
+            return this;
+        },
+
+        eq: function (i) {
+            i = +i;
+            return i === -1 ?
+                this.slice(i) :
+                this.slice(i, i + 1);
+        },
+
+        first: function () {
+            return this.eq(0);
+        },
+
+        last: function () {
+            return this.eq(-1);
+        },
+
+        slice: function () {
+            return this.pushStack(core_slice.apply(this, arguments),
+                "slice", core_slice.call(arguments).join(","));
+        },
+
+        map: function (callback) {
+            return this.pushStack(jQuery.map(this, function (elem, i) {
+                return callback.call(elem, i, elem);
+            }));
+        },
+
+        end: function () {
+            return this.prevObject || this.constructor(null);
+        },
+
+        // For internal use only.
+        // Behaves like an Array's method, not like a jQuery method.
+        push: core_push,
+        sort: [].sort,
+        splice: [].splice
+    };
+
+// Give the init function the jQuery prototype for later instantiation
+    jQuery.fn.init.prototype = jQuery.fn;
+
+    jQuery.extend = jQuery.fn.extend = function () {
+        var options, name, src, copy, copyIsArray, clone,
+            target = arguments[0] || {},
+            i = 1,
+            length = arguments.length,
+            deep = false;
+
+        // Handle a deep copy situation
+        if (typeof target === "boolean") {
+            deep = target;
+            target = arguments[1] || {};
+            // skip the boolean and the target
+            i = 2;
+        }
+
+        // Handle case when target is a string or something (possible in deep copy)
+        if (typeof target !== "object" && !jQuery.isFunction(target)) {
+            target = {};
+        }
+
+        // extend jQuery itself if only one argument is passed
+        if (length === i) {
+            target = this;
+            --i;
+        }
+
+        for (; i < length; i++) {
+            // Only deal with non-null/undefined values
+            if ((options = arguments[i]) != null) {
+                // Extend the base object
+                for (name in options) {
+                    src = target[name];
+                    copy = options[name];
+
+                    // Prevent never-ending loop
+                    if (target === copy) {
+                        continue;
+                    }
+
+                    // Recurse if we're merging plain objects or arrays
+                    if (deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) )) {
+                        if (copyIsArray) {
+                            copyIsArray = false;
+                            clone = src && jQuery.isArray(src) ? src : [];
+
+                        } else {
+                            clone = src && jQuery.isPlainObject(src) ? src : {};
+                        }
+
+                        // Never move original objects, clone them
+                        target[name] = jQuery.extend(deep, clone, copy);
+
+                        // Don't bring in undefined values
+                    } else if (copy !== undefined) {
+                        target[name] = copy;
+                    }
+                }
+            }
+        }
+
+        // Return the modified object
+        return target;
+    };
+
+    jQuery.extend({
+        noConflict: function (deep) {
+            if (window.$ === jQuery) {
+                window.$ = _$;
+            }
+
+            if (deep && window.jQuery === jQuery) {
+                window.jQuery = _jQuery;
+            }
+
+            return jQuery;
+        },
+
+        // Is the DOM ready to be used? Set to true once it occurs.
+        isReady: false,
+
+        // A counter to track how many items to wait for before
+        // the ready event fires. See #6781
+        readyWait: 1,
+
+        // Hold (or release) the ready event
+        holdReady: function (hold) {
+            if (hold) {
+                jQuery.readyWait++;
+            } else {
+                jQuery.ready(true);
+            }
+        },
+
+        // Handle when the DOM is ready
+        ready: function (wait) {
+
+            // Abort if there are pending holds or we're already ready
+            if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
+                return;
+            }
+
+            // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+            if (!document.body) {
+                return setTimeout(jQuery.ready, 1);
+            }
+
+            // Remember that the DOM is ready
+            jQuery.isReady = true;
+
+            // If a normal DOM Ready event fired, decrement, and wait if need be
+            if (wait !== true && --jQuery.readyWait > 0) {
+                return;
+            }
+
+            // If there are functions bound, to execute
+            readyList.resolveWith(document, [jQuery]);
+
+            // Trigger any bound ready events
+            if (jQuery.fn.trigger) {
+                jQuery(document).trigger("ready").off("ready");
+            }
+        },
+
+        // See test/unit/core.js for details concerning isFunction.
+        // Since version 1.3, DOM methods and functions like alert
+        // aren't supported. They return false on IE (#2968).
+        isFunction: function (obj) {
+            return jQuery.type(obj) === "function";
+        },
+
+        isArray: Array.isArray || function (obj) {
+            return jQuery.type(obj) === "array";
+        },
+
+        isWindow: function (obj) {
+            return obj != null && obj == obj.window;
+        },
+
+        isNumeric: function (obj) {
+            return !isNaN(parseFloat(obj)) && isFinite(obj);
+        },
+
+        type: function (obj) {
+            return obj == null ?
+                String(obj) :
+            class2type[core_toString.call(obj)] || "object";
+        },
+
+        isPlainObject: function (obj) {
+            // Must be an Object.
+            // Because of IE, we also have to check the presence of the constructor property.
+            // Make sure that DOM nodes and window objects don't pass through, as well
+            if (!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) {
+                return false;
+            }
+
+            try {
+                // Not own constructor property must be Object
+                if (obj.constructor && !core_hasOwn.call(obj, "constructor") && !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
+                    return false;
+                }
+            } catch (e) {
+                // IE8,9 Will throw exceptions on certain host objects #9897
+                return false;
+            }
+
+            // Own properties are enumerated firstly, so to speed up,
+            // if last one is own, then all properties are own.
+
+            var key;
+            for (key in obj) {
+            }
+
+            return key === undefined || core_hasOwn.call(obj, key);
+        },
+
+        isEmptyObject: function (obj) {
+            var name;
+            for (name in obj) {
+                return false;
+            }
+            return true;
+        },
+
+        error: function (msg) {
+            throw new Error(msg);
+        },
+
+        // data: string of html
+        // context (optional): If specified, the fragment will be created in this context, defaults to document
+        // scripts (optional): If true, will include scripts passed in the html string
+        parseHTML: function (data, context, scripts) {
+            var parsed;
+            if (!data || typeof data !== "string") {
+                return null;
+            }
+            if (typeof context === "boolean") {
+                scripts = context;
+                context = 0;
+            }
+            context = context || document;
+
+            // Single tag
+            if ((parsed = rsingleTag.exec(data))) {
+                return [context.createElement(parsed[1])];
+            }
+
+            parsed = jQuery.buildFragment([data], context, scripts ? null : []);
+            return jQuery.merge([],
+                (parsed.cacheable ? jQuery.clone(parsed.fragment) : parsed.fragment).childNodes);
+        },
+
+        parseJSON: function (data) {
+            if (!data || typeof data !== "string") {
+                return null;
+            }
+
+            // Make sure leading/trailing whitespace is removed (IE can't handle it)
+            data = jQuery.trim(data);
+
+            // Attempt to parse using the native JSON parser first
+            if (window.JSON && window.JSON.parse) {
+                return window.JSON.parse(data);
+            }
+
+            // Make sure the incoming data is actual JSON
+            // Logic borrowed from http://json.org/json2.js
+            if (rvalidchars.test(data.replace(rvalidescape, "@")
+                    .replace(rvalidtokens, "]")
+                    .replace(rvalidbraces, ""))) {
+
+                return ( new Function("return " + data) )();
+
+            }
+            jQuery.error("Invalid JSON: " + data);
+        },
+
+        // Cross-browser xml parsing
+        parseXML: function (data) {
+            var xml, tmp;
+            if (!data || typeof data !== "string") {
+                return null;
+            }
+            try {
+                if (window.DOMParser) { // Standard
+                    tmp = new DOMParser();
+                    xml = tmp.parseFromString(data, "text/xml");
+                } else { // IE
+                    xml = new ActiveXObject("Microsoft.XMLDOM");
+                    xml.async = "false";
+                    xml.loadXML(data);
+                }
+            } catch (e) {
+                xml = undefined;
+            }
+            if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) {
+                jQuery.error("Invalid XML: " + data);
+            }
+            return xml;
+        },
+
+        noop: function () {
+        },
+
+        // Evaluates a script in a global context
+        // Workarounds based on findings by Jim Driscoll
+        // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+        globalEval: function (data) {
+            if (data && core_rnotwhite.test(data)) {
+                // We use execScript on Internet Explorer
+                // We use an anonymous function so that context is window
+                // rather than jQuery in Firefox
+                ( window.execScript || function (data) {
+                    window["eval"].call(window, data);
+                } )(data);
+            }
+        },
+
+        // Convert dashed to camelCase; used by the css and data modules
+        // Microsoft forgot to hump their vendor prefix (#9572)
+        camelCase: function (string) {
+            return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
+        },
+
+        nodeName: function (elem, name) {
+            return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+        },
+
+        // args is for internal usage only
+        each: function (obj, callback, args) {
+            var name,
+                i = 0,
+                length = obj.length,
+                isObj = length === undefined || jQuery.isFunction(obj);
+
+            if (args) {
+                if (isObj) {
+                    for (name in obj) {
+                        if (callback.apply(obj[name], args) === false) {
+                            break;
+                        }
+                    }
+                } else {
+                    for (; i < length;) {
+                        if (callback.apply(obj[i++], args) === false) {
+                            break;
+                        }
+                    }
+                }
+
+                // A special, fast, case for the most common use of each
+            } else {
+                if (isObj) {
+                    for (name in obj) {
+                        if (callback.call(obj[name], name, obj[name]) === false) {
+                            break;
+                        }
+                    }
+                } else {
+                    for (; i < length;) {
+                        if (callback.call(obj[i], i, obj[i++]) === false) {
+                            break;
+                        }
+                    }
+                }
+            }
+
+            return obj;
+        },
+
+        // Use native String.trim function wherever possible
+        trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+            function (text) {
+                return text == null ?
+                    "" :
+                    core_trim.call(text);
+            } :
+
+            // Otherwise use our own trimming functionality
+            function (text) {
+                return text == null ?
+                    "" :
+                    ( text + "" ).replace(rtrim, "");
+            },
+
+        // results is for internal usage only
+        makeArray: function (arr, results) {
+            var type,
+                ret = results || [];
+
+            if (arr != null) {
+                // The window, strings (and functions) also have 'length'
+                // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+                type = jQuery.type(arr);
+
+                if (arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow(arr)) {
+                    core_push.call(ret, arr);
+                } else {
+                    jQuery.merge(ret, arr);
+                }
+            }
+
+            return ret;
+        },
+
+        inArray: function (elem, arr, i) {
+            var len;
+
+            if (arr) {
+                if (core_indexOf) {
+                    return core_indexOf.call(arr, elem, i);
+                }
+
+                len = arr.length;
+                i = i ? i < 0 ? Math.max(0, len + i) : i : 0;
+
+                for (; i < len; i++) {
+                    // Skip accessing in sparse arrays
+                    if (i in arr && arr[i] === elem) {
+                        return i;
+                    }
+                }
+            }
+
+            return -1;
+        },
+
+        merge: function (first, second) {
+            var l = second.length,
+                i = first.length,
+                j = 0;
+
+            if (typeof l === "number") {
+                for (; j < l; j++) {
+                    first[i++] = second[j];
+                }
+
+            } else {
+                while (second[j] !== undefined) {
+                    first[i++] = second[j++];
+                }
+            }
+
+            first.length = i;
+
+            return first;
+        },
+
+        grep: function (elems, callback, inv) {
+            var retVal,
+                ret = [],
+                i = 0,
+                length = elems.length;
+            inv = !!inv;
+
+            // Go through the array, only saving the items
+            // that pass the validator function
+            for (; i < length; i++) {
+                retVal = !!callback(elems[i], i);
+                if (inv !== retVal) {
+                    ret.push(elems[i]);
+                }
+            }
+
+            return ret;
+        },
+
+        // arg is for internal usage only
+        map: function (elems, callback, arg) {
+            var value, key,
+                ret = [],
+                i = 0,
+                length = elems.length,
+            // jquery objects are treated as arrays
+                isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[0] && elems[length - 1] ) || length === 0 || jQuery.isArray(elems) );
+
+            // Go through the array, translating each of the items to their
+            if (isArray) {
+                for (; i < length; i++) {
+                    value = callback(elems[i], i, arg);
+
+                    if (value != null) {
+                        ret[ret.length] = value;
+                    }
+                }
+
+                // Go through every key on the object,
+            } else {
+                for (key in elems) {
+                    value = callback(elems[key], key, arg);
+
+                    if (value != null) {
+                        ret[ret.length] = value;
+                    }
+                }
+            }
+
+            // Flatten any nested arrays
+            return ret.concat.apply([], ret);
+        },
+
+        // A global GUID counter for objects
+        guid: 1,
+
+        // Bind a function to a context, optionally partially applying any
+        // arguments.
+        proxy: function (fn, context) {
+            var tmp, args, proxy;
+
+            if (typeof context === "string") {
+                tmp = fn[context];
+                context = fn;
+                fn = tmp;
+            }
+
+            // Quick check to determine if target is callable, in the spec
+            // this throws a TypeError, but we will just return undefined.
+            if (!jQuery.isFunction(fn)) {
+                return undefined;
+            }
+
+            // Simulated bind
+            args = core_slice.call(arguments, 2);
+            proxy = function () {
+                return fn.apply(context, args.concat(core_slice.call(arguments)));
+            };
+
+            // Set the guid of unique handler to the same of original handler, so it can be removed
+            proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+            return proxy;
+        },
+
+        // Multifunctional method to get and set values of a collection
+        // The value/s can optionally be executed if it's a function
+        access: function (elems, fn, key, value, chainable, emptyGet, pass) {
+            var exec,
+                bulk = key == null,
+                i = 0,
+                length = elems.length;
+
+            // Sets many values
+            if (key && typeof key === "object") {
+                for (i in key) {
+                    jQuery.access(elems, fn, i, key[i], 1, emptyGet, value);
+                }
+                chainable = 1;
+
+                // Sets one value
+            } else if (value !== undefined) {
+                // Optionally, function values get executed if exec is true
+                exec = pass === undefined && jQuery.isFunction(value);
+
+                if (bulk) {
+                    // Bulk operations only iterate when executing function values
+                    if (exec) {
+                        exec = fn;
+                        fn = function (elem, key, value) {
+                            return exec.call(jQuery(elem), value);
+                        };
+
+                        // Otherwise they run against the entire set
+                    } else {
+                        fn.call(elems, value);
+                        fn = null;
+                    }
+                }
+
+                if (fn) {
+                    for (; i < length; i++) {
+                        fn(elems[i], key, exec ? value.call(elems[i], i, fn(elems[i], key)) : value, pass);
+                    }
+                }
+
+                chainable = 1;
+            }
+
+            return chainable ?
+                elems :
+
+                // Gets
+                bulk ?
+                    fn.call(elems) :
+                    length ? fn(elems[0], key) : emptyGet;
+        },
+
+        now: function () {
+            return ( new Date() ).getTime();
+        }
+    });
+
+    jQuery.ready.promise = function (obj) {
+        if (!readyList) {
+
+            readyList = jQuery.Deferred();
+
+            // Catch cases where $(document).ready() is called after the browser event has already occurred.
+            // we once tried to use readyState "interactive" here, but it caused issues like the one
+            // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+            if (document.readyState === "complete") {
+                // Handle it asynchronously to allow scripts the opportunity to delay ready
+                setTimeout(jQuery.ready, 1);
+
+                // Standards-based browsers support DOMContentLoaded
+            } else if (document.addEventListener) {
+                // Use the handy event callback
+                document.addEventListener("DOMContentLoaded", DOMContentLoaded, false);
+
+                // A fallback to window.onload, that will always work
+                window.addEventListener("load", jQuery.ready, false);
+
+                // If IE event model is used
+            } else {
+                // Ensure firing before onload, maybe late but safe also for iframes
+                document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+                // A fallback to window.onload, that will always work
+                window.attachEvent("onload", jQuery.ready);
+
+                // If IE and not a frame
+                // continually check to see if the document is ready
+                var top = false;
+
+                try {
+                    top = window.frameElement == null && document.documentElement;
+                } catch (e) {
+                }
+
+                if (top && top.doScroll) {
+                    (function doScrollCheck() {
+                        if (!jQuery.isReady) {
+
+                            try {
+                                // Use the trick by Diego Perini
+                                // http://javascript.nwbox.com/IEContentLoaded/
+                                top.doScroll("left");
+                            } catch (e) {
+                                return setTimeout(doScrollCheck, 50);
+                            }
+
+                            // and execute any waiting functions
+                            jQuery.ready();
+                        }
+                    })();
+                }
+            }
+        }
+        return readyList.promise(obj);
+    };
+
+// Populate the class2type map
+    jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (i, name) {
+        class2type["[object " + name + "]"] = name.toLowerCase();
+    });
+
+// All jQuery objects should point back to these
+    rootjQuery = jQuery(document);
+// String to Object options format cache
+    var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+    function createOptions(options) {
+        var object = optionsCache[options] = {};
+        jQuery.each(options.split(core_rspace), function (_, flag) {
+            object[flag] = true;
+        });
+        return object;
+    }
+
+    /*
+     * Create a callback list using the following parameters:
+     *
+     *	options: an optional list of space-separated options that will change how
+     *			the callback list behaves or a more traditional option object
+     *
+     * By default a callback list will act like an event callback list and can be
+     * "fired" multiple times.
+     *
+     * Possible options:
+     *
+     *	once:			will ensure the callback list can only be fired once (like a Deferred)
+     *
+     *	memory:			will keep track of previous values and will call any callback added
+     *					after the list has been fired right away with the latest "memorized"
+     *					values (like a Deferred)
+     *
+     *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+     *
+     *	stopOnFalse:	interrupt callings when a callback returns false
+     *
+     */
+    jQuery.Callbacks = function (options) {
+
+        // Convert options from String-formatted to Object-formatted if needed
+        // (we check in cache first)
+        options = typeof options === "string" ?
+            ( optionsCache[options] || createOptions(options) ) :
+            jQuery.extend({}, options);
+
+        var // Last fire value (for non-forgettable lists)
+            memory,
+        // Flag to know if list was already fired
+            fired,
+        // Flag to know if list is currently firing
+            firing,
+        // First callback to fire (used internally by add and fireWith)
+            firingStart,
+        // End of the loop when firing
+            firingLength,
+        // Index of currently firing callback (modified by remove if needed)
+            firingIndex,
+        // Actual callback list
+            list = [],
+        // Stack of fire calls for repeatable lists
+            stack = !options.once && [],
+        // Fire callbacks
+            fire = function (data) {
+                memory = options.memory && data;
+                fired = true;
+                firingIndex = firingStart || 0;
+                firingStart = 0;
+                firingLength = list.length;
+                firing = true;
+                for (; list && firingIndex < firingLength; firingIndex++) {
+                    if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) {
+                        memory = false; // To prevent further calls using add
+                        break;
+                    }
+                }
+                firing = false;
+                if (list) {
+                    if (stack) {
+                        if (stack.length) {
+                            fire(stack.shift());
+                        }
+                    } else if (memory) {
+                        list = [];
+                    } else {
+                        self.disable();
+                    }
+                }
+            },
+        // Actual Callbacks object
+            self = {
+                // Add a callback or a collection of callbacks to the list
+                add: function () {
+                    if (list) {
+                        // First, we save the current length
+                        var start = list.length;
+                        (function add(args) {
+                            jQuery.each(args, function (_, arg) {
+                                var type = jQuery.type(arg);
+                                if (type === "function") {
+                                    if (!options.unique || !self.has(arg)) {
+                                        list.push(arg);
+                                    }
+                                } else if (arg && arg.length && type !== "string") {
+                                    // Inspect recursively
+                                    add(arg);
+                                }
+                            });
+                        })(arguments);
+                        // Do we need to add the callbacks to the
+                        // current firing batch?
+                        if (firing) {
+                            firingLength = list.length;
+                            // With memory, if we're not firing then
+                            // we should call right away
+                        } else if (memory) {
+                            firingStart = start;
+                            fire(memory);
+                        }
+                    }
+                    return this;
+                },
+                // Remove a callback from the list
+                remove: function () {
+                    if (list) {
+                        jQuery.each(arguments, function (_, arg) {
+                            var index;
+                            while (( index = jQuery.inArray(arg, list, index) ) > -1) {
+                                list.splice(index, 1);
+                                // Handle firing indexes
+                                if (firing) {
+                                    if (index <= firingLength) {
+                                        firingLength--;
+                                    }
+                                    if (index <= firingIndex) {
+                                        firingIndex--;
+                                    }
+                                }
+                            }
+                        });
+                    }
+                    return this;
+                },
+                // Control if a given callback is in the list
+                has: function (fn) {
+                    return jQuery.inArray(fn, list) > -1;
+                },
+                // Remove all callbacks from the list
+                empty: function () {
+                    list = [];
+                    return this;
+                },
+                // Have the list do nothing anymore
+                disable: function () {
+                    list = stack = memory = undefined;
+                    return this;
+                },
+                // Is it disabled?
+                disabled: function () {
+                    return !list;
+                },
+                // Lock the list in its current state
+                lock: function () {
+                    stack = undefined;
+                    if (!memory) {
+                        self.disable();
+                    }
+                    return this;
+                },
+                // Is it locked?
+                locked: function () {
+                    return !stack;
+                },
+                // Call all callbacks with the given context and arguments
+                fireWith: function (context, args) {
+                    args = args || [];
+                    args = [context, args.slice ? args.slice() : args];
+                    if (list && ( !fired || stack )) {
+                        if (firing) {
+                            stack.push(args);
+                        } else {
+                            fire(args);
+                        }
+                    }
+                    return this;
+                },
+                // Call all the callbacks with the given arguments
+                fire: function () {
+                    self.fireWith(this, arguments);
+                    return this;
+                },
+                // To know if the callbacks have already been called at least once
+                fired: function () {
+                    return !!fired;
+                }
+            };
+
+        return self;
+    };
+    jQuery.extend({
+
+        Deferred: function (func) {
+            var tuples = [
+                    // action, add listener, listener list, final state
+                    ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"],
+                    ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"],
+                    ["notify", "progress", jQuery.Callbacks("memory")]
+                ],
+                state = "pending",
+                promise = {
+                    state: function () {
+                        return state;
+                    },
+                    always: function () {
+                        deferred.done(arguments).fail(arguments);
+                        return this;
+                    },
+                    then: function (/* fnDone, fnFail, fnProgress */) {
+                        var fns = arguments;
+                        return jQuery.Deferred(function (newDefer) {
+                            jQuery.each(tuples, function (i, tuple) {
+                                var action = tuple[0],
+                                    fn = fns[i];
+                                // deferred[ done | fail | progress ] for forwarding actions to newDefer
+                                deferred[tuple[1]](jQuery.isFunction(fn) ?
+                                        function () {
+                                            var returned = fn.apply(this, arguments);
+                                            if (returned && jQuery.isFunction(returned.promise)) {
+                                                returned.promise()
+                                                    .done(newDefer.resolve)
+                                                    .fail(newDefer.reject)
+                                                    .progress(newDefer.notify);
+                                            } else {
+                                                newDefer[action + "With"](this === deferred ? newDefer : this, [returned]);
+                                            }
+                                        } :
+                                        newDefer[action]
+                                );
+                            });
+                            fns = null;
+                        }).promise();
+                    },
+                    // Get a promise for this deferred
+                    // If obj is provided, the promise aspect is added to the object
+                    promise: function (obj) {
+                        return obj != null ? jQuery.extend(obj, promise) : promise;
+                    }
+                },
+                deferred = {};
+
+            // Keep pipe for back-compat
+            promise.pipe = promise.then;
+
+            // Add list-specific methods
+            jQuery.each(tuples, function (i, tuple) {
+                var list = tuple[2],
+                    stateString = tuple[3];
+
+                // promise[ done | fail | progress ] = list.add
+                promise[tuple[1]] = list.add;
+
+                // Handle state
+                if (stateString) {
+                    list.add(function () {
+                        // state = [ resolved | rejected ]
+                        state = stateString;
+
+                        // [ reject_list | resolve_list ].disable; progress_list.lock
+                    }, tuples[i ^ 1][2].disable, tuples[2][2].lock);
+                }
+
+                // deferred[ resolve | reject | notify ] = list.fire
+                deferred[tuple[0]] = list.fire;
+                deferred[tuple[0] + "With"] = list.fireWith;
+            });
+
+            // Make the deferred a promise
+            promise.promise(deferred);
+
+            // Call given func if any
+            if (func) {
+                func.call(deferred, deferred);
+            }
+
+            // All done!
+            return deferred;
+        },
+
+        // Deferred helper
+        when: function (subordinate /* , ..., subordinateN */) {
+            var i = 0,
+                resolveValues = core_slice.call(arguments),
+                length = resolveValues.length,
+
+            // the count of uncompleted subordinates
+                remaining = length !== 1 || ( subordinate && jQuery.isFunction(subordinate.promise) ) ? length : 0,
+
+            // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+                deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+            // Update function for both resolve and progress values
+                updateFunc = function (i, contexts, values) {
+                    return function (value) {
+                        contexts[i] = this;
+                        values[i] = arguments.length > 1 ? core_slice.call(arguments) : value;
+                        if (values === progressValues) {
+                            deferred.notifyWith(contexts, values);
+                        } else if (!( --remaining )) {
+                            deferred.resolveWith(contexts, values);
+                        }
+                    };
+                },
+
+                progressValues, progressContexts, resolveContexts;
+
+            // add listeners to Deferred subordinates; treat others as resolved
+            if (length > 1) {
+                progressValues = new Array(length);
+                progressContexts = new Array(length);
+                resolveContexts = new Array(length);
+                for (; i < length; i++) {
+                    if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {
+                        resolveValues[i].promise()
+                            .done(updateFunc(i, resolveContexts, resolveValues))
+                            .fail(deferred.reject)
+                            .progress(updateFunc(i, progressContexts, progressValues));
+                    } else {
+                        --remaining;
+                    }
+                }
+            }
+
+            // if we're not waiting on anything, resolve the master
+            if (!remaining) {
+                deferred.resolveWith(resolveContexts, resolveValues);
+            }
+
+            return deferred.promise();
+        }
+    });
+    jQuery.support = (function () {
+
+        var support,
+            all,
+            a,
+            select,
+            opt,
+            input,
+            fragment,
+            eventName,
+            i,
+            isSupported,
+            clickFn,
+            div = document.createElement("div");
+
+        // Setup
+        div.setAttribute("className", "t");
+        div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+        // Support tests won't run in some limited or non-browser environments
+        all = div.getElementsByTagName("*");
+        a = div.getElementsByTagName("a")[0];
+        if (!all || !a || !all.length) {
+            return {};
+        }
+
+        // First batch of tests
+        select = document.createElement("select");
+        opt = select.appendChild(document.createElement("option"));
+        input = div.getElementsByTagName("input")[0];
+
+        a.style.cssText = "top:1px;float:left;opacity:.5";
+        support = {
+            // IE strips leading whitespace when .innerHTML is used
+            leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+            // Make sure that tbody elements aren't automatically inserted
+            // IE will insert them into empty tables
+            tbody: !div.getElementsByTagName("tbody").length,
+
+            // Make sure that link elements get serialized correctly by innerHTML
+            // This requires a wrapper element in IE
+            htmlSerialize: !!div.getElementsByTagName("link").length,
+
+            // Get the style information from getAttribute
+            // (IE uses .cssText instead)
+            style: /top/.test(a.getAttribute("style")),
+
+            // Make sure that URLs aren't manipulated
+            // (IE normalizes it by default)
+            hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+            // Make sure that element opacity exists
+            // (IE uses filter instead)
+            // Use a regex to work around a WebKit issue. See #5145
+            opacity: /^0.5/.test(a.style.opacity),
+
+            // Verify style float existence
+            // (IE uses styleFloat instead of cssFloat)
+            cssFloat: !!a.style.cssFloat,
+
+            // Make sure that if no value is specified for a checkbox
+            // that it defaults to "on".
+            // (WebKit defaults to "" instead)
+            checkOn: ( input.value === "on" ),
+
+            // Make sure that a selected-by-default option has a working selected property.
+            // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+            optSelected: opt.selected,
+
+            // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+            getSetAttribute: div.className !== "t",
+
+            // Tests for enctype support on a form (#6743)
+            enctype: !!document.createElement("form").enctype,
+
+            // Makes sure cloning an html5 element does not cause problems
+            // Where outerHTML is undefined, this still works
+            html5Clone: document.createElement("nav").cloneNode(true).outerHTML !== "<:nav></:nav>",
+
+            // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+            boxModel: ( document.compatMode === "CSS1Compat" ),
+
+            // Will be defined later
+            submitBubbles: true,
+            changeBubbles: true,
+            focusinBubbles: false,
+            deleteExpando: true,
+            noCloneEvent: true,
+            inlineBlockNeedsLayout: false,
+            shrinkWrapBlocks: false,
+            reliableMarginRight: true,
+            boxSizingReliable: true,
+            pixelPosition: false
+        };
+
+        // Make sure checked status is properly cloned
+        input.checked = true;
+        support.noCloneChecked = input.cloneNode(true).checked;
+
+        // Make sure that the options inside disabled selects aren't marked as disabled
+        // (WebKit marks them as disabled)
+        select.disabled = true;
+        support.optDisabled = !opt.disabled;
+
+        // Test to see if it's possible to delete an expando from an element
+        // Fails in Internet Explorer
+        try {
+            delete div.test;
+        } catch (e) {
+            support.deleteExpando = false;
+        }
+
+        if (!div.addEventListener && div.attachEvent && div.fireEvent) {
+            div.attachEvent("onclick", clickFn = function () {
+                // Cloning a node shouldn't copy over any
+                // bound event handlers (IE does this)
+                support.noCloneEvent = false;
+            });
+            div.cloneNode(true).fireEvent("onclick");
+            div.detachEvent("onclick", clickFn);
+        }
+
+        // Check if a radio maintains its value
+        // after being appended to the DOM
+        input = document.createElement("input");
+        input.value = "t";
+        input.setAttribute("type", "radio");
+        support.radioValue = input.value === "t";
+
+        input.setAttribute("checked", "checked");
+
+        // #11217 - WebKit loses check when the name is after the checked attribute
+        input.setAttribute("name", "t");
+
+        div.appendChild(input);
+        fragment = document.createDocumentFragment();
+        fragment.appendChild(div.lastChild);
+
+        // WebKit doesn't clone checked state correctly in fragments
+        support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
+
+        // Check if a disconnected checkbox will retain its checked
+        // value of true after appended to the DOM (IE6/7)
+        support.appendChecked = input.checked;
+
+        fragment.removeChild(input);
+        fragment.appendChild(div);
+
+        // Technique from Juriy Zaytsev
+        // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+        // We only care about the case where non-standard event systems
+        // are used, namely in IE. Short-circuiting here helps us to
+        // avoid an eval call (in setAttribute) which can cause CSP
+        // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+        if (div.attachEvent) {
+            for (i in {
+                submit: true,
+                change: true,
+                focusin: true
+            }) {
+                eventName = "on" + i;
+                isSupported = ( eventName in div );
+                if (!isSupported) {
+                    div.setAttribute(eventName, "return;");
+                    isSupported = ( typeof div[eventName] === "function" );
+                }
+                support[i + "Bubbles"] = isSupported;
+            }
+        }
+
+        // Run tests that need a body at doc ready
+        jQuery(function () {
+            var container, div, tds, marginDiv,
+                divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
+                body = document.getElementsByTagName("body")[0];
+
+            if (!body) {
+                // Return for frameset docs that don't have a body
+                return;
+            }
+
+            container = document.createElement("div");
+            container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
+            body.insertBefore(container, body.firstChild);
+
+            // Construct the test element
+            div = document.createElement("div");
+            container.appendChild(div);
+
+            // Check if table cells still have offsetWidth/Height when they are set
+            // to display:none and there are still other visible table cells in a
+            // table row; if so, offsetWidth/Height are not reliable for use when
+            // determining if an element has been hidden directly using
+            // display:none (it is still safe to use offsets if a parent element is
+            // hidden; don safety goggles and see bug #4512 for more information).
+            // (only IE 8 fails this test)
+            div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+            tds = div.getElementsByTagName("td");
+            tds[0].style.cssText = "padding:0;margin:0;border:0;display:none";
+            isSupported = ( tds[0].offsetHeight === 0 );
+
+            tds[0].style.display = "";
+            tds[1].style.display = "none";
+
+            // Check if empty table cells still have offsetWidth/Height
+            // (IE <= 8 fail this test)
+            support.reliableHiddenOffsets = isSupported && ( tds[0].offsetHeight === 0 );
+
+            // Check box-sizing and margin behavior
+            div.innerHTML = "";
+            div.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%;";
+            support.boxSizing = ( div.offsetWidth === 4 );
+            support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+            // NOTE: To any future maintainer, we've window.getComputedStyle
+            // because jsdom on node.js will break without it.
+            if (window.getComputedStyle) {
+                support.pixelPosition = ( window.getComputedStyle(div, null) || {} ).top !== "1%";
+                support.boxSizingReliable = ( window.getComputedStyle(div, null) || {width: "4px"} ).width === "4px";
+
+                // Check if div with explicit width and no margin-right incorrectly
+                // gets computed margin-right based on width of container. For more
+                // info see bug #3333
+                // Fails in WebKit before Feb 2011 nightlies
+                // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                marginDiv = document.createElement("div");
+                marginDiv.style.cssText = div.style.cssText = divReset;
+                marginDiv.style.marginRight = marginDiv.style.width = "0";
+                div.style.width = "1px";
+                div.appendChild(marginDiv);
+                support.reliableMarginRight = !parseFloat(( window.getComputedStyle(marginDiv, null) || {} ).marginRight);
+            }
+
+            if (typeof div.style.zoom !== "undefined") {
+                // Check if natively block-level elements act like inline-block
+                // elements when setting their display to 'inline' and giving
+                // them layout
+                // (IE < 8 does this)
+                div.innerHTML = "";
+                div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+                support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+                // Check if elements with layout shrink-wrap their children
+                // (IE 6 does this)
+                div.style.display = "block";
+                div.style.overflow = "visible";
+                div.innerHTML = "<div></div>";
+                div.firstChild.style.width = "5px";
+                support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+                container.style.zoom = 1;
+            }
+
+            // Null elements to avoid leaks in IE
+            body.removeChild(container);
+            container = div = tds = marginDiv = null;
+        });
+
+        // Null elements to avoid leaks in IE
+        fragment.removeChild(div);
+        all = a = select = opt = input = fragment = div = null;
+
+        return support;
+    })();
+    var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+        rmultiDash = /([A-Z])/g;
+
+    jQuery.extend({
+        cache: {},
+
+        deletedIds: [],
+
+        // Remove at next major release (1.9/2.0)
+        uuid: 0,
+
+        // Unique for each copy of jQuery on the page
+        // Non-digits removed to match rinlinejQuery
+        expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace(/\D/g, ""),
+
+        // The following elements throw uncatchable exceptions if you
+        // attempt to add expando properties to them.
+        noData: {
+            "embed": true,
+            // Ban all objects except for Flash (which handle expandos)
+            "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+            "applet": true
+        },
+
+        hasData: function (elem) {
+            elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando];
+            return !!elem && !isEmptyDataObject(elem);
+        },
+
+        data: function (elem, name, data, pvt /* Internal Use Only */) {
+            if (!jQuery.acceptData(elem)) {
+                return;
+            }
+
+            var thisCache, ret,
+                internalKey = jQuery.expando,
+                getByName = typeof name === "string",
+
+            // We have to handle DOM nodes and JS objects differently because IE6-7
+            // can't GC object references properly across the DOM-JS boundary
+                isNode = elem.nodeType,
+
+            // Only DOM nodes need the global jQuery cache; JS object data is
+            // attached directly to the object so GC can occur automatically
+                cache = isNode ? jQuery.cache : elem,
+
+            // Only defining an ID for JS objects if its cache already exists allows
+            // the code to shortcut on the same path as a DOM node with no cache
+                id = isNode ? elem[internalKey] : elem[internalKey] && internalKey;
+
+            // Avoid doing any more work than we need to when trying to get data on an
+            // object that has no data at all
+            if ((!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined) {
+                return;
+            }
+
+            if (!id) {
+                // Only DOM nodes need a new unique ID for each element since their data
+                // ends up in the global cache
+                if (isNode) {
+                    elem[internalKey] = id = jQuery.deletedIds.pop() || jQuery.guid++;
+                } else {
+                    id = internalKey;
+                }
+            }
+
+            if (!cache[id]) {
+                cache[id] = {};
+
+                // Avoids exposing jQuery metadata on plain JS objects when the object
+                // is serialized using JSON.stringify
+                if (!isNode) {
+                    cache[id].toJSON = jQuery.noop;
+                }
+            }
+
+            // An object can be passed to jQuery.data instead of a key/value pair; this gets
+            // shallow copied over onto the existing cache
+            if (typeof name === "object" || typeof name === "function") {
+                if (pvt) {
+                    cache[id] = jQuery.extend(cache[id], name);
+                } else {
+                    cache[id].data = jQuery.extend(cache[id].data, name);
+                }
+            }
+
+            thisCache = cache[id];
+
+            // jQuery data() is stored in a separate object inside the object's internal data
+            // cache in order to avoid key collisions between internal data and user-defined
+            // data.
+            if (!pvt) {
+                if (!thisCache.data) {
+                    thisCache.data = {};
+                }
+
+                thisCache = thisCache.data;
+            }
+
+            if (data !== undefined) {
+                thisCache[jQuery.camelCase(name)] = data;
+            }
+
+            // Check for both converted-to-camel and non-converted data property names
+            // If a data property was specified
+            if (getByName) {
+
+                // First Try to find as-is property data
+                ret = thisCache[name];
+
+                // Test for null|undefined property data
+                if (ret == null) {
+
+                    // Try to find the camelCased property
+                    ret = thisCache[jQuery.camelCase(name)];
+                }
+            } else {
+                ret = thisCache;
+            }
+
+            return ret;
+        },
+
+        removeData: function (elem, name, pvt /* Internal Use Only */) {
+            if (!jQuery.acceptData(elem)) {
+                return;
+            }
+
+            var thisCache, i, l,
+
+                isNode = elem.nodeType,
+
+            // See jQuery.data for more information
+                cache = isNode ? jQuery.cache : elem,
+                id = isNode ? elem[jQuery.expando] : jQuery.expando;
+
+            // If there is already no cache entry for this object, there is no
+            // purpose in continuing
+            if (!cache[id]) {
+                return;
+            }
+
+            if (name) {
+
+                thisCache = pvt ? cache[id] : cache[id].data;
+
+                if (thisCache) {
+
+                    // Support array or space separated string names for data keys
+                    if (!jQuery.isArray(name)) {
+
+                        // try the string as a key before any manipulation
+                        if (name in thisCache) {
+                            name = [name];
+                        } else {
+
+                            // split the camel cased version by spaces unless a key with the spaces exists
+                            name = jQuery.camelCase(name);
+                            if (name in thisCache) {
+                                name = [name];
+                            } else {
+                                name = name.split(" ");
+                            }
+                        }
+                    }
+
+                    for (i = 0, l = name.length; i < l; i++) {
+                        delete thisCache[name[i]];
+                    }
+
+                    // If there is no data left in the cache, we want to continue
+                    // and let the cache object itself get destroyed
+                    if (!( pvt ? isEmptyDataObject : jQuery.isEmptyObject )(thisCache)) {
+                        return;
+                    }
+                }
+            }
+
+            // See jQuery.data for more information
+            if (!pvt) {
+                delete cache[id].data;
+
+                // Don't destroy the parent cache unless the internal data object
+                // had been the only thing left in it
+                if (!isEmptyDataObject(cache[id])) {
+                    return;
+                }
+            }
+
+            // Destroy the cache
+            if (isNode) {
+                jQuery.cleanData([elem], true);
+
+                // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+            } else if (jQuery.support.deleteExpando || cache != cache.window) {
+                delete cache[id];
+
+                // When all else fails, null
+            } else {
+                cache[id] = null;
+            }
+        },
+
+        // For internal use only.
+        _data: function (elem, name, data) {
+            return jQuery.data(elem, name, data, true);
+        },
+
+        // A method for determining if a DOM node can handle the data expando
+        acceptData: function (elem) {
+            var noData = elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()];
+
+            // nodes accept data unless otherwise specified; rejection can be conditional
+            return !noData || noData !== true && elem.getAttribute("classid") === noData;
+        }
+    });
+
+    jQuery.fn.extend({
+        data: function (key, value) {
+            var parts, part, attr, name, l,
+                elem = this[0],
+                i = 0,
+                data = null;
+
+            // Gets all values
+            if (key === undefined) {
+                if (this.length) {
+                    data = jQuery.data(elem);
+
+                    if (elem.nodeType === 1 && !jQuery._data(elem, "parsedAttrs")) {
+                        attr = elem.attributes;
+                        for (l = attr.length; i < l; i++) {
+                            name = attr[i].name;
+
+                            if (!name.indexOf("data-")) {
+                                name = jQuery.camelCase(name.substring(5));
+
+                                dataAttr(elem, name, data[name]);
+                            }
+                        }
+                        jQuery._data(elem, "parsedAttrs", true);
+                    }
+                }
+
+                return data;
+            }
+
+            // Sets multiple values
+            if (typeof key === "object") {
+                return this.each(function () {
+                    jQuery.data(this, key);
+                });
+            }
+
+            parts = key.split(".", 2);
+            parts[1] = parts[1] ? "." + parts[1] : "";
+            part = parts[1] + "!";
+
+            return jQuery.access(this, function (value) {
+
+                if (value === undefined) {
+                    data = this.triggerHandler("getData" + part, [parts[0]]);
+
+                    // Try to fetch any internally stored data first
+                    if (data === undefined && elem) {
+                        data = jQuery.data(elem, key);
+                        data = dataAttr(elem, key, data);
+                    }
+
+                    return data === undefined && parts[1] ?
+                        this.data(parts[0]) :
+                        data;
+                }
+
+                parts[1] = value;
+                this.each(function () {
+                    var self = jQuery(this);
+
+                    self.triggerHandler("setData" + part, parts);
+                    jQuery.data(this, key, value);
+                    self.triggerHandler("changeData" + part, parts);
+                });
+            }, null, value, arguments.length > 1, null, false);
+        },
+
+        removeData: function (key) {
+            return this.each(function () {
+                jQuery.removeData(this, key);
+            });
+        }
+    });
+
+    function dataAttr(elem, key, data) {
+        // If nothing was found internally, try to fetch any
+        // data from the HTML5 data-* attribute
+        if (data === undefined && elem.nodeType === 1) {
+
+            var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase();
+
+            data = elem.getAttribute(name);
+
+            if (typeof data === "string") {
+                try {
+                    data = data === "true" ? true :
+                        data === "false" ? false :
+                            data === "null" ? null :
+                                // Only convert to a number if it doesn't change the string
+                                +data + "" === data ? +data :
+                                    rbrace.test(data) ? jQuery.parseJSON(data) :
+                                        data;
+                } catch (e) {
+                }
+
+                // Make sure we set the data so it isn't changed later
+                jQuery.data(elem, key, data);
+
+            } else {
+                data = undefined;
+            }
+        }
+
+        return data;
+    }
+
+// checks a cache object for emptiness
+    function isEmptyDataObject(obj) {
+        var name;
+        for (name in obj) {
+
+            // if the public data object is empty, the private is still empty
+            if (name === "data" && jQuery.isEmptyObject(obj[name])) {
+                continue;
+            }
+            if (name !== "toJSON") {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    jQuery.extend({
+        queue: function (elem, type, data) {
+            var queue;
+
+            if (elem) {
+                type = ( type || "fx" ) + "queue";
+                queue = jQuery._data(elem, type);
+
+                // Speed up dequeue by getting out quickly if this is just a lookup
+                if (data) {
+                    if (!queue || jQuery.isArray(data)) {
+                        queue = jQuery._data(elem, type, jQuery.makeArray(data));
+                    } else {
+                        queue.push(data);
+                    }
+                }
+                return queue || [];
+            }
+        },
+
+        dequeue: function (elem, type) {
+            type = type || "fx";
+
+            var queue = jQuery.queue(elem, type),
+                startLength = queue.length,
+                fn = queue.shift(),
+                hooks = jQuery._queueHooks(elem, type),
+                next = function () {
+                    jQuery.dequeue(elem, type);
+                };
+
+            // If the fx queue is dequeued, always remove the progress sentinel
+            if (fn === "inprogress") {
+                fn = queue.shift();
+                startLength--;
+            }
+
+            if (fn) {
+
+                // Add a progress sentinel to prevent the fx queue from being
+                // automatically dequeued
+                if (type === "fx") {
+                    queue.unshift("inprogress");
+                }
+
+                // clear up the last queue stop function
+                delete hooks.stop;
+                fn.call(elem, next, hooks);
+            }
+
+            if (!startLength && hooks) {
+                hooks.empty.fire();
+            }
+        },
+
+        // not intended for public consumption - generates a queueHooks object, or returns the current one
+        _queueHooks: function (elem, type) {
+            var key = type + "queueHooks";
+            return jQuery._data(elem, key) || jQuery._data(elem, key, {
+                    empty: jQuery.Callbacks("once memory").add(function () {
+                        jQuery.removeData(elem, type + "queue", true);
+                        jQuery.removeData(elem, key, true);
+                    })
+                });
+        }
+    });
+
+    jQuery.fn.extend({
+        queue: function (type, data) {
+            var setter = 2;
+
+            if (typeof type !== "string") {
+                data = type;
+                type = "fx";
+                setter--;
+            }
+
+            if (arguments.length < setter) {
+                return jQuery.queue(this[0], type);
+            }
+
+            return data === undefined ?
+                this :
+                this.each(function () {
+                    var queue = jQuery.queue(this, type, data);
+
+                    // ensure a hooks for this queue
+                    jQuery._queueHooks(this, type);
+
+                    if (type === "fx" && queue[0] !== "inprogress") {
+                        jQuery.dequeue(this, type);
+                    }
+                });
+        },
+        dequeue: function (type) {
+            return this.each(function () {
+                jQuery.dequeue(this, type);
+            });
+        },
+        // Based off of the plugin by Clint Helfers, with permission.
+        // http://blindsignals.com/index.php/2009/07/jquery-delay/
+        delay: function (time, type) {
+            time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+            type = type || "fx";
+
+            return this.queue(type, function (next, hooks) {
+                var timeout = setTimeout(next, time);
+                hooks.stop = function () {
+                    clearTimeout(timeout);
+                };
+            });
+        },
+        clearQueue: function (type) {
+            return this.queue(type || "fx", []);
+        },
+        // Get a promise resolved when queues of a certain type
+        // are emptied (fx is the type by default)
+        promise: function (type, obj) {
+            var tmp,
+                count = 1,
+                defer = jQuery.Deferred(),
+                elements = this,
+                i = this.length,
+                resolve = function () {
+                    if (!( --count )) {
+                        defer.resolveWith(elements, [elements]);
+                    }
+                };
+
+            if (typeof type !== "string") {
+                obj = type;
+                type = undefined;
+            }
+            type = type || "fx";
+
+            while (i--) {
+                tmp = jQuery._data(elements[i], type + "queueHooks");
+                if (tmp && tmp.empty) {
+                    count++;
+                    tmp.empty.add(resolve);
+                }
+            }
+            resolve();
+            return defer.promise(obj);
+        }
+    });
+    var nodeHook, boolHook, fixSpecified,
+        rclass = /[\t\r\n]/g,
+        rreturn = /\r/g,
+        rtype = /^(?:button|input)$/i,
+        rfocusable = /^(?:button|input|object|select|textarea)$/i,
+        rclickable = /^a(?:rea|)$/i,
+        rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+        getSetAttribute = jQuery.support.getSetAttribute;
+
+    jQuery.fn.extend({
+        attr: function (name, value) {
+            return jQuery.access(this, jQuery.attr, name, value, arguments.length > 1);
+        },
+
+        removeAttr: function (name) {
+            return this.each(function () {
+                jQuery.removeAttr(this, name);
+            });
+        },
+
+        prop: function (name, value) {
+            return jQuery.access(this, jQuery.prop, name, value, arguments.length > 1);
+        },
+
+        removeProp: function (name) {
+            name = jQuery.propFix[name] || name;
+            return this.each(function () {
+                // try/catch handles cases where IE balks (such as removing a property on window)
+                try {
+                    this[name] = undefined;
+                    delete this[name];
+                } catch (e) {
+                }
+            });
+        },
+
+        addClass: function (value) {
+            var classNames, i, l, elem,
+                setClass, c, cl;
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (j) {
+                    jQuery(this).addClass(value.call(this, j, this.className));
+                });
+            }
+
+            if (value && typeof value === "string") {
+                classNames = value.split(core_rspace);
+
+                for (i = 0, l = this.length; i < l; i++) {
+                    elem = this[i];
+
+                    if (elem.nodeType === 1) {
+                        if (!elem.className && classNames.length === 1) {
+                            elem.className = value;
+
+                        } else {
+                            setClass = " " + elem.className + " ";
+
+                            for (c = 0, cl = classNames.length; c < cl; c++) {
+                                if (setClass.indexOf(" " + classNames[c] + " ") < 0) {
+                                    setClass += classNames[c] + " ";
+                                }
+                            }
+                            elem.className = jQuery.trim(setClass);
+                        }
+                    }
+                }
+            }
+
+            return this;
+        },
+
+        removeClass: function (value) {
+            var removes, className, elem, c, cl, i, l;
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (j) {
+                    jQuery(this).removeClass(value.call(this, j, this.className));
+                });
+            }
+            if ((value && typeof value === "string") || value === undefined) {
+                removes = ( value || "" ).split(core_rspace);
+
+                for (i = 0, l = this.length; i < l; i++) {
+                    elem = this[i];
+                    if (elem.nodeType === 1 && elem.className) {
+
+                        className = (" " + elem.className + " ").replace(rclass, " ");
+
+                        // loop over each item in the removal list
+                        for (c = 0, cl = removes.length; c < cl; c++) {
+                            // Remove until there is nothing to remove,
+                            while (className.indexOf(" " + removes[c] + " ") >= 0) {
+                                className = className.replace(" " + removes[c] + " ", " ");
+                            }
+                        }
+                        elem.className = value ? jQuery.trim(className) : "";
+                    }
+                }
+            }
+
+            return this;
+        },
+
+        toggleClass: function (value, stateVal) {
+            var type = typeof value,
+                isBool = typeof stateVal === "boolean";
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (i) {
+                    jQuery(this).toggleClass(value.call(this, i, this.className, stateVal), stateVal);
+                });
+            }
+
+            return this.each(function () {
+                if (type === "string") {
+                    // toggle individual class names
+                    var className,
+                        i = 0,
+                        self = jQuery(this),
+                        state = stateVal,
+                        classNames = value.split(core_rspace);
+
+                    while ((className = classNames[i++])) {
+                        // check each className given, space separated list
+                        state = isBool ? state : !self.hasClass(className);
+                        self[state ? "addClass" : "removeClass"](className);
+                    }
+
+                } else if (type === "undefined" || type === "boolean") {
+                    if (this.className) {
+                        // store className if set
+                        jQuery._data(this, "__className__", this.className);
+                    }
+
+                    // toggle whole className
+                    this.className = this.className || value === false ? "" : jQuery._data(this, "__className__") || "";
+                }
+            });
+        },
+
+        hasClass: function (selector) {
+            var className = " " + selector + " ",
+                i = 0,
+                l = this.length;
+            for (; i < l; i++) {
+                if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf(className) >= 0) {
+                    return true;
+                }
+            }
+
+            return false;
+        },
+
+        val: function (value) {
+            var hooks, ret, isFunction,
+                elem = this[0];
+
+            if (!arguments.length) {
+                if (elem) {
+                    hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
+
+                    if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {
+                        return ret;
+                    }
+
+                    ret = elem.value;
+
+                    return typeof ret === "string" ?
+                        // handle most common string cases
+                        ret.replace(rreturn, "") :
+                        // handle cases where value is null/undef or number
+                        ret == null ? "" : ret;
+                }
+
+                return;
+            }
+
+            isFunction = jQuery.isFunction(value);
+
+            return this.each(function (i) {
+                var val,
+                    self = jQuery(this);
+
+                if (this.nodeType !== 1) {
+                    return;
+                }
+
+                if (isFunction) {
+                    val = value.call(this, i, self.val());
+                } else {
+                    val = value;
+                }
+
+                // Treat null/undefined as ""; convert numbers to string
+                if (val == null) {
+                    val = "";
+                } else if (typeof val === "number") {
+                    val += "";
+                } else if (jQuery.isArray(val)) {
+                    val = jQuery.map(val, function (value) {
+                        return value == null ? "" : value + "";
+                    });
+                }
+
+                hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
+
+                // If set returns undefined, fall back to normal setting
+                if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {
+                    this.value = val;
+                }
+            });
+        }
+    });
+
+    jQuery.extend({
+        valHooks: {
+            option: {
+                get: function (elem) {
+                    // attributes.value is undefined in Blackberry 4.7 but
+                    // uses .value. See #6932
+                    var val = elem.attributes.value;
+                    return !val || val.specified ? elem.value : elem.text;
+                }
+            },
+            select: {
+                get: function (elem) {
+                    var value, option,
+                        options = elem.options,
+                        index = elem.selectedIndex,
+                        one = elem.type === "select-one" || index < 0,
+                        values = one ? null : [],
+                        max = one ? index + 1 : options.length,
+                        i = index < 0 ?
+                            max :
+                            one ? index : 0;
+
+                    // Loop through all the selected options
+                    for (; i < max; i++) {
+                        option = options[i];
+
+                        // oldIE doesn't update selected after form reset (#2551)
+                        if (( option.selected || i === index ) &&
+                                // Don't return options that are disabled or in a disabled optgroup
+                            ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+                            ( !option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup") )) {
+
+                            // Get the specific value for the option
+                            value = jQuery(option).val();
+
+                            // We don't need an array for one selects
+                            if (one) {
+                                return value;
+                            }
+
+                            // Multi-Selects return an array
+                            values.push(value);
+                        }
+                    }
+
+                    return values;
+                },
+
+                set: function (elem, value) {
+                    var values = jQuery.makeArray(value);
+
+                    jQuery(elem).find("option").each(function () {
+                        this.selected = jQuery.inArray(jQuery(this).val(), values) >= 0;
+                    });
+
+                    if (!values.length) {
+                        elem.selectedIndex = -1;
+                    }
+                    return values;
+                }
+            }
+        },
+
+        // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9
+        attrFn: {},
+
+        attr: function (elem, name, value, pass) {
+            var ret, hooks, notxml,
+                nType = elem.nodeType;
+
+            // don't get/set attributes on text, comment and attribute nodes
+            if (!elem || nType === 3 || nType === 8 || nType === 2) {
+                return;
+            }
+
+            if (pass && jQuery.isFunction(jQuery.fn[name])) {
+                return jQuery(elem)[name](value);
+            }
+
+            // Fallback to prop when attributes are not supported
+            if (typeof elem.getAttribute === "undefined") {
+                return jQuery.prop(elem, name, value);
+            }
+
+            notxml = nType !== 1 || !jQuery.isXMLDoc(elem);
+
+            // All attributes are lowercase
+            // Grab necessary hook if one is defined
+            if (notxml) {
+                name = na

<TRUNCATED>

[26/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/jquery-ui.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/jquery-ui.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/jquery-ui.js
new file mode 100644
index 0000000..31ee9cd
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/jquery-ui.js
@@ -0,0 +1,16617 @@
+/*! jQuery UI - v1.11.4 - 2015-03-11
+* http://jqueryui.com
+* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+(function( factory ) {
+	if ( typeof define === "function" && define.amd ) {
+
+		// AMD. Register as an anonymous module.
+		define([ "jquery" ], factory );
+	} else {
+
+		// Browser globals
+		factory( jQuery );
+	}
+}(function( $ ) {
+/*!
+ * jQuery UI Core 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/category/ui-core/
+ */
+
+
+// $.ui might exist from components with no dependencies, e.g., $.ui.position
+$.ui = $.ui || {};
+
+$.extend( $.ui, {
+	version: "1.11.4",
+
+	keyCode: {
+		BACKSPACE: 8,
+		COMMA: 188,
+		DELETE: 46,
+		DOWN: 40,
+		END: 35,
+		ENTER: 13,
+		ESCAPE: 27,
+		HOME: 36,
+		LEFT: 37,
+		PAGE_DOWN: 34,
+		PAGE_UP: 33,
+		PERIOD: 190,
+		RIGHT: 39,
+		SPACE: 32,
+		TAB: 9,
+		UP: 38
+	}
+});
+
+// plugins
+$.fn.extend({
+	scrollParent: function( includeHidden ) {
+		var position = this.css( "position" ),
+			excludeStaticParent = position === "absolute",
+			overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
+			scrollParent = this.parents().filter( function() {
+				var parent = $( this );
+				if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
+					return false;
+				}
+				return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
+			}).eq( 0 );
+
+		return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
+	},
+
+	uniqueId: (function() {
+		var uuid = 0;
+
+		return function() {
+			return this.each(function() {
+				if ( !this.id ) {
+					this.id = "ui-id-" + ( ++uuid );
+				}
+			});
+		};
+	})(),
+
+	removeUniqueId: function() {
+		return this.each(function() {
+			if ( /^ui-id-\d+$/.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().addBack().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: 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.8
+if ( !$.fn.addBack ) {
+	$.fn.addBack = function( selector ) {
+		return this.add( selector == null ?
+			this.prevObject : this.prevObject.filter( selector )
+		);
+	};
+}
+
+// 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
+$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
+
+$.fn.extend({
+	focus: (function( orig ) {
+		return function( delay, fn ) {
+			return typeof delay === "number" ?
+				this.each(function() {
+					var elem = this;
+					setTimeout(function() {
+						$( elem ).focus();
+						if ( fn ) {
+							fn.call( elem );
+						}
+					}, delay );
+				}) :
+				orig.apply( this, arguments );
+		};
+	})( $.fn.focus ),
+
+	disableSelection: (function() {
+		var eventType = "onselectstart" in document.createElement( "div" ) ?
+			"selectstart" :
+			"mousedown";
+
+		return function() {
+			return this.bind( eventType + ".ui-disableSelection", function( event ) {
+				event.preventDefault();
+			});
+		};
+	})(),
+
+	enableSelection: function() {
+		return this.unbind( ".ui-disableSelection" );
+	},
+
+	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;
+	}
+});
+
+// $.ui.plugin is deprecated. Use $.widget() extensions instead.
+$.ui.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, allowDisconnected ) {
+		var i,
+			set = instance.plugins[ name ];
+
+		if ( !set ) {
+			return;
+		}
+
+		if ( !allowDisconnected && ( !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 );
+			}
+		}
+	}
+};
+
+
+/*!
+ * jQuery UI Widget 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/jQuery.widget/
+ */
+
+
+var widget_uuid = 0,
+	widget_slice = Array.prototype.slice;
+
+$.cleanData = (function( orig ) {
+	return function( elems ) {
+		var events, elem, i;
+		for ( i = 0; (elem = elems[i]) != null; i++ ) {
+			try {
+
+				// Only trigger remove when necessary to save time
+				events = $._data( elem, "events" );
+				if ( events && events.remove ) {
+					$( elem ).triggerHandler( "remove" );
+				}
+
+			// http://bugs.jquery.com/ticket/8235
+			} catch ( e ) {}
+		}
+		orig( elems );
+	};
+})( $.cleanData );
+
+$.widget = function( name, base, prototype ) {
+	var fullName, existingConstructor, constructor, basePrototype,
+		// proxiedPrototype allows the provided prototype to remain unmodified
+		// so that it can be used as a mixin for multiple widgets (#8876)
+		proxiedPrototype = {},
+		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 ) ) {
+			proxiedPrototype[ prop ] = value;
+			return;
+		}
+		proxiedPrototype[ 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) : name
+	}, proxiedPrototype, {
+		constructor: constructor,
+		namespace: namespace,
+		widgetName: name,
+		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 );
+
+	return constructor;
+};
+
+$.widget.extend = function( target ) {
+	var input = widget_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 = widget_slice.call( arguments, 1 ),
+			returnValue = this;
+
+		if ( isMethodCall ) {
+			this.each(function() {
+				var methodValue,
+					instance = $.data( this, fullName );
+				if ( options === "instance" ) {
+					returnValue = instance;
+					return false;
+				}
+				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 {
+
+			// Allow multiple hashes to be passed on init
+			if ( args.length ) {
+				options = $.widget.extend.apply( null, [ options ].concat(args) );
+			}
+
+			this.each(function() {
+				var instance = $.data( this, fullName );
+				if ( instance ) {
+					instance.option( options || {} );
+					if ( instance._init ) {
+						instance._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 = widget_uuid++;
+		this.eventNamespace = "." + this.widgetName + this.uuid;
+
+		this.bindings = $();
+		this.hoverable = $();
+		this.focusable = $();
+
+		if ( element !== 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.options = $.widget.extend( {},
+			this.options,
+			this._getCreateOptions(),
+			options );
+
+		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 )
+			.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 ( arguments.length === 1 ) {
+					return curOption[ key ] === undefined ? null : curOption[ key ];
+				}
+				curOption[ key ] = value;
+			} else {
+				if ( arguments.length === 1 ) {
+					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", !!value );
+
+			// If the widget is becoming disabled, then nothing is interactive
+			if ( value ) {
+				this.hoverable.removeClass( "ui-state-hover" );
+				this.focusable.removeClass( "ui-state-focus" );
+			}
+		}
+
+		return this;
+	},
+
+	enable: function() {
+		return this._setOptions({ disabled: false });
+	},
+	disable: function() {
+		return this._setOptions({ 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 {
+			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 );
+
+		// Clear the stack to avoid memory leaks (#10056)
+		this.bindings = $( this.bindings.not( element ).get() );
+		this.focusable = $( this.focusable.not( element ).get() );
+		this.hoverable = $( this.hoverable.not( element ).get() );
+	},
+
+	_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 ] ) {
+			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();
+			});
+		}
+	};
+});
+
+var widget = $.widget;
+
+
+/*!
+ * jQuery UI Mouse 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/mouse/
+ */
+
+
+var mouseHandled = false;
+$( document ).mouseup( function() {
+	mouseHandled = false;
+});
+
+var mouse = $.widget("ui.mouse", {
+	version: "1.11.4",
+	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 ) {
+			this.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;
+		}
+
+		this._mouseMoved = false;
+
+		// 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);
+		};
+
+		this.document
+			.bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
+			.bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
+
+		event.preventDefault();
+
+		mouseHandled = true;
+		return true;
+	},
+
+	_mouseMove: function(event) {
+		// Only check for mouseups outside the document if you've moved inside the document
+		// at least once. This prevents the firing of mouseup in the case of IE<9, which will
+		// fire a mousemove event if content is placed under the cursor. See #7778
+		// Support: IE <9
+		if ( this._mouseMoved ) {
+			// IE mouseup check - mouseup happened when mouse was out of window
+			if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
+				return this._mouseUp(event);
+
+			// Iframe mouseup check - mouseup occurred in another document
+			} else if ( !event.which ) {
+				return this._mouseUp( event );
+			}
+		}
+
+		if ( event.which || event.button ) {
+			this._mouseMoved = true;
+		}
+
+		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) {
+		this.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);
+		}
+
+		mouseHandled = false;
+		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 UI Position 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/position/
+ */
+
+(function() {
+
+$.ui = $.ui || {};
+
+var cachedScrollbarWidth, supportsOffsetFractions,
+	max = Math.max,
+	abs = Math.abs,
+	round = Math.round,
+	rhorizontal = /left|center|right/,
+	rvertical = /top|center|bottom/,
+	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
+	rposition = /^\w+/,
+	rpercent = /%$/,
+	_position = $.fn.position;
+
+function getOffsets( offsets, width, height ) {
+	return [
+		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
+		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
+	];
+}
+
+function parseCss( element, property ) {
+	return parseInt( $.css( element, property ), 10 ) || 0;
+}
+
+function getDimensions( elem ) {
+	var raw = elem[0];
+	if ( raw.nodeType === 9 ) {
+		return {
+			width: elem.width(),
+			height: elem.height(),
+			offset: { top: 0, left: 0 }
+		};
+	}
+	if ( $.isWindow( raw ) ) {
+		return {
+			width: elem.width(),
+			height: elem.height(),
+			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
+		};
+	}
+	if ( raw.preventDefault ) {
+		return {
+			width: 0,
+			height: 0,
+			offset: { top: raw.pageY, left: raw.pageX }
+		};
+	}
+	return {
+		width: elem.outerWidth(),
+		height: elem.outerHeight(),
+		offset: elem.offset()
+	};
+}
+
+$.position = {
+	scrollbarWidth: function() {
+		if ( cachedScrollbarWidth !== undefined ) {
+			return cachedScrollbarWidth;
+		}
+		var w1, w2,
+			div = $( "<div style='display:block;position:absolute;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.isDocument ? "" :
+				within.element.css( "overflow-x" ),
+			overflowY = within.isWindow || within.isDocument ? "" :
+				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: hasOverflowY ? $.position.scrollbarWidth() : 0,
+			height: hasOverflowX ? $.position.scrollbarWidth() : 0
+		};
+	},
+	getWithinInfo: function( element ) {
+		var withinElement = $( element || window ),
+			isWindow = $.isWindow( withinElement[0] ),
+			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
+		return {
+			element: withinElement,
+			isWindow: isWindow,
+			isDocument: isDocument,
+			offset: withinElement.offset() || { left: 0, top: 0 },
+			scrollLeft: withinElement.scrollLeft(),
+			scrollTop: withinElement.scrollTop(),
+
+			// support: jQuery 1.6.x
+			// jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
+			width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
+			height: isWindow || isDocument ? 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, dimensions,
+		target = $( options.of ),
+		within = $.position.getWithinInfo( options.within ),
+		scrollInfo = $.position.getScrollInfo( within ),
+		collision = ( options.collision || "flip" ).split( " " ),
+		offsets = {};
+
+	dimensions = getDimensions( target );
+	if ( target[0].preventDefault ) {
+		// force left top to allow flipping
+		options.at = "left top";
+	}
+	targetWidth = dimensions.width;
+	targetHeight = dimensions.height;
+	targetOffset = dimensions.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 ( !supportsOffsetFractions ) {
+			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 ( 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 ( 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 ( 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;
+	supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
+
+	testElement.innerHTML = "";
+	testElementParent.removeChild( testElement );
+})();
+
+})();
+
+var position = $.ui.position;
+
+
+/*!
+ * jQuery UI Accordion 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/accordion/
+ */
+
+
+var accordion = $.widget( "ui.accordion", {
+	version: "1.11.4",
+	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
+	},
+
+	hideProps: {
+		borderTopWidth: "hide",
+		borderBottomWidth: "hide",
+		paddingTop: "hide",
+		paddingBottom: "hide",
+		height: "hide"
+	},
+
+	showProps: {
+		borderTopWidth: "show",
+		borderBottomWidth: "show",
+		paddingTop: "show",
+		paddingBottom: "show",
+		height: "show"
+	},
+
+	_create: function() {
+		var options = this.options;
+		this.prevShow = this.prevHide = $();
+		this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
+			// ARIA
+			.attr( "role", "tablist" );
+
+		// don't allow collapsible: false and active: false / null
+		if ( !options.collapsible && (options.active === false || options.active == null) ) {
+			options.active = 0;
+		}
+
+		this._processPanels();
+		// handle negative values
+		if ( options.active < 0 ) {
+			options.active += this.headers.length;
+		}
+		this._refresh();
+	},
+
+	_getCreateEventData: function() {
+		return {
+			header: this.active,
+			panel: !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-state-default " +
+				"ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
+			.removeAttr( "role" )
+			.removeAttr( "aria-expanded" )
+			.removeAttr( "aria-selected" )
+			.removeAttr( "aria-controls" )
+			.removeAttr( "tabIndex" )
+			.removeUniqueId();
+
+		this._destroyIcons();
+
+		// clean up content panels
+		contents = this.headers.next()
+			.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " +
+				"ui-accordion-content ui-accordion-content-active ui-state-disabled" )
+			.css( "display", "" )
+			.removeAttr( "role" )
+			.removeAttr( "aria-hidden" )
+			.removeAttr( "aria-labelledby" )
+			.removeUniqueId();
+
+		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.element
+				.toggleClass( "ui-state-disabled", !!value )
+				.attr( "aria-disabled", value );
+			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 options = this.options;
+		this._processPanels();
+
+		// was collapsed or no panel
+		if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
+			options.active = false;
+			this.active = $();
+		// active false only when collapsible is true
+		} else if ( options.active === false ) {
+			this._activate( 0 );
+		// was active, but active panel is gone
+		} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
+			// all remaining panel are disabled
+			if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
+				options.active = false;
+				this.active = $();
+			// activate previous panel
+			} else {
+				this._activate( Math.max( 0, options.active - 1 ) );
+			}
+		// was active, active panel still exists
+		} else {
+			// make sure active index is correct
+			options.active = this.headers.index( this.active );
+		}
+
+		this._destroyIcons();
+
+		this._refresh();
+	},
+
+	_processPanels: function() {
+		var prevHeaders = this.headers,
+			prevPanels = this.panels;
+
+		this.headers = this.element.find( this.options.header )
+			.addClass( "ui-accordion-header ui-state-default ui-corner-all" );
+
+		this.panels = this.headers.next()
+			.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
+			.filter( ":not(.ui-accordion-content-active)" )
+			.hide();
+
+		// Avoid memory leaks (#10056)
+		if ( prevPanels ) {
+			this._off( prevHeaders.not( this.headers ) );
+			this._off( prevPanels.not( this.panels ) );
+		}
+	},
+
+	_refresh: function() {
+		var maxHeight,
+			options = this.options,
+			heightStyle = options.heightStyle,
+			parent = this.element.parent();
+
+		this.active = this._findActive( options.active )
+			.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
+			.removeClass( "ui-corner-all" );
+		this.active.next()
+			.addClass( "ui-accordion-content-active" )
+			.show();
+
+		this.headers
+			.attr( "role", "tab" )
+			.each(function() {
+				var header = $( this ),
+					headerId = header.uniqueId().attr( "id" ),
+					panel = header.next(),
+					panelId = panel.uniqueId().attr( "id" );
+				header.attr( "aria-controls", panelId );
+				panel.attr( "aria-labelledby", headerId );
+			})
+			.next()
+				.attr( "role", "tabpanel" );
+
+		this.headers
+			.not( this.active )
+			.attr({
+				"aria-selected": "false",
+				"aria-expanded": "false",
+				tabIndex: -1
+			})
+			.next()
+				.attr({
+					"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",
+				"aria-expanded": "true",
+				tabIndex: 0
+			})
+			.next()
+				.attr({
+					"aria-hidden": "false"
+				});
+		}
+
+		this._createIcons();
+
+		this._setupEvents( options.event );
+
+		if ( heightStyle === "fill" ) {
+			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 );
+			});
+
+			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 = {
+			keydown: "_keydown"
+		};
+		if ( event ) {
+			$.each( event.split( " " ), function( index, eventName ) {
+				events[ eventName ] = "_eventHandler";
+			});
+		}
+
+		this._off( this.headers.add( this.headers.next() ) );
+		this._on( this.headers, events );
+		this._on( this.headers.next(), { keydown: "_panelKeyDown" });
+		this._hoverable( this.headers );
+		this._focusable( this.headers );
+	},
+
+	_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-hidden": "true"
+		});
+		toHide.prev().attr({
+			"aria-selected": "false",
+			"aria-expanded": "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,
+				"aria-expanded": "false"
+			});
+		} else if ( toShow.length ) {
+			this.headers.filter(function() {
+				return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
+			})
+			.attr( "tabIndex", -1 );
+		}
+
+		toShow
+			.attr( "aria-hidden", "false" )
+			.prev()
+				.attr({
+					"aria-selected": "true",
+					"aria-expanded": "true",
+					tabIndex: 0
+				});
+	},
+
+	_animate: function( toShow, toHide, data ) {
+		var total, easing, duration,
+			that = this,
+			adjust = 0,
+			boxSizing = toShow.css( "box-sizing" ),
+			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( this.showProps, duration, easing, complete );
+		}
+		if ( !toShow.length ) {
+			return toHide.animate( this.hideProps, duration, easing, complete );
+		}
+
+		total = toShow.show().outerHeight();
+		toHide.animate( this.hideProps, {
+			duration: duration,
+			easing: easing,
+			step: function( now, fx ) {
+				fx.now = Math.round( now );
+			}
+		});
+		toShow
+			.hide()
+			.animate( this.showProps, {
+				duration: duration,
+				easing: easing,
+				complete: complete,
+				step: function( now, fx ) {
+					fx.now = Math.round( now );
+					if ( fx.prop !== "height" ) {
+						if ( boxSizing === "content-box" ) {
+							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 );
+	}
+});
+
+
+/*!
+ * jQuery UI Menu 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/menu/
+ */
+
+
+var menu = $.widget( "ui.menu", {
+	version: "1.11.4",
+	defaultElement: "<ul>",
+	delay: 300,
+	options: {
+		icons: {
+			submenu: "ui-icon-carat-1-e"
+		},
+		items: "> *",
+		menus: "ul",
+		position: {
+			my: "left-1 top",
+			at: "right top"
+		},
+		role: "menu",
+
+		// callbacks
+		blur: null,
+		focus: null,
+		select: null
+	},
+
+	_create: function() {
+		this.activeMenu = this.element;
+
+		// Flag used to prevent firing of the click handler
+		// as the event bubbles up through nested menus
+		this.mouseHandled = false;
+		this.element
+			.uniqueId()
+			.addClass( "ui-menu ui-widget ui-widget-content" )
+			.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
+			.attr({
+				role: this.options.role,
+				tabIndex: 0
+			});
+
+		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": function( event ) {
+				event.preventDefault();
+			},
+			"click .ui-menu-item": function( event ) {
+				var target = $( event.target );
+				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
+					this.select( event );
+
+					// Only set the mouseHandled flag if the event will bubble, see #9469.
+					if ( !event.isPropagationStopped() ) {
+						this.mouseHandled = true;
+					}
+
+					// Open submenu on click
+					if ( target.has( ".ui-menu" ).length ) {
+						this.expand( event );
+					} else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
+
+						// 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 ) {
+				// Ignore mouse events while typeahead is active, see #10458.
+				// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
+				// is over an item in the menu
+				if ( this.previousFilter ) {
+					return;
+				}
+				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( ".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.find( this.options.items ).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 ( this._closeOnDocumentClick( event ) ) {
+					this.collapseAll( event );
+				}
+
+				// Reset the mouseHandled flag
+				this.mouseHandled = false;
+			}
+		});
+	},
+
+	_destroy: function() {
+		// Destroy (sub)menus
+		this.element
+			.removeAttr( "aria-activedescendant" )
+			.find( ".ui-menu" ).addBack()
+				.removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
+				.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" )
+			.removeUniqueId()
+			.removeClass( "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,
+			preventDefault = true;
+
+		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;
+			}
+
+			match = this._filterMenuItems( character );
+			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 );
+				match = this._filterMenuItems( character );
+			}
+
+			if ( match.length ) {
+				this.focus( event, match );
+				this.previousFilter = character;
+				this.filterTimer = this._delay(function() {
+					delete this.previousFilter;
+				}, 1000 );
+			} else {
+				delete this.previousFilter;
+			}
+		}
+
+		if ( preventDefault ) {
+			event.preventDefault();
+		}
+	},
+
+	_activate: function( event ) {
+		if ( !this.active.is( ".ui-state-disabled" ) ) {
+			if ( this.active.is( "[aria-haspopup='true']" ) ) {
+				this.expand( event );
+			} else {
+				this.select( event );
+			}
+		}
+	},
+
+	refresh: function() {
+		var menus, items,
+			that = this,
+			icon = this.options.icons.submenu,
+			submenus = this.element.find( this.options.menus );
+
+		this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
+
+		// Initialize nested menus
+		submenus.filter( ":not(.ui-menu)" )
+			.addClass( "ui-menu ui-widget ui-widget-content ui-front" )
+			.hide()
+			.attr({
+				role: this.options.role,
+				"aria-hidden": "true",
+				"aria-expanded": "false"
+			})
+			.each(function() {
+				var menu = $( this ),
+					item = menu.parent(),
+					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 );
+		items = menus.find( this.options.items );
+
+		// Initialize menu-items containing spaces and/or dashes only as dividers
+		items.not( ".ui-menu-item" ).each(function() {
+			var item = $( this );
+			if ( that._isDivider( item ) ) {
+				item.addClass( "ui-widget-content ui-menu-divider" );
+			}
+		});
+
+		// Don't refresh list items that are already adapted
+		items.not( ".ui-menu-item, .ui-menu-divider" )
+			.addClass( "ui-menu-item" )
+			.uniqueId()
+			.attr({
+				tabIndex: -1,
+				role: this._itemRole()
+			});
+
+		// Add aria-disabled attribute to any disabled menu item
+		items.filter( ".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 ];
+	},
+
+	_setOption: function( key, value ) {
+		if ( key === "icons" ) {
+			this.element.find( ".ui-menu-icon" )
+				.removeClass( this.options.icons.submenu )
+				.addClass( value.submenu );
+		}
+		if ( key === "disabled" ) {
+			this.element
+				.toggleClass( "ui-state-disabled", !!value )
+				.attr( "aria-disabled", value );
+		}
+		this._super( key, value );
+	},
+
+	focus: function( event, item ) {
+		var nested, focused;
+		this.blur( event, event && event.type === "focus" );
+
+		this._scrollIntoView( item );
+
+		this.active = item.first();
+		focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
+		// 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" )
+			.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 && event && ( /^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.outerHeight();
+
+			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.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( ".ui-state-active" ).not( ".ui-state-focus" )
+				.removeClass( "ui-state-active" );
+	},
+
+	_closeOnDocumentClick: function( event ) {
+		return !$( event.target ).closest( ".ui-menu" ).length;
+	},
+
+	_isDivider: function( item ) {
+
+		// Match hyphen, em dash, en dash
+		return !/[^\-\u2014\u2013\s]/.test( item.text() );
+	},
+
+	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 " )
+				.find( this.options.items )
+				.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.find( this.options.items )[ 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.find( this.options.items )
+				[ !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.find( this.options.items ).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 );
+	},
+
+	_filterMenuItems: function(character) {
+		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
+			regex = new RegExp( "^" + escapedCharacter, "i" );
+
+		return this.activeMenu
+			.find( this.options.items )
+
+			// Only match on items, not dividers or other content (#10571)
+			.filter( ".ui-menu-item" )
+			.filter(function() {
+				return regex.test( $.trim( $( this ).text() ) );
+			});
+	}
+});
+
+
+/*!
+ * jQuery UI Autocomplete 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/autocomplete/
+ */
+
+
+$.widget( "ui.autocomplete", {
+	version: "1.11.4",
+	defaultElement: "<input>",
+	options: {
+		appendTo: null,
+		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
+	},
+
+	requestIndex: 0,
+	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,
+			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
+			isTextarea = nodeName === "textarea",
+			isInput = nodeName === "input";
+
+		this.isMultiLine =
+			// Textareas are always multi-line
+			isTextarea ? true :
+			// Inputs are always single-line, even if inside a contentEditable element
+			// IE also treats inputs as contentEditable
+			isInput ? false :
+			// All other element types are determined by whether or not they're contentEditable
+			this.element.prop( "isContentEditable" );
+
+		this.valueMethod = this.element[ isTextarea || isInput ? "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:
+					// 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" ) ) {
+						if ( !this.isMultiLine ) {
+							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;
+					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
+						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 ui-front" )
+			.appendTo( this._appendTo() )
+			.menu({
+				// disable ARIA support, the live region takes care of that
+				role: null
+			})
+			.hide()
+			.menu( "instance" );
+
+		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 ) {
+				var label, item;
+				// support: Firefox
+				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
+				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;
+					}
+				}
+
+				item = ui.item.data( "ui-autocomplete-item" );
+				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 );
+					}
+				}
+
+				// Announce the value in the liveRegion
+				label = ui.item.attr( "aria-label" ) || item.value;
+				if ( label && $.trim( label ).length ) {
+					this.liveRegion.children().hide();
+					$( "<div>" ).text( label ).appendTo( this.liveRegion );
+				}
+			},
+			menuselect: function( event, ui ) {
+				var item = ui.item.data( "ui-autocomplete-item" ),
+					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": "assertive",
+				"aria-relevant": "additions"
+			})
+			.addClass( "ui-helper-hidden-accessible" )
+			.appendTo( this.document[ 0 ].body );
+
+		// 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._appendTo() );
+		}
+		if ( key === "disabled" && value && this.xhr ) {
+			this.xhr.abort();
+		}
+	},
+
+	_appendTo: function() {
+		var element = this.opti

<TRUNCATED>

[28/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/vega.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/vega.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/vega.js
new file mode 100644
index 0000000..cd6eb78
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/vega.js
@@ -0,0 +1,8006 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+// Define module using Universal Module Definition pattern
+// https://github.com/umdjs/umd/blob/master/amdWeb.js
+
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // Support AMD. Register as an anonymous module.
+        // NOTE: List all dependencies in AMD style
+        define(['d3.min', 'topojson'], factory);
+    } else {
+        // No AMD. Set module as a global variable
+        // NOTE: Pass dependencies to factory function
+        // (assume that both d3 and topojson are also global.)
+        var tj = (typeof topojson === 'undefined') ? null : topojson;
+        vg = factory(d3, tj);
+    }
+}(
+//NOTE: The dependencies are passed to this function
+    function (d3, topojson) {
+//---------------------------------------------------
+// BEGIN code for this module
+//---------------------------------------------------
+
+        var vg = {
+            version: "1.4.3", // semantic versioning
+            d3: d3,      // stash d3 for use in property functions
+            topojson: topojson // stash topojson similarly
+        };
+// type checking functions
+        var toString = Object.prototype.toString;
+
+        vg.isObject = function (obj) {
+            return obj === Object(obj);
+        };
+
+        vg.isFunction = function (obj) {
+            return toString.call(obj) == '[object Function]';
+        };
+
+        vg.isString = function (obj) {
+            return toString.call(obj) == '[object String]';
+        };
+
+        vg.isArray = Array.isArray || function (obj) {
+                return toString.call(obj) == '[object Array]';
+            };
+
+        vg.isNumber = function (obj) {
+            return toString.call(obj) == '[object Number]';
+        };
+
+        vg.isBoolean = function (obj) {
+            return toString.call(obj) == '[object Boolean]';
+        };
+
+        vg.isTree = function (obj) {
+            return obj && obj.__vgtree__;
+        };
+
+        vg.tree = function (obj, children) {
+            var d = [obj];
+            d.__vgtree__ = true;
+            d.children = children || "children";
+            return d;
+        };
+
+        vg.number = function (s) {
+            return +s;
+        };
+
+        vg.boolean = function (s) {
+            return !!s;
+        };
+
+// utility functions
+
+        vg.identity = function (x) {
+            return x;
+        };
+
+        vg.true = function () {
+            return true;
+        };
+
+        vg.extend = function (obj) {
+            for (var x, name, i = 1, len = arguments.length; i < len; ++i) {
+                x = arguments[i];
+                for (name in x) {
+                    obj[name] = x[name];
+                }
+            }
+            return obj;
+        };
+
+        vg.duplicate = function (obj) {
+            return JSON.parse(JSON.stringify(obj));
+        };
+
+        vg.field = function (f) {
+            return f.split("\\.")
+                .map(function (d) {
+                    return d.split(".");
+                })
+                .reduce(function (a, b) {
+                    if (a.length) {
+                        a[a.length - 1] += "." + b.shift();
+                    }
+                    a.push.apply(a, b);
+                    return a;
+                }, []);
+        };
+
+        vg.accessor = function (f) {
+            var s;
+            return (vg.isFunction(f) || f == null)
+                ? f : vg.isString(f) && (s = vg.field(f)).length > 1
+                ? function (x) {
+                return s.reduce(function (x, f) {
+                    return x[f];
+                }, x);
+            }
+                : function (x) {
+                return x[f];
+            };
+        };
+
+        vg.mutator = function (f) {
+            var s;
+            return vg.isString(f) && (s = vg.field(f)).length > 1
+                ? function (x, v) {
+                for (var i = 0; i < s.length - 1; ++i) x = x[s[i]];
+                x[s[i]] = v;
+            }
+                : function (x, v) {
+                x[f] = v;
+            };
+        };
+
+        vg.comparator = function (sort) {
+            var sign = [];
+            if (sort === undefined) sort = [];
+            sort = vg.array(sort).map(function (f) {
+                var s = 1;
+                if (f[0] === "-") {
+                    s = -1;
+                    f = f.slice(1);
+                }
+                else if (f[0] === "+") {
+                    s = +1;
+                    f = f.slice(1);
+                }
+                sign.push(s);
+                return vg.accessor(f);
+            });
+            return function (a, b) {
+                var i, n, f, x, y;
+                for (i = 0, n = sort.length; i < n; ++i) {
+                    f = sort[i];
+                    x = f(a);
+                    y = f(b);
+                    if (x < y) return -1 * sign[i];
+                    if (x > y) return sign[i];
+                }
+                return 0;
+            };
+        };
+
+        vg.cmp = function (a, b) {
+            return a < b ? -1 : a > b ? 1 : 0;
+        };
+
+        vg.numcmp = function (a, b) {
+            return a - b;
+        };
+
+        vg.array = function (x) {
+            return x != null ? (vg.isArray(x) ? x : [x]) : [];
+        };
+
+        vg.values = function (x) {
+            return (vg.isObject(x) && !vg.isArray(x) && x.values) ? x.values : x;
+        };
+
+        vg.str = function (x) {
+            return vg.isArray(x) ? "[" + x.map(vg.str) + "]"
+                : vg.isObject(x) ? JSON.stringify(x)
+                : vg.isString(x) ? ("'" + vg_escape_str(x) + "'") : x;
+        };
+
+        var escape_str_re = /(^|[^\\])'/g;
+
+        function vg_escape_str(x) {
+            return x.replace(escape_str_re, "$1\\'");
+        }
+
+        vg.keys = function (x) {
+            var keys = [];
+            for (var key in x) keys.push(key);
+            return keys;
+        };
+
+        vg.unique = function (data, f, results) {
+            if (!vg.isArray(data) || data.length == 0) return [];
+            f = f || vg.identity;
+            results = results || [];
+            for (var v, i = 0, n = data.length; i < n; ++i) {
+                v = f(data[i]);
+                if (results.indexOf(v) < 0) results.push(v);
+            }
+            return results;
+        };
+
+        vg.minIndex = function (data, f) {
+            if (!vg.isArray(data) || data.length == 0) return -1;
+            f = f || vg.identity;
+            var idx = 0, min = f(data[0]), v = min;
+            for (var i = 1, n = data.length; i < n; ++i) {
+                v = f(data[i]);
+                if (v < min) {
+                    min = v;
+                    idx = i;
+                }
+            }
+            return idx;
+        };
+
+        vg.maxIndex = function (data, f) {
+            if (!vg.isArray(data) || data.length == 0) return -1;
+            f = f || vg.identity;
+            var idx = 0, max = f(data[0]), v = max;
+            for (var i = 1, n = data.length; i < n; ++i) {
+                v = f(data[i]);
+                if (v > max) {
+                    max = v;
+                    idx = i;
+                }
+            }
+            return idx;
+        };
+
+        vg.truncate = function (s, length, pos, word, ellipsis) {
+            var len = s.length;
+            if (len <= length) return s;
+            ellipsis = ellipsis || "...";
+            var l = Math.max(0, length - ellipsis.length);
+
+            switch (pos) {
+                case "left":
+                    return ellipsis + (word ? vg_truncateOnWord(s, l, 1) : s.slice(len - l));
+                case "middle":
+                case "center":
+                    var l1 = Math.ceil(l / 2), l2 = Math.floor(l / 2);
+                    return (word ? vg_truncateOnWord(s, l1) : s.slice(0, l1)) + ellipsis
+                        + (word ? vg_truncateOnWord(s, l2, 1) : s.slice(len - l2));
+                default:
+                    return (word ? vg_truncateOnWord(s, l) : s.slice(0, l)) + ellipsis;
+            }
+        }
+
+        function vg_truncateOnWord(s, len, rev) {
+            var cnt = 0, tok = s.split(vg_truncate_word_re);
+            if (rev) {
+                s = (tok = tok.reverse())
+                    .filter(function (w) {
+                        cnt += w.length;
+                        return cnt <= len;
+                    })
+                    .reverse();
+            } else {
+                s = tok.filter(function (w) {
+                    cnt += w.length;
+                    return cnt <= len;
+                });
+            }
+            return s.length ? s.join("").trim() : tok[0].slice(0, len);
+        }
+
+        var vg_truncate_word_re = /([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/;
+
+// Logging
+
+        function vg_write(msg) {
+            vg.config.isNode
+                ? process.stderr.write(msg + "\n")
+                : console.log(msg);
+        }
+
+        vg.log = function (msg) {
+            vg_write("[Vega Log] " + msg);
+        };
+
+        vg.error = function (msg) {
+            msg = "[Vega Err] " + msg;
+            vg_write(msg);
+            if (typeof alert !== "undefined") alert(msg);
+        };
+        vg.config = {};
+
+// are we running in node.js?
+// via timetler.com/2012/10/13/environment-detection-in-javascript/
+        vg.config.isNode = typeof exports !== 'undefined' && this.exports !== exports;
+
+// Allows domain restriction when using data loading via XHR.
+// To enable, set it to a list of allowed domains
+// e.g., ['wikipedia.org', 'eff.org']
+        vg.config.domainWhiteList = false;
+
+// If true, disable potentially unsafe transforms (filter, formula)
+// involving possible JavaScript injection attacks.
+        vg.config.safeMode = false;
+
+// base url for loading external data files
+// used only for server-side operation
+        vg.config.baseURL = "";
+
+// version and namepsaces for exported svg
+        vg.config.svgNamespace =
+            'version="1.1" xmlns="http://www.w3.org/2000/svg" ' +
+            'xmlns:xlink="http://www.w3.org/1999/xlink"';
+
+// inset padding for automatic padding calculation
+        vg.config.autopadInset = 5;
+
+// extensible scale lookup table
+// all d3.scale.* instances also supported
+        vg.config.scale = {
+            time: d3.time.scale,
+            utc: d3.time.scale.utc
+        };
+
+// default rendering settings
+        vg.config.render = {
+            lineWidth: 1,
+            lineCap: "butt",
+            font: "sans-serif",
+            fontSize: 11
+        };
+
+// default axis properties
+        vg.config.axis = {
+            orient: "bottom",
+            ticks: 10,
+            padding: 3,
+            axisColor: "#000",
+            gridColor: "#d8d8d8",
+            tickColor: "#000",
+            tickLabelColor: "#000",
+            axisWidth: 1,
+            tickWidth: 1,
+            tickSize: 6,
+            tickLabelFontSize: 11,
+            tickLabelFont: "sans-serif",
+            titleColor: "#000",
+            titleFont: "sans-serif",
+            titleFontSize: 11,
+            titleFontWeight: "bold",
+            titleOffset: 35
+        };
+
+// default legend properties
+        vg.config.legend = {
+            orient: "right",
+            offset: 10,
+            padding: 3,
+            gradientStrokeColor: "#888",
+            gradientStrokeWidth: 1,
+            gradientHeight: 16,
+            gradientWidth: 100,
+            labelColor: "#000",
+            labelFontSize: 10,
+            labelFont: "sans-serif",
+            labelAlign: "left",
+            labelBaseline: "middle",
+            labelOffset: 8,
+            symbolShape: "circle",
+            symbolSize: 50,
+            symbolColor: "#888",
+            symbolStrokeWidth: 1,
+            titleColor: "#000",
+            titleFont: "sans-serif",
+            titleFontSize: 11,
+            titleFontWeight: "bold"
+        };
+
+// default color values
+        vg.config.color = {
+            rgb: [128, 128, 128],
+            lab: [50, 0, 0],
+            hcl: [0, 0, 50],
+            hsl: [0, 0, 0.5]
+        };
+
+// default scale ranges
+        vg.config.range = {
+            category10: [
+                "#1f77b4",
+                "#ff7f0e",
+                "#2ca02c",
+                "#d62728",
+                "#9467bd",
+                "#8c564b",
+                "#e377c2",
+                "#7f7f7f",
+                "#bcbd22",
+                "#17becf"
+            ],
+            category20: [
+                "#1f77b4",
+                "#aec7e8",
+                "#ff7f0e",
+                "#ffbb78",
+                "#2ca02c",
+                "#98df8a",
+                "#d62728",
+                "#ff9896",
+                "#9467bd",
+                "#c5b0d5",
+                "#8c564b",
+                "#c49c94",
+                "#e377c2",
+                "#f7b6d2",
+                "#7f7f7f",
+                "#c7c7c7",
+                "#bcbd22",
+                "#dbdb8d",
+                "#17becf",
+                "#9edae5"
+            ],
+            shapes: [
+                "circle",
+                "cross",
+                "diamond",
+                "square",
+                "triangle-down",
+                "triangle-up"
+            ]
+        };
+        vg.Bounds = (function () {
+            var bounds = function (b) {
+                this.clear();
+                if (b) this.union(b);
+            };
+
+            var prototype = bounds.prototype;
+
+            prototype.clear = function () {
+                this.x1 = +Number.MAX_VALUE;
+                this.y1 = +Number.MAX_VALUE;
+                this.x2 = -Number.MAX_VALUE;
+                this.y2 = -Number.MAX_VALUE;
+                return this;
+            };
+
+            prototype.set = function (x1, y1, x2, y2) {
+                this.x1 = x1;
+                this.y1 = y1;
+                this.x2 = x2;
+                this.y2 = y2;
+                return this;
+            };
+
+            prototype.add = function (x, y) {
+                if (x < this.x1) this.x1 = x;
+                if (y < this.y1) this.y1 = y;
+                if (x > this.x2) this.x2 = x;
+                if (y > this.y2) this.y2 = y;
+                return this;
+            };
+
+            prototype.expand = function (d) {
+                this.x1 -= d;
+                this.y1 -= d;
+                this.x2 += d;
+                this.y2 += d;
+                return this;
+            };
+
+            prototype.round = function () {
+                this.x1 = Math.floor(this.x1);
+                this.y1 = Math.floor(this.y1);
+                this.x2 = Math.ceil(this.x2);
+                this.y2 = Math.ceil(this.y2);
+                return this;
+            };
+
+            prototype.translate = function (dx, dy) {
+                this.x1 += dx;
+                this.x2 += dx;
+                this.y1 += dy;
+                this.y2 += dy;
+                return this;
+            };
+
+            prototype.rotate = function (angle, x, y) {
+                var cos = Math.cos(angle),
+                    sin = Math.sin(angle),
+                    cx = x - x * cos + y * sin,
+                    cy = y - x * sin - y * cos,
+                    x1 = this.x1, x2 = this.x2,
+                    y1 = this.y1, y2 = this.y2;
+
+                return this.clear()
+                    .add(cos * x1 - sin * y1 + cx, sin * x1 + cos * y1 + cy)
+                    .add(cos * x1 - sin * y2 + cx, sin * x1 + cos * y2 + cy)
+                    .add(cos * x2 - sin * y1 + cx, sin * x2 + cos * y1 + cy)
+                    .add(cos * x2 - sin * y2 + cx, sin * x2 + cos * y2 + cy);
+            }
+
+            prototype.union = function (b) {
+                if (b.x1 < this.x1) this.x1 = b.x1;
+                if (b.y1 < this.y1) this.y1 = b.y1;
+                if (b.x2 > this.x2) this.x2 = b.x2;
+                if (b.y2 > this.y2) this.y2 = b.y2;
+                return this;
+            };
+
+            prototype.encloses = function (b) {
+                return b && (
+                        this.x1 <= b.x1 &&
+                        this.x2 >= b.x2 &&
+                        this.y1 <= b.y1 &&
+                        this.y2 >= b.y2
+                    );
+            };
+
+            prototype.intersects = function (b) {
+                return b && !(
+                        this.x2 < b.x1 ||
+                        this.x1 > b.x2 ||
+                        this.y2 < b.y1 ||
+                        this.y1 > b.y2
+                    );
+            };
+
+            prototype.contains = function (x, y) {
+                return !(
+                    x < this.x1 ||
+                    x > this.x2 ||
+                    y < this.y1 ||
+                    y > this.y2
+                );
+            };
+
+            prototype.width = function () {
+                return this.x2 - this.x1;
+            };
+
+            prototype.height = function () {
+                return this.y2 - this.y1;
+            };
+
+            return bounds;
+        })();
+        vg.Gradient = (function () {
+
+            function gradient(type) {
+                this.id = "grad_" + (vg_gradient_id++);
+                this.type = type || "linear";
+                this.stops = [];
+                this.x1 = 0;
+                this.x2 = 1;
+                this.y1 = 0;
+                this.y2 = 0;
+            };
+
+            var prototype = gradient.prototype;
+
+            prototype.stop = function (offset, color) {
+                this.stops.push({
+                    offset: offset,
+                    color: color
+                });
+                return this;
+            };
+
+            return gradient;
+        })();
+
+        var vg_gradient_id = 0;
+        vg.canvas = {};
+        vg.canvas.path = (function () {
+
+            // Path parsing and rendering code taken from fabric.js -- Thanks!
+            var cmdLength = {m: 2, l: 2, h: 1, v: 1, c: 6, s: 4, q: 4, t: 2, a: 7},
+                re = [/([MLHVCSQTAZmlhvcsqtaz])/g, /###/, /(\d)-/g, /\s|,|###/];
+
+            function parse(path) {
+                var result = [],
+                    currentPath,
+                    chunks,
+                    parsed;
+
+                // First, break path into command sequence
+                path = path.slice().replace(re[0], '###$1').split(re[1]).slice(1);
+
+                // Next, parse each command in turn
+                for (var i = 0, j, chunksParsed, len = path.length; i < len; i++) {
+                    currentPath = path[i];
+                    chunks = currentPath.slice(1).trim().replace(re[2], '$1###-').split(re[3]);
+                    chunksParsed = [currentPath.charAt(0)];
+
+                    for (var j = 0, jlen = chunks.length; j < jlen; j++) {
+                        parsed = parseFloat(chunks[j]);
+                        if (!isNaN(parsed)) {
+                            chunksParsed.push(parsed);
+                        }
+                    }
+
+                    var command = chunksParsed[0].toLowerCase(),
+                        commandLength = cmdLength[command];
+
+                    if (chunksParsed.length - 1 > commandLength) {
+                        for (var k = 1, klen = chunksParsed.length; k < klen; k += commandLength) {
+                            result.push([chunksParsed[0]].concat(chunksParsed.slice(k, k + commandLength)));
+                        }
+                    }
+                    else {
+                        result.push(chunksParsed);
+                    }
+                }
+
+                return result;
+            }
+
+            function drawArc(g, x, y, coords, bounds, l, t) {
+                var rx = coords[0];
+                var ry = coords[1];
+                var rot = coords[2];
+                var large = coords[3];
+                var sweep = coords[4];
+                var ex = coords[5];
+                var ey = coords[6];
+                var segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y);
+                for (var i = 0; i < segs.length; i++) {
+                    var bez = segmentToBezier.apply(null, segs[i]);
+                    g.bezierCurveTo.apply(g, bez);
+                    bounds.add(bez[0] - l, bez[1] - t);
+                    bounds.add(bez[2] - l, bez[3] - t);
+                    bounds.add(bez[4] - l, bez[5] - t);
+                }
+            }
+
+            function boundArc(x, y, coords, bounds) {
+                var rx = coords[0];
+                var ry = coords[1];
+                var rot = coords[2];
+                var large = coords[3];
+                var sweep = coords[4];
+                var ex = coords[5];
+                var ey = coords[6];
+                var segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y);
+                for (var i = 0; i < segs.length; i++) {
+                    var bez = segmentToBezier.apply(null, segs[i]);
+                    bounds.add(bez[0], bez[1]);
+                    bounds.add(bez[2], bez[3]);
+                    bounds.add(bez[4], bez[5]);
+                }
+            }
+
+            var arcToSegmentsCache = {},
+                segmentToBezierCache = {},
+                join = Array.prototype.join,
+                argsStr;
+
+            // Copied from Inkscape svgtopdf, thanks!
+            function arcToSegments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
+                argsStr = join.call(arguments);
+                if (arcToSegmentsCache[argsStr]) {
+                    return arcToSegmentsCache[argsStr];
+                }
+
+                var th = rotateX * (Math.PI / 180);
+                var sin_th = Math.sin(th);
+                var cos_th = Math.cos(th);
+                rx = Math.abs(rx);
+                ry = Math.abs(ry);
+                var px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5;
+                var py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5;
+                var pl = (px * px) / (rx * rx) + (py * py) / (ry * ry);
+                if (pl > 1) {
+                    pl = Math.sqrt(pl);
+                    rx *= pl;
+                    ry *= pl;
+                }
+
+                var a00 = cos_th / rx;
+                var a01 = sin_th / rx;
+                var a10 = (-sin_th) / ry;
+                var a11 = (cos_th) / ry;
+                var x0 = a00 * ox + a01 * oy;
+                var y0 = a10 * ox + a11 * oy;
+                var x1 = a00 * x + a01 * y;
+                var y1 = a10 * x + a11 * y;
+
+                var d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
+                var sfactor_sq = 1 / d - 0.25;
+                if (sfactor_sq < 0) sfactor_sq = 0;
+                var sfactor = Math.sqrt(sfactor_sq);
+                if (sweep == large) sfactor = -sfactor;
+                var xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0);
+                var yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0);
+
+                var th0 = Math.atan2(y0 - yc, x0 - xc);
+                var th1 = Math.atan2(y1 - yc, x1 - xc);
+
+                var th_arc = th1 - th0;
+                if (th_arc < 0 && sweep == 1) {
+                    th_arc += 2 * Math.PI;
+                } else if (th_arc > 0 && sweep == 0) {
+                    th_arc -= 2 * Math.PI;
+                }
+
+                var segments = Math.ceil(Math.abs(th_arc / (Math.PI * 0.5 + 0.001)));
+                var result = [];
+                for (var i = 0; i < segments; i++) {
+                    var th2 = th0 + i * th_arc / segments;
+                    var th3 = th0 + (i + 1) * th_arc / segments;
+                    result[i] = [xc, yc, th2, th3, rx, ry, sin_th, cos_th];
+                }
+
+                return (arcToSegmentsCache[argsStr] = result);
+            }
+
+            function segmentToBezier(cx, cy, th0, th1, rx, ry, sin_th, cos_th) {
+                argsStr = join.call(arguments);
+                if (segmentToBezierCache[argsStr]) {
+                    return segmentToBezierCache[argsStr];
+                }
+
+                var a00 = cos_th * rx;
+                var a01 = -sin_th * ry;
+                var a10 = sin_th * rx;
+                var a11 = cos_th * ry;
+
+                var cos_th0 = Math.cos(th0);
+                var sin_th0 = Math.sin(th0);
+                var cos_th1 = Math.cos(th1);
+                var sin_th1 = Math.sin(th1);
+
+                var th_half = 0.5 * (th1 - th0);
+                var sin_th_h2 = Math.sin(th_half * 0.5);
+                var t = (8 / 3) * sin_th_h2 * sin_th_h2 / Math.sin(th_half);
+                var x1 = cx + cos_th0 - t * sin_th0;
+                var y1 = cy + sin_th0 + t * cos_th0;
+                var x3 = cx + cos_th1;
+                var y3 = cy + sin_th1;
+                var x2 = x3 + t * sin_th1;
+                var y2 = y3 - t * cos_th1;
+
+                return (segmentToBezierCache[argsStr] = [
+                    a00 * x1 + a01 * y1, a10 * x1 + a11 * y1,
+                    a00 * x2 + a01 * y2, a10 * x2 + a11 * y2,
+                    a00 * x3 + a01 * y3, a10 * x3 + a11 * y3
+                ]);
+            }
+
+            function render(g, path, l, t) {
+                var current, // current instruction
+                    previous = null,
+                    x = 0, // current x
+                    y = 0, // current y
+                    controlX = 0, // current control point x
+                    controlY = 0, // current control point y
+                    tempX,
+                    tempY,
+                    tempControlX,
+                    tempControlY,
+                    bounds = new vg.Bounds();
+                if (l == undefined) l = 0;
+                if (t == undefined) t = 0;
+
+                g.beginPath();
+
+                for (var i = 0, len = path.length; i < len; ++i) {
+                    current = path[i];
+
+                    switch (current[0]) { // first letter
+
+                        case 'l': // lineto, relative
+                            x += current[1];
+                            y += current[2];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'L': // lineto, absolute
+                            x = current[1];
+                            y = current[2];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'h': // horizontal lineto, relative
+                            x += current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'H': // horizontal lineto, absolute
+                            x = current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'v': // vertical lineto, relative
+                            y += current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'V': // verical lineto, absolute
+                            y = current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'm': // moveTo, relative
+                            x += current[1];
+                            y += current[2];
+                            g.moveTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'M': // moveTo, absolute
+                            x = current[1];
+                            y = current[2];
+                            g.moveTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'c': // bezierCurveTo, relative
+                            tempX = x + current[5];
+                            tempY = y + current[6];
+                            controlX = x + current[3];
+                            controlY = y + current[4];
+                            g.bezierCurveTo(
+                                x + current[1] + l, // x1
+                                y + current[2] + t, // y1
+                                controlX + l, // x2
+                                controlY + t, // y2
+                                tempX + l,
+                                tempY + t
+                            );
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'C': // bezierCurveTo, absolute
+                            x = current[5];
+                            y = current[6];
+                            controlX = current[3];
+                            controlY = current[4];
+                            g.bezierCurveTo(
+                                current[1] + l,
+                                current[2] + t,
+                                controlX + l,
+                                controlY + t,
+                                x + l,
+                                y + t
+                            );
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(x, y);
+                            break;
+
+                        case 's': // shorthand cubic bezierCurveTo, relative
+                                  // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            g.bezierCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                x + current[1] + l,
+                                y + current[2] + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            bounds.add(controlX, controlY);
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(tempX, tempY);
+
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'S': // shorthand cubic bezierCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            g.bezierCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                current[1] + l,
+                                current[2] + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = current[1];
+                            controlY = current[2];
+
+                            break;
+
+                        case 'q': // quadraticCurveTo, relative
+                                  // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            g.quadraticCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'Q': // quadraticCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+
+                            g.quadraticCurveTo(
+                                current[1] + l,
+                                current[2] + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            controlX = current[1];
+                            controlY = current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 't': // shorthand quadraticCurveTo, relative
+
+                            // transform to absolute x,y
+                            tempX = x + current[1];
+                            tempY = y + current[2];
+
+                            if (previous[0].match(/[QqTt]/) === null) {
+                                // If there is no previous command or if the previous command was not a Q, q, T or t,
+                                // assume the control point is coincident with the current point
+                                controlX = x;
+                                controlY = y;
+                            }
+                            else if (previous[0] === 't') {
+                                // calculate reflection of previous control points for t
+                                controlX = 2 * x - tempControlX;
+                                controlY = 2 * y - tempControlY;
+                            }
+                            else if (previous[0] === 'q') {
+                                // calculate reflection of previous control points for q
+                                controlX = 2 * x - controlX;
+                                controlY = 2 * y - controlY;
+                            }
+
+                            tempControlX = controlX;
+                            tempControlY = controlY;
+
+                            g.quadraticCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'T':
+                            tempX = current[1];
+                            tempY = current[2];
+
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            g.quadraticCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'a':
+                            drawArc(g, x + l, y + t, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6] + x + l,
+                                current[7] + y + t
+                            ], bounds, l, t);
+                            x += current[6];
+                            y += current[7];
+                            break;
+
+                        case 'A':
+                            drawArc(g, x + l, y + t, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6] + l,
+                                current[7] + t
+                            ], bounds, l, t);
+                            x = current[6];
+                            y = current[7];
+                            break;
+
+                        case 'z':
+                        case 'Z':
+                            g.closePath();
+                            break;
+                    }
+                    previous = current;
+                }
+                return bounds.translate(l, t);
+            }
+
+            function bounds(path, bounds) {
+                var current, // current instruction
+                    previous = null,
+                    x = 0, // current x
+                    y = 0, // current y
+                    controlX = 0, // current control point x
+                    controlY = 0, // current control point y
+                    tempX,
+                    tempY,
+                    tempControlX,
+                    tempControlY;
+
+                for (var i = 0, len = path.length; i < len; ++i) {
+                    current = path[i];
+
+                    switch (current[0]) { // first letter
+
+                        case 'l': // lineto, relative
+                            x += current[1];
+                            y += current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'L': // lineto, absolute
+                            x = current[1];
+                            y = current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'h': // horizontal lineto, relative
+                            x += current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'H': // horizontal lineto, absolute
+                            x = current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'v': // vertical lineto, relative
+                            y += current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'V': // verical lineto, absolute
+                            y = current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'm': // moveTo, relative
+                            x += current[1];
+                            y += current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'M': // moveTo, absolute
+                            x = current[1];
+                            y = current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'c': // bezierCurveTo, relative
+                            tempX = x + current[5];
+                            tempY = y + current[6];
+                            controlX = x + current[3];
+                            controlY = y + current[4];
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'C': // bezierCurveTo, absolute
+                            x = current[5];
+                            y = current[6];
+                            controlX = current[3];
+                            controlY = current[4];
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(x, y);
+                            break;
+
+                        case 's': // shorthand cubic bezierCurveTo, relative
+                                  // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(tempX, tempY);
+
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'S': // shorthand cubic bezierCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = current[1];
+                            controlY = current[2];
+
+                            break;
+
+                        case 'q': // quadraticCurveTo, relative
+                                  // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'Q': // quadraticCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+
+                            x = tempX;
+                            y = tempY;
+                            controlX = current[1];
+                            controlY = current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 't': // shorthand quadraticCurveTo, relative
+
+                            // transform to absolute x,y
+                            tempX = x + current[1];
+                            tempY = y + current[2];
+
+                            if (previous[0].match(/[QqTt]/) === null) {
+                                // If there is no previous command or if the previous command was not a Q, q, T or t,
+                                // assume the control point is coincident with the current point
+                                controlX = x;
+                                controlY = y;
+                            }
+                            else if (previous[0] === 't') {
+                                // calculate reflection of previous control points for t
+                                controlX = 2 * x - tempControlX;
+                                controlY = 2 * y - tempControlY;
+                            }
+                            else if (previous[0] === 'q') {
+                                // calculate reflection of previous control points for q
+                                controlX = 2 * x - controlX;
+                                controlY = 2 * y - controlY;
+                            }
+
+                            tempControlX = controlX;
+                            tempControlY = controlY;
+
+                            x = tempX;
+                            y = tempY;
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'T':
+                            tempX = current[1];
+                            tempY = current[2];
+
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'a':
+                            boundArc(x, y, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6] + x,
+                                current[7] + y
+                            ], bounds);
+                            x += current[6];
+                            y += current[7];
+                            break;
+
+                        case 'A':
+                            boundArc(x, y, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6],
+                                current[7]
+                            ], bounds);
+                            x = current[6];
+                            y = current[7];
+                            break;
+
+                        case 'z':
+                        case 'Z':
+                            break;
+                    }
+                    previous = current;
+                }
+                return bounds;
+            }
+
+            function area(items) {
+                var o = items[0];
+                var area;
+
+                if (o.orient === "horizontal") {
+                    area = d3.svg.area()
+                        .y(function (d) {
+                            return d.y;
+                        })
+                        .x0(function (d) {
+                            return d.x;
+                        })
+                        .x1(function (d) {
+                            return d.x + d.width;
+                        });
+                } else {
+                    area = d3.svg.area()
+                        .x(function (d) {
+                            return d.x;
+                        })
+                        .y1(function (d) {
+                            return d.y;
+                        })
+                        .y0(function (d) {
+                            return d.y + d.height;
+                        });
+                }
+
+                if (o.interpolate) area.interpolate(o.interpolate);
+                if (o.tension != null) area.tension(o.tension);
+                return area(items);
+            }
+
+            function line(items) {
+                var o = items[0];
+                var line = d3.svg.line()
+                    .x(function (d) {
+                        return d.x;
+                    })
+                    .y(function (d) {
+                        return d.y;
+                    });
+                if (o.interpolate) line.interpolate(o.interpolate);
+                if (o.tension != null) line.tension(o.tension);
+                return line(items);
+            }
+
+            return {
+                parse: parse,
+                render: render,
+                bounds: bounds,
+                area: area,
+                line: line
+            };
+
+        })();
+        vg.canvas.marks = (function () {
+
+            var parsePath = vg.canvas.path.parse,
+                renderPath = vg.canvas.path.render,
+                halfpi = Math.PI / 2,
+                sqrt3 = Math.sqrt(3),
+                tan30 = Math.tan(30 * Math.PI / 180),
+                tmpBounds = new vg.Bounds();
+
+            // path generators
+
+            function arcPath(g, o) {
+                var x = o.x || 0,
+                    y = o.y || 0,
+                    ir = o.innerRadius || 0,
+                    or = o.outerRadius || 0,
+                    sa = (o.startAngle || 0) - Math.PI / 2,
+                    ea = (o.endAngle || 0) - Math.PI / 2;
+                g.beginPath();
+                if (ir === 0) g.moveTo(x, y);
+                else g.arc(x, y, ir, sa, ea, 0);
+                g.arc(x, y, or, ea, sa, 1);
+                g.closePath();
+            }
+
+            function areaPath(g, items) {
+                var o = items[0],
+                    m = o.mark,
+                    p = m.pathCache || (m.pathCache = parsePath(vg.canvas.path.area(items)));
+                renderPath(g, p);
+            }
+
+            function linePath(g, items) {
+                var o = items[0],
+                    m = o.mark,
+                    p = m.pathCache || (m.pathCache = parsePath(vg.canvas.path.line(items)));
+                renderPath(g, p);
+            }
+
+            function pathPath(g, o) {
+                if (o.path == null) return;
+                var p = o.pathCache || (o.pathCache = parsePath(o.path));
+                return renderPath(g, p, o.x, o.y);
+            }
+
+            function symbolPath(g, o) {
+                g.beginPath();
+                var size = o.size != null ? o.size : 100,
+                    x = o.x, y = o.y, r, t, rx, ry;
+
+                if (o.shape == null || o.shape === "circle") {
+                    r = Math.sqrt(size / Math.PI);
+                    g.arc(x, y, r, 0, 2 * Math.PI, 0);
+                    g.closePath();
+                    return;
+                }
+
+                switch (o.shape) {
+                    case "cross":
+                        r = Math.sqrt(size / 5) / 2;
+                        t = 3 * r;
+                        g.moveTo(x - t, y - r);
+                        g.lineTo(x - r, y - r);
+                        g.lineTo(x - r, y - t);
+                        g.lineTo(x + r, y - t);
+                        g.lineTo(x + r, y - r);
+                        g.lineTo(x + t, y - r);
+                        g.lineTo(x + t, y + r);
+                        g.lineTo(x + r, y + r);
+                        g.lineTo(x + r, y + t);
+                        g.lineTo(x - r, y + t);
+                        g.lineTo(x - r, y + r);
+                        g.lineTo(x - t, y + r);
+                        break;
+
+                    case "diamond":
+                        ry = Math.sqrt(size / (2 * tan30));
+                        rx = ry * tan30;
+                        g.moveTo(x, y - ry);
+                        g.lineTo(x + rx, y);
+                        g.lineTo(x, y + ry);
+                        g.lineTo(x - rx, y);
+                        break;
+
+                    case "square":
+                        t = Math.sqrt(size);
+                        r = t / 2;
+                        g.rect(x - r, y - r, t, t);
+                        break;
+
+                    case "triangle-down":
+                        rx = Math.sqrt(size / sqrt3);
+                        ry = rx * sqrt3 / 2;
+                        g.moveTo(x, y + ry);
+                        g.lineTo(x + rx, y - ry);
+                        g.lineTo(x - rx, y - ry);
+                        break;
+
+                    case "triangle-up":
+                        rx = Math.sqrt(size / sqrt3);
+                        ry = rx * sqrt3 / 2;
+                        g.moveTo(x, y - ry);
+                        g.lineTo(x + rx, y + ry);
+                        g.lineTo(x - rx, y + ry);
+                }
+                g.closePath();
+            }
+
+            function lineStroke(g, items) {
+                var o = items[0],
+                    lw = o.strokeWidth,
+                    lc = o.strokeCap;
+                g.lineWidth = lw != null ? lw : vg.config.render.lineWidth;
+                g.lineCap = lc != null ? lc : vg.config.render.lineCap;
+                linePath(g, items);
+            }
+
+            function ruleStroke(g, o) {
+                var x1 = o.x || 0,
+                    y1 = o.y || 0,
+                    x2 = o.x2 != null ? o.x2 : x1,
+                    y2 = o.y2 != null ? o.y2 : y1,
+                    lw = o.strokeWidth,
+                    lc = o.strokeCap;
+
+                g.lineWidth = lw != null ? lw : vg.config.render.lineWidth;
+                g.lineCap = lc != null ? lc : vg.config.render.lineCap;
+                g.beginPath();
+                g.moveTo(x1, y1);
+                g.lineTo(x2, y2);
+            }
+
+            // drawing functions
+
+            function drawPathOne(path, g, o, items) {
+                var fill = o.fill, stroke = o.stroke, opac, lc, lw;
+
+                path(g, items);
+
+                opac = o.opacity == null ? 1 : o.opacity;
+                if (opac == 0 || !fill && !stroke) return;
+
+                if (fill) {
+                    g.globalAlpha = opac * (o.fillOpacity == null ? 1 : o.fillOpacity);
+                    g.fillStyle = color(g, o, fill);
+                    g.fill();
+                }
+
+                if (stroke) {
+                    lw = (lw = o.strokeWidth) != null ? lw : vg.config.render.lineWidth;
+                    if (lw > 0) {
+                        g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                        g.strokeStyle = color(g, o, stroke);
+                        g.lineWidth = lw;
+                        g.lineCap = (lc = o.strokeCap) != null ? lc : vg.config.render.lineCap;
+                        g.vgLineDash(o.strokeDash || null);
+                        g.vgLineDashOffset(o.strokeDashOffset || 0);
+                        g.stroke();
+                    }
+                }
+            }
+
+            function drawPathAll(path, g, scene, bounds) {
+                var i, len, item;
+                for (i = 0, len = scene.items.length; i < len; ++i) {
+                    item = scene.items[i];
+                    if (bounds && !bounds.intersects(item.bounds))
+                        continue; // bounds check
+                    drawPathOne(path, g, item, item);
+                }
+            }
+
+            function drawRect(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items,
+                    o, fill, stroke, opac, lc, lw, x, y, w, h;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    x = o.x || 0;
+                    y = o.y || 0;
+                    w = o.width || 0;
+                    h = o.height || 0;
+
+                    opac = o.opacity == null ? 1 : o.opacity;
+                    if (opac == 0) continue;
+
+                    if (fill = o.fill) {
+                        g.globalAlpha = opac * (o.fillOpacity == null ? 1 : o.fillOpacity);
+                        g.fillStyle = color(g, o, fill);
+                        g.fillRect(x, y, w, h);
+                    }
+
+                    if (stroke = o.stroke) {
+                        lw = (lw = o.strokeWidth) != null ? lw : vg.config.render.lineWidth;
+                        if (lw > 0) {
+                            g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                            g.strokeStyle = color(g, o, stroke);
+                            g.lineWidth = lw;
+                            g.lineCap = (lc = o.strokeCap) != null ? lc : vg.config.render.lineCap;
+                            g.vgLineDash(o.strokeDash || null);
+                            g.vgLineDashOffset(o.strokeDashOffset || 0);
+                            g.strokeRect(x, y, w, h);
+                        }
+                    }
+                }
+            }
+
+            function drawRule(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items,
+                    o, stroke, opac, lc, lw, x1, y1, x2, y2;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    x1 = o.x || 0;
+                    y1 = o.y || 0;
+                    x2 = o.x2 != null ? o.x2 : x1;
+                    y2 = o.y2 != null ? o.y2 : y1;
+
+                    opac = o.opacity == null ? 1 : o.opacity;
+                    if (opac == 0) continue;
+
+                    if (stroke = o.stroke) {
+                        lw = (lw = o.strokeWidth) != null ? lw : vg.config.render.lineWidth;
+                        if (lw > 0) {
+                            g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                            g.strokeStyle = color(g, o, stroke);
+                            g.lineWidth = lw;
+                            g.lineCap = (lc = o.strokeCap) != null ? lc : vg.config.render.lineCap;
+                            g.vgLineDash(o.strokeDash || null);
+                            g.vgLineDashOffset(o.strokeDashOffset || 0);
+                            g.beginPath();
+                            g.moveTo(x1, y1);
+                            g.lineTo(x2, y2);
+                            g.stroke();
+                        }
+                    }
+                }
+            }
+
+            function drawImage(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var renderer = this,
+                    items = scene.items, o;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    if (!(o.image && o.image.url === o.url)) {
+                        o.image = renderer.loadImage(o.url);
+                        o.image.url = o.url;
+                    }
+
+                    var x, y, w, h, opac;
+                    w = o.width || (o.image && o.image.width) || 0;
+                    h = o.height || (o.image && o.image.height) || 0;
+                    x = (o.x || 0) - (o.align === "center"
+                            ? w / 2 : (o.align === "right" ? w : 0));
+                    y = (o.y || 0) - (o.baseline === "middle"
+                            ? h / 2 : (o.baseline === "bottom" ? h : 0));
+
+                    if (o.image.loaded) {
+                        g.globalAlpha = (opac = o.opacity) != null ? opac : 1;
+                        g.drawImage(o.image, x, y, w, h);
+                    }
+                }
+            }
+
+            function drawText(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items,
+                    o, fill, stroke, opac, lw, x, y, r, t;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    g.font = vg.scene.fontString(o);
+                    g.textAlign = o.align || "left";
+                    g.textBaseline = o.baseline || "alphabetic";
+
+                    opac = o.opacity == null ? 1 : o.opacity;
+                    if (opac == 0) continue;
+
+                    x = o.x || 0;
+                    y = o.y || 0;
+                    if (r = o.radius) {
+                        t = (o.theta || 0) - Math.PI / 2;
+                        x += r * Math.cos(t);
+                        y += r * Math.sin(t);
+                    }
+
+                    if (o.angle) {
+                        g.save();
+                        g.translate(x, y);
+                        g.rotate(o.angle * Math.PI / 180);
+                        x = o.dx || 0;
+                        y = o.dy || 0;
+                    } else {
+                        x += (o.dx || 0);
+                        y += (o.dy || 0);
+                    }
+
+                    if (fill = o.fill) {
+                        g.globalAlpha = opac * (o.fillOpacity == null ? 1 : o.fillOpacity);
+                        g.fillStyle = color(g, o, fill);
+                        g.fillText(o.text, x, y);
+                    }
+
+                    if (stroke = o.stroke) {
+                        lw = (lw = o.strokeWidth) != null ? lw : 1;
+                        if (lw > 0) {
+                            g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                            g.strokeStyle = color(o, stroke);
+                            g.lineWidth = lw;
+                            g.strokeText(o.text, x, y);
+                        }
+                    }
+
+                    if (o.angle) g.restore();
+                }
+            }
+
+            function drawAll(pathFunc) {
+                return function (g, scene, bounds) {
+                    drawPathAll(pathFunc, g, scene, bounds);
+                }
+            }
+
+            function drawOne(pathFunc) {
+                return function (g, scene, bounds) {
+                    if (!scene.items.length) return;
+                    if (bounds && !bounds.intersects(scene.items[0].bounds))
+                        return; // bounds check
+                    drawPathOne(pathFunc, g, scene.items[0], scene.items);
+                }
+            }
+
+            function drawGroup(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items, group, axes, legends,
+                    renderer = this, gx, gy, gb, i, n, j, m;
+
+                drawRect(g, scene, bounds);
+
+                for (i = 0, n = items.length; i < n; ++i) {
+                    group = items[i];
+                    axes = group.axisItems || [];
+                    legends = group.legendItems || [];
+                    gx = group.x || 0;
+                    gy = group.y || 0;
+
+                    // render group contents
+                    g.save();
+                    g.translate(gx, gy);
+                    if (group.clip) {
+                        g.beginPath();
+                        g.rect(0, 0, group.width || 0, group.height || 0);
+                        g.clip();
+                    }
+
+                    if (bounds) bounds.translate(-gx, -gy);
+
+                    for (j = 0, m = axes.length; j < m; ++j) {
+                        if (axes[j].def.layer === "back") {
+                            renderer.draw(g, axes[j], bounds);
+                        }
+                    }
+                    for (j = 0, m = group.items.length; j < m; ++j) {
+                        renderer.draw(g, group.items[j], bounds);
+                    }
+                    for (j = 0, m = axes.length; j < m; ++j) {
+                        if (axes[j].def.layer !== "back") {
+                            renderer.draw(g, axes[j], bounds);
+                        }
+                    }
+                    for (j = 0, m = legends.length; j < m; ++j) {
+                        renderer.draw(g, legends[j], bounds);
+                    }
+
+                    if (bounds) bounds.translate(gx, gy);
+                    g.restore();
+                }
+            }
+
+            function color(g, o, value) {
+                return (value.id)
+                    ? gradient(g, value, o.bounds)
+                    : value;
+            }
+
+            function gradient(g, p, b) {
+                var w = b.width(),
+                    h = b.height(),
+                    x1 = b.x1 + p.x1 * w,
+                    y1 = b.y1 + p.y1 * h,
+                    x2 = b.x1 + p.x2 * w,
+                    y2 = b.y1 + p.y2 * h,
+                    grad = g.createLinearGradient(x1, y1, x2, y2),
+                    stop = p.stops,
+                    i, n;
+
+                for (i = 0, n = stop.length; i < n; ++i) {
+                    grad.addColorStop(stop[i].offset, stop[i].color);
+                }
+                return grad;
+            }
+
+            // hit testing
+
+            function pickGroup(g, scene, x, y, gx, gy) {
+                if (scene.items.length === 0 ||
+                    scene.bounds && !scene.bounds.contains(gx, gy)) {
+                    return false;
+                }
+                var items = scene.items, subscene, group, hit, dx, dy,
+                    handler = this, i, j;
+
+                for (i = items.length; --i >= 0;) {
+                    group = items[i];
+                    dx = group.x || 0;
+                    dy = group.y || 0;
+
+                    g.save();
+                    g.translate(dx, dy);
+                    for (j = group.items.length; --j >= 0;) {
+                        subscene = group.items[j];
+                        if (subscene.interactive === false) continue;
+                        hit = handler.pick(subscene, x, y, gx - dx, gy - dy);
+                        if (hit) {
+                            g.restore();
+                            return hit;
+                        }
+                    }
+                    g.restore();
+                }
+
+                return scene.interactive
+                    ? pickAll(hitTests.group, g, scene, x, y, gx, gy)
+                    : false;
+            }
+
+            function pickAll(test, g, scene, x, y, gx, gy) {
+                if (!scene.items.length) return false;
+                var o, b, i;
+
+                if (g._ratio !== 1) {
+                    x *= g._ratio;
+                    y *= g._ratio;
+                }
+
+                for (i = scene.items.length; --i >= 0;) {
+                    o = scene.items[i];
+                    b = o.bounds;
+                    // first hit test against bounding box
+                    if ((b && !b.contains(gx, gy)) || !b) continue;
+                    // if in bounding box, perform more careful test
+                    if (test(g, o, x, y, gx, gy)) return o;
+                }
+                return false;
+            }
+
+            function pickArea(g, scene, x, y, gx, gy) {
+                if (!scene.items.length) return false;
+                var items = scene.items,
+                    o, b, i, di, dd, od, dx, dy;
+
+                b = items[0].bounds;
+                if (b && !b.contains(gx, gy)) return false;
+                if (g._ratio !== 1) {
+                    x *= g._ratio;
+                    y *= g._ratio;
+                }
+                if (!hitTests.area(g, items, x, y)) return false;
+                return items[0];
+            }
+
+            function pickLine(g, scene, x, y, gx, gy) {
+                if (!scene.items.length) return false;
+                var items = scene.items,
+                    o, b, i, di, dd, od, dx, dy;
+
+                b = items[0].bounds;
+                if (b && !b.contains(gx, gy)) return false;
+                if (g._ratio !== 1) {
+                    x *= g._ratio;
+                    y *= g._ratio;
+                }
+                if (!hitTests.line(g, items, x, y)) return false;
+                return items[0];
+            }
+
+            function pick(test) {
+                return function (g, scene, x, y, gx, gy) {
+                    return pickAll(test, g, scene, x, y, gx, gy);
+                };
+            }
+
+            function textHit(g, o, x, y, gx, gy) {
+                if (!o.fontSize) return false;
+                if (!o.angle) return true; // bounds sufficient if no rotation
+
+                var b = vg.scene.bounds.text(o, tmpBounds, true),
+                    a = -o.angle * Math.PI / 180,
+                    cos = Math.cos(a),
+                    sin = Math.sin(a),
+                    x = o.x,
+                    y = o.y,
+                    px = cos * gx - sin * gy + (x - x * cos + y * sin),
+                    py = sin * gx + cos * gy + (y - x * sin - y * cos);
+
+                return b.contains(px, py);
+            }
+
+            var hitTests = {
+                text: textHit,
+                rect: function (g, o, x, y) {
+                    return true;
+                }, // bounds test is sufficient
+                image: function (g, o, x, y) {
+                    return true;
+                }, // bounds test is sufficient
+                group: function (g, o, x, y) {
+                    return o.fill || o.stroke;
+                },
+                rule: function (g, o, x, y) {
+                    if (!g.isPointInStroke) return false;
+                    ruleStroke(g, o);
+                    return g.isPointInStroke(x, y);
+                },
+                line: function (g, s, x, y) {
+                    if (!g.isPointInStroke) return false;
+                    lineStroke(g, s);
+                    return g.isPointInStroke(x, y);
+                },
+                arc: function (g, o, x, y) {
+                    arcPath(g, o);
+                    return g.isPointInPath(x, y);
+                },
+                area: function (g, s, x, y) {
+                    areaPath(g, s);
+                    return g.isPointInPath(x, y);
+                },
+                path: function (g, o, x, y) {
+                    pathPath(g, o);
+                    return g.isPointInPath(x, y);
+                },
+                symbol: function (g, o, x, y) {
+                    symbolPath(g, o);
+                    return g.isPointInPath(x, y);
+                }
+            };
+
+            return {
+                draw: {
+                    group: drawGroup,
+                    area: drawOne(areaPath),
+                    line: drawOne(linePath),
+                    arc: drawAll(arcPath),
+                    path: drawAll(pathPath),
+                    symbol: drawAll(symbolPath),
+                    rect: drawRect,
+                    rule: drawRule,
+                    text: drawText,
+                    image: drawImage,
+                    drawOne: drawOne, // expose for extensibility
+                    drawAll: drawAll  // expose for extensibility
+                },
+                pick: {
+                    group: pickGroup,
+                    area: pickArea,
+                    line: pickLine,
+                    arc: pick(hitTests.arc),
+                    path: pick(hitTests.path),
+                    symbol: pick(hitTests.symbol),
+                    rect: pick(hitTests.rect),
+                    rule: pick(hitTests.rule),
+                    text: pick(hitTests.text),
+                    image: pick(hitTests.image),
+                    pickAll: pickAll  // expose for extensibility
+                }
+            };
+
+        })();
+        vg.canvas.Renderer = (function () {
+            var renderer = function () {
+                this._ctx = null;
+                this._el = null;
+                this._imgload = 0;
+            };
+
+            var prototype = renderer.prototype;
+
+            prototype.initialize = function (el, width, height, pad) {
+                this._el = el;
+
+                if (!el) return this; // early exit if no DOM element
+
+                // select canvas element
+                var canvas = d3.select(el)
+                    .selectAll("canvas.marks")
+                    .data([1]);
+
+                // create new canvas element if needed
+                canvas.enter()
+                    .append("canvas")
+                    .attr("class", "marks");
+
+                // remove extraneous canvas if needed
+                canvas.exit().remove();
+
+                return this.resize(width, height, pad);
+            };
+
+            prototype.resize = function (width, height, pad) {
+                this._width = width;
+                this._height = height;
+                this._padding = pad;
+
+                if (this._el) {
+                    var canvas = d3.select(this._el).select("canvas.marks");
+
+                    // initialize canvas attributes
+                    canvas
+                        .attr("width", width + pad.left + pad.right)
+                        .attr("height", height + pad.top + pad.bottom);
+
+                    // get the canvas graphics context
+                    var s;
+                    this._ctx = canvas.node().getContext("2d");
+                    this._ctx._ratio = (s = scaleCanvas(canvas.node(), this._ctx) || 1);
+                    this._ctx.setTransform(s, 0, 0, s, s * pad.left, s * pad.top);
+                }
+
+                initializeLineDash(this._ctx);
+                return this;
+            };
+
+            function scaleCanvas(canvas, ctx) {
+                // get canvas pixel data
+                var devicePixelRatio = window.devicePixelRatio || 1,
+                    backingStoreRatio = (
+                        ctx.webkitBackingStorePixelRatio ||
+                        ctx.mozBackingStorePixelRatio ||
+                        ctx.msBackingStorePixelRatio ||
+                        ctx.oBackingStorePixelRatio ||
+                        ctx.backingStorePixelRatio) || 1,
+                    ratio = devicePixelRatio / backingStoreRatio;
+
+                if (devicePixelRatio !== backingStoreRatio) {
+                    var w = canvas.width, h = canvas.height;
+                    // set actual and visible canvas size
+                    canvas.setAttribute("width", w * ratio);
+                    canvas.setAttribute("height", h * ratio);
+                    canvas.style.width = w + 'px';
+                    canvas.style.height = h + 'px';
+                }
+                return ratio;
+            }
+
+            function initializeLineDash(ctx) {
+                if (ctx.vgLineDash) return; // already set
+
+                var NODASH = [];
+                if (ctx.setLineDash) {
+                    ctx.vgLineDash = function (dash) {
+                        this.setLineDash(dash || NODASH);
+                    };
+                    ctx.vgLineDashOffset = function (off) {
+                        this.lineDashOffset = off;
+                    };
+                } else if (ctx.webkitLineDash !== undefined) {
+                    ctx.vgLineDash = function (dash) {
+                        this.webkitLineDash = dash || NODASH;
+                    };
+                    ctx.vgLineDashOffset = function (off) {
+                        this.webkitLineDashOffset = off;
+                    };
+                } else if (ctx.mozDash !== undefined) {
+                    ctx.vgLineDash = function (dash) {
+                        this.mozDash = dash;
+                    };
+                    ctx.vgLineDashOffset = function (off) { /* unsupported */
+                    };
+                } else {
+                    ctx.vgLineDash = function (dash) { /* unsupported */
+                    };
+                    ctx.vgLineDashOffset = function (off) { /* unsupported */
+                    };
+                }
+            }
+
+            prototype.context = function (ctx) {
+                if (ctx) {
+                    this._ctx = ctx;
+                    return this;
+                }
+                else return this._ctx;
+            };
+
+            prototype.element = function () {
+                return this._el;
+            };
+
+            prototype.pendingImages = function () {
+                return this._imgload;
+            };
+
+            function translatedBounds(item, bounds) {
+                var b = new vg.Bounds(bounds);
+                while ((item = item.mark.group) != null) {
+                    b.translate(item.x || 0, item.y || 0);
+                }
+                return b;
+            }
+
+            function getBounds(items) {
+                return !items ? null :
+                    vg.array(items).reduce(function (b, item) {
+                        return b.union(translatedBounds(item, item.bounds))
+                            .union(translatedBounds(item, item['bounds:prev']));
+                    }, new vg.Bounds());
+            }
+
+            function setBounds(g, bounds) {
+                var bbox = null;
+                if (bounds) {
+                    bbox = (new vg.Bounds(bounds)).round();
+                    g.beginPath();
+                    g.rect(bbox.x1, bbox.y1, bbox.width(), bbox.height());
+                    g.clip();
+                }
+                return bbox;
+            }
+
+            prototype.render = function (scene, items) {
+                var g = this._ctx,
+                    pad = this._padding,
+                    w = this._width + pad.left + pad.right,
+                    h = this._height + pad.top + pad.bottom,
+                    bb = null, bb2;
+
+                // setup
+                this._scene = scene;
+                g.save();
+                bb = setBounds(g, getBounds(items));
+                g.clearRect(-pad.left, -pad.top, w, h);
+
+                // render
+                this.draw(g, scene, bb);
+
+                // render again to handle possible bounds change
+                if (items) {
+                    g.restore();
+                    g.save();
+                    bb2 = setBounds(g, getBounds(items));
+                    if (!bb.encloses(bb2)) {
+                        g.clearRect(-pad.left, -pad.top, w, h);
+                        this.draw(g, scene, bb2);
+                    }
+                }
+
+                // takedown
+                g.restore();
+                this._scene = null;
+            };
+
+            prototype.draw = function (ctx, scene, bounds) {
+                var marktype = scene.marktype,
+                    renderer = vg.canvas.marks.draw[marktype];
+                renderer.call(this, ctx, scene, bounds);
+            };
+
+            prototype.renderAsync = function (scene) {
+                // TODO make safe for multiple scene rendering?
+                var renderer = this;
+                if (renderer._async_id) {
+                    clearTimeout(renderer._async_id);
+                }
+                renderer._async_id = setTimeout(function () {
+                    renderer.render(scene);
+                    delete renderer._async_id;
+                }, 50);
+            };
+
+            prototype.loadImage = function (uri) {
+                var renderer = this,
+                    scene = renderer._scene,
+                    image = null, url;
+
+                renderer._imgload += 1;
+                if (vg.config.isNode) {
+                    image = new (require("canvas").Image)();
+                    vg.data.load(uri, function (err, data) {
+                        if (err) {
+                            vg.error(err);
+                            return;
+                        }
+                        image.src = data;
+                        image.loaded = true;
+                        renderer._imgload -= 1;
+                    });
+                } else {
+                    image = new Image();
+                    url = vg.config.baseURL + uri;
+                    image.onload = function () {
+                        vg.log("LOAD IMAGE: " + url);
+                        image.loaded = true;
+                        renderer._imgload -= 1;
+                        renderer.renderAsync(scene);
+                    };
+                    image.src = url;
+                }
+
+                return image;
+            };
+
+            return renderer;
+        })();
+        vg.canvas.Handler = (function () {
+            var handler = function (el, model) {
+                this._active = null;
+                this._handlers = {};
+                if (el) this.initialize(el);
+                if (model) this.model(model);
+            };
+
+            var prototype = handler.prototype;
+
+            prototype.initialize = function (el, pad, obj) {
+                this._el = d3.select(el).node();
+                this._canvas = d3.select(el).select("canvas.marks").node();
+                this._padding = pad;
+                this._obj = obj || null;
+
+                // add event listeners
+                var canvas = this._canvas, that = this;
+                events.forEach(function (type) {
+                    canvas.addEventListener(type, function (evt) {
+                        prototype[type].call(that, evt);
+                    });
+                });
+
+                return this;
+            };
+
+            prototype.padding = function (pad) {
+                this._padding = pad;
+                return this;
+            };
+
+            prototype.model = function (model) {
+                if (!arguments.length) return this._model;
+                this._model = model;
+                return this;
+            };
+
+            prototype.handlers = function () {
+                var h = this._handlers;
+                return vg.keys(h).reduce(function (a, k) {
+                    return h[k].reduce(function (a, x) {
+                        return (a.push(x), a);
+                    }, a);
+                }, []);
+            };
+
+            // setup events
+            var events = [
+                "mousedown",
+                "mouseup",
+                "click",
+                "dblclick",
+                "wheel",
+                "keydown",
+                "keypress",
+                "keyup",
+                "mousewheel"
+            ];
+            events.forEach(function (type) {
+                prototype[type] = function (evt) {
+                    this.fire(type, evt);
+                };
+            });
+            events.push("mousemove");
+            events.push("mouseout");
+
+            function eventName(name) {
+                var i = name.indexOf(".");
+                return i < 0 ? name : name.slice(0, i);
+            }
+
+            prototype.mousemove = function (evt) {
+                var pad = this._padding,
+                    b = evt.target.getBoundingClientRect(),
+                    x = evt.clientX - b.left,
+                    y = evt.clientY - b.top,
+                    a = this._active,
+                    p = this.pick(this._model.scene(), x, y, x - pad.left, y - pad.top);
+
+                if (p === a) {
+                    this.fire("mousemove", evt);
+                    return;
+                } else if (a) {
+                    this.fire("mouseout", evt);
+                }
+                this._active = p;
+                if (p) {
+                    this.fire("mouseover", evt);
+                }
+            };
+
+            prototype.mouseout = function (evt) {
+                if (this._active) {
+                    this.fire("mouseout", evt);
+                }
+                this._active = null;
+            };
+
+            // to keep firefox happy
+            prototype.DOMMouseScroll = function (evt) {
+                this.fire("mousewheel", evt);
+            };
+
+            // fire an event
+            prototype.fire = function (type, evt) {
+                var a = this._active,
+                    h = this._handlers[type];
+                if (a && h) {
+                    for (var i = 0, len = h.length; i < len; ++i) {
+                        h[i].handler.call(this._obj, evt, a);
+                    }
+                }
+            };
+
+            // add an event handler
+            prototype.on = function (type, handler) {
+                var name = eventName(type),
+                    h = this._handlers;
+                h = h[name] || (

<TRUNCATED>

[39/41] stratos git commit: Fixing typo error in capps pom.xml

Posted by im...@apache.org.
Fixing typo error in capps pom.xml


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/756a4e73
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/756a4e73
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/756a4e73

Branch: refs/heads/stratos-4.1.x
Commit: 756a4e73d98db54534745012401ddfe420a4b8ec
Parents: 9d7226a
Author: Thanuja <th...@wso2.com>
Authored: Tue Oct 13 20:18:20 2015 +0530
Committer: Thanuja <th...@wso2.com>
Committed: Tue Oct 13 20:18:20 2015 +0530

----------------------------------------------------------------------
 extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/756a4e73/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
index d4d219b..ce75ced 100644
--- a/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/pom.xml
@@ -30,7 +30,7 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>metring-service-capps</artifactId>
+    <artifactId>metering-service-capps</artifactId>
     <name>Apache Stratos - Metering Service Composite Applications</name>
     <description>Apache Stratos Metering Service Composite Applications</description>
     <packaging>pom</packaging>


[19/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/excanvas.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/excanvas.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/excanvas.min.js
new file mode 100644
index 0000000..815045d
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/excanvas.min.js
@@ -0,0 +1,954 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+if (navigator.appVersion.indexOf("MSIE") != -1 && parseFloat(navigator.appVersion.split("MSIE")[1]) <= 8 && !document.createElement("canvas").getContext)(function () {
+    var m = Math;
+    var mr = m.round;
+    var ms = m.sin;
+    var mc = m.cos;
+    var abs = m.abs;
+    var sqrt = m.sqrt;
+    var Z = 10;
+    var Z2 = Z / 2;
+    var IE_VERSION = +navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];
+
+    function getContext() {
+        return this.context_ || (this.context_ = new CanvasRenderingContext2D_(this))
+    }
+
+    var slice = Array.prototype.slice;
+
+    function bind(f, obj, var_args) {
+        var a = slice.call(arguments,
+            2);
+        return function () {
+            return f.apply(obj, a.concat(slice.call(arguments)))
+        }
+    }
+
+    function encodeHtmlAttribute(s) {
+        return String(s).replace(/&/g, "&amp;").replace(/"/g, "&quot;")
+    }
+
+    function addNamespace(doc, prefix, urn) {
+        if (!doc.namespaces[prefix])doc.namespaces.add(prefix, urn, "#default#VML")
+    }
+
+    function addNamespacesAndStylesheet(doc) {
+        addNamespace(doc, "g_vml_", "urn:schemas-microsoft-com:vml");
+        addNamespace(doc, "g_o_", "urn:schemas-microsoft-com:office:office");
+        if (!doc.styleSheets["ex_canvas_"]) {
+            var ss = doc.createStyleSheet();
+            ss.owningElement.id = "ex_canvas_";
+            ss.cssText = "canvas{display:inline-block;overflow:hidden;" + "text-align:left;width:300px;height:150px}"
+        }
+    }
+
+    addNamespacesAndStylesheet(document);
+    var G_vmlCanvasManager_ = {
+        init: function (opt_doc) {
+            var doc = opt_doc || document;
+            doc.createElement("canvas");
+            doc.attachEvent("onreadystatechange", bind(this.init_, this, doc))
+        }, init_: function (doc) {
+            var els = doc.getElementsByTagName("canvas");
+            for (var i = 0; i < els.length; i++)this.initElement(els[i])
+        }, initElement: function (el) {
+            if (!el.getContext) {
+                el.getContext =
+                    getContext;
+                addNamespacesAndStylesheet(el.ownerDocument);
+                el.innerHTML = "";
+                el.attachEvent("onpropertychange", onPropertyChange);
+                el.attachEvent("onresize", onResize);
+                var attrs = el.attributes;
+                if (attrs.width && attrs.width.specified)el.style.width = attrs.width.nodeValue + "px"; else el.width = el.clientWidth;
+                if (attrs.height && attrs.height.specified)el.style.height = attrs.height.nodeValue + "px"; else el.height = el.clientHeight
+            }
+            return el
+        }
+    };
+
+    function onPropertyChange(e) {
+        var el = e.srcElement;
+        switch (e.propertyName) {
+            case "width":
+                el.getContext().clearRect();
+                el.style.width = el.attributes.width.nodeValue + "px";
+                el.firstChild.style.width = el.clientWidth + "px";
+                break;
+            case "height":
+                el.getContext().clearRect();
+                el.style.height = el.attributes.height.nodeValue + "px";
+                el.firstChild.style.height = el.clientHeight + "px";
+                break
+        }
+    }
+
+    function onResize(e) {
+        var el = e.srcElement;
+        if (el.firstChild) {
+            el.firstChild.style.width = el.clientWidth + "px";
+            el.firstChild.style.height = el.clientHeight + "px"
+        }
+    }
+
+    G_vmlCanvasManager_.init();
+    var decToHex = [];
+    for (var i = 0; i < 16; i++)for (var j = 0; j < 16; j++)decToHex[i *
+    16 + j] = i.toString(16) + j.toString(16);
+    function createMatrixIdentity() {
+        return [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
+    }
+
+    function matrixMultiply(m1, m2) {
+        var result = createMatrixIdentity();
+        for (var x = 0; x < 3; x++)for (var y = 0; y < 3; y++) {
+            var sum = 0;
+            for (var z = 0; z < 3; z++)sum += m1[x][z] * m2[z][y];
+            result[x][y] = sum
+        }
+        return result
+    }
+
+    function copyState(o1, o2) {
+        o2.fillStyle = o1.fillStyle;
+        o2.lineCap = o1.lineCap;
+        o2.lineJoin = o1.lineJoin;
+        o2.lineWidth = o1.lineWidth;
+        o2.miterLimit = o1.miterLimit;
+        o2.shadowBlur = o1.shadowBlur;
+        o2.shadowColor = o1.shadowColor;
+        o2.shadowOffsetX =
+            o1.shadowOffsetX;
+        o2.shadowOffsetY = o1.shadowOffsetY;
+        o2.strokeStyle = o1.strokeStyle;
+        o2.globalAlpha = o1.globalAlpha;
+        o2.font = o1.font;
+        o2.textAlign = o1.textAlign;
+        o2.textBaseline = o1.textBaseline;
+        o2.arcScaleX_ = o1.arcScaleX_;
+        o2.arcScaleY_ = o1.arcScaleY_;
+        o2.lineScale_ = o1.lineScale_
+    }
+
+    var colorData = {
+        aliceblue: "#F0F8FF",
+        antiquewhite: "#FAEBD7",
+        aquamarine: "#7FFFD4",
+        azure: "#F0FFFF",
+        beige: "#F5F5DC",
+        bisque: "#FFE4C4",
+        black: "#000000",
+        blanchedalmond: "#FFEBCD",
+        blueviolet: "#8A2BE2",
+        brown: "#A52A2A",
+        burlywood: "#DEB887",
+        cadetblue: "#5F9EA0",
+        chartreuse: "#7FFF00",
+        chocolate: "#D2691E",
+        coral: "#FF7F50",
+        cornflowerblue: "#6495ED",
+        cornsilk: "#FFF8DC",
+        crimson: "#DC143C",
+        cyan: "#00FFFF",
+        darkblue: "#00008B",
+        darkcyan: "#008B8B",
+        darkgoldenrod: "#B8860B",
+        darkgray: "#A9A9A9",
+        darkgreen: "#006400",
+        darkgrey: "#A9A9A9",
+        darkkhaki: "#BDB76B",
+        darkmagenta: "#8B008B",
+        darkolivegreen: "#556B2F",
+        darkorange: "#FF8C00",
+        darkorchid: "#9932CC",
+        darkred: "#8B0000",
+        darksalmon: "#E9967A",
+        darkseagreen: "#8FBC8F",
+        darkslateblue: "#483D8B",
+        darkslategray: "#2F4F4F",
+        darkslategrey: "#2F4F4F",
+        darkturquoise: "#00CED1",
+        darkviolet: "#9400D3",
+        deeppink: "#FF1493",
+        deepskyblue: "#00BFFF",
+        dimgray: "#696969",
+        dimgrey: "#696969",
+        dodgerblue: "#1E90FF",
+        firebrick: "#B22222",
+        floralwhite: "#FFFAF0",
+        forestgreen: "#228B22",
+        gainsboro: "#DCDCDC",
+        ghostwhite: "#F8F8FF",
+        gold: "#FFD700",
+        goldenrod: "#DAA520",
+        grey: "#808080",
+        greenyellow: "#ADFF2F",
+        honeydew: "#F0FFF0",
+        hotpink: "#FF69B4",
+        indianred: "#CD5C5C",
+        indigo: "#4B0082",
+        ivory: "#FFFFF0",
+        khaki: "#F0E68C",
+        lavender: "#E6E6FA",
+        lavenderblush: "#FFF0F5",
+        lawngreen: "#7CFC00",
+        lemonchiffon: "#FFFACD",
+        lightblue: "#ADD8E6",
+        lightcoral: "#F08080",
+        lightcyan: "#E0FFFF",
+        lightgoldenrodyellow: "#FAFAD2",
+        lightgreen: "#90EE90",
+        lightgrey: "#D3D3D3",
+        lightpink: "#FFB6C1",
+        lightsalmon: "#FFA07A",
+        lightseagreen: "#20B2AA",
+        lightskyblue: "#87CEFA",
+        lightslategray: "#778899",
+        lightslategrey: "#778899",
+        lightsteelblue: "#B0C4DE",
+        lightyellow: "#FFFFE0",
+        limegreen: "#32CD32",
+        linen: "#FAF0E6",
+        magenta: "#FF00FF",
+        mediumaquamarine: "#66CDAA",
+        mediumblue: "#0000CD",
+        mediumorchid: "#BA55D3",
+        mediumpurple: "#9370DB",
+        mediumseagreen: "#3CB371",
+        mediumslateblue: "#7B68EE",
+        mediumspringgreen: "#00FA9A",
+        mediumturquoise: "#48D1CC",
+        mediumvioletred: "#C71585",
+        midnightblue: "#191970",
+        mintcream: "#F5FFFA",
+        mistyrose: "#FFE4E1",
+        moccasin: "#FFE4B5",
+        navajowhite: "#FFDEAD",
+        oldlace: "#FDF5E6",
+        olivedrab: "#6B8E23",
+        orange: "#FFA500",
+        orangered: "#FF4500",
+        orchid: "#DA70D6",
+        palegoldenrod: "#EEE8AA",
+        palegreen: "#98FB98",
+        paleturquoise: "#AFEEEE",
+        palevioletred: "#DB7093",
+        papayawhip: "#FFEFD5",
+        peachpuff: "#FFDAB9",
+        peru: "#CD853F",
+        pink: "#FFC0CB",
+        plum: "#DDA0DD",
+        powderblue: "#B0E0E6",
+        rosybrown: "#BC8F8F",
+        royalblue: "#4169E1",
+        saddlebrown: "#8B4513",
+        salmon: "#FA8072",
+        sandybrown: "#F4A460",
+        seagreen: "#2E8B57",
+        seashell: "#FFF5EE",
+        sienna: "#A0522D",
+        skyblue: "#87CEEB",
+        slateblue: "#6A5ACD",
+        slategray: "#708090",
+        slategrey: "#708090",
+        snow: "#FFFAFA",
+        springgreen: "#00FF7F",
+        steelblue: "#4682B4",
+        tan: "#D2B48C",
+        thistle: "#D8BFD8",
+        tomato: "#FF6347",
+        turquoise: "#40E0D0",
+        violet: "#EE82EE",
+        wheat: "#F5DEB3",
+        whitesmoke: "#F5F5F5",
+        yellowgreen: "#9ACD32"
+    };
+
+    function getRgbHslContent(styleString) {
+        var start = styleString.indexOf("(", 3);
+        var end = styleString.indexOf(")", start + 1);
+        var parts =
+            styleString.substring(start + 1, end).split(",");
+        if (parts.length != 4 || styleString.charAt(3) != "a")parts[3] = 1;
+        return parts
+    }
+
+    function percent(s) {
+        return parseFloat(s) / 100
+    }
+
+    function clamp(v, min, max) {
+        return Math.min(max, Math.max(min, v))
+    }
+
+    function hslToRgb(parts) {
+        var r, g, b, h, s, l;
+        h = parseFloat(parts[0]) / 360 % 360;
+        if (h < 0)h++;
+        s = clamp(percent(parts[1]), 0, 1);
+        l = clamp(percent(parts[2]), 0, 1);
+        if (s == 0)r = g = b = l; else {
+            var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+            var p = 2 * l - q;
+            r = hueToRgb(p, q, h + 1 / 3);
+            g = hueToRgb(p, q, h);
+            b = hueToRgb(p, q, h - 1 / 3)
+        }
+        return "#" +
+            decToHex[Math.floor(r * 255)] + decToHex[Math.floor(g * 255)] + decToHex[Math.floor(b * 255)]
+    }
+
+    function hueToRgb(m1, m2, h) {
+        if (h < 0)h++;
+        if (h > 1)h--;
+        if (6 * h < 1)return m1 + (m2 - m1) * 6 * h; else if (2 * h < 1)return m2; else if (3 * h < 2)return m1 + (m2 - m1) * (2 / 3 - h) * 6; else return m1
+    }
+
+    var processStyleCache = {};
+
+    function processStyle(styleString) {
+        if (styleString in processStyleCache)return processStyleCache[styleString];
+        var str, alpha = 1;
+        styleString = String(styleString);
+        if (styleString.charAt(0) == "#")str = styleString; else if (/^rgb/.test(styleString)) {
+            var parts =
+                getRgbHslContent(styleString);
+            var str = "#", n;
+            for (var i = 0; i < 3; i++) {
+                if (parts[i].indexOf("%") != -1)n = Math.floor(percent(parts[i]) * 255); else n = +parts[i];
+                str += decToHex[clamp(n, 0, 255)]
+            }
+            alpha = +parts[3]
+        } else if (/^hsl/.test(styleString)) {
+            var parts = getRgbHslContent(styleString);
+            str = hslToRgb(parts);
+            alpha = parts[3]
+        } else str = colorData[styleString] || styleString;
+        return processStyleCache[styleString] = {color: str, alpha: alpha}
+    }
+
+    var DEFAULT_STYLE = {style: "normal", variant: "normal", weight: "normal", size: 10, family: "sans-serif"};
+    var fontStyleCache = {};
+
+    function processFontStyle(styleString) {
+        if (fontStyleCache[styleString])return fontStyleCache[styleString];
+        var el = document.createElement("div");
+        var style = el.style;
+        try {
+            style.font = styleString
+        } catch (ex) {
+        }
+        return fontStyleCache[styleString] = {
+            style: style.fontStyle || DEFAULT_STYLE.style,
+            variant: style.fontVariant || DEFAULT_STYLE.variant,
+            weight: style.fontWeight || DEFAULT_STYLE.weight,
+            size: style.fontSize || DEFAULT_STYLE.size,
+            family: style.fontFamily || DEFAULT_STYLE.family
+        }
+    }
+
+    function getComputedStyle(style,
+                              element) {
+        var computedStyle = {};
+        for (var p in style)computedStyle[p] = style[p];
+        var canvasFontSize = parseFloat(element.currentStyle.fontSize), fontSize = parseFloat(style.size);
+        if (typeof style.size == "number")computedStyle.size = style.size; else if (style.size.indexOf("px") != -1)computedStyle.size = fontSize; else if (style.size.indexOf("em") != -1)computedStyle.size = canvasFontSize * fontSize; else if (style.size.indexOf("%") != -1)computedStyle.size = canvasFontSize / 100 * fontSize; else if (style.size.indexOf("pt") != -1)computedStyle.size =
+            fontSize / 0.75; else computedStyle.size = canvasFontSize;
+        computedStyle.size *= 0.981;
+        return computedStyle
+    }
+
+    function buildStyle(style) {
+        return style.style + " " + style.variant + " " + style.weight + " " + style.size + "px " + style.family
+    }
+
+    var lineCapMap = {"butt": "flat", "round": "round"};
+
+    function processLineCap(lineCap) {
+        return lineCapMap[lineCap] || "square"
+    }
+
+    function CanvasRenderingContext2D_(canvasElement) {
+        this.m_ = createMatrixIdentity();
+        this.mStack_ = [];
+        this.aStack_ = [];
+        this.currentPath_ = [];
+        this.strokeStyle = "#000";
+        this.fillStyle =
+            "#000";
+        this.lineWidth = 1;
+        this.lineJoin = "miter";
+        this.lineCap = "butt";
+        this.miterLimit = Z * 1;
+        this.globalAlpha = 1;
+        this.font = "10px sans-serif";
+        this.textAlign = "left";
+        this.textBaseline = "alphabetic";
+        this.canvas = canvasElement;
+        var cssText = "width:" + canvasElement.clientWidth + "px;height:" + canvasElement.clientHeight + "px;overflow:hidden;position:absolute";
+        var el = canvasElement.ownerDocument.createElement("div");
+        el.style.cssText = cssText;
+        canvasElement.appendChild(el);
+        var overlayEl = el.cloneNode(false);
+        overlayEl.style.backgroundColor =
+            "red";
+        overlayEl.style.filter = "alpha(opacity=0)";
+        canvasElement.appendChild(overlayEl);
+        this.element_ = el;
+        this.arcScaleX_ = 1;
+        this.arcScaleY_ = 1;
+        this.lineScale_ = 1
+    }
+
+    var contextPrototype = CanvasRenderingContext2D_.prototype;
+    contextPrototype.clearRect = function () {
+        if (this.textMeasureEl_) {
+            this.textMeasureEl_.removeNode(true);
+            this.textMeasureEl_ = null
+        }
+        this.element_.innerHTML = ""
+    };
+    contextPrototype.beginPath = function () {
+        this.currentPath_ = []
+    };
+    contextPrototype.moveTo = function (aX, aY) {
+        var p = getCoords(this, aX, aY);
+        this.currentPath_.push({
+            type: "moveTo",
+            x: p.x, y: p.y
+        });
+        this.currentX_ = p.x;
+        this.currentY_ = p.y
+    };
+    contextPrototype.lineTo = function (aX, aY) {
+        var p = getCoords(this, aX, aY);
+        this.currentPath_.push({type: "lineTo", x: p.x, y: p.y});
+        this.currentX_ = p.x;
+        this.currentY_ = p.y
+    };
+    contextPrototype.bezierCurveTo = function (aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {
+        var p = getCoords(this, aX, aY);
+        var cp1 = getCoords(this, aCP1x, aCP1y);
+        var cp2 = getCoords(this, aCP2x, aCP2y);
+        bezierCurveTo(this, cp1, cp2, p)
+    };
+    function bezierCurveTo(self, cp1, cp2, p) {
+        self.currentPath_.push({
+            type: "bezierCurveTo", cp1x: cp1.x,
+            cp1y: cp1.y, cp2x: cp2.x, cp2y: cp2.y, x: p.x, y: p.y
+        });
+        self.currentX_ = p.x;
+        self.currentY_ = p.y
+    }
+
+    contextPrototype.quadraticCurveTo = function (aCPx, aCPy, aX, aY) {
+        var cp = getCoords(this, aCPx, aCPy);
+        var p = getCoords(this, aX, aY);
+        var cp1 = {
+            x: this.currentX_ + 2 / 3 * (cp.x - this.currentX_),
+            y: this.currentY_ + 2 / 3 * (cp.y - this.currentY_)
+        };
+        var cp2 = {x: cp1.x + (p.x - this.currentX_) / 3, y: cp1.y + (p.y - this.currentY_) / 3};
+        bezierCurveTo(this, cp1, cp2, p)
+    };
+    contextPrototype.arc = function (aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {
+        aRadius *= Z;
+        var arcType =
+            aClockwise ? "at" : "wa";
+        var xStart = aX + mc(aStartAngle) * aRadius - Z2;
+        var yStart = aY + ms(aStartAngle) * aRadius - Z2;
+        var xEnd = aX + mc(aEndAngle) * aRadius - Z2;
+        var yEnd = aY + ms(aEndAngle) * aRadius - Z2;
+        if (xStart == xEnd && !aClockwise)xStart += 0.125;
+        var p = getCoords(this, aX, aY);
+        var pStart = getCoords(this, xStart, yStart);
+        var pEnd = getCoords(this, xEnd, yEnd);
+        this.currentPath_.push({
+            type: arcType,
+            x: p.x,
+            y: p.y,
+            radius: aRadius,
+            xStart: pStart.x,
+            yStart: pStart.y,
+            xEnd: pEnd.x,
+            yEnd: pEnd.y
+        })
+    };
+    contextPrototype.rect = function (aX, aY, aWidth, aHeight) {
+        this.moveTo(aX,
+            aY);
+        this.lineTo(aX + aWidth, aY);
+        this.lineTo(aX + aWidth, aY + aHeight);
+        this.lineTo(aX, aY + aHeight);
+        this.closePath()
+    };
+    contextPrototype.strokeRect = function (aX, aY, aWidth, aHeight) {
+        var oldPath = this.currentPath_;
+        this.beginPath();
+        this.moveTo(aX, aY);
+        this.lineTo(aX + aWidth, aY);
+        this.lineTo(aX + aWidth, aY + aHeight);
+        this.lineTo(aX, aY + aHeight);
+        this.closePath();
+        this.stroke();
+        this.currentPath_ = oldPath
+    };
+    contextPrototype.fillRect = function (aX, aY, aWidth, aHeight) {
+        var oldPath = this.currentPath_;
+        this.beginPath();
+        this.moveTo(aX, aY);
+        this.lineTo(aX + aWidth, aY);
+        this.lineTo(aX + aWidth, aY + aHeight);
+        this.lineTo(aX, aY + aHeight);
+        this.closePath();
+        this.fill();
+        this.currentPath_ = oldPath
+    };
+    contextPrototype.createLinearGradient = function (aX0, aY0, aX1, aY1) {
+        var gradient = new CanvasGradient_("gradient");
+        gradient.x0_ = aX0;
+        gradient.y0_ = aY0;
+        gradient.x1_ = aX1;
+        gradient.y1_ = aY1;
+        return gradient
+    };
+    contextPrototype.createRadialGradient = function (aX0, aY0, aR0, aX1, aY1, aR1) {
+        var gradient = new CanvasGradient_("gradientradial");
+        gradient.x0_ = aX0;
+        gradient.y0_ = aY0;
+        gradient.r0_ =
+            aR0;
+        gradient.x1_ = aX1;
+        gradient.y1_ = aY1;
+        gradient.r1_ = aR1;
+        return gradient
+    };
+    contextPrototype.drawImage = function (image, var_args) {
+        var dx, dy, dw, dh, sx, sy, sw, sh;
+        var oldRuntimeWidth = image.runtimeStyle.width;
+        var oldRuntimeHeight = image.runtimeStyle.height;
+        image.runtimeStyle.width = "auto";
+        image.runtimeStyle.height = "auto";
+        var w = image.width;
+        var h = image.height;
+        image.runtimeStyle.width = oldRuntimeWidth;
+        image.runtimeStyle.height = oldRuntimeHeight;
+        if (arguments.length == 3) {
+            dx = arguments[1];
+            dy = arguments[2];
+            sx = sy = 0;
+            sw = dw = w;
+            sh = dh = h
+        } else if (arguments.length == 5) {
+            dx = arguments[1];
+            dy = arguments[2];
+            dw = arguments[3];
+            dh = arguments[4];
+            sx = sy = 0;
+            sw = w;
+            sh = h
+        } else if (arguments.length == 9) {
+            sx = arguments[1];
+            sy = arguments[2];
+            sw = arguments[3];
+            sh = arguments[4];
+            dx = arguments[5];
+            dy = arguments[6];
+            dw = arguments[7];
+            dh = arguments[8]
+        } else throw Error("Invalid number of arguments");
+        var d = getCoords(this, dx, dy);
+        var w2 = sw / 2;
+        var h2 = sh / 2;
+        var vmlStr = [];
+        var W = 10;
+        var H = 10;
+        vmlStr.push(" <g_vml_:group", ' coordsize="', Z * W, ",", Z * H, '"', ' coordorigin="0,0"', ' style="width:',
+            W, "px;height:", H, "px;position:absolute;");
+        if (this.m_[0][0] != 1 || this.m_[0][1] || this.m_[1][1] != 1 || this.m_[1][0]) {
+            var filter = [];
+            filter.push("M11=", this.m_[0][0], ",", "M12=", this.m_[1][0], ",", "M21=", this.m_[0][1], ",", "M22=", this.m_[1][1], ",", "Dx=", mr(d.x / Z), ",", "Dy=", mr(d.y / Z), "");
+            var max = d;
+            var c2 = getCoords(this, dx + dw, dy);
+            var c3 = getCoords(this, dx, dy + dh);
+            var c4 = getCoords(this, dx + dw, dy + dh);
+            max.x = m.max(max.x, c2.x, c3.x, c4.x);
+            max.y = m.max(max.y, c2.y, c3.y, c4.y);
+            vmlStr.push("padding:0 ", mr(max.x / Z), "px ", mr(max.y /
+                Z), "px 0;filter:progid:DXImageTransform.Microsoft.Matrix(", filter.join(""), ", sizingmethod='clip');")
+        } else vmlStr.push("top:", mr(d.y / Z), "px;left:", mr(d.x / Z), "px;");
+        vmlStr.push(' ">', '<g_vml_:image src="', image.src, '"', ' style="width:', Z * dw, "px;", " height:", Z * dh, 'px"', ' cropleft="', sx / w, '"', ' croptop="', sy / h, '"', ' cropright="', (w - sx - sw) / w, '"', ' cropbottom="', (h - sy - sh) / h, '"', " />", "</g_vml_:group>");
+        this.element_.insertAdjacentHTML("BeforeEnd", vmlStr.join(""))
+    };
+    contextPrototype.stroke = function (aFill) {
+        var W =
+            10;
+        var H = 10;
+        var chunkSize = 5E3;
+        var min = {x: null, y: null};
+        var max = {x: null, y: null};
+        for (var j = 0; j < this.currentPath_.length; j += chunkSize) {
+            var lineStr = [];
+            var lineOpen = false;
+            lineStr.push("<g_vml_:shape", ' filled="', !!aFill, '"', ' style="position:absolute;width:', W, "px;height:", H, 'px;"', ' coordorigin="0,0"', ' coordsize="', Z * W, ",", Z * H, '"', ' stroked="', !aFill, '"', ' path="');
+            var newSeq = false;
+            for (var i = j; i < Math.min(j + chunkSize, this.currentPath_.length); i++) {
+                if (i % chunkSize == 0 && i > 0)lineStr.push(" m ", mr(this.currentPath_[i -
+                1].x), ",", mr(this.currentPath_[i - 1].y));
+                var p = this.currentPath_[i];
+                var c;
+                switch (p.type) {
+                    case "moveTo":
+                        c = p;
+                        lineStr.push(" m ", mr(p.x), ",", mr(p.y));
+                        break;
+                    case "lineTo":
+                        lineStr.push(" l ", mr(p.x), ",", mr(p.y));
+                        break;
+                    case "close":
+                        lineStr.push(" x ");
+                        p = null;
+                        break;
+                    case "bezierCurveTo":
+                        lineStr.push(" c ", mr(p.cp1x), ",", mr(p.cp1y), ",", mr(p.cp2x), ",", mr(p.cp2y), ",", mr(p.x), ",", mr(p.y));
+                        break;
+                    case "at":
+                    case "wa":
+                        lineStr.push(" ", p.type, " ", mr(p.x - this.arcScaleX_ * p.radius), ",", mr(p.y - this.arcScaleY_ * p.radius),
+                            " ", mr(p.x + this.arcScaleX_ * p.radius), ",", mr(p.y + this.arcScaleY_ * p.radius), " ", mr(p.xStart), ",", mr(p.yStart), " ", mr(p.xEnd), ",", mr(p.yEnd));
+                        break
+                }
+                if (p) {
+                    if (min.x == null || p.x < min.x)min.x = p.x;
+                    if (max.x == null || p.x > max.x)max.x = p.x;
+                    if (min.y == null || p.y < min.y)min.y = p.y;
+                    if (max.y == null || p.y > max.y)max.y = p.y
+                }
+            }
+            lineStr.push(' ">');
+            if (!aFill)appendStroke(this, lineStr); else appendFill(this, lineStr, min, max);
+            lineStr.push("</g_vml_:shape>");
+            this.element_.insertAdjacentHTML("beforeEnd", lineStr.join(""))
+        }
+    };
+    function appendStroke(ctx,
+                          lineStr) {
+        var a = processStyle(ctx.strokeStyle);
+        var color = a.color;
+        var opacity = a.alpha * ctx.globalAlpha;
+        var lineWidth = ctx.lineScale_ * ctx.lineWidth;
+        if (lineWidth < 1)opacity *= lineWidth;
+        lineStr.push("<g_vml_:stroke", ' opacity="', opacity, '"', ' joinstyle="', ctx.lineJoin, '"', ' miterlimit="', ctx.miterLimit, '"', ' endcap="', processLineCap(ctx.lineCap), '"', ' weight="', lineWidth, 'px"', ' color="', color, '" />')
+    }
+
+    function appendFill(ctx, lineStr, min, max) {
+        var fillStyle = ctx.fillStyle;
+        var arcScaleX = ctx.arcScaleX_;
+        var arcScaleY =
+            ctx.arcScaleY_;
+        var width = max.x - min.x;
+        var height = max.y - min.y;
+        if (fillStyle instanceof CanvasGradient_) {
+            var angle = 0;
+            var focus = {x: 0, y: 0};
+            var shift = 0;
+            var expansion = 1;
+            if (fillStyle.type_ == "gradient") {
+                var x0 = fillStyle.x0_ / arcScaleX;
+                var y0 = fillStyle.y0_ / arcScaleY;
+                var x1 = fillStyle.x1_ / arcScaleX;
+                var y1 = fillStyle.y1_ / arcScaleY;
+                var p0 = getCoords(ctx, x0, y0);
+                var p1 = getCoords(ctx, x1, y1);
+                var dx = p1.x - p0.x;
+                var dy = p1.y - p0.y;
+                angle = Math.atan2(dx, dy) * 180 / Math.PI;
+                if (angle < 0)angle += 360;
+                if (angle < 1E-6)angle = 0
+            } else {
+                var p0 = getCoords(ctx,
+                    fillStyle.x0_, fillStyle.y0_);
+                focus = {x: (p0.x - min.x) / width, y: (p0.y - min.y) / height};
+                width /= arcScaleX * Z;
+                height /= arcScaleY * Z;
+                var dimension = m.max(width, height);
+                shift = 2 * fillStyle.r0_ / dimension;
+                expansion = 2 * fillStyle.r1_ / dimension - shift
+            }
+            var stops = fillStyle.colors_;
+            stops.sort(function (cs1, cs2) {
+                return cs1.offset - cs2.offset
+            });
+            var length = stops.length;
+            var color1 = stops[0].color;
+            var color2 = stops[length - 1].color;
+            var opacity1 = stops[0].alpha * ctx.globalAlpha;
+            var opacity2 = stops[length - 1].alpha * ctx.globalAlpha;
+            var colors =
+                [];
+            for (var i = 0; i < length; i++) {
+                var stop = stops[i];
+                colors.push(stop.offset * expansion + shift + " " + stop.color)
+            }
+            lineStr.push('<g_vml_:fill type="', fillStyle.type_, '"', ' method="none" focus="100%"', ' color="', color1, '"', ' color2="', color2, '"', ' colors="', colors.join(","), '"', ' opacity="', opacity2, '"', ' g_o_:opacity2="', opacity1, '"', ' angle="', angle, '"', ' focusposition="', focus.x, ",", focus.y, '" />')
+        } else if (fillStyle instanceof CanvasPattern_) {
+            if (width && height) {
+                var deltaLeft = -min.x;
+                var deltaTop = -min.y;
+                lineStr.push("<g_vml_:fill",
+                    ' position="', deltaLeft / width * arcScaleX * arcScaleX, ",", deltaTop / height * arcScaleY * arcScaleY, '"', ' type="tile"', ' src="', fillStyle.src_, '" />')
+            }
+        } else {
+            var a = processStyle(ctx.fillStyle);
+            var color = a.color;
+            var opacity = a.alpha * ctx.globalAlpha;
+            lineStr.push('<g_vml_:fill color="', color, '" opacity="', opacity, '" />')
+        }
+    }
+
+    contextPrototype.fill = function () {
+        this.stroke(true)
+    };
+    contextPrototype.closePath = function () {
+        this.currentPath_.push({type: "close"})
+    };
+    function getCoords(ctx, aX, aY) {
+        var m = ctx.m_;
+        return {
+            x: Z * (aX * m[0][0] +
+            aY * m[1][0] + m[2][0]) - Z2, y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2
+        }
+    }
+
+    contextPrototype.save = function () {
+        var o = {};
+        copyState(this, o);
+        this.aStack_.push(o);
+        this.mStack_.push(this.m_);
+        this.m_ = matrixMultiply(createMatrixIdentity(), this.m_)
+    };
+    contextPrototype.restore = function () {
+        if (this.aStack_.length) {
+            copyState(this.aStack_.pop(), this);
+            this.m_ = this.mStack_.pop()
+        }
+    };
+    function matrixIsFinite(m) {
+        return isFinite(m[0][0]) && isFinite(m[0][1]) && isFinite(m[1][0]) && isFinite(m[1][1]) && isFinite(m[2][0]) && isFinite(m[2][1])
+    }
+
+    function setM(ctx,
+                  m, updateLineScale) {
+        if (!matrixIsFinite(m))return;
+        ctx.m_ = m;
+        if (updateLineScale) {
+            var det = m[0][0] * m[1][1] - m[0][1] * m[1][0];
+            ctx.lineScale_ = sqrt(abs(det))
+        }
+    }
+
+    contextPrototype.translate = function (aX, aY) {
+        var m1 = [[1, 0, 0], [0, 1, 0], [aX, aY, 1]];
+        setM(this, matrixMultiply(m1, this.m_), false)
+    };
+    contextPrototype.rotate = function (aRot) {
+        var c = mc(aRot);
+        var s = ms(aRot);
+        var m1 = [[c, s, 0], [-s, c, 0], [0, 0, 1]];
+        setM(this, matrixMultiply(m1, this.m_), false)
+    };
+    contextPrototype.scale = function (aX, aY) {
+        this.arcScaleX_ *= aX;
+        this.arcScaleY_ *= aY;
+        var m1 =
+            [[aX, 0, 0], [0, aY, 0], [0, 0, 1]];
+        setM(this, matrixMultiply(m1, this.m_), true)
+    };
+    contextPrototype.transform = function (m11, m12, m21, m22, dx, dy) {
+        var m1 = [[m11, m12, 0], [m21, m22, 0], [dx, dy, 1]];
+        setM(this, matrixMultiply(m1, this.m_), true)
+    };
+    contextPrototype.setTransform = function (m11, m12, m21, m22, dx, dy) {
+        var m = [[m11, m12, 0], [m21, m22, 0], [dx, dy, 1]];
+        setM(this, m, true)
+    };
+    contextPrototype.drawText_ = function (text, x, y, maxWidth, stroke) {
+        var m = this.m_, delta = 1E3, left = 0, right = delta, offset = {x: 0, y: 0}, lineStr = [];
+        var fontStyle = getComputedStyle(processFontStyle(this.font),
+            this.element_);
+        var fontStyleString = buildStyle(fontStyle);
+        var elementStyle = this.element_.currentStyle;
+        var textAlign = this.textAlign.toLowerCase();
+        switch (textAlign) {
+            case "left":
+            case "center":
+            case "right":
+                break;
+            case "end":
+                textAlign = elementStyle.direction == "ltr" ? "right" : "left";
+                break;
+            case "start":
+                textAlign = elementStyle.direction == "rtl" ? "right" : "left";
+                break;
+            default:
+                textAlign = "left"
+        }
+        switch (this.textBaseline) {
+            case "hanging":
+            case "top":
+                offset.y = fontStyle.size / 1.75;
+                break;
+            case "middle":
+                break;
+            default:
+            case null:
+            case "alphabetic":
+            case "ideographic":
+            case "bottom":
+                offset.y =
+                    -fontStyle.size / 2.25;
+                break
+        }
+        switch (textAlign) {
+            case "right":
+                left = delta;
+                right = 0.05;
+                break;
+            case "center":
+                left = right = delta / 2;
+                break
+        }
+        var d = getCoords(this, x + offset.x, y + offset.y);
+        lineStr.push('<g_vml_:line from="', -left, ' 0" to="', right, ' 0.05" ', ' coordsize="100 100" coordorigin="0 0"', ' filled="', !stroke, '" stroked="', !!stroke, '" style="position:absolute;width:1px;height:1px;">');
+        if (stroke)appendStroke(this, lineStr); else appendFill(this, lineStr, {x: -left, y: 0}, {
+            x: right,
+            y: fontStyle.size
+        });
+        var skewM = m[0][0].toFixed(3) +
+            "," + m[1][0].toFixed(3) + "," + m[0][1].toFixed(3) + "," + m[1][1].toFixed(3) + ",0,0";
+        var skewOffset = mr(d.x / Z) + "," + mr(d.y / Z);
+        lineStr.push('<g_vml_:skew on="t" matrix="', skewM, '" ', ' offset="', skewOffset, '" origin="', left, ' 0" />', '<g_vml_:path textpathok="true" />', '<g_vml_:textpath on="true" string="', encodeHtmlAttribute(text), '" style="v-text-align:', textAlign, ";font:", encodeHtmlAttribute(fontStyleString), '" /></g_vml_:line>');
+        this.element_.insertAdjacentHTML("beforeEnd", lineStr.join(""))
+    };
+    contextPrototype.fillText =
+        function (text, x, y, maxWidth) {
+            this.drawText_(text, x, y, maxWidth, false)
+        };
+    contextPrototype.strokeText = function (text, x, y, maxWidth) {
+        this.drawText_(text, x, y, maxWidth, true)
+    };
+    contextPrototype.measureText = function (text) {
+        if (!this.textMeasureEl_) {
+            var s = '<span style="position:absolute;' + "top:-20000px;left:0;padding:0;margin:0;border:none;" + 'white-space:pre;"></span>';
+            this.element_.insertAdjacentHTML("beforeEnd", s);
+            this.textMeasureEl_ = this.element_.lastChild
+        }
+        var doc = this.element_.ownerDocument;
+        this.textMeasureEl_.innerHTML =
+            "";
+        this.textMeasureEl_.style.font = this.font;
+        this.textMeasureEl_.appendChild(doc.createTextNode(text));
+        return {width: this.textMeasureEl_.offsetWidth}
+    };
+    contextPrototype.clip = function () {
+    };
+    contextPrototype.arcTo = function () {
+    };
+    contextPrototype.createPattern = function (image, repetition) {
+        return new CanvasPattern_(image, repetition)
+    };
+    function CanvasGradient_(aType) {
+        this.type_ = aType;
+        this.x0_ = 0;
+        this.y0_ = 0;
+        this.r0_ = 0;
+        this.x1_ = 0;
+        this.y1_ = 0;
+        this.r1_ = 0;
+        this.colors_ = []
+    }
+
+    CanvasGradient_.prototype.addColorStop = function (aOffset,
+                                                       aColor) {
+        aColor = processStyle(aColor);
+        this.colors_.push({offset: aOffset, color: aColor.color, alpha: aColor.alpha})
+    };
+    function CanvasPattern_(image, repetition) {
+        assertImageIsValid(image);
+        switch (repetition) {
+            case "repeat":
+            case null:
+            case "":
+                this.repetition_ = "repeat";
+                break;
+            case "repeat-x":
+            case "repeat-y":
+            case "no-repeat":
+                this.repetition_ = repetition;
+                break;
+            default:
+                throwException("SYNTAX_ERR")
+        }
+        this.src_ = image.src;
+        this.width_ = image.width;
+        this.height_ = image.height
+    }
+
+    function throwException(s) {
+        throw new DOMException_(s);
+    }
+
+    function assertImageIsValid(img) {
+        if (!img || img.nodeType != 1 || img.tagName != "IMG")throwException("TYPE_MISMATCH_ERR");
+        if (img.readyState != "complete")throwException("INVALID_STATE_ERR")
+    }
+
+    function DOMException_(s) {
+        this.code = this[s];
+        this.message = s + ": DOM Exception " + this.code
+    }
+
+    var p = DOMException_.prototype = new Error;
+    p.INDEX_SIZE_ERR = 1;
+    p.DOMSTRING_SIZE_ERR = 2;
+    p.HIERARCHY_REQUEST_ERR = 3;
+    p.WRONG_DOCUMENT_ERR = 4;
+    p.INVALID_CHARACTER_ERR = 5;
+    p.NO_DATA_ALLOWED_ERR = 6;
+    p.NO_MODIFICATION_ALLOWED_ERR = 7;
+    p.NOT_FOUND_ERR = 8;
+    p.NOT_SUPPORTED_ERR =
+        9;
+    p.INUSE_ATTRIBUTE_ERR = 10;
+    p.INVALID_STATE_ERR = 11;
+    p.SYNTAX_ERR = 12;
+    p.INVALID_MODIFICATION_ERR = 13;
+    p.NAMESPACE_ERR = 14;
+    p.INVALID_ACCESS_ERR = 15;
+    p.VALIDATION_ERR = 16;
+    p.TYPE_MISMATCH_ERR = 17;
+    G_vmlCanvasManager = G_vmlCanvasManager_;
+    CanvasRenderingContext2D = CanvasRenderingContext2D_;
+    CanvasGradient = CanvasGradient_;
+    CanvasPattern = CanvasPattern_;
+    DOMException = DOMException_
+})();

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/gadgetconf.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/gadgetconf.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/gadgetconf.js
new file mode 100644
index 0000000..a8e3ff4
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/gadgetconf.js
@@ -0,0 +1,89 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+var gadgetConfig = {
+    "id": "Member_Information",
+    "title": "Member Information",
+    "datasource": "MEMBER_INFORMATION",
+    "type": "batch",
+    "columns": [
+        {
+            "COLUMN_NAME": "MemberId",
+            "LABEL_NAME": "Member Id",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "InstanceType",
+            "LABEL_NAME": "Instance Type",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "ImageId",
+            "LABEL_NAME": "Image Id",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "HostName",
+            "LABEL_NAME": "Host Name",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "PrivateIPAddresses",
+            "LABEL_NAME": "Private IP Addresses",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "PublicIPAddresses",
+            "LABEL_NAME": "Public IP Addresses",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "Hypervisor",
+            "LABEL_NAME": "Hypervisor",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "CPU",
+            "LABEL_NAME": "CPU",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "RAM",
+            "LABEL_NAME": "RAM",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "OSName",
+            "LABEL_NAME": "OS Name",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "OSVersion",
+            "LABEL_NAME": "OS Version",
+            "DATA_TYPE": "varchar"
+        }
+    ],
+    "maxUpdateValue": 10,
+    "chartConfig": {
+        "chartType": "tabular", "xAxis": 0
+    }
+    ,
+    "domain": "carbon.super"
+};
\ No newline at end of file


[36/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/d3.geomap.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/d3.geomap.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/d3.geomap.css
new file mode 100644
index 0000000..032984c
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/d3.geomap.css
@@ -0,0 +1,48 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+text {
+    fill: #333;
+    font-size: 12px;
+}
+
+.background {
+    fill: none;
+    pointer-events: all;
+}
+
+.unit {
+    cursor: pointer;
+    fill: #ccc;
+    stroke: #000;
+    stroke-width: 0.4px;
+}
+
+.legend-bg {
+    fill: #fff;
+    fill-opacity: 0.8;
+}
+
+.legend-bar {
+    stroke: #333;
+    stroke-width: 1px;
+}
+
+/*# sourceMappingURL=geomap.css.map */

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/igviz.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/igviz.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/igviz.css
new file mode 100644
index 0000000..627f176
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/css/igviz.css
@@ -0,0 +1,86 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+#rect {
+    fill: none;
+    stroke: rgb(0, 0, 0);
+    stroke-width: 2;
+}
+
+#rectCurve {
+    fill: none;
+    stroke: rgb(0, 0, 0);
+    stroke-width: 0.5;
+}
+
+.axis path,
+.axis line {
+    fill: none;
+    shape-rendering: crispEdges;
+    stroke: grey;
+    stroke-width: 2;
+}
+
+.line {
+    fill: none;
+    stroke: steelblue;
+    stroke-width: 1.5px;
+}
+
+.label {
+    font-size: 16.844px !important;
+}
+
+/* arc tween shit*/
+.background {
+    fill: #FFFFFF;
+    fill-opacity: 0.01;
+}
+
+.component {
+    fill: #e1e1e1;
+}
+
+.component .label {
+    font-family: Myriad, "Helvetic Neue", Helvetica, Arial;
+    text-anchor: middle;
+    fill: #0000FF;
+}
+
+.arc {
+    stroke-weight: 0.1;
+    fill: #4e8fff;
+}
+
+.arc2 {
+    stroke-weight: 0.1;
+    fill: #3660b0;
+}
+
+.label {
+    font-family: Myriad, "Helvetic Neue", Helvetica, Arial;
+    text-anchor: middle;
+}
+
+.labelArc {
+    font-family: Myriad, "Helvetic Neue", Helvetica, Arial;
+    text-anchor: middle;
+    fill: #0000FF;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/gadget.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/gadget.json b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/gadget.json
new file mode 100644
index 0000000..0960c82
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/gadget.json
@@ -0,0 +1,19 @@
+{
+  "id": "Member_Count",
+  "title": "Member Count",
+  "type": "gadget",
+  "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png",
+  "data": {
+    "url": "local://store/carbon.super/gadget/Member_Count/index.xml"
+  },
+  "listen": {
+    "member-status-filter": {
+      "type": "address",
+      "description": "Used to filter based on state"
+    },
+    "auto-update": {
+      "type": "boolean",
+      "description": "Used to filter based on state"
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/index.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/index.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/index.xml
new file mode 100644
index 0000000..a743efe
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/index.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Module>
+    <ModulePrefs title="Bar Chart"
+                 author="WSO2 Gadget Server"
+                 height="230"
+                 scrolling="true"
+                 tags="charts,bar,visualization,data"
+                 description="A generic Bar Chart gadget, that takes a json datasource as an input. It can be configured to fetch data in defined intervals. This gadget can be used to create dashboards with statistical data. This gadget can be reused as an iframe in any web page as it is self contained.">
+        <!-- This is used to import the pubsub-2 feature -->
+        <Require feature="pubsub-2">
+            <Param name="topics">
+                <!-- subscribe="true" needs to be set to define the gadget as a subscriber gadget.-->
+                <![CDATA[
+                    <Topic title="member-status-filter" name="member-status-filter"
+                    description="Subscribes to member-status-filter channel" type="object"
+                    subscribe="true"/>
+                ]]>
+            </Param>
+        </Require>
+    </ModulePrefs>
+    <UserPref name="dataSource"
+              display_name="Data Source"
+              default_value="/portal/gadgets/bar-chart/datasource/dataFile4.jag">
+    </UserPref>
+
+    <UserPref name="updateGraph"
+              display_name="Update Interval (s)"
+              default_value="No">
+    </UserPref>
+    <Content type="html">
+        <![CDATA[
+             <html>
+             <head>
+                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+                <title>Bar Chart</title>
+                <link href="css/flot-graph.css" rel="stylesheet" type="text/css">
+                <link href="css/igviz.css" rel="stylesheet" type="text/css">
+                <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
+                <link href="css/d3.geomap.css" rel="stylesheet" type="text/css">
+                <script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script>
+                <script language="javascript" type="text/javascript" src="js/jquery.js"></script>
+                <script language="javascript" type="text/javascript" src="js/d3.min.js"></script>
+                <script language="javascript" type="text/javascript" src="js/vega.js"></script>
+                <script language="javascript" type="text/javascript" src="js/igviz.js"></script>
+                <script language="javascript" type="text/javascript" src="js/gadgetconf.js"></script>
+                <script language="javascript" type="text/javascript" src="js/outputAdapterUiLibrary.js"></script>
+                <script language="javascript" type="text/javascript" src="js/main.js"></script>
+                <script language="javascript" type="text/javascript" src="js/d3.geomap.dependencies.min.js"></script>
+                <script language="javascript" type="text/javascript" src="js/d3.geomap.min.js"></script>
+            </head>
+
+            <body>
+                <div id="placeholder" class="demo-placeholder" style="height:90%"></div>
+                <script language="javascript" type="text/javascript">
+                  if(jQuery("#placeholder").html() == ""){
+                    jQuery("#placeholder").append('<div id="noChart"><table><tr><td style="padding:30px 20px 0px 20px"><img src="../../portal/images/noEvents.png" align="left" style="width:24;height:24"/></td><td><br/><b><p><br/>Please select an application and cluster to view data</p></b></td></tr></table></div>');
+                  }
+                </script>
+            </body>
+            </html>
+    ]]>
+    </Content>
+</Module>
+
+


[18/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/igviz.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/igviz.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/igviz.js
new file mode 100644
index 0000000..8d31b36
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/igviz.js
@@ -0,0 +1,3565 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+(function () {
+
+    var igviz = window.igviz || {};
+
+    igviz.version = '1.0.0';
+
+    igviz.val = 0;
+    window.igviz = igviz;
+    var persistedData = [];
+    var maxValueForUpdate;
+    var singleNumSvg;
+    var singleNumCurveSvg;
+    var mapChart;
+    var mapSVG;
+    var worldMapCodes;
+    var usaMapCodes;
+
+    /*************************************************** Initializtion functions ***************************************************************************************************/
+
+
+    igviz.draw = function (canvas, config, dataTable) {
+        var chart = new Chart(canvas, config, dataTable);
+
+        if (config.chartType == "singleNumber") {
+            this.drawSingleNumberDiagram(chart);
+        } else if (config.chartType == "map") {
+            this.drawMap(canvas, config, dataTable);
+        } else if (config.chartType == "tabular") {
+            this.drawTable(canvas, config, dataTable);
+        } else if (config.chartType == "arc") {
+            this.drawArc(canvas, config, dataTable);
+        } else if (config.chartType == "drill") {
+            this.drillDown(0, canvas, config, dataTable, dataTable);
+        }
+        return chart;
+        //return
+    };
+
+    igviz.setUp = function (canvas, config, dataTable) {
+        var chartObject = new Chart(canvas, config, dataTable);
+
+        if (config.chartType == "bar") {
+            this.drawBarChart(chartObject, canvas, config, dataTable);
+        } else if (config.chartType == "scatter") {
+            this.drawScatterPlot(chartObject);
+        } else if (config.chartType == "line") {
+            this.drawLineChart(chartObject);
+        } else if (config.chartType == "area") {
+            this.drawAreaChart(chartObject);
+        }
+        return chartObject;
+    };
+
+
+    /*************************************************** Line chart ***************************************************************************************************/
+
+    igviz.drawLineChart = function (chartObj) {
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+        // table=setData(dataTable,chartConfig)
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = [];
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            yStrings[i] = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "range": "width",
+            "zero": false,
+            "clamp": false,
+            "field": xString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis[0],
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yStrings[0]
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": "values",
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        if (chartConfig.interpolationMode == undefined) {
+            chartConfig.interpolationMode = "monotone";
+        }
+        var spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height,
+            //  "padding":{"top":40,"bottom":60,'left':90,"right":150},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category20"
+                }
+            ],
+            "axes": [xAxis, yAxis
+            ],
+            "legends": [
+                {
+
+                    "orient": "right",
+                    "fill": "color",
+                    "title": "Legend",
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 1.5}
+
+                        }
+                    }
+                }
+            ],
+
+            "marks": []
+        }
+
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            markObj = {
+                "type": "line",
+                "key": xString,
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"value": 400},
+                        "interpolate": {"value": chartConfig.interpolationMode},
+                        "y": {"scale": "y:prev", "field": yStrings[i]},
+                        "stroke": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "strokeWidth": {"value": 1.5}
+                    },
+                    "update": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    },
+                    "exit": {
+                        "x": {"value": -20},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    }
+                }
+            };
+            pointObj = {
+                "type": "symbol",
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]},
+                        "fill": {
+                            "scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]
+                            //"fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            //"size": {"scale":"r","field":rString},
+                            // "stroke": {"value": "transparent"}
+                        },
+                        "hover": {
+                            "size": {"value": 300},
+                            "stroke": {"value": "white"}
+                        }
+                    }
+                }
+            }
+
+
+            spec.marks.push(markObj);
+            spec.marks.push(pointObj);
+            spec.legends[0].values.push(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+
+            console.log(tool, event, item);
+            if (item.mark.marktype == 'symbol') {
+                xVar = dataTable.metadata.names[chartConfig.xAxis]
+                yVar = dataTable.metadata.names[chartConfig.yAxis]
+
+                contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr></table>';
+
+
+                tool.html(contentString).style({
+                    'left': event.pageX + 10 + 'px',
+                    'top': event.pageY + 10 + 'px',
+                    'opacity': 1
+                })
+                tool.selectAll('tr td').style('padding', "3px");
+            }
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+        chartObj.spec = spec;
+
+    }
+
+
+    /*************************************************** Bar chart ***************************************************************************************************/
+    igviz.drawBarChart = function (mychart, divId, chartConfig, dataTable) {
+        //  console.log(this);
+        divId = mychart.canvas;
+        chartConfig = mychart.config;
+        dataTable = mychart.dataTable;
+        if (chartConfig.hasOwnProperty("groupedBy")) {
+            var format = "grouped";
+            if (chartConfig.hasOwnProperty("format")) {
+                format = chartConfig.format;
+
+            }
+            if (format == "grouped") {
+                console.log("groupedDFJSDFKSD:JFKDJF");
+                if (chartConfig.orientation == 'H') {
+                    console.log('horizontal');
+                    return this.drawGroupedBarChart(mychart);
+
+                }
+                return this.drawGroupedBarChartVertical(mychart);
+            }
+            else {
+                return this.drawStackedBarChart(mychart);
+            }
+        }
+
+        var xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis]);
+        var yString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis])
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "zero": false,
+            "range": "width",
+            "round": true,
+            "field": xString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yString
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": 30,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -35,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        if (chartConfig.barColor == undefined) {
+            chartConfig.barColor = "steelblue";
+        }
+
+//        console.log(table)
+        var spec = {
+
+            "width": chartConfig.width - 150,
+            //"padding":{'top':30,"left":80,"right":80,'bottom':60},
+            "height": chartConfig.height,
+            "data": [
+                {
+                    "name": "table"
+                }
+            ],
+            "scales": [
+                xScale,
+                yScale
+            ],
+            "axes": [
+                xAxis,
+                yAxis
+
+
+            ],
+            "marks": [
+                {
+                    "key": xString,
+                    "type": "rect",
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "width": {"scale": "x", "band": true, "offset": -10},
+                            "y": {"scale": "y:prev", "field": yString, "duration": 2000},
+                            "y2": {"scale": "y", "value": 0}
+
+                        },
+                        "update": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yString},
+                            "y2": {"scale": "y", "value": 0},
+                            "fill": {"value": chartConfig.barColor}
+                        },
+                        "exit": {
+                            "x": {"value": 0},
+                            "y": {"scale": "y:prev", "field": yString},
+                            "y2": {"scale": "y", "value": 0}
+                        },
+
+                        "hover": {
+
+                            "fill": {'value': 'orange'}
+                        }
+
+                    }
+                }
+            ]
+        }
+
+
+//        var data = {table: table}
+
+        mychart.originalWidth = chartConfig.width;
+        mychart.originalHeight = chartConfig.height;
+
+        mychart.spec = spec;
+        //mychart.data = data;
+        //mychart.table = table;
+        ////vg.parse.spec(spec, function (chart) {
+        //    mychart.chart = chart({
+        //        el: divId,
+        //        renderer: 'svg',
+        //        data: data,
+        //        hover: false
+        //
+        //    }).update();
+        //
+        //    // mychart.chart.data(data).update();
+        //    //self.counter=0;
+        //    //console.log('abc');
+        //    //setInterval(updateTable,1500);
+        //
+        //});
+    };
+
+    igviz.drawStackedBarChart = function (chartObj) {
+
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //   var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        groupedBy = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.groupedBy]);
+
+        // console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.groupedBy,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "width",
+            "field": groupedBy,
+            "padding": 0.2
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "height",
+            "dataFrom": "stats",
+            "field": "sum",
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "cat",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.groupedBy],
+            "grid": false,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "val",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height - 100,
+            "padding": {"top": 10, "left": 60, "bottom": 60, "right": 100},
+            "data": [
+                {
+                    "name": "table"
+                },
+                {
+                    "name": "stats",
+                    "source": "table",
+                    "transform": [
+                        {"type": "facet", "keys": [groupedBy]},
+                        {"type": "stats", "value": yStrings}
+                    ]
+                }
+            ],
+            "scales": [
+                cScale,
+                vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.xAxis],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+            "axes": [
+                xAxis, yAxis
+            ],
+
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [
+                            {"type": "facet", "keys": [xString]},
+                            {"type": "stack", "point": groupedBy, "height": yStrings}
+                        ]
+                    },
+                    "marks": [
+                        {
+                            "type": "rect",
+                            "properties": {
+                                "enter": {
+                                    "x": {"scale": "cat", "field": groupedBy},
+                                    "width": {"scale": "cat", "band": true, "offset": -1},
+                                    "y": {"scale": "val", "field": "y"},
+                                    "y2": {"scale": "val", "field": "y2"},
+                                    "fill": {"scale": "color", "field": xString}
+                                },
+                                "update": {
+                                    "fillOpacity": {"value": 1}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                            }
+                        }
+                    ]
+                }
+            ]
+        }
+
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.xAxis;
+        chartObj.spec = spec;
+
+    }
+
+    igviz.drawGroupedBarChart = function (chartObj) {
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //  var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        groupedBy = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.groupedBy]);
+
+        //  console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.groupedBy,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "height",
+            "field": groupedBy,
+            "padding": 0.2
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "width",
+            "round": 'true',
+            "field": yStrings,
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "val",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "cat",
+            "angle": 0,
+            "tickSize": 0,
+            "tickPadding": 8,
+            "title": dataTable.metadata.names[chartConfig.groupedBy],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width,
+            "height": chartConfig.height,
+
+            "data": [
+                {
+                    "name": "table"
+                }
+            ],
+            "scales": [
+                cScale, vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "axes": [
+                xAxis, yAxis
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.xAxis],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [{"type": "facet", "keys": [groupedBy]}]
+                    },
+                    "properties": {
+                        "enter": {
+                            "y": {"scale": "cat", "field": "key"},
+                            "height": {"scale": "cat", "band": true}
+                        }
+                    },
+                    "scales": [
+                        {
+                            "name": "pos",
+                            "type": "ordinal",
+                            "range": "height",
+                            "domain": {"field": xString}
+                        }
+                    ],
+                    "marks": [
+                        {
+                            "type": "rect",
+                            "properties": {
+                                "enter": {
+                                    "y": {"scale": "pos", "field": xString},
+                                    "height": {"scale": "pos", "band": true},
+                                    "x": {"scale": "val", "field": yStrings},
+                                    "x2": {"scale": "val", "value": 0},
+                                    "fill": {"scale": "color", "field": xString}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                                ,
+
+                                "update": {
+                                    "fillOpacity": {"value": 1}
+                                }
+                            }
+                        },
+                        //{
+                        //    "type": "text",
+                        //    "properties": {
+                        //        "enter": {
+                        //            "y": {"scale": "pos", "field": xString},
+                        //            "dy": {"scale": "pos", "band": true, "mult": 0.5},
+                        //            "x": {"scale": "val", "field": yStrings, "offset": -4},
+                        //            "fill": {"value": "white"},
+                        //            "align": {"value": "right"},
+                        //            "baseline": {"value": "middle"},
+                        //            "text": {"field": xString}
+                        //        }
+                        //    }
+                        //}
+                    ]
+                }
+            ]
+        }
+
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.xAxis;
+        chartObj.spec = spec;
+
+    }
+
+    igviz.drawGroupedBarChartVertical = function (chartObj) {
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //  var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        groupedBy = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.groupedBy]);
+
+        //  console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.groupedBy,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "width",
+            "field": groupedBy,
+            "padding": 0.2
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "height",
+            "round": 'true',
+            "field": yStrings,
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "val",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "cat",
+            "angle": 0,
+            "tickSize": 0,
+            "tickPadding": 8,
+            "title": dataTable.metadata.names[chartConfig.groupedBy],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width - 150,
+            "height": chartConfig.height,
+            "data": [
+                {
+                    "name": "table"
+                }
+            ],
+            "scales": [
+                cScale, vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "axes": [
+                xAxis, yAxis
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.xAxis],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [{"type": "facet", "keys": [groupedBy]}]
+                    },
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "cat", "field": "key"},
+                            "width": {"scale": "cat", "band": true}
+                        }
+                    },
+                    "scales": [
+                        {
+                            "name": "pos",
+                            "type": "ordinal",
+                            "range": "width",
+                            "domain": {"field": xString}
+                        }
+                    ],
+                    "marks": [
+                        {
+                            "type": "rect",
+                            "properties": {
+                                "enter": {
+                                    "x": {"scale": "pos", "field": xString},
+                                    "width": {"scale": "pos", "band": true},
+                                    "y": {"scale": "val", "field": yStrings},
+                                    "y2": {"scale": "val", "value": 0},
+                                    "fill": {"scale": "color", "field": xString}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                                ,
+
+                                "update": {
+                                    "fillOpacity": {"value": 1}
+                                }
+                            }
+                        },
+                        //{
+                        //    "type": "text",
+                        //    "properties": {
+                        //        "enter": {
+                        //            "y": {"scale": "pos", "field": xString},
+                        //            "dy": {"scale": "pos", "band": true, "mult": 0.5},
+                        //            "x": {"scale": "val", "field": yStrings, "offset": -4},
+                        //            "fill": {"value": "white"},
+                        //            "align": {"value": "right"},
+                        //            "baseline": {"value": "middle"},
+                        //            "text": {"field": xString}
+                        //        }
+                        //    }
+                        //}
+                    ]
+                }
+            ]
+        }
+
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.xAxis;
+        chartObj.spec = spec;
+
+    }
+
+
+    /*************************************************** Area chart ***************************************************************************************************/
+
+    igviz.drawAreaChart = function (chartObj) {
+        // var padding = chartConfig.padding;
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+
+        if (chartConfig.yAxis.constructor === Array) {
+            return this.drawMultiAreaChart(chartObj)
+        }
+        if (chartConfig.hasOwnProperty("areaVar")) {
+            return this.drawStackedAreaChart(chartObj);
+        }
+
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        //   console.log(table,xString,yStrings);
+        // sortDataSet(table);
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "zero": false,
+            "range": "width",
+            "field": xString
+        }
+
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "field": yStrings
+        }
+
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        if (chartConfig.interpolationMode == undefined) {
+            chartConfig.interpolationMode = "monotone"
+        }
+
+
+        var spec = {
+            "width": chartConfig.width - 100,
+            "height": chartConfig.height,
+            //  "padding":{"top":40,"bottom":60,'left':60,"right":40},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category10"
+                }
+            ],
+
+            "axes": [xAxis, yAxis]
+            ,
+
+            "marks": [
+                {
+                    "type": "area",
+                    "key": xString,
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "interpolate": {"value": chartConfig.interpolationMode},
+
+                            "y": {"scale": "y", "field": yStrings},
+                            "y2": {"scale": "y", "value": 0},
+                            "fill": {"scale": "color", "value": 2},
+                            "fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            "fillOpacity": {"value": 0.5}
+
+                        },
+                        "hover": {
+                            "fillOpacity": {"value": 0.2}
+
+                        }
+
+                    }
+                },
+                {
+                    "type": "line",
+                    "key": xString,
+
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"value": 400},
+                            "interpolate": {"value": chartConfig.interpolationMode},
+                            "y": {"scale": "y:prev", "field": yStrings},
+                            "stroke": {"scale": "color", "value": 2},
+                            "strokeWidth": {"value": 1.5}
+                        },
+                        "update": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yStrings}
+                        },
+                        "exit": {
+                            "x": {"value": -20},
+                            "y": {"scale": "y", "field": yStrings}
+                        }
+                    }
+                },
+                {
+                    "type": "symbol",
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yStrings},
+                            "fill": {"scale": "color", "value": 2},
+                            "size": {"value": 50}
+                            //"fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            "size": {"value": 50}
+
+                            //"size": {"scale":"r","field":rString},
+                            // "stroke": {"value": "transparent"}
+                        },
+                        "hover": {
+                            "size": {"value": 100},
+                            "stroke": {"value": "white"}
+                        }
+                    }
+                }
+
+            ]
+        }
+
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+
+
+            console.log(tool, event, item);
+            if (item.mark.marktype == 'symbol') {
+
+
+                xVar = dataTable.metadata.names[chartConfig.xAxis]
+                yVar = dataTable.metadata.names[chartConfig.yAxis]
+
+                contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr></table>';
+
+
+                tool.html(contentString).style({
+                    'left': event.pageX + 10 + 'px',
+                    'top': event.pageY + 10 + 'px',
+                    'opacity': 1
+                })
+                tool.selectAll('tr td').style('padding', "3px");
+            }
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+        chartObj.spec = spec;
+
+
+    };
+
+    igviz.drawMultiAreaChart = function (chartObj) {
+
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+        // table=setData(dataTable,chartConfig)
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = [];
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            yStrings[i] = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "range": "width",
+            "clamp": false,
+            "field": xString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis[0],
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yStrings[0]
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "left",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": "values",
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        if (chartConfig.interpolationMode == undefined) {
+            chartConfig.interpolationMode = "monotone";
+        }
+
+
+        var spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height,
+            //    "padding":{"top":40,"bottom":60,'left':60,"right":145},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category20"
+                }
+            ],
+            "legends": [
+                {
+
+                    "orient": "right",
+                    "fill": "color",
+                    "title": "Area",
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 1.5}
+
+                        }
+                    }
+                }
+            ],
+            "axes": [xAxis, yAxis]
+            ,
+
+            "marks": []
+        }
+
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            areaObj = {
+                "type": "area",
+                "key": xString,
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"scale": "x", "field": xString},
+                        "interpolate": {"value": chartConfig.interpolationMode},
+                        "y": {"scale": "y", "field": yStrings[i]},
+                        "y2": {"scale": "y", "value": 0},
+                        "fill": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "fillOpacity": {"value": 0.5}
+                    },
+                    "update": {
+                        "fillOpacity": {"value": 0.5}
+
+                    },
+                    "hover": {
+                        "fillOpacity": {"value": 0.2}
+                    }
+
+                }
+            }
+
+            lineObj = {
+                "type": "line",
+                "key": xString,
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"value": 400},
+                        "interpolate": {"value": chartConfig.interpolationMode},
+                        "y": {"scale": "y:prev", "field": yStrings[i]},
+                        "stroke": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "strokeWidth": {"value": 1.5}
+                    },
+                    "update": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    },
+                    "exit": {
+                        "x": {"value": -20},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    }
+                }
+            }
+
+
+            pointObj = {
+                "type": "symbol",
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]},
+                        "fill": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "size": {"value": 50}
+                        //"fillOpacity": {"value": 0.5}
+                    },
+                    "update": {
+                        "size": {"value": 50}
+                        //"size": {"scale":"r","field":rString},
+                        // "stroke": {"value": "transparent"}
+                    },
+                    "hover": {
+                        "size": {"value": 100},
+                        "stroke": {"value": "white"}
+                    }
+                }
+            }
+
+
+            spec.marks.push(areaObj);
+
+            spec.marks.push(pointObj);
+            spec.marks.push(lineObj);
+            spec.legends[0].values.push(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+
+            a = 4
+
+            console.log(tool, event, item);
+            if (item.mark.marktype == 'symbol') {
+                // window.alert(a);
+
+                xVar = dataTable.metadata.names[chartConfig.xAxis]
+                yVar = dataTable.metadata.names[chartConfig.yAxis]
+
+                contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr></table>';
+
+
+                tool.html(contentString).style({
+                    'left': event.pageX + 10 + 'px',
+                    'top': event.pageY + 10 + 'px',
+                    'opacity': 1
+                })
+                tool.selectAll('tr td').style('padding', "3px");
+            }
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+        chartObj.spec = spec;
+
+        chartObj.spec = spec;
+
+
+    };
+
+    igviz.drawStackedAreaChart = function (chartObj) {
+
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //  var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        areaString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.areaVar])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis]);
+
+        //     console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "width",
+            "field": xString,
+            "padding": 0.2,
+            "zero": false,
+            "nice": true
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "height",
+            "dataFrom": "stats",
+            "field": "sum",
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "cat",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "left",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "val",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height - 100,
+            "padding": {"top": 10, "left": 60, "bottom": 60, "right": 100},
+            "data": [
+                {
+                    "name": "table"
+                },
+                {
+                    "name": "stats",
+                    "source": "table",
+                    "transform": [
+                        {"type": "facet", "keys": [xString]},
+                        {"type": "stats", "value": yStrings}
+                    ]
+                }
+            ],
+            "scales": [
+                cScale,
+                vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.areaVar
+                        ],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+            "axes": [
+                xAxis, yAxis
+            ],
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [
+                            {"type": "facet", "keys": [areaString]},
+                            {"type": "stack", "point": xString, "height": yStrings}
+                        ]
+                    },
+                    "marks": [
+                        {
+                            "type": "area",
+                            "properties": {
+                                "enter": {
+                                    "interpolate": {"value": "monotone"},
+                                    "x": {"scale": "cat", "field": xString},
+                                    "y": {"scale": "val", "field": "y"},
+                                    "y2": {"scale": "val", "field": "y2"},
+                                    "fill": {"scale": "color", "field": areaString},
+                                    "fillOpacity": {"value": 0.8}
+
+                                },
+                                "update": {
+                                    "fillOpacity": {"value": 0.8}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                            }
+                        },
+                        {
+                            "type": "line",
+                            "properties": {
+                                "enter": {
+                                    "x": {"scale": "cat", "field": xString},
+                                    //"x": {"value": 400},
+                                    "interpolate": {"value": "monotone"},
+                                    "y": {"scale": "val", "field": "y"},
+                                    "stroke": {"scale": "color", "field": areaString},
+                                    "strokeWidth": {"value": 3}
+                                }
+                            }
+                        }
+                    ]
+                }
+            ]
+        }
+
+        chartObj.spec = spec;
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.areaVar;
+
+
+    }
+
+
+    /*************************************************** Arc chart ***************************************************************************************************/
+
+
+    igviz.drawArc = function (divId, chartConfig, dataTable) {
+
+        radialProgress(divId)
+            .label(dataTable.metadata.names[chartConfig.percentage])
+            .diameter(200)
+            .value(dataTable.data[0][chartConfig.percentage])
+            .render();
+
+
+        function radialProgress(parent) {
+            var _data = null,
+                _duration = 1000,
+                _selection,
+                _margin = {
+                    top: 0,
+                    right: 0,
+                    bottom: 30,
+                    left: 0
+                },
+                __width = chartConfig.width,
+                __height = chartConfig.height,
+                _diameter,
+                _label = "",
+                _fontSize = 10;
+
+
+            var _mouseClick;
+
+            var _value = 0,
+                _minValue = 0,
+                _maxValue = 100;
+
+            var _currentArc = 0,
+                _currentArc2 = 0,
+                _currentValue = 0;
+
+            var _arc = d3.svg.arc()
+                .startAngle(0 * (Math.PI / 180)); //just radians
+
+            var _arc2 = d3.svg.arc()
+                .startAngle(0 * (Math.PI / 180))
+                .endAngle(0); //just radians
+
+
+            _selection = d3.select(parent);
+
+
+            function component() {
+
+                _selection.each(function (data) {
+
+                    // Select the svg element, if it exists.
+                    var svg = d3.select(this).selectAll("svg").data([data]);
+
+                    var enter = svg.enter().append("svg").attr("class", "radial-svg").append("g");
+
+                    measure();
+
+                    svg.attr("width", __width)
+                        .attr("height", __height);
+
+
+                    var background = enter.append("g").attr("class", "component")
+                        .attr("cursor", "pointer")
+                        .on("click", onMouseClick);
+
+
+                    _arc.endAngle(360 * (Math.PI / 180))
+
+                    background.append("rect")
+                        .attr("class", "background")
+                        .attr("width", _width)
+                        .attr("height", _height);
+
+                    background.append("path")
+                        .attr("transform", "translate(" + _width / 2 + "," + _width / 2 + ")")
+                        .attr("d", _arc);
+
+                    background.append("text")
+                        .attr("class", "label")
+                        .attr("transform", "translate(" + _width / 2 + "," + (_width + _fontSize) + ")")
+                        .text(_label);
+
+                    //outer g element that wraps all other elements
+                    var gx = chartConfig.width / 2 - _width / 2;
+                    var gy = (chartConfig.height / 2 - _height / 2) - 17;
+                    var g = svg.select("g")
+                        .attr("transform", "translate(" + gx + "," + gy + ")");
+
+
+                    _arc.endAngle(_currentArc);
+                    enter.append("g").attr("class", "arcs");
+                    var path = svg.select(".arcs").selectAll(".arc").data(data);
+                    path.enter().append("path")
+                        .attr("class", "arc")
+                        .attr("transform", "translate(" + _width / 2 + "," + _width / 2 + ")")
+                        .attr("d", _arc);
+
+                    //Another path in case we exceed 100%
+                    var path2 = svg.select(".arcs").selectAll(".arc2").data(data);
+                    path2.enter().append("path")
+                        .attr("class", "arc2")
+                        .attr("transform", "translate(" + _width / 2 + "," + _width / 2 + ")")
+                        .attr("d", _arc2);
+
+
+                    enter.append("g").attr("class", "labels");
+                    var label = svg.select(".labels").selectAll(".labelArc").data(data);
+                    label.enter().append("text")
+                        .attr("class", "labelArc")
+                        .attr("y", _width / 2 + _fontSize / 3)
+                        .attr("x", _width / 2)
+                        .attr("cursor", "pointer")
+                        .attr("width", _width)
+                        // .attr("x",(3*_fontSize/2))
+                        .text(function (d) {
+                            return Math.round((_value - _minValue) / (_maxValue - _minValue) * 100) + "%"
+                        })
+                        .style("font-size", _fontSize + "px")
+                        .on("click", onMouseClick);
+
+                    path.exit().transition().duration(500).attr("x", 1000).remove();
+
+
+                    layout(svg);
+
+                    function layout(svg) {
+
+                        var ratio = (_value - _minValue) / (_maxValue - _minValue);
+                        var endAngle = Math.min(360 * ratio, 360);
+                        endAngle = endAngle * Math.PI / 180;
+
+                        path.datum(endAngle);
+                        path.transition().duration(_duration)
+                            .attrTween("d", arcTween);
+
+                        if (ratio > 1) {
+                            path2.datum(Math.min(360 * (ratio - 1), 360) * Math.PI / 180);
+                            path2.transition().delay(_duration).duration(_duration)
+                                .attrTween("d", arcTween2);
+                        }
+
+                        label.datum(Math.round(ratio * 100));
+                        label.transition().duration(_duration)
+                            .tween("text", labelTween);
+
+                    }
+
+                });
+
+                function onMouseClick(d) {
+                    if (typeof _mouseClick == "function") {
+                        _mouseClick.call();
+                    }
+                }
+            }
+
+            function labelTween(a) {
+                var i = d3.interpolate(_currentValue, a);
+                _currentValue = i(0);
+
+                return function (t) {
+                    _currentValue = i(t);
+                    this.textContent = Math.round(i(t)) + "%";
+                }
+            }
+
+            function arcTween(a) {
+                var i = d3.interpolate(_currentArc, a);
+
+                return function (t) {
+                    _currentArc = i(t);
+                    return _arc.endAngle(i(t))();
+                };
+            }
+
+            function arcTween2(a) {
+                var i = d3.interpolate(_currentArc2, a);
+
+                return function (t) {
+                    return _arc2.endAngle(i(t))();
+                };
+            }
+
+
+            function measure() {
+                _width = _diameter - _margin.right - _margin.left - _margin.top - _margin.bottom;
+                _height = _width;
+                _fontSize = _width * .2;
+                _arc.outerRadius(_width / 2);
+                _arc.innerRadius(_width / 2 * .85);
+                _arc2.outerRadius(_width / 2 * .85);
+                _arc2.innerRadius(_width / 2 * .85 - (_width / 2 * .15));
+            }
+
+
+            component.render = function () {
+                measure();
+                component();
+                return component;
+            }
+
+            component.value = function (_) {
+                if (!arguments.length) return _value;
+                _value = [_];
+                _selection.datum([_value]);
+                return component;
+            }
+
+
+            component.margin = function (_) {
+                if (!arguments.length) return _margin;
+                _margin = _;
+                return component;
+            };
+
+            component.diameter = function (_) {
+                if (!arguments.length) return _diameter
+                _diameter = _;
+                return component;
+            };
+
+            component.minValue = function (_) {
+                if (!arguments.length) return _minValue;
+                _minValue = _;
+                return component;
+            };
+
+            component.maxValue = function (_) {
+                if (!arguments.length) return _maxValue;
+                _maxValue = _;
+                return component;
+            };
+
+            component.label = function (_) {
+                if (!arguments.length) return _label;
+                _label = _;
+                return component;
+            };
+
+            component._duration = function (_) {
+                if (!arguments.length) return _duration;
+                _duration = _;
+                return component;
+            }
+
+            component.onClick = function (_) {
+                if (!arguments.length) return _mouseClick;
+                _mouseClick = _;
+                return component;
+            }
+
+            return component;
+
+        };
+
+    };
+
+
+    /*************************************************** Scatter chart ***************************************************************************************************/
+
+    igviz.drawScatterPlot = function (chartObj) {
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+        //    table=setData(dataTable,chartConfig)
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis])
+        rString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.pointSize])
+        cString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.pointColor])
+
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "range": "width",
+            "zero": false,
+            "field": xString
+
+        }
+
+        rScaleConfig = {
+            "index": chartConfig.pointSize,
+            "range": [0, 576],
+            "schema": dataTable.metadata,
+            "name": "r",
+            "field": rString
+        }
+        cScaleConfig = {
+            "index": chartConfig.pointColor,
+            "schema": dataTable.metadata,
+            "name": "c",
+            "range": [chartConfig.minColor, chartConfig.maxColor],
+            "field": cString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yString
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+        var rScale = setScale(rScaleConfig);
+        var cScale = setScale(cScaleConfig)
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": 25,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": "values",
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -30,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        var spec = {
+            "width": chartConfig.width - 130,
+            "height": chartConfig.height,
+            //"padding":{"top":40,"bottom":60,'left':60,"right":60},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category20"
+                },
+                rScale, cScale
+            ],
+            "axes": [xAxis, yAxis
+            ],
+            //"legends": [
+            //    {
+            //
+            //        "orient": "right",
+            //        "fill": "color",
+            //        "title": "Legend",
+            //        "values": [],
+            //        "properties": {
+            //            "title": {
+            //                "fontSize": {"value": 14}
+            //            },
+            //            "labels": {
+            //                "fontSize": {"value": 12}
+            //            },
+            //            "symbols": {
+            //                "stroke": {"value": "transparent"}
+            //            },
+            //            "legend": {
+            //                "stroke": {"value": "steelblue"},
+            //                "strokeWidth": {"value": 1.5}
+            //
+            //            }
+            //        }
+            //    }],
+
+
+            //    "scales": [
+            //    {
+            //        "name": "x",
+            //        "nice": true,
+            //        "range": "width",
+            //        "domain": {"data": "iris", "field": "data.sepalWidth"}
+            //    },
+            //    {
+            //        "name": "y",
+            //        "nice": true,
+            //        "range": "height",
+            //        "domain": {"data": "iris", "field": "data.petalLength"}
+            //    },
+            //    {
+            //        "name": "c",
+            //        "type": "ordinal",
+            //        "domain": {"data": "iris", "field": "data.species"},
+            //        "range": ["#800", "#080", "#008"]
+            //    }
+            //],
+            //    "axes": [
+            //    {"type": "x", "scale": "x", "offset": 5, "ticks": 5, "title": "Sepal Width"},
+            //    {"type": "y", "scale": "y", "offset": 5, "ticks": 5, "title": "Petal Length"}
+            //],
+            //    "legends": [
+            //    {
+            //        "fill": "c",
+            //        "title": "Species",
+            //        "offset": 0,
+            //        "properties": {
+            //            "symbols": {
+            //                "fillOpacity": {"value": 0.5},
+            //                "stroke": {"value": "transparent"}
+            //            }
+            //        }
+            //    }
+            //],
+            "marks": [
+                {
+                    "type": "symbol",
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yString},
+                            "fill": {"scale": "c", "field": cString}
+                            //"fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            "size": {"scale": "r", "field": rString}
+                            // "stroke": {"value": "transparent"}
+                        },
+                        "hover": {
+                            "size": {"value": 300},
+                            "stroke": {"value": "white"}
+                        }
+                    }
+                }
+            ]
+        }
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+            console.log(tool, event, item);
+            xVar = dataTable.metadata.names[chartConfig.xAxis]
+            yVar = dataTable.metadata.names[chartConfig.yAxis]
+            pSize = dataTable.metadata.names[chartConfig.pointSize]
+            pColor = dataTable.metadata.names[chartConfig.pointColor]
+
+            contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr>' + '<tr><td> Size </td><td> (' + pSize + ') </td><td>' + item.datum.data[pSize] + '</td></tr>' + '<tr><td bgcolor="' + item.fill + '">&nbsp; </td><td> (' + pColor + ') </td><td>' + item.datum.data[pColor] + '</td></tr>' +
+                '</table>';
+
+
+            tool.html(contentString).style({
+                'left': event.pageX + 10 + 'px',
+                'top': event.pageY + 10 + 'px',
+                'opacity': 1
+            })
+            tool.selectAll('tr td').style('padding', "3px");
+
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+    }
+
+
+    /*************************************************** Single Number chart ***************************************************************************************************/
+
+    igviz.drawSingleNumberDiagram = function (chartObj) {
+
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+
+        //Width and height
+        var w = chartConfig.width;
+        var h = chartConfig.height;
+        var padding = chartConfig.padding;
+
+        var svgID = divId + "_svg";
+        //Remove current SVG if it is already there
+        d3.select(svgID).remove();
+
+        //Create SVG element
+        singleNumSvg = d3.select(divId)
+            .append("svg")
+            .attr("id", svgID.replace("#", ""))
+            .attr("width", w)
+            .attr("height", h);
+
+
+        singleNumSvg.append("rect")
+            .attr("id", "rect")
+            .attr("width", w)
+            .attr("height", h);
+
+        /*singleNumCurveSvg = d3.select(divId)
+         .append("svg")
+         .attr("id", svgID.replace("#",""))
+         .attr("width", 207)
+         .attr("height", 161);*/
+
+    };
+
+
+    /*************************************************** Table chart ***************************************************************************************************/
+
+    var cnt = 0;
+
+    igviz.drawTable = function (divId, chartConfig, dataTable) {
+
+        //remove the current table if it is already exist
+        d3.select(divId).select("table").remove();
+
+        var rowLabel = dataTable.metadata.names;
+
+        //append the Table to the div
+        var table = d3.select(divId).append("table").attr('class', 'table table-bordered');
+
+        //create the table head
+        thead = table.append("thead");
+        tbody = table.append("tbody")
+
+        //Append the header to the table
+        thead.append("tr")
+            .selectAll("th")
+            .data(rowLabel)
+            .enter()
+            .append("th")
+            .text(function (d) {
+                return d;
+            });
+    };
+
+    /*************************************************** map ***************************************************************************************************/
+    function loadWorldMapCodes() {
+        var fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/countryInfo/';
+        $.ajaxSetup({async: false});
+        $.getJSON(fileName, function (json) {
+            worldMapCodes = json;
+        });
+        $.ajaxSetup({async: true});
+    }
+
+    function loadUSAMapCodes() {
+        var fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/usaInfo/';
+        $.ajaxSetup({async: false});
+        $.getJSON(fileName, function (json) {
+            usaMapCodes = json;
+        });
+        $.ajaxSetup({async: true});
+    }
+
+    function getMapCode(name, region) {
+        if (region == "usa") {
+            $.each(usaMapCodes, function (i, location) {
+                if (usaMapCodes[name] != null && usaMapCodes[name] != "") {
+                    name = "US" + usaMapCodes[name];
+                }
+            });
+
+        } else {
+            $.each(worldMapCodes, function (i, location) {
+                if (name.toUpperCase() == location["name"].toUpperCase()) {
+                    name = location["alpha-3"];
+                }
+            });
+        }
+        return name;
+    };
+
+    igviz.drawMap = function (divId, chartConfig, dataTable) {
+
+        var fileName;
+        var width = chartConfig.width;
+        var height = chartConfig.height;
+        var xAxis = chartConfig.xAxis;
+        var yAxis = chartConfig.yAxis;
+
+        if (chartConfig.region == "usa") {
+            fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/usa/';
+            loadUSAMapCodes();
+            mapChart = d3.geomap.choropleth()
+                .geofile(fileName)
+                .projection(d3.geo.albersUsa)
+                .unitId(xAxis)
+                .width(width)
+                .height(height)
+                .colors(colorbrewer.RdPu[chartConfig.legendGradientLevel])
+                .column(yAxis)
+                .scale([width / 1.1])
+                .translate([width / 2, height / 2.2])
+                .legend(true);
+
+
+        } else {
+            fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/world/';
+
+            var scaleDivision = 5.5;
+            var widthDivision = 2;
+            var heightDivision = 2;
+
+            if (chartConfig.region == "europe") {
+
+                scaleDivision = width / height;
+                widthDivision = 3;
+                heightDivision = 0.8;
+
+            }
+            loadWorldMapCodes();
+            mapChart = d3.geomap.choropleth()
+                .geofile(fileName)
+                .unitId(xAxis)
+                .width(width)
+                .height(height)
+                .colors(colorbrewer.RdPu[chartConfig.legendGradientLevel])
+                .column(yAxis)
+                .scale([width / scaleDivision])
+                .translate([width / widthDivision, height / heightDivision])
+                .legend(true);
+        }
+    };
+
+
+    /*************************************************** Bar chart Drill Dowining Function  ***************************************************************************************************/
+
+    igviz.drillDown = function drillDown(index, divId, chartConfig, dataTable, originaltable) {
+        //  console.log(dataTable,chartConfig,divId);
+        if (index == 0) {
+            d3.select(divId).append('div').attr({id: 'links', height: 20, 'bgcolor': 'blue'})
+            d3.select(divId).append('div').attr({id: 'chartDiv'})
+            chartConfig.height = chartConfig.height - 20;
+            divId = "#chartDiv";
+        }
+        var currentChartConfig = JSON.parse(JSON.stringify(chartConfig));
+        var current_x = 0;
+        if (index < chartConfig.xAxis.length)
+            current_x = chartConfig.xAxis[index].index
+        else
+            current_x = chartConfig.xAxis[index - 1].child;
+
+        var current_y = chartConfig.yAxis;
+        var currentData = {
+            metadata: {
+                names: [dataTable.metadata.names[current_x], dataTable.metadata.names[current_y]],
+                types: [dataTable.metadata.types[current_x], dataTable.metadata.types[current_y]]
+            },
+            data: []
+        }
+
+        var tempData = [];
+        for (i = 0; i < dataTable.data.length; i++) {
+            name = dataTable.data[i][current_x];
+            currentYvalue = dataTable.data[i][current_y];
+            isFound = false;
+            var j = 0;
+            for (; j < tempData.length; j++) {
+                if (tempData[j][0] === name) {
+                    isFound = true;
+                    break;
+                }
+            }
+            if (isFound) {
+                tempData[j][1] += currentYvalue;
+                console.log(name, currentYvalue, tempData[j][1]);
+            } else {
+                console.log("create", name, currentYvalue);
+                tempData.push([name, currentYvalue])
+            }
+        }
+
+        currentData.data = tempData;
+        currentChartConfig.xAxis = 0;
+        currentChartConfig.yAxis = 1;
+        currentChartConfig.chartType = 'bar';
+
+
+        var x = this.setUp(divId, currentChartConfig, currentData);
+        x.plot(currentData.data, function () {
+
+            var filters = d3.select('#links .root').on('click', function () {
+                d3.select("#links").html('');
+                igviz.drillDown(0, divId, chartConfig, originaltable, originaltable);
+
+            })
+
+
+            var filters = d3.select('#links').selectAll('.filter');
+            filters.on('click', function (d, i) {
+
+                filtersList = filters.data();
+
+                console.log(filtersList)
+                var filterdDataset = [];
+                var selectionObj = JSON.parse(JSON.stringify(originaltable));
+                itr = 0;
+                for (l = 0; l < originaltable.data.length; l++) {
+                    isFiltered = true;
+                    for (k = 0; k <= i; k++) {
+
+                        if (originaltable.data[l][filtersList[k][0]] !== filtersList[k][1]) {
+                            isFiltered = false;
+                            break;
+                        }
+                    }
+                    if (isFiltered) {
+                        filterdDataset[itr++] = originaltable.data[l];
+                    }
+
+                }
+
+                d3.selectAll('#links g').each(function (d, indx) {
+                    if (indx > i) {
+                        this.remove();
+                    }
+                })
+
+
+                selectionObj.data = filterdDataset;
+
+                igviz.drillDown(i + 1, divId, chartConfig, selectionObj, originaltable, true);
+
+
+            });
+
+
+            if (index < chartConfig.xAxis.length) {
+                console.log(x);
+                d3.select(x.chart._el).selectAll('g.type-rect rect').on('click', function (d, i) {
+                    // console.log(d, i, this);
+                    console.log(d, i);
+                    var selectedName = d.datum.data[x.dataTable.metadata.names[x.config.xAxis]];
+                    //  console.log(selectedName);
+                    var selectedCurrentData = JSON.parse(JSON.stringify(dataTable));
+                    var innerText;
+
+                    var links = d3.select('#links').append('g').append('text').text(dataTable.metadata.names[current_x] + " : ").attr({
+
+                        "font-size": "10px",
+                        "x": 10,
+                        "y": 20
+
+                    });
+
+                    d3.select('#links:first-child').selectAll('text').attr('class', 'root');
+
+                    d3.select('#links g:last-child').append('span').data([[current_x, selectedName]]).attr('class', 'filter').text(selectedName + "  >  ")
+
+                    var l = selectedCurrentData.data.length;
+                    var newdata = [];
+                    b = 0;
+                    for (a = 0; a < l; a++) {
+                        if (selectedCurrentData.data[a][current_x] === selectedName) {
+                            newdata[b++] = selectedCurrentData.data[a];
+                        }
+                    }
+
+
+                    selectedCurrentData.data = newdata;
+
+
+                    igviz.drillDown(index + 1, divId, chartConfig, selectedCurrentData, originaltable, true);
+
+
+                });
+
+            }
+        });
+
+
+    }
+
+
+    /*************************************************** Specification Generation method ***************************************************************************************************/
+
+
+    function setScale(scaleConfig) {
+        var scale = {"name": scaleConfig.name};
+
+        console.log(scaleConfig.schema, scaleConfig.index);
+
+        dataFrom = "table";
+
+        scale.range = scaleConfig.range;
+
+
+        switch (scaleConfig.schema.types[scaleConfig.index]) {
+            case 'T':
+                scale["type"] = 'time'
+
+                break;
+
+            case 'C':
+                scale["type"] = 'ordinal'
+                if (scale.name === "c") {
+                    scale.range = "category20";
+                }
+
+                break;
+            case 'N':
+                scale["type"] = 'linear'
+
+                break;
+        }
+        if (scaleConfig.hasOwnProperty("dataFrom")) {
+            dataFrom = scaleConfig.dataFrom;
+        }
+
+        scale.range = scaleConfig.range;
+        scale.domain = {"data": dataFrom, "field": scaleConfig.field}
+
+        //optional attributes
+        if (scaleConfig.hasOwnProperty("round")) {
+            scale["round"] = scaleConfig.round;
+        }
+
+        if (scaleConfig.hasOwnProperty("nice")) {
+            scale["nice"] = scaleConfig.nice;
+        }
+
+        if (scaleConfig.hasOwnProperty("padding")) {
+            scale["padding"] = scaleConfig.padding;
+        }
+
+        if (scaleConfig.hasOwnProperty("reverse")) {
+            scale["reverse"] = scaleConfig.reverse;
+        }
+
+        if (scaleConfig.hasOwnProperty("sort")) {
+            scale["sort"] = scaleConfig.sort;
+        }
+
+        if (scale.name == 'x' && scale.type == 'linear') {
+            scale.sort = true;
+        }
+        if (scaleConfig.hasOwnProperty("clamp")) {
+            scale["clamp"] = scaleConfig.clamp;
+        }
+
+
+        if (scaleConfig.hasOwnProperty("zero")) {
+            scale["zero"] = scaleConfig.zero;
+        }
+        console.log(scale);
+        return scale;
+
+    }
+
+    function setAxis(axisConfig) {
+
+        console.log("Axis", axisConfig);
+
+        axis = {
+            "type": axisConfig.type,
+            "scale": axisConfig.scale,
+            'title': axisConfig.title,
+            "grid": axisConfig.grid,
+
+            "properties": {
+                "ticks": {
+                    // "stroke": {"value": "steelblue"}
+                },
+                "majorTicks": {
+                    "strokeWidth": {"value": 2}
+                },
+                "labels": {
+                    // "fill": {"value": "steelblue"},
+                    "angle": {"value": axisConfig.angle},
+                    // "fontSize": {"value": 14},
+                    "align": {"value": axisConfig.align},
+                    "baseline": {"value": "middle"},
+                    "dx": {"value": axisConfig.dx},
+                    "dy": {"value": axisConfig.dy}
+                },
+                "title": {
+                    "fontSize": {"value": 16},
+
+                    "dx": {'value': axisConfig.titleDx},
+                    "dy": {'value': axisConfig.titleDy}
+                },
+                "axis": {
+                    "stroke": {"value": "#333"},
+                    "strokeWidth": {"value": 1.5}
+                }
+
+            }
+
+        }
+
+        if (axisConfig.hasOwnProperty("tickSize")) {
+            axis["tickSize"] = axisConfig.tickSize;
+        }
+
+
+        if (axisConfig.hasOwnProperty("tickPadding")) {
+            axis["tickPadding"] = axisConfig.tickPadding;
+        }
+
+        console.log("SpecAxis", axis);
+        return axis;
+    }
+
+    function setLegends(chartConfig, schema) {
+
+    }
+
+    function setData(dataTableObj, chartConfig, schema) {
+
+        var table = [];
+        for (i = 0; i < dataTableObj.length; i++) {
+            var ptObj = {};
+            namesArray = schema.names;
+            for (j = 0; j < namesArray.length; j++) {
+                if (schema.types[j] == 'T') {
+                    ptObj[createAttributeNames(namesArray[j])] = new Date(dataTableObj[i][j]);
+                } else
+                    ptObj[createAttributeNames(namesArray[j])] = dataTableObj[i][j];
+            }
+
+            table[i] = ptObj;
+        }
+
+        return table;
+    }
+
+    function createAttributeNames(str) {
+        return str.replace(' ', '_');
+    }
+
+    function setGenericAxis(axisConfig, spec) {
+        MappingObj = {};
+        MappingObj["tickSize"] = "tickSize";
+        MappingObj["tickPadding"] = "tickPadding";
+        MappingObj["title"] = "title";
+        MappingObj["grid"] = "grid";
+        MappingObj["offset"] = "offset";
+        MappingObj["ticks"] = "ticks";
+
+        MappingObj["labelColor"] = "fill";
+        MappingObj["labelAngle"] = "angle";
+        MappingObj["labelAlign"] = "align";
+        MappingObj["labelFontSize"] = "fontSize";
+        MappingObj["labelDx"] = "dx";
+        MappingObj["labelDy"] = "dy";
+        MappingObj["labelBaseLine"] = "baseline";
+
+        MappingObj["titleDx"] = "dx";
+        MappingObj["titleDy"] = "dy";
+        MappingObj["titleFontSize"] = "fontSize";
+
+        MappingObj["axisColor"] = "stroke";
+        MappingObj["axisWidth"] = "strokeWidth";
+
+        MappingObj["tickColor"] = "ticks.stroke";
+        MappingObj["tickWidth"] = "ticks.strokeWidth";
+
+
+        console.log("previous Axis", spec)
+        for (var propt in axisConfig) {
+
+            if (propt == "tickSize" || propt == "tickPadding")
+                continue;
+
+            if (axisConfig.hasOwnProperty(propt)) {
+
+                if (propt.indexOf("label") == 0)
+                    spec.properties.labels[MappingObj[propt]].value = axisConfig[propt];
+                else if (propt.indexOf("ticks") == 0)
+                    spec.properties.ticks[MappingObj[propt]].value = axisConfig[propt];
+                else if (propt.indexOf("title") == 0)
+                    spec.properties.title[MappingObj[propt]].value = axisConfig[propt];
+                else if (propt.indexOf("axis") == 0)
+                    spec.properties.axis[MappingObj[propt]].value = axisConfig[propt];
+                else
+                    spec[MappingObj[propt]] = axisConfig[propt];
+            }
+        }
+
+        console.log("NEW SPEC

<TRUNCATED>

[11/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.geomap.dependencies.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.geomap.dependencies.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.geomap.dependencies.min.js
new file mode 100644
index 0000000..b6b4aff
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.geomap.dependencies.min.js
@@ -0,0 +1,8249 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+!function () {
+    function n(n) {
+        return n && (n.ownerDocument || n.document || n).documentElement
+    }
+
+    function t(n) {
+        return n && (n.ownerDocument && n.ownerDocument.defaultView || n.document && n || n.defaultView)
+    }
+
+    function e(n, t) {
+        return t > n ? -1 : n > t ? 1 : n >= t ? 0 : 0 / 0
+    }
+
+    function r(n) {
+        return null === n ? 0 / 0 : +n
+    }
+
+    function u(n) {
+        return !isNaN(n)
+    }
+
+    function i(n) {
+        return {
+            left: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) < 0 ? r = i + 1 : u = i
+                }
+                return r
+            }, right: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) > 0 ? u = i : r = i + 1
+                }
+                return r
+            }
+        }
+    }
+
+    function o(n) {
+        return n.length
+    }
+
+    function a(n) {
+        for (var t = 1; n * t % 1;)t *= 10;
+        return t
+    }
+
+    function c(n, t) {
+        for (var e in t)Object.defineProperty(n.prototype, e, {value: t[e], enumerable: !1})
+    }
+
+    function l() {
+        this._ = Object.create(null)
+    }
+
+    function s(n) {
+        return (n += "") === pa || n[0] === va ? va + n : n
+    }
+
+    function f(n) {
+        return (n += "")[0] === va ? n.slice(1) : n
+    }
+
+    function h(n) {
+        return s(n)in this._
+    }
+
+    function g(n) {
+        return (n = s(n))in this._ && delete this._[n]
+    }
+
+    function p() {
+        var n = [];
+        for (var t in this._)n.push(f(t));
+        return n
+    }
+
+    function v() {
+        var n = 0;
+        for (var t in this._)++n;
+        return n
+    }
+
+    function d() {
+        for (var n in this._)return !1;
+        return !0
+    }
+
+    function m() {
+        this._ = Object.create(null)
+    }
+
+    function y(n) {
+        return n
+    }
+
+    function M(n, t, e) {
+        return function () {
+            var r = e.apply(t, arguments);
+            return r === t ? n : r
+        }
+    }
+
+    function x(n, t) {
+        if (t in n)return t;
+        t = t.charAt(0).toUpperCase() + t.slice(1);
+        for (var e = 0, r = da.length; r > e; ++e) {
+            var u = da[e] + t;
+            if (u in n)return u
+        }
+    }
+
+    function b() {
+    }
+
+    function _() {
+    }
+
+    function w(n) {
+        function t() {
+            for (var t, r = e, u = -1, i = r.length; ++u < i;)(t = r[u].on) && t.apply(this, arguments);
+            return n
+        }
+
+        var e = [], r = new l;
+        return t.on = function (t, u) {
+            var i, o = r.get(t);
+            return arguments.length < 2 ? o && o.on : (o && (o.on = null, e = e.slice(0, i = e.indexOf(o)).concat(e.slice(i + 1)), r.remove(t)), u && e.push(r.set(t, {on: u})), n)
+        }, t
+    }
+
+    function S() {
+        ta.event.preventDefault()
+    }
+
+    function k() {
+        for (var n, t = ta.event; n = t.sourceEvent;)t = n;
+        return t
+    }
+
+    function E(n) {
+        for (var t = new _, e = 0, r = arguments.length; ++e < r;)t[arguments[e]] = w(t);
+        return t.of = function (e, r) {
+            return function (u) {
+                try {
+                    var i = u.sourceEvent = ta.event;
+                    u.target = n, ta.event = u, t[u.type].apply(e, r)
+                } finally {
+                    ta.event = i
+                }
+            }
+        }, t
+    }
+
+    function A(n) {
+        return ya(n, _a), n
+    }
+
+    function N(n) {
+        return "function" == typeof n ? n : function () {
+            return Ma(n, this)
+        }
+    }
+
+    function C(n) {
+        return "function" == typeof n ? n : function () {
+            return xa(n, this)
+        }
+    }
+
+    function z(n, t) {
+        function e() {
+            this.removeAttribute(n)
+        }
+
+        function r() {
+            this.removeAttributeNS(n.space, n.local)
+        }
+
+        function u() {
+            this.setAttribute(n, t)
+        }
+
+        function i() {
+            this.setAttributeNS(n.space, n.local, t)
+        }
+
+        function o() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttribute(n) : this.setAttribute(n, e)
+        }
+
+        function a() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttributeNS(n.space, n.local) : this.setAttributeNS(n.space, n.local, e)
+        }
+
+        return n = ta.ns.qualify(n), null == t ? n.local ? r : e : "function" == typeof t ? n.local ? a : o : n.local ? i : u
+    }
+
+    function q(n) {
+        return n.trim().replace(/\s+/g, " ")
+    }
+
+    function L(n) {
+        return new RegExp("(?:^|\\s+)" + ta.requote(n) + "(?:\\s+|$)", "g")
+    }
+
+    function T(n) {
+        return (n + "").trim().split(/^|\s+/)
+    }
+
+    function R(n, t) {
+        function e() {
+            for (var e = -1; ++e < u;)n[e](this, t)
+        }
+
+        function r() {
+            for (var e = -1, r = t.apply(this, arguments); ++e < u;)n[e](this, r)
+        }
+
+        n = T(n).map(D);
+        var u = n.length;
+        return "function" == typeof t ? r : e
+    }
+
+    function D(n) {
+        var t = L(n);
+        return function (e, r) {
+            if (u = e.classList)return r ? u.add(n) : u.remove(n);
+            var u = e.getAttribute("class") || "";
+            r ? (t.lastIndex = 0, t.test(u) || e.setAttribute("class", q(u + " " + n))) : e.setAttribute("class", q(u.replace(t, " ")))
+        }
+    }
+
+    function P(n, t, e) {
+        function r() {
+            this.style.removeProperty(n)
+        }
+
+        function u() {
+            this.style.setProperty(n, t, e)
+        }
+
+        function i() {
+            var r = t.apply(this, arguments);
+            null == r ? this.style.removeProperty(n) : this.style.setProperty(n, r, e)
+        }
+
+        return null == t ? r : "function" == typeof t ? i : u
+    }
+
+    function U(n, t) {
+        function e() {
+            delete this[n]
+        }
+
+        function r() {
+            this[n] = t
+        }
+
+        function u() {
+            var e = t.apply(this, arguments);
+            null == e ? delete this[n] : this[n] = e
+        }
+
+        return null == t ? e : "function" == typeof t ? u : r
+    }
+
+    function j(n) {
+        function t() {
+            var t = this.ownerDocument, e = this.namespaceURI;
+            return e ? t.createElementNS(e, n) : t.createElement(n)
+        }
+
+        function e() {
+            return this.ownerDocument.createElementNS(n.space, n.local)
+        }
+
+        return "function" == typeof n ? n : (n = ta.ns.qualify(n)).local ? e : t
+    }
+
+    function F() {
+        var n = this.parentNode;
+        n && n.removeChild(this)
+    }
+
+    function H(n) {
+        return {__data__: n}
+    }
+
+    function O(n) {
+        return function () {
+            return ba(this, n)
+        }
+    }
+
+    function I(n) {
+        return arguments.length || (n = e), function (t, e) {
+            return t && e ? n(t.__data__, e.__data__) : !t - !e
+        }
+    }
+
+    function Y(n, t) {
+        for (var e = 0, r = n.length; r > e; e++)for (var u, i = n[e], o = 0, a = i.length; a > o; o++)(u = i[o]) && t(u, o, e);
+        return n
+    }
+
+    function Z(n) {
+        return ya(n, Sa), n
+    }
+
+    function V(n) {
+        var t, e;
+        return function (r, u, i) {
+            var o, a = n[i].update, c = a.length;
+            for (i != e && (e = i, t = 0), u >= t && (t = u + 1); !(o = a[t]) && ++t < c;);
+            return o
+        }
+    }
+
+    function X(n, t, e) {
+        function r() {
+            var t = this[o];
+            t && (this.removeEventListener(n, t, t.$), delete this[o])
+        }
+
+        function u() {
+            var u = c(t, ra(arguments));
+            r.call(this), this.addEventListener(n, this[o] = u, u.$ = e), u._ = t
+        }
+
+        function i() {
+            var t, e = new RegExp("^__on([^.]+)" + ta.requote(n) + "$");
+            for (var r in this)if (t = r.match(e)) {
+                var u = this[r];
+                this.removeEventListener(t[1], u, u.$), delete this[r]
+            }
+        }
+
+        var o = "__on" + n, a = n.indexOf("."), c = $;
+        a > 0 && (n = n.slice(0, a));
+        var l = ka.get(n);
+        return l && (n = l, c = B), a ? t ? u : r : t ? b : i
+    }
+
+    function $(n, t) {
+        return function (e) {
+            var r = ta.event;
+            ta.event = e, t[0] = this.__data__;
+            try {
+                n.apply(this, t)
+            } finally {
+                ta.event = r
+            }
+        }
+    }
+
+    function B(n, t) {
+        var e = $(n, t);
+        return function (n) {
+            var t = this, r = n.relatedTarget;
+            r && (r === t || 8 & r.compareDocumentPosition(t)) || e.call(t, n)
+        }
+    }
+
+    function W(e) {
+        var r = ".dragsuppress-" + ++Aa, u = "click" + r, i = ta.select(t(e)).on("touchmove" + r, S).on("dragstart" + r, S).on("selectstart" + r, S);
+        if (null == Ea && (Ea = "onselectstart"in e ? !1 : x(e.style, "userSelect")), Ea) {
+            var o = n(e).style, a = o[Ea];
+            o[Ea] = "none"
+        }
+        return function (n) {
+            if (i.on(r, null), Ea && (o[Ea] = a), n) {
+                var t = function () {
+                    i.on(u, null)
+                };
+                i.on(u, function () {
+                    S(), t()
+                }, !0), setTimeout(t, 0)
+            }
+        }
+    }
+
+    function J(n, e) {
+        e.changedTouches && (e = e.changedTouches[0]);
+        var r = n.ownerSVGElement || n;
+        if (r.createSVGPoint) {
+            var u = r.createSVGPoint();
+            if (0 > Na) {
+                var i = t(n);
+                if (i.scrollX || i.scrollY) {
+                    r = ta.select("body").append("svg").style({
+                        position: "absolute",
+                        top: 0,
+                        left: 0,
+                        margin: 0,
+                        padding: 0,
+                        border: "none"
+                    }, "important");
+                    var o = r[0][0].getScreenCTM();
+                    Na = !(o.f || o.e), r.remove()
+                }
+            }
+            return Na ? (u.x = e.pageX, u.y = e.pageY) : (u.x = e.clientX, u.y = e.clientY), u = u.matrixTransform(n.getScreenCTM().inverse()), [u.x, u.y]
+        }
+        var a = n.getBoundingClientRect();
+        return [e.clientX - a.left - n.clientLeft, e.clientY - a.top - n.clientTop]
+    }
+
+    function G() {
+        return ta.event.changedTouches[0].identifier
+    }
+
+    function K(n) {
+        return n > 0 ? 1 : 0 > n ? -1 : 0
+    }
+
+    function Q(n, t, e) {
+        return (t[0] - n[0]) * (e[1] - n[1]) - (t[1] - n[1]) * (e[0] - n[0])
+    }
+
+    function nt(n) {
+        return n > 1 ? 0 : -1 > n ? qa : Math.acos(n)
+    }
+
+    function tt(n) {
+        return n > 1 ? Ra : -1 > n ? -Ra : Math.asin(n)
+    }
+
+    function et(n) {
+        return ((n = Math.exp(n)) - 1 / n) / 2
+    }
+
+    function rt(n) {
+        return ((n = Math.exp(n)) + 1 / n) / 2
+    }
+
+    function ut(n) {
+        return ((n = Math.exp(2 * n)) - 1) / (n + 1)
+    }
+
+    function it(n) {
+        return (n = Math.sin(n / 2)) * n
+    }
+
+    function ot() {
+    }
+
+    function at(n, t, e) {
+        return this instanceof at ? (this.h = +n, this.s = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof at ? new at(n.h, n.s, n.l) : bt("" + n, _t, at) : new at(n, t, e)
+    }
+
+    function ct(n, t, e) {
+        function r(n) {
+            return n > 360 ? n -= 360 : 0 > n && (n += 360), 60 > n ? i + (o - i) * n / 60 : 180 > n ? o : 240 > n ? i + (o - i) * (240 - n) / 60 : i
+        }
+
+        function u(n) {
+            return Math.round(255 * r(n))
+        }
+
+        var i, o;
+        return n = isNaN(n) ? 0 : (n %= 360) < 0 ? n + 360 : n, t = isNaN(t) ? 0 : 0 > t ? 0 : t > 1 ? 1 : t, e = 0 > e ? 0 : e > 1 ? 1 : e, o = .5 >= e ? e * (1 + t) : e + t - e * t, i = 2 * e - o, new mt(u(n + 120), u(n), u(n - 120))
+    }
+
+    function lt(n, t, e) {
+        return this instanceof lt ? (this.h = +n, this.c = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof lt ? new lt(n.h, n.c, n.l) : n instanceof ft ? gt(n.l, n.a, n.b) : gt((n = wt((n = ta.rgb(n)).r, n.g, n.b)).l, n.a, n.b) : new lt(n, t, e)
+    }
+
+    function st(n, t, e) {
+        return isNaN(n) && (n = 0), isNaN(t) && (t = 0), new ft(e, Math.cos(n *= Da) * t, Math.sin(n) * t)
+    }
+
+    function ft(n, t, e) {
+        return this instanceof ft ? (this.l = +n, this.a = +t, void(this.b = +e)) : arguments.length < 2 ? n instanceof ft ? new ft(n.l, n.a, n.b) : n instanceof lt ? st(n.h, n.c, n.l) : wt((n = mt(n)).r, n.g, n.b) : new ft(n, t, e)
+    }
+
+    function ht(n, t, e) {
+        var r = (n + 16) / 116, u = r + t / 500, i = r - e / 200;
+        return u = pt(u) * Xa, r = pt(r) * $a, i = pt(i) * Ba, new mt(dt(3.2404542 * u - 1.5371385 * r - .4985314 * i), dt(-.969266 * u + 1.8760108 * r + .041556 * i), dt(.0556434 * u - .2040259 * r + 1.0572252 * i))
+    }
+
+    function gt(n, t, e) {
+        return n > 0 ? new lt(Math.atan2(e, t) * Pa, Math.sqrt(t * t + e * e), n) : new lt(0 / 0, 0 / 0, n)
+    }
+
+    function pt(n) {
+        return n > .206893034 ? n * n * n : (n - 4 / 29) / 7.787037
+    }
+
+    function vt(n) {
+        return n > .008856 ? Math.pow(n, 1 / 3) : 7.787037 * n + 4 / 29
+    }
+
+    function dt(n) {
+        return Math.round(255 * (.00304 >= n ? 12.92 * n : 1.055 * Math.pow(n, 1 / 2.4) - .055))
+    }
+
+    function mt(n, t, e) {
+        return this instanceof mt ? (this.r = ~~n, this.g = ~~t, void(this.b = ~~e)) : arguments.length < 2 ? n instanceof mt ? new mt(n.r, n.g, n.b) : bt("" + n, mt, ct) : new mt(n, t, e)
+    }
+
+    function yt(n) {
+        return new mt(n >> 16, n >> 8 & 255, 255 & n)
+    }
+
+    function Mt(n) {
+        return yt(n) + ""
+    }
+
+    function xt(n) {
+        return 16 > n ? "0" + Math.max(0, n).toString(16) : Math.min(255, n).toString(16)
+    }
+
+    function bt(n, t, e) {
+        var r, u, i, o = 0, a = 0, c = 0;
+        if (r = /([a-z]+)\((.*)\)/i.exec(n))switch (u = r[2].split(","), r[1]) {
+            case"hsl":
+                return e(parseFloat(u[0]), parseFloat(u[1]) / 100, parseFloat(u[2]) / 100);
+            case"rgb":
+                return t(kt(u[0]), kt(u[1]), kt(u[2]))
+        }
+        return (i = Ga.get(n.toLowerCase())) ? t(i.r, i.g, i.b) : (null == n || "#" !== n.charAt(0) || isNaN(i = parseInt(n.slice(1), 16)) || (4 === n.length ? (o = (3840 & i) >> 4, o = o >> 4 | o, a = 240 & i, a = a >> 4 | a, c = 15 & i, c = c << 4 | c) : 7 === n.length && (o = (16711680 & i) >> 16, a = (65280 & i) >> 8, c = 255 & i)), t(o, a, c))
+    }
+
+    function _t(n, t, e) {
+        var r, u, i = Math.min(n /= 255, t /= 255, e /= 255), o = Math.max(n, t, e), a = o - i, c = (o + i) / 2;
+        return a ? (u = .5 > c ? a / (o + i) : a / (2 - o - i), r = n == o ? (t - e) / a + (e > t ? 6 : 0) : t == o ? (e - n) / a + 2 : (n - t) / a + 4, r *= 60) : (r = 0 / 0, u = c > 0 && 1 > c ? 0 : r), new at(r, u, c)
+    }
+
+    function wt(n, t, e) {
+        n = St(n), t = St(t), e = St(e);
+        var r = vt((.4124564 * n + .3575761 * t + .1804375 * e) / Xa), u = vt((.2126729 * n + .7151522 * t + .072175 * e) / $a), i = vt((.0193339 * n + .119192 * t + .9503041 * e) / Ba);
+        return ft(116 * u - 16, 500 * (r - u), 200 * (u - i))
+    }
+
+    function St(n) {
+        return (n /= 255) <= .04045 ? n / 12.92 : Math.pow((n + .055) / 1.055, 2.4)
+    }
+
+    function kt(n) {
+        var t = parseFloat(n);
+        return "%" === n.charAt(n.length - 1) ? Math.round(2.55 * t) : t
+    }
+
+    function Et(n) {
+        return "function" == typeof n ? n : function () {
+            return n
+        }
+    }
+
+    function At(n) {
+        return function (t, e, r) {
+            return 2 === arguments.length && "function" == typeof e && (r = e, e = null), Nt(t, e, n, r)
+        }
+    }
+
+    function Nt(n, t, e, r) {
+        function u() {
+            var n, t = c.status;
+            if (!t && zt(c) || t >= 200 && 300 > t || 304 === t) {
+                try {
+                    n = e.call(i, c)
+                } catch (r) {
+                    return void o.error.call(i, r)
+                }
+                o.load.call(i, n)
+            } else o.error.call(i, c)
+        }
+
+        var i = {}, o = ta.dispatch("beforesend", "progress", "load", "error"), a = {}, c = new XMLHttpRequest, l = null;
+        return !this.XDomainRequest || "withCredentials"in c || !/^(http(s)?:)?\/\//.test(n) || (c = new XDomainRequest), "onload"in c ? c.onload = c.onerror = u : c.onreadystatechange = function () {
+            c.readyState > 3 && u()
+        }, c.onprogress = function (n) {
+            var t = ta.event;
+            ta.event = n;
+            try {
+                o.progress.call(i, c)
+            } finally {
+                ta.event = t
+            }
+        }, i.header = function (n, t) {
+            return n = (n + "").toLowerCase(), arguments.length < 2 ? a[n] : (null == t ? delete a[n] : a[n] = t + "", i)
+        }, i.mimeType = function (n) {
+            return arguments.length ? (t = null == n ? null : n + "", i) : t
+        }, i.responseType = function (n) {
+            return arguments.length ? (l = n, i) : l
+        }, i.response = function (n) {
+            return e = n, i
+        }, ["get", "post"].forEach(function (n) {
+            i[n] = function () {
+                return i.send.apply(i, [n].concat(ra(arguments)))
+            }
+        }), i.send = function (e, r, u) {
+            if (2 === arguments.length && "function" == typeof r && (u = r, r = null), c.open(e, n, !0), null == t || "accept"in a || (a.accept = t + ",*/*"), c.setRequestHeader)for (var s in a)c.setRequestHeader(s, a[s]);
+            return null != t && c.overrideMimeType && c.overrideMimeType(t), null != l && (c.responseType = l), null != u && i.on("error", u).on("load", function (n) {
+                u(null, n)
+            }), o.beforesend.call(i, c), c.send(null == r ? null : r), i
+        }, i.abort = function () {
+            return c.abort(), i
+        }, ta.rebind(i, o, "on"), null == r ? i : i.get(Ct(r))
+    }
+
+    function Ct(n) {
+        return 1 === n.length ? function (t, e) {
+            n(null == t ? e : null)
+        } : n
+    }
+
+    function zt(n) {
+        var t = n.responseType;
+        return t && "text" !== t ? n.response : n.responseText
+    }
+
+    function qt() {
+        var n = Lt(), t = Tt() - n;
+        t > 24 ? (isFinite(t) && (clearTimeout(tc), tc = setTimeout(qt, t)), nc = 0) : (nc = 1, rc(qt))
+    }
+
+    function Lt() {
+        var n = Date.now();
+        for (ec = Ka; ec;)n >= ec.t && (ec.f = ec.c(n - ec.t)), ec = ec.n;
+        return n
+    }
+
+    function Tt() {
+        for (var n, t = Ka, e = 1 / 0; t;)t.f ? t = n ? n.n = t.n : Ka = t.n : (t.t < e && (e = t.t), t = (n = t).n);
+        return Qa = n, e
+    }
+
+    function Rt(n, t) {
+        return t - (n ? Math.ceil(Math.log(n) / Math.LN10) : 1)
+    }
+
+    function Dt(n, t) {
+        var e = Math.pow(10, 3 * ga(8 - t));
+        return {
+            scale: t > 8 ? function (n) {
+                return n / e
+            } : function (n) {
+                return n * e
+            }, symbol: n
+        }
+    }
+
+    function Pt(n) {
+        var t = n.decimal, e = n.thousands, r = n.grouping, u = n.currency, i = r && e ? function (n, t) {
+            for (var u = n.length, i = [], o = 0, a = r[0], c = 0; u > 0 && a > 0 && (c + a + 1 > t && (a = Math.max(1, t - c)), i.push(n.substring(u -= a, u + a)), !((c += a + 1) > t));)a = r[o = (o + 1) % r.length];
+            return i.reverse().join(e)
+        } : y;
+        return function (n) {
+            var e = ic.exec(n), r = e[1] || " ", o = e[2] || ">", a = e[3] || "-", c = e[4] || "", l = e[5], s = +e[6], f = e[7], h = e[8], g = e[9], p = 1, v = "", d = "", m = !1, y = !0;
+            switch (h && (h = +h.substring(1)), (l || "0" === r && "=" === o) && (l = r = "0", o = "="), g) {
+                case"n":
+                    f = !0, g = "g";
+                    break;
+                case"%":
+                    p = 100, d = "%", g = "f";
+                    break;
+                case"p":
+                    p = 100, d = "%", g = "r";
+                    break;
+                case"b":
+                case"o":
+                case"x":
+                case"X":
+                    "#" === c && (v = "0" + g.toLowerCase());
+                case"c":
+                    y = !1;
+                case"d":
+                    m = !0, h = 0;
+                    break;
+                case"s":
+                    p = -1, g = "r"
+            }
+            "$" === c && (v = u[0], d = u[1]), "r" != g || h || (g = "g"), null != h && ("g" == g ? h = Math.max(1, Math.min(21, h)) : ("e" == g || "f" == g) && (h = Math.max(0, Math.min(20, h)))), g = oc.get(g) || Ut;
+            var M = l && f;
+            return function (n) {
+                var e = d;
+                if (m && n % 1)return "";
+                var u = 0 > n || 0 === n && 0 > 1 / n ? (n = -n, "-") : "-" === a ? "" : a;
+                if (0 > p) {
+                    var c = ta.formatPrefix(n, h);
+                    n = c.scale(n), e = c.symbol + d
+                } else n *= p;
+                n = g(n, h);
+                var x, b, _ = n.lastIndexOf(".");
+                if (0 > _) {
+                    var w = y ? n.lastIndexOf("e") : -1;
+                    0 > w ? (x = n, b = "") : (x = n.substring(0, w), b = n.substring(w))
+                } else x = n.substring(0, _), b = t + n.substring(_ + 1);
+                !l && f && (x = i(x, 1 / 0));
+                var S = v.length + x.length + b.length + (M ? 0 : u.length), k = s > S ? new Array(S = s - S + 1).join(r) : "";
+                return M && (x = i(k + x, k.length ? s - b.length : 1 / 0)), u += v, n = x + b, ("<" === o ? u + n + k : ">" === o ? k + u + n : "^" === o ? k.substring(0, S >>= 1) + u + n + k.substring(S) : u + (M ? n : k + n)) + e
+            }
+        }
+    }
+
+    function Ut(n) {
+        return n + ""
+    }
+
+    function jt() {
+        this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0])
+    }
+
+    function Ft(n, t, e) {
+        function r(t) {
+            var e = n(t), r = i(e, 1);
+            return r - t > t - e ? e : r
+        }
+
+        function u(e) {
+            return t(e = n(new cc(e - 1)), 1), e
+        }
+
+        function i(n, e) {
+            return t(n = new cc(+n), e), n
+        }
+
+        function o(n, r, i) {
+            var o = u(n), a = [];
+            if (i > 1)for (; r > o;)e(o) % i || a.push(new Date(+o)), t(o, 1); else for (; r > o;)a.push(new Date(+o)), t(o, 1);
+            return a
+        }
+
+        function a(n, t, e) {
+            try {
+                cc = jt;
+                var r = new jt;
+                return r._ = n, o(r, t, e)
+            } finally {
+                cc = Date
+            }
+        }
+
+        n.floor = n, n.round = r, n.ceil = u, n.offset = i, n.range = o;
+        var c = n.utc = Ht(n);
+        return c.floor = c, c.round = Ht(r), c.ceil = Ht(u), c.offset = Ht(i), c.range = a, n
+    }
+
+    function Ht(n) {
+        return function (t, e) {
+            try {
+                cc = jt;
+                var r = new jt;
+                return r._ = t, n(r, e)._
+            } finally {
+                cc = Date
+            }
+        }
+    }
+
+    function Ot(n) {
+        function t(n) {
+            function t(t) {
+                for (var e, u, i, o = [], a = -1, c = 0; ++a < r;)37 === n.charCodeAt(a) && (o.push(n.slice(c, a)), null != (u = sc[e = n.charAt(++a)]) && (e = n.charAt(++a)), (i = N[e]) && (e = i(t, null == u ? "e" === e ? " " : "0" : u)), o.push(e), c = a + 1);
+                return o.push(n.slice(c, a)), o.join("")
+            }
+
+            var r = n.length;
+            return t.parse = function (t) {
+                var r = {y: 1900, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0, Z: null}, u = e(r, n, t, 0);
+                if (u != t.length)return null;
+                "p"in r && (r.H = r.H % 12 + 12 * r.p);
+                var i = null != r.Z && cc !== jt, o = new (i ? jt : cc);
+                return "j"in r ? o.setFullYear(r.y, 0, r.j) : "w"in r && ("W"in r || "U"in r) ? (o.setFullYear(r.y, 0, 1), o.setFullYear(r.y, 0, "W"in r ? (r.w + 6) % 7 + 7 * r.W - (o.getDay() + 5) % 7 : r.w + 7 * r.U - (o.getDay() + 6) % 7)) : o.setFullYear(r.y, r.m, r.d), o.setHours(r.H + (r.Z / 100 | 0), r.M + r.Z % 100, r.S, r.L), i ? o._ : o
+            }, t.toString = function () {
+                return n
+            }, t
+        }
+
+        function e(n, t, e, r) {
+            for (var u, i, o, a = 0, c = t.length, l = e.length; c > a;) {
+                if (r >= l)return -1;
+                if (u = t.charCodeAt(a++), 37 === u) {
+                    if (o = t.charAt(a++), i = C[o in sc ? t.charAt(a++) : o], !i || (r = i(n, e, r)) < 0)return -1
+                } else if (u != e.charCodeAt(r++))return -1
+            }
+            return r
+        }
+
+        function r(n, t, e) {
+            _.lastIndex = 0;
+            var r = _.exec(t.slice(e));
+            return r ? (n.w = w.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function u(n, t, e) {
+            x.lastIndex = 0;
+            var r = x.exec(t.slice(e));
+            return r ? (n.w = b.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function i(n, t, e) {
+            E.lastIndex = 0;
+            var r = E.exec(t.slice(e));
+            return r ? (n.m = A.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function o(n, t, e) {
+            S.lastIndex = 0;
+            var r = S.exec(t.slice(e));
+            return r ? (n.m = k.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function a(n, t, r) {
+            return e(n, N.c.toString(), t, r)
+        }
+
+        function c(n, t, r) {
+            return e(n, N.x.toString(), t, r)
+        }
+
+        function l(n, t, r) {
+            return e(n, N.X.toString(), t, r)
+        }
+
+        function s(n, t, e) {
+            var r = M.get(t.slice(e, e += 2).toLowerCase());
+            return null == r ? -1 : (n.p = r, e)
+        }
+
+        var f = n.dateTime, h = n.date, g = n.time, p = n.periods, v = n.days, d = n.shortDays, m = n.months, y = n.shortMonths;
+        t.utc = function (n) {
+            function e(n) {
+                try {
+                    cc = jt;
+                    var t = new cc;
+                    return t._ = n, r(t)
+                } finally {
+                    cc = Date
+                }
+            }
+
+            var r = t(n);
+            return e.parse = function (n) {
+                try {
+                    cc = jt;
+                    var t = r.parse(n);
+                    return t && t._
+                } finally {
+                    cc = Date
+                }
+            }, e.toString = r.toString, e
+        }, t.multi = t.utc.multi = ae;
+        var M = ta.map(), x = Yt(v), b = Zt(v), _ = Yt(d), w = Zt(d), S = Yt(m), k = Zt(m), E = Yt(y), A = Zt(y);
+        p.forEach(function (n, t) {
+            M.set(n.toLowerCase(), t)
+        });
+        var N = {
+            a: function (n) {
+                return d[n.getDay()]
+            }, A: function (n) {
+                return v[n.getDay()]
+            }, b: function (n) {
+                return y[n.getMonth()]
+            }, B: function (n) {
+                return m[n.getMonth()]
+            }, c: t(f), d: function (n, t) {
+                return It(n.getDate(), t, 2)
+            }, e: function (n, t) {
+                return It(n.getDate(), t, 2)
+            }, H: function (n, t) {
+                return It(n.getHours(), t, 2)
+            }, I: function (n, t) {
+                return It(n.getHours() % 12 || 12, t, 2)
+            }, j: function (n, t) {
+                return It(1 + ac.dayOfYear(n), t, 3)
+            }, L: function (n, t) {
+                return It(n.getMilliseconds(), t, 3)
+            }, m: function (n, t) {
+                return It(n.getMonth() + 1, t, 2)
+            }, M: function (n, t) {
+                return It(n.getMinutes(), t, 2)
+            }, p: function (n) {
+                return p[+(n.getHours() >= 12)]
+            }, S: function (n, t) {
+                return It(n.getSeconds(), t, 2)
+            }, U: function (n, t) {
+                return It(ac.sundayOfYear(n), t, 2)
+            }, w: function (n) {
+                return n.getDay()
+            }, W: function (n, t) {
+                return It(ac.mondayOfYear(n), t, 2)
+            }, x: t(h), X: t(g), y: function (n, t) {
+                return It(n.getFullYear() % 100, t, 2)
+            }, Y: function (n, t) {
+                return It(n.getFullYear() % 1e4, t, 4)
+            }, Z: ie, "%": function () {
+                return "%"
+            }
+        }, C = {
+            a: r,
+            A: u,
+            b: i,
+            B: o,
+            c: a,
+            d: Qt,
+            e: Qt,
+            H: te,
+            I: te,
+            j: ne,
+            L: ue,
+            m: Kt,
+            M: ee,
+            p: s,
+            S: re,
+            U: Xt,
+            w: Vt,
+            W: $t,
+            x: c,
+            X: l,
+            y: Wt,
+            Y: Bt,
+            Z: Jt,
+            "%": oe
+        };
+        return t
+    }
+
+    function It(n, t, e) {
+        var r = 0 > n ? "-" : "", u = (r ? -n : n) + "", i = u.length;
+        return r + (e > i ? new Array(e - i + 1).join(t) + u : u)
+    }
+
+    function Yt(n) {
+        return new RegExp("^(?:" + n.map(ta.requote).join("|") + ")", "i")
+    }
+
+    function Zt(n) {
+        for (var t = new l, e = -1, r = n.length; ++e < r;)t.set(n[e].toLowerCase(), e);
+        return t
+    }
+
+    function Vt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 1));
+        return r ? (n.w = +r[0], e + r[0].length) : -1
+    }
+
+    function Xt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e));
+        return r ? (n.U = +r[0], e + r[0].length) : -1
+    }
+
+    function $t(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e));
+        return r ? (n.W = +r[0], e + r[0].length) : -1
+    }
+
+    function Bt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 4));
+        return r ? (n.y = +r[0], e + r[0].length) : -1
+    }
+
+    function Wt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.y = Gt(+r[0]), e + r[0].length) : -1
+    }
+
+    function Jt(n, t, e) {
+        return /^[+-]\d{4}$/.test(t = t.slice(e, e + 5)) ? (n.Z = -t, e + 5) : -1
+    }
+
+    function Gt(n) {
+        return n + (n > 68 ? 1900 : 2e3)
+    }
+
+    function Kt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.m = r[0] - 1, e + r[0].length) : -1
+    }
+
+    function Qt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.d = +r[0], e + r[0].length) : -1
+    }
+
+    function ne(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 3));
+        return r ? (n.j = +r[0], e + r[0].length) : -1
+    }
+
+    function te(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.H = +r[0], e + r[0].length) : -1
+    }
+
+    function ee(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.M = +r[0], e + r[0].length) : -1
+    }
+
+    function re(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.S = +r[0], e + r[0].length) : -1
+    }
+
+    function ue(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 3));
+        return r ? (n.L = +r[0], e + r[0].length) : -1
+    }
+
+    function ie(n) {
+        var t = n.getTimezoneOffset(), e = t > 0 ? "-" : "+", r = ga(t) / 60 | 0, u = ga(t) % 60;
+        return e + It(r, "0", 2) + It(u, "0", 2)
+    }
+
+    function oe(n, t, e) {
+        hc.lastIndex = 0;
+        var r = hc.exec(t.slice(e, e + 1));
+        return r ? e + r[0].length : -1
+    }
+
+    function ae(n) {
+        for (var t = n.length, e = -1; ++e < t;)n[e][0] = this(n[e][0]);
+        return function (t) {
+            for (var e = 0, r = n[e]; !r[1](t);)r = n[++e];
+            return r[0](t)
+        }
+    }
+
+    function ce() {
+    }
+
+    function le(n, t, e) {
+        var r = e.s = n + t, u = r - n, i = r - u;
+        e.t = n - i + (t - u)
+    }
+
+    function se(n, t) {
+        n && dc.hasOwnProperty(n.type) && dc[n.type](n, t)
+    }
+
+    function fe(n, t, e) {
+        var r, u = -1, i = n.length - e;
+        for (t.lineStart(); ++u < i;)r = n[u], t.point(r[0], r[1], r[2]);
+        t.lineEnd()
+    }
+
+    function he(n, t) {
+        var e = -1, r = n.length;
+        for (t.polygonStart(); ++e < r;)fe(n[e], t, 1);
+        t.polygonEnd()
+    }
+
+    function ge() {
+        function n(n, t) {
+            n *= Da, t = t * Da / 2 + qa / 4;
+            var e = n - r, o = e >= 0 ? 1 : -1, a = o * e, c = Math.cos(t), l = Math.sin(t), s = i * l, f = u * c + s * Math.cos(a), h = s * o * Math.sin(a);
+            yc.add(Math.atan2(h, f)), r = n, u = c, i = l
+        }
+
+        var t, e, r, u, i;
+        Mc.point = function (o, a) {
+            Mc.point = n, r = (t = o) * Da, u = Math.cos(a = (e = a) * Da / 2 + qa / 4), i = Math.sin(a)
+        }, Mc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function pe(n) {
+        var t = n[0], e = n[1], r = Math.cos(e);
+        return [r * Math.cos(t), r * Math.sin(t), Math.sin(e)]
+    }
+
+    function ve(n, t) {
+        return n[0] * t[0] + n[1] * t[1] + n[2] * t[2]
+    }
+
+    function de(n, t) {
+        return [n[1] * t[2] - n[2] * t[1], n[2] * t[0] - n[0] * t[2], n[0] * t[1] - n[1] * t[0]]
+    }
+
+    function me(n, t) {
+        n[0] += t[0], n[1] += t[1], n[2] += t[2]
+    }
+
+    function ye(n, t) {
+        return [n[0] * t, n[1] * t, n[2] * t]
+    }
+
+    function Me(n) {
+        var t = Math.sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
+        n[0] /= t, n[1] /= t, n[2] /= t
+    }
+
+    function xe(n) {
+        return [Math.atan2(n[1], n[0]), tt(n[2])]
+    }
+
+    function be(n, t) {
+        return ga(n[0] - t[0]) < Ca && ga(n[1] - t[1]) < Ca
+    }
+
+    function _e(n, t) {
+        n *= Da;
+        var e = Math.cos(t *= Da);
+        we(e * Math.cos(n), e * Math.sin(n), Math.sin(t))
+    }
+
+    function we(n, t, e) {
+        ++xc, _c += (n - _c) / xc, wc += (t - wc) / xc, Sc += (e - Sc) / xc
+    }
+
+    function Se() {
+        function n(n, u) {
+            n *= Da;
+            var i = Math.cos(u *= Da), o = i * Math.cos(n), a = i * Math.sin(n), c = Math.sin(u), l = Math.atan2(Math.sqrt((l = e * c - r * a) * l + (l = r * o - t * c) * l + (l = t * a - e * o) * l), t * o + e * a + r * c);
+            bc += l, kc += l * (t + (t = o)), Ec += l * (e + (e = a)), Ac += l * (r + (r = c)), we(t, e, r)
+        }
+
+        var t, e, r;
+        qc.point = function (u, i) {
+            u *= Da;
+            var o = Math.cos(i *= Da);
+            t = o * Math.cos(u), e = o * Math.sin(u), r = Math.sin(i), qc.point = n, we(t, e, r)
+        }
+    }
+
+    function ke() {
+        qc.point = _e
+    }
+
+    function Ee() {
+        function n(n, t) {
+            n *= Da;
+            var e = Math.cos(t *= Da), o = e * Math.cos(n), a = e * Math.sin(n), c = Math.sin(t), l = u * c - i * a, s = i * o - r * c, f = r * a - u * o, h = Math.sqrt(l * l + s * s + f * f), g = r * o + u * a + i * c, p = h && -nt(g) / h, v = Math.atan2(h, g);
+            Nc += p * l, Cc += p * s, zc += p * f, bc += v, kc += v * (r + (r = o)), Ec += v * (u + (u = a)), Ac += v * (i + (i = c)), we(r, u, i)
+        }
+
+        var t, e, r, u, i;
+        qc.point = function (o, a) {
+            t = o, e = a, qc.point = n, o *= Da;
+            var c = Math.cos(a *= Da);
+            r = c * Math.cos(o), u = c * Math.sin(o), i = Math.sin(a), we(r, u, i)
+        }, qc.lineEnd = function () {
+            n(t, e), qc.lineEnd = ke, qc.point = _e
+        }
+    }
+
+    function Ae(n, t) {
+        function e(e, r) {
+            return e = n(e, r), t(e[0], e[1])
+        }
+
+        return n.invert && t.invert && (e.invert = function (e, r) {
+            return e = t.invert(e, r), e && n.invert(e[0], e[1])
+        }), e
+    }
+
+    function Ne() {
+        return !0
+    }
+
+    function Ce(n, t, e, r, u) {
+        var i = [], o = [];
+        if (n.forEach(function (n) {
+                if (!((t = n.length - 1) <= 0)) {
+                    var t, e = n[0], r = n[t];
+                    if (be(e, r)) {
+                        u.lineStart();
+                        for (var a = 0; t > a; ++a)u.point((e = n[a])[0], e[1]);
+                        return void u.lineEnd()
+                    }
+                    var c = new qe(e, n, null, !0), l = new qe(e, null, c, !1);
+                    c.o = l, i.push(c), o.push(l), c = new qe(r, n, null, !1), l = new qe(r, null, c, !0), c.o = l, i.push(c), o.push(l)
+                }
+            }), o.sort(t), ze(i), ze(o), i.length) {
+            for (var a = 0, c = e, l = o.length; l > a; ++a)o[a].e = c = !c;
+            for (var s, f, h = i[0]; ;) {
+                for (var g = h, p = !0; g.v;)if ((g = g.n) === h)return;
+                s = g.z, u.lineStart();
+                do {
+                    if (g.v = g.o.v = !0, g.e) {
+                        if (p)for (var a = 0, l = s.length; l > a; ++a)u.point((f = s[a])[0], f[1]); else r(g.x, g.n.x, 1, u);
+                        g = g.n
+                    } else {
+                        if (p) {
+                            s = g.p.z;
+                            for (var a = s.length - 1; a >= 0; --a)u.point((f = s[a])[0], f[1])
+                        } else r(g.x, g.p.x, -1, u);
+                        g = g.p
+                    }
+                    g = g.o, s = g.z, p = !p
+                } while (!g.v);
+                u.lineEnd()
+            }
+        }
+    }
+
+    function ze(n) {
+        if (t = n.length) {
+            for (var t, e, r = 0, u = n[0]; ++r < t;)u.n = e = n[r], e.p = u, u = e;
+            u.n = e = n[0], e.p = u
+        }
+    }
+
+    function qe(n, t, e, r) {
+        this.x = n, this.z = t, this.o = e, this.e = r, this.v = !1, this.n = this.p = null
+    }
+
+    function Le(n, t, e, r) {
+        return function (u, i) {
+            function o(t, e) {
+                var r = u(t, e);
+                n(t = r[0], e = r[1]) && i.point(t, e)
+            }
+
+            function a(n, t) {
+                var e = u(n, t);
+                d.point(e[0], e[1])
+            }
+
+            function c() {
+                y.point = a, d.lineStart()
+            }
+
+            function l() {
+                y.point = o, d.lineEnd()
+            }
+
+            function s(n, t) {
+                v.push([n, t]);
+                var e = u(n, t);
+                x.point(e[0], e[1])
+            }
+
+            function f() {
+                x.lineStart(), v = []
+            }
+
+            function h() {
+                s(v[0][0], v[0][1]), x.lineEnd();
+                var n, t = x.clean(), e = M.buffer(), r = e.length;
+                if (v.pop(), p.push(v), v = null, r)if (1 & t) {
+                    n = e[0];
+                    var u, r = n.length - 1, o = -1;
+                    if (r > 0) {
+                        for (b || (i.polygonStart(), b = !0), i.lineStart(); ++o < r;)i.point((u = n[o])[0], u[1]);
+                        i.lineEnd()
+                    }
+                } else r > 1 && 2 & t && e.push(e.pop().concat(e.shift())), g.push(e.filter(Te))
+            }
+
+            var g, p, v, d = t(i), m = u.invert(r[0], r[1]), y = {
+                point: o,
+                lineStart: c,
+                lineEnd: l,
+                polygonStart: function () {
+                    y.point = s, y.lineStart = f, y.lineEnd = h, g = [], p = []
+                },
+                polygonEnd: function () {
+                    y.point = o, y.lineStart = c, y.lineEnd = l, g = ta.merge(g);
+                    var n = Fe(m, p);
+                    g.length ? (b || (i.polygonStart(), b = !0), Ce(g, De, n, e, i)) : n && (b || (i.polygonStart(), b = !0), i.lineStart(), e(null, null, 1, i), i.lineEnd()), b && (i.polygonEnd(), b = !1), g = p = null
+                },
+                sphere: function () {
+                    i.polygonStart(), i.lineStart(), e(null, null, 1, i), i.lineEnd(), i.polygonEnd()
+                }
+            }, M = Re(), x = t(M), b = !1;
+            return y
+        }
+    }
+
+    function Te(n) {
+        return n.length > 1
+    }
+
+    function Re() {
+        var n, t = [];
+        return {
+            lineStart: function () {
+                t.push(n = [])
+            }, point: function (t, e) {
+                n.push([t, e])
+            }, lineEnd: b, buffer: function () {
+                var e = t;
+                return t = [], n = null, e
+            }, rejoin: function () {
+                t.length > 1 && t.push(t.pop().concat(t.shift()))
+            }
+        }
+    }
+
+    function De(n, t) {
+        return ((n = n.x)[0] < 0 ? n[1] - Ra - Ca : Ra - n[1]) - ((t = t.x)[0] < 0 ? t[1] - Ra - Ca : Ra - t[1])
+    }
+
+    function Pe(n) {
+        var t, e = 0 / 0, r = 0 / 0, u = 0 / 0;
+        return {
+            lineStart: function () {
+                n.lineStart(), t = 1
+            }, point: function (i, o) {
+                var a = i > 0 ? qa : -qa, c = ga(i - e);
+                ga(c - qa) < Ca ? (n.point(e, r = (r + o) / 2 > 0 ? Ra : -Ra), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), n.point(i, r), t = 0) : u !== a && c >= qa && (ga(e - u) < Ca && (e -= u * Ca), ga(i - a) < Ca && (i -= a * Ca), r = Ue(e, r, i, o), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), t = 0), n.point(e = i, r = o), u = a
+            }, lineEnd: function () {
+                n.lineEnd(), e = r = 0 / 0
+            }, clean: function () {
+                return 2 - t
+            }
+        }
+    }
+
+    function Ue(n, t, e, r) {
+        var u, i, o = Math.sin(n - e);
+        return ga(o) > Ca ? Math.atan((Math.sin(t) * (i = Math.cos(r)) * Math.sin(e) - Math.sin(r) * (u = Math.cos(t)) * Math.sin(n)) / (u * i * o)) : (t + r) / 2
+    }
+
+    function je(n, t, e, r) {
+        var u;
+        if (null == n)u = e * Ra, r.point(-qa, u), r.point(0, u), r.point(qa, u), r.point(qa, 0), r.point(qa, -u), r.point(0, -u), r.point(-qa, -u), r.point(-qa, 0), r.point(-qa, u); else if (ga(n[0] - t[0]) > Ca) {
+            var i = n[0] < t[0] ? qa : -qa;
+            u = e * i / 2, r.point(-i, u), r.point(0, u), r.point(i, u)
+        } else r.point(t[0], t[1])
+    }
+
+    function Fe(n, t) {
+        var e = n[0], r = n[1], u = [Math.sin(e), -Math.cos(e), 0], i = 0, o = 0;
+        yc.reset();
+        for (var a = 0, c = t.length; c > a; ++a) {
+            var l = t[a], s = l.length;
+            if (s)for (var f = l[0], h = f[0], g = f[1] / 2 + qa / 4, p = Math.sin(g), v = Math.cos(g), d = 1; ;) {
+                d === s && (d = 0), n = l[d];
+                var m = n[0], y = n[1] / 2 + qa / 4, M = Math.sin(y), x = Math.cos(y), b = m - h, _ = b >= 0 ? 1 : -1, w = _ * b, S = w > qa, k = p * M;
+                if (yc.add(Math.atan2(k * _ * Math.sin(w), v * x + k * Math.cos(w))), i += S ? b + _ * La : b, S ^ h >= e ^ m >= e) {
+                    var E = de(pe(f), pe(n));
+                    Me(E);
+                    var A = de(u, E);
+                    Me(A);
+                    var N = (S ^ b >= 0 ? -1 : 1) * tt(A[2]);
+                    (r > N || r === N && (E[0] || E[1])) && (o += S ^ b >= 0 ? 1 : -1)
+                }
+                if (!d++)break;
+                h = m, p = M, v = x, f = n
+            }
+        }
+        return (-Ca > i || Ca > i && 0 > yc) ^ 1 & o
+    }
+
+    function He(n) {
+        function t(n, t) {
+            return Math.cos(n) * Math.cos(t) > i
+        }
+
+        function e(n) {
+            var e, i, c, l, s;
+            return {
+                lineStart: function () {
+                    l = c = !1, s = 1
+                }, point: function (f, h) {
+                    var g, p = [f, h], v = t(f, h), d = o ? v ? 0 : u(f, h) : v ? u(f + (0 > f ? qa : -qa), h) : 0;
+                    if (!e && (l = c = v) && n.lineStart(), v !== c && (g = r(e, p), (be(e, g) || be(p, g)) && (p[0] += Ca, p[1] += Ca, v = t(p[0], p[1]))), v !== c)s = 0, v ? (n.lineStart(), g = r(p, e), n.point(g[0], g[1])) : (g = r(e, p), n.point(g[0], g[1]), n.lineEnd()), e = g; else if (a && e && o ^ v) {
+                        var m;
+                        d & i || !(m = r(p, e, !0)) || (s = 0, o ? (n.lineStart(), n.point(m[0][0], m[0][1]), n.point(m[1][0], m[1][1]), n.lineEnd()) : (n.point(m[1][0], m[1][1]), n.lineEnd(), n.lineStart(), n.point(m[0][0], m[0][1])))
+                    }
+                    !v || e && be(e, p) || n.point(p[0], p[1]), e = p, c = v, i = d
+                }, lineEnd: function () {
+                    c && n.lineEnd(), e = null
+                }, clean: function () {
+                    return s | (l && c) << 1
+                }
+            }
+        }
+
+        function r(n, t, e) {
+            var r = pe(n), u = pe(t), o = [1, 0, 0], a = de(r, u), c = ve(a, a), l = a[0], s = c - l * l;
+            if (!s)return !e && n;
+            var f = i * c / s, h = -i * l / s, g = de(o, a), p = ye(o, f), v = ye(a, h);
+            me(p, v);
+            var d = g, m = ve(p, d), y = ve(d, d), M = m * m - y * (ve(p, p) - 1);
+            if (!(0 > M)) {
+                var x = Math.sqrt(M), b = ye(d, (-m - x) / y);
+                if (me(b, p), b = xe(b), !e)return b;
+                var _, w = n[0], S = t[0], k = n[1], E = t[1];
+                w > S && (_ = w, w = S, S = _);
+                var A = S - w, N = ga(A - qa) < Ca, C = N || Ca > A;
+                if (!N && k > E && (_ = k, k = E, E = _), C ? N ? k + E > 0 ^ b[1] < (ga(b[0] - w) < Ca ? k : E) : k <= b[1] && b[1] <= E : A > qa ^ (w <= b[0] && b[0] <= S)) {
+                    var z = ye(d, (-m + x) / y);
+                    return me(z, p), [b, xe(z)]
+                }
+            }
+        }
+
+        function u(t, e) {
+            var r = o ? n : qa - n, u = 0;
+            return -r > t ? u |= 1 : t > r && (u |= 2), -r > e ? u |= 4 : e > r && (u |= 8), u
+        }
+
+        var i = Math.cos(n), o = i > 0, a = ga(i) > Ca, c = gr(n, 6 * Da);
+        return Le(t, e, c, o ? [0, -n] : [-qa, n - qa])
+    }
+
+    function Oe(n, t, e, r) {
+        return function (u) {
+            var i, o = u.a, a = u.b, c = o.x, l = o.y, s = a.x, f = a.y, h = 0, g = 1, p = s - c, v = f - l;
+            if (i = n - c, p || !(i > 0)) {
+                if (i /= p, 0 > p) {
+                    if (h > i)return;
+                    g > i && (g = i)
+                } else if (p > 0) {
+                    if (i > g)return;
+                    i > h && (h = i)
+                }
+                if (i = e - c, p || !(0 > i)) {
+                    if (i /= p, 0 > p) {
+                        if (i > g)return;
+                        i > h && (h = i)
+                    } else if (p > 0) {
+                        if (h > i)return;
+                        g > i && (g = i)
+                    }
+                    if (i = t - l, v || !(i > 0)) {
+                        if (i /= v, 0 > v) {
+                            if (h > i)return;
+                            g > i && (g = i)
+                        } else if (v > 0) {
+                            if (i > g)return;
+                            i > h && (h = i)
+                        }
+                        if (i = r - l, v || !(0 > i)) {
+                            if (i /= v, 0 > v) {
+                                if (i > g)return;
+                                i > h && (h = i)
+                            } else if (v > 0) {
+                                if (h > i)return;
+                                g > i && (g = i)
+                            }
+                            return h > 0 && (u.a = {x: c + h * p, y: l + h * v}), 1 > g && (u.b = {
+                                x: c + g * p,
+                                y: l + g * v
+                            }), u
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    function Ie(n, t, e, r) {
+        function u(r, u) {
+            return ga(r[0] - n) < Ca ? u > 0 ? 0 : 3 : ga(r[0] - e) < Ca ? u > 0 ? 2 : 1 : ga(r[1] - t) < Ca ? u > 0 ? 1 : 0 : u > 0 ? 3 : 2
+        }
+
+        function i(n, t) {
+            return o(n.x, t.x)
+        }
+
+        function o(n, t) {
+            var e = u(n, 1), r = u(t, 1);
+            return e !== r ? e - r : 0 === e ? t[1] - n[1] : 1 === e ? n[0] - t[0] : 2 === e ? n[1] - t[1] : t[0] - n[0]
+        }
+
+        return function (a) {
+            function c(n) {
+                for (var t = 0, e = d.length, r = n[1], u = 0; e > u; ++u)for (var i, o = 1, a = d[u], c = a.length, l = a[0]; c > o; ++o)i = a[o], l[1] <= r ? i[1] > r && Q(l, i, n) > 0 && ++t : i[1] <= r && Q(l, i, n) < 0 && --t, l = i;
+                return 0 !== t
+            }
+
+            function l(i, a, c, l) {
+                var s = 0, f = 0;
+                if (null == i || (s = u(i, c)) !== (f = u(a, c)) || o(i, a) < 0 ^ c > 0) {
+                    do l.point(0 === s || 3 === s ? n : e, s > 1 ? r : t); while ((s = (s + c + 4) % 4) !== f)
+                } else l.point(a[0], a[1])
+            }
+
+            function s(u, i) {
+                return u >= n && e >= u && i >= t && r >= i
+            }
+
+            function f(n, t) {
+                s(n, t) && a.point(n, t)
+            }
+
+            function h() {
+                C.point = p, d && d.push(m = []), S = !0, w = !1, b = _ = 0 / 0
+            }
+
+            function g() {
+                v && (p(y, M), x && w && A.rejoin(), v.push(A.buffer())), C.point = f, w && a.lineEnd()
+            }
+
+            function p(n, t) {
+                n = Math.max(-Tc, Math.min(Tc, n)), t = Math.max(-Tc, Math.min(Tc, t));
+                var e = s(n, t);
+                if (d && m.push([n, t]), S)y = n, M = t, x = e, S = !1, e && (a.lineStart(), a.point(n, t)); else if (e && w)a.point(n, t); else {
+                    var r = {a: {x: b, y: _}, b: {x: n, y: t}};
+                    N(r) ? (w || (a.lineStart(), a.point(r.a.x, r.a.y)), a.point(r.b.x, r.b.y), e || a.lineEnd(), k = !1) : e && (a.lineStart(), a.point(n, t), k = !1)
+                }
+                b = n, _ = t, w = e
+            }
+
+            var v, d, m, y, M, x, b, _, w, S, k, E = a, A = Re(), N = Oe(n, t, e, r), C = {
+                point: f,
+                lineStart: h,
+                lineEnd: g,
+                polygonStart: function () {
+                    a = A, v = [], d = [], k = !0
+                },
+                polygonEnd: function () {
+                    a = E, v = ta.merge(v);
+                    var t = c([n, r]), e = k && t, u = v.length;
+                    (e || u) && (a.polygonStart(), e && (a.lineStart(), l(null, null, 1, a), a.lineEnd()), u && Ce(v, i, t, l, a), a.polygonEnd()), v = d = m = null
+                }
+            };
+            return C
+        }
+    }
+
+    function Ye(n) {
+        var t = 0, e = qa / 3, r = ir(n), u = r(t, e);
+        return u.parallels = function (n) {
+            return arguments.length ? r(t = n[0] * qa / 180, e = n[1] * qa / 180) : [t / qa * 180, e / qa * 180]
+        }, u
+    }
+
+    function Ze(n, t) {
+        function e(n, t) {
+            var e = Math.sqrt(i - 2 * u * Math.sin(t)) / u;
+            return [e * Math.sin(n *= u), o - e * Math.cos(n)]
+        }
+
+        var r = Math.sin(n), u = (r + Math.sin(t)) / 2, i = 1 + r * (2 * u - r), o = Math.sqrt(i) / u;
+        return e.invert = function (n, t) {
+            var e = o - t;
+            return [Math.atan2(n, e) / u, tt((i - (n * n + e * e) * u * u) / (2 * u))]
+        }, e
+    }
+
+    function Ve() {
+        function n(n, t) {
+            Dc += u * n - r * t, r = n, u = t
+        }
+
+        var t, e, r, u;
+        Hc.point = function (i, o) {
+            Hc.point = n, t = r = i, e = u = o
+        }, Hc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Xe(n, t) {
+        Pc > n && (Pc = n), n > jc && (jc = n), Uc > t && (Uc = t), t > Fc && (Fc = t)
+    }
+
+    function $e() {
+        function n(n, t) {
+            o.push("M", n, ",", t, i)
+        }
+
+        function t(n, t) {
+            o.push("M", n, ",", t), a.point = e
+        }
+
+        function e(n, t) {
+            o.push("L", n, ",", t)
+        }
+
+        function r() {
+            a.point = n
+        }
+
+        function u() {
+            o.push("Z")
+        }
+
+        var i = Be(4.5), o = [], a = {
+            point: n, lineStart: function () {
+                a.point = t
+            }, lineEnd: r, polygonStart: function () {
+                a.lineEnd = u
+            }, polygonEnd: function () {
+                a.lineEnd = r, a.point = n
+            }, pointRadius: function (n) {
+                return i = Be(n), a
+            }, result: function () {
+                if (o.length) {
+                    var n = o.join("");
+                    return o = [], n
+                }
+            }
+        };
+        return a
+    }
+
+    function Be(n) {
+        return "m0," + n + "a" + n + "," + n + " 0 1,1 0," + -2 * n + "a" + n + "," + n + " 0 1,1 0," + 2 * n + "z"
+    }
+
+    function We(n, t) {
+        _c += n, wc += t, ++Sc
+    }
+
+    function Je() {
+        function n(n, r) {
+            var u = n - t, i = r - e, o = Math.sqrt(u * u + i * i);
+            kc += o * (t + n) / 2, Ec += o * (e + r) / 2, Ac += o, We(t = n, e = r)
+        }
+
+        var t, e;
+        Ic.point = function (r, u) {
+            Ic.point = n, We(t = r, e = u)
+        }
+    }
+
+    function Ge() {
+        Ic.point = We
+    }
+
+    function Ke() {
+        function n(n, t) {
+            var e = n - r, i = t - u, o = Math.sqrt(e * e + i * i);
+            kc += o * (r + n) / 2, Ec += o * (u + t) / 2, Ac += o, o = u * n - r * t, Nc += o * (r + n), Cc += o * (u + t), zc += 3 * o, We(r = n, u = t)
+        }
+
+        var t, e, r, u;
+        Ic.point = function (i, o) {
+            Ic.point = n, We(t = r = i, e = u = o)
+        }, Ic.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Qe(n) {
+        function t(t, e) {
+            n.moveTo(t + o, e), n.arc(t, e, o, 0, La)
+        }
+
+        function e(t, e) {
+            n.moveTo(t, e), a.point = r
+        }
+
+        function r(t, e) {
+            n.lineTo(t, e)
+        }
+
+        function u() {
+            a.point = t
+        }
+
+        function i() {
+            n.closePath()
+        }
+
+        var o = 4.5, a = {
+            point: t, lineStart: function () {
+                a.point = e
+            }, lineEnd: u, polygonStart: function () {
+                a.lineEnd = i
+            }, polygonEnd: function () {
+                a.lineEnd = u, a.point = t
+            }, pointRadius: function (n) {
+                return o = n, a
+            }, result: b
+        };
+        return a
+    }
+
+    function nr(n) {
+        function t(n) {
+            return (a ? r : e)(n)
+        }
+
+        function e(t) {
+            return rr(t, function (e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            })
+        }
+
+        function r(t) {
+            function e(e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            }
+
+            function r() {
+                M = 0 / 0, S.point = i, t.lineStart()
+            }
+
+            function i(e, r) {
+                var i = pe([e, r]), o = n(e, r);
+                u(M, x, y, b, _, w, M = o[0], x = o[1], y = e, b = i[0], _ = i[1], w = i[2], a, t), t.point(M, x)
+            }
+
+            function o() {
+                S.point = e, t.lineEnd()
+            }
+
+            function c() {
+                r(), S.point = l, S.lineEnd = s
+            }
+
+            function l(n, t) {
+                i(f = n, h = t), g = M, p = x, v = b, d = _, m = w, S.point = i
+            }
+
+            function s() {
+                u(M, x, y, b, _, w, g, p, f, v, d, m, a, t), S.lineEnd = o, o()
+            }
+
+            var f, h, g, p, v, d, m, y, M, x, b, _, w, S = {
+                point: e, lineStart: r, lineEnd: o, polygonStart: function () {
+                    t.polygonStart(), S.lineStart = c
+                }, polygonEnd: function () {
+                    t.polygonEnd(), S.lineStart = r
+                }
+            };
+            return S
+        }
+
+        function u(t, e, r, a, c, l, s, f, h, g, p, v, d, m) {
+            var y = s - t, M = f - e, x = y * y + M * M;
+            if (x > 4 * i && d--) {
+                var b = a + g, _ = c + p, w = l + v, S = Math.sqrt(b * b + _ * _ + w * w), k = Math.asin(w /= S), E = ga(ga(w) - 1) < Ca || ga(r - h) < Ca ? (r + h) / 2 : Math.atan2(_, b), A = n(E, k), N = A[0], C = A[1], z = N - t, q = C - e, L = M * z - y * q;
+                (L * L / x > i || ga((y * z + M * q) / x - .5) > .3 || o > a * g + c * p + l * v) && (u(t, e, r, a, c, l, N, C, E, b /= S, _ /= S, w, d, m), m.point(N, C), u(N, C, E, b, _, w, s, f, h, g, p, v, d, m))
+            }
+        }
+
+        var i = .5, o = Math.cos(30 * Da), a = 16;
+        return t.precision = function (n) {
+            return arguments.length ? (a = (i = n * n) > 0 && 16, t) : Math.sqrt(i)
+        }, t
+    }
+
+    function tr(n) {
+        var t = nr(function (t, e) {
+            return n([t * Pa, e * Pa])
+        });
+        return function (n) {
+            return or(t(n))
+        }
+    }
+
+    function er(n) {
+        this.stream = n
+    }
+
+    function rr(n, t) {
+        return {
+            point: t, sphere: function () {
+                n.sphere()
+            }, lineStart: function () {
+                n.lineStart()
+            }, lineEnd: function () {
+                n.lineEnd()
+            }, polygonStart: function () {
+                n.polygonStart()
+            }, polygonEnd: function () {
+                n.polygonEnd()
+            }
+        }
+    }
+
+    function ur(n) {
+        return ir(function () {
+            return n
+        })()
+    }
+
+    function ir(n) {
+        function t(n) {
+            return n = a(n[0] * Da, n[1] * Da), [n[0] * h + c, l - n[1] * h]
+        }
+
+        function e(n) {
+            return n = a.invert((n[0] - c) / h, (l - n[1]) / h), n && [n[0] * Pa, n[1] * Pa]
+        }
+
+        function r() {
+            a = Ae(o = lr(m, M, x), i);
+            var n = i(v, d);
+            return c = g - n[0] * h, l = p + n[1] * h, u()
+        }
+
+        function u() {
+            return s && (s.valid = !1, s = null), t
+        }
+
+        var i, o, a, c, l, s, f = nr(function (n, t) {
+            return n = i(n, t), [n[0] * h + c, l - n[1] * h]
+        }), h = 150, g = 480, p = 250, v = 0, d = 0, m = 0, M = 0, x = 0, b = Lc, _ = y, w = null, S = null;
+        return t.stream = function (n) {
+            return s && (s.valid = !1), s = or(b(o, f(_(n)))), s.valid = !0, s
+        }, t.clipAngle = function (n) {
+            return arguments.length ? (b = null == n ? (w = n, Lc) : He((w = +n) * Da), u()) : w
+        }, t.clipExtent = function (n) {
+            return arguments.length ? (S = n, _ = n ? Ie(n[0][0], n[0][1], n[1][0], n[1][1]) : y, u()) : S
+        }, t.scale = function (n) {
+            return arguments.length ? (h = +n, r()) : h
+        }, t.translate = function (n) {
+            return arguments.length ? (g = +n[0], p = +n[1], r()) : [g, p]
+        }, t.center = function (n) {
+            return arguments.length ? (v = n[0] % 360 * Da, d = n[1] % 360 * Da, r()) : [v * Pa, d * Pa]
+        }, t.rotate = function (n) {
+            return arguments.length ? (m = n[0] % 360 * Da, M = n[1] % 360 * Da, x = n.length > 2 ? n[2] % 360 * Da : 0, r()) : [m * Pa, M * Pa, x * Pa]
+        }, ta.rebind(t, f, "precision"), function () {
+            return i = n.apply(this, arguments), t.invert = i.invert && e, r()
+        }
+    }
+
+    function or(n) {
+        return rr(n, function (t, e) {
+            n.point(t * Da, e * Da)
+        })
+    }
+
+    function ar(n, t) {
+        return [n, t]
+    }
+
+    function cr(n, t) {
+        return [n > qa ? n - La : -qa > n ? n + La : n, t]
+    }
+
+    function lr(n, t, e) {
+        return n ? t || e ? Ae(fr(n), hr(t, e)) : fr(n) : t || e ? hr(t, e) : cr
+    }
+
+    function sr(n) {
+        return function (t, e) {
+            return t += n, [t > qa ? t - La : -qa > t ? t + La : t, e]
+        }
+    }
+
+    function fr(n) {
+        var t = sr(n);
+        return t.invert = sr(-n), t
+    }
+
+    function hr(n, t) {
+        function e(n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * r + a * u;
+            return [Math.atan2(c * i - s * o, a * r - l * u), tt(s * i + c * o)]
+        }
+
+        var r = Math.cos(n), u = Math.sin(n), i = Math.cos(t), o = Math.sin(t);
+        return e.invert = function (n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * i - c * o;
+            return [Math.atan2(c * i + l * o, a * r + s * u), tt(s * r - a * u)]
+        }, e
+    }
+
+    function gr(n, t) {
+        var e = Math.cos(n), r = Math.sin(n);
+        return function (u, i, o, a) {
+            var c = o * t;
+            null != u ? (u = pr(e, u), i = pr(e, i), (o > 0 ? i > u : u > i) && (u += o * La)) : (u = n + o * La, i = n - .5 * c);
+            for (var l, s = u; o > 0 ? s > i : i > s; s -= c)a.point((l = xe([e, -r * Math.cos(s), -r * Math.sin(s)]))[0], l[1])
+        }
+    }
+
+    function pr(n, t) {
+        var e = pe(t);
+        e[0] -= n, Me(e);
+        var r = nt(-e[1]);
+        return ((-e[2] < 0 ? -r : r) + 2 * Math.PI - Ca) % (2 * Math.PI)
+    }
+
+    function vr(n, t, e) {
+        var r = ta.range(n, t - Ca, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [n, t]
+            })
+        }
+    }
+
+    function dr(n, t, e) {
+        var r = ta.range(n, t - Ca, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [t, n]
+            })
+        }
+    }
+
+    function mr(n) {
+        return n.source
+    }
+
+    function yr(n) {
+        return n.target
+    }
+
+    function Mr(n, t, e, r) {
+        var u = Math.cos(t), i = Math.sin(t), o = Math.cos(r), a = Math.sin(r), c = u * Math.cos(n), l = u * Math.sin(n), s = o * Math.cos(e), f = o * Math.sin(e), h = 2 * Math.asin(Math.sqrt(it(r - t) + u * o * it(e - n))), g = 1 / Math.sin(h), p = h ? function (n) {
+            var t = Math.sin(n *= h) * g, e = Math.sin(h - n) * g, r = e * c + t * s, u = e * l + t * f, o = e * i + t * a;
+            return [Math.atan2(u, r) * Pa, Math.atan2(o, Math.sqrt(r * r + u * u)) * Pa]
+        } : function () {
+            return [n * Pa, t * Pa]
+        };
+        return p.distance = h, p
+    }
+
+    function xr() {
+        function n(n, u) {
+            var i = Math.sin(u *= Da), o = Math.cos(u), a = ga((n *= Da) - t), c = Math.cos(a);
+            Yc += Math.atan2(Math.sqrt((a = o * Math.sin(a)) * a + (a = r * i - e * o * c) * a), e * i + r * o * c), t = n, e = i, r = o
+        }
+
+        var t, e, r;
+        Zc.point = function (u, i) {
+            t = u * Da, e = Math.sin(i *= Da), r = Math.cos(i), Zc.point = n
+        }, Zc.lineEnd = function () {
+            Zc.point = Zc.lineEnd = b
+        }
+    }
+
+    function br(n, t) {
+        function e(t, e) {
+            var r = Math.cos(t), u = Math.cos(e), i = n(r * u);
+            return [i * u * Math.sin(t), i * Math.sin(e)]
+        }
+
+        return e.invert = function (n, e) {
+            var r = Math.sqrt(n * n + e * e), u = t(r), i = Math.sin(u), o = Math.cos(u);
+            return [Math.atan2(n * i, r * o), Math.asin(r && e * i / r)]
+        }, e
+    }
+
+    function _r(n, t) {
+        function e(n, t) {
+            o > 0 ? -Ra + Ca > t && (t = -Ra + Ca) : t > Ra - Ca && (t = Ra - Ca);
+            var e = o / Math.pow(u(t), i);
+            return [e * Math.sin(i * n), o - e * Math.cos(i * n)]
+        }
+
+        var r = Math.cos(n), u = function (n) {
+            return Math.tan(qa / 4 + n / 2)
+        }, i = n === t ? Math.sin(n) : Math.log(r / Math.cos(t)) / Math.log(u(t) / u(n)), o = r * Math.pow(u(n), i) / i;
+        return i ? (e.invert = function (n, t) {
+            var e = o - t, r = K(i) * Math.sqrt(n * n + e * e);
+            return [Math.atan2(n, e) / i, 2 * Math.atan(Math.pow(o / r, 1 / i)) - Ra]
+        }, e) : Sr
+    }
+
+    function wr(n, t) {
+        function e(n, t) {
+            var e = i - t;
+            return [e * Math.sin(u * n), i - e * Math.cos(u * n)]
+        }
+
+        var r = Math.cos(n), u = n === t ? Math.sin(n) : (r - Math.cos(t)) / (t - n), i = r / u + n;
+        return ga(u) < Ca ? ar : (e.invert = function (n, t) {
+            var e = i - t;
+            return [Math.atan2(n, e) / u, i - K(u) * Math.sqrt(n * n + e * e)]
+        }, e)
+    }
+
+    function Sr(n, t) {
+        return [n, Math.log(Math.tan(qa / 4 + t / 2))]
+    }
+
+    function kr(n) {
+        var t, e = ur(n), r = e.scale, u = e.translate, i = e.clipExtent;
+        return e.scale = function () {
+            var n = r.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.translate = function () {
+            var n = u.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.clipExtent = function (n) {
+            var o = i.apply(e, arguments);
+            if (o === e) {
+                if (t = null == n) {
+                    var a = qa * r(), c = u();
+                    i([[c[0] - a, c[1] - a], [c[0] + a, c[1] + a]])
+                }
+            } else t && (o = null);
+            return o
+        }, e.clipExtent(null)
+    }
+
+    function Er(n, t) {
+        return [Math.log(Math.tan(qa / 4 + t / 2)), -n]
+    }
+
+    function Ar(n) {
+        return n[0]
+    }
+
+    function Nr(n) {
+        return n[1]
+    }
+
+    function Cr(n) {
+        for (var t = n.length, e = [0, 1], r = 2, u = 2; t > u; u++) {
+            for (; r > 1 && Q(n[e[r - 2]], n[e[r - 1]], n[u]) <= 0;)--r;
+            e[r++] = u
+        }
+        return e.slice(0, r)
+    }
+
+    function zr(n, t) {
+        return n[0] - t[0] || n[1] - t[1]
+    }
+
+    function qr(n, t, e) {
+        return (e[0] - t[0]) * (n[1] - t[1]) < (e[1] - t[1]) * (n[0] - t[0])
+    }
+
+    function Lr(n, t, e, r) {
+        var u = n[0], i = e[0], o = t[0] - u, a = r[0] - i, c = n[1], l = e[1], s = t[1] - c, f = r[1] - l, h = (a * (c - l) - f * (u - i)) / (f * o - a * s);
+        return [u + h * o, c + h * s]
+    }
+
+    function Tr(n) {
+        var t = n[0], e = n[n.length - 1];
+        return !(t[0] - e[0] || t[1] - e[1])
+    }
+
+    function Rr() {
+        tu(this), this.edge = this.site = this.circle = null
+    }
+
+    function Dr(n) {
+        var t = el.pop() || new Rr;
+        return t.site = n, t
+    }
+
+    function Pr(n) {
+        Xr(n), Qc.remove(n), el.push(n), tu(n)
+    }
+
+    function Ur(n) {
+        var t = n.circle, e = t.x, r = t.cy, u = {x: e, y: r}, i = n.P, o = n.N, a = [n];
+        Pr(n);
+        for (var c = i; c.circle && ga(e - c.circle.x) < Ca && ga(r - c.circle.cy) < Ca;)i = c.P, a.unshift(c), Pr(c), c = i;
+        a.unshift(c), Xr(c);
+        for (var l = o; l.circle && ga(e - l.circle.x) < Ca && ga(r - l.circle.cy) < Ca;)o = l.N, a.push(l), Pr(l), l = o;
+        a.push(l), Xr(l);
+        var s, f = a.length;
+        for (s = 1; f > s; ++s)l = a[s], c = a[s - 1], Kr(l.edge, c.site, l.site, u);
+        c = a[0], l = a[f - 1], l.edge = Jr(c.site, l.site, null, u), Vr(c), Vr(l)
+    }
+
+    function jr(n) {
+        for (var t, e, r, u, i = n.x, o = n.y, a = Qc._; a;)if (r = Fr(a, o) - i, r > Ca)a = a.L; else {
+            if (u = i - Hr(a, o), !(u > Ca)) {
+                r > -Ca ? (t = a.P, e = a) : u > -Ca ? (t = a, e = a.N) : t = e = a;
+                break
+            }
+            if (!a.R) {
+                t = a;
+                break
+            }
+            a = a.R
+        }
+        var c = Dr(n);
+        if (Qc.insert(t, c), t || e) {
+            if (t === e)return Xr(t), e = Dr(t.site), Qc.insert(c, e), c.edge = e.edge = Jr(t.site, c.site), Vr(t), void Vr(e);
+            if (!e)return void(c.edge = Jr(t.site, c.site));
+            Xr(t), Xr(e);
+            var l = t.site, s = l.x, f = l.y, h = n.x - s, g = n.y - f, p = e.site, v = p.x - s, d = p.y - f, m = 2 * (h * d - g * v), y = h * h + g * g, M = v * v + d * d, x = {
+                x: (d * y - g * M) / m + s,
+                y: (h * M - v * y) / m + f
+            };
+            Kr(e.edge, l, p, x), c.edge = Jr(l, n, null, x), e.edge = Jr(n, p, null, x), Vr(t), Vr(e)
+        }
+    }
+
+    function Fr(n, t) {
+        var e = n.site, r = e.x, u = e.y, i = u - t;
+        if (!i)return r;
+        var o = n.P;
+        if (!o)return -1 / 0;
+        e = o.site;
+        var a = e.x, c = e.y, l = c - t;
+        if (!l)return a;
+        var s = a - r, f = 1 / i - 1 / l, h = s / l;
+        return f ? (-h + Math.sqrt(h * h - 2 * f * (s * s / (-2 * l) - c + l / 2 + u - i / 2))) / f + r : (r + a) / 2
+    }
+
+    function Hr(n, t) {
+        var e = n.N;
+        if (e)return Fr(e, t);
+        var r = n.site;
+        return r.y === t ? r.x : 1 / 0
+    }
+
+    function Or(n) {
+        this.site = n, this.edges = []
+    }
+
+    function Ir(n) {
+        for (var t, e, r, u, i, o, a, c, l, s, f = n[0][0], h = n[1][0], g = n[0][1], p = n[1][1], v = Kc, d = v.length; d--;)if (i = v[d], i && i.prepare())for (a = i.edges, c = a.length, o = 0; c > o;)s = a[o].end(), r = s.x, u = s.y, l = a[++o % c].start(), t = l.x, e = l.y, (ga(r - t) > Ca || ga(u - e) > Ca) && (a.splice(o, 0, new Qr(Gr(i.site, s, ga(r - f) < Ca && p - u > Ca ? {
+            x: f,
+            y: ga(t - f) < Ca ? e : p
+        } : ga(u - p) < Ca && h - r > Ca ? {x: ga(e - p) < Ca ? t : h, y: p} : ga(r - h) < Ca && u - g > Ca ? {
+            x: h,
+            y: ga(t - h) < Ca ? e : g
+        } : ga(u - g) < Ca && r - f > Ca ? {x: ga(e - g) < Ca ? t : f, y: g} : null), i.site, null)), ++c)
+    }
+
+    function Yr(n, t) {
+        return t.angle - n.angle
+    }
+
+    function Zr() {
+        tu(this), this.x = this.y = this.arc = this.site = this.cy = null
+    }
+
+    function Vr(n) {
+        var t = n.P, e = n.N;
+        if (t && e) {
+            var r = t.site, u = n.site, i = e.site;
+            if (r !== i) {
+                var o = u.x, a = u.y, c = r.x - o, l = r.y - a, s = i.x - o, f = i.y - a, h = 2 * (c * f - l * s);
+                if (!(h >= -za)) {
+                    var g = c * c + l * l, p = s * s + f * f, v = (f * g - l * p) / h, d = (c * p - s * g) / h, f = d + a, m = rl.pop() || new Zr;
+                    m.arc = n, m.site = u, m.x = v + o, m.y = f + Math.sqrt(v * v + d * d), m.cy = f, n.circle = m;
+                    for (var y = null, M = tl._; M;)if (m.y < M.y || m.y === M.y && m.x <= M.x) {
+                        if (!M.L) {
+                            y = M.P;
+                            break
+                        }
+                        M = M.L
+                    } else {
+                        if (!M.R) {
+                            y = M;
+                            break
+                        }
+                        M = M.R
+                    }
+                    tl.insert(y, m), y || (nl = m)
+                }
+            }
+        }
+    }
+
+    function Xr(n) {
+        var t = n.circle;
+        t && (t.P || (nl = t.N), tl.remove(t), rl.push(t), tu(t), n.circle = null)
+    }
+
+    function $r(n) {
+        for (var t, e = Gc, r = Oe(n[0][0], n[0][1], n[1][0], n[1][1]), u = e.length; u--;)t = e[u], (!Br(t, n) || !r(t) || ga(t.a.x - t.b.x) < Ca && ga(t.a.y - t.b.y) < Ca) && (t.a = t.b = null, e.splice(u, 1))
+    }
+
+    function Br(n, t) {
+        var e = n.b;
+        if (e)return !0;
+        var r, u, i = n.a, o = t[0][0], a = t[1][0], c = t[0][1], l = t[1][1], s = n.l, f = n.r, h = s.x, g = s.y, p = f.x, v = f.y, d = (h + p) / 2, m = (g + v) / 2;
+        if (v === g) {
+            if (o > d || d >= a)return;
+            if (h > p) {
+                if (i) {
+                    if (i.y >= l)return
+                } else i = {x: d, y: c};
+                e = {x: d, y: l}
+            } else {
+                if (i) {
+                    if (i.y < c)return
+                } else i = {x: d, y: l};
+                e = {x: d, y: c}
+            }
+        } else if (r = (h - p) / (v - g), u = m - r * d, -1 > r || r > 1)if (h > p) {
+            if (i) {
+                if (i.y >= l)return
+            } else i = {x: (c - u) / r, y: c};
+            e = {x: (l - u) / r, y: l}
+        } else {
+            if (i) {
+                if (i.y < c)return
+            } else i = {x: (l - u) / r, y: l};
+            e = {x: (c - u) / r, y: c}
+        } else if (v > g) {
+            if (i) {
+                if (i.x >= a)return
+            } else i = {x: o, y: r * o + u};
+            e = {x: a, y: r * a + u}
+        } else {
+            if (i) {
+                if (i.x < o)return
+            } else i = {x: a, y: r * a + u};
+            e = {x: o, y: r * o + u}
+        }
+        return n.a = i, n.b = e, !0
+    }
+
+    function Wr(n, t) {
+        this.l = n, this.r = t, this.a = this.b = null
+    }
+
+    function Jr(n, t, e, r) {
+        var u = new Wr(n, t);
+        return Gc.push(u), e && Kr(u, n, t, e), r && Kr(u, t, n, r), Kc[n.i].edges.push(new Qr(u, n, t)), Kc[t.i].edges.push(new Qr(u, t, n)), u
+    }
+
+    function Gr(n, t, e) {
+        var r = new Wr(n, null);
+        return r.a = t, r.b = e, Gc.push(r), r
+    }
+
+    function Kr(n, t, e, r) {
+        n.a || n.b ? n.l === e ? n.b = r : n.a = r : (n.a = r, n.l = t, n.r = e)
+    }
+
+    function Qr(n, t, e) {
+        var r = n.a, u = n.b;
+        this.edge = n, this.site = t, this.angle = e ? Math.atan2(e.y - t.y, e.x - t.x) : n.l === t ? Math.atan2(u.x - r.x, r.y - u.y) : Math.atan2(r.x - u.x, u.y - r.y)
+    }
+
+    function nu() {
+        this._ = null
+    }
+
+    function tu(n) {
+        n.U = n.C = n.L = n.R = n.P = n.N = null
+    }
+
+    function eu(n, t) {
+        var e = t, r = t.R, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.R = r.L, e.R && (e.R.U = e), r.L = e
+    }
+
+    function ru(n, t) {
+        var e = t, r = t.L, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.L = r.R, e.L && (e.L.U = e), r.R = e
+    }
+
+    function uu(n) {
+        for (; n.L;)n = n.L;
+        return n
+    }
+
+    function iu(n, t) {
+        var e, r, u, i = n.sort(ou).pop();
+        for (Gc = [], Kc = new Array(n.length), Qc = new nu, tl = new nu; ;)if (u = nl, i && (!u || i.y < u.y || i.y === u.y && i.x < u.x))(i.x !== e || i.y !== r) && (Kc[i.i] = new Or(i), jr(i), e = i.x, r = i.y), i = n.pop(); else {
+            if (!u)break;
+            Ur(u.arc)
+        }
+        t && ($r(t), Ir(t));
+        var o = {cells: Kc, edges: Gc};
+        return Qc = tl = Gc = Kc = null, o
+    }
+
+    function ou(n, t) {
+        return t.y - n.y || t.x - n.x
+    }
+
+    function au(n, t, e) {
+        return (n.x - e.x) * (t.y - n.y) - (n.x - t.x) * (e.y - n.y)
+    }
+
+    function cu(n) {
+        return n.x
+    }
+
+    function lu(n) {
+        return n.y
+    }
+
+    function su() {
+        return {leaf: !0, nodes: [], point: null, x: null, y: null}
+    }
+
+    function fu(n, t, e, r, u, i) {
+        if (!n(t, e, r, u, i)) {
+            var o = .5 * (e + u), a = .5 * (r + i), c = t.nodes;
+            c[0] && fu(n, c[0], e, r, o, a), c[1] && fu(n, c[1], o, r, u, a), c[2] && fu(n, c[2], e, a, o, i), c[3] && fu(n, c[3], o, a, u, i)
+        }
+    }
+
+    function hu(n, t, e, r, u, i, o) {
+        var a, c = 1 / 0;
+        return function l(n, s, f, h, g) {
+            if (!(s > i || f > o || r > h || u > g)) {
+                if (p = n.point) {
+                    var p, v = t - n.x, d = e - n.y, m = v * v + d * d;
+                    if (c > m) {
+                        var y = Math.sqrt(c = m);
+                        r = t - y, u = e - y, i = t + y, o = e + y, a = p
+                    }
+                }
+                for (var M = n.nodes, x = .5 * (s + h), b = .5 * (f + g), _ = t >= x, w = e >= b, S = w << 1 | _, k = S + 4; k > S; ++S)if (n = M[3 & S])switch (3 & S) {
+                    case 0:
+                        l(n, s, f, x, b);
+                        break;
+                    case 1:
+                        l(n, x, f, h, b);
+                        break;
+                    case 2:
+                        l(n, s, b, x, g);
+                        break;
+                    case 3:
+                        l(n, x, b, h, g)
+                }
+            }
+        }(n, r, u, i, o), a
+    }
+
+    function gu(n, t) {
+        n = ta.rgb(n), t = ta.rgb(t);
+        var e = n.r, r = n.g, u = n.b, i = t.r - e, o = t.g - r, a = t.b - u;
+        return function (n) {
+            return "#" + xt(Math.round(e + i * n)) + xt(Math.round(r + o * n)) + xt(Math.round(u + a * n))
+        }
+    }
+
+    function pu(n, t) {
+        var e, r = {}, u = {};
+        for (e in n)e in t ? r[e] = mu(n[e], t[e]) : u[e] = n[e];
+        for (e in t)e in n || (u[e] = t[e]);
+        return function (n) {
+            for (e in r)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function vu(n, t) {
+        return n = +n, t = +t, function (e) {
+            return n * (1 - e) + t * e
+        }
+    }
+
+    function du(n, t) {
+        var e, r, u, i = il.lastIndex = ol.lastIndex = 0, o = -1, a = [], c = [];
+        for (n += "", t += ""; (e = il.exec(n)) && (r = ol.exec(t));)(u = r.index) > i && (u = t.slice(i, u), a[o] ? a[o] += u : a[++o] = u), (e = e[0]) === (r = r[0]) ? a[o] ? a[o] += r : a[++o] = r : (a[++o] = null, c.push({
+            i: o,
+            x: vu(e, r)
+        })), i = ol.lastIndex;
+        return i < t.length && (u = t.slice(i), a[o] ? a[o] += u : a[++o] = u), a.length < 2 ? c[0] ? (t = c[0].x, function (n) {
+            return t(n) + ""
+        }) : function () {
+            return t
+        } : (t = c.length, function (n) {
+            for (var e, r = 0; t > r; ++r)a[(e = c[r]).i] = e.x(n);
+            return a.join("")
+        })
+    }
+
+    function mu(n, t) {
+        for (var e, r = ta.interpolators.length; --r >= 0 && !(e = ta.interpolators[r](n, t)););
+        return e
+    }
+
+    function yu(n, t) {
+        var e, r = [], u = [], i = n.length, o = t.length, a = Math.min(n.length, t.length);
+        for (e = 0; a > e; ++e)r.push(mu(n[e], t[e]));
+        for (; i > e; ++e)u[e] = n[e];
+        for (; o > e; ++e)u[e] = t[e];
+        return function (n) {
+            for (e = 0; a > e; ++e)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function Mu(n) {
+        return function (t) {
+            return 0 >= t ? 0 : t >= 1 ? 1 : n(t)
+        }
+    }
+
+    function xu(n) {
+        return function (t) {
+            return 1 - n(1 - t)
+        }
+    }
+
+    function bu(n) {
+        return function (t) {
+            return .5 * (.5 > t ? n(2 * t) : 2 - n(2 - 2 * t))
+        }
+    }
+
+    function _u(n) {
+        return n * n
+    }
+
+    function wu(n) {
+        return n * n * n
+    }
+
+    function Su(n) {
+        if (0 >= n)return 0;
+        if (n >= 1)return 1;
+        var t = n * n, e = t * n;
+        return 4 * (.5 > n ? e : 3 * (n - t) + e - .75)
+    }
+
+    function ku(n) {
+        return function (t) {
+            return Math.pow(t, n)
+        }
+    }
+
+    function Eu(n) {
+        return 1 - Math.cos(n * Ra)
+    }
+
+    function Au(n) {
+        return Math.pow(2, 10 * (n - 1))
+    }
+
+    function Nu(n) {
+        return 1 - Math.sqrt(1 - n * n)
+    }
+
+    function Cu(n, t) {
+        var e;
+        return arguments.length < 2 && (t = .45), arguments.length ? e = t / La * Math.asin(1 / n) : (n = 1, e = t / 4), function (r) {
+            return 1 + n * Math.pow(2, -10 * r) * Math.sin((r - e) * La / t)
+        }
+    }
+
+    function zu(n) {
+        return n || (n = 1.70158), function (t) {
+            return t * t * ((n + 1) * t - n)
+        }
+    }
+
+    function qu(n) {
+        return 1 / 2.75 > n ? 7.5625 * n * n : 2 / 2.75 > n ? 7.5625 * (n -= 1.5 / 2.75) * n + .75 : 2.5 / 2.75 > n ? 7.5625 * (n -= 2.25 / 2.75) * n + .9375 : 7.5625 * (n -= 2.625 / 2.75) * n + .984375
+    }
+
+    function Lu(n, t) {
+        n = ta.hcl(n), t = ta.hcl(t);
+        var e = n.h, r = n.c, u = n.l, i = t.h - e, o = t.c - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.c : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return st(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Tu(n, t) {
+        n = ta.hsl(n), t = ta.hsl(t);
+        var e = n.h, r = n.s, u = n.l, i = t.h - e, o = t.s - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.s : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return ct(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Ru(n, t) {
+        n = ta.lab(n), t = ta.lab(t);
+        var e = n.l, r = n.a, u = n.b, i = t.l - e, o = t.a - r, a = t.b - u;
+        return function (n) {
+            return ht(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Du(n, t) {
+        return t -= n, function (e) {
+            return Math.round(n + t * e)
+        }
+    }
+
+    function Pu(n) {
+        var t = [n.a, n.b], e = [n.c, n.d], r = ju(t), u = Uu(t, e), i = ju(Fu(e, t, -u)) || 0;
+        t[0] * e[1] < e[0] * t[1] && (t[0] *= -1, t[1] *= -1, r *= -1, u *= -1), this.rotate = (r ? Math.atan2(t[1], t[0]) : Math.atan2(-e[0], e[1])) * Pa, this.translate = [n.e, n.f], this.scale = [r, i], this.skew = i ? Math.atan2(u, i) * Pa : 0
+    }
+
+    function Uu(n, t) {
+        return n[0] * t[0] + n[1] * t[1]
+    }
+
+    function ju(n) {
+        var t = Math.sqrt(Uu(n, n));
+        return t && (n[0] /= t, n[1] /= t), t
+    }
+
+    function Fu(n, t, e) {
+        return n[0] += e * t[0], n[1] += e * t[1], n
+    }
+
+    function Hu(n, t) {
+        var e, r = [], u = [], i = ta.transform(n), o = ta.transform(t), a = i.translate, c = o.translate, l = i.rotate, s = o.rotate, f = i.skew, h = o.skew, g = i.scale, p = o.scale;
+        return a[0] != c[0] || a[1] != c[1] ? (r.push("translate(", null, ",", null, ")"), u.push({
+            i: 1,
+            x: vu(a[0], c[0])
+        }, {
+            i: 3,
+            x: vu(a[1], c[1])
+        })) : r.push(c[0] || c[1] ? "translate(" + c + ")" : ""), l != s ? (l - s > 180 ? s += 360 : s - l > 180 && (l += 360), u.push({
+            i: r.push(r.pop() + "rotate(", null, ")") - 2,
+            x: vu(l, s)
+        })) : s && r.push(r.pop() + "rotate(" + s + ")"), f != h ? u.push({
+            i: r.push(r.pop() + "skewX(", null, ")") - 2,
+            x: vu(f, h)
+        }) : h && r.push(r.pop() + "skewX(" + h + ")"), g[0] != p[0] || g[1] != p[1] ? (e = r.push(r.pop() + "scale(", null, ",", null, ")"), u.push({
+            i: e - 4,
+            x: vu(g[0], p[0])
+        }, {
+            i: e - 2,
+            x: vu(g[1], p[1])
+        })) : (1 != p[0] || 1 != p[1]) && r.push(r.pop() + "scale(" + p + ")"), e = u.length, function (n) {
+            for (var t, i = -1; ++i < e;)r[(t = u[i]).i] = t.x(n);
+            return r.join("")
+        }
+    }
+
+    function Ou(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return (e - n) / t
+        }
+    }
+
+    function Iu(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return Math.max(0, Math.min(1, (e - n) / t))
+        }
+    }
+
+    function Yu(n) {
+        for (var t = n.source, e = n.target, r = Vu(t, e), u = [t]; t !== r;)t = t.parent, u.push(t);
+        for (var i = u.length; e !== r;)u.splice(i, 0, e), e = e.parent;
+        return u
+    }
+
+    function Zu(n) {
+        for (var t = [], e = n.parent; null != e;)t.push(n), n = e, e = e.parent;
+        return t.push(n), t
+    }
+
+    function Vu(n, t) {
+        if (n === t)return n;
+        for (var e = Zu(n), r = Zu(t), u = e.pop(), i = r.pop(), o = null; u === i;)o = u, u = e.pop(), i = r.pop();
+        return o
+    }
+
+    function Xu(n) {
+        n.fixed |= 2
+    }
+
+    function $u(n) {
+        n.fixed &= -7
+    }
+
+    function Bu(n) {
+        n.fixed |= 4, n.px = n.x, n.py = n.y
+    }
+
+    function Wu(n) {
+        n.fixed &= -5
+    }
+
+    function Ju(n, t, e) {
+        var r = 0, u = 0;
+        if (n.charge = 0, !n.leaf)for (var i, o = n.nodes, a = o.length, c = -1; ++c < a;)i = o[c], null != i && (Ju(i, t, e), n.charge += i.charge, r += i.charge * i.cx, u += i.charge * i.cy);
+        if (n.point) {
+            n.leaf || (n.point.x += Math.random() - .5, n.point.y += Math.random() - .5);
+            var l = t * e[n.point.index];
+            n.charge += n.pointCharge = l, r += l * n.point.x, u += l * n.point.y
+        }
+        n.cx = r / n.charge, n.cy = u / n.charge
+    }
+
+    function Gu(n, t) {
+        return ta.rebind(n, t, "sort", "children", "value"), n.nodes = n, n.links = ri, n
+    }
+
+    function Ku(n, t) {
+

<TRUNCATED>

[24/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/bootstrap.min.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/bootstrap.min.css
new file mode 100644
index 0000000..c65f62d
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/css/bootstrap.min.css
@@ -0,0 +1,5935 @@
+/*!
+ * Bootstrap v2.2.1
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+.clearfix {
+    *zoom: 1;
+}
+
+.clearfix:before, .clearfix:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.clearfix:after {
+    clear: both;
+}
+
+.hide-text {
+    font: 0/0 a;
+    color: transparent;
+    text-shadow: none;
+    background-color: transparent;
+    border: 0;
+}
+
+.input-block-level {
+    display: block;
+    width: 100%;
+    min-height: 30px;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+
+article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {
+    display: block;
+}
+
+audio, canvas, video {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+}
+
+audio:not([controls]) {
+    display: none;
+}
+
+html {
+    font-size: 100%;
+    -webkit-text-size-adjust: 100%;
+    -ms-text-size-adjust: 100%;
+}
+
+a:focus {
+    outline: thin dotted #333;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+
+a:hover, a:active {
+    outline: 0;
+}
+
+sub, sup {
+    position: relative;
+    font-size: 75%;
+    line-height: 0;
+    vertical-align: baseline;
+}
+
+sup {
+    top: -0.5em;
+}
+
+sub {
+    bottom: -0.25em;
+}
+
+img {
+    max-width: 100%;
+    width: auto \9;
+    height: auto;
+    vertical-align: middle;
+    border: 0;
+    -ms-interpolation-mode: bicubic;
+}
+
+#map_canvas img, .google-maps img {
+    max-width: none;
+}
+
+button, input, select, textarea {
+    margin: 0;
+    font-size: 100%;
+    vertical-align: middle;
+}
+
+button, input {
+    *overflow: visible;
+    line-height: normal;
+}
+
+button::-moz-focus-inner, input::-moz-focus-inner {
+    padding: 0;
+    border: 0;
+}
+
+button, html input[type="button"], input[type="reset"], input[type="submit"] {
+    -webkit-appearance: button;
+    cursor: pointer;
+}
+
+input[type="search"] {
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+    -webkit-appearance: textfield;
+}
+
+input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button {
+    -webkit-appearance: none;
+}
+
+textarea {
+    overflow: auto;
+    vertical-align: top;
+}
+
+body {
+    margin: 0;
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+    font-size: 14px;
+    line-height: 20px;
+    color: #333333;
+    background-color: #ffffff;
+}
+
+a {
+    color: #0088cc;
+    text-decoration: none;
+}
+
+a:hover {
+    color: #005580;
+    text-decoration: underline;
+}
+
+.img-rounded {
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.img-polaroid {
+    padding: 4px;
+    background-color: #fff;
+    border: 1px solid #ccc;
+    border: 1px solid rgba(0, 0, 0, 0.2);
+    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+    -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+
+.img-circle {
+    -webkit-border-radius: 500px;
+    -moz-border-radius: 500px;
+    border-radius: 500px;
+}
+
+.row {
+    margin-left: -20px;
+    *zoom: 1;
+}
+
+.row:before, .row:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.row:after {
+    clear: both;
+}
+
+[class*="span"] {
+    float: left;
+    min-height: 1px;
+    margin-left: 20px;
+}
+
+.container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
+    width: 940px;
+}
+
+.span12 {
+    width: 940px;
+}
+
+.span11 {
+    width: 860px;
+}
+
+.span10 {
+    width: 780px;
+}
+
+.span9 {
+    width: 700px;
+}
+
+.span8 {
+    width: 620px;
+}
+
+.span7 {
+    width: 540px;
+}
+
+.span6 {
+    width: 460px;
+}
+
+.span5 {
+    width: 380px;
+}
+
+.span4 {
+    width: 300px;
+}
+
+.span3 {
+    width: 220px;
+}
+
+.span2 {
+    width: 140px;
+}
+
+.span1 {
+    width: 60px;
+}
+
+.offset12 {
+    margin-left: 980px;
+}
+
+.offset11 {
+    margin-left: 900px;
+}
+
+.offset10 {
+    margin-left: 820px;
+}
+
+.offset9 {
+    margin-left: 740px;
+}
+
+.offset8 {
+    margin-left: 660px;
+}
+
+.offset7 {
+    margin-left: 580px;
+}
+
+.offset6 {
+    margin-left: 500px;
+}
+
+.offset5 {
+    margin-left: 420px;
+}
+
+.offset4 {
+    margin-left: 340px;
+}
+
+.offset3 {
+    margin-left: 260px;
+}
+
+.offset2 {
+    margin-left: 180px;
+}
+
+.offset1 {
+    margin-left: 100px;
+}
+
+.row-fluid {
+    width: 100%;
+    *zoom: 1;
+}
+
+.row-fluid:before, .row-fluid:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.row-fluid:after {
+    clear: both;
+}
+
+.row-fluid [class*="span"] {
+    display: block;
+    width: 100%;
+    min-height: 30px;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+    float: left;
+    margin-left: 2.127659574468085%;
+    *margin-left: 2.074468085106383%;
+}
+
+.row-fluid [class*="span"]:first-child {
+    margin-left: 0;
+}
+
+.row-fluid .controls-row [class*="span"] + [class*="span"] {
+    margin-left: 2.127659574468085%;
+}
+
+.row-fluid .span12 {
+    width: 100%;
+    *width: 99.94680851063829%;
+}
+
+.row-fluid .span11 {
+    width: 91.48936170212765%;
+    *width: 91.43617021276594%;
+}
+
+.row-fluid .span10 {
+    width: 82.97872340425532%;
+    *width: 82.92553191489361%;
+}
+
+.row-fluid .span9 {
+    width: 74.46808510638297%;
+    *width: 74.41489361702126%;
+}
+
+.row-fluid .span8 {
+    width: 65.95744680851064%;
+    *width: 65.90425531914893%;
+}
+
+.row-fluid .span7 {
+    width: 57.44680851063829%;
+    *width: 57.39361702127659%;
+}
+
+.row-fluid .span6 {
+    width: 48.93617021276595%;
+    *width: 48.88297872340425%;
+}
+
+.row-fluid .span5 {
+    width: 40.42553191489362%;
+    *width: 40.37234042553192%;
+}
+
+.row-fluid .span4 {
+    width: 31.914893617021278%;
+    *width: 31.861702127659576%;
+}
+
+.row-fluid .span3 {
+    width: 23.404255319148934%;
+    *width: 23.351063829787233%;
+}
+
+.row-fluid .span2 {
+    width: 14.893617021276595%;
+    *width: 14.840425531914894%;
+}
+
+.row-fluid .span1 {
+    width: 6.382978723404255%;
+    *width: 6.329787234042553%;
+}
+
+.row-fluid .offset12 {
+    margin-left: 104.25531914893617%;
+    *margin-left: 104.14893617021275%;
+}
+
+.row-fluid .offset12:first-child {
+    margin-left: 102.12765957446808%;
+    *margin-left: 102.02127659574467%;
+}
+
+.row-fluid .offset11 {
+    margin-left: 95.74468085106382%;
+    *margin-left: 95.6382978723404%;
+}
+
+.row-fluid .offset11:first-child {
+    margin-left: 93.61702127659574%;
+    *margin-left: 93.51063829787232%;
+}
+
+.row-fluid .offset10 {
+    margin-left: 87.23404255319149%;
+    *margin-left: 87.12765957446807%;
+}
+
+.row-fluid .offset10:first-child {
+    margin-left: 85.1063829787234%;
+    *margin-left: 84.99999999999999%;
+}
+
+.row-fluid .offset9 {
+    margin-left: 78.72340425531914%;
+    *margin-left: 78.61702127659572%;
+}
+
+.row-fluid .offset9:first-child {
+    margin-left: 76.59574468085106%;
+    *margin-left: 76.48936170212764%;
+}
+
+.row-fluid .offset8 {
+    margin-left: 70.2127659574468%;
+    *margin-left: 70.10638297872339%;
+}
+
+.row-fluid .offset8:first-child {
+    margin-left: 68.08510638297872%;
+    *margin-left: 67.9787234042553%;
+}
+
+.row-fluid .offset7 {
+    margin-left: 61.70212765957446%;
+    *margin-left: 61.59574468085106%;
+}
+
+.row-fluid .offset7:first-child {
+    margin-left: 59.574468085106375%;
+    *margin-left: 59.46808510638297%;
+}
+
+.row-fluid .offset6 {
+    margin-left: 53.191489361702125%;
+    *margin-left: 53.085106382978715%;
+}
+
+.row-fluid .offset6:first-child {
+    margin-left: 51.063829787234035%;
+    *margin-left: 50.95744680851063%;
+}
+
+.row-fluid .offset5 {
+    margin-left: 44.68085106382979%;
+    *margin-left: 44.57446808510638%;
+}
+
+.row-fluid .offset5:first-child {
+    margin-left: 42.5531914893617%;
+    *margin-left: 42.4468085106383%;
+}
+
+.row-fluid .offset4 {
+    margin-left: 36.170212765957444%;
+    *margin-left: 36.06382978723405%;
+}
+
+.row-fluid .offset4:first-child {
+    margin-left: 34.04255319148936%;
+    *margin-left: 33.93617021276596%;
+}
+
+.row-fluid .offset3 {
+    margin-left: 27.659574468085104%;
+    *margin-left: 27.5531914893617%;
+}
+
+.row-fluid .offset3:first-child {
+    margin-left: 25.53191489361702%;
+    *margin-left: 25.425531914893618%;
+}
+
+.row-fluid .offset2 {
+    margin-left: 19.148936170212764%;
+    *margin-left: 19.04255319148936%;
+}
+
+.row-fluid .offset2:first-child {
+    margin-left: 17.02127659574468%;
+    *margin-left: 16.914893617021278%;
+}
+
+.row-fluid .offset1 {
+    margin-left: 10.638297872340425%;
+    *margin-left: 10.53191489361702%;
+}
+
+.row-fluid .offset1:first-child {
+    margin-left: 8.51063829787234%;
+    *margin-left: 8.404255319148938%;
+}
+
+[class*="span"].hide, .row-fluid [class*="span"].hide {
+    display: none;
+}
+
+[class*="span"].pull-right, .row-fluid [class*="span"].pull-right {
+    float: right;
+}
+
+.container {
+    margin-right: auto;
+    margin-left: auto;
+    *zoom: 1;
+}
+
+.container:before, .container:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.container:after {
+    clear: both;
+}
+
+.container-fluid {
+    padding-right: 20px;
+    padding-left: 20px;
+    *zoom: 1;
+}
+
+.container-fluid:before, .container-fluid:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.container-fluid:after {
+    clear: both;
+}
+
+p {
+    margin: 0 0 10px;
+}
+
+.lead {
+    margin-bottom: 20px;
+    font-size: 21px;
+    font-weight: 200;
+    line-height: 30px;
+}
+
+small {
+    font-size: 85%;
+}
+
+strong {
+    font-weight: bold;
+}
+
+em {
+    font-style: italic;
+}
+
+cite {
+    font-style: normal;
+}
+
+.muted {
+    color: #999999;
+}
+
+.text-warning {
+    color: #c09853;
+}
+
+a.text-warning:hover {
+    color: #a47e3c;
+}
+
+.text-error {
+    color: #b94a48;
+}
+
+a.text-error:hover {
+    color: #953b39;
+}
+
+.text-info {
+    color: #3a87ad;
+}
+
+a.text-info:hover {
+    color: #2d6987;
+}
+
+.text-success {
+    color: #468847;
+}
+
+a.text-success:hover {
+    color: #356635;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 10px 0;
+    font-family: inherit;
+    font-weight: bold;
+    line-height: 20px;
+    color: inherit;
+    text-rendering: optimizelegibility;
+}
+
+h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
+    font-weight: normal;
+    line-height: 1;
+    color: #999999;
+}
+
+h1, h2, h3 {
+    line-height: 40px;
+}
+
+h1 {
+    font-size: 38.5px;
+}
+
+h2 {
+    font-size: 31.5px;
+}
+
+h3 {
+    font-size: 24.5px;
+}
+
+h4 {
+    font-size: 17.5px;
+}
+
+h5 {
+    font-size: 14px;
+}
+
+h6 {
+    font-size: 11.9px;
+}
+
+h1 small {
+    font-size: 24.5px;
+}
+
+h2 small {
+    font-size: 17.5px;
+}
+
+h3 small {
+    font-size: 14px;
+}
+
+h4 small {
+    font-size: 14px;
+}
+
+.page-header {
+    padding-bottom: 9px;
+    margin: 20px 0 30px;
+    border-bottom: 1px solid #eeeeee;
+}
+
+ul, ol {
+    padding: 0;
+    margin: 0 0 10px 25px;
+}
+
+ul ul, ul ol, ol ol, ol ul {
+    margin-bottom: 0;
+}
+
+li {
+    line-height: 20px;
+}
+
+ul.unstyled, ol.unstyled {
+    margin-left: 0;
+    list-style: none;
+}
+
+dl {
+    margin-bottom: 20px;
+}
+
+dt, dd {
+    line-height: 20px;
+}
+
+dt {
+    font-weight: bold;
+}
+
+dd {
+    margin-left: 10px;
+}
+
+.dl-horizontal {
+    *zoom: 1;
+}
+
+.dl-horizontal:before, .dl-horizontal:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.dl-horizontal:after {
+    clear: both;
+}
+
+.dl-horizontal dt {
+    float: left;
+    width: 160px;
+    clear: left;
+    text-align: right;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+
+.dl-horizontal dd {
+    margin-left: 180px;
+}
+
+hr {
+    margin: 20px 0;
+    border: 0;
+    border-top: 1px solid #eeeeee;
+    border-bottom: 1px solid #ffffff;
+}
+
+abbr[title], abbr[data-original-title] {
+    cursor: help;
+    border-bottom: 1px dotted #999999;
+}
+
+abbr.initialism {
+    font-size: 90%;
+    text-transform: uppercase;
+}
+
+blockquote {
+    padding: 0 0 0 15px;
+    margin: 0 0 20px;
+    border-left: 5px solid #eeeeee;
+}
+
+blockquote p {
+    margin-bottom: 0;
+    font-size: 16px;
+    font-weight: 300;
+    line-height: 25px;
+}
+
+blockquote small {
+    display: block;
+    line-height: 20px;
+    color: #999999;
+}
+
+blockquote small:before {
+    content: '\2014 \00A0';
+}
+
+blockquote.pull-right {
+    float: right;
+    padding-right: 15px;
+    padding-left: 0;
+    border-right: 5px solid #eeeeee;
+    border-left: 0;
+}
+
+blockquote.pull-right p, blockquote.pull-right small {
+    text-align: right;
+}
+
+blockquote.pull-right small:before {
+    content: '';
+}
+
+blockquote.pull-right small:after {
+    content: '\00A0 \2014';
+}
+
+q:before, q:after, blockquote:before, blockquote:after {
+    content: "";
+}
+
+address {
+    display: block;
+    margin-bottom: 20px;
+    font-style: normal;
+    line-height: 20px;
+}
+
+code, pre {
+    padding: 0 3px 2px;
+    font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
+    font-size: 12px;
+    color: #333333;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+code {
+    padding: 2px 4px;
+    color: #d14;
+    background-color: #f7f7f9;
+    border: 1px solid #e1e1e8;
+}
+
+pre {
+    display: block;
+    padding: 9.5px;
+    margin: 0 0 10px;
+    font-size: 13px;
+    line-height: 20px;
+    word-break: break-all;
+    word-wrap: break-word;
+    white-space: pre;
+    white-space: pre-wrap;
+    background-color: #f5f5f5;
+    border: 1px solid #ccc;
+    border: 1px solid rgba(0, 0, 0, 0.15);
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+pre.prettyprint {
+    margin-bottom: 20px;
+}
+
+pre code {
+    padding: 0;
+    color: inherit;
+    background-color: transparent;
+    border: 0;
+}
+
+.pre-scrollable {
+    max-height: 340px;
+    overflow-y: scroll;
+}
+
+.label, .badge {
+    display: inline-block;
+    padding: 2px 4px;
+    font-size: 11.844px;
+    font-weight: bold;
+    line-height: 14px;
+    color: #ffffff;
+    vertical-align: baseline;
+    white-space: nowrap;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #999999;
+}
+
+.label {
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+.badge {
+    padding-left: 9px;
+    padding-right: 9px;
+    -webkit-border-radius: 9px;
+    -moz-border-radius: 9px;
+    border-radius: 9px;
+}
+
+a.label:hover, a.badge:hover {
+    color: #ffffff;
+    text-decoration: none;
+    cursor: pointer;
+}
+
+.label-important, .badge-important {
+    background-color: #b94a48;
+}
+
+.label-important[href], .badge-important[href] {
+    background-color: #953b39;
+}
+
+.label-warning, .badge-warning {
+    background-color: #f89406;
+}
+
+.label-warning[href], .badge-warning[href] {
+    background-color: #c67605;
+}
+
+.label-success, .badge-success {
+    background-color: #468847;
+}
+
+.label-success[href], .badge-success[href] {
+    background-color: #356635;
+}
+
+.label-info, .badge-info {
+    background-color: #3a87ad;
+}
+
+.label-info[href], .badge-info[href] {
+    background-color: #2d6987;
+}
+
+.label-inverse, .badge-inverse {
+    background-color: #333333;
+}
+
+.label-inverse[href], .badge-inverse[href] {
+    background-color: #1a1a1a;
+}
+
+.btn .label, .btn .badge {
+    position: relative;
+    top: -1px;
+}
+
+.btn-mini .label, .btn-mini .badge {
+    top: 0;
+}
+
+table {
+    max-width: 100%;
+    background-color: transparent;
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+.table {
+    width: 100%;
+    margin-bottom: 20px;
+}
+
+.table th, .table td {
+    padding: 8px;
+    line-height: 20px;
+    text-align: left;
+    vertical-align: top;
+    border-top: 1px solid #dddddd;
+}
+
+.table th {
+    font-weight: bold;
+}
+
+.table thead th {
+    vertical-align: bottom;
+}
+
+.table caption + thead tr:first-child th, .table caption + thead tr:first-child td, .table colgroup + thead tr:first-child th, .table colgroup + thead tr:first-child td, .table thead:first-child tr:first-child th, .table thead:first-child tr:first-child td {
+    border-top: 0;
+}
+
+.table tbody + tbody {
+    border-top: 2px solid #dddddd;
+}
+
+.table-condensed th, .table-condensed td {
+    padding: 4px 5px;
+}
+
+.table-bordered {
+    border: 1px solid #dddddd;
+    border-collapse: separate;
+    *border-collapse: collapse;
+    border-left: 0;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.table-bordered th, .table-bordered td {
+    border-left: 1px solid #dddddd;
+}
+
+.table-bordered caption + thead tr:first-child th, .table-bordered caption + tbody tr:first-child th, .table-bordered caption + tbody tr:first-child td, .table-bordered colgroup + thead tr:first-child th, .table-bordered colgroup + tbody tr:first-child th, .table-bordered colgroup + tbody tr:first-child td, .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td {
+    border-top: 0;
+}
+
+.table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child {
+    -webkit-border-top-left-radius: 4px;
+    border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child {
+    -webkit-border-top-right-radius: 4px;
+    border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child, .table-bordered tfoot:last-child tr:last-child td:first-child {
+    -webkit-border-radius: 0 0 0 4px;
+    -moz-border-radius: 0 0 0 4px;
+    border-radius: 0 0 0 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+}
+
+.table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child, .table-bordered tfoot:last-child tr:last-child td:last-child {
+    -webkit-border-bottom-right-radius: 4px;
+    border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+}
+
+.table-bordered caption + thead tr:first-child th:first-child, .table-bordered caption + tbody tr:first-child td:first-child, .table-bordered colgroup + thead tr:first-child th:first-child, .table-bordered colgroup + tbody tr:first-child td:first-child {
+    -webkit-border-top-left-radius: 4px;
+    border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+}
+
+.table-bordered caption + thead tr:first-child th:last-child, .table-bordered caption + tbody tr:first-child td:last-child, .table-bordered colgroup + thead tr:first-child th:last-child, .table-bordered colgroup + tbody tr:first-child td:last-child {
+    -webkit-border-top-right-radius: 4px;
+    border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+}
+
+.table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th {
+    background-color: #f9f9f9;
+}
+
+.table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
+    background-color: #f5f5f5;
+}
+
+table td[class*="span"], table th[class*="span"], .row-fluid table td[class*="span"], .row-fluid table th[class*="span"] {
+    display: table-cell;
+    float: none;
+    margin-left: 0;
+}
+
+.table td.span1, .table th.span1 {
+    float: none;
+    width: 44px;
+    margin-left: 0;
+}
+
+.table td.span2, .table th.span2 {
+    float: none;
+    width: 124px;
+    margin-left: 0;
+}
+
+.table td.span3, .table th.span3 {
+    float: none;
+    width: 204px;
+    margin-left: 0;
+}
+
+.table td.span4, .table th.span4 {
+    float: none;
+    width: 284px;
+    margin-left: 0;
+}
+
+.table td.span5, .table th.span5 {
+    float: none;
+    width: 364px;
+    margin-left: 0;
+}
+
+.table td.span6, .table th.span6 {
+    float: none;
+    width: 444px;
+    margin-left: 0;
+}
+
+.table td.span7, .table th.span7 {
+    float: none;
+    width: 524px;
+    margin-left: 0;
+}
+
+.table td.span8, .table th.span8 {
+    float: none;
+    width: 604px;
+    margin-left: 0;
+}
+
+.table td.span9, .table th.span9 {
+    float: none;
+    width: 684px;
+    margin-left: 0;
+}
+
+.table td.span10, .table th.span10 {
+    float: none;
+    width: 764px;
+    margin-left: 0;
+}
+
+.table td.span11, .table th.span11 {
+    float: none;
+    width: 844px;
+    margin-left: 0;
+}
+
+.table td.span12, .table th.span12 {
+    float: none;
+    width: 924px;
+    margin-left: 0;
+}
+
+.table tbody tr.success td {
+    background-color: #dff0d8;
+}
+
+.table tbody tr.error td {
+    background-color: #f2dede;
+}
+
+.table tbody tr.warning td {
+    background-color: #fcf8e3;
+}
+
+.table tbody tr.info td {
+    background-color: #d9edf7;
+}
+
+.table-hover tbody tr.success:hover td {
+    background-color: #d0e9c6;
+}
+
+.table-hover tbody tr.error:hover td {
+    background-color: #ebcccc;
+}
+
+.table-hover tbody tr.warning:hover td {
+    background-color: #faf2cc;
+}
+
+.table-hover tbody tr.info:hover td {
+    background-color: #c4e3f3;
+}
+
+form {
+    margin: 0 0 20px;
+}
+
+fieldset {
+    padding: 0;
+    margin: 0;
+    border: 0;
+}
+
+legend {
+    display: block;
+    width: 100%;
+    padding: 0;
+    margin-bottom: 20px;
+    font-size: 21px;
+    line-height: 40px;
+    color: #333333;
+    border: 0;
+    border-bottom: 1px solid #e5e5e5;
+}
+
+legend small {
+    font-size: 15px;
+    color: #999999;
+}
+
+label, input, button, select, textarea {
+    font-size: 14px;
+    font-weight: normal;
+    line-height: 20px;
+}
+
+input, button, select, textarea {
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+label {
+    display: block;
+    margin-bottom: 5px;
+}
+
+select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
+    display: inline-block;
+    height: 20px;
+    padding: 4px 6px;
+    margin-bottom: 10px;
+    font-size: 14px;
+    line-height: 20px;
+    color: #555555;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    vertical-align: middle;
+}
+
+input, textarea, .uneditable-input {
+    width: 206px;
+}
+
+textarea {
+    height: auto;
+}
+
+textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
+    background-color: #ffffff;
+    border: 1px solid #cccccc;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -webkit-transition: border linear .2s, box-shadow linear .2s;
+    -moz-transition: border linear .2s, box-shadow linear .2s;
+    -o-transition: border linear .2s, box-shadow linear .2s;
+    transition: border linear .2s, box-shadow linear .2s;
+}
+
+textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus {
+    border-color: rgba(82, 168, 236, 0.8);
+    outline: 0;
+    outline: thin dotted \9;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(82, 168, 236, .6);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(82, 168, 236, .6);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(82, 168, 236, .6);
+}
+
+input[type="radio"], input[type="checkbox"] {
+    margin: 4px 0 0;
+    *margin-top: 0;
+    margin-top: 1px \9;
+    line-height: normal;
+    cursor: pointer;
+}
+
+input[type="file"], input[type="image"], input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"] {
+    width: auto;
+}
+
+select, input[type="file"] {
+    height: 30px;
+    *margin-top: 4px;
+    line-height: 30px;
+}
+
+select {
+    width: 220px;
+    border: 1px solid #cccccc;
+    background-color: #ffffff;
+}
+
+select[multiple], select[size] {
+    height: auto;
+}
+
+select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus {
+    outline: thin dotted #333;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+
+.uneditable-input, .uneditable-textarea {
+    color: #999999;
+    background-color: #fcfcfc;
+    border-color: #cccccc;
+    -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+    -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
+    cursor: not-allowed;
+}
+
+.uneditable-input {
+    overflow: hidden;
+    white-space: nowrap;
+}
+
+.uneditable-textarea {
+    width: auto;
+    height: auto;
+}
+
+input:-moz-placeholder, textarea:-moz-placeholder {
+    color: #999999;
+}
+
+input:-ms-input-placeholder, textarea:-ms-input-placeholder {
+    color: #999999;
+}
+
+input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
+    color: #999999;
+}
+
+.radio, .checkbox {
+    min-height: 20px;
+    padding-left: 20px;
+}
+
+.radio input[type="radio"], .checkbox input[type="checkbox"] {
+    float: left;
+    margin-left: -20px;
+}
+
+.controls > .radio:first-child, .controls > .checkbox:first-child {
+    padding-top: 5px;
+}
+
+.radio.inline, .checkbox.inline {
+    display: inline-block;
+    padding-top: 5px;
+    margin-bottom: 0;
+    vertical-align: middle;
+}
+
+.radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
+    margin-left: 10px;
+}
+
+.input-mini {
+    width: 60px;
+}
+
+.input-small {
+    width: 90px;
+}
+
+.input-medium {
+    width: 150px;
+}
+
+.input-large {
+    width: 210px;
+}
+
+.input-xlarge {
+    width: 270px;
+}
+
+.input-xxlarge {
+    width: 530px;
+}
+
+input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"] {
+    float: none;
+    margin-left: 0;
+}
+
+.input-append input[class*="span"], .input-append .uneditable-input[class*="span"], .input-prepend input[class*="span"], .input-prepend .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"], .row-fluid .input-prepend [class*="span"], .row-fluid .input-append [class*="span"] {
+    display: inline-block;
+}
+
+input, textarea, .uneditable-input {
+    margin-left: 0;
+}
+
+.controls-row [class*="span"] + [class*="span"] {
+    margin-left: 20px;
+}
+
+input.span12, textarea.span12, .uneditable-input.span12 {
+    width: 926px;
+}
+
+input.span11, textarea.span11, .uneditable-input.span11 {
+    width: 846px;
+}
+
+input.span10, textarea.span10, .uneditable-input.span10 {
+    width: 766px;
+}
+
+input.span9, textarea.span9, .uneditable-input.span9 {
+    width: 686px;
+}
+
+input.span8, textarea.span8, .uneditable-input.span8 {
+    width: 606px;
+}
+
+input.span7, textarea.span7, .uneditable-input.span7 {
+    width: 526px;
+}
+
+input.span6, textarea.span6, .uneditable-input.span6 {
+    width: 446px;
+}
+
+input.span5, textarea.span5, .uneditable-input.span5 {
+    width: 366px;
+}
+
+input.span4, textarea.span4, .uneditable-input.span4 {
+    width: 286px;
+}
+
+input.span3, textarea.span3, .uneditable-input.span3 {
+    width: 206px;
+}
+
+input.span2, textarea.span2, .uneditable-input.span2 {
+    width: 126px;
+}
+
+input.span1, textarea.span1, .uneditable-input.span1 {
+    width: 46px;
+}
+
+.controls-row {
+    *zoom: 1;
+}
+
+.controls-row:before, .controls-row:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.controls-row:after {
+    clear: both;
+}
+
+.controls-row [class*="span"], .row-fluid .controls-row [class*="span"] {
+    float: left;
+}
+
+.controls-row .checkbox[class*="span"], .controls-row .radio[class*="span"] {
+    padding-top: 5px;
+}
+
+input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
+    cursor: not-allowed;
+    background-color: #eeeeee;
+}
+
+input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"][readonly], input[type="checkbox"][readonly] {
+    background-color: transparent;
+}
+
+.control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline {
+    color: #c09853;
+}
+
+.control-group.warning .checkbox, .control-group.warning .radio, .control-group.warning input, .control-group.warning select, .control-group.warning textarea {
+    color: #c09853;
+}
+
+.control-group.warning input, .control-group.warning select, .control-group.warning textarea {
+    border-color: #c09853;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus {
+    border-color: #a47e3c;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
+}
+
+.control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on {
+    color: #c09853;
+    background-color: #fcf8e3;
+    border-color: #c09853;
+}
+
+.control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline {
+    color: #b94a48;
+}
+
+.control-group.error .checkbox, .control-group.error .radio, .control-group.error input, .control-group.error select, .control-group.error textarea {
+    color: #b94a48;
+}
+
+.control-group.error input, .control-group.error select, .control-group.error textarea {
+    border-color: #b94a48;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus {
+    border-color: #953b39;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
+}
+
+.control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on {
+    color: #b94a48;
+    background-color: #f2dede;
+    border-color: #b94a48;
+}
+
+.control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline {
+    color: #468847;
+}
+
+.control-group.success .checkbox, .control-group.success .radio, .control-group.success input, .control-group.success select, .control-group.success textarea {
+    color: #468847;
+}
+
+.control-group.success input, .control-group.success select, .control-group.success textarea {
+    border-color: #468847;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus {
+    border-color: #356635;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
+}
+
+.control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on {
+    color: #468847;
+    background-color: #dff0d8;
+    border-color: #468847;
+}
+
+.control-group.info > label, .control-group.info .help-block, .control-group.info .help-inline {
+    color: #3a87ad;
+}
+
+.control-group.info .checkbox, .control-group.info .radio, .control-group.info input, .control-group.info select, .control-group.info textarea {
+    color: #3a87ad;
+}
+
+.control-group.info input, .control-group.info select, .control-group.info textarea {
+    border-color: #3a87ad;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+.control-group.info input:focus, .control-group.info select:focus, .control-group.info textarea:focus {
+    border-color: #2d6987;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
+}
+
+.control-group.info .input-prepend .add-on, .control-group.info .input-append .add-on {
+    color: #3a87ad;
+    background-color: #d9edf7;
+    border-color: #3a87ad;
+}
+
+input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid {
+    color: #b94a48;
+    border-color: #ee5f5b;
+}
+
+input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus {
+    border-color: #e9322d;
+    -webkit-box-shadow: 0 0 6px #f8b9b7;
+    -moz-box-shadow: 0 0 6px #f8b9b7;
+    box-shadow: 0 0 6px #f8b9b7;
+}
+
+.form-actions {
+    padding: 19px 20px 20px;
+    margin-top: 20px;
+    margin-bottom: 20px;
+    background-color: #f5f5f5;
+    border-top: 1px solid #e5e5e5;
+    *zoom: 1;
+}
+
+.form-actions:before, .form-actions:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.form-actions:after {
+    clear: both;
+}
+
+.help-block, .help-inline {
+    color: #595959;
+}
+
+.help-block {
+    display: block;
+    margin-bottom: 10px;
+}
+
+.help-inline {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    vertical-align: middle;
+    padding-left: 5px;
+}
+
+.input-append, .input-prepend {
+    margin-bottom: 5px;
+    font-size: 0;
+    white-space: nowrap;
+}
+
+.input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input, .input-append .dropdown-menu, .input-prepend .dropdown-menu {
+    font-size: 14px;
+}
+
+.input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input {
+    position: relative;
+    margin-bottom: 0;
+    *margin-left: 0;
+    vertical-align: top;
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-append input:focus, .input-prepend input:focus, .input-append select:focus, .input-prepend select:focus, .input-append .uneditable-input:focus, .input-prepend .uneditable-input:focus {
+    z-index: 2;
+}
+
+.input-append .add-on, .input-prepend .add-on {
+    display: inline-block;
+    width: auto;
+    height: 20px;
+    min-width: 16px;
+    padding: 4px 5px;
+    font-size: 14px;
+    font-weight: normal;
+    line-height: 20px;
+    text-align: center;
+    text-shadow: 0 1px 0 #ffffff;
+    background-color: #eeeeee;
+    border: 1px solid #ccc;
+}
+
+.input-append .add-on, .input-prepend .add-on, .input-append .btn, .input-prepend .btn {
+    vertical-align: top;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.input-append .active, .input-prepend .active {
+    background-color: #a9dba9;
+    border-color: #46a546;
+}
+
+.input-prepend .add-on, .input-prepend .btn {
+    margin-right: -1px;
+}
+
+.input-prepend .add-on:first-child, .input-prepend .btn:first-child {
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.input-append input, .input-append select, .input-append .uneditable-input {
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.input-append input + .btn-group .btn, .input-append select + .btn-group .btn, .input-append .uneditable-input + .btn-group .btn {
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-append .add-on, .input-append .btn, .input-append .btn-group {
+    margin-left: -1px;
+}
+
+.input-append .add-on:last-child, .input-append .btn:last-child {
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append input, .input-prepend.input-append select, .input-prepend.input-append .uneditable-input {
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.input-prepend.input-append input + .btn-group .btn, .input-prepend.input-append select + .btn-group .btn, .input-prepend.input-append .uneditable-input + .btn-group .btn {
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child {
+    margin-right: -1px;
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.input-prepend.input-append .add-on:last-child, .input-prepend.input-append .btn:last-child {
+    margin-left: -1px;
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.input-prepend.input-append .btn-group:first-child {
+    margin-left: 0;
+}
+
+input.search-query {
+    padding-right: 14px;
+    padding-right: 4px \9;
+    padding-left: 14px;
+    padding-left: 4px \9;
+    margin-bottom: 0;
+    -webkit-border-radius: 15px;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+}
+
+.form-search .input-append .search-query, .form-search .input-prepend .search-query {
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.form-search .input-append .search-query {
+    -webkit-border-radius: 14px 0 0 14px;
+    -moz-border-radius: 14px 0 0 14px;
+    border-radius: 14px 0 0 14px;
+}
+
+.form-search .input-append .btn {
+    -webkit-border-radius: 0 14px 14px 0;
+    -moz-border-radius: 0 14px 14px 0;
+    border-radius: 0 14px 14px 0;
+}
+
+.form-search .input-prepend .search-query {
+    -webkit-border-radius: 0 14px 14px 0;
+    -moz-border-radius: 0 14px 14px 0;
+    border-radius: 0 14px 14px 0;
+}
+
+.form-search .input-prepend .btn {
+    -webkit-border-radius: 14px 0 0 14px;
+    -moz-border-radius: 14px 0 0 14px;
+    border-radius: 14px 0 0 14px;
+}
+
+.form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input, .form-search .input-prepend, .form-inline .input-prepend, .form-horizontal .input-prepend, .form-search .input-append, .form-inline .input-append, .form-horizontal .input-append {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    margin-bottom: 0;
+    vertical-align: middle;
+}
+
+.form-search .hide, .form-inline .hide, .form-horizontal .hide {
+    display: none;
+}
+
+.form-search label, .form-inline label, .form-search .btn-group, .form-inline .btn-group {
+    display: inline-block;
+}
+
+.form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend {
+    margin-bottom: 0;
+}
+
+.form-search .radio, .form-search .checkbox, .form-inline .radio, .form-inline .checkbox {
+    padding-left: 0;
+    margin-bottom: 0;
+    vertical-align: middle;
+}
+
+.form-search .radio input[type="radio"], .form-search .checkbox input[type="checkbox"], .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] {
+    float: left;
+    margin-right: 3px;
+    margin-left: 0;
+}
+
+.control-group {
+    margin-bottom: 10px;
+}
+
+legend + .control-group {
+    margin-top: 20px;
+    -webkit-margin-top-collapse: separate;
+}
+
+.form-horizontal .control-group {
+    margin-bottom: 20px;
+    *zoom: 1;
+}
+
+.form-horizontal .control-group:before, .form-horizontal .control-group:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.form-horizontal .control-group:after {
+    clear: both;
+}
+
+.form-horizontal .control-label {
+    float: left;
+    width: 160px;
+    padding-top: 5px;
+    text-align: right;
+}
+
+.form-horizontal .controls {
+    *display: inline-block;
+    *padding-left: 20px;
+    margin-left: 180px;
+    *margin-left: 0;
+}
+
+.form-horizontal .controls:first-child {
+    *padding-left: 180px;
+}
+
+.form-horizontal .help-block {
+    margin-bottom: 0;
+}
+
+.form-horizontal input + .help-block, .form-horizontal select + .help-block, .form-horizontal textarea + .help-block {
+    margin-top: 10px;
+}
+
+.form-horizontal .form-actions {
+    padding-left: 180px;
+}
+
+.btn {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    padding: 4px 12px;
+    margin-bottom: 0;
+    font-size: 14px;
+    line-height: 20px;
+    *line-height: 20px;
+    text-align: center;
+    vertical-align: middle;
+    cursor: pointer;
+    color: #333333;
+    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+    background-color: #f5f5f5;
+    background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+    background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+    background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+    background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
+    border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #e6e6e6;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+    border: 1px solid #bbbbbb;
+    *border: 0;
+    border-bottom-color: #a2a2a2;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    *margin-left: .3em;
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+}
+
+.btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled] {
+    color: #333333;
+    background-color: #e6e6e6;
+    *background-color: #d9d9d9;
+}
+
+.btn:active, .btn.active {
+    background-color: #cccccc \9;
+}
+
+.btn:first-child {
+    *margin-left: 0;
+}
+
+.btn:hover {
+    color: #333333;
+    text-decoration: none;
+    background-color: #e6e6e6;
+    *background-color: #d9d9d9;
+    background-position: 0 -15px;
+    -webkit-transition: background-position 0.1s linear;
+    -moz-transition: background-position 0.1s linear;
+    -o-transition: background-position 0.1s linear;
+    transition: background-position 0.1s linear;
+}
+
+.btn:focus {
+    outline: thin dotted #333;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+
+.btn.active, .btn:active {
+    background-color: #e6e6e6;
+    background-color: #d9d9d9 \9;
+    background-image: none;
+    outline: 0;
+    -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+}
+
+.btn.disabled, .btn[disabled] {
+    cursor: default;
+    background-color: #e6e6e6;
+    background-image: none;
+    opacity: 0.65;
+    filter: alpha(opacity=65);
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+}
+
+.btn-large {
+    padding: 11px 19px;
+    font-size: 17.5px;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.btn-large [class^="icon-"], .btn-large [class*=" icon-"] {
+    margin-top: 2px;
+}
+
+.btn-small {
+    padding: 2px 10px;
+    font-size: 11.9px;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+.btn-small [class^="icon-"], .btn-small [class*=" icon-"] {
+    margin-top: 0;
+}
+
+.btn-mini {
+    padding: 1px 6px;
+    font-size: 10.5px;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+
+.btn-block {
+    display: block;
+    width: 100%;
+    padding-left: 0;
+    padding-right: 0;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+
+.btn-block + .btn-block {
+    margin-top: 5px;
+}
+
+input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block {
+    width: 100%;
+}
+
+.btn-primary.active, .btn-warning.active, .btn-danger.active, .btn-success.active, .btn-info.active, .btn-inverse.active {
+    color: rgba(255, 255, 255, 0.75);
+}
+
+.btn {
+    border-color: #c5c5c5;
+    border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
+}
+
+.btn-primary {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #006dcc;
+    background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+    background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+    background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+    background-image: linear-gradient(to bottom, #0088cc, #0044cc);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
+    border-color: #0044cc #0044cc #002a80;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #0044cc;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-primary:hover, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] {
+    color: #ffffff;
+    background-color: #0044cc;
+    *background-color: #003bb3;
+}
+
+.btn-primary:active, .btn-primary.active {
+    background-color: #003399 \9;
+}
+
+.btn-warning {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #faa732;
+    background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+    background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+    background-image: -o-linear-gradient(top, #fbb450, #f89406);
+    background-image: linear-gradient(to bottom, #fbb450, #f89406);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
+    border-color: #f89406 #f89406 #ad6704;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #f89406;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-warning:hover, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] {
+    color: #ffffff;
+    background-color: #f89406;
+    *background-color: #df8505;
+}
+
+.btn-warning:active, .btn-warning.active {
+    background-color: #c67605 \9;
+}
+
+.btn-danger {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #da4f49;
+    background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+    background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+    background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+    background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
+    border-color: #bd362f #bd362f #802420;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #bd362f;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-danger:hover, .btn-danger:active, .btn-danger.active, .btn-danger.disabled, .btn-danger[disabled] {
+    color: #ffffff;
+    background-color: #bd362f;
+    *background-color: #a9302a;
+}
+
+.btn-danger:active, .btn-danger.active {
+    background-color: #942a25 \9;
+}
+
+.btn-success {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #5bb75b;
+    background-image: -moz-linear-gradient(top, #62c462, #51a351);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+    background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+    background-image: -o-linear-gradient(top, #62c462, #51a351);
+    background-image: linear-gradient(to bottom, #62c462, #51a351);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
+    border-color: #51a351 #51a351 #387038;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #51a351;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-success:hover, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] {
+    color: #ffffff;
+    background-color: #51a351;
+    *background-color: #499249;
+}
+
+.btn-success:active, .btn-success.active {
+    background-color: #408140 \9;
+}
+
+.btn-info {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #49afcd;
+    background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+    background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+    background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+    background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
+    border-color: #2f96b4 #2f96b4 #1f6377;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #2f96b4;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-info:hover, .btn-info:active, .btn-info.active, .btn-info.disabled, .btn-info[disabled] {
+    color: #ffffff;
+    background-color: #2f96b4;
+    *background-color: #2a85a0;
+}
+
+.btn-info:active, .btn-info.active {
+    background-color: #24748c \9;
+}
+
+.btn-inverse {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #363636;
+    background-image: -moz-linear-gradient(top, #444444, #222222);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
+    background-image: -webkit-linear-gradient(top, #444444, #222222);
+    background-image: -o-linear-gradient(top, #444444, #222222);
+    background-image: linear-gradient(to bottom, #444444, #222222);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
+    border-color: #222222 #222222 #000000;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #222222;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.btn-inverse:hover, .btn-inverse:active, .btn-inverse.active, .btn-inverse.disabled, .btn-inverse[disabled] {
+    color: #ffffff;
+    background-color: #222222;
+    *background-color: #151515;
+}
+
+.btn-inverse:active, .btn-inverse.active {
+    background-color: #080808 \9;
+}
+
+button.btn, input[type="submit"].btn {
+    *padding-top: 3px;
+    *padding-bottom: 3px;
+}
+
+button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner {
+    padding: 0;
+    border: 0;
+}
+
+button.btn.btn-large, input[type="submit"].btn.btn-large {
+    *padding-top: 7px;
+    *padding-bottom: 7px;
+}
+
+button.btn.btn-small, input[type="submit"].btn.btn-small {
+    *padding-top: 3px;
+    *padding-bottom: 3px;
+}
+
+button.btn.btn-mini, input[type="submit"].btn.btn-mini {
+    *padding-top: 1px;
+    *padding-bottom: 1px;
+}
+
+.btn-link, .btn-link:active, .btn-link[disabled] {
+    background-color: transparent;
+    background-image: none;
+    -webkit-box-shadow: none;
+    -moz-box-shadow: none;
+    box-shadow: none;
+}
+
+.btn-link {
+    border-color: transparent;
+    cursor: pointer;
+    color: #0088cc;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.btn-link:hover {
+    color: #005580;
+    text-decoration: underline;
+    background-color: transparent;
+}
+
+.btn-link[disabled]:hover {
+    color: #333333;
+    text-decoration: none;
+}
+
+.btn-group {
+    position: relative;
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    font-size: 0;
+    vertical-align: middle;
+    white-space: nowrap;
+    *margin-left: .3em;
+}
+
+.btn-group:first-child {
+    *margin-left: 0;
+}
+
+.btn-group + .btn-group {
+    margin-left: 5px;
+}
+
+.btn-toolbar {
+    font-size: 0;
+    margin-top: 10px;
+    margin-bottom: 10px;
+}
+
+.btn-toolbar .btn + .btn, .btn-toolbar .btn-group + .btn, .btn-toolbar .btn + .btn-group {
+    margin-left: 5px;
+}
+
+.btn-group > .btn {
+    position: relative;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.btn-group > .btn + .btn {
+    margin-left: -1px;
+}
+
+.btn-group > .btn, .btn-group > .dropdown-menu {
+    font-size: 14px;
+}
+
+.btn-group > .btn-mini {
+    font-size: 11px;
+}
+
+.btn-group > .btn-small {
+    font-size: 12px;
+}
+
+.btn-group > .btn-large {
+    font-size: 16px;
+}
+
+.btn-group > .btn:first-child {
+    margin-left: 0;
+    -webkit-border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+    border-top-left-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+    border-bottom-left-radius: 4px;
+}
+
+.btn-group > .btn:last-child, .btn-group > .dropdown-toggle {
+    -webkit-border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+    border-top-right-radius: 4px;
+    -webkit-border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+    border-bottom-right-radius: 4px;
+}
+
+.btn-group > .btn.large:first-child {
+    margin-left: 0;
+    -webkit-border-top-left-radius: 6px;
+    -moz-border-radius-topleft: 6px;
+    border-top-left-radius: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomleft: 6px;
+    border-bottom-left-radius: 6px;
+}
+
+.btn-group > .btn.large:last-child, .btn-group > .large.dropdown-toggle {
+    -webkit-border-top-right-radius: 6px;
+    -moz-border-radius-topright: 6px;
+    border-top-right-radius: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    border-bottom-right-radius: 6px;
+}
+
+.btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active {
+    z-index: 2;
+}
+
+.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
+    outline: 0;
+}
+
+.btn-group > .btn + .dropdown-toggle {
+    padding-left: 8px;
+    padding-right: 8px;
+    -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, .125), inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, .125), inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 1px 0 0 rgba(255, 255, 255, .125), inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
+    *padding-top: 5px;
+    *padding-bottom: 5px;
+}
+
+.btn-group > .btn-mini + .dropdown-toggle {
+    padding-left: 5px;
+    padding-right: 5px;
+    *padding-top: 2px;
+    *padding-bottom: 2px;
+}
+
+.btn-group > .btn-small + .dropdown-toggle {
+    *padding-top: 5px;
+    *padding-bottom: 4px;
+}
+
+.btn-group > .btn-large + .dropdown-toggle {
+    padding-left: 12px;
+    padding-right: 12px;
+    *padding-top: 7px;
+    *padding-bottom: 7px;
+}
+
+.btn-group.open .dropdown-toggle {
+    background-image: none;
+    -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15), 0 1px 2px rgba(0, 0, 0, .05);
+}
+
+.btn-group.open .btn.dropdown-toggle {
+    background-color: #e6e6e6;
+}
+
+.btn-group.open .btn-primary.dropdown-toggle {
+    background-color: #0044cc;
+}
+
+.btn-group.open .btn-warning.dropdown-toggle {
+    background-color: #f89406;
+}
+
+.btn-group.open .btn-danger.dropdown-toggle {
+    background-color: #bd362f;
+}
+
+.btn-group.open .btn-success.dropdown-toggle {
+    background-color: #51a351;
+}
+
+.btn-group.open .btn-info.dropdown-toggle {
+    background-color: #2f96b4;
+}
+
+.btn-group.open .btn-inverse.dropdown-toggle {
+    background-color: #222222;
+}
+
+.btn .caret {
+    margin-top: 8px;
+    margin-left: 0;
+}
+
+.btn-mini .caret, .btn-small .caret, .btn-large .caret {
+    margin-top: 6px;
+}
+
+.btn-large .caret {
+    border-left-width: 5px;
+    border-right-width: 5px;
+    border-top-width: 5px;
+}
+
+.dropup .btn-large .caret {
+    border-bottom-width: 5px;
+}
+
+.btn-primary .caret, .btn-warning .caret, .btn-danger .caret, .btn-info .caret, .btn-success .caret, .btn-inverse .caret {
+    border-top-color: #ffffff;
+    border-bottom-color: #ffffff;
+}
+
+.btn-group-vertical {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+}
+
+.btn-group-vertical .btn {
+    display: block;
+    float: none;
+    width: 100%;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.btn-group-vertical .btn + .btn {
+    margin-left: 0;
+    margin-top: -1px;
+}
+
+.btn-group-vertical .btn:first-child {
+    -webkit-border-radius: 4px 4px 0 0;
+    -moz-border-radius: 4px 4px 0 0;
+    border-radius: 4px 4px 0 0;
+}
+
+.btn-group-vertical .btn:last-child {
+    -webkit-border-radius: 0 0 4px 4px;
+    -moz-border-radius: 0 0 4px 4px;
+    border-radius: 0 0 4px 4px;
+}
+
+.btn-group-vertical .btn-large:first-child {
+    -webkit-border-radius: 6px 6px 0 0;
+    -moz-border-radius: 6px 6px 0 0;
+    border-radius: 6px 6px 0 0;
+}
+
+.btn-group-vertical .btn-large:last-child {
+    -webkit-border-radius: 0 0 6px 6px;
+    -moz-border-radius: 0 0 6px 6px;
+    border-radius: 0 0 6px 6px;
+}
+
+.nav {
+    margin-left: 0;
+    margin-bottom: 20px;
+    list-style: none;
+}
+
+.nav > li > a {
+    display: block;
+}
+
+.nav > li > a:hover {
+    text-decoration: none;
+    background-color: #eeeeee;
+}
+
+.nav > .pull-right {
+    float: right;
+}
+
+.nav-header {
+    display: block;
+    padding: 3px 15px;
+    font-size: 11px;
+    font-weight: bold;
+    line-height: 20px;
+    color: #999999;
+    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+    text-transform: uppercase;
+}
+
+.nav li + .nav-header {
+    margin-top: 9px;
+}
+
+.nav-list {
+    padding-left: 15px;
+    padding-right: 15px;
+    margin-bottom: 0;
+}
+
+.nav-list > li > a, .nav-list .nav-header {
+    margin-left: -15px;
+    margin-right: -15px;
+    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+
+.nav-list > li > a {
+    padding: 3px 15px;
+}
+
+.nav-list > .active > a, .nav-list > .active > a:hover {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+    background-color: #0088cc;
+}
+
+.nav-list [class^="icon-"], .nav-list [class*=" icon-"] {
+    margin-right: 2px;
+}
+
+.nav-list .divider {
+    *width: 100%;
+    height: 1px;
+    margin: 9px 1px;
+    *margin: -5px 0 5px;
+    overflow: hidden;
+    background-color: #e5e5e5;
+    border-bottom: 1px solid #ffffff;
+}
+
+.nav-tabs, .nav-pills {
+    *zoom: 1;
+}
+
+.nav-tabs:before, .nav-pills:before, .nav-tabs:after, .nav-pills:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.nav-tabs:after, .nav-pills:after {
+    clear: both;
+}
+
+.nav-tabs > li, .nav-pills > li {
+    float: left;
+}
+
+.nav-tabs > li > a, .nav-pills > li > a {
+    padding-right: 12px;
+    padding-left: 12px;
+    margin-right: 2px;
+    line-height: 14px;
+}
+
+.nav-tabs {
+    border-bottom: 1px solid #ddd;
+}
+
+.nav-tabs > li {
+    margin-bottom: -1px;
+}
+
+.nav-tabs > li > a {
+    padding-top: 8px;
+    padding-bottom: 8px;
+    line-height: 20px;
+    border: 1px solid transparent;
+    -webkit-border-radius: 4px 4px 0 0;
+    -moz-border-radius: 4px 4px 0 0;
+    border-radius: 4px 4px 0 0;
+}
+
+.nav-tabs > li > a:hover {
+    border-color: #eeeeee #eeeeee #dddddd;
+}
+
+.nav-tabs > .active > a, .nav-tabs > .active > a:hover {
+    color: #555555;
+    background-color: #ffffff;
+    border: 1px solid #ddd;
+    border-bottom-color: transparent;
+    cursor: default;
+}
+
+.nav-pills > li > a {
+    padding-top: 8px;
+    padding-bottom: 8px;
+    margin-top: 2px;
+    margin-bottom: 2px;
+    -webkit-border-radius: 5px;
+    -moz-border-radius: 5px;
+    border-radius: 5px;
+}
+
+.nav-pills > .active > a, .nav-pills > .active > a:hover {
+    color: #ffffff;
+    background-color: #0088cc;
+}
+
+.nav-stacked > li {
+    float: none;
+}
+
+.nav-stacked > li > a {
+    margin-right: 0;
+}
+
+.nav-tabs.nav-stacked {
+    border-bottom: 0;
+}
+
+.nav-tabs.nav-stacked > li > a {
+    border: 1px solid #ddd;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.nav-tabs.nav-stacked > li:first-child > a {
+    -webkit-border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+    border-top-right-radius: 4px;
+    -webkit-border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+    border-top-left-radius: 4px;
+}
+
+.nav-tabs.nav-stacked > li:last-child > a {
+    -webkit-border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+    border-bottom-right-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+    border-bottom-left-radius: 4px;
+}
+
+.nav-tabs.nav-stacked > li > a:hover {
+    border-color: #ddd;
+    z-index: 2;
+}
+
+.nav-pills.nav-stacked > li > a {
+    margin-bottom: 3px;
+}
+
+.nav-pills.nav-stacked > li:last-child > a {
+    margin-bottom: 1px;
+}
+
+.nav-tabs .dropdown-menu {
+    -webkit-border-radius: 0 0 6px 6px;
+    -moz-border-radius: 0 0 6px 6px;
+    border-radius: 0 0 6px 6px;
+}
+
+.nav-pills .dropdown-menu {
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.nav .dropdown-toggle .caret {
+    border-top-color: #0088cc;
+    border-bottom-color: #0088cc;
+    margin-top: 6px;
+}
+
+.nav .dropdown-toggle:hover .caret {
+    border-top-color: #005580;
+    border-bottom-color: #005580;
+}
+
+.nav-tabs .dropdown-toggle .caret {
+    margin-top: 8px;
+}
+
+.nav .active .dropdown-toggle .caret {
+    border-top-color: #fff;
+    border-bottom-color: #fff;
+}
+
+.nav-tabs .active .dropdown-toggle .caret {
+    border-top-color: #555555;
+    border-bottom-color: #555555;
+}
+
+.nav > .dropdown.active > a:hover {
+    cursor: pointer;
+}
+
+.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover {
+    color: #ffffff;
+    background-color: #999999;
+    border-color: #999999;
+}
+
+.nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret {
+    border-top-color: #ffffff;
+    border-bottom-color: #ffffff;
+    opacity: 1;
+    filter: alpha(opacity=100);
+}
+
+.tabs-stacked .open > a:hover {
+    border-color: #999999;
+}
+
+.tabbable {
+    *zoom: 1;
+}
+
+.tabbable:before, .tabbable:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.tabbable:after {
+    clear: both;
+}
+
+.tab-content {
+    overflow: auto;
+}
+
+.tabs-below > .nav-tabs, .tabs-right > .nav-tabs, .tabs-left > .nav-tabs {
+    border-bottom: 0;
+}
+
+.tab-content > .tab-pane, .pill-content > .pill-pane {
+    display: none;
+}
+
+.tab-content > .active, .pill-content > .active {
+    display: block;
+}
+
+.tabs-below > .nav-tabs {
+    border-top: 1px solid #ddd;
+}
+
+.tabs-below > .nav-tabs > li {
+    margin-top: -1px;
+    margin-bottom: 0;
+}
+
+.tabs-below > .nav-tabs > li > a {
+    -webkit-border-radius: 0 0 4px 4px;
+    -moz-border-radius: 0 0 4px 4px;
+    border-radius: 0 0 4px 4px;
+}
+
+.tabs-below > .nav-tabs > li > a:hover {
+    border-bottom-color: transparent;
+    border-top-color: #ddd;
+}
+
+.tabs-below > .nav-tabs > .active > a, .tabs-below > .nav-tabs > .active > a:hover {
+    border-color: transparent #ddd #ddd #ddd;
+}
+
+.tabs-left > .nav-tabs > li, .tabs-right > .nav-tabs > li {
+    float: none;
+}
+
+.tabs-left > .nav-tabs > li > a, .tabs-right > .nav-tabs > li > a {
+    min-width: 74px;
+    margin-right: 0;
+    margin-bottom: 3px;
+}
+
+.tabs-left > .nav-tabs {
+    float: left;
+    margin-right: 19px;
+    border-right: 1px solid #ddd;
+}
+
+.tabs-left > .nav-tabs > li > a {
+    margin-right: -1px;
+    -webkit-border-radius: 4px 0 0 4px;
+    -moz-border-radius: 4px 0 0 4px;
+    border-radius: 4px 0 0 4px;
+}
+
+.tabs-left > .nav-tabs > li > a:hover {
+    border-color: #eeeeee #dddddd #eeeeee #eeeeee;
+}
+
+.tabs-left > .nav-tabs .active > a, .tabs-left > .nav-tabs .active > a:hover {
+    border-color: #ddd transparent #ddd #ddd;
+    *border-right-color: #ffffff;
+}
+
+.tabs-right > .nav-tabs {
+    float: right;
+    margin-left: 19px;
+    border-left: 1px solid #ddd;
+}
+
+.tabs-right > .nav-tabs > li > a {
+    margin-left: -1px;
+    -webkit-border-radius: 0 4px 4px 0;
+    -moz-border-radius: 0 4px 4px 0;
+    border-radius: 0 4px 4px 0;
+}
+
+.tabs-right > .nav-tabs > li > a:hover {
+    border-color: #eeeeee #eeeeee #eeeeee #dddddd;
+}
+
+.tabs-right > .nav-tabs .active > a, .tabs-right > .nav-tabs .active > a:hover {
+    border-color: #ddd #ddd #ddd transparent;
+    *border-left-color: #ffffff;
+}
+
+.nav > .disabled > a {
+    color: #999999;
+}
+
+.nav > .disabled > a:hover {
+    text-decoration: none;
+    background-color: transparent;
+    cursor: default;
+}
+
+.navbar {
+    overflow: visible;
+    margin-bottom: 20px;
+    color: #777777;
+    *position: relative;
+    *z-index: 2;
+}
+
+.navbar-inner {
+    min-height: 40px;
+    padding-left: 20px;
+    padding-right: 20px;
+    background-color: #fafafa;
+    background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
+    background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
+    background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
+    background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
+    border: 1px solid #d4d4d4;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+    *zoom: 1;
+}
+
+.navbar-inner:before, .navbar-inner:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.navbar-inner:after {
+    clear: both;
+}
+
+.navbar .container {
+    width: auto;
+}
+
+.nav-collapse.collapse {
+    height: auto;
+    overflow: visible;
+}
+
+.navbar .brand {
+    float: left;
+    display: block;
+    padding: 10px 20px 10px;
+    margin-left: -20px;
+    font-size: 20px;
+    font-weight: 200;
+    color: #777777;
+    text-shadow: 0 1px 0 #ffffff;
+}
+
+.navbar .brand:hover {
+    text-decoration: none;
+}
+
+.navbar-text {
+    margin-bottom: 0;
+    line-height: 40px;
+}
+
+.navbar-link {
+    color: #777777;
+}
+
+.navbar-link:hover {
+    color: #333333;
+}
+
+.navbar .divider-vertical {
+    height: 40px;
+    margin: 0 9px;
+    border-left: 1px solid #f2f2f2;
+    border-right: 1px solid #ffffff;
+}
+
+.navbar .btn, .navbar .btn-group {
+    margin-top: 5px;
+}
+
+.navbar .btn-group .btn, .navbar .input-prepend .btn, .navbar .input-append .btn {
+    margin-top: 0;
+}
+
+.navbar-form {
+    margin-bottom: 0;
+    *zoom: 1;
+}
+
+.navbar-form:before, .navbar-form:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.navbar-form:after {
+    clear: both;
+}
+
+.navbar-form input, .navbar-form select, .navbar-form .radio, .navbar-form .checkbox {
+    margin-top: 5px;
+}
+
+.navbar-form input, .navbar-form select, .navbar-form .btn {
+    display: inline-block;
+    margin-bottom: 0;
+}
+
+.navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] {
+    margin-top: 3px;
+}
+
+.navbar-form .input-append, .navbar-form .input-prepend {
+    margin-top: 6px;
+    white-space: nowrap;
+}
+
+.navbar-form .input-append input, .navbar-form .input-prepend input {
+    margin-top: 0;
+}
+
+.navbar-search {
+    position: relative;
+    float: left;
+    margin-top: 5px;
+    margin-bottom: 0;
+}
+
+.navbar-search .search-query {
+    margin-bottom: 0;
+    padding: 4px 14px;
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+    font-size: 13px;
+    font-weight: normal;
+    line-height: 1;
+    -webkit-border-radius: 15px;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+}
+
+.navbar-static-top {
+    position: static;
+    margin-bottom: 0;
+}
+
+.navbar-static-top .navbar-inner {
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.navbar-fixed-top, .navbar-fixed-bottom {
+    position: fixed;
+    right: 0;
+    left: 0;
+    z-index: 1030;
+    margin-bottom: 0;
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner {
+    border-width: 0 0 1px;
+}
+
+.navbar-fixed-bottom .navbar-inner {
+    border-width: 1px 0 0;
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-fixed-bottom .navbar-inner {
+    padding-left: 0;
+    padding-right: 0;
+    -webkit-border-radius: 0;
+    -moz-border-radius: 0;
+    border-radius: 0;
+}
+
+.navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container {
+    width: 940px;
+}
+
+.navbar-fixed-top {
+    top: 0;
+}
+
+.navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner {
+    -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, .1);
+    -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, .1);
+    box-shadow: 0 1px 10px rgba(0, 0, 0, .1);
+}
+
+.navbar-fixed-bottom {
+    bottom: 0;
+}
+
+.navbar-fixed-bottom .navbar-inner {
+    -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, .1);
+    -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, .1);
+    box-shadow: 0 -1px 10px rgba(0, 0, 0, .1);
+}
+
+.navbar .nav {
+    position: relative;
+    left: 0;
+    display: block;
+    float: left;
+    margin: 0 10px 0 0;
+}
+
+.navbar .nav.pull-right {
+    float: right;
+    margin-right: 0;
+}
+
+.navbar .nav > li {
+    float: left;
+}
+
+.navbar .nav > li > a {
+    float: none;
+    padding: 10px 15px 10px;
+    color: #777777;
+    text-decoration: none;
+    text-shadow: 0 1px 0 #ffffff;
+}
+
+.navbar .nav .dropdown-toggle .caret {
+    margin-top: 8px;
+}
+
+.navbar .nav > li > a:focus, .navbar .nav > li > a:hover {
+    background-color: transparent;
+    color: #333333;
+    text-decoration: none;
+}
+
+.navbar .nav > .active > a, .navbar .nav > .active > a:hover, .navbar .nav > .active > a:focus {
+    color: #555555;
+    text-decoration: none;
+    background-color: #e5e5e5;
+    -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+    -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
+}
+
+.navbar .btn-navbar {
+    display: none;
+    float: right;
+    padding: 7px 10px;
+    margin-left: 5px;
+    margin-right: 5px;
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #ededed;
+    background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
+    background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
+    background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
+    background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
+    border-color: #e5e5e5 #e5e5e5 #bfbfbf;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #e5e5e5;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .075);
+    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .075);
+    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .075);
+}
+
+.navbar .btn-navbar:hover, .navbar .btn-navbar:active, .navbar .btn-navbar.active, .navbar .btn-navbar.disabled, .navbar .btn-navbar[disabled] {
+    color: #ffffff;
+    background-color: #e5e5e5;
+    *background-color: #d9d9d9;
+}
+
+.navbar .btn-navbar:active, .navbar .btn-navbar.active {
+    background-color: #cccccc \9;
+}
+
+.navbar .btn-navbar .icon-bar {
+    display: block;
+    width: 18px;
+    height: 2px;
+    background-color: #f5f5f5;
+    -webkit-border-radius: 1px;
+    -moz-border-radius: 1px;
+    border-radius: 1px;
+    -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+    -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.btn-navbar .icon-bar + .icon-bar {
+    margin-top: 3px;
+}
+
+.navbar .nav > li > .dropdown-menu:before {
+    content: '';
+    display: inline-block;
+    border-left: 7px solid transparent;
+    border-right: 7px solid transparent;
+    border-bottom: 7px solid #ccc;
+    border-bottom-color: rgba(0, 0, 0, 0.2);
+    position: absolute;
+    top: -7px;
+    left: 9px;
+}
+
+.navbar .nav > li > .dropdown-menu:after {
+    content: '';
+    display: inline-block;
+    border-left: 6px solid transparent;
+    border-right: 6px solid transparent;
+    border-bottom: 6px solid #ffffff;
+    position: absolute;
+    top: -6px;
+    left: 10px;
+}
+
+.navbar-fixed-bottom .nav > li > .dropdown-menu:before {
+    border-top: 7px solid #ccc;
+    border-top-color: rgba(0, 0, 0, 0.2);
+    border-bottom: 0;
+    bottom: -7px;
+    top: auto;
+}
+
+.navbar-fixed-bottom .nav > li > .dropdown-menu:after {
+    border-top: 6px solid #ffffff;
+    border-bottom: 0;
+    bottom: -6px;
+    top: auto;
+}
+
+.navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle {
+    background-color: #e5e5e5;
+    color: #555555;
+}
+
+.navbar .nav li.dropdown > .dropdown-toggle .caret {
+    border-top-color: #777777;
+    border-bottom-color: #777777;
+}
+
+.navbar .nav li.dropdown.open > .dropdown-toggle .caret, .navbar .nav li.dropdown.active > .dropdown-toggle .caret, .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
+    border-top-color: #555555;
+    border-bottom-color: #555555;
+}
+
+.navbar .pull-right > li > .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right {
+    left: auto;
+    right: 0;
+}
+
+.navbar .pull-right > li > .dropdown-menu:before, .navbar .nav > li > .dropdown-menu.pull-right:before {
+    left: auto;
+    right: 12px;
+}
+
+.navbar .pull-right > li > .dropdown-menu:after, .navbar .nav > li > .dropdown-menu.pull-right:after {
+    left: auto;
+    right: 13px;
+}
+
+.navbar .pull-right > li > .dropdown-menu .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {
+    left: auto;
+    right: 100%;
+    margin-left: 0;
+    margin-right: -1px;
+    -webkit-border-radius: 6px 0 6px 6px;
+    -moz-border-radius: 6px 0 6px 6px;
+    border-radius: 6px 0 6px 6px;
+}
+
+.navbar-inverse {
+    color: #999999;
+}
+
+.navbar-inverse .navbar-inner {
+    background-color: #1b1b1b;
+    background-image: -moz-linear-gradient(top, #222222, #111111);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));
+    background-image: -webkit-linear-gradient(top, #222222, #111111);
+    background-image: -o-linear-gradient(top, #222222, #111111);
+    background-image: linear-gradient(to bottom, #222222, #111111);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);
+    border-color: #252525;
+}
+
+.navbar-inverse .brand, .navbar-inverse .nav > li > a {
+    color: #999999;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+
+.navbar-inverse .brand:hover, .navbar-inverse .nav > li > a:hover {
+    color: #ffffff;
+}
+
+.navbar-inverse .nav > li > a:focus, .navbar-inverse .nav > li > a:hover {
+    background-color: transparent;
+    color: #ffffff;
+}
+
+.navbar-inverse .nav .active > a, .navbar-inverse .nav .active > a:hover, .navbar-inverse .nav .active > a:focus {
+    color: #ffffff;
+    background-color: #111111;
+}
+
+.navbar-inverse .navbar-link {
+    color: #999999;
+}
+
+.navbar-inverse .navbar-link:hover {
+    color: #ffffff;
+}
+
+.navbar-inverse .divider-vertical {
+    border-left-color: #111111;
+    border-right-color: #222222;
+}
+
+.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {
+    background-color: #111111;
+    color: #ffffff;
+}
+
+.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {
+    border-top-color: #999999;
+    border-bottom-color: #999999;
+}
+
+.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {
+    border-top-color: #ffffff;
+    border-bottom-color: #ffffff;
+}
+
+.navbar-inverse .navbar-search .search-query {
+    color: #ffffff;
+    background-color: #515151;
+    border-color: #111111;
+    -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .15);
+    -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .15);
+    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1), 0 1px 0 rgba(255, 255, 255, .15);
+    -webkit-transition: none;
+    -moz-transition: none;
+    -o-transition: none;
+    transition: none;
+}
+
+.navbar-inverse .navbar-search .search-query:-moz-placeholder {
+    color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query:-ms-input-placeholder {
+    color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {
+    color: #cccccc;
+}
+
+.navbar-inverse .navbar-search .search-query:focus, .navbar-inverse .navbar-search .search-query.focused {
+    padding: 5px 15px;
+    color: #333333;
+    text-shadow: 0 1px 0 #ffffff;
+    background-color: #ffffff;
+    border: 0;
+    -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+    -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+    box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+    outline: 0;
+}
+
+.navbar-inverse .btn-navbar {
+    color: #ffffff;
+    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+    background-color: #0e0e0e;
+    background-image: -moz-linear-gradient(top, #151515, #040404);
+    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));
+    background-image: -webkit-linear-gradient(top, #151515, #040404);
+    background-image: -o-linear-gradient(top, #151515, #040404);
+    background-image: linear-gradient(to bottom, #151515, #040404);
+    background-repeat: repeat-x;
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);
+    border-color: #040404 #040404 #000000;
+    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+    *background-color: #040404;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+}
+
+.navbar-inverse .btn-navbar:hover, .navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active, .navbar-inverse .btn-navbar.disabled, .navbar-inverse .btn-navbar[disabled] {
+    color: #ffffff;
+    background-color: #040404;
+    *background-color: #000000;
+}
+
+.navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active {
+    background-color: #000000 \9;
+}
+
+.breadcrumb {
+    padding: 8px 15px;
+    margin: 0 0 20px;
+    list-style: none;
+    background-color: #f5f5f5;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+}
+
+.breadcrumb li {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    text-shadow: 0 1px 0 #ffffff;
+}
+
+.breadcrumb .divider {
+    padding: 0 5px;
+    color: #ccc;
+}
+
+.breadcrumb .active {
+    color: #999999;
+}
+
+.pagination {
+    margin: 20px 0;
+}
+
+.pagination ul {
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    margin-left: 0;
+    margin-bottom: 0;
+    -webkit-border-radius: 4px;
+    -moz-border-radius: 4px;
+    border-radius: 4px;
+    -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+    -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+
+.pagination ul > li {
+    display: inline;
+}
+
+.pagination ul > li > a, .pagination ul > li > span {
+    float: left;
+    padding: 4px 12px;
+    line-height: 20px;
+    text-decoration: none;
+    background-color: #ffffff;
+    border: 1px solid #dddddd;
+    border-left-width: 0;
+}
+
+.pagination ul > li > a:hover, .pagination ul > .active > a, .pagination ul > .active > span {
+    background-color: #f5f5f5;
+}
+
+.pagination ul > .active > a, .pagination ul > .active > span {
+    color: #999999;
+    cursor: default;
+}
+
+.pagination ul > .disabled > span, .pagination ul > .disabled > a, .pagination ul > .disabled > a:hover {
+    color: #999999;
+    background-color: transparent;
+    cursor: default;
+}
+
+.pagination ul > li:first-child > a, .pagination ul > li:first-child > span {
+    border-left-width: 1px;
+    -webkit-border-top-left-radius: 4px;
+    -moz-border-radius-topleft: 4px;
+    border-top-left-radius: 4px;
+    -webkit-border-bottom-left-radius: 4px;
+    -moz-border-radius-bottomleft: 4px;
+    border-bottom-left-radius: 4px;
+}
+
+.pagination ul > li:last-child > a, .pagination ul > li:last-child > span {
+    -webkit-border-top-right-radius: 4px;
+    -moz-border-radius-topright: 4px;
+    border-top-right-radius: 4px;
+    -webkit-border-bottom-right-radius: 4px;
+    -moz-border-radius-bottomright: 4px;
+    border-bottom-right-radius: 4px;
+}
+
+.pagination-centered {
+    text-align: center;
+}
+
+.pagination-right {
+    text-align: right;
+}
+
+.pagination-large ul > li > a, .pagination-large ul > li > span {
+    padding: 11px 19px;
+    font-size: 17.5px;
+}
+
+.pagination-large ul > li:first-child > a, .pagination-large ul > li:first-child > span {
+    -webkit-border-top-left-radius: 6px;
+    -moz-border-radius-topleft: 6px;
+    border-top-left-radius: 6px;
+    -webkit-border-bottom-left-radius: 6px;
+    -moz-border-radius-bottomleft: 6px;
+    border-bottom-left-radius: 6px;
+}
+
+.pagination-large ul > li:last-child > a, .pagination-large ul > li:last-child > span {
+    -webkit-border-top-right-radius: 6px;
+    -moz-border-radius-topright: 6px;
+    border-top-right-radius: 6px;
+    -webkit-border-bottom-right-radius: 6px;
+    -moz-border-radius-bottomright: 6px;
+    border-bottom-right-radius: 6px;
+}
+
+.pagination-mini ul > li:first-child > a, .pagination-small ul > li:first-child > a, .pagination-mini ul > li:first-child > span, .pagination-small ul > li:first-child > span {
+    -webkit-border-top-left-radius: 3px;
+    -moz-border-radius-topleft: 3px;
+    border-top-left-radius: 3px;
+    -webkit-border-bottom-left-radius: 3px;
+    -moz-border-radius-bottomleft: 3px;
+    border-bottom-left-radius: 3px;
+}
+
+.pagination-mini ul > li:last-child > a, .pagination-small ul > li:last-child > a, .pagination-mini ul > li:last-child > span, .pagination-small ul > li:last-child > span {
+    -webkit-border-top-right-radius: 3px;
+    -moz-border-radius-topright: 3px;
+    border-top-right-radius: 3px;
+    -webkit-border-bottom-right-radius: 3px;
+    -moz-border-radius-bottomright: 3px;
+    border-bottom-right-radius: 3px;
+}
+
+.pagination-small ul > li > a, .pagination-small ul > li > span {
+    padding: 2px 10px;
+    font-size: 11.9px;
+}
+
+.pagination-mini ul > li > a, .pagination-mini ul > li > span {
+    padding: 1px 6px;
+    font-size: 10.5px;
+}
+
+.pager {
+    margin: 20px 0;
+    list-style: none;
+    text-align: center;
+    *zoom: 1;
+}
+
+.pager:before, .pager:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.pager:after {
+    clear: both;
+}
+
+.pager li {
+    display: inline;
+}
+
+.pager li > a, .pager li > span {
+    display: inline-block;
+    padding: 5px 14px;
+    background-color: #fff;
+    border: 1px solid #ddd;
+    -webkit-border-radius: 15px;
+    -moz-border-radius: 15px;
+    border-radius: 15px;
+}
+
+.pager li > a:hover {
+    text-decoration: none;
+    background-color: #f5f5f5;
+}
+
+.pager .next > a, .pager .next > span {
+    float: right;
+}
+
+.pager .previous > a, .pager .previous > span {
+    float: left;
+}
+
+.pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > span {
+    color: #999999;
+    background-color: #fff;
+    cursor: default;
+}
+
+.thumbnails {
+    margin-left: -20px;
+    list-style: none;
+    *zoom: 1;
+}
+
+.thumbnails:before, .thumbnails:after {
+    display: table;
+    content: "";
+    line-height: 0;
+}
+
+.thumbnails:after {
+    clear: both;
+}
+
+.row-fluid .thumbnails {
+    margin-left: 0;
+}
+
+.thumbnails > li {
+    float: left;
+    margin-bottom: 20px;
+    margin-left: 20px;
+}
+
+.thumbnail {
+    display: block;
+    padding: 4px;
+    line-height: 20px;
+    border: 1px solid #ddd;
+    -webkit-borde

<TRUNCATED>

[29/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/main.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/main.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/main.js
new file mode 100644
index 0000000..86bf4db
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/main.js
@@ -0,0 +1,170 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+var datasource, type, columns, filter, maxUpdateValue;
+
+var REFRESH_INTERVAL = 5000;
+var dataLoaded = true;
+var timeInterval = '30 Min';
+var applicationId = '';
+var clusterId = '';
+
+//loading gadget configuration
+datasource = gadgetConfig.datasource;
+filter = gadgetConfig.filter;
+type = gadgetConfig.type;
+var counter = 0;
+maxUpdateValue = gadgetConfig.maxUpdateValue;
+
+gadgets.HubSettings.onConnect = function () {
+    gadgets.Hub.subscribe('member-status-filter', function (topic, data) {
+        clusterId = data['clusterId'];
+        applicationId = data['applicationId'];
+        timeInterval = data['timeInterval'];
+        console.log("Member Filter Value:" + JSON.stringify(data));
+    });
+};
+
+//first, fetch datasource schema
+getColumns();
+
+//load data immediately
+fetchData(drawChart);
+
+// then start periodic polling
+setInterval(function () {
+    fetchData(drawChart);
+}, REFRESH_INTERVAL);
+
+
+function getColumns() {
+    columns = gadgetConfig.columns;
+}
+
+function fetchData(callback) {
+    //if previous operation is not completed, DO NOT fetch data
+    if (!dataLoaded) {
+        console.log("Waiting for data...");
+        return;
+    }
+
+    var application = applicationId;
+    var cluster = clusterId;
+    var time = timeInterval;
+
+    if (application != "") {
+        var request = {
+            tableName: datasource,
+            applicationId: application,
+            clusterId: cluster,
+            time: time
+        };
+        $.ajax({
+            url: "/portal/apis/member-count",
+            method: "GET",
+            data: request,
+            contentType: "application/json",
+            success: function (data) {
+                if (callback != null) {
+                    callback(makeRows(JSON.parse(data)));
+                }
+            }
+        });
+        dataLoaded = false;   //setting the latch to locked position so that we block data fetching until we receive the response from backend
+    }
+}
+
+function makeDataTable(data) {
+    var dataTable = new igviz.DataTable();
+    if (columns.length > 0) {
+        columns.forEach(function (column) {
+            var type = "N";
+            if (column.DATA_TYPE == "varchar" || column.DATA_TYPE == "VARCHAR") {
+                type = "C";
+            } else if (column.DATA_TYPE == "TIME" || column.DATA_TYPE == "time") {
+                type = "T";
+            }
+            dataTable.addColumn(column.COLUMN_NAME, type);
+        });
+    }
+    data.forEach(function (row, index) {
+        for (var i = 0; i < row.length; i++) {
+            if (dataTable.metadata.types[i] == "N") {
+                data[index][i] = parseInt(data[index][i]);
+            }
+        }
+    });
+    dataTable.addRows(data);
+    return dataTable;
+}
+
+function makeRows(data) {
+    var rows = [];
+    for (var i = 0; i < data.length; i++) {
+        var record = data[i];
+        var row = columns.map(function (column) {
+            return record[column.COLUMN_NAME];
+        });
+        rows.push(row);
+    }
+    return rows;
+}
+
+function drawChart(data) {
+    var dataTable = makeDataTable(data);
+    if (dataTable.data.length != 0) {
+        gadgetConfig.chartConfig.width = $("#placeholder").width();
+        gadgetConfig.chartConfig.height = $("#placeholder").height() - 65;
+        var chartType = gadgetConfig.chartConfig.chartType;
+        var xAxis = gadgetConfig.chartConfig.xAxis;
+        var chart;
+        jQuery("#noChart").html("");
+        if (chartType === "bar" && dataTable.metadata.types[xAxis] === "N") {
+            dataTable.metadata.types[xAxis] = "C";
+        }
+
+        if (gadgetConfig.chartConfig.chartType === "tabular" || gadgetConfig.chartConfig.chartType === "singleNumber") {
+            gadgetConfig.chartConfig.height = $("#placeholder").height();
+            chart = igviz.draw("#placeholder", gadgetConfig.chartConfig, dataTable);
+            chart.plot(dataTable.data);
+
+        } else {
+            chart = igviz.setUp("#placeholder", gadgetConfig.chartConfig, dataTable);
+            chart.setXAxis({
+                "labelAngle": -35,
+                "labelAlign": "right",
+                "labelDy": 0,
+                "labelDx": 0,
+                "titleDy": 25
+            })
+                .setYAxis({
+                    "titleDy": -30
+                });
+            chart.plot(dataTable.data);
+        }
+    } else {
+        jQuery("#placeholder").html("");
+        jQuery("#placeholder").append('<div id="noChart"><table><tr><td style="padding:30px 20px 0px 20px"><img src="../../portal/images/noEvents.png" align="left" style="width:24;height:24"/></td><td><br/><b><p><br/>Data is not available for selected application, cluster and time interval</p></b></td></tr></table></div>');
+    }
+    //releasing the latch so that we can request data again from the backend.
+    dataLoaded = true;
+}
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/outputAdapterUiLibrary.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/outputAdapterUiLibrary.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/outputAdapterUiLibrary.js
new file mode 100644
index 0000000..646b464
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/outputAdapterUiLibrary.js
@@ -0,0 +1,275 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+var CONSTANTS = {
+    webAppName: 'outputui',
+    urlSeperator: '/',
+    urlGetParameter: '?lastUpdatedTime=',
+    tenantUrlAttribute: 't',
+    urlUnsecureTransportHttp: 'http://',
+    urlUnsecureTransportWebsocket: 'ws://',
+    urlSecureTransportWebsocket: 'wss://',
+    urlSecureTransportHttp: 'https://',
+    colon: ':',
+    defaultIntervalTime: 10 * 1000,
+    defaultUserDomain: 'carbon.super',
+    defaultHostName: 'localhost',
+    defaultNonsecurePortNumber: '9763',
+    defaultSecurePortNumber: '9443',
+    defaultMode: 'AUTO',
+    processModeHTTP: 'HTTP',
+    processModeWebSocket: 'WEBSOCKET',
+    processModeAuto: 'AUTO',
+    domain: 'carbon.super',
+    numThousand: 1000,
+    websocketTimeAppender: 400,
+    secureMode: 'SECURED'
+};
+
+
+var websocket = null;
+var webSocketUrl;
+var httpUrl;
+var cepHostName;
+var cepPortNumber;
+var isErrorOccured = false;
+var lastUpdatedtime = -1;
+var polingInterval;
+var stream;
+var streamVersion;
+var firstPollingAttempt;
+var processMode;
+var onSuccessFunction;
+var onErrorFunction;
+var userDomainUrl = "";
+var terminateWebsocketInstance = false;
+var pollingContinue = true;
+var transportToBeUsedHttp;
+var transportToBeUsedWebsocket;
+
+function subscribe(streamName, version, intervalTime, domain,
+                   listeningFuncSuccessData, listeningFuncErrorData, cepHost, cepPort, mode, secureMode) {
+
+    stopPollingProcesses();
+    stream = streamName;
+    streamVersion = version;
+    onSuccessFunction = listeningFuncSuccessData;
+    onErrorFunction = listeningFuncErrorData;
+
+    if (secureMode == CONSTANTS.secureMode) {
+        transportToBeUsedHttp = CONSTANTS.urlSecureTransportHttp;
+        transportToBeUsedWebsocket = CONSTANTS.urlSecureTransportWebsocket;
+    } else {
+        transportToBeUsedHttp = CONSTANTS.urlUnsecureTransportHttp;
+        transportToBeUsedWebsocket = CONSTANTS.urlUnsecureTransportWebsocket;
+    }
+
+    if (intervalTime == null || intervalTime == "") {
+        polingInterval = CONSTANTS.defaultIntervalTime;
+    } else {
+        polingInterval = intervalTime * CONSTANTS.numThousand;
+    }
+
+    if (domain == null || domain == "") {
+        domain = CONSTANTS.defaultUserDomain;
+    }
+
+    if (cepHost == null || cepHost == "") {
+        cepHostName = CONSTANTS.defaultHostName;
+    } else {
+        cepHostName = cepHost;
+    }
+
+    if (cepPort == null || cepPort == "") {
+        if (secureMode == CONSTANTS.secureMode) {
+            cepPortNumber = CONSTANTS.defaultSecurePortNumber;
+        } else {
+            cepPortNumber = CONSTANTS.defaultNonsecurePortNumber;
+        }
+    } else {
+        cepPortNumber = cepPort;
+    }
+
+    if (mode == null || mode == "") {
+        processMode = CONSTANTS.defaultMode;
+    } else {
+        processMode = mode;
+    }
+
+    if (domain != CONSTANTS.domain) {
+        userDomainUrl = CONSTANTS.tenantUrlAttribute + CONSTANTS.urlSeperator + domain + CONSTANTS.urlSeperator;
+
+    }
+    webSocketUrl = transportToBeUsedWebsocket + cepHostName + CONSTANTS.colon + cepPortNumber +
+        CONSTANTS.urlSeperator + CONSTANTS.webAppName + CONSTANTS.urlSeperator + userDomainUrl + stream +
+        CONSTANTS.urlSeperator + streamVersion;
+
+    if (processMode == CONSTANTS.processModeHTTP) {
+        firstPollingAttempt = true;
+        pollingContinue = true;
+        startPoll();
+    } else {
+        initializeWebSocket(webSocketUrl);
+    }
+}
+
+
+/**
+ * Initializing Web Socket
+ */
+function initializeWebSocket(webSocketUrl) {
+    websocket = new WebSocket(webSocketUrl);
+    websocket.onopen = webSocketOnOpen;
+    websocket.onmessage = webSocketOnMessage;
+    websocket.onclose = webSocketOnClose;
+    websocket.onerror = webSocketOnError;
+}
+
+/**
+ * Web socket On Open
+ */
+
+var webSocketOnOpen = function () {
+    // alert("Successfully connected to "+webSocketUrl);
+    //onErrorFunction("Successfully connected to URL:" + webSocketUrl + "\n");
+};
+
+
+/**
+ * On server sends a message
+ */
+var webSocketOnMessage = function (evt) {
+    var event = evt.data;
+    var array = JSON.parse(event);
+    constructPayload(array);
+};
+
+/**
+ * On server close
+ */
+var webSocketOnClose = function (e) {
+
+    if (isErrorOccured) {
+        if (processMode != CONSTANTS.processModeWebSocket) {
+            firstPollingAttempt = true;
+            pollingContinue = true;
+            startPoll();
+        }
+    } else {
+        if (!terminateWebsocketInstance) {
+            waitForSocketConnection(websocket);
+        } else {
+            terminateWebsocketInstance = false;
+        }
+
+    }
+};
+
+/**
+ * On server Error
+ */
+var webSocketOnError = function (err) {
+    var error = "Error: Cannot connect to Websocket URL:" + webSocketUrl + " .Hence closing the connection!";
+
+    onErrorFunction(error);
+    isErrorOccured = true;
+
+};
+
+/**
+ * Gracefully increments the connection retry
+ */
+var waitTime = CONSTANTS.numThousand;
+function waitForSocketConnection(socket, callback) {
+    setTimeout(
+        function () {
+            if (socket.readyState === 1) {
+                initializeWebSocket(webSocketUrl);
+                console.log("Connection is made");
+                if (callback != null) {
+                    callback();
+                }
+                return;
+            } else {
+                websocket = new WebSocket(webSocketUrl);
+                waitTime += CONSTANTS.websocketTimeAppender;
+                waitForSocketConnection(websocket, callback);
+            }
+        }, waitTime);
+}
+
+/**
+ * Polling to retrieve events from http request periodically
+ */
+function startPoll() {
+
+    (function poll() {
+        setTimeout(function () {
+            httpUrl = transportToBeUsedHttp + cepHostName + CONSTANTS.colon + cepPortNumber + CONSTANTS.urlSeperator
+                + CONSTANTS.webAppName + CONSTANTS.urlSeperator + userDomainUrl + stream + CONSTANTS.urlSeperator +
+                streamVersion + CONSTANTS.urlGetParameter + lastUpdatedtime;
+
+            $.getJSON(httpUrl, function (responseText) {
+                if (firstPollingAttempt) {
+                    /*var data = $("textarea#idConsole").val();
+                     $("textarea#idConsole").val(data + "Successfully connected to HTTP.");*/
+                    firstPollingAttempt = false;
+                }
+
+                var eventList = $.parseJSON(responseText.events);
+                if (eventList.length != 0) {
+                    lastUpdatedtime = responseText.lastEventTime;
+                    for (var i = 0; i < eventList.length; i++) {
+                        var arr = eventList[i];
+                        constructPayload(arr);
+                    }
+                }
+                if (pollingContinue) {
+                    startPoll();
+                }
+            })
+                .fail(function (errorData) {
+                    var errorData = JSON.parse(errorData.responseText);
+                    onErrorFunction(errorData.error);
+                });
+        }, polingInterval);
+    })()
+}
+
+function stopPollingProcesses() {
+
+    //stopping the Websocket
+    if (websocket != null) {
+        terminateWebsocketInstance = true;
+        websocket.onclose;
+    }
+    //stopping the HTTPS Request
+    pollingContinue = false;
+
+}
+
+function constructPayload(eventsArray) {
+
+    var streamId = stream + CONSTANTS.colon + streamVersion;
+    var twoDimentionalArray = [eventsArray];
+    onSuccessFunction(streamId, twoDimentionalArray);
+
+}
\ No newline at end of file


[21/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.geomap.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.geomap.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.geomap.min.js
new file mode 100644
index 0000000..45f87a0
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.geomap.min.js
@@ -0,0 +1,538 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+"use strict";
+function addAccessor(f, e, d) {
+    f[e] = function (c) {
+        return "undefined" == typeof c ? f.properties[e] || d : (f.properties[e] = c, f)
+    }
+}
+function _classCallCheck(f, e) {
+    if (!(f instanceof e))throw new TypeError("Cannot call a class as a function")
+}
+function _classCallCheck(f, e) {
+    if (!(f instanceof e))throw new TypeError("Cannot call a class as a function")
+}
+function _inherits(f, e) {
+    if ("function" != typeof e && null !== e)throw new TypeError("Super expression must either be null or a function, not " + typeof e);
+    f.prototype = Object.create(e && e.prototype, {
+        constructor: {
+            value: f,
+            enumerable: !1,
+            writable: !0,
+            configurable: !0
+        }
+    }), e && (f.__proto__ = e)
+}
+var colorbrewer = {
+    YlGn: {
+        3: ["#f7fcb9", "#addd8e", "#31a354"],
+        4: ["#ffffcc", "#c2e699", "#78c679", "#238443"],
+        5: ["#ffffcc", "#c2e699", "#78c679", "#31a354", "#006837"],
+        6: ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#31a354", "#006837"],
+        7: ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"],
+        8: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"],
+        9: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#006837", "#004529"]
+    },
+    YlGnBu: {
+        3: ["#edf8b1", "#7fcdbb", "#2c7fb8"],
+        4: ["#ffffcc", "#a1dab4", "#41b6c4", "#225ea8"],
+        5: ["#ffffcc", "#a1dab4", "#41b6c4", "#2c7fb8", "#253494"],
+        6: ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#2c7fb8", "#253494"],
+        7: ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"],
+        8: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"],
+        9: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#253494", "#081d58"]
+    },
+    GnBu: {
+        3: ["#e0f3db", "#a8ddb5", "#43a2ca"],
+        4: ["#f0f9e8", "#bae4bc", "#7bccc4", "#2b8cbe"],
+        5: ["#f0f9e8", "#bae4bc", "#7bccc4", "#43a2ca", "#0868ac"],
+        6: ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#43a2ca", "#0868ac"],
+        7: ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"],
+        8: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"],
+        9: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#0868ac", "#084081"]
+    },
+    BuGn: {
+        3: ["#e5f5f9", "#99d8c9", "#2ca25f"],
+        4: ["#edf8fb", "#b2e2e2", "#66c2a4", "#238b45"],
+        5: ["#edf8fb", "#b2e2e2", "#66c2a4", "#2ca25f", "#006d2c"],
+        6: ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#2ca25f", "#006d2c"],
+        7: ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"],
+        8: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"],
+        9: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#006d2c", "#00441b"]
+    },
+    PuBuGn: {
+        3: ["#ece2f0", "#a6bddb", "#1c9099"],
+        4: ["#f6eff7", "#bdc9e1", "#67a9cf", "#02818a"],
+        5: ["#f6eff7", "#bdc9e1", "#67a9cf", "#1c9099", "#016c59"],
+        6: ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#1c9099", "#016c59"],
+        7: ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"],
+        8: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"],
+        9: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016c59", "#014636"]
+    },
+    PuBu: {
+        3: ["#ece7f2", "#a6bddb", "#2b8cbe"],
+        4: ["#f1eef6", "#bdc9e1", "#74a9cf", "#0570b0"],
+        5: ["#f1eef6", "#bdc9e1", "#74a9cf", "#2b8cbe", "#045a8d"],
+        6: ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#2b8cbe", "#045a8d"],
+        7: ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"],
+        8: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"],
+        9: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#045a8d", "#023858"]
+    },
+    BuPu: {
+        3: ["#e0ecf4", "#9ebcda", "#8856a7"],
+        4: ["#edf8fb", "#b3cde3", "#8c96c6", "#88419d"],
+        5: ["#edf8fb", "#b3cde3", "#8c96c6", "#8856a7", "#810f7c"],
+        6: ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8856a7", "#810f7c"],
+        7: ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"],
+        8: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"],
+        9: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#810f7c", "#4d004b"]
+    },
+    RdPu: {
+        3: ["#fde0dd", "#fa9fb5", "#c51b8a"],
+        4: ["#feebe2", "#fbb4b9", "#f768a1", "#ae017e"],
+        5: ["#feebe2", "#fbb4b9", "#f768a1", "#c51b8a", "#7a0177"],
+        6: ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"],
+        7: ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"],
+        8: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"],
+        9: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177", "#49006a"]
+    },
+    PuRd: {
+        3: ["#e7e1ef", "#c994c7", "#dd1c77"],
+        4: ["#f1eef6", "#d7b5d8", "#df65b0", "#ce1256"],
+        5: ["#f1eef6", "#d7b5d8", "#df65b0", "#dd1c77", "#980043"],
+        6: ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#dd1c77", "#980043"],
+        7: ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"],
+        8: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"],
+        9: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#980043", "#67001f"]
+    },
+    OrRd: {
+        3: ["#fee8c8", "#fdbb84", "#e34a33"],
+        4: ["#fef0d9", "#fdcc8a", "#fc8d59", "#d7301f"],
+        5: ["#fef0d9", "#fdcc8a", "#fc8d59", "#e34a33", "#b30000"],
+        6: ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#e34a33", "#b30000"],
+        7: ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"],
+        8: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"],
+        9: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#b30000", "#7f0000"]
+    },
+    YlOrRd: {
+        3: ["#ffeda0", "#feb24c", "#f03b20"],
+        4: ["#ffffb2", "#fecc5c", "#fd8d3c", "#e31a1c"],
+        5: ["#ffffb2", "#fecc5c", "#fd8d3c", "#f03b20", "#bd0026"],
+        6: ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#f03b20", "#bd0026"],
+        7: ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"],
+        8: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"],
+        9: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#bd0026", "#800026"]
+    },
+    YlOrBr: {
+        3: ["#fff7bc", "#fec44f", "#d95f0e"],
+        4: ["#ffffd4", "#fed98e", "#fe9929", "#cc4c02"],
+        5: ["#ffffd4", "#fed98e", "#fe9929", "#d95f0e", "#993404"],
+        6: ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#d95f0e", "#993404"],
+        7: ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"],
+        8: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"],
+        9: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#993404", "#662506"]
+    },
+    Purples: {
+        3: ["#efedf5", "#bcbddc", "#756bb1"],
+        4: ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#6a51a3"],
+        5: ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#756bb1", "#54278f"],
+        6: ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#756bb1", "#54278f"],
+        7: ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"],
+        8: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"],
+        9: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#54278f", "#3f007d"]
+    },
+    Blues: {
+        3: ["#deebf7", "#9ecae1", "#3182bd"],
+        4: ["#eff3ff", "#bdd7e7", "#6baed6", "#2171b5"],
+        5: ["#eff3ff", "#bdd7e7", "#6baed6", "#3182bd", "#08519c"],
+        6: ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#3182bd", "#08519c"],
+        7: ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"],
+        8: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"],
+        9: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#08519c", "#08306b"]
+    },
+    Greens: {
+        3: ["#e5f5e0", "#a1d99b", "#31a354"],
+        4: ["#edf8e9", "#bae4b3", "#74c476", "#238b45"],
+        5: ["#edf8e9", "#bae4b3", "#74c476", "#31a354", "#006d2c"],
+        6: ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#31a354", "#006d2c"],
+        7: ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"],
+        8: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"],
+        9: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#006d2c", "#00441b"]
+    },
+    Oranges: {
+        3: ["#fee6ce", "#fdae6b", "#e6550d"],
+        4: ["#feedde", "#fdbe85", "#fd8d3c", "#d94701"],
+        5: ["#feedde", "#fdbe85", "#fd8d3c", "#e6550d", "#a63603"],
+        6: ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#e6550d", "#a63603"],
+        7: ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"],
+        8: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"],
+        9: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#a63603", "#7f2704"]
+    },
+    Reds: {
+        3: ["#fee0d2", "#fc9272", "#de2d26"],
+        4: ["#fee5d9", "#fcae91", "#fb6a4a", "#cb181d"],
+        5: ["#fee5d9", "#fcae91", "#fb6a4a", "#de2d26", "#a50f15"],
+        6: ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#de2d26", "#a50f15"],
+        7: ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"],
+        8: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"],
+        9: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#a50f15", "#67000d"]
+    },
+    Greys: {
+        3: ["#f0f0f0", "#bdbdbd", "#636363"],
+        4: ["#f7f7f7", "#cccccc", "#969696", "#525252"],
+        5: ["#f7f7f7", "#cccccc", "#969696", "#636363", "#252525"],
+        6: ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#636363", "#252525"],
+        7: ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"],
+        8: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"],
+        9: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525", "#000000"]
+    },
+    PuOr: {
+        3: ["#f1a340", "#f7f7f7", "#998ec3"],
+        4: ["#e66101", "#fdb863", "#b2abd2", "#5e3c99"],
+        5: ["#e66101", "#fdb863", "#f7f7f7", "#b2abd2", "#5e3c99"],
+        6: ["#b35806", "#f1a340", "#fee0b6", "#d8daeb", "#998ec3", "#542788"],
+        7: ["#b35806", "#f1a340", "#fee0b6", "#f7f7f7", "#d8daeb", "#998ec3", "#542788"],
+        8: ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788"],
+        9: ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788"],
+        10: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"],
+        11: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"]
+    },
+    BrBG: {
+        3: ["#d8b365", "#f5f5f5", "#5ab4ac"],
+        4: ["#a6611a", "#dfc27d", "#80cdc1", "#018571"],
+        5: ["#a6611a", "#dfc27d", "#f5f5f5", "#80cdc1", "#018571"],
+        6: ["#8c510a", "#d8b365", "#f6e8c3", "#c7eae5", "#5ab4ac", "#01665e"],
+        7: ["#8c510a", "#d8b365", "#f6e8c3", "#f5f5f5", "#c7eae5", "#5ab4ac", "#01665e"],
+        8: ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e"],
+        9: ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e"],
+        10: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"],
+        11: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"]
+    },
+    PRGn: {
+        3: ["#af8dc3", "#f7f7f7", "#7fbf7b"],
+        4: ["#7b3294", "#c2a5cf", "#a6dba0", "#008837"],
+        5: ["#7b3294", "#c2a5cf", "#f7f7f7", "#a6dba0", "#008837"],
+        6: ["#762a83", "#af8dc3", "#e7d4e8", "#d9f0d3", "#7fbf7b", "#1b7837"],
+        7: ["#762a83", "#af8dc3", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#7fbf7b", "#1b7837"],
+        8: ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"],
+        9: ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"],
+        10: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"],
+        11: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"]
+    },
+    PiYG: {
+        3: ["#e9a3c9", "#f7f7f7", "#a1d76a"],
+        4: ["#d01c8b", "#f1b6da", "#b8e186", "#4dac26"],
+        5: ["#d01c8b", "#f1b6da", "#f7f7f7", "#b8e186", "#4dac26"],
+        6: ["#c51b7d", "#e9a3c9", "#fde0ef", "#e6f5d0", "#a1d76a", "#4d9221"],
+        7: ["#c51b7d", "#e9a3c9", "#fde0ef", "#f7f7f7", "#e6f5d0", "#a1d76a", "#4d9221"],
+        8: ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"],
+        9: ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"],
+        10: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"],
+        11: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"]
+    },
+    RdBu: {
+        3: ["#ef8a62", "#f7f7f7", "#67a9cf"],
+        4: ["#ca0020", "#f4a582", "#92c5de", "#0571b0"],
+        5: ["#ca0020", "#f4a582", "#f7f7f7", "#92c5de", "#0571b0"],
+        6: ["#b2182b", "#ef8a62", "#fddbc7", "#d1e5f0", "#67a9cf", "#2166ac"],
+        7: ["#b2182b", "#ef8a62", "#fddbc7", "#f7f7f7", "#d1e5f0", "#67a9cf", "#2166ac"],
+        8: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"],
+        9: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"],
+        10: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"],
+        11: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"]
+    },
+    RdGy: {
+        3: ["#ef8a62", "#ffffff", "#999999"],
+        4: ["#ca0020", "#f4a582", "#bababa", "#404040"],
+        5: ["#ca0020", "#f4a582", "#ffffff", "#bababa", "#404040"],
+        6: ["#b2182b", "#ef8a62", "#fddbc7", "#e0e0e0", "#999999", "#4d4d4d"],
+        7: ["#b2182b", "#ef8a62", "#fddbc7", "#ffffff", "#e0e0e0", "#999999", "#4d4d4d"],
+        8: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"],
+        9: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"],
+        10: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"],
+        11: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"]
+    },
+    RdYlBu: {
+        3: ["#fc8d59", "#ffffbf", "#91bfdb"],
+        4: ["#d7191c", "#fdae61", "#abd9e9", "#2c7bb6"],
+        5: ["#d7191c", "#fdae61", "#ffffbf", "#abd9e9", "#2c7bb6"],
+        6: ["#d73027", "#fc8d59", "#fee090", "#e0f3f8", "#91bfdb", "#4575b4"],
+        7: ["#d73027", "#fc8d59", "#fee090", "#ffffbf", "#e0f3f8", "#91bfdb", "#4575b4"],
+        8: ["#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"],
+        9: ["#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"],
+        10: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"],
+        11: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"]
+    },
+    Spectral: {
+        3: ["#fc8d59", "#ffffbf", "#99d594"],
+        4: ["#d7191c", "#fdae61", "#abdda4", "#2b83ba"],
+        5: ["#d7191c", "#fdae61", "#ffffbf", "#abdda4", "#2b83ba"],
+        6: ["#d53e4f", "#fc8d59", "#fee08b", "#e6f598", "#99d594", "#3288bd"],
+        7: ["#d53e4f", "#fc8d59", "#fee08b", "#ffffbf", "#e6f598", "#99d594", "#3288bd"],
+        8: ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"],
+        9: ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"],
+        10: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"],
+        11: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"]
+    },
+    RdYlGn: {
+        3: ["#fc8d59", "#ffffbf", "#91cf60"],
+        4: ["#d7191c", "#fdae61", "#a6d96a", "#1a9641"],
+        5: ["#d7191c", "#fdae61", "#ffffbf", "#a6d96a", "#1a9641"],
+        6: ["#d73027", "#fc8d59", "#fee08b", "#d9ef8b", "#91cf60", "#1a9850"],
+        7: ["#d73027", "#fc8d59", "#fee08b", "#ffffbf", "#d9ef8b", "#91cf60", "#1a9850"],
+        8: ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"],
+        9: ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"],
+        10: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"],
+        11: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"]
+    },
+    Accent: {
+        3: ["#7fc97f", "#beaed4", "#fdc086"],
+        4: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99"],
+        5: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0"],
+        6: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f"],
+        7: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17"],
+        8: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17", "#666666"]
+    },
+    Dark2: {
+        3: ["#1b9e77", "#d95f02", "#7570b3"],
+        4: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a"],
+        5: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e"],
+        6: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02"],
+        7: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d"],
+        8: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d", "#666666"]
+    },
+    Paired: {
+        3: ["#a6cee3", "#1f78b4", "#b2df8a"],
+        4: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c"],
+        5: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99"],
+        6: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c"],
+        7: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f"],
+        8: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00"],
+        9: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6"],
+        10: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a"],
+        11: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99"],
+        12: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99", "#b15928"]
+    },
+    Pastel1: {
+        3: ["#fbb4ae", "#b3cde3", "#ccebc5"],
+        4: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4"],
+        5: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6"],
+        6: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc"],
+        7: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd"],
+        8: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec"],
+        9: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec", "#f2f2f2"]
+    },
+    Pastel2: {
+        3: ["#b3e2cd", "#fdcdac", "#cbd5e8"],
+        4: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4"],
+        5: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9"],
+        6: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae"],
+        7: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc"],
+        8: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc", "#cccccc"]
+    },
+    Set1: {
+        3: ["#e41a1c", "#377eb8", "#4daf4a"],
+        4: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3"],
+        5: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00"],
+        6: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33"],
+        7: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628"],
+        8: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf"],
+        9: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf", "#999999"]
+    },
+    Set2: {
+        3: ["#66c2a5", "#fc8d62", "#8da0cb"],
+        4: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3"],
+        5: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854"],
+        6: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f"],
+        7: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494"],
+        8: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"]
+    },
+    Set3: {
+        3: ["#8dd3c7", "#ffffb3", "#bebada"],
+        4: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072"],
+        5: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3"],
+        6: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462"],
+        7: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69"],
+        8: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5"],
+        9: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9"],
+        10: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd"],
+        11: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5"],
+        12: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"]
+    }
+}, _createClass = function () {
+    function f(f, e) {
+        for (var d = 0; d < e.length; d++) {
+            var c = e[d];
+            c.enumerable = c.enumerable || !1, c.configurable = !0, "value"in c && (c.writable = !0), Object.defineProperty(f, c.key, c)
+        }
+    }
+
+    return function (e, d, c) {
+        return d && f(e.prototype, d), c && f(e, c), e
+    }
+}(), Geomap = function () {
+    function f() {
+        _classCallCheck(this, f), this.properties = {
+            geofile: null,
+            height: null,
+            postUpdate: null,
+            projection: d3.geo.naturalEarth,
+            rotate: [0, 0, 0],
+            scale: null,
+            translate: null,
+            unitId: "iso3",
+            unitPrefix: "unit-",
+            units: "units",
+            unitTitle: function (f) {
+                return f.properties.name
+            },
+            width: null,
+            zoomFactor: 4
+        };
+        for (var e in this.properties)addAccessor(this, e, this.properties[e]);
+        this._ = {}
+    }
+
+    return _createClass(f, [{
+        key: "clicked", value: function (f) {
+            var e = this, d = 1, c = this.properties.width / 2, a = this.properties.height / 2, b = c, t = a;
+            if (f && f.hasOwnProperty("geometry") && this._.centered !== f) {
+                var r = this.path.centroid(f);
+                b = r[0], t = r[1], d = this.properties.zoomFactor, this._.centered = f
+            } else this._.centered = null;
+            this.svg.selectAll("path.unit").classed("active", this._.centered && function (f) {
+                    return f === e._.centered
+                }), this.svg.selectAll("g.zoom").transition().duration(750).attr("transform", "translate(" + c + ", " + a + ")scale(" + d + ")translate(-" + b + ", -" + t + ")")
+        }
+    }, {
+        key: "draw", value: function (f, e) {
+            e.properties.width || (e.properties.width = f.node().getBoundingClientRect().width), e.properties.height || (e.properties.height = e.properties.width / 1.92), e.properties.scale || (e.properties.scale = e.properties.width / 5.8), e.properties.translate || (e.properties.translate = [e.properties.width / 2, e.properties.height / 2]), e.svg = f.append("svg").attr("width", e.properties.width).attr("height", e.properties.height), e.svg.append("rect").attr("class", "background").attr("width", e.properties.width).attr("height", e.properties.height).on("click", e.clicked.bind(e));
+            var d = e.properties.projection().scale(e.properties.scale).translate(e.properties.translate).precision(.1);
+            d.hasOwnProperty("rotate") && e.properties.rotate && d.rotate(e.properties.rotate), e.path = d3.geo.path().projection(d), d3.json(e.properties.geofile, function (f, d) {
+                e.geo = d, e.svg.append("g").attr("class", "units zoom").selectAll("path").data(topojson.feature(d, d.objects[e.properties.units]).features).enter().append("path").attr("class", function (f) {
+                    return "unit " + e.properties.unitPrefix + f.id
+                }).attr("d", e.path).on("click", e.clicked.bind(e)).append("title").text(e.properties.unitTitle), e.update()
+            })
+        }
+    }, {
+        key: "update", value: function () {
+            this.properties.postUpdate && this.properties.postUpdate()
+        }
+    }]), f
+}();
+d3.geomap = function () {
+    return new Geomap
+};
+var _createClass = function () {
+    function f(f, e) {
+        for (var d = 0; d < e.length; d++) {
+            var c = e[d];
+            c.enumerable = c.enumerable || !1, c.configurable = !0, "value"in c && (c.writable = !0), Object.defineProperty(f, c.key, c)
+        }
+    }
+
+    return function (e, d, c) {
+        return d && f(e.prototype, d), c && f(e, c), e
+    }
+}(), _get = function (f, e, d) {
+    for (var c = !0; c;) {
+        var a = f, b = e, t = d;
+        r = i = n = void 0, c = !1;
+        var r = Object.getOwnPropertyDescriptor(a, b);
+        if (void 0 !== r) {
+            if ("value"in r)return r.value;
+            var n = r.get;
+            return void 0 === n ? void 0 : n.call(t)
+        }
+        var i = Object.getPrototypeOf(a);
+        if (null === i)return void 0;
+        f = i, e = b, d = t, c = !0
+    }
+}, Choropleth = function (f) {
+    function e() {
+        _classCallCheck(this, e), _get(Object.getPrototypeOf(e.prototype), "constructor", this).call(this);
+        var f = {
+            colors: colorbrewer.OrRd[9],
+            column: null,
+            domain: null,
+            duration: null,
+            format: d3.format(",.02f"),
+            legend: !1,
+            valueScale: d3.scale.quantize
+        };
+        for (var d in f)this.properties[d] = f[d], addAccessor(this, d, f[d])
+    }
+
+    return _inherits(e, f), _createClass(e, [{
+        key: "columnVal", value: function (f) {
+            return +f[this.properties.column]
+        }
+    }, {
+        key: "draw", value: function (f, d) {
+            d.data = f.datum(), _get(Object.getPrototypeOf(e.prototype), "draw", this).call(this, f, d)
+        }
+    }, {
+        key: "update", value: function () {
+            var f = this;
+            f.extent = d3.extent(f.data, f.columnVal.bind(f)), f.colorScale = f.properties.valueScale().domain(f.properties.domain || f.extent).range(f.properties.colors), f.svg.selectAll("path.unit").style("fill", null), f.data.forEach(function (e) {
+                var d = e[f.properties.unitId], c = e[f.properties.column], a = f.colorScale(c), b = f.svg.selectAll("." + f.properties.unitPrefix + d);
+                if (!b.empty()) {
+                    f.properties.duration ? b.transition().duration(f.properties.duration).style("fill", a) : b.style("fill", a);
+                    var t = f.properties.unitTitle(b.datum());
+                    c = f.properties.format(c), b.select("title").text("" + t + "\n\n" + f.properties.column + ": " + c)
+                }
+            }), f.properties.legend && f.drawLegend(f.properties.legend), _get(Object.getPrototypeOf(e.prototype), "update", this).call(this)
+        }
+    }, {
+        key: "drawLegend", value: function () {
+            var f = void 0 === arguments[0] ? null : arguments[0], e = this, d = e.properties.colors.length, c = void 0, a = void 0, b = 10, t = 3;
+            f === !0 ? (c = e.properties.width / b, a = e.properties.height / t) : (c = f.width, a = f.height);
+            var r = c / (.75 * b), n = a - a / (1.8 * t), i = r / 2, o = e.properties.height - a, s = "translate(" + i + "," + 3 * i + ")";
+            e.svg.select("g.legend").remove();
+            var p = e.properties.colors.slice().reverse(), l = n / d, u = t / l, h = e.svg.append("g").attr("class", "legend").attr("width", c).attr("height", a).attr("transform", "translate(0," + o + ")");
+            h.append("rect").style("fill", "#fff").attr("class", "legend-bg").attr("width", c).attr("height", a), h.append("rect").attr("class", "legend-bar").attr("width", r).attr("height", n).attr("transform", s);
+            var g = h.append("g").attr("transform", s);
+            g.selectAll("rect").data(p).enter().append("rect").attr("y", function (f, e) {
+                return e * l
+            }).attr("fill", function (f, e) {
+                return p[e]
+            }).attr("width", r).attr("height", l);
+            var v = e.extent[0], m = e.extent[1], y = !1, w = !1;
+            e.properties.domain && (e.properties.domain[1] < m && (w = !0), m = e.properties.domain[1], e.properties.domain[0] > v && (y = !0), v = e.properties.domain[0]), g.selectAll("text").data(p).enter().append("text").text(function (f, c) {
+                if (c === d - 1) {
+                    var a = e.properties.format(v);
+                    return y && (a = "< " + a), a
+                }
+                return e.properties.format(e.colorScale.invertExtent(f)[0])
+            }).attr("class", function (f, e) {
+                return "text-" + e
+            }).attr("x", r + i).attr("y", function (f, e) {
+                return e * l + (l + l * u)
+            }), g.append("text").text(function () {
+                var f = e.properties.format(m);
+                return w && (f = "> " + f), f
+            }).attr("x", r + i).attr("y", i * u * 2)
+        }
+    }]), e
+}(Geomap);
+d3.geomap.choropleth = function () {
+    return new Choropleth
+};
\ No newline at end of file


[10/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.geomap.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.geomap.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.geomap.min.js
new file mode 100644
index 0000000..45f87a0
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/d3.geomap.min.js
@@ -0,0 +1,538 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+"use strict";
+function addAccessor(f, e, d) {
+    f[e] = function (c) {
+        return "undefined" == typeof c ? f.properties[e] || d : (f.properties[e] = c, f)
+    }
+}
+function _classCallCheck(f, e) {
+    if (!(f instanceof e))throw new TypeError("Cannot call a class as a function")
+}
+function _classCallCheck(f, e) {
+    if (!(f instanceof e))throw new TypeError("Cannot call a class as a function")
+}
+function _inherits(f, e) {
+    if ("function" != typeof e && null !== e)throw new TypeError("Super expression must either be null or a function, not " + typeof e);
+    f.prototype = Object.create(e && e.prototype, {
+        constructor: {
+            value: f,
+            enumerable: !1,
+            writable: !0,
+            configurable: !0
+        }
+    }), e && (f.__proto__ = e)
+}
+var colorbrewer = {
+    YlGn: {
+        3: ["#f7fcb9", "#addd8e", "#31a354"],
+        4: ["#ffffcc", "#c2e699", "#78c679", "#238443"],
+        5: ["#ffffcc", "#c2e699", "#78c679", "#31a354", "#006837"],
+        6: ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#31a354", "#006837"],
+        7: ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"],
+        8: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"],
+        9: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#006837", "#004529"]
+    },
+    YlGnBu: {
+        3: ["#edf8b1", "#7fcdbb", "#2c7fb8"],
+        4: ["#ffffcc", "#a1dab4", "#41b6c4", "#225ea8"],
+        5: ["#ffffcc", "#a1dab4", "#41b6c4", "#2c7fb8", "#253494"],
+        6: ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#2c7fb8", "#253494"],
+        7: ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"],
+        8: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"],
+        9: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#253494", "#081d58"]
+    },
+    GnBu: {
+        3: ["#e0f3db", "#a8ddb5", "#43a2ca"],
+        4: ["#f0f9e8", "#bae4bc", "#7bccc4", "#2b8cbe"],
+        5: ["#f0f9e8", "#bae4bc", "#7bccc4", "#43a2ca", "#0868ac"],
+        6: ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#43a2ca", "#0868ac"],
+        7: ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"],
+        8: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"],
+        9: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#0868ac", "#084081"]
+    },
+    BuGn: {
+        3: ["#e5f5f9", "#99d8c9", "#2ca25f"],
+        4: ["#edf8fb", "#b2e2e2", "#66c2a4", "#238b45"],
+        5: ["#edf8fb", "#b2e2e2", "#66c2a4", "#2ca25f", "#006d2c"],
+        6: ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#2ca25f", "#006d2c"],
+        7: ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"],
+        8: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"],
+        9: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#006d2c", "#00441b"]
+    },
+    PuBuGn: {
+        3: ["#ece2f0", "#a6bddb", "#1c9099"],
+        4: ["#f6eff7", "#bdc9e1", "#67a9cf", "#02818a"],
+        5: ["#f6eff7", "#bdc9e1", "#67a9cf", "#1c9099", "#016c59"],
+        6: ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#1c9099", "#016c59"],
+        7: ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"],
+        8: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"],
+        9: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016c59", "#014636"]
+    },
+    PuBu: {
+        3: ["#ece7f2", "#a6bddb", "#2b8cbe"],
+        4: ["#f1eef6", "#bdc9e1", "#74a9cf", "#0570b0"],
+        5: ["#f1eef6", "#bdc9e1", "#74a9cf", "#2b8cbe", "#045a8d"],
+        6: ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#2b8cbe", "#045a8d"],
+        7: ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"],
+        8: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"],
+        9: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#045a8d", "#023858"]
+    },
+    BuPu: {
+        3: ["#e0ecf4", "#9ebcda", "#8856a7"],
+        4: ["#edf8fb", "#b3cde3", "#8c96c6", "#88419d"],
+        5: ["#edf8fb", "#b3cde3", "#8c96c6", "#8856a7", "#810f7c"],
+        6: ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8856a7", "#810f7c"],
+        7: ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"],
+        8: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"],
+        9: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#810f7c", "#4d004b"]
+    },
+    RdPu: {
+        3: ["#fde0dd", "#fa9fb5", "#c51b8a"],
+        4: ["#feebe2", "#fbb4b9", "#f768a1", "#ae017e"],
+        5: ["#feebe2", "#fbb4b9", "#f768a1", "#c51b8a", "#7a0177"],
+        6: ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"],
+        7: ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"],
+        8: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"],
+        9: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177", "#49006a"]
+    },
+    PuRd: {
+        3: ["#e7e1ef", "#c994c7", "#dd1c77"],
+        4: ["#f1eef6", "#d7b5d8", "#df65b0", "#ce1256"],
+        5: ["#f1eef6", "#d7b5d8", "#df65b0", "#dd1c77", "#980043"],
+        6: ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#dd1c77", "#980043"],
+        7: ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"],
+        8: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"],
+        9: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#980043", "#67001f"]
+    },
+    OrRd: {
+        3: ["#fee8c8", "#fdbb84", "#e34a33"],
+        4: ["#fef0d9", "#fdcc8a", "#fc8d59", "#d7301f"],
+        5: ["#fef0d9", "#fdcc8a", "#fc8d59", "#e34a33", "#b30000"],
+        6: ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#e34a33", "#b30000"],
+        7: ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"],
+        8: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"],
+        9: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#b30000", "#7f0000"]
+    },
+    YlOrRd: {
+        3: ["#ffeda0", "#feb24c", "#f03b20"],
+        4: ["#ffffb2", "#fecc5c", "#fd8d3c", "#e31a1c"],
+        5: ["#ffffb2", "#fecc5c", "#fd8d3c", "#f03b20", "#bd0026"],
+        6: ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#f03b20", "#bd0026"],
+        7: ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"],
+        8: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"],
+        9: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#bd0026", "#800026"]
+    },
+    YlOrBr: {
+        3: ["#fff7bc", "#fec44f", "#d95f0e"],
+        4: ["#ffffd4", "#fed98e", "#fe9929", "#cc4c02"],
+        5: ["#ffffd4", "#fed98e", "#fe9929", "#d95f0e", "#993404"],
+        6: ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#d95f0e", "#993404"],
+        7: ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"],
+        8: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"],
+        9: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#993404", "#662506"]
+    },
+    Purples: {
+        3: ["#efedf5", "#bcbddc", "#756bb1"],
+        4: ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#6a51a3"],
+        5: ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#756bb1", "#54278f"],
+        6: ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#756bb1", "#54278f"],
+        7: ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"],
+        8: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"],
+        9: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#54278f", "#3f007d"]
+    },
+    Blues: {
+        3: ["#deebf7", "#9ecae1", "#3182bd"],
+        4: ["#eff3ff", "#bdd7e7", "#6baed6", "#2171b5"],
+        5: ["#eff3ff", "#bdd7e7", "#6baed6", "#3182bd", "#08519c"],
+        6: ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#3182bd", "#08519c"],
+        7: ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"],
+        8: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"],
+        9: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#08519c", "#08306b"]
+    },
+    Greens: {
+        3: ["#e5f5e0", "#a1d99b", "#31a354"],
+        4: ["#edf8e9", "#bae4b3", "#74c476", "#238b45"],
+        5: ["#edf8e9", "#bae4b3", "#74c476", "#31a354", "#006d2c"],
+        6: ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#31a354", "#006d2c"],
+        7: ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"],
+        8: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"],
+        9: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#006d2c", "#00441b"]
+    },
+    Oranges: {
+        3: ["#fee6ce", "#fdae6b", "#e6550d"],
+        4: ["#feedde", "#fdbe85", "#fd8d3c", "#d94701"],
+        5: ["#feedde", "#fdbe85", "#fd8d3c", "#e6550d", "#a63603"],
+        6: ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#e6550d", "#a63603"],
+        7: ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"],
+        8: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"],
+        9: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#a63603", "#7f2704"]
+    },
+    Reds: {
+        3: ["#fee0d2", "#fc9272", "#de2d26"],
+        4: ["#fee5d9", "#fcae91", "#fb6a4a", "#cb181d"],
+        5: ["#fee5d9", "#fcae91", "#fb6a4a", "#de2d26", "#a50f15"],
+        6: ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#de2d26", "#a50f15"],
+        7: ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"],
+        8: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"],
+        9: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#a50f15", "#67000d"]
+    },
+    Greys: {
+        3: ["#f0f0f0", "#bdbdbd", "#636363"],
+        4: ["#f7f7f7", "#cccccc", "#969696", "#525252"],
+        5: ["#f7f7f7", "#cccccc", "#969696", "#636363", "#252525"],
+        6: ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#636363", "#252525"],
+        7: ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"],
+        8: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"],
+        9: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525", "#000000"]
+    },
+    PuOr: {
+        3: ["#f1a340", "#f7f7f7", "#998ec3"],
+        4: ["#e66101", "#fdb863", "#b2abd2", "#5e3c99"],
+        5: ["#e66101", "#fdb863", "#f7f7f7", "#b2abd2", "#5e3c99"],
+        6: ["#b35806", "#f1a340", "#fee0b6", "#d8daeb", "#998ec3", "#542788"],
+        7: ["#b35806", "#f1a340", "#fee0b6", "#f7f7f7", "#d8daeb", "#998ec3", "#542788"],
+        8: ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788"],
+        9: ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788"],
+        10: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"],
+        11: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"]
+    },
+    BrBG: {
+        3: ["#d8b365", "#f5f5f5", "#5ab4ac"],
+        4: ["#a6611a", "#dfc27d", "#80cdc1", "#018571"],
+        5: ["#a6611a", "#dfc27d", "#f5f5f5", "#80cdc1", "#018571"],
+        6: ["#8c510a", "#d8b365", "#f6e8c3", "#c7eae5", "#5ab4ac", "#01665e"],
+        7: ["#8c510a", "#d8b365", "#f6e8c3", "#f5f5f5", "#c7eae5", "#5ab4ac", "#01665e"],
+        8: ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e"],
+        9: ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e"],
+        10: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"],
+        11: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"]
+    },
+    PRGn: {
+        3: ["#af8dc3", "#f7f7f7", "#7fbf7b"],
+        4: ["#7b3294", "#c2a5cf", "#a6dba0", "#008837"],
+        5: ["#7b3294", "#c2a5cf", "#f7f7f7", "#a6dba0", "#008837"],
+        6: ["#762a83", "#af8dc3", "#e7d4e8", "#d9f0d3", "#7fbf7b", "#1b7837"],
+        7: ["#762a83", "#af8dc3", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#7fbf7b", "#1b7837"],
+        8: ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"],
+        9: ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"],
+        10: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"],
+        11: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"]
+    },
+    PiYG: {
+        3: ["#e9a3c9", "#f7f7f7", "#a1d76a"],
+        4: ["#d01c8b", "#f1b6da", "#b8e186", "#4dac26"],
+        5: ["#d01c8b", "#f1b6da", "#f7f7f7", "#b8e186", "#4dac26"],
+        6: ["#c51b7d", "#e9a3c9", "#fde0ef", "#e6f5d0", "#a1d76a", "#4d9221"],
+        7: ["#c51b7d", "#e9a3c9", "#fde0ef", "#f7f7f7", "#e6f5d0", "#a1d76a", "#4d9221"],
+        8: ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"],
+        9: ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"],
+        10: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"],
+        11: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"]
+    },
+    RdBu: {
+        3: ["#ef8a62", "#f7f7f7", "#67a9cf"],
+        4: ["#ca0020", "#f4a582", "#92c5de", "#0571b0"],
+        5: ["#ca0020", "#f4a582", "#f7f7f7", "#92c5de", "#0571b0"],
+        6: ["#b2182b", "#ef8a62", "#fddbc7", "#d1e5f0", "#67a9cf", "#2166ac"],
+        7: ["#b2182b", "#ef8a62", "#fddbc7", "#f7f7f7", "#d1e5f0", "#67a9cf", "#2166ac"],
+        8: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"],
+        9: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"],
+        10: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"],
+        11: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"]
+    },
+    RdGy: {
+        3: ["#ef8a62", "#ffffff", "#999999"],
+        4: ["#ca0020", "#f4a582", "#bababa", "#404040"],
+        5: ["#ca0020", "#f4a582", "#ffffff", "#bababa", "#404040"],
+        6: ["#b2182b", "#ef8a62", "#fddbc7", "#e0e0e0", "#999999", "#4d4d4d"],
+        7: ["#b2182b", "#ef8a62", "#fddbc7", "#ffffff", "#e0e0e0", "#999999", "#4d4d4d"],
+        8: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"],
+        9: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"],
+        10: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"],
+        11: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"]
+    },
+    RdYlBu: {
+        3: ["#fc8d59", "#ffffbf", "#91bfdb"],
+        4: ["#d7191c", "#fdae61", "#abd9e9", "#2c7bb6"],
+        5: ["#d7191c", "#fdae61", "#ffffbf", "#abd9e9", "#2c7bb6"],
+        6: ["#d73027", "#fc8d59", "#fee090", "#e0f3f8", "#91bfdb", "#4575b4"],
+        7: ["#d73027", "#fc8d59", "#fee090", "#ffffbf", "#e0f3f8", "#91bfdb", "#4575b4"],
+        8: ["#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"],
+        9: ["#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"],
+        10: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"],
+        11: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"]
+    },
+    Spectral: {
+        3: ["#fc8d59", "#ffffbf", "#99d594"],
+        4: ["#d7191c", "#fdae61", "#abdda4", "#2b83ba"],
+        5: ["#d7191c", "#fdae61", "#ffffbf", "#abdda4", "#2b83ba"],
+        6: ["#d53e4f", "#fc8d59", "#fee08b", "#e6f598", "#99d594", "#3288bd"],
+        7: ["#d53e4f", "#fc8d59", "#fee08b", "#ffffbf", "#e6f598", "#99d594", "#3288bd"],
+        8: ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"],
+        9: ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"],
+        10: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"],
+        11: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"]
+    },
+    RdYlGn: {
+        3: ["#fc8d59", "#ffffbf", "#91cf60"],
+        4: ["#d7191c", "#fdae61", "#a6d96a", "#1a9641"],
+        5: ["#d7191c", "#fdae61", "#ffffbf", "#a6d96a", "#1a9641"],
+        6: ["#d73027", "#fc8d59", "#fee08b", "#d9ef8b", "#91cf60", "#1a9850"],
+        7: ["#d73027", "#fc8d59", "#fee08b", "#ffffbf", "#d9ef8b", "#91cf60", "#1a9850"],
+        8: ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"],
+        9: ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"],
+        10: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"],
+        11: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"]
+    },
+    Accent: {
+        3: ["#7fc97f", "#beaed4", "#fdc086"],
+        4: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99"],
+        5: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0"],
+        6: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f"],
+        7: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17"],
+        8: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17", "#666666"]
+    },
+    Dark2: {
+        3: ["#1b9e77", "#d95f02", "#7570b3"],
+        4: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a"],
+        5: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e"],
+        6: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02"],
+        7: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d"],
+        8: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d", "#666666"]
+    },
+    Paired: {
+        3: ["#a6cee3", "#1f78b4", "#b2df8a"],
+        4: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c"],
+        5: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99"],
+        6: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c"],
+        7: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f"],
+        8: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00"],
+        9: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6"],
+        10: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a"],
+        11: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99"],
+        12: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99", "#b15928"]
+    },
+    Pastel1: {
+        3: ["#fbb4ae", "#b3cde3", "#ccebc5"],
+        4: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4"],
+        5: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6"],
+        6: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc"],
+        7: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd"],
+        8: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec"],
+        9: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec", "#f2f2f2"]
+    },
+    Pastel2: {
+        3: ["#b3e2cd", "#fdcdac", "#cbd5e8"],
+        4: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4"],
+        5: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9"],
+        6: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae"],
+        7: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc"],
+        8: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc", "#cccccc"]
+    },
+    Set1: {
+        3: ["#e41a1c", "#377eb8", "#4daf4a"],
+        4: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3"],
+        5: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00"],
+        6: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33"],
+        7: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628"],
+        8: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf"],
+        9: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf", "#999999"]
+    },
+    Set2: {
+        3: ["#66c2a5", "#fc8d62", "#8da0cb"],
+        4: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3"],
+        5: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854"],
+        6: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f"],
+        7: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494"],
+        8: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"]
+    },
+    Set3: {
+        3: ["#8dd3c7", "#ffffb3", "#bebada"],
+        4: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072"],
+        5: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3"],
+        6: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462"],
+        7: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69"],
+        8: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5"],
+        9: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9"],
+        10: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd"],
+        11: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5"],
+        12: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"]
+    }
+}, _createClass = function () {
+    function f(f, e) {
+        for (var d = 0; d < e.length; d++) {
+            var c = e[d];
+            c.enumerable = c.enumerable || !1, c.configurable = !0, "value"in c && (c.writable = !0), Object.defineProperty(f, c.key, c)
+        }
+    }
+
+    return function (e, d, c) {
+        return d && f(e.prototype, d), c && f(e, c), e
+    }
+}(), Geomap = function () {
+    function f() {
+        _classCallCheck(this, f), this.properties = {
+            geofile: null,
+            height: null,
+            postUpdate: null,
+            projection: d3.geo.naturalEarth,
+            rotate: [0, 0, 0],
+            scale: null,
+            translate: null,
+            unitId: "iso3",
+            unitPrefix: "unit-",
+            units: "units",
+            unitTitle: function (f) {
+                return f.properties.name
+            },
+            width: null,
+            zoomFactor: 4
+        };
+        for (var e in this.properties)addAccessor(this, e, this.properties[e]);
+        this._ = {}
+    }
+
+    return _createClass(f, [{
+        key: "clicked", value: function (f) {
+            var e = this, d = 1, c = this.properties.width / 2, a = this.properties.height / 2, b = c, t = a;
+            if (f && f.hasOwnProperty("geometry") && this._.centered !== f) {
+                var r = this.path.centroid(f);
+                b = r[0], t = r[1], d = this.properties.zoomFactor, this._.centered = f
+            } else this._.centered = null;
+            this.svg.selectAll("path.unit").classed("active", this._.centered && function (f) {
+                    return f === e._.centered
+                }), this.svg.selectAll("g.zoom").transition().duration(750).attr("transform", "translate(" + c + ", " + a + ")scale(" + d + ")translate(-" + b + ", -" + t + ")")
+        }
+    }, {
+        key: "draw", value: function (f, e) {
+            e.properties.width || (e.properties.width = f.node().getBoundingClientRect().width), e.properties.height || (e.properties.height = e.properties.width / 1.92), e.properties.scale || (e.properties.scale = e.properties.width / 5.8), e.properties.translate || (e.properties.translate = [e.properties.width / 2, e.properties.height / 2]), e.svg = f.append("svg").attr("width", e.properties.width).attr("height", e.properties.height), e.svg.append("rect").attr("class", "background").attr("width", e.properties.width).attr("height", e.properties.height).on("click", e.clicked.bind(e));
+            var d = e.properties.projection().scale(e.properties.scale).translate(e.properties.translate).precision(.1);
+            d.hasOwnProperty("rotate") && e.properties.rotate && d.rotate(e.properties.rotate), e.path = d3.geo.path().projection(d), d3.json(e.properties.geofile, function (f, d) {
+                e.geo = d, e.svg.append("g").attr("class", "units zoom").selectAll("path").data(topojson.feature(d, d.objects[e.properties.units]).features).enter().append("path").attr("class", function (f) {
+                    return "unit " + e.properties.unitPrefix + f.id
+                }).attr("d", e.path).on("click", e.clicked.bind(e)).append("title").text(e.properties.unitTitle), e.update()
+            })
+        }
+    }, {
+        key: "update", value: function () {
+            this.properties.postUpdate && this.properties.postUpdate()
+        }
+    }]), f
+}();
+d3.geomap = function () {
+    return new Geomap
+};
+var _createClass = function () {
+    function f(f, e) {
+        for (var d = 0; d < e.length; d++) {
+            var c = e[d];
+            c.enumerable = c.enumerable || !1, c.configurable = !0, "value"in c && (c.writable = !0), Object.defineProperty(f, c.key, c)
+        }
+    }
+
+    return function (e, d, c) {
+        return d && f(e.prototype, d), c && f(e, c), e
+    }
+}(), _get = function (f, e, d) {
+    for (var c = !0; c;) {
+        var a = f, b = e, t = d;
+        r = i = n = void 0, c = !1;
+        var r = Object.getOwnPropertyDescriptor(a, b);
+        if (void 0 !== r) {
+            if ("value"in r)return r.value;
+            var n = r.get;
+            return void 0 === n ? void 0 : n.call(t)
+        }
+        var i = Object.getPrototypeOf(a);
+        if (null === i)return void 0;
+        f = i, e = b, d = t, c = !0
+    }
+}, Choropleth = function (f) {
+    function e() {
+        _classCallCheck(this, e), _get(Object.getPrototypeOf(e.prototype), "constructor", this).call(this);
+        var f = {
+            colors: colorbrewer.OrRd[9],
+            column: null,
+            domain: null,
+            duration: null,
+            format: d3.format(",.02f"),
+            legend: !1,
+            valueScale: d3.scale.quantize
+        };
+        for (var d in f)this.properties[d] = f[d], addAccessor(this, d, f[d])
+    }
+
+    return _inherits(e, f), _createClass(e, [{
+        key: "columnVal", value: function (f) {
+            return +f[this.properties.column]
+        }
+    }, {
+        key: "draw", value: function (f, d) {
+            d.data = f.datum(), _get(Object.getPrototypeOf(e.prototype), "draw", this).call(this, f, d)
+        }
+    }, {
+        key: "update", value: function () {
+            var f = this;
+            f.extent = d3.extent(f.data, f.columnVal.bind(f)), f.colorScale = f.properties.valueScale().domain(f.properties.domain || f.extent).range(f.properties.colors), f.svg.selectAll("path.unit").style("fill", null), f.data.forEach(function (e) {
+                var d = e[f.properties.unitId], c = e[f.properties.column], a = f.colorScale(c), b = f.svg.selectAll("." + f.properties.unitPrefix + d);
+                if (!b.empty()) {
+                    f.properties.duration ? b.transition().duration(f.properties.duration).style("fill", a) : b.style("fill", a);
+                    var t = f.properties.unitTitle(b.datum());
+                    c = f.properties.format(c), b.select("title").text("" + t + "\n\n" + f.properties.column + ": " + c)
+                }
+            }), f.properties.legend && f.drawLegend(f.properties.legend), _get(Object.getPrototypeOf(e.prototype), "update", this).call(this)
+        }
+    }, {
+        key: "drawLegend", value: function () {
+            var f = void 0 === arguments[0] ? null : arguments[0], e = this, d = e.properties.colors.length, c = void 0, a = void 0, b = 10, t = 3;
+            f === !0 ? (c = e.properties.width / b, a = e.properties.height / t) : (c = f.width, a = f.height);
+            var r = c / (.75 * b), n = a - a / (1.8 * t), i = r / 2, o = e.properties.height - a, s = "translate(" + i + "," + 3 * i + ")";
+            e.svg.select("g.legend").remove();
+            var p = e.properties.colors.slice().reverse(), l = n / d, u = t / l, h = e.svg.append("g").attr("class", "legend").attr("width", c).attr("height", a).attr("transform", "translate(0," + o + ")");
+            h.append("rect").style("fill", "#fff").attr("class", "legend-bg").attr("width", c).attr("height", a), h.append("rect").attr("class", "legend-bar").attr("width", r).attr("height", n).attr("transform", s);
+            var g = h.append("g").attr("transform", s);
+            g.selectAll("rect").data(p).enter().append("rect").attr("y", function (f, e) {
+                return e * l
+            }).attr("fill", function (f, e) {
+                return p[e]
+            }).attr("width", r).attr("height", l);
+            var v = e.extent[0], m = e.extent[1], y = !1, w = !1;
+            e.properties.domain && (e.properties.domain[1] < m && (w = !0), m = e.properties.domain[1], e.properties.domain[0] > v && (y = !0), v = e.properties.domain[0]), g.selectAll("text").data(p).enter().append("text").text(function (f, c) {
+                if (c === d - 1) {
+                    var a = e.properties.format(v);
+                    return y && (a = "< " + a), a
+                }
+                return e.properties.format(e.colorScale.invertExtent(f)[0])
+            }).attr("class", function (f, e) {
+                return "text-" + e
+            }).attr("x", r + i).attr("y", function (f, e) {
+                return e * l + (l + l * u)
+            }), g.append("text").text(function () {
+                var f = e.properties.format(m);
+                return w && (f = "> " + f), f
+            }).attr("x", r + i).attr("y", i * u * 2)
+        }
+    }]), e
+}(Geomap);
+d3.geomap.choropleth = function () {
+    return new Choropleth
+};
\ No newline at end of file


[12/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/d3.geomap.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/d3.geomap.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/d3.geomap.css
new file mode 100644
index 0000000..a3c754e
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/d3.geomap.css
@@ -0,0 +1,67 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *//*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+text {
+    fill: #333;
+    font-size: 12px;
+}
+
+.background {
+    fill: none;
+    pointer-events: all;
+}
+
+.unit {
+    cursor: pointer;
+    fill: #ccc;
+    stroke: #000;
+    stroke-width: 0.4px;
+}
+
+.legend-bg {
+    fill: #fff;
+    fill-opacity: 0.8;
+}
+
+.legend-bar {
+    stroke: #333;
+    stroke-width: 1px;
+}
+
+/*# sourceMappingURL=geomap.css.map */

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/igviz.css
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/igviz.css b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/igviz.css
new file mode 100644
index 0000000..627f176
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/css/igviz.css
@@ -0,0 +1,86 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+#rect {
+    fill: none;
+    stroke: rgb(0, 0, 0);
+    stroke-width: 2;
+}
+
+#rectCurve {
+    fill: none;
+    stroke: rgb(0, 0, 0);
+    stroke-width: 0.5;
+}
+
+.axis path,
+.axis line {
+    fill: none;
+    shape-rendering: crispEdges;
+    stroke: grey;
+    stroke-width: 2;
+}
+
+.line {
+    fill: none;
+    stroke: steelblue;
+    stroke-width: 1.5px;
+}
+
+.label {
+    font-size: 16.844px !important;
+}
+
+/* arc tween shit*/
+.background {
+    fill: #FFFFFF;
+    fill-opacity: 0.01;
+}
+
+.component {
+    fill: #e1e1e1;
+}
+
+.component .label {
+    font-family: Myriad, "Helvetic Neue", Helvetica, Arial;
+    text-anchor: middle;
+    fill: #0000FF;
+}
+
+.arc {
+    stroke-weight: 0.1;
+    fill: #4e8fff;
+}
+
+.arc2 {
+    stroke-weight: 0.1;
+    fill: #3660b0;
+}
+
+.label {
+    font-family: Myriad, "Helvetic Neue", Helvetica, Arial;
+    text-anchor: middle;
+}
+
+.labelArc {
+    font-family: Myriad, "Helvetic Neue", Helvetica, Arial;
+    text-anchor: middle;
+    fill: #0000FF;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/gadget.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/gadget.json b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/gadget.json
new file mode 100644
index 0000000..dbcc534
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/gadget.json
@@ -0,0 +1,19 @@
+{
+  "id": "Member_Update",
+  "title": "Member Status",
+  "type": "gadget",
+  "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png",
+  "data": {
+    "url": "local://store/carbon.super/gadget/Member_Status/index.xml"
+  },
+  "listen": {
+    "member-status-filter": {
+      "type": "address",
+      "description": "Used to filter based on state"
+    },
+    "auto-update": {
+      "type": "boolean",
+      "description": "Used to filter based on state"
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/index.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/index.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/index.xml
new file mode 100644
index 0000000..137897c
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/index.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Module>
+    <ModulePrefs title="Bar Chart"
+                 author="WSO2 Gadget Server"
+                 height="230"
+                 scrolling="true"
+                 tags="charts,bar,visualization,data"
+                 description="A generic Bar Chart gadget, that takes a json datasource as an input. It can be configured to fetch data in defined intervals. This gadget can be used to create dashboards with statistical data. This gadget can be reused as an iframe in any web page as it is self contained.">
+        <!-- This is used to import the pubsub-2 feature -->
+        <Require feature="pubsub-2">
+            <Param name="topics">
+                <![CDATA[
+                    <Topic title="member-status-filter" name="member-status-filter"
+                    description="Subscribes to member-status-filter channel" type="object"
+                    subscribe="true"/>
+                ]]>
+            </Param>
+        </Require>
+    </ModulePrefs>
+    <UserPref name="dataSource"
+              display_name="Data Source"
+              default_value="/portal/gadgets/bar-chart/datasource/dataFile4.jag">
+    </UserPref>
+    <!--UserPref name="options"
+              display_name="Chart Options"
+              default_value="/portal/gadgets/bar-chart/js/options-bar.js">
+    </UserPref-->
+    <UserPref name="updateGraph"
+              display_name="Update Interval (s)"
+              default_value="No">
+    </UserPref>
+    <Content type="html">
+        <![CDATA[
+             <html>
+             <head>
+                <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+                <title>Bar Chart</title>
+                <link href="css/flot-graph.css" rel="stylesheet" type="text/css">
+                <link href="css/igviz.css" rel="stylesheet" type="text/css">
+                <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
+                <link href="css/d3.geomap.css" rel="stylesheet" type="text/css">
+                <script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script>
+                <script language="javascript" type="text/javascript" src="js/jquery.js"></script>
+                <script language="javascript" type="text/javascript" src="js/d3.min.js"></script>
+                <script language="javascript" type="text/javascript" src="js/vega.js"></script>
+                <script language="javascript" type="text/javascript" src="js/igviz.js"></script>
+                <script language="javascript" type="text/javascript" src="js/gadgetconf.js"></script>
+                <script language="javascript" type="text/javascript" src="js/outputAdapterUiLibrary.js"></script>
+                <script language="javascript" type="text/javascript" src="js/main.js"></script>
+                <script language="javascript" type="text/javascript" src="js/d3.geomap.dependencies.min.js"></script>
+                <script language="javascript" type="text/javascript" src="js/d3.geomap.min.js"></script>
+            </head>
+
+            <body>
+                <div id="placeholder" class="demo-placeholder" style="height:90%"></div>
+                <script language="javascript" type="text/javascript">
+                  if(jQuery("#placeholder").html() == ""){
+                    jQuery("#placeholder").append('<div id="noChart"><table><tr><td style="padding:30px 20px 0px 20px"><img src="../../portal/images/noEvents.png" align="left" style="width:24;height:24"/></td><td><br/><b><p><br/>Please select an application and cluster to view data</p></b></td></tr></table></div>');
+                  }
+                </script>
+            </body>
+            </html>
+    ]]>
+    </Content>
+</Module>
+
+


[31/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/igviz.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/igviz.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/igviz.js
new file mode 100644
index 0000000..671358b
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/igviz.js
@@ -0,0 +1,3585 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+(function () {
+
+    var igviz = window.igviz || {};
+
+    igviz.version = '1.0.0';
+
+    igviz.val = 0;
+    window.igviz = igviz;
+    var persistedData = [];
+    var maxValueForUpdate;
+    var singleNumSvg;
+    var singleNumCurveSvg;
+    var mapChart;
+    var mapSVG;
+    var worldMapCodes;
+    var usaMapCodes;
+
+    /*************************************************** Initializtion functions ***************************************************************************************************/
+
+
+    igviz.draw = function (canvas, config, dataTable) {
+        var chart = new Chart(canvas, config, dataTable);
+
+        if (config.chartType == "singleNumber") {
+            this.drawSingleNumberDiagram(chart);
+        } else if (config.chartType == "map") {
+            this.drawMap(canvas, config, dataTable);
+        } else if (config.chartType == "tabular") {
+            this.drawTable(canvas, config, dataTable);
+        } else if (config.chartType == "arc") {
+            this.drawArc(canvas, config, dataTable);
+        } else if (config.chartType == "drill") {
+            this.drillDown(0, canvas, config, dataTable, dataTable);
+        }
+        return chart;
+        //return
+    };
+
+    igviz.setUp = function (canvas, config, dataTable) {
+        var chartObject = new Chart(canvas, config, dataTable);
+
+        if (config.chartType == "bar") {
+            this.drawBarChart(chartObject, canvas, config, dataTable);
+        } else if (config.chartType == "scatter") {
+            this.drawScatterPlot(chartObject);
+        } else if (config.chartType == "line") {
+            this.drawLineChart(chartObject);
+        } else if (config.chartType == "area") {
+            this.drawAreaChart(chartObject);
+        }
+        return chartObject;
+    };
+
+
+    /*************************************************** Line chart ***************************************************************************************************/
+
+    igviz.drawLineChart = function (chartObj) {
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+        // table=setData(dataTable,chartConfig)
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = [];
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            yStrings[i] = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "range": "width",
+            "zero": false,
+            "clamp": false,
+            "field": xString,
+            "round": true
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis[0],
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yStrings[0]
+        }
+
+        var yDomain = [];
+        chartConfig.yAxis.forEach(function (columnIndex, i) {
+            dataTable.data.forEach(function (row, j) {
+                yDomain.push(row[columnIndex]);
+            });
+        });
+
+        yDomain.sort(function (a, b) {
+            return a - b;
+        });
+
+        var yScale = {
+            name: "y",
+            type: "linear",
+            range: "height",
+            zero: true,
+            domain: [yDomain[0], yDomain[yDomain.length - 1]]
+        };
+
+        var xScale = setScale(xScaleConfig);
+        var yScale = yScale;
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": "Member Count",
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        if (chartConfig.interpolationMode == undefined) {
+            chartConfig.interpolationMode = "monotone";
+        }
+        var spec = {
+            "width": chartConfig.width - 250,
+            "height": chartConfig.height,
+            //  "padding":{"top":40,"bottom":60,'left':90,"right":150},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category20"
+                }
+            ],
+            "axes": [xAxis, yAxis
+            ],
+            "legends": [
+                {
+
+                    "orient": "right",
+                    "fill": "color",
+                    "title": "Member Count",
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 1.5}
+
+                        }
+                    }
+                }
+            ],
+
+            "marks": []
+        }
+
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            markObj = {
+                "type": "line",
+                "key": xString,
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"value": 400},
+                        "interpolate": {"value": chartConfig.interpolationMode},
+                        "y": {"scale": "y:prev", "field": yStrings[i]},
+                        "stroke": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "strokeWidth": {"value": 1.5}
+                    },
+                    "update": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    },
+                    "exit": {
+                        "x": {"value": -20},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    }
+                }
+            };
+            pointObj = {
+                "type": "symbol",
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]},
+                        "fill": {
+                            "scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]
+                            //"fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            //"size": {"scale":"r","field":rString},
+                            // "stroke": {"value": "transparent"}
+                        },
+                        "hover": {
+                            "size": {"value": 300},
+                            "stroke": {"value": "white"}
+                        }
+                    }
+                }
+            }
+
+
+            spec.marks.push(markObj);
+            spec.marks.push(pointObj);
+            spec.legends[0].values.push(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+
+            console.log(tool, event, item);
+            if (item.mark.marktype == 'symbol') {
+                xVar = dataTable.metadata.names[chartConfig.xAxis]
+                yVar = dataTable.metadata.names[chartConfig.yAxis]
+
+                contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr></table>';
+
+
+                tool.html(contentString).style({
+                    'left': event.pageX + 10 + 'px',
+                    'top': event.pageY + 10 + 'px',
+                    'opacity': 1
+                })
+                tool.selectAll('tr td').style('padding', "3px");
+            }
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+        chartObj.spec = spec;
+
+    }
+
+
+    /*************************************************** Bar chart ***************************************************************************************************/
+    igviz.drawBarChart = function (mychart, divId, chartConfig, dataTable) {
+        //  console.log(this);
+        divId = mychart.canvas;
+        chartConfig = mychart.config;
+        dataTable = mychart.dataTable;
+        if (chartConfig.hasOwnProperty("groupedBy")) {
+            var format = "grouped";
+            if (chartConfig.hasOwnProperty("format")) {
+                format = chartConfig.format;
+
+            }
+            if (format == "grouped") {
+                console.log("groupedDFJSDFKSD:JFKDJF");
+                if (chartConfig.orientation == 'H') {
+                    console.log('horizontal');
+                    return this.drawGroupedBarChart(mychart);
+
+                }
+                return this.drawGroupedBarChartVertical(mychart);
+            }
+            else {
+                return this.drawStackedBarChart(mychart);
+            }
+        }
+
+        var xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis]);
+        var yString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis])
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "zero": false,
+            "range": "width",
+            "round": true,
+            "field": xString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yString
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": 30,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -35,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        if (chartConfig.barColor == undefined) {
+            chartConfig.barColor = "steelblue";
+        }
+
+//        console.log(table)
+        var spec = {
+
+            "width": chartConfig.width - 150,
+            //"padding":{'top':30,"left":80,"right":80,'bottom':60},
+            "height": chartConfig.height,
+            "data": [
+                {
+                    "name": "table"
+                }
+            ],
+            "scales": [
+                xScale,
+                yScale
+            ],
+            "axes": [
+                xAxis,
+                yAxis
+
+
+            ],
+            "marks": [
+                {
+                    "key": xString,
+                    "type": "rect",
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "width": {"scale": "x", "band": true, "offset": -10},
+                            "y": {"scale": "y:prev", "field": yString, "duration": 2000},
+                            "y2": {"scale": "y", "value": 0}
+
+                        },
+                        "update": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yString},
+                            "y2": {"scale": "y", "value": 0},
+                            "fill": {"value": chartConfig.barColor}
+                        },
+                        "exit": {
+                            "x": {"value": 0},
+                            "y": {"scale": "y:prev", "field": yString},
+                            "y2": {"scale": "y", "value": 0}
+                        },
+
+                        "hover": {
+
+                            "fill": {'value': 'orange'}
+                        }
+
+                    }
+                }
+            ]
+        }
+
+
+//        var data = {table: table}
+
+        mychart.originalWidth = chartConfig.width;
+        mychart.originalHeight = chartConfig.height;
+
+        mychart.spec = spec;
+        //mychart.data = data;
+        //mychart.table = table;
+        ////vg.parse.spec(spec, function (chart) {
+        //    mychart.chart = chart({
+        //        el: divId,
+        //        renderer: 'svg',
+        //        data: data,
+        //        hover: false
+        //
+        //    }).update();
+        //
+        //    // mychart.chart.data(data).update();
+        //    //self.counter=0;
+        //    //console.log('abc');
+        //    //setInterval(updateTable,1500);
+        //
+        //});
+    };
+
+    igviz.drawStackedBarChart = function (chartObj) {
+
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //   var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        groupedBy = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.groupedBy]);
+
+        // console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.groupedBy,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "width",
+            "field": groupedBy,
+            "padding": 0.2
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "height",
+            "dataFrom": "stats",
+            "field": "sum",
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "cat",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.groupedBy],
+            "grid": false,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "val",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height - 100,
+            "padding": {"top": 10, "left": 60, "bottom": 60, "right": 100},
+            "data": [
+                {
+                    "name": "table"
+                },
+                {
+                    "name": "stats",
+                    "source": "table",
+                    "transform": [
+                        {"type": "facet", "keys": [groupedBy]},
+                        {"type": "stats", "value": yStrings}
+                    ]
+                }
+            ],
+            "scales": [
+                cScale,
+                vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.xAxis],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+            "axes": [
+                xAxis, yAxis
+            ],
+
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [
+                            {"type": "facet", "keys": [xString]},
+                            {"type": "stack", "point": groupedBy, "height": yStrings}
+                        ]
+                    },
+                    "marks": [
+                        {
+                            "type": "rect",
+                            "properties": {
+                                "enter": {
+                                    "x": {"scale": "cat", "field": groupedBy},
+                                    "width": {"scale": "cat", "band": true, "offset": -1},
+                                    "y": {"scale": "val", "field": "y"},
+                                    "y2": {"scale": "val", "field": "y2"},
+                                    "fill": {"scale": "color", "field": xString}
+                                },
+                                "update": {
+                                    "fillOpacity": {"value": 1}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                            }
+                        }
+                    ]
+                }
+            ]
+        }
+
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.xAxis;
+        chartObj.spec = spec;
+
+    }
+
+    igviz.drawGroupedBarChart = function (chartObj) {
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //  var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        groupedBy = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.groupedBy]);
+
+        //  console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.groupedBy,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "height",
+            "field": groupedBy,
+            "padding": 0.2
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "width",
+            "round": 'true',
+            "field": yStrings,
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "val",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "cat",
+            "angle": 0,
+            "tickSize": 0,
+            "tickPadding": 8,
+            "title": dataTable.metadata.names[chartConfig.groupedBy],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width,
+            "height": chartConfig.height,
+
+            "data": [
+                {
+                    "name": "table"
+                }
+            ],
+            "scales": [
+                cScale, vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "axes": [
+                xAxis, yAxis
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.xAxis],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [{"type": "facet", "keys": [groupedBy]}]
+                    },
+                    "properties": {
+                        "enter": {
+                            "y": {"scale": "cat", "field": "key"},
+                            "height": {"scale": "cat", "band": true}
+                        }
+                    },
+                    "scales": [
+                        {
+                            "name": "pos",
+                            "type": "ordinal",
+                            "range": "height",
+                            "domain": {"field": xString}
+                        }
+                    ],
+                    "marks": [
+                        {
+                            "type": "rect",
+                            "properties": {
+                                "enter": {
+                                    "y": {"scale": "pos", "field": xString},
+                                    "height": {"scale": "pos", "band": true},
+                                    "x": {"scale": "val", "field": yStrings},
+                                    "x2": {"scale": "val", "value": 0},
+                                    "fill": {"scale": "color", "field": xString}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                                ,
+
+                                "update": {
+                                    "fillOpacity": {"value": 1}
+                                }
+                            }
+                        },
+                        //{
+                        //    "type": "text",
+                        //    "properties": {
+                        //        "enter": {
+                        //            "y": {"scale": "pos", "field": xString},
+                        //            "dy": {"scale": "pos", "band": true, "mult": 0.5},
+                        //            "x": {"scale": "val", "field": yStrings, "offset": -4},
+                        //            "fill": {"value": "white"},
+                        //            "align": {"value": "right"},
+                        //            "baseline": {"value": "middle"},
+                        //            "text": {"field": xString}
+                        //        }
+                        //    }
+                        //}
+                    ]
+                }
+            ]
+        }
+
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.xAxis;
+        chartObj.spec = spec;
+
+    }
+
+    igviz.drawGroupedBarChartVertical = function (chartObj) {
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //  var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        groupedBy = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.groupedBy]);
+
+        //  console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.groupedBy,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "width",
+            "field": groupedBy,
+            "padding": 0.2
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "height",
+            "round": 'true',
+            "field": yStrings,
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "val",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "cat",
+            "angle": 0,
+            "tickSize": 0,
+            "tickPadding": 8,
+            "title": dataTable.metadata.names[chartConfig.groupedBy],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width - 150,
+            "height": chartConfig.height,
+            "data": [
+                {
+                    "name": "table"
+                }
+            ],
+            "scales": [
+                cScale, vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "axes": [
+                xAxis, yAxis
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.xAxis],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [{"type": "facet", "keys": [groupedBy]}]
+                    },
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "cat", "field": "key"},
+                            "width": {"scale": "cat", "band": true}
+                        }
+                    },
+                    "scales": [
+                        {
+                            "name": "pos",
+                            "type": "ordinal",
+                            "range": "width",
+                            "domain": {"field": xString}
+                        }
+                    ],
+                    "marks": [
+                        {
+                            "type": "rect",
+                            "properties": {
+                                "enter": {
+                                    "x": {"scale": "pos", "field": xString},
+                                    "width": {"scale": "pos", "band": true},
+                                    "y": {"scale": "val", "field": yStrings},
+                                    "y2": {"scale": "val", "value": 0},
+                                    "fill": {"scale": "color", "field": xString}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                                ,
+
+                                "update": {
+                                    "fillOpacity": {"value": 1}
+                                }
+                            }
+                        },
+                        //{
+                        //    "type": "text",
+                        //    "properties": {
+                        //        "enter": {
+                        //            "y": {"scale": "pos", "field": xString},
+                        //            "dy": {"scale": "pos", "band": true, "mult": 0.5},
+                        //            "x": {"scale": "val", "field": yStrings, "offset": -4},
+                        //            "fill": {"value": "white"},
+                        //            "align": {"value": "right"},
+                        //            "baseline": {"value": "middle"},
+                        //            "text": {"field": xString}
+                        //        }
+                        //    }
+                        //}
+                    ]
+                }
+            ]
+        }
+
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.xAxis;
+        chartObj.spec = spec;
+
+    }
+
+
+    /*************************************************** Area chart ***************************************************************************************************/
+
+    igviz.drawAreaChart = function (chartObj) {
+        // var padding = chartConfig.padding;
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+
+        if (chartConfig.yAxis.constructor === Array) {
+            return this.drawMultiAreaChart(chartObj)
+        }
+        if (chartConfig.hasOwnProperty("areaVar")) {
+            return this.drawStackedAreaChart(chartObj);
+        }
+
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        //   console.log(table,xString,yStrings);
+        // sortDataSet(table);
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "zero": false,
+            "range": "width",
+            "field": xString
+        }
+
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "field": yStrings
+        }
+
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        if (chartConfig.interpolationMode == undefined) {
+            chartConfig.interpolationMode = "monotone"
+        }
+
+
+        var spec = {
+            "width": chartConfig.width - 100,
+            "height": chartConfig.height,
+            //  "padding":{"top":40,"bottom":60,'left':60,"right":40},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category10"
+                }
+            ],
+
+            "axes": [xAxis, yAxis]
+            ,
+
+            "marks": [
+                {
+                    "type": "area",
+                    "key": xString,
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "interpolate": {"value": chartConfig.interpolationMode},
+
+                            "y": {"scale": "y", "field": yStrings},
+                            "y2": {"scale": "y", "value": 0},
+                            "fill": {"scale": "color", "value": 2},
+                            "fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            "fillOpacity": {"value": 0.5}
+
+                        },
+                        "hover": {
+                            "fillOpacity": {"value": 0.2}
+
+                        }
+
+                    }
+                },
+                {
+                    "type": "line",
+                    "key": xString,
+
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"value": 400},
+                            "interpolate": {"value": chartConfig.interpolationMode},
+                            "y": {"scale": "y:prev", "field": yStrings},
+                            "stroke": {"scale": "color", "value": 2},
+                            "strokeWidth": {"value": 1.5}
+                        },
+                        "update": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yStrings}
+                        },
+                        "exit": {
+                            "x": {"value": -20},
+                            "y": {"scale": "y", "field": yStrings}
+                        }
+                    }
+                },
+                {
+                    "type": "symbol",
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yStrings},
+                            "fill": {"scale": "color", "value": 2},
+                            "size": {"value": 50}
+                            //"fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            "size": {"value": 50}
+
+                            //"size": {"scale":"r","field":rString},
+                            // "stroke": {"value": "transparent"}
+                        },
+                        "hover": {
+                            "size": {"value": 100},
+                            "stroke": {"value": "white"}
+                        }
+                    }
+                }
+
+            ]
+        }
+
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+
+
+            console.log(tool, event, item);
+            if (item.mark.marktype == 'symbol') {
+
+
+                xVar = dataTable.metadata.names[chartConfig.xAxis]
+                yVar = dataTable.metadata.names[chartConfig.yAxis]
+
+                contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr></table>';
+
+
+                tool.html(contentString).style({
+                    'left': event.pageX + 10 + 'px',
+                    'top': event.pageY + 10 + 'px',
+                    'opacity': 1
+                })
+                tool.selectAll('tr td').style('padding', "3px");
+            }
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+        chartObj.spec = spec;
+
+
+    };
+
+    igviz.drawMultiAreaChart = function (chartObj) {
+
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+        // table=setData(dataTable,chartConfig)
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = [];
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            yStrings[i] = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "range": "width",
+            "clamp": false,
+            "field": xString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis[0],
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yStrings[0]
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "left",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": "values",
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        if (chartConfig.interpolationMode == undefined) {
+            chartConfig.interpolationMode = "monotone";
+        }
+
+
+        var spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height,
+            //    "padding":{"top":40,"bottom":60,'left':60,"right":145},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category20"
+                }
+            ],
+            "legends": [
+                {
+
+                    "orient": "right",
+                    "fill": "color",
+                    "title": "Area",
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 1.5}
+
+                        }
+                    }
+                }
+            ],
+            "axes": [xAxis, yAxis]
+            ,
+
+            "marks": []
+        }
+
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            areaObj = {
+                "type": "area",
+                "key": xString,
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"scale": "x", "field": xString},
+                        "interpolate": {"value": chartConfig.interpolationMode},
+                        "y": {"scale": "y", "field": yStrings[i]},
+                        "y2": {"scale": "y", "value": 0},
+                        "fill": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "fillOpacity": {"value": 0.5}
+                    },
+                    "update": {
+                        "fillOpacity": {"value": 0.5}
+
+                    },
+                    "hover": {
+                        "fillOpacity": {"value": 0.2}
+                    }
+
+                }
+            }
+
+            lineObj = {
+                "type": "line",
+                "key": xString,
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"value": 400},
+                        "interpolate": {"value": chartConfig.interpolationMode},
+                        "y": {"scale": "y:prev", "field": yStrings[i]},
+                        "stroke": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "strokeWidth": {"value": 1.5}
+                    },
+                    "update": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    },
+                    "exit": {
+                        "x": {"value": -20},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    }
+                }
+            }
+
+
+            pointObj = {
+                "type": "symbol",
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]},
+                        "fill": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "size": {"value": 50}
+                        //"fillOpacity": {"value": 0.5}
+                    },
+                    "update": {
+                        "size": {"value": 50}
+                        //"size": {"scale":"r","field":rString},
+                        // "stroke": {"value": "transparent"}
+                    },
+                    "hover": {
+                        "size": {"value": 100},
+                        "stroke": {"value": "white"}
+                    }
+                }
+            }
+
+
+            spec.marks.push(areaObj);
+
+            spec.marks.push(pointObj);
+            spec.marks.push(lineObj);
+            spec.legends[0].values.push(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+
+            a = 4
+
+            console.log(tool, event, item);
+            if (item.mark.marktype == 'symbol') {
+                // window.alert(a);
+
+                xVar = dataTable.metadata.names[chartConfig.xAxis]
+                yVar = dataTable.metadata.names[chartConfig.yAxis]
+
+                contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr></table>';
+
+
+                tool.html(contentString).style({
+                    'left': event.pageX + 10 + 'px',
+                    'top': event.pageY + 10 + 'px',
+                    'opacity': 1
+                })
+                tool.selectAll('tr td').style('padding', "3px");
+            }
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+        chartObj.spec = spec;
+
+        chartObj.spec = spec;
+
+
+    };
+
+    igviz.drawStackedAreaChart = function (chartObj) {
+
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //  var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        areaString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.areaVar])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis]);
+
+        //     console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "width",
+            "field": xString,
+            "padding": 0.2,
+            "zero": false,
+            "nice": true
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "height",
+            "dataFrom": "stats",
+            "field": "sum",
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "cat",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "left",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "val",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height - 100,
+            "padding": {"top": 10, "left": 60, "bottom": 60, "right": 100},
+            "data": [
+                {
+                    "name": "table"
+                },
+                {
+                    "name": "stats",
+                    "source": "table",
+                    "transform": [
+                        {"type": "facet", "keys": [xString]},
+                        {"type": "stats", "value": yStrings}
+                    ]
+                }
+            ],
+            "scales": [
+                cScale,
+                vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.areaVar
+                        ],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+            "axes": [
+                xAxis, yAxis
+            ],
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [
+                            {"type": "facet", "keys": [areaString]},
+                            {"type": "stack", "point": xString, "height": yStrings}
+                        ]
+                    },
+                    "marks": [
+                        {
+                            "type": "area",
+                            "properties": {
+                                "enter": {
+                                    "interpolate": {"value": "monotone"},
+                                    "x": {"scale": "cat", "field": xString},
+                                    "y": {"scale": "val", "field": "y"},
+                                    "y2": {"scale": "val", "field": "y2"},
+                                    "fill": {"scale": "color", "field": areaString},
+                                    "fillOpacity": {"value": 0.8}
+
+                                },
+                                "update": {
+                                    "fillOpacity": {"value": 0.8}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                            }
+                        },
+                        {
+                            "type": "line",
+                            "properties": {
+                                "enter": {
+                                    "x": {"scale": "cat", "field": xString},
+                                    //"x": {"value": 400},
+                                    "interpolate": {"value": "monotone"},
+                                    "y": {"scale": "val", "field": "y"},
+                                    "stroke": {"scale": "color", "field": areaString},
+                                    "strokeWidth": {"value": 3}
+                                }
+                            }
+                        }
+                    ]
+                }
+            ]
+        }
+
+        chartObj.spec = spec;
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.areaVar;
+
+
+    }
+
+
+    /*************************************************** Arc chart ***************************************************************************************************/
+
+
+    igviz.drawArc = function (divId, chartConfig, dataTable) {
+
+        radialProgress(divId)
+            .label(dataTable.metadata.names[chartConfig.percentage])
+            .diameter(200)
+            .value(dataTable.data[0][chartConfig.percentage])
+            .render();
+
+
+        function radialProgress(parent) {
+            var _data = null,
+                _duration = 1000,
+                _selection,
+                _margin = {
+                    top: 0,
+                    right: 0,
+                    bottom: 30,
+                    left: 0
+                },
+                __width = chartConfig.width,
+                __height = chartConfig.height,
+                _diameter,
+                _label = "",
+                _fontSize = 10;
+
+
+            var _mouseClick;
+
+            var _value = 0,
+                _minValue = 0,
+                _maxValue = 100;
+
+            var _currentArc = 0,
+                _currentArc2 = 0,
+                _currentValue = 0;
+
+            var _arc = d3.svg.arc()
+                .startAngle(0 * (Math.PI / 180)); //just radians
+
+            var _arc2 = d3.svg.arc()
+                .startAngle(0 * (Math.PI / 180))
+                .endAngle(0); //just radians
+
+
+            _selection = d3.select(parent);
+
+
+            function component() {
+
+                _selection.each(function (data) {
+
+                    // Select the svg element, if it exists.
+                    var svg = d3.select(this).selectAll("svg").data([data]);
+
+                    var enter = svg.enter().append("svg").attr("class", "radial-svg").append("g");
+
+                    measure();
+
+                    svg.attr("width", __width)
+                        .attr("height", __height);
+
+
+                    var background = enter.append("g").attr("class", "component")
+                        .attr("cursor", "pointer")
+                        .on("click", onMouseClick);
+
+
+                    _arc.endAngle(360 * (Math.PI / 180))
+
+                    background.append("rect")
+                        .attr("class", "background")
+                        .attr("width", _width)
+                        .attr("height", _height);
+
+                    background.append("path")
+                        .attr("transform", "translate(" + _width / 2 + "," + _width / 2 + ")")
+                        .attr("d", _arc);
+
+                    background.append("text")
+                        .attr("class", "label")
+                        .attr("transform", "translate(" + _width / 2 + "," + (_width + _fontSize) + ")")
+                        .text(_label);
+
+                    //outer g element that wraps all other elements
+                    var gx = chartConfig.width / 2 - _width / 2;
+                    var gy = (chartConfig.height / 2 - _height / 2) - 17;
+                    var g = svg.select("g")
+                        .attr("transform", "translate(" + gx + "," + gy + ")");
+
+
+                    _arc.endAngle(_currentArc);
+                    enter.append("g").attr("class", "arcs");
+                    var path = svg.select(".arcs").selectAll(".arc").data(data);
+                    path.enter().append("path")
+                        .attr("class", "arc")
+                        .attr("transform", "translate(" + _width / 2 + "," + _width / 2 + ")")
+                        .attr("d", _arc);
+
+                    //Another path in case we exceed 100%
+                    var path2 = svg.select(".arcs").selectAll(".arc2").data(data);
+                    path2.enter().append("path")
+                        .attr("class", "arc2")
+                        .attr("transform", "translate(" + _width / 2 + "," + _width / 2 + ")")
+                        .attr("d", _arc2);
+
+
+                    enter.append("g").attr("class", "labels");
+                    var label = svg.select(".labels").selectAll(".labelArc").data(data);
+                    label.enter().append("text")
+                        .attr("class", "labelArc")
+                        .attr("y", _width / 2 + _fontSize / 3)
+                        .attr("x", _width / 2)
+                        .attr("cursor", "pointer")
+                        .attr("width", _width)
+                        // .attr("x",(3*_fontSize/2))
+                        .text(function (d) {
+                            return Math.round((_value - _minValue) / (_maxValue - _minValue) * 100) + "%"
+                        })
+                        .style("font-size", _fontSize + "px")
+                        .on("click", onMouseClick);
+
+                    path.exit().transition().duration(500).attr("x", 1000).remove();
+
+
+                    layout(svg);
+
+                    function layout(svg) {
+
+                        var ratio = (_value - _minValue) / (_maxValue - _minValue);
+                        var endAngle = Math.min(360 * ratio, 360);
+                        endAngle = endAngle * Math.PI / 180;
+
+                        path.datum(endAngle);
+                        path.transition().duration(_duration)
+                            .attrTween("d", arcTween);
+
+                        if (ratio > 1) {
+                            path2.datum(Math.min(360 * (ratio - 1), 360) * Math.PI / 180);
+                            path2.transition().delay(_duration).duration(_duration)
+                                .attrTween("d", arcTween2);
+                        }
+
+                        label.datum(Math.round(ratio * 100));
+                        label.transition().duration(_duration)
+                            .tween("text", labelTween);
+
+                    }
+
+                });
+
+                function onMouseClick(d) {
+                    if (typeof _mouseClick == "function") {
+                        _mouseClick.call();
+                    }
+                }
+            }
+
+            function labelTween(a) {
+                var i = d3.interpolate(_currentValue, a);
+                _currentValue = i(0);
+
+                return function (t) {
+                    _currentValue = i(t);
+                    this.textContent = Math.round(i(t)) + "%";
+                }
+            }
+
+            function arcTween(a) {
+                var i = d3.interpolate(_currentArc, a);
+
+                return function (t) {
+                    _currentArc = i(t);
+                    return _arc.endAngle(i(t))();
+                };
+            }
+
+            function arcTween2(a) {
+                var i = d3.interpolate(_currentArc2, a);
+
+                return function (t) {
+                    return _arc2.endAngle(i(t))();
+                };
+            }
+
+
+            function measure() {
+                _width = _diameter - _margin.right - _margin.left - _margin.top - _margin.bottom;
+                _height = _width;
+                _fontSize = _width * .2;
+                _arc.outerRadius(_width / 2);
+                _arc.innerRadius(_width / 2 * .85);
+                _arc2.outerRadius(_width / 2 * .85);
+                _arc2.innerRadius(_width / 2 * .85 - (_width / 2 * .15));
+            }
+
+
+            component.render = function () {
+                measure();
+                component();
+                return component;
+            }
+
+            component.value = function (_) {
+                if (!arguments.length) return _value;
+                _value = [_];
+                _selection.datum([_value]);
+                return component;
+            }
+
+
+            component.margin = function (_) {
+                if (!arguments.length) return _margin;
+                _margin = _;
+                return component;
+            };
+
+            component.diameter = function (_) {
+                if (!arguments.length) return _diameter
+                _diameter = _;
+                return component;
+            };
+
+            component.minValue = function (_) {
+                if (!arguments.length) return _minValue;
+                _minValue = _;
+                return component;
+            };
+
+            component.maxValue = function (_) {
+                if (!arguments.length) return _maxValue;
+                _maxValue = _;
+                return component;
+            };
+
+            component.label = function (_) {
+                if (!arguments.length) return _label;
+                _label = _;
+                return component;
+            };
+
+            component._duration = function (_) {
+                if (!arguments.length) return _duration;
+                _duration = _;
+                return component;
+            }
+
+            component.onClick = function (_) {
+                if (!arguments.length) return _mouseClick;
+                _mouseClick = _;
+                return component;
+            }
+
+            return component;
+
+        };
+
+    };
+
+
+    /*************************************************** Scatter chart ***************************************************************************************************/
+
+    igviz.drawScatterPlot = function (chartObj) {
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+        //    table=setData(dataTable,chartConfig)
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis])
+        rString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.pointSize])
+        cString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.pointColor])
+
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "range": "width",
+            "zero": false,
+            "field": xString
+
+        }
+
+        rScaleConfig = {
+            "index": chartConfig.pointSize,
+            "range": [0, 576],
+            "schema": dataTable.metadata,
+            "name": "r",
+            "field": rString
+        }
+        cScaleConfig = {
+            "index": chartConfig.pointColor,
+            "schema": dataTable.metadata,
+            "name": "c",
+            "range": [chartConfig.minColor, chartConfig.maxColor],
+            "field": cString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yString
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+        var rScale = setScale(rScaleConfig);
+        var cScale = setScale(cScaleConfig)
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": 25,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": "values",
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -30,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        var spec = {
+            "width": chartConfig.width - 130,
+            "height": chartConfig.height,
+            //"padding":{"top":40,"bottom":60,'left':60,"right":60},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category20"
+                },
+                rScale, cScale
+            ],
+            "axes": [xAxis, yAxis
+            ],
+            //"legends": [
+            //    {
+            //
+            //        "orient": "right",
+            //        "fill": "color",
+            //        "title": "Legend",
+            //        "values": [],
+            //        "properties": {
+            //            "title": {
+            //                "fontSize": {"value": 14}
+            //            },
+            //            "labels": {
+            //                "fontSize": {"value": 12}
+            //            },
+            //            "symbols": {
+            //                "stroke": {"value": "transparent"}
+            //            },
+            //            "legend": {
+            //                "stroke": {"value": "steelblue"},
+            //                "strokeWidth": {"value": 1.5}
+            //
+            //            }
+            //        }
+            //    }],
+
+
+            //    "scales": [
+            //    {
+            //        "name": "x",
+            //        "nice": true,
+            //        "range": "width",
+            //        "domain": {"data": "iris", "field": "data.sepalWidth"}
+            //    },
+            //    {
+            //        "name": "y",
+            //        "nice": true,
+            //        "range": "height",
+            //        "domain": {"data": "iris", "field": "data.petalLength"}
+            //    },
+            //    {
+            //        "name": "c",
+            //        "type": "ordinal",
+            //        "domain": {"data": "iris", "field": "data.species"},
+            //        "range": ["#800", "#080", "#008"]
+            //    }
+            //],
+            //    "axes": [
+            //    {"type": "x", "scale": "x", "offset": 5, "ticks": 5, "title": "Sepal Width"},
+            //    {"type": "y", "scale": "y", "offset": 5, "ticks": 5, "title": "Petal Length"}
+            //],
+            //    "legends": [
+            //    {
+            //        "fill": "c",
+            //        "title": "Species",
+            //        "offset": 0,
+            //        "properties": {
+            //            "symbols": {
+            //                "fillOpacity": {"value": 0.5},
+            //                "stroke": {"value": "transparent"}
+            //            }
+            //        }
+            //    }
+            //],
+            "marks": [
+                {
+                    "type": "symbol",
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yString},
+                            "fill": {"scale": "c", "field": cString}
+                            //"fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            "size": {"scale": "r", "field": rString}
+                            // "stroke": {"value": "transparent"}
+                        },
+                        "hover": {
+                            "size": {"value": 300},
+                            "stroke": {"value": "white"}
+                        }
+                    }
+                }
+            ]
+        }
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+            console.log(tool, event, item);
+            xVar = dataTable.metadata.names[chartConfig.xAxis]
+            yVar = dataTable.metadata.names[chartConfig.yAxis]
+            pSize = dataTable.metadata.names[chartConfig.pointSize]
+            pColor = dataTable.metadata.names[chartConfig.pointColor]
+
+            contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr>' + '<tr><td> Size </td><td> (' + pSize + ') </td><td>' + item.datum.data[pSize] + '</td></tr>' + '<tr><td bgcolor="' + item.fill + '">&nbsp; </td><td> (' + pColor + ') </td><td>' + item.datum.data[pColor] + '</td></tr>' +
+                '</table>';
+
+
+            tool.html(contentString).style({
+                'left': event.pageX + 10 + 'px',
+                'top': event.pageY + 10 + 'px',
+                'opacity': 1
+            })
+            tool.selectAll('tr td').style('padding', "3px");
+
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+    }
+
+
+    /*************************************************** Single Number chart ***************************************************************************************************/
+
+    igviz.drawSingleNumberDiagram = function (chartObj) {
+
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+
+        //Width and height
+        var w = chartConfig.width;
+        var h = chartConfig.height;
+        var padding = chartConfig.padding;
+
+        var svgID = divId + "_svg";
+        //Remove current SVG if it is already there
+        d3.select(svgID).remove();
+
+        //Create SVG element
+        singleNumSvg = d3.select(divId)
+            .append("svg")
+            .attr("id", svgID.replace("#", ""))
+            .attr("width", w)
+            .attr("height", h);
+
+
+        singleNumSvg.append("rect")
+            .attr("id", "rect")
+            .attr("width", w)
+            .attr("height", h);
+
+        /*singleNumCurveSvg = d3.select(divId)
+         .append("svg")
+         .attr("id", svgID.replace("#",""))
+         .attr("width", 207)
+         .attr("height", 161);*/
+
+    };
+
+
+    /*************************************************** Table chart ***************************************************************************************************/
+
+    var cnt = 0;
+
+    igviz.drawTable = function (divId, chartConfig, dataTable) {
+
+        //remove the current table if it is already exist
+        d3.select(divId).select("table").remove();
+
+        var rowLabel = dataTable.metadata.names;
+
+        //append the Table to the div
+        var table = d3.select(divId).append("table").attr('class', 'table table-bordered');
+
+        //create the table head
+        thead = table.append("thead");
+        tbody = table.append("tbody")
+
+        //Append the header to the table
+        thead.append("tr")
+            .selectAll("th")
+            .data(rowLabel)
+            .enter()
+            .append("th")
+            .text(function (d) {
+                return d;
+            });
+    };
+
+    /*************************************************** map ***************************************************************************************************/
+    function loadWorldMapCodes() {
+        var fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/countryInfo/';
+        $.ajaxSetup({async: false});
+        $.getJSON(fileName, function (json) {
+            worldMapCodes = json;
+        });
+        $.ajaxSetup({async: true});
+    }
+
+    function loadUSAMapCodes() {
+        var fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/usaInfo/';
+        $.ajaxSetup({async: false});
+        $.getJSON(fileName, function (json) {
+            usaMapCodes = json;
+        });
+        $.ajaxSetup({async: true});
+    }
+
+    function getMapCode(name, region) {
+        if (region == "usa") {
+            $.each(usaMapCodes, function (i, location) {
+                if (usaMapCodes[name] != null && usaMapCodes[name] != "") {
+                    name = "US" + usaMapCodes[name];
+                }
+            });
+
+        } else {
+            $.each(worldMapCodes, function (i, location) {
+                if (name.toUpperCase() == location["name"].toUpperCase()) {
+                    name = location["alpha-3"];
+                }
+            });
+        }
+        return name;
+    };
+
+    igviz.drawMap = function (divId, chartConfig, dataTable) {
+
+        var fileName;
+        var width = chartConfig.width;
+        var height = chartConfig.height;
+        var xAxis = chartConfig.xAxis;
+        var yAxis = chartConfig.yAxis;
+
+        if (chartConfig.region == "usa") {
+            fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/usa/';
+            loadUSAMapCodes();
+            mapChart = d3.geomap.choropleth()
+                .geofile(fileName)
+                .projection(d3.geo.albersUsa)
+                .unitId(xAxis)
+                .width(width)
+                .height(height)
+                .colors(colorbrewer.RdPu[chartConfig.legendGradientLevel])
+                .column(yAxis)
+                .scale([width / 1.1])
+                .translate([width / 2, height / 2.2])
+                .legend(true);
+
+
+        } else {
+            fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/world/';
+
+            var scaleDivision = 5.5;
+            var widthDivision = 2;
+            var heightDivision = 2;
+
+            if (chartConfig.region == "europe") {
+
+                scaleDivision = width / height;
+                widthDivision = 3;
+                heightDivision = 0.8;
+
+            }
+            loadWorldMapCodes();
+            mapChart = d3.geomap.choropleth()
+                .geofile(fileName)
+                .unitId(xAxis)
+                .width(width)
+                .height(height)
+                .colors(colorbrewer.RdPu[chartConfig.legendGradientLevel])
+                .column(yAxis)
+                .scale([width / scaleDivision])
+                .translate([width / widthDivision, height / heightDivision])
+                .legend(true);
+        }
+    };
+
+
+    /*************************************************** Bar chart Drill Dowining Function  ***************************************************************************************************/
+
+    igviz.drillDown = function drillDown(index, divId, chartConfig, dataTable, originaltable) {
+        //  console.log(dataTable,chartConfig,divId);
+        if (index == 0) {
+            d3.select(divId).append('div').attr({id: 'links', height: 20, 'bgcolor': 'blue'})
+            d3.select(divId).append('div').attr({id: 'chartDiv'})
+            chartConfig.height = chartConfig.height - 20;
+            divId = "#chartDiv";
+        }
+        var currentChartConfig = JSON.parse(JSON.stringify(chartConfig));
+        var current_x = 0;
+        if (index < chartConfig.xAxis.length)
+            current_x = chartConfig.xAxis[index].index
+        else
+            current_x = chartConfig.xAxis[index - 1].child;
+
+        var current_y = chartConfig.yAxis;
+        var currentData = {
+            metadata: {
+                names: [dataTable.metadata.names[current_x], dataTable.metadata.names[current_y]],
+                types: [dataTable.metadata.types[current_x], dataTable.metadata.types[current_y]]
+            },
+            data: []
+        }
+
+        var tempData = [];
+        for (i = 0; i < dataTable.data.length; i++) {
+            name = dataTable.data[i][current_x];
+            currentYvalue = dataTable.data[i][current_y];
+            isFound = false;
+            var j = 0;
+            for (; j < tempData.length; j++) {
+                if (tempData[j][0] === name) {
+                    isFound = true;
+                    break;
+                }
+            }
+            if (isFound) {
+                tempData[j][1] += currentYvalue;
+                console.log(name, currentYvalue, tempData[j][1]);
+            } else {
+                console.log("create", name, currentYvalue);
+                tempData.push([name, currentYvalue])
+            }
+        }
+
+        currentData.data = tempData;
+        currentChartConfig.xAxis = 0;
+        currentChartConfig.yAxis = 1;
+        currentChartConfig.chartType = 'bar';
+
+
+        var x = this.setUp(divId, currentChartConfig, currentData);
+        x.plot(currentData.data, function () {
+
+            var filters = d3.select('#links .root').on('click', function () {
+                d3.select("#links").html('');
+                igviz.drillDown(0, divId, chartConfig, originaltable, originaltable);
+
+            })
+
+
+            var filters = d3.select('#links').selectAll('.filter');
+            filters.on('click', function (d, i) {
+
+                filtersList = filters.data();
+
+                console.log(filtersList)
+                var filterdDataset = [];
+                var selectionObj = JSON.parse(JSON.stringify(originaltable));
+                itr = 0;
+                for (l = 0; l < originaltable.data.length; l++) {
+                    isFiltered = true;
+                    for (k = 0; k <= i; k++) {
+
+                        if (originaltable.data[l][filtersList[k][0]] !== filtersList[k][1]) {
+                            isFiltered = false;
+                            break;
+                        }
+                    }
+                    if (isFiltered) {
+                        filterdDataset[itr++] = originaltable.data[l];
+                    }
+
+                }
+
+                d3.selectAll('#links g').each(function (d, indx) {
+                    if (indx > i) {
+                        this.remove();
+                    }
+                })
+
+
+                selectionObj.data = filterdDataset;
+
+                igviz.drillDown(i + 1, divId, chartConfig, selectionObj, originaltable, true);
+
+
+            });
+
+
+            if (index < chartConfig.xAxis.length) {
+                console.log(x);
+                d3.select(x.chart._el).selectAll('g.type-rect rect').on('click', function (d, i) {
+                    // console.log(d, i, this);
+                    console.log(d, i);
+                    var selectedName = d.datum.data[x.dataTable.metadata.names[x.config.xAxis]];
+                    //  console.log(selectedName);
+                    var selectedCurrentData = JSON.parse(JSON.stringify(dataTable));
+                    var innerText;
+
+                    var links = d3.select('#links').append('g').append('text').text(dataTable.metadata.names[current_x] + " : ").attr({
+
+                        "font-size": "10px",
+                        "x": 10,
+                        "y": 20
+
+                    });
+
+                    d3.select('#links:first-child').selectAll('text').attr('class', 'root');
+
+                    d3.select('#links g:last-child').append('span').data([[current_x, selectedName]]).attr('class', 'filter').text(selectedName + "  >  ")
+
+                    var l = selectedCurrentData.data.length;
+                    var newdata = [];
+                    b = 0;
+                    for (a = 0; a < l; a++) {
+                        if (selectedCurrentData.data[a][current_x] === selectedName) {
+                            newdata[b++] = selectedCurrentData.data[a];
+                        }
+                    }
+
+
+                    selectedCurrentData.data = newdata;
+
+
+                    igviz.drillDown(index + 1, divId, chartConfig, selectedCurrentData, originaltable, true);
+
+
+                });
+
+            }
+        });
+
+
+    }
+
+
+    /*************************************************** Specification Generation method ***************************************************************************************************/
+
+
+    function setScale(scaleConfig) {
+        var scale = {"name": scaleConfig.name};
+
+        console.log(scaleConfig.schema, scaleConfig.index);
+
+        dataFrom = "table";
+
+        scale.range = scaleConfig.range;
+
+
+        switch (scaleConfig.schema.types[scaleConfig.index]) {
+            case 'T':
+                scale["type"] = 'time'
+
+                break;
+
+            case 'C':
+                scale["type"] = 'ordinal'
+                if (scale.name === "c") {
+                    scale.range = "category20";
+                }
+
+                break;
+            case 'N':
+                scale["type"] = 'linear'
+
+                break;
+        }
+        if (scaleConfig.hasOwnProperty("dataFrom")) {
+            dataFrom = scaleConfig.dataFrom;
+        }
+
+        scale.range = scaleConfig.range;
+        scale.domain = {"data": dataFrom, "field": scaleConfig.field}
+
+        //optional attributes
+        if (scaleConfig.hasOwnProperty("round")) {
+            scale["round"] = scaleConfig.round;
+        }
+
+        if (scaleConfig.hasOwnProperty("nice")) {
+            scale["nice"] = scaleConfig.nice;
+        }
+
+        if (scaleConfig.hasOwnProperty("padding")) {
+            scale["padding"] = scaleConfig.padding;
+        }
+
+        if (scaleConfig.hasOwnProperty("reverse")) {
+            scale["reverse"] = scaleConfig.reverse;
+        }
+
+        if (scaleConfig.hasOwnProperty("sort")) {
+            scale["sort"] = scaleConfig.sort;
+        }
+
+        if (scale.name == 'x' && scale.type == 'linear') {
+            scale.sort = true;
+        }
+        if (scaleConfig.hasOwnProperty("clamp")) {
+            scale["clamp"] = scaleConfig.clamp;
+        }
+
+
+        if (scaleConfig.hasOwnProperty("zero")) {
+            scale["zero"] = scaleConfig.zero;
+        }
+        console.log(scale);
+        return scale;
+
+    }
+
+    function setAxis(axisConfig) {
+
+        console.log("Axis", axisConfig);
+
+        axis = {
+            "type": axisConfig.type,
+            "scale": axisConfig.scale,
+            'title': axisConfig.title,
+            "grid": axisConfig.grid,
+
+            "properties": {
+                "ticks": {
+                    // "stroke": {"value": "steelblue"}
+                },
+                "majorTicks": {
+                    "strokeWidth": {"value": 2}
+                },
+                "labels": {
+                    // "fill": {"value": "steelblue"},
+                    "angle": {"value": axisConfig.angle},
+                    // "fontSize": {"value": 14},
+                    "align": {"value": axisConfig.align},
+                    "baseline": {"value": "middle"},
+                    "dx": {"value": axisConfig.dx},
+                    "dy": {"value": axisConfig.dy}
+                },
+                "title": {
+                    "fontSize": {"value": 16},
+
+                    "dx": {'value': axisConfig.titleDx},
+                    "dy": {'value': axisConfig.titleDy}
+                },
+                "axis": {
+                    "stroke": {"value": "#333"},
+                    "strokeWidth": {"value": 1.5}
+                }
+
+            }
+
+        }
+
+        if (axisConfig.hasOwnProperty("tickSize")) {
+            axis["tickSize"] = axisConfig.tickSize;
+        }
+
+
+        if (axisConfig.hasOwnProperty("tickPadding")) {
+            axis["tickPadding"] = axisConfig.tickPadding;
+        }
+
+        console.log("SpecAxis", axis);
+        return axis;
+    }
+
+    function setLegends(chartConfig, schema) {
+
+    }
+
+    function setData(dataTableObj, chartConfig, schema) {
+
+        var table = [];
+        for (i = 0; i < dataTableObj.length; i++) {
+            var ptObj = {};
+            namesArray = schema.names;
+            for (j = 0; j < namesArray.length; j++) {
+                if (schema.types[j] == 'T') {
+                    ptObj[createAttributeNames(namesArray[j])] = new Date(dataTableObj[i][j]);
+                } else
+                    ptObj[createAttributeNames(namesArray[j])] = dataTableObj[i][j];
+            }
+
+            table[i] = ptObj;
+        }
+
+        return table;
+    }
+
+    function createAttributeNames(str) {
+        return str.replace(' ', '_');
+    }
+
+    function setGenericAxis(axisConfig, spec) {
+        MappingObj = {};
+        MappingObj["tickSize"] = "tickSize";
+        MappingObj["tickPadding"] = "tickPadding";
+        MappingObj["title"] = "title";
+        MappingObj["grid"] = "grid";
+        MappingObj["offset"] = "offset";
+        MappingObj["ticks"] = "ticks";
+
+        MappingObj["labelColor"] = "fill";
+        MappingObj["labelAngle"] = "angle";
+        MappingObj["labelAlign"] = "align";
+        MappingObj["labelFontSize"] = "fontSize";
+        MappingObj["labelDx"] = "dx";
+        MappingObj["labelDy"] = "dy";
+        MappingObj["labelBaseLine"] = "baseline";
+
+        MappingObj["titleDx"] = "dx";
+        MappingObj["titleDy"] = "dy";
+        MappingObj["titleFontSize"] = "fontSize";
+
+        MappingObj["axisColor"] = "stroke";
+        MappingObj["axisWidth"] = "strokeWidth";
+
+        MappingObj["tickColor"] = "ticks.stroke";
+        MappingObj["tickWidth"] = "ticks.strokeWidth";
+
+
+        console.log("previous Axis", spec)
+        for (var propt in axisConfig) {
+
+            if (propt == "tickSize" || propt == "tickPadding")
+                continue;
+
+            if (axisConfig.hasOwnProperty(propt)) {
+
+                if (propt.indexOf("label") == 0)
+                    spec.properties.labels[MappingObj[propt]].value = axisConfig[propt];
+                else if (propt.indexOf("ticks") == 0)
+                    spec.

<TRUNCATED>

[41/41] stratos git commit: This closes #478 on GitHub

Posted by im...@apache.org.
This closes #478 on GitHub


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/581d345c
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/581d345c
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/581d345c

Branch: refs/heads/stratos-4.1.x
Commit: 581d345c6cbe4791d2515fc99062b6d406d87077
Parents: 02dbd97
Author: Imesh Gunaratne <im...@apache.org>
Authored: Tue Oct 13 20:31:16 2015 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Tue Oct 13 20:31:16 2015 +0530

----------------------------------------------------------------------

----------------------------------------------------------------------



[40/41] stratos git commit: Updating spark-udfs README file

Posted by im...@apache.org.
Updating spark-udfs README file


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/02dbd975
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/02dbd975
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/02dbd975

Branch: refs/heads/stratos-4.1.x
Commit: 02dbd975a9b64a3f399423c87e28cb81d1ef51b1
Parents: 756a4e7
Author: Thanuja <th...@wso2.com>
Authored: Tue Oct 13 20:19:23 2015 +0530
Committer: Thanuja <th...@wso2.com>
Committed: Tue Oct 13 20:19:23 2015 +0530

----------------------------------------------------------------------
 extensions/das/modules/stratos-das-extension/spark-udfs/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/02dbd975/extensions/das/modules/stratos-das-extension/spark-udfs/README.md
----------------------------------------------------------------------
diff --git a/extensions/das/modules/stratos-das-extension/spark-udfs/README.md b/extensions/das/modules/stratos-das-extension/spark-udfs/README.md
index cb28289..0aad56b 100644
--- a/extensions/das/modules/stratos-das-extension/spark-udfs/README.md
+++ b/extensions/das/modules/stratos-das-extension/spark-udfs/README.md
@@ -4,5 +4,5 @@ This directory contains Spark UDFs (user Defined Function) required for executin
 Follow the below steps to use UDF in spark environment:
 1. Add the jar files of each spark-udfs to '<DAS-HOME>/repository/components/lib'.
    Example: org.apache.stratos.das.extension.spark.time.udf-<stratos-version>.jar
-2. Add each UDF class path to 'spark-udf-config.xml' file in '<DAS-HOME>/repository/conf/spark/' folder.
+2. Add each UDF class path to 'spark-udf-config.xml' file in '<DAS-HOME>/repository/conf/analytics/spark/' folder.
    Example: <class-name>org.apache.stratos.das.extension.spark.udf.TimeUDF</class-name>
\ No newline at end of file


[17/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/jquery.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/jquery.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/jquery.js
new file mode 100644
index 0000000..d332fe2
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/jquery.js
@@ -0,0 +1,9496 @@
+/*!
+ * jQuery JavaScript Library v1.8.3
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
+ */
+(function (window, undefined) {
+    var
+    // A central reference to the root jQuery(document)
+        rootjQuery,
+
+    // The deferred used on DOM ready
+        readyList,
+
+    // Use the correct document accordingly with window argument (sandbox)
+        document = window.document,
+        location = window.location,
+        navigator = window.navigator,
+
+    // Map over jQuery in case of overwrite
+        _jQuery = window.jQuery,
+
+    // Map over the $ in case of overwrite
+        _$ = window.$,
+
+    // Save a reference to some core methods
+        core_push = Array.prototype.push,
+        core_slice = Array.prototype.slice,
+        core_indexOf = Array.prototype.indexOf,
+        core_toString = Object.prototype.toString,
+        core_hasOwn = Object.prototype.hasOwnProperty,
+        core_trim = String.prototype.trim,
+
+    // Define a local copy of jQuery
+        jQuery = function (selector, context) {
+            // The jQuery object is actually just the init constructor 'enhanced'
+            return new jQuery.fn.init(selector, context, rootjQuery);
+        },
+
+    // Used for matching numbers
+        core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
+
+    // Used for detecting and trimming whitespace
+        core_rnotwhite = /\S/,
+        core_rspace = /\s+/,
+
+    // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+        rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+    // A simple way to check for HTML strings
+    // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+        rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+    // Match a standalone tag
+        rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+    // JSON RegExp
+        rvalidchars = /^[\],:{}\s]*$/,
+        rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+        rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+        rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
+
+    // Matches dashed string for camelizing
+        rmsPrefix = /^-ms-/,
+        rdashAlpha = /-([\da-z])/gi,
+
+    // Used by jQuery.camelCase as callback to replace()
+        fcamelCase = function (all, letter) {
+            return ( letter + "" ).toUpperCase();
+        },
+
+    // The ready event handler and self cleanup method
+        DOMContentLoaded = function () {
+            if (document.addEventListener) {
+                document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
+                jQuery.ready();
+            } else if (document.readyState === "complete") {
+                // we're here because readyState === "complete" in oldIE
+                // which is good enough for us to call the dom ready!
+                document.detachEvent("onreadystatechange", DOMContentLoaded);
+                jQuery.ready();
+            }
+        },
+
+    // [[Class]] -> type pairs
+        class2type = {};
+
+    jQuery.fn = jQuery.prototype = {
+        constructor: jQuery,
+        init: function (selector, context, rootjQuery) {
+            var match, elem, ret, doc;
+
+            // Handle $(""), $(null), $(undefined), $(false)
+            if (!selector) {
+                return this;
+            }
+
+            // Handle $(DOMElement)
+            if (selector.nodeType) {
+                this.context = this[0] = selector;
+                this.length = 1;
+                return this;
+            }
+
+            // Handle HTML strings
+            if (typeof selector === "string") {
+                if (selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector.length >= 3) {
+                    // Assume that strings that start and end with <> are HTML and skip the regex check
+                    match = [null, selector, null];
+
+                } else {
+                    match = rquickExpr.exec(selector);
+                }
+
+                // Match html or make sure no context is specified for #id
+                if (match && (match[1] || !context)) {
+
+                    // HANDLE: $(html) -> $(array)
+                    if (match[1]) {
+                        context = context instanceof jQuery ? context[0] : context;
+                        doc = ( context && context.nodeType ? context.ownerDocument || context : document );
+
+                        // scripts is true for back-compat
+                        selector = jQuery.parseHTML(match[1], doc, true);
+                        if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
+                            this.attr.call(selector, context, true);
+                        }
+
+                        return jQuery.merge(this, selector);
+
+                        // HANDLE: $(#id)
+                    } else {
+                        elem = document.getElementById(match[2]);
+
+                        // Check parentNode to catch when Blackberry 4.6 returns
+                        // nodes that are no longer in the document #6963
+                        if (elem && elem.parentNode) {
+                            // Handle the case where IE and Opera return items
+                            // by name instead of ID
+                            if (elem.id !== match[2]) {
+                                return rootjQuery.find(selector);
+                            }
+
+                            // Otherwise, we inject the element directly into the jQuery object
+                            this.length = 1;
+                            this[0] = elem;
+                        }
+
+                        this.context = document;
+                        this.selector = selector;
+                        return this;
+                    }
+
+                    // HANDLE: $(expr, $(...))
+                } else if (!context || context.jquery) {
+                    return ( context || rootjQuery ).find(selector);
+
+                    // HANDLE: $(expr, context)
+                    // (which is just equivalent to: $(context).find(expr)
+                } else {
+                    return this.constructor(context).find(selector);
+                }
+
+                // HANDLE: $(function)
+                // Shortcut for document ready
+            } else if (jQuery.isFunction(selector)) {
+                return rootjQuery.ready(selector);
+            }
+
+            if (selector.selector !== undefined) {
+                this.selector = selector.selector;
+                this.context = selector.context;
+            }
+
+            return jQuery.makeArray(selector, this);
+        },
+
+        // Start with an empty selector
+        selector: "",
+
+        // The current version of jQuery being used
+        jquery: "1.8.3",
+
+        // The default length of a jQuery object is 0
+        length: 0,
+
+        // The number of elements contained in the matched element set
+        size: function () {
+            return this.length;
+        },
+
+        toArray: function () {
+            return core_slice.call(this);
+        },
+
+        // Get the Nth element in the matched element set OR
+        // Get the whole matched element set as a clean array
+        get: function (num) {
+            return num == null ?
+
+                // Return a 'clean' array
+                this.toArray() :
+
+                // Return just the object
+                ( num < 0 ? this[this.length + num] : this[num] );
+        },
+
+        // Take an array of elements and push it onto the stack
+        // (returning the new matched element set)
+        pushStack: function (elems, name, selector) {
+
+            // Build a new jQuery matched element set
+            var ret = jQuery.merge(this.constructor(), elems);
+
+            // Add the old object onto the stack (as a reference)
+            ret.prevObject = this;
+
+            ret.context = this.context;
+
+            if (name === "find") {
+                ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+            } else if (name) {
+                ret.selector = this.selector + "." + name + "(" + selector + ")";
+            }
+
+            // Return the newly-formed element set
+            return ret;
+        },
+
+        // Execute a callback for every element in the matched set.
+        // (You can seed the arguments with an array of args, but this is
+        // only used internally.)
+        each: function (callback, args) {
+            return jQuery.each(this, callback, args);
+        },
+
+        ready: function (fn) {
+            // Add the callback
+            jQuery.ready.promise().done(fn);
+
+            return this;
+        },
+
+        eq: function (i) {
+            i = +i;
+            return i === -1 ?
+                this.slice(i) :
+                this.slice(i, i + 1);
+        },
+
+        first: function () {
+            return this.eq(0);
+        },
+
+        last: function () {
+            return this.eq(-1);
+        },
+
+        slice: function () {
+            return this.pushStack(core_slice.apply(this, arguments),
+                "slice", core_slice.call(arguments).join(","));
+        },
+
+        map: function (callback) {
+            return this.pushStack(jQuery.map(this, function (elem, i) {
+                return callback.call(elem, i, elem);
+            }));
+        },
+
+        end: function () {
+            return this.prevObject || this.constructor(null);
+        },
+
+        // For internal use only.
+        // Behaves like an Array's method, not like a jQuery method.
+        push: core_push,
+        sort: [].sort,
+        splice: [].splice
+    };
+
+// Give the init function the jQuery prototype for later instantiation
+    jQuery.fn.init.prototype = jQuery.fn;
+
+    jQuery.extend = jQuery.fn.extend = function () {
+        var options, name, src, copy, copyIsArray, clone,
+            target = arguments[0] || {},
+            i = 1,
+            length = arguments.length,
+            deep = false;
+
+        // Handle a deep copy situation
+        if (typeof target === "boolean") {
+            deep = target;
+            target = arguments[1] || {};
+            // skip the boolean and the target
+            i = 2;
+        }
+
+        // Handle case when target is a string or something (possible in deep copy)
+        if (typeof target !== "object" && !jQuery.isFunction(target)) {
+            target = {};
+        }
+
+        // extend jQuery itself if only one argument is passed
+        if (length === i) {
+            target = this;
+            --i;
+        }
+
+        for (; i < length; i++) {
+            // Only deal with non-null/undefined values
+            if ((options = arguments[i]) != null) {
+                // Extend the base object
+                for (name in options) {
+                    src = target[name];
+                    copy = options[name];
+
+                    // Prevent never-ending loop
+                    if (target === copy) {
+                        continue;
+                    }
+
+                    // Recurse if we're merging plain objects or arrays
+                    if (deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) )) {
+                        if (copyIsArray) {
+                            copyIsArray = false;
+                            clone = src && jQuery.isArray(src) ? src : [];
+
+                        } else {
+                            clone = src && jQuery.isPlainObject(src) ? src : {};
+                        }
+
+                        // Never move original objects, clone them
+                        target[name] = jQuery.extend(deep, clone, copy);
+
+                        // Don't bring in undefined values
+                    } else if (copy !== undefined) {
+                        target[name] = copy;
+                    }
+                }
+            }
+        }
+
+        // Return the modified object
+        return target;
+    };
+
+    jQuery.extend({
+        noConflict: function (deep) {
+            if (window.$ === jQuery) {
+                window.$ = _$;
+            }
+
+            if (deep && window.jQuery === jQuery) {
+                window.jQuery = _jQuery;
+            }
+
+            return jQuery;
+        },
+
+        // Is the DOM ready to be used? Set to true once it occurs.
+        isReady: false,
+
+        // A counter to track how many items to wait for before
+        // the ready event fires. See #6781
+        readyWait: 1,
+
+        // Hold (or release) the ready event
+        holdReady: function (hold) {
+            if (hold) {
+                jQuery.readyWait++;
+            } else {
+                jQuery.ready(true);
+            }
+        },
+
+        // Handle when the DOM is ready
+        ready: function (wait) {
+
+            // Abort if there are pending holds or we're already ready
+            if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
+                return;
+            }
+
+            // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+            if (!document.body) {
+                return setTimeout(jQuery.ready, 1);
+            }
+
+            // Remember that the DOM is ready
+            jQuery.isReady = true;
+
+            // If a normal DOM Ready event fired, decrement, and wait if need be
+            if (wait !== true && --jQuery.readyWait > 0) {
+                return;
+            }
+
+            // If there are functions bound, to execute
+            readyList.resolveWith(document, [jQuery]);
+
+            // Trigger any bound ready events
+            if (jQuery.fn.trigger) {
+                jQuery(document).trigger("ready").off("ready");
+            }
+        },
+
+        // See test/unit/core.js for details concerning isFunction.
+        // Since version 1.3, DOM methods and functions like alert
+        // aren't supported. They return false on IE (#2968).
+        isFunction: function (obj) {
+            return jQuery.type(obj) === "function";
+        },
+
+        isArray: Array.isArray || function (obj) {
+            return jQuery.type(obj) === "array";
+        },
+
+        isWindow: function (obj) {
+            return obj != null && obj == obj.window;
+        },
+
+        isNumeric: function (obj) {
+            return !isNaN(parseFloat(obj)) && isFinite(obj);
+        },
+
+        type: function (obj) {
+            return obj == null ?
+                String(obj) :
+            class2type[core_toString.call(obj)] || "object";
+        },
+
+        isPlainObject: function (obj) {
+            // Must be an Object.
+            // Because of IE, we also have to check the presence of the constructor property.
+            // Make sure that DOM nodes and window objects don't pass through, as well
+            if (!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) {
+                return false;
+            }
+
+            try {
+                // Not own constructor property must be Object
+                if (obj.constructor && !core_hasOwn.call(obj, "constructor") && !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
+                    return false;
+                }
+            } catch (e) {
+                // IE8,9 Will throw exceptions on certain host objects #9897
+                return false;
+            }
+
+            // Own properties are enumerated firstly, so to speed up,
+            // if last one is own, then all properties are own.
+
+            var key;
+            for (key in obj) {
+            }
+
+            return key === undefined || core_hasOwn.call(obj, key);
+        },
+
+        isEmptyObject: function (obj) {
+            var name;
+            for (name in obj) {
+                return false;
+            }
+            return true;
+        },
+
+        error: function (msg) {
+            throw new Error(msg);
+        },
+
+        // data: string of html
+        // context (optional): If specified, the fragment will be created in this context, defaults to document
+        // scripts (optional): If true, will include scripts passed in the html string
+        parseHTML: function (data, context, scripts) {
+            var parsed;
+            if (!data || typeof data !== "string") {
+                return null;
+            }
+            if (typeof context === "boolean") {
+                scripts = context;
+                context = 0;
+            }
+            context = context || document;
+
+            // Single tag
+            if ((parsed = rsingleTag.exec(data))) {
+                return [context.createElement(parsed[1])];
+            }
+
+            parsed = jQuery.buildFragment([data], context, scripts ? null : []);
+            return jQuery.merge([],
+                (parsed.cacheable ? jQuery.clone(parsed.fragment) : parsed.fragment).childNodes);
+        },
+
+        parseJSON: function (data) {
+            if (!data || typeof data !== "string") {
+                return null;
+            }
+
+            // Make sure leading/trailing whitespace is removed (IE can't handle it)
+            data = jQuery.trim(data);
+
+            // Attempt to parse using the native JSON parser first
+            if (window.JSON && window.JSON.parse) {
+                return window.JSON.parse(data);
+            }
+
+            // Make sure the incoming data is actual JSON
+            // Logic borrowed from http://json.org/json2.js
+            if (rvalidchars.test(data.replace(rvalidescape, "@")
+                    .replace(rvalidtokens, "]")
+                    .replace(rvalidbraces, ""))) {
+
+                return ( new Function("return " + data) )();
+
+            }
+            jQuery.error("Invalid JSON: " + data);
+        },
+
+        // Cross-browser xml parsing
+        parseXML: function (data) {
+            var xml, tmp;
+            if (!data || typeof data !== "string") {
+                return null;
+            }
+            try {
+                if (window.DOMParser) { // Standard
+                    tmp = new DOMParser();
+                    xml = tmp.parseFromString(data, "text/xml");
+                } else { // IE
+                    xml = new ActiveXObject("Microsoft.XMLDOM");
+                    xml.async = "false";
+                    xml.loadXML(data);
+                }
+            } catch (e) {
+                xml = undefined;
+            }
+            if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) {
+                jQuery.error("Invalid XML: " + data);
+            }
+            return xml;
+        },
+
+        noop: function () {
+        },
+
+        // Evaluates a script in a global context
+        // Workarounds based on findings by Jim Driscoll
+        // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+        globalEval: function (data) {
+            if (data && core_rnotwhite.test(data)) {
+                // We use execScript on Internet Explorer
+                // We use an anonymous function so that context is window
+                // rather than jQuery in Firefox
+                ( window.execScript || function (data) {
+                    window["eval"].call(window, data);
+                } )(data);
+            }
+        },
+
+        // Convert dashed to camelCase; used by the css and data modules
+        // Microsoft forgot to hump their vendor prefix (#9572)
+        camelCase: function (string) {
+            return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
+        },
+
+        nodeName: function (elem, name) {
+            return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+        },
+
+        // args is for internal usage only
+        each: function (obj, callback, args) {
+            var name,
+                i = 0,
+                length = obj.length,
+                isObj = length === undefined || jQuery.isFunction(obj);
+
+            if (args) {
+                if (isObj) {
+                    for (name in obj) {
+                        if (callback.apply(obj[name], args) === false) {
+                            break;
+                        }
+                    }
+                } else {
+                    for (; i < length;) {
+                        if (callback.apply(obj[i++], args) === false) {
+                            break;
+                        }
+                    }
+                }
+
+                // A special, fast, case for the most common use of each
+            } else {
+                if (isObj) {
+                    for (name in obj) {
+                        if (callback.call(obj[name], name, obj[name]) === false) {
+                            break;
+                        }
+                    }
+                } else {
+                    for (; i < length;) {
+                        if (callback.call(obj[i], i, obj[i++]) === false) {
+                            break;
+                        }
+                    }
+                }
+            }
+
+            return obj;
+        },
+
+        // Use native String.trim function wherever possible
+        trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+            function (text) {
+                return text == null ?
+                    "" :
+                    core_trim.call(text);
+            } :
+
+            // Otherwise use our own trimming functionality
+            function (text) {
+                return text == null ?
+                    "" :
+                    ( text + "" ).replace(rtrim, "");
+            },
+
+        // results is for internal usage only
+        makeArray: function (arr, results) {
+            var type,
+                ret = results || [];
+
+            if (arr != null) {
+                // The window, strings (and functions) also have 'length'
+                // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+                type = jQuery.type(arr);
+
+                if (arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow(arr)) {
+                    core_push.call(ret, arr);
+                } else {
+                    jQuery.merge(ret, arr);
+                }
+            }
+
+            return ret;
+        },
+
+        inArray: function (elem, arr, i) {
+            var len;
+
+            if (arr) {
+                if (core_indexOf) {
+                    return core_indexOf.call(arr, elem, i);
+                }
+
+                len = arr.length;
+                i = i ? i < 0 ? Math.max(0, len + i) : i : 0;
+
+                for (; i < len; i++) {
+                    // Skip accessing in sparse arrays
+                    if (i in arr && arr[i] === elem) {
+                        return i;
+                    }
+                }
+            }
+
+            return -1;
+        },
+
+        merge: function (first, second) {
+            var l = second.length,
+                i = first.length,
+                j = 0;
+
+            if (typeof l === "number") {
+                for (; j < l; j++) {
+                    first[i++] = second[j];
+                }
+
+            } else {
+                while (second[j] !== undefined) {
+                    first[i++] = second[j++];
+                }
+            }
+
+            first.length = i;
+
+            return first;
+        },
+
+        grep: function (elems, callback, inv) {
+            var retVal,
+                ret = [],
+                i = 0,
+                length = elems.length;
+            inv = !!inv;
+
+            // Go through the array, only saving the items
+            // that pass the validator function
+            for (; i < length; i++) {
+                retVal = !!callback(elems[i], i);
+                if (inv !== retVal) {
+                    ret.push(elems[i]);
+                }
+            }
+
+            return ret;
+        },
+
+        // arg is for internal usage only
+        map: function (elems, callback, arg) {
+            var value, key,
+                ret = [],
+                i = 0,
+                length = elems.length,
+            // jquery objects are treated as arrays
+                isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[0] && elems[length - 1] ) || length === 0 || jQuery.isArray(elems) );
+
+            // Go through the array, translating each of the items to their
+            if (isArray) {
+                for (; i < length; i++) {
+                    value = callback(elems[i], i, arg);
+
+                    if (value != null) {
+                        ret[ret.length] = value;
+                    }
+                }
+
+                // Go through every key on the object,
+            } else {
+                for (key in elems) {
+                    value = callback(elems[key], key, arg);
+
+                    if (value != null) {
+                        ret[ret.length] = value;
+                    }
+                }
+            }
+
+            // Flatten any nested arrays
+            return ret.concat.apply([], ret);
+        },
+
+        // A global GUID counter for objects
+        guid: 1,
+
+        // Bind a function to a context, optionally partially applying any
+        // arguments.
+        proxy: function (fn, context) {
+            var tmp, args, proxy;
+
+            if (typeof context === "string") {
+                tmp = fn[context];
+                context = fn;
+                fn = tmp;
+            }
+
+            // Quick check to determine if target is callable, in the spec
+            // this throws a TypeError, but we will just return undefined.
+            if (!jQuery.isFunction(fn)) {
+                return undefined;
+            }
+
+            // Simulated bind
+            args = core_slice.call(arguments, 2);
+            proxy = function () {
+                return fn.apply(context, args.concat(core_slice.call(arguments)));
+            };
+
+            // Set the guid of unique handler to the same of original handler, so it can be removed
+            proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+            return proxy;
+        },
+
+        // Multifunctional method to get and set values of a collection
+        // The value/s can optionally be executed if it's a function
+        access: function (elems, fn, key, value, chainable, emptyGet, pass) {
+            var exec,
+                bulk = key == null,
+                i = 0,
+                length = elems.length;
+
+            // Sets many values
+            if (key && typeof key === "object") {
+                for (i in key) {
+                    jQuery.access(elems, fn, i, key[i], 1, emptyGet, value);
+                }
+                chainable = 1;
+
+                // Sets one value
+            } else if (value !== undefined) {
+                // Optionally, function values get executed if exec is true
+                exec = pass === undefined && jQuery.isFunction(value);
+
+                if (bulk) {
+                    // Bulk operations only iterate when executing function values
+                    if (exec) {
+                        exec = fn;
+                        fn = function (elem, key, value) {
+                            return exec.call(jQuery(elem), value);
+                        };
+
+                        // Otherwise they run against the entire set
+                    } else {
+                        fn.call(elems, value);
+                        fn = null;
+                    }
+                }
+
+                if (fn) {
+                    for (; i < length; i++) {
+                        fn(elems[i], key, exec ? value.call(elems[i], i, fn(elems[i], key)) : value, pass);
+                    }
+                }
+
+                chainable = 1;
+            }
+
+            return chainable ?
+                elems :
+
+                // Gets
+                bulk ?
+                    fn.call(elems) :
+                    length ? fn(elems[0], key) : emptyGet;
+        },
+
+        now: function () {
+            return ( new Date() ).getTime();
+        }
+    });
+
+    jQuery.ready.promise = function (obj) {
+        if (!readyList) {
+
+            readyList = jQuery.Deferred();
+
+            // Catch cases where $(document).ready() is called after the browser event has already occurred.
+            // we once tried to use readyState "interactive" here, but it caused issues like the one
+            // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+            if (document.readyState === "complete") {
+                // Handle it asynchronously to allow scripts the opportunity to delay ready
+                setTimeout(jQuery.ready, 1);
+
+                // Standards-based browsers support DOMContentLoaded
+            } else if (document.addEventListener) {
+                // Use the handy event callback
+                document.addEventListener("DOMContentLoaded", DOMContentLoaded, false);
+
+                // A fallback to window.onload, that will always work
+                window.addEventListener("load", jQuery.ready, false);
+
+                // If IE event model is used
+            } else {
+                // Ensure firing before onload, maybe late but safe also for iframes
+                document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+                // A fallback to window.onload, that will always work
+                window.attachEvent("onload", jQuery.ready);
+
+                // If IE and not a frame
+                // continually check to see if the document is ready
+                var top = false;
+
+                try {
+                    top = window.frameElement == null && document.documentElement;
+                } catch (e) {
+                }
+
+                if (top && top.doScroll) {
+                    (function doScrollCheck() {
+                        if (!jQuery.isReady) {
+
+                            try {
+                                // Use the trick by Diego Perini
+                                // http://javascript.nwbox.com/IEContentLoaded/
+                                top.doScroll("left");
+                            } catch (e) {
+                                return setTimeout(doScrollCheck, 50);
+                            }
+
+                            // and execute any waiting functions
+                            jQuery.ready();
+                        }
+                    })();
+                }
+            }
+        }
+        return readyList.promise(obj);
+    };
+
+// Populate the class2type map
+    jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (i, name) {
+        class2type["[object " + name + "]"] = name.toLowerCase();
+    });
+
+// All jQuery objects should point back to these
+    rootjQuery = jQuery(document);
+// String to Object options format cache
+    var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+    function createOptions(options) {
+        var object = optionsCache[options] = {};
+        jQuery.each(options.split(core_rspace), function (_, flag) {
+            object[flag] = true;
+        });
+        return object;
+    }
+
+    /*
+     * Create a callback list using the following parameters:
+     *
+     *	options: an optional list of space-separated options that will change how
+     *			the callback list behaves or a more traditional option object
+     *
+     * By default a callback list will act like an event callback list and can be
+     * "fired" multiple times.
+     *
+     * Possible options:
+     *
+     *	once:			will ensure the callback list can only be fired once (like a Deferred)
+     *
+     *	memory:			will keep track of previous values and will call any callback added
+     *					after the list has been fired right away with the latest "memorized"
+     *					values (like a Deferred)
+     *
+     *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+     *
+     *	stopOnFalse:	interrupt callings when a callback returns false
+     *
+     */
+    jQuery.Callbacks = function (options) {
+
+        // Convert options from String-formatted to Object-formatted if needed
+        // (we check in cache first)
+        options = typeof options === "string" ?
+            ( optionsCache[options] || createOptions(options) ) :
+            jQuery.extend({}, options);
+
+        var // Last fire value (for non-forgettable lists)
+            memory,
+        // Flag to know if list was already fired
+            fired,
+        // Flag to know if list is currently firing
+            firing,
+        // First callback to fire (used internally by add and fireWith)
+            firingStart,
+        // End of the loop when firing
+            firingLength,
+        // Index of currently firing callback (modified by remove if needed)
+            firingIndex,
+        // Actual callback list
+            list = [],
+        // Stack of fire calls for repeatable lists
+            stack = !options.once && [],
+        // Fire callbacks
+            fire = function (data) {
+                memory = options.memory && data;
+                fired = true;
+                firingIndex = firingStart || 0;
+                firingStart = 0;
+                firingLength = list.length;
+                firing = true;
+                for (; list && firingIndex < firingLength; firingIndex++) {
+                    if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) {
+                        memory = false; // To prevent further calls using add
+                        break;
+                    }
+                }
+                firing = false;
+                if (list) {
+                    if (stack) {
+                        if (stack.length) {
+                            fire(stack.shift());
+                        }
+                    } else if (memory) {
+                        list = [];
+                    } else {
+                        self.disable();
+                    }
+                }
+            },
+        // Actual Callbacks object
+            self = {
+                // Add a callback or a collection of callbacks to the list
+                add: function () {
+                    if (list) {
+                        // First, we save the current length
+                        var start = list.length;
+                        (function add(args) {
+                            jQuery.each(args, function (_, arg) {
+                                var type = jQuery.type(arg);
+                                if (type === "function") {
+                                    if (!options.unique || !self.has(arg)) {
+                                        list.push(arg);
+                                    }
+                                } else if (arg && arg.length && type !== "string") {
+                                    // Inspect recursively
+                                    add(arg);
+                                }
+                            });
+                        })(arguments);
+                        // Do we need to add the callbacks to the
+                        // current firing batch?
+                        if (firing) {
+                            firingLength = list.length;
+                            // With memory, if we're not firing then
+                            // we should call right away
+                        } else if (memory) {
+                            firingStart = start;
+                            fire(memory);
+                        }
+                    }
+                    return this;
+                },
+                // Remove a callback from the list
+                remove: function () {
+                    if (list) {
+                        jQuery.each(arguments, function (_, arg) {
+                            var index;
+                            while (( index = jQuery.inArray(arg, list, index) ) > -1) {
+                                list.splice(index, 1);
+                                // Handle firing indexes
+                                if (firing) {
+                                    if (index <= firingLength) {
+                                        firingLength--;
+                                    }
+                                    if (index <= firingIndex) {
+                                        firingIndex--;
+                                    }
+                                }
+                            }
+                        });
+                    }
+                    return this;
+                },
+                // Control if a given callback is in the list
+                has: function (fn) {
+                    return jQuery.inArray(fn, list) > -1;
+                },
+                // Remove all callbacks from the list
+                empty: function () {
+                    list = [];
+                    return this;
+                },
+                // Have the list do nothing anymore
+                disable: function () {
+                    list = stack = memory = undefined;
+                    return this;
+                },
+                // Is it disabled?
+                disabled: function () {
+                    return !list;
+                },
+                // Lock the list in its current state
+                lock: function () {
+                    stack = undefined;
+                    if (!memory) {
+                        self.disable();
+                    }
+                    return this;
+                },
+                // Is it locked?
+                locked: function () {
+                    return !stack;
+                },
+                // Call all callbacks with the given context and arguments
+                fireWith: function (context, args) {
+                    args = args || [];
+                    args = [context, args.slice ? args.slice() : args];
+                    if (list && ( !fired || stack )) {
+                        if (firing) {
+                            stack.push(args);
+                        } else {
+                            fire(args);
+                        }
+                    }
+                    return this;
+                },
+                // Call all the callbacks with the given arguments
+                fire: function () {
+                    self.fireWith(this, arguments);
+                    return this;
+                },
+                // To know if the callbacks have already been called at least once
+                fired: function () {
+                    return !!fired;
+                }
+            };
+
+        return self;
+    };
+    jQuery.extend({
+
+        Deferred: function (func) {
+            var tuples = [
+                    // action, add listener, listener list, final state
+                    ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"],
+                    ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"],
+                    ["notify", "progress", jQuery.Callbacks("memory")]
+                ],
+                state = "pending",
+                promise = {
+                    state: function () {
+                        return state;
+                    },
+                    always: function () {
+                        deferred.done(arguments).fail(arguments);
+                        return this;
+                    },
+                    then: function (/* fnDone, fnFail, fnProgress */) {
+                        var fns = arguments;
+                        return jQuery.Deferred(function (newDefer) {
+                            jQuery.each(tuples, function (i, tuple) {
+                                var action = tuple[0],
+                                    fn = fns[i];
+                                // deferred[ done | fail | progress ] for forwarding actions to newDefer
+                                deferred[tuple[1]](jQuery.isFunction(fn) ?
+                                        function () {
+                                            var returned = fn.apply(this, arguments);
+                                            if (returned && jQuery.isFunction(returned.promise)) {
+                                                returned.promise()
+                                                    .done(newDefer.resolve)
+                                                    .fail(newDefer.reject)
+                                                    .progress(newDefer.notify);
+                                            } else {
+                                                newDefer[action + "With"](this === deferred ? newDefer : this, [returned]);
+                                            }
+                                        } :
+                                        newDefer[action]
+                                );
+                            });
+                            fns = null;
+                        }).promise();
+                    },
+                    // Get a promise for this deferred
+                    // If obj is provided, the promise aspect is added to the object
+                    promise: function (obj) {
+                        return obj != null ? jQuery.extend(obj, promise) : promise;
+                    }
+                },
+                deferred = {};
+
+            // Keep pipe for back-compat
+            promise.pipe = promise.then;
+
+            // Add list-specific methods
+            jQuery.each(tuples, function (i, tuple) {
+                var list = tuple[2],
+                    stateString = tuple[3];
+
+                // promise[ done | fail | progress ] = list.add
+                promise[tuple[1]] = list.add;
+
+                // Handle state
+                if (stateString) {
+                    list.add(function () {
+                        // state = [ resolved | rejected ]
+                        state = stateString;
+
+                        // [ reject_list | resolve_list ].disable; progress_list.lock
+                    }, tuples[i ^ 1][2].disable, tuples[2][2].lock);
+                }
+
+                // deferred[ resolve | reject | notify ] = list.fire
+                deferred[tuple[0]] = list.fire;
+                deferred[tuple[0] + "With"] = list.fireWith;
+            });
+
+            // Make the deferred a promise
+            promise.promise(deferred);
+
+            // Call given func if any
+            if (func) {
+                func.call(deferred, deferred);
+            }
+
+            // All done!
+            return deferred;
+        },
+
+        // Deferred helper
+        when: function (subordinate /* , ..., subordinateN */) {
+            var i = 0,
+                resolveValues = core_slice.call(arguments),
+                length = resolveValues.length,
+
+            // the count of uncompleted subordinates
+                remaining = length !== 1 || ( subordinate && jQuery.isFunction(subordinate.promise) ) ? length : 0,
+
+            // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+                deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+            // Update function for both resolve and progress values
+                updateFunc = function (i, contexts, values) {
+                    return function (value) {
+                        contexts[i] = this;
+                        values[i] = arguments.length > 1 ? core_slice.call(arguments) : value;
+                        if (values === progressValues) {
+                            deferred.notifyWith(contexts, values);
+                        } else if (!( --remaining )) {
+                            deferred.resolveWith(contexts, values);
+                        }
+                    };
+                },
+
+                progressValues, progressContexts, resolveContexts;
+
+            // add listeners to Deferred subordinates; treat others as resolved
+            if (length > 1) {
+                progressValues = new Array(length);
+                progressContexts = new Array(length);
+                resolveContexts = new Array(length);
+                for (; i < length; i++) {
+                    if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {
+                        resolveValues[i].promise()
+                            .done(updateFunc(i, resolveContexts, resolveValues))
+                            .fail(deferred.reject)
+                            .progress(updateFunc(i, progressContexts, progressValues));
+                    } else {
+                        --remaining;
+                    }
+                }
+            }
+
+            // if we're not waiting on anything, resolve the master
+            if (!remaining) {
+                deferred.resolveWith(resolveContexts, resolveValues);
+            }
+
+            return deferred.promise();
+        }
+    });
+    jQuery.support = (function () {
+
+        var support,
+            all,
+            a,
+            select,
+            opt,
+            input,
+            fragment,
+            eventName,
+            i,
+            isSupported,
+            clickFn,
+            div = document.createElement("div");
+
+        // Setup
+        div.setAttribute("className", "t");
+        div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+        // Support tests won't run in some limited or non-browser environments
+        all = div.getElementsByTagName("*");
+        a = div.getElementsByTagName("a")[0];
+        if (!all || !a || !all.length) {
+            return {};
+        }
+
+        // First batch of tests
+        select = document.createElement("select");
+        opt = select.appendChild(document.createElement("option"));
+        input = div.getElementsByTagName("input")[0];
+
+        a.style.cssText = "top:1px;float:left;opacity:.5";
+        support = {
+            // IE strips leading whitespace when .innerHTML is used
+            leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+            // Make sure that tbody elements aren't automatically inserted
+            // IE will insert them into empty tables
+            tbody: !div.getElementsByTagName("tbody").length,
+
+            // Make sure that link elements get serialized correctly by innerHTML
+            // This requires a wrapper element in IE
+            htmlSerialize: !!div.getElementsByTagName("link").length,
+
+            // Get the style information from getAttribute
+            // (IE uses .cssText instead)
+            style: /top/.test(a.getAttribute("style")),
+
+            // Make sure that URLs aren't manipulated
+            // (IE normalizes it by default)
+            hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+            // Make sure that element opacity exists
+            // (IE uses filter instead)
+            // Use a regex to work around a WebKit issue. See #5145
+            opacity: /^0.5/.test(a.style.opacity),
+
+            // Verify style float existence
+            // (IE uses styleFloat instead of cssFloat)
+            cssFloat: !!a.style.cssFloat,
+
+            // Make sure that if no value is specified for a checkbox
+            // that it defaults to "on".
+            // (WebKit defaults to "" instead)
+            checkOn: ( input.value === "on" ),
+
+            // Make sure that a selected-by-default option has a working selected property.
+            // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+            optSelected: opt.selected,
+
+            // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+            getSetAttribute: div.className !== "t",
+
+            // Tests for enctype support on a form (#6743)
+            enctype: !!document.createElement("form").enctype,
+
+            // Makes sure cloning an html5 element does not cause problems
+            // Where outerHTML is undefined, this still works
+            html5Clone: document.createElement("nav").cloneNode(true).outerHTML !== "<:nav></:nav>",
+
+            // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+            boxModel: ( document.compatMode === "CSS1Compat" ),
+
+            // Will be defined later
+            submitBubbles: true,
+            changeBubbles: true,
+            focusinBubbles: false,
+            deleteExpando: true,
+            noCloneEvent: true,
+            inlineBlockNeedsLayout: false,
+            shrinkWrapBlocks: false,
+            reliableMarginRight: true,
+            boxSizingReliable: true,
+            pixelPosition: false
+        };
+
+        // Make sure checked status is properly cloned
+        input.checked = true;
+        support.noCloneChecked = input.cloneNode(true).checked;
+
+        // Make sure that the options inside disabled selects aren't marked as disabled
+        // (WebKit marks them as disabled)
+        select.disabled = true;
+        support.optDisabled = !opt.disabled;
+
+        // Test to see if it's possible to delete an expando from an element
+        // Fails in Internet Explorer
+        try {
+            delete div.test;
+        } catch (e) {
+            support.deleteExpando = false;
+        }
+
+        if (!div.addEventListener && div.attachEvent && div.fireEvent) {
+            div.attachEvent("onclick", clickFn = function () {
+                // Cloning a node shouldn't copy over any
+                // bound event handlers (IE does this)
+                support.noCloneEvent = false;
+            });
+            div.cloneNode(true).fireEvent("onclick");
+            div.detachEvent("onclick", clickFn);
+        }
+
+        // Check if a radio maintains its value
+        // after being appended to the DOM
+        input = document.createElement("input");
+        input.value = "t";
+        input.setAttribute("type", "radio");
+        support.radioValue = input.value === "t";
+
+        input.setAttribute("checked", "checked");
+
+        // #11217 - WebKit loses check when the name is after the checked attribute
+        input.setAttribute("name", "t");
+
+        div.appendChild(input);
+        fragment = document.createDocumentFragment();
+        fragment.appendChild(div.lastChild);
+
+        // WebKit doesn't clone checked state correctly in fragments
+        support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
+
+        // Check if a disconnected checkbox will retain its checked
+        // value of true after appended to the DOM (IE6/7)
+        support.appendChecked = input.checked;
+
+        fragment.removeChild(input);
+        fragment.appendChild(div);
+
+        // Technique from Juriy Zaytsev
+        // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+        // We only care about the case where non-standard event systems
+        // are used, namely in IE. Short-circuiting here helps us to
+        // avoid an eval call (in setAttribute) which can cause CSP
+        // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+        if (div.attachEvent) {
+            for (i in {
+                submit: true,
+                change: true,
+                focusin: true
+            }) {
+                eventName = "on" + i;
+                isSupported = ( eventName in div );
+                if (!isSupported) {
+                    div.setAttribute(eventName, "return;");
+                    isSupported = ( typeof div[eventName] === "function" );
+                }
+                support[i + "Bubbles"] = isSupported;
+            }
+        }
+
+        // Run tests that need a body at doc ready
+        jQuery(function () {
+            var container, div, tds, marginDiv,
+                divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
+                body = document.getElementsByTagName("body")[0];
+
+            if (!body) {
+                // Return for frameset docs that don't have a body
+                return;
+            }
+
+            container = document.createElement("div");
+            container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
+            body.insertBefore(container, body.firstChild);
+
+            // Construct the test element
+            div = document.createElement("div");
+            container.appendChild(div);
+
+            // Check if table cells still have offsetWidth/Height when they are set
+            // to display:none and there are still other visible table cells in a
+            // table row; if so, offsetWidth/Height are not reliable for use when
+            // determining if an element has been hidden directly using
+            // display:none (it is still safe to use offsets if a parent element is
+            // hidden; don safety goggles and see bug #4512 for more information).
+            // (only IE 8 fails this test)
+            div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+            tds = div.getElementsByTagName("td");
+            tds[0].style.cssText = "padding:0;margin:0;border:0;display:none";
+            isSupported = ( tds[0].offsetHeight === 0 );
+
+            tds[0].style.display = "";
+            tds[1].style.display = "none";
+
+            // Check if empty table cells still have offsetWidth/Height
+            // (IE <= 8 fail this test)
+            support.reliableHiddenOffsets = isSupported && ( tds[0].offsetHeight === 0 );
+
+            // Check box-sizing and margin behavior
+            div.innerHTML = "";
+            div.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%;";
+            support.boxSizing = ( div.offsetWidth === 4 );
+            support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+            // NOTE: To any future maintainer, we've window.getComputedStyle
+            // because jsdom on node.js will break without it.
+            if (window.getComputedStyle) {
+                support.pixelPosition = ( window.getComputedStyle(div, null) || {} ).top !== "1%";
+                support.boxSizingReliable = ( window.getComputedStyle(div, null) || {width: "4px"} ).width === "4px";
+
+                // Check if div with explicit width and no margin-right incorrectly
+                // gets computed margin-right based on width of container. For more
+                // info see bug #3333
+                // Fails in WebKit before Feb 2011 nightlies
+                // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                marginDiv = document.createElement("div");
+                marginDiv.style.cssText = div.style.cssText = divReset;
+                marginDiv.style.marginRight = marginDiv.style.width = "0";
+                div.style.width = "1px";
+                div.appendChild(marginDiv);
+                support.reliableMarginRight = !parseFloat(( window.getComputedStyle(marginDiv, null) || {} ).marginRight);
+            }
+
+            if (typeof div.style.zoom !== "undefined") {
+                // Check if natively block-level elements act like inline-block
+                // elements when setting their display to 'inline' and giving
+                // them layout
+                // (IE < 8 does this)
+                div.innerHTML = "";
+                div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+                support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+                // Check if elements with layout shrink-wrap their children
+                // (IE 6 does this)
+                div.style.display = "block";
+                div.style.overflow = "visible";
+                div.innerHTML = "<div></div>";
+                div.firstChild.style.width = "5px";
+                support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+                container.style.zoom = 1;
+            }
+
+            // Null elements to avoid leaks in IE
+            body.removeChild(container);
+            container = div = tds = marginDiv = null;
+        });
+
+        // Null elements to avoid leaks in IE
+        fragment.removeChild(div);
+        all = a = select = opt = input = fragment = div = null;
+
+        return support;
+    })();
+    var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+        rmultiDash = /([A-Z])/g;
+
+    jQuery.extend({
+        cache: {},
+
+        deletedIds: [],
+
+        // Remove at next major release (1.9/2.0)
+        uuid: 0,
+
+        // Unique for each copy of jQuery on the page
+        // Non-digits removed to match rinlinejQuery
+        expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace(/\D/g, ""),
+
+        // The following elements throw uncatchable exceptions if you
+        // attempt to add expando properties to them.
+        noData: {
+            "embed": true,
+            // Ban all objects except for Flash (which handle expandos)
+            "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+            "applet": true
+        },
+
+        hasData: function (elem) {
+            elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando];
+            return !!elem && !isEmptyDataObject(elem);
+        },
+
+        data: function (elem, name, data, pvt /* Internal Use Only */) {
+            if (!jQuery.acceptData(elem)) {
+                return;
+            }
+
+            var thisCache, ret,
+                internalKey = jQuery.expando,
+                getByName = typeof name === "string",
+
+            // We have to handle DOM nodes and JS objects differently because IE6-7
+            // can't GC object references properly across the DOM-JS boundary
+                isNode = elem.nodeType,
+
+            // Only DOM nodes need the global jQuery cache; JS object data is
+            // attached directly to the object so GC can occur automatically
+                cache = isNode ? jQuery.cache : elem,
+
+            // Only defining an ID for JS objects if its cache already exists allows
+            // the code to shortcut on the same path as a DOM node with no cache
+                id = isNode ? elem[internalKey] : elem[internalKey] && internalKey;
+
+            // Avoid doing any more work than we need to when trying to get data on an
+            // object that has no data at all
+            if ((!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined) {
+                return;
+            }
+
+            if (!id) {
+                // Only DOM nodes need a new unique ID for each element since their data
+                // ends up in the global cache
+                if (isNode) {
+                    elem[internalKey] = id = jQuery.deletedIds.pop() || jQuery.guid++;
+                } else {
+                    id = internalKey;
+                }
+            }
+
+            if (!cache[id]) {
+                cache[id] = {};
+
+                // Avoids exposing jQuery metadata on plain JS objects when the object
+                // is serialized using JSON.stringify
+                if (!isNode) {
+                    cache[id].toJSON = jQuery.noop;
+                }
+            }
+
+            // An object can be passed to jQuery.data instead of a key/value pair; this gets
+            // shallow copied over onto the existing cache
+            if (typeof name === "object" || typeof name === "function") {
+                if (pvt) {
+                    cache[id] = jQuery.extend(cache[id], name);
+                } else {
+                    cache[id].data = jQuery.extend(cache[id].data, name);
+                }
+            }
+
+            thisCache = cache[id];
+
+            // jQuery data() is stored in a separate object inside the object's internal data
+            // cache in order to avoid key collisions between internal data and user-defined
+            // data.
+            if (!pvt) {
+                if (!thisCache.data) {
+                    thisCache.data = {};
+                }
+
+                thisCache = thisCache.data;
+            }
+
+            if (data !== undefined) {
+                thisCache[jQuery.camelCase(name)] = data;
+            }
+
+            // Check for both converted-to-camel and non-converted data property names
+            // If a data property was specified
+            if (getByName) {
+
+                // First Try to find as-is property data
+                ret = thisCache[name];
+
+                // Test for null|undefined property data
+                if (ret == null) {
+
+                    // Try to find the camelCased property
+                    ret = thisCache[jQuery.camelCase(name)];
+                }
+            } else {
+                ret = thisCache;
+            }
+
+            return ret;
+        },
+
+        removeData: function (elem, name, pvt /* Internal Use Only */) {
+            if (!jQuery.acceptData(elem)) {
+                return;
+            }
+
+            var thisCache, i, l,
+
+                isNode = elem.nodeType,
+
+            // See jQuery.data for more information
+                cache = isNode ? jQuery.cache : elem,
+                id = isNode ? elem[jQuery.expando] : jQuery.expando;
+
+            // If there is already no cache entry for this object, there is no
+            // purpose in continuing
+            if (!cache[id]) {
+                return;
+            }
+
+            if (name) {
+
+                thisCache = pvt ? cache[id] : cache[id].data;
+
+                if (thisCache) {
+
+                    // Support array or space separated string names for data keys
+                    if (!jQuery.isArray(name)) {
+
+                        // try the string as a key before any manipulation
+                        if (name in thisCache) {
+                            name = [name];
+                        } else {
+
+                            // split the camel cased version by spaces unless a key with the spaces exists
+                            name = jQuery.camelCase(name);
+                            if (name in thisCache) {
+                                name = [name];
+                            } else {
+                                name = name.split(" ");
+                            }
+                        }
+                    }
+
+                    for (i = 0, l = name.length; i < l; i++) {
+                        delete thisCache[name[i]];
+                    }
+
+                    // If there is no data left in the cache, we want to continue
+                    // and let the cache object itself get destroyed
+                    if (!( pvt ? isEmptyDataObject : jQuery.isEmptyObject )(thisCache)) {
+                        return;
+                    }
+                }
+            }
+
+            // See jQuery.data for more information
+            if (!pvt) {
+                delete cache[id].data;
+
+                // Don't destroy the parent cache unless the internal data object
+                // had been the only thing left in it
+                if (!isEmptyDataObject(cache[id])) {
+                    return;
+                }
+            }
+
+            // Destroy the cache
+            if (isNode) {
+                jQuery.cleanData([elem], true);
+
+                // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+            } else if (jQuery.support.deleteExpando || cache != cache.window) {
+                delete cache[id];
+
+                // When all else fails, null
+            } else {
+                cache[id] = null;
+            }
+        },
+
+        // For internal use only.
+        _data: function (elem, name, data) {
+            return jQuery.data(elem, name, data, true);
+        },
+
+        // A method for determining if a DOM node can handle the data expando
+        acceptData: function (elem) {
+            var noData = elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()];
+
+            // nodes accept data unless otherwise specified; rejection can be conditional
+            return !noData || noData !== true && elem.getAttribute("classid") === noData;
+        }
+    });
+
+    jQuery.fn.extend({
+        data: function (key, value) {
+            var parts, part, attr, name, l,
+                elem = this[0],
+                i = 0,
+                data = null;
+
+            // Gets all values
+            if (key === undefined) {
+                if (this.length) {
+                    data = jQuery.data(elem);
+
+                    if (elem.nodeType === 1 && !jQuery._data(elem, "parsedAttrs")) {
+                        attr = elem.attributes;
+                        for (l = attr.length; i < l; i++) {
+                            name = attr[i].name;
+
+                            if (!name.indexOf("data-")) {
+                                name = jQuery.camelCase(name.substring(5));
+
+                                dataAttr(elem, name, data[name]);
+                            }
+                        }
+                        jQuery._data(elem, "parsedAttrs", true);
+                    }
+                }
+
+                return data;
+            }
+
+            // Sets multiple values
+            if (typeof key === "object") {
+                return this.each(function () {
+                    jQuery.data(this, key);
+                });
+            }
+
+            parts = key.split(".", 2);
+            parts[1] = parts[1] ? "." + parts[1] : "";
+            part = parts[1] + "!";
+
+            return jQuery.access(this, function (value) {
+
+                if (value === undefined) {
+                    data = this.triggerHandler("getData" + part, [parts[0]]);
+
+                    // Try to fetch any internally stored data first
+                    if (data === undefined && elem) {
+                        data = jQuery.data(elem, key);
+                        data = dataAttr(elem, key, data);
+                    }
+
+                    return data === undefined && parts[1] ?
+                        this.data(parts[0]) :
+                        data;
+                }
+
+                parts[1] = value;
+                this.each(function () {
+                    var self = jQuery(this);
+
+                    self.triggerHandler("setData" + part, parts);
+                    jQuery.data(this, key, value);
+                    self.triggerHandler("changeData" + part, parts);
+                });
+            }, null, value, arguments.length > 1, null, false);
+        },
+
+        removeData: function (key) {
+            return this.each(function () {
+                jQuery.removeData(this, key);
+            });
+        }
+    });
+
+    function dataAttr(elem, key, data) {
+        // If nothing was found internally, try to fetch any
+        // data from the HTML5 data-* attribute
+        if (data === undefined && elem.nodeType === 1) {
+
+            var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase();
+
+            data = elem.getAttribute(name);
+
+            if (typeof data === "string") {
+                try {
+                    data = data === "true" ? true :
+                        data === "false" ? false :
+                            data === "null" ? null :
+                                // Only convert to a number if it doesn't change the string
+                                +data + "" === data ? +data :
+                                    rbrace.test(data) ? jQuery.parseJSON(data) :
+                                        data;
+                } catch (e) {
+                }
+
+                // Make sure we set the data so it isn't changed later
+                jQuery.data(elem, key, data);
+
+            } else {
+                data = undefined;
+            }
+        }
+
+        return data;
+    }
+
+// checks a cache object for emptiness
+    function isEmptyDataObject(obj) {
+        var name;
+        for (name in obj) {
+
+            // if the public data object is empty, the private is still empty
+            if (name === "data" && jQuery.isEmptyObject(obj[name])) {
+                continue;
+            }
+            if (name !== "toJSON") {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    jQuery.extend({
+        queue: function (elem, type, data) {
+            var queue;
+
+            if (elem) {
+                type = ( type || "fx" ) + "queue";
+                queue = jQuery._data(elem, type);
+
+                // Speed up dequeue by getting out quickly if this is just a lookup
+                if (data) {
+                    if (!queue || jQuery.isArray(data)) {
+                        queue = jQuery._data(elem, type, jQuery.makeArray(data));
+                    } else {
+                        queue.push(data);
+                    }
+                }
+                return queue || [];
+            }
+        },
+
+        dequeue: function (elem, type) {
+            type = type || "fx";
+
+            var queue = jQuery.queue(elem, type),
+                startLength = queue.length,
+                fn = queue.shift(),
+                hooks = jQuery._queueHooks(elem, type),
+                next = function () {
+                    jQuery.dequeue(elem, type);
+                };
+
+            // If the fx queue is dequeued, always remove the progress sentinel
+            if (fn === "inprogress") {
+                fn = queue.shift();
+                startLength--;
+            }
+
+            if (fn) {
+
+                // Add a progress sentinel to prevent the fx queue from being
+                // automatically dequeued
+                if (type === "fx") {
+                    queue.unshift("inprogress");
+                }
+
+                // clear up the last queue stop function
+                delete hooks.stop;
+                fn.call(elem, next, hooks);
+            }
+
+            if (!startLength && hooks) {
+                hooks.empty.fire();
+            }
+        },
+
+        // not intended for public consumption - generates a queueHooks object, or returns the current one
+        _queueHooks: function (elem, type) {
+            var key = type + "queueHooks";
+            return jQuery._data(elem, key) || jQuery._data(elem, key, {
+                    empty: jQuery.Callbacks("once memory").add(function () {
+                        jQuery.removeData(elem, type + "queue", true);
+                        jQuery.removeData(elem, key, true);
+                    })
+                });
+        }
+    });
+
+    jQuery.fn.extend({
+        queue: function (type, data) {
+            var setter = 2;
+
+            if (typeof type !== "string") {
+                data = type;
+                type = "fx";
+                setter--;
+            }
+
+            if (arguments.length < setter) {
+                return jQuery.queue(this[0], type);
+            }
+
+            return data === undefined ?
+                this :
+                this.each(function () {
+                    var queue = jQuery.queue(this, type, data);
+
+                    // ensure a hooks for this queue
+                    jQuery._queueHooks(this, type);
+
+                    if (type === "fx" && queue[0] !== "inprogress") {
+                        jQuery.dequeue(this, type);
+                    }
+                });
+        },
+        dequeue: function (type) {
+            return this.each(function () {
+                jQuery.dequeue(this, type);
+            });
+        },
+        // Based off of the plugin by Clint Helfers, with permission.
+        // http://blindsignals.com/index.php/2009/07/jquery-delay/
+        delay: function (time, type) {
+            time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+            type = type || "fx";
+
+            return this.queue(type, function (next, hooks) {
+                var timeout = setTimeout(next, time);
+                hooks.stop = function () {
+                    clearTimeout(timeout);
+                };
+            });
+        },
+        clearQueue: function (type) {
+            return this.queue(type || "fx", []);
+        },
+        // Get a promise resolved when queues of a certain type
+        // are emptied (fx is the type by default)
+        promise: function (type, obj) {
+            var tmp,
+                count = 1,
+                defer = jQuery.Deferred(),
+                elements = this,
+                i = this.length,
+                resolve = function () {
+                    if (!( --count )) {
+                        defer.resolveWith(elements, [elements]);
+                    }
+                };
+
+            if (typeof type !== "string") {
+                obj = type;
+                type = undefined;
+            }
+            type = type || "fx";
+
+            while (i--) {
+                tmp = jQuery._data(elements[i], type + "queueHooks");
+                if (tmp && tmp.empty) {
+                    count++;
+                    tmp.empty.add(resolve);
+                }
+            }
+            resolve();
+            return defer.promise(obj);
+        }
+    });
+    var nodeHook, boolHook, fixSpecified,
+        rclass = /[\t\r\n]/g,
+        rreturn = /\r/g,
+        rtype = /^(?:button|input)$/i,
+        rfocusable = /^(?:button|input|object|select|textarea)$/i,
+        rclickable = /^a(?:rea|)$/i,
+        rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+        getSetAttribute = jQuery.support.getSetAttribute;
+
+    jQuery.fn.extend({
+        attr: function (name, value) {
+            return jQuery.access(this, jQuery.attr, name, value, arguments.length > 1);
+        },
+
+        removeAttr: function (name) {
+            return this.each(function () {
+                jQuery.removeAttr(this, name);
+            });
+        },
+
+        prop: function (name, value) {
+            return jQuery.access(this, jQuery.prop, name, value, arguments.length > 1);
+        },
+
+        removeProp: function (name) {
+            name = jQuery.propFix[name] || name;
+            return this.each(function () {
+                // try/catch handles cases where IE balks (such as removing a property on window)
+                try {
+                    this[name] = undefined;
+                    delete this[name];
+                } catch (e) {
+                }
+            });
+        },
+
+        addClass: function (value) {
+            var classNames, i, l, elem,
+                setClass, c, cl;
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (j) {
+                    jQuery(this).addClass(value.call(this, j, this.className));
+                });
+            }
+
+            if (value && typeof value === "string") {
+                classNames = value.split(core_rspace);
+
+                for (i = 0, l = this.length; i < l; i++) {
+                    elem = this[i];
+
+                    if (elem.nodeType === 1) {
+                        if (!elem.className && classNames.length === 1) {
+                            elem.className = value;
+
+                        } else {
+                            setClass = " " + elem.className + " ";
+
+                            for (c = 0, cl = classNames.length; c < cl; c++) {
+                                if (setClass.indexOf(" " + classNames[c] + " ") < 0) {
+                                    setClass += classNames[c] + " ";
+                                }
+                            }
+                            elem.className = jQuery.trim(setClass);
+                        }
+                    }
+                }
+            }
+
+            return this;
+        },
+
+        removeClass: function (value) {
+            var removes, className, elem, c, cl, i, l;
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (j) {
+                    jQuery(this).removeClass(value.call(this, j, this.className));
+                });
+            }
+            if ((value && typeof value === "string") || value === undefined) {
+                removes = ( value || "" ).split(core_rspace);
+
+                for (i = 0, l = this.length; i < l; i++) {
+                    elem = this[i];
+                    if (elem.nodeType === 1 && elem.className) {
+
+                        className = (" " + elem.className + " ").replace(rclass, " ");
+
+                        // loop over each item in the removal list
+                        for (c = 0, cl = removes.length; c < cl; c++) {
+                            // Remove until there is nothing to remove,
+                            while (className.indexOf(" " + removes[c] + " ") >= 0) {
+                                className = className.replace(" " + removes[c] + " ", " ");
+                            }
+                        }
+                        elem.className = value ? jQuery.trim(className) : "";
+                    }
+                }
+            }
+
+            return this;
+        },
+
+        toggleClass: function (value, stateVal) {
+            var type = typeof value,
+                isBool = typeof stateVal === "boolean";
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (i) {
+                    jQuery(this).toggleClass(value.call(this, i, this.className, stateVal), stateVal);
+                });
+            }
+
+            return this.each(function () {
+                if (type === "string") {
+                    // toggle individual class names
+                    var className,
+                        i = 0,
+                        self = jQuery(this),
+                        state = stateVal,
+                        classNames = value.split(core_rspace);
+
+                    while ((className = classNames[i++])) {
+                        // check each className given, space separated list
+                        state = isBool ? state : !self.hasClass(className);
+                        self[state ? "addClass" : "removeClass"](className);
+                    }
+
+                } else if (type === "undefined" || type === "boolean") {
+                    if (this.className) {
+                        // store className if set
+                        jQuery._data(this, "__className__", this.className);
+                    }
+
+                    // toggle whole className
+                    this.className = this.className || value === false ? "" : jQuery._data(this, "__className__") || "";
+                }
+            });
+        },
+
+        hasClass: function (selector) {
+            var className = " " + selector + " ",
+                i = 0,
+                l = this.length;
+            for (; i < l; i++) {
+                if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf(className) >= 0) {
+                    return true;
+                }
+            }
+
+            return false;
+        },
+
+        val: function (value) {
+            var hooks, ret, isFunction,
+                elem = this[0];
+
+            if (!arguments.length) {
+                if (elem) {
+                    hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
+
+                    if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {
+                        return ret;
+                    }
+
+                    ret = elem.value;
+
+                    return typeof ret === "string" ?
+                        // handle most common string cases
+                        ret.replace(rreturn, "") :
+                        // handle cases where value is null/undef or number
+                        ret == null ? "" : ret;
+                }
+
+                return;
+            }
+
+            isFunction = jQuery.isFunction(value);
+
+            return this.each(function (i) {
+                var val,
+                    self = jQuery(this);
+
+                if (this.nodeType !== 1) {
+                    return;
+                }
+
+                if (isFunction) {
+                    val = value.call(this, i, self.val());
+                } else {
+                    val = value;
+                }
+
+                // Treat null/undefined as ""; convert numbers to string
+                if (val == null) {
+                    val = "";
+                } else if (typeof val === "number") {
+                    val += "";
+                } else if (jQuery.isArray(val)) {
+                    val = jQuery.map(val, function (value) {
+                        return value == null ? "" : value + "";
+                    });
+                }
+
+                hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
+
+                // If set returns undefined, fall back to normal setting
+                if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {
+                    this.value = val;
+                }
+            });
+        }
+    });
+
+    jQuery.extend({
+        valHooks: {
+            option: {
+                get: function (elem) {
+                    // attributes.value is undefined in Blackberry 4.7 but
+                    // uses .value. See #6932
+                    var val = elem.attributes.value;
+                    return !val || val.specified ? elem.value : elem.text;
+                }
+            },
+            select: {
+                get: function (elem) {
+                    var value, option,
+                        options = elem.options,
+                        index = elem.selectedIndex,
+                        one = elem.type === "select-one" || index < 0,
+                        values = one ? null : [],
+                        max = one ? index + 1 : options.length,
+                        i = index < 0 ?
+                            max :
+                            one ? index : 0;
+
+                    // Loop through all the selected options
+                    for (; i < max; i++) {
+                        option = options[i];
+
+                        // oldIE doesn't update selected after form reset (#2551)
+                        if (( option.selected || i === index ) &&
+                                // Don't return options that are disabled or in a disabled optgroup
+                            ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+                            ( !option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup") )) {
+
+                            // Get the specific value for the option
+                            value = jQuery(option).val();
+
+                            // We don't need an array for one selects
+                            if (one) {
+                                return value;
+                            }
+
+                            // Multi-Selects return an array
+                            values.push(value);
+                        }
+                    }
+
+                    return values;
+                },
+
+                set: function (elem, value) {
+                    var values = jQuery.makeArray(value);
+
+                    jQuery(elem).find("option").each(function () {
+                        this.selected = jQuery.inArray(jQuery(this).val(), values) >= 0;
+                    });
+
+                    if (!values.length) {
+                        elem.selectedIndex = -1;
+                    }
+                    return values;
+                }
+            }
+        },
+
+        // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9
+        attrFn: {},
+
+        attr: function (elem, name, value, pass) {
+            var ret, hooks, notxml,
+                nType = elem.nodeType;
+
+            // don't get/set attributes on text, comment and attribute nodes
+            if (!elem || nType === 3 || nType === 8 || nType === 2) {
+                return;
+            }
+
+            if (pass && jQuery.isFunction(jQuery.fn[name])) {
+                return jQuery(elem)[name](value);
+            }
+
+            // Fallback to prop when attributes are not supported
+            if (typeof elem.getAttribute === "undefined") {
+                return jQuery.prop(elem, name, value);
+            }
+
+            notxml = nType !== 1 || !jQuery.isXMLDoc(elem);
+
+            // All attributes are lowercase
+            // Grab necessary hook if one is defined
+     

<TRUNCATED>

[04/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/vega.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/vega.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/vega.js
new file mode 100644
index 0000000..1b759e5
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/vega.js
@@ -0,0 +1,8006 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+// Define module using Universal Module Definition pattern
+// https://github.com/umdjs/umd/blob/master/amdWeb.js
+
+(function (factory) {
+    if (typeof define === 'function' && define.amd) {
+        // Support AMD. Register as an anonymous module.
+        // NOTE: List all dependencies in AMD style
+        define(['d3', 'topojson'], factory);
+    } else {
+        // No AMD. Set module as a global variable
+        // NOTE: Pass dependencies to factory function
+        // (assume that both d3 and topojson are also global.)
+        var tj = (typeof topojson === 'undefined') ? null : topojson;
+        vg = factory(d3, tj);
+    }
+}(
+//NOTE: The dependencies are passed to this function
+    function (d3, topojson) {
+//---------------------------------------------------
+// BEGIN code for this module
+//---------------------------------------------------
+
+        var vg = {
+            version: "1.4.3", // semantic versioning
+            d3: d3,      // stash d3 for use in property functions
+            topojson: topojson // stash topojson similarly
+        };
+// type checking functions
+        var toString = Object.prototype.toString;
+
+        vg.isObject = function (obj) {
+            return obj === Object(obj);
+        };
+
+        vg.isFunction = function (obj) {
+            return toString.call(obj) == '[object Function]';
+        };
+
+        vg.isString = function (obj) {
+            return toString.call(obj) == '[object String]';
+        };
+
+        vg.isArray = Array.isArray || function (obj) {
+                return toString.call(obj) == '[object Array]';
+            };
+
+        vg.isNumber = function (obj) {
+            return toString.call(obj) == '[object Number]';
+        };
+
+        vg.isBoolean = function (obj) {
+            return toString.call(obj) == '[object Boolean]';
+        };
+
+        vg.isTree = function (obj) {
+            return obj && obj.__vgtree__;
+        };
+
+        vg.tree = function (obj, children) {
+            var d = [obj];
+            d.__vgtree__ = true;
+            d.children = children || "children";
+            return d;
+        };
+
+        vg.number = function (s) {
+            return +s;
+        };
+
+        vg.boolean = function (s) {
+            return !!s;
+        };
+
+// utility functions
+
+        vg.identity = function (x) {
+            return x;
+        };
+
+        vg.true = function () {
+            return true;
+        };
+
+        vg.extend = function (obj) {
+            for (var x, name, i = 1, len = arguments.length; i < len; ++i) {
+                x = arguments[i];
+                for (name in x) {
+                    obj[name] = x[name];
+                }
+            }
+            return obj;
+        };
+
+        vg.duplicate = function (obj) {
+            return JSON.parse(JSON.stringify(obj));
+        };
+
+        vg.field = function (f) {
+            return f.split("\\.")
+                .map(function (d) {
+                    return d.split(".");
+                })
+                .reduce(function (a, b) {
+                    if (a.length) {
+                        a[a.length - 1] += "." + b.shift();
+                    }
+                    a.push.apply(a, b);
+                    return a;
+                }, []);
+        };
+
+        vg.accessor = function (f) {
+            var s;
+            return (vg.isFunction(f) || f == null)
+                ? f : vg.isString(f) && (s = vg.field(f)).length > 1
+                ? function (x) {
+                return s.reduce(function (x, f) {
+                    return x[f];
+                }, x);
+            }
+                : function (x) {
+                return x[f];
+            };
+        };
+
+        vg.mutator = function (f) {
+            var s;
+            return vg.isString(f) && (s = vg.field(f)).length > 1
+                ? function (x, v) {
+                for (var i = 0; i < s.length - 1; ++i) x = x[s[i]];
+                x[s[i]] = v;
+            }
+                : function (x, v) {
+                x[f] = v;
+            };
+        };
+
+        vg.comparator = function (sort) {
+            var sign = [];
+            if (sort === undefined) sort = [];
+            sort = vg.array(sort).map(function (f) {
+                var s = 1;
+                if (f[0] === "-") {
+                    s = -1;
+                    f = f.slice(1);
+                }
+                else if (f[0] === "+") {
+                    s = +1;
+                    f = f.slice(1);
+                }
+                sign.push(s);
+                return vg.accessor(f);
+            });
+            return function (a, b) {
+                var i, n, f, x, y;
+                for (i = 0, n = sort.length; i < n; ++i) {
+                    f = sort[i];
+                    x = f(a);
+                    y = f(b);
+                    if (x < y) return -1 * sign[i];
+                    if (x > y) return sign[i];
+                }
+                return 0;
+            };
+        };
+
+        vg.cmp = function (a, b) {
+            return a < b ? -1 : a > b ? 1 : 0;
+        };
+
+        vg.numcmp = function (a, b) {
+            return a - b;
+        };
+
+        vg.array = function (x) {
+            return x != null ? (vg.isArray(x) ? x : [x]) : [];
+        };
+
+        vg.values = function (x) {
+            return (vg.isObject(x) && !vg.isArray(x) && x.values) ? x.values : x;
+        };
+
+        vg.str = function (x) {
+            return vg.isArray(x) ? "[" + x.map(vg.str) + "]"
+                : vg.isObject(x) ? JSON.stringify(x)
+                : vg.isString(x) ? ("'" + vg_escape_str(x) + "'") : x;
+        };
+
+        var escape_str_re = /(^|[^\\])'/g;
+
+        function vg_escape_str(x) {
+            return x.replace(escape_str_re, "$1\\'");
+        }
+
+        vg.keys = function (x) {
+            var keys = [];
+            for (var key in x) keys.push(key);
+            return keys;
+        };
+
+        vg.unique = function (data, f, results) {
+            if (!vg.isArray(data) || data.length == 0) return [];
+            f = f || vg.identity;
+            results = results || [];
+            for (var v, i = 0, n = data.length; i < n; ++i) {
+                v = f(data[i]);
+                if (results.indexOf(v) < 0) results.push(v);
+            }
+            return results;
+        };
+
+        vg.minIndex = function (data, f) {
+            if (!vg.isArray(data) || data.length == 0) return -1;
+            f = f || vg.identity;
+            var idx = 0, min = f(data[0]), v = min;
+            for (var i = 1, n = data.length; i < n; ++i) {
+                v = f(data[i]);
+                if (v < min) {
+                    min = v;
+                    idx = i;
+                }
+            }
+            return idx;
+        };
+
+        vg.maxIndex = function (data, f) {
+            if (!vg.isArray(data) || data.length == 0) return -1;
+            f = f || vg.identity;
+            var idx = 0, max = f(data[0]), v = max;
+            for (var i = 1, n = data.length; i < n; ++i) {
+                v = f(data[i]);
+                if (v > max) {
+                    max = v;
+                    idx = i;
+                }
+            }
+            return idx;
+        };
+
+        vg.truncate = function (s, length, pos, word, ellipsis) {
+            var len = s.length;
+            if (len <= length) return s;
+            ellipsis = ellipsis || "...";
+            var l = Math.max(0, length - ellipsis.length);
+
+            switch (pos) {
+                case "left":
+                    return ellipsis + (word ? vg_truncateOnWord(s, l, 1) : s.slice(len - l));
+                case "middle":
+                case "center":
+                    var l1 = Math.ceil(l / 2), l2 = Math.floor(l / 2);
+                    return (word ? vg_truncateOnWord(s, l1) : s.slice(0, l1)) + ellipsis
+                        + (word ? vg_truncateOnWord(s, l2, 1) : s.slice(len - l2));
+                default:
+                    return (word ? vg_truncateOnWord(s, l) : s.slice(0, l)) + ellipsis;
+            }
+        }
+
+        function vg_truncateOnWord(s, len, rev) {
+            var cnt = 0, tok = s.split(vg_truncate_word_re);
+            if (rev) {
+                s = (tok = tok.reverse())
+                    .filter(function (w) {
+                        cnt += w.length;
+                        return cnt <= len;
+                    })
+                    .reverse();
+            } else {
+                s = tok.filter(function (w) {
+                    cnt += w.length;
+                    return cnt <= len;
+                });
+            }
+            return s.length ? s.join("").trim() : tok[0].slice(0, len);
+        }
+
+        var vg_truncate_word_re = /([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/;
+
+// Logging
+
+        function vg_write(msg) {
+            vg.config.isNode
+                ? process.stderr.write(msg + "\n")
+                : console.log(msg);
+        }
+
+        vg.log = function (msg) {
+            vg_write("[Vega Log] " + msg);
+        };
+
+        vg.error = function (msg) {
+            msg = "[Vega Err] " + msg;
+            vg_write(msg);
+            if (typeof alert !== "undefined") alert(msg);
+        };
+        vg.config = {};
+
+// are we running in node.js?
+// via timetler.com/2012/10/13/environment-detection-in-javascript/
+        vg.config.isNode = typeof exports !== 'undefined' && this.exports !== exports;
+
+// Allows domain restriction when using data loading via XHR.
+// To enable, set it to a list of allowed domains
+// e.g., ['wikipedia.org', 'eff.org']
+        vg.config.domainWhiteList = false;
+
+// If true, disable potentially unsafe transforms (filter, formula)
+// involving possible JavaScript injection attacks.
+        vg.config.safeMode = false;
+
+// base url for loading external data files
+// used only for server-side operation
+        vg.config.baseURL = "";
+
+// version and namepsaces for exported svg
+        vg.config.svgNamespace =
+            'version="1.1" xmlns="http://www.w3.org/2000/svg" ' +
+            'xmlns:xlink="http://www.w3.org/1999/xlink"';
+
+// inset padding for automatic padding calculation
+        vg.config.autopadInset = 5;
+
+// extensible scale lookup table
+// all d3.scale.* instances also supported
+        vg.config.scale = {
+            time: d3.time.scale,
+            utc: d3.time.scale.utc
+        };
+
+// default rendering settings
+        vg.config.render = {
+            lineWidth: 1,
+            lineCap: "butt",
+            font: "sans-serif",
+            fontSize: 11
+        };
+
+// default axis properties
+        vg.config.axis = {
+            orient: "bottom",
+            ticks: 10,
+            padding: 3,
+            axisColor: "#000",
+            gridColor: "#d8d8d8",
+            tickColor: "#000",
+            tickLabelColor: "#000",
+            axisWidth: 1,
+            tickWidth: 1,
+            tickSize: 6,
+            tickLabelFontSize: 11,
+            tickLabelFont: "sans-serif",
+            titleColor: "#000",
+            titleFont: "sans-serif",
+            titleFontSize: 11,
+            titleFontWeight: "bold",
+            titleOffset: 35
+        };
+
+// default legend properties
+        vg.config.legend = {
+            orient: "right",
+            offset: 10,
+            padding: 3,
+            gradientStrokeColor: "#888",
+            gradientStrokeWidth: 1,
+            gradientHeight: 16,
+            gradientWidth: 100,
+            labelColor: "#000",
+            labelFontSize: 10,
+            labelFont: "sans-serif",
+            labelAlign: "left",
+            labelBaseline: "middle",
+            labelOffset: 8,
+            symbolShape: "circle",
+            symbolSize: 50,
+            symbolColor: "#888",
+            symbolStrokeWidth: 1,
+            titleColor: "#000",
+            titleFont: "sans-serif",
+            titleFontSize: 11,
+            titleFontWeight: "bold"
+        };
+
+// default color values
+        vg.config.color = {
+            rgb: [128, 128, 128],
+            lab: [50, 0, 0],
+            hcl: [0, 0, 50],
+            hsl: [0, 0, 0.5]
+        };
+
+// default scale ranges
+        vg.config.range = {
+            category10: [
+                "#1f77b4",
+                "#ff7f0e",
+                "#2ca02c",
+                "#d62728",
+                "#9467bd",
+                "#8c564b",
+                "#e377c2",
+                "#7f7f7f",
+                "#bcbd22",
+                "#17becf"
+            ],
+            category20: [
+                "#1f77b4",
+                "#aec7e8",
+                "#ff7f0e",
+                "#ffbb78",
+                "#2ca02c",
+                "#98df8a",
+                "#d62728",
+                "#ff9896",
+                "#9467bd",
+                "#c5b0d5",
+                "#8c564b",
+                "#c49c94",
+                "#e377c2",
+                "#f7b6d2",
+                "#7f7f7f",
+                "#c7c7c7",
+                "#bcbd22",
+                "#dbdb8d",
+                "#17becf",
+                "#9edae5"
+            ],
+            shapes: [
+                "circle",
+                "cross",
+                "diamond",
+                "square",
+                "triangle-down",
+                "triangle-up"
+            ]
+        };
+        vg.Bounds = (function () {
+            var bounds = function (b) {
+                this.clear();
+                if (b) this.union(b);
+            };
+
+            var prototype = bounds.prototype;
+
+            prototype.clear = function () {
+                this.x1 = +Number.MAX_VALUE;
+                this.y1 = +Number.MAX_VALUE;
+                this.x2 = -Number.MAX_VALUE;
+                this.y2 = -Number.MAX_VALUE;
+                return this;
+            };
+
+            prototype.set = function (x1, y1, x2, y2) {
+                this.x1 = x1;
+                this.y1 = y1;
+                this.x2 = x2;
+                this.y2 = y2;
+                return this;
+            };
+
+            prototype.add = function (x, y) {
+                if (x < this.x1) this.x1 = x;
+                if (y < this.y1) this.y1 = y;
+                if (x > this.x2) this.x2 = x;
+                if (y > this.y2) this.y2 = y;
+                return this;
+            };
+
+            prototype.expand = function (d) {
+                this.x1 -= d;
+                this.y1 -= d;
+                this.x2 += d;
+                this.y2 += d;
+                return this;
+            };
+
+            prototype.round = function () {
+                this.x1 = Math.floor(this.x1);
+                this.y1 = Math.floor(this.y1);
+                this.x2 = Math.ceil(this.x2);
+                this.y2 = Math.ceil(this.y2);
+                return this;
+            };
+
+            prototype.translate = function (dx, dy) {
+                this.x1 += dx;
+                this.x2 += dx;
+                this.y1 += dy;
+                this.y2 += dy;
+                return this;
+            };
+
+            prototype.rotate = function (angle, x, y) {
+                var cos = Math.cos(angle),
+                    sin = Math.sin(angle),
+                    cx = x - x * cos + y * sin,
+                    cy = y - x * sin - y * cos,
+                    x1 = this.x1, x2 = this.x2,
+                    y1 = this.y1, y2 = this.y2;
+
+                return this.clear()
+                    .add(cos * x1 - sin * y1 + cx, sin * x1 + cos * y1 + cy)
+                    .add(cos * x1 - sin * y2 + cx, sin * x1 + cos * y2 + cy)
+                    .add(cos * x2 - sin * y1 + cx, sin * x2 + cos * y1 + cy)
+                    .add(cos * x2 - sin * y2 + cx, sin * x2 + cos * y2 + cy);
+            }
+
+            prototype.union = function (b) {
+                if (b.x1 < this.x1) this.x1 = b.x1;
+                if (b.y1 < this.y1) this.y1 = b.y1;
+                if (b.x2 > this.x2) this.x2 = b.x2;
+                if (b.y2 > this.y2) this.y2 = b.y2;
+                return this;
+            };
+
+            prototype.encloses = function (b) {
+                return b && (
+                        this.x1 <= b.x1 &&
+                        this.x2 >= b.x2 &&
+                        this.y1 <= b.y1 &&
+                        this.y2 >= b.y2
+                    );
+            };
+
+            prototype.intersects = function (b) {
+                return b && !(
+                        this.x2 < b.x1 ||
+                        this.x1 > b.x2 ||
+                        this.y2 < b.y1 ||
+                        this.y1 > b.y2
+                    );
+            };
+
+            prototype.contains = function (x, y) {
+                return !(
+                    x < this.x1 ||
+                    x > this.x2 ||
+                    y < this.y1 ||
+                    y > this.y2
+                );
+            };
+
+            prototype.width = function () {
+                return this.x2 - this.x1;
+            };
+
+            prototype.height = function () {
+                return this.y2 - this.y1;
+            };
+
+            return bounds;
+        })();
+        vg.Gradient = (function () {
+
+            function gradient(type) {
+                this.id = "grad_" + (vg_gradient_id++);
+                this.type = type || "linear";
+                this.stops = [];
+                this.x1 = 0;
+                this.x2 = 1;
+                this.y1 = 0;
+                this.y2 = 0;
+            };
+
+            var prototype = gradient.prototype;
+
+            prototype.stop = function (offset, color) {
+                this.stops.push({
+                    offset: offset,
+                    color: color
+                });
+                return this;
+            };
+
+            return gradient;
+        })();
+
+        var vg_gradient_id = 0;
+        vg.canvas = {};
+        vg.canvas.path = (function () {
+
+            // Path parsing and rendering code taken from fabric.js -- Thanks!
+            var cmdLength = {m: 2, l: 2, h: 1, v: 1, c: 6, s: 4, q: 4, t: 2, a: 7},
+                re = [/([MLHVCSQTAZmlhvcsqtaz])/g, /###/, /(\d)-/g, /\s|,|###/];
+
+            function parse(path) {
+                var result = [],
+                    currentPath,
+                    chunks,
+                    parsed;
+
+                // First, break path into command sequence
+                path = path.slice().replace(re[0], '###$1').split(re[1]).slice(1);
+
+                // Next, parse each command in turn
+                for (var i = 0, j, chunksParsed, len = path.length; i < len; i++) {
+                    currentPath = path[i];
+                    chunks = currentPath.slice(1).trim().replace(re[2], '$1###-').split(re[3]);
+                    chunksParsed = [currentPath.charAt(0)];
+
+                    for (var j = 0, jlen = chunks.length; j < jlen; j++) {
+                        parsed = parseFloat(chunks[j]);
+                        if (!isNaN(parsed)) {
+                            chunksParsed.push(parsed);
+                        }
+                    }
+
+                    var command = chunksParsed[0].toLowerCase(),
+                        commandLength = cmdLength[command];
+
+                    if (chunksParsed.length - 1 > commandLength) {
+                        for (var k = 1, klen = chunksParsed.length; k < klen; k += commandLength) {
+                            result.push([chunksParsed[0]].concat(chunksParsed.slice(k, k + commandLength)));
+                        }
+                    }
+                    else {
+                        result.push(chunksParsed);
+                    }
+                }
+
+                return result;
+            }
+
+            function drawArc(g, x, y, coords, bounds, l, t) {
+                var rx = coords[0];
+                var ry = coords[1];
+                var rot = coords[2];
+                var large = coords[3];
+                var sweep = coords[4];
+                var ex = coords[5];
+                var ey = coords[6];
+                var segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y);
+                for (var i = 0; i < segs.length; i++) {
+                    var bez = segmentToBezier.apply(null, segs[i]);
+                    g.bezierCurveTo.apply(g, bez);
+                    bounds.add(bez[0] - l, bez[1] - t);
+                    bounds.add(bez[2] - l, bez[3] - t);
+                    bounds.add(bez[4] - l, bez[5] - t);
+                }
+            }
+
+            function boundArc(x, y, coords, bounds) {
+                var rx = coords[0];
+                var ry = coords[1];
+                var rot = coords[2];
+                var large = coords[3];
+                var sweep = coords[4];
+                var ex = coords[5];
+                var ey = coords[6];
+                var segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y);
+                for (var i = 0; i < segs.length; i++) {
+                    var bez = segmentToBezier.apply(null, segs[i]);
+                    bounds.add(bez[0], bez[1]);
+                    bounds.add(bez[2], bez[3]);
+                    bounds.add(bez[4], bez[5]);
+                }
+            }
+
+            var arcToSegmentsCache = {},
+                segmentToBezierCache = {},
+                join = Array.prototype.join,
+                argsStr;
+
+            // Copied from Inkscape svgtopdf, thanks!
+            function arcToSegments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
+                argsStr = join.call(arguments);
+                if (arcToSegmentsCache[argsStr]) {
+                    return arcToSegmentsCache[argsStr];
+                }
+
+                var th = rotateX * (Math.PI / 180);
+                var sin_th = Math.sin(th);
+                var cos_th = Math.cos(th);
+                rx = Math.abs(rx);
+                ry = Math.abs(ry);
+                var px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5;
+                var py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5;
+                var pl = (px * px) / (rx * rx) + (py * py) / (ry * ry);
+                if (pl > 1) {
+                    pl = Math.sqrt(pl);
+                    rx *= pl;
+                    ry *= pl;
+                }
+
+                var a00 = cos_th / rx;
+                var a01 = sin_th / rx;
+                var a10 = (-sin_th) / ry;
+                var a11 = (cos_th) / ry;
+                var x0 = a00 * ox + a01 * oy;
+                var y0 = a10 * ox + a11 * oy;
+                var x1 = a00 * x + a01 * y;
+                var y1 = a10 * x + a11 * y;
+
+                var d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
+                var sfactor_sq = 1 / d - 0.25;
+                if (sfactor_sq < 0) sfactor_sq = 0;
+                var sfactor = Math.sqrt(sfactor_sq);
+                if (sweep == large) sfactor = -sfactor;
+                var xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0);
+                var yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0);
+
+                var th0 = Math.atan2(y0 - yc, x0 - xc);
+                var th1 = Math.atan2(y1 - yc, x1 - xc);
+
+                var th_arc = th1 - th0;
+                if (th_arc < 0 && sweep == 1) {
+                    th_arc += 2 * Math.PI;
+                } else if (th_arc > 0 && sweep == 0) {
+                    th_arc -= 2 * Math.PI;
+                }
+
+                var segments = Math.ceil(Math.abs(th_arc / (Math.PI * 0.5 + 0.001)));
+                var result = [];
+                for (var i = 0; i < segments; i++) {
+                    var th2 = th0 + i * th_arc / segments;
+                    var th3 = th0 + (i + 1) * th_arc / segments;
+                    result[i] = [xc, yc, th2, th3, rx, ry, sin_th, cos_th];
+                }
+
+                return (arcToSegmentsCache[argsStr] = result);
+            }
+
+            function segmentToBezier(cx, cy, th0, th1, rx, ry, sin_th, cos_th) {
+                argsStr = join.call(arguments);
+                if (segmentToBezierCache[argsStr]) {
+                    return segmentToBezierCache[argsStr];
+                }
+
+                var a00 = cos_th * rx;
+                var a01 = -sin_th * ry;
+                var a10 = sin_th * rx;
+                var a11 = cos_th * ry;
+
+                var cos_th0 = Math.cos(th0);
+                var sin_th0 = Math.sin(th0);
+                var cos_th1 = Math.cos(th1);
+                var sin_th1 = Math.sin(th1);
+
+                var th_half = 0.5 * (th1 - th0);
+                var sin_th_h2 = Math.sin(th_half * 0.5);
+                var t = (8 / 3) * sin_th_h2 * sin_th_h2 / Math.sin(th_half);
+                var x1 = cx + cos_th0 - t * sin_th0;
+                var y1 = cy + sin_th0 + t * cos_th0;
+                var x3 = cx + cos_th1;
+                var y3 = cy + sin_th1;
+                var x2 = x3 + t * sin_th1;
+                var y2 = y3 - t * cos_th1;
+
+                return (segmentToBezierCache[argsStr] = [
+                    a00 * x1 + a01 * y1, a10 * x1 + a11 * y1,
+                    a00 * x2 + a01 * y2, a10 * x2 + a11 * y2,
+                    a00 * x3 + a01 * y3, a10 * x3 + a11 * y3
+                ]);
+            }
+
+            function render(g, path, l, t) {
+                var current, // current instruction
+                    previous = null,
+                    x = 0, // current x
+                    y = 0, // current y
+                    controlX = 0, // current control point x
+                    controlY = 0, // current control point y
+                    tempX,
+                    tempY,
+                    tempControlX,
+                    tempControlY,
+                    bounds = new vg.Bounds();
+                if (l == undefined) l = 0;
+                if (t == undefined) t = 0;
+
+                g.beginPath();
+
+                for (var i = 0, len = path.length; i < len; ++i) {
+                    current = path[i];
+
+                    switch (current[0]) { // first letter
+
+                        case 'l': // lineto, relative
+                            x += current[1];
+                            y += current[2];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'L': // lineto, absolute
+                            x = current[1];
+                            y = current[2];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'h': // horizontal lineto, relative
+                            x += current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'H': // horizontal lineto, absolute
+                            x = current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'v': // vertical lineto, relative
+                            y += current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'V': // verical lineto, absolute
+                            y = current[1];
+                            g.lineTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'm': // moveTo, relative
+                            x += current[1];
+                            y += current[2];
+                            g.moveTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'M': // moveTo, absolute
+                            x = current[1];
+                            y = current[2];
+                            g.moveTo(x + l, y + t);
+                            bounds.add(x, y);
+                            break;
+
+                        case 'c': // bezierCurveTo, relative
+                            tempX = x + current[5];
+                            tempY = y + current[6];
+                            controlX = x + current[3];
+                            controlY = y + current[4];
+                            g.bezierCurveTo(
+                                x + current[1] + l, // x1
+                                y + current[2] + t, // y1
+                                controlX + l, // x2
+                                controlY + t, // y2
+                                tempX + l,
+                                tempY + t
+                            );
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'C': // bezierCurveTo, absolute
+                            x = current[5];
+                            y = current[6];
+                            controlX = current[3];
+                            controlY = current[4];
+                            g.bezierCurveTo(
+                                current[1] + l,
+                                current[2] + t,
+                                controlX + l,
+                                controlY + t,
+                                x + l,
+                                y + t
+                            );
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(x, y);
+                            break;
+
+                        case 's': // shorthand cubic bezierCurveTo, relative
+                            // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            g.bezierCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                x + current[1] + l,
+                                y + current[2] + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            bounds.add(controlX, controlY);
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(tempX, tempY);
+
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'S': // shorthand cubic bezierCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            g.bezierCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                current[1] + l,
+                                current[2] + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = current[1];
+                            controlY = current[2];
+
+                            break;
+
+                        case 'q': // quadraticCurveTo, relative
+                            // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            g.quadraticCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'Q': // quadraticCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+
+                            g.quadraticCurveTo(
+                                current[1] + l,
+                                current[2] + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            controlX = current[1];
+                            controlY = current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 't': // shorthand quadraticCurveTo, relative
+
+                            // transform to absolute x,y
+                            tempX = x + current[1];
+                            tempY = y + current[2];
+
+                            if (previous[0].match(/[QqTt]/) === null) {
+                                // If there is no previous command or if the previous command was not a Q, q, T or t,
+                                // assume the control point is coincident with the current point
+                                controlX = x;
+                                controlY = y;
+                            }
+                            else if (previous[0] === 't') {
+                                // calculate reflection of previous control points for t
+                                controlX = 2 * x - tempControlX;
+                                controlY = 2 * y - tempControlY;
+                            }
+                            else if (previous[0] === 'q') {
+                                // calculate reflection of previous control points for q
+                                controlX = 2 * x - controlX;
+                                controlY = 2 * y - controlY;
+                            }
+
+                            tempControlX = controlX;
+                            tempControlY = controlY;
+
+                            g.quadraticCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'T':
+                            tempX = current[1];
+                            tempY = current[2];
+
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            g.quadraticCurveTo(
+                                controlX + l,
+                                controlY + t,
+                                tempX + l,
+                                tempY + t
+                            );
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'a':
+                            drawArc(g, x + l, y + t, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6] + x + l,
+                                current[7] + y + t
+                            ], bounds, l, t);
+                            x += current[6];
+                            y += current[7];
+                            break;
+
+                        case 'A':
+                            drawArc(g, x + l, y + t, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6] + l,
+                                current[7] + t
+                            ], bounds, l, t);
+                            x = current[6];
+                            y = current[7];
+                            break;
+
+                        case 'z':
+                        case 'Z':
+                            g.closePath();
+                            break;
+                    }
+                    previous = current;
+                }
+                return bounds.translate(l, t);
+            }
+
+            function bounds(path, bounds) {
+                var current, // current instruction
+                    previous = null,
+                    x = 0, // current x
+                    y = 0, // current y
+                    controlX = 0, // current control point x
+                    controlY = 0, // current control point y
+                    tempX,
+                    tempY,
+                    tempControlX,
+                    tempControlY;
+
+                for (var i = 0, len = path.length; i < len; ++i) {
+                    current = path[i];
+
+                    switch (current[0]) { // first letter
+
+                        case 'l': // lineto, relative
+                            x += current[1];
+                            y += current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'L': // lineto, absolute
+                            x = current[1];
+                            y = current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'h': // horizontal lineto, relative
+                            x += current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'H': // horizontal lineto, absolute
+                            x = current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'v': // vertical lineto, relative
+                            y += current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'V': // verical lineto, absolute
+                            y = current[1];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'm': // moveTo, relative
+                            x += current[1];
+                            y += current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'M': // moveTo, absolute
+                            x = current[1];
+                            y = current[2];
+                            bounds.add(x, y);
+                            break;
+
+                        case 'c': // bezierCurveTo, relative
+                            tempX = x + current[5];
+                            tempY = y + current[6];
+                            controlX = x + current[3];
+                            controlY = y + current[4];
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'C': // bezierCurveTo, absolute
+                            x = current[5];
+                            y = current[6];
+                            controlX = current[3];
+                            controlY = current[4];
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(x, y);
+                            break;
+
+                        case 's': // shorthand cubic bezierCurveTo, relative
+                            // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(x + current[1], y + current[2]);
+                            bounds.add(tempX, tempY);
+
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            x = tempX;
+                            y = tempY;
+                            break;
+
+                        case 'S': // shorthand cubic bezierCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(current[1], current[2]);
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            // set control point to 2nd one of this command
+                            // "... the first control point is assumed to be the reflection of the second control point on the previous command relative to the current point."
+                            controlX = current[1];
+                            controlY = current[2];
+
+                            break;
+
+                        case 'q': // quadraticCurveTo, relative
+                            // transform to absolute x,y
+                            tempX = x + current[3];
+                            tempY = y + current[4];
+
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'Q': // quadraticCurveTo, absolute
+                            tempX = current[3];
+                            tempY = current[4];
+
+                            x = tempX;
+                            y = tempY;
+                            controlX = current[1];
+                            controlY = current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 't': // shorthand quadraticCurveTo, relative
+
+                            // transform to absolute x,y
+                            tempX = x + current[1];
+                            tempY = y + current[2];
+
+                            if (previous[0].match(/[QqTt]/) === null) {
+                                // If there is no previous command or if the previous command was not a Q, q, T or t,
+                                // assume the control point is coincident with the current point
+                                controlX = x;
+                                controlY = y;
+                            }
+                            else if (previous[0] === 't') {
+                                // calculate reflection of previous control points for t
+                                controlX = 2 * x - tempControlX;
+                                controlY = 2 * y - tempControlY;
+                            }
+                            else if (previous[0] === 'q') {
+                                // calculate reflection of previous control points for q
+                                controlX = 2 * x - controlX;
+                                controlY = 2 * y - controlY;
+                            }
+
+                            tempControlX = controlX;
+                            tempControlY = controlY;
+
+                            x = tempX;
+                            y = tempY;
+                            controlX = x + current[1];
+                            controlY = y + current[2];
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'T':
+                            tempX = current[1];
+                            tempY = current[2];
+
+                            // calculate reflection of previous control points
+                            controlX = 2 * x - controlX;
+                            controlY = 2 * y - controlY;
+
+                            x = tempX;
+                            y = tempY;
+                            bounds.add(controlX, controlY);
+                            bounds.add(tempX, tempY);
+                            break;
+
+                        case 'a':
+                            boundArc(x, y, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6] + x,
+                                current[7] + y
+                            ], bounds);
+                            x += current[6];
+                            y += current[7];
+                            break;
+
+                        case 'A':
+                            boundArc(x, y, [
+                                current[1],
+                                current[2],
+                                current[3],
+                                current[4],
+                                current[5],
+                                current[6],
+                                current[7]
+                            ], bounds);
+                            x = current[6];
+                            y = current[7];
+                            break;
+
+                        case 'z':
+                        case 'Z':
+                            break;
+                    }
+                    previous = current;
+                }
+                return bounds;
+            }
+
+            function area(items) {
+                var o = items[0];
+                var area;
+
+                if (o.orient === "horizontal") {
+                    area = d3.svg.area()
+                        .y(function (d) {
+                            return d.y;
+                        })
+                        .x0(function (d) {
+                            return d.x;
+                        })
+                        .x1(function (d) {
+                            return d.x + d.width;
+                        });
+                } else {
+                    area = d3.svg.area()
+                        .x(function (d) {
+                            return d.x;
+                        })
+                        .y1(function (d) {
+                            return d.y;
+                        })
+                        .y0(function (d) {
+                            return d.y + d.height;
+                        });
+                }
+
+                if (o.interpolate) area.interpolate(o.interpolate);
+                if (o.tension != null) area.tension(o.tension);
+                return area(items);
+            }
+
+            function line(items) {
+                var o = items[0];
+                var line = d3.svg.line()
+                    .x(function (d) {
+                        return d.x;
+                    })
+                    .y(function (d) {
+                        return d.y;
+                    });
+                if (o.interpolate) line.interpolate(o.interpolate);
+                if (o.tension != null) line.tension(o.tension);
+                return line(items);
+            }
+
+            return {
+                parse: parse,
+                render: render,
+                bounds: bounds,
+                area: area,
+                line: line
+            };
+
+        })();
+        vg.canvas.marks = (function () {
+
+            var parsePath = vg.canvas.path.parse,
+                renderPath = vg.canvas.path.render,
+                halfpi = Math.PI / 2,
+                sqrt3 = Math.sqrt(3),
+                tan30 = Math.tan(30 * Math.PI / 180),
+                tmpBounds = new vg.Bounds();
+
+            // path generators
+
+            function arcPath(g, o) {
+                var x = o.x || 0,
+                    y = o.y || 0,
+                    ir = o.innerRadius || 0,
+                    or = o.outerRadius || 0,
+                    sa = (o.startAngle || 0) - Math.PI / 2,
+                    ea = (o.endAngle || 0) - Math.PI / 2;
+                g.beginPath();
+                if (ir === 0) g.moveTo(x, y);
+                else g.arc(x, y, ir, sa, ea, 0);
+                g.arc(x, y, or, ea, sa, 1);
+                g.closePath();
+            }
+
+            function areaPath(g, items) {
+                var o = items[0],
+                    m = o.mark,
+                    p = m.pathCache || (m.pathCache = parsePath(vg.canvas.path.area(items)));
+                renderPath(g, p);
+            }
+
+            function linePath(g, items) {
+                var o = items[0],
+                    m = o.mark,
+                    p = m.pathCache || (m.pathCache = parsePath(vg.canvas.path.line(items)));
+                renderPath(g, p);
+            }
+
+            function pathPath(g, o) {
+                if (o.path == null) return;
+                var p = o.pathCache || (o.pathCache = parsePath(o.path));
+                return renderPath(g, p, o.x, o.y);
+            }
+
+            function symbolPath(g, o) {
+                g.beginPath();
+                var size = o.size != null ? o.size : 100,
+                    x = o.x, y = o.y, r, t, rx, ry;
+
+                if (o.shape == null || o.shape === "circle") {
+                    r = Math.sqrt(size / Math.PI);
+                    g.arc(x, y, r, 0, 2 * Math.PI, 0);
+                    g.closePath();
+                    return;
+                }
+
+                switch (o.shape) {
+                    case "cross":
+                        r = Math.sqrt(size / 5) / 2;
+                        t = 3 * r;
+                        g.moveTo(x - t, y - r);
+                        g.lineTo(x - r, y - r);
+                        g.lineTo(x - r, y - t);
+                        g.lineTo(x + r, y - t);
+                        g.lineTo(x + r, y - r);
+                        g.lineTo(x + t, y - r);
+                        g.lineTo(x + t, y + r);
+                        g.lineTo(x + r, y + r);
+                        g.lineTo(x + r, y + t);
+                        g.lineTo(x - r, y + t);
+                        g.lineTo(x - r, y + r);
+                        g.lineTo(x - t, y + r);
+                        break;
+
+                    case "diamond":
+                        ry = Math.sqrt(size / (2 * tan30));
+                        rx = ry * tan30;
+                        g.moveTo(x, y - ry);
+                        g.lineTo(x + rx, y);
+                        g.lineTo(x, y + ry);
+                        g.lineTo(x - rx, y);
+                        break;
+
+                    case "square":
+                        t = Math.sqrt(size);
+                        r = t / 2;
+                        g.rect(x - r, y - r, t, t);
+                        break;
+
+                    case "triangle-down":
+                        rx = Math.sqrt(size / sqrt3);
+                        ry = rx * sqrt3 / 2;
+                        g.moveTo(x, y + ry);
+                        g.lineTo(x + rx, y - ry);
+                        g.lineTo(x - rx, y - ry);
+                        break;
+
+                    case "triangle-up":
+                        rx = Math.sqrt(size / sqrt3);
+                        ry = rx * sqrt3 / 2;
+                        g.moveTo(x, y - ry);
+                        g.lineTo(x + rx, y + ry);
+                        g.lineTo(x - rx, y + ry);
+                }
+                g.closePath();
+            }
+
+            function lineStroke(g, items) {
+                var o = items[0],
+                    lw = o.strokeWidth,
+                    lc = o.strokeCap;
+                g.lineWidth = lw != null ? lw : vg.config.render.lineWidth;
+                g.lineCap = lc != null ? lc : vg.config.render.lineCap;
+                linePath(g, items);
+            }
+
+            function ruleStroke(g, o) {
+                var x1 = o.x || 0,
+                    y1 = o.y || 0,
+                    x2 = o.x2 != null ? o.x2 : x1,
+                    y2 = o.y2 != null ? o.y2 : y1,
+                    lw = o.strokeWidth,
+                    lc = o.strokeCap;
+
+                g.lineWidth = lw != null ? lw : vg.config.render.lineWidth;
+                g.lineCap = lc != null ? lc : vg.config.render.lineCap;
+                g.beginPath();
+                g.moveTo(x1, y1);
+                g.lineTo(x2, y2);
+            }
+
+            // drawing functions
+
+            function drawPathOne(path, g, o, items) {
+                var fill = o.fill, stroke = o.stroke, opac, lc, lw;
+
+                path(g, items);
+
+                opac = o.opacity == null ? 1 : o.opacity;
+                if (opac == 0 || !fill && !stroke) return;
+
+                if (fill) {
+                    g.globalAlpha = opac * (o.fillOpacity == null ? 1 : o.fillOpacity);
+                    g.fillStyle = color(g, o, fill);
+                    g.fill();
+                }
+
+                if (stroke) {
+                    lw = (lw = o.strokeWidth) != null ? lw : vg.config.render.lineWidth;
+                    if (lw > 0) {
+                        g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                        g.strokeStyle = color(g, o, stroke);
+                        g.lineWidth = lw;
+                        g.lineCap = (lc = o.strokeCap) != null ? lc : vg.config.render.lineCap;
+                        g.vgLineDash(o.strokeDash || null);
+                        g.vgLineDashOffset(o.strokeDashOffset || 0);
+                        g.stroke();
+                    }
+                }
+            }
+
+            function drawPathAll(path, g, scene, bounds) {
+                var i, len, item;
+                for (i = 0, len = scene.items.length; i < len; ++i) {
+                    item = scene.items[i];
+                    if (bounds && !bounds.intersects(item.bounds))
+                        continue; // bounds check
+                    drawPathOne(path, g, item, item);
+                }
+            }
+
+            function drawRect(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items,
+                    o, fill, stroke, opac, lc, lw, x, y, w, h;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    x = o.x || 0;
+                    y = o.y || 0;
+                    w = o.width || 0;
+                    h = o.height || 0;
+
+                    opac = o.opacity == null ? 1 : o.opacity;
+                    if (opac == 0) continue;
+
+                    if (fill = o.fill) {
+                        g.globalAlpha = opac * (o.fillOpacity == null ? 1 : o.fillOpacity);
+                        g.fillStyle = color(g, o, fill);
+                        g.fillRect(x, y, w, h);
+                    }
+
+                    if (stroke = o.stroke) {
+                        lw = (lw = o.strokeWidth) != null ? lw : vg.config.render.lineWidth;
+                        if (lw > 0) {
+                            g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                            g.strokeStyle = color(g, o, stroke);
+                            g.lineWidth = lw;
+                            g.lineCap = (lc = o.strokeCap) != null ? lc : vg.config.render.lineCap;
+                            g.vgLineDash(o.strokeDash || null);
+                            g.vgLineDashOffset(o.strokeDashOffset || 0);
+                            g.strokeRect(x, y, w, h);
+                        }
+                    }
+                }
+            }
+
+            function drawRule(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items,
+                    o, stroke, opac, lc, lw, x1, y1, x2, y2;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    x1 = o.x || 0;
+                    y1 = o.y || 0;
+                    x2 = o.x2 != null ? o.x2 : x1;
+                    y2 = o.y2 != null ? o.y2 : y1;
+
+                    opac = o.opacity == null ? 1 : o.opacity;
+                    if (opac == 0) continue;
+
+                    if (stroke = o.stroke) {
+                        lw = (lw = o.strokeWidth) != null ? lw : vg.config.render.lineWidth;
+                        if (lw > 0) {
+                            g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                            g.strokeStyle = color(g, o, stroke);
+                            g.lineWidth = lw;
+                            g.lineCap = (lc = o.strokeCap) != null ? lc : vg.config.render.lineCap;
+                            g.vgLineDash(o.strokeDash || null);
+                            g.vgLineDashOffset(o.strokeDashOffset || 0);
+                            g.beginPath();
+                            g.moveTo(x1, y1);
+                            g.lineTo(x2, y2);
+                            g.stroke();
+                        }
+                    }
+                }
+            }
+
+            function drawImage(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var renderer = this,
+                    items = scene.items, o;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    if (!(o.image && o.image.url === o.url)) {
+                        o.image = renderer.loadImage(o.url);
+                        o.image.url = o.url;
+                    }
+
+                    var x, y, w, h, opac;
+                    w = o.width || (o.image && o.image.width) || 0;
+                    h = o.height || (o.image && o.image.height) || 0;
+                    x = (o.x || 0) - (o.align === "center"
+                            ? w / 2 : (o.align === "right" ? w : 0));
+                    y = (o.y || 0) - (o.baseline === "middle"
+                            ? h / 2 : (o.baseline === "bottom" ? h : 0));
+
+                    if (o.image.loaded) {
+                        g.globalAlpha = (opac = o.opacity) != null ? opac : 1;
+                        g.drawImage(o.image, x, y, w, h);
+                    }
+                }
+            }
+
+            function drawText(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items,
+                    o, fill, stroke, opac, lw, x, y, r, t;
+
+                for (var i = 0, len = items.length; i < len; ++i) {
+                    o = items[i];
+                    if (bounds && !bounds.intersects(o.bounds))
+                        continue; // bounds check
+
+                    g.font = vg.scene.fontString(o);
+                    g.textAlign = o.align || "left";
+                    g.textBaseline = o.baseline || "alphabetic";
+
+                    opac = o.opacity == null ? 1 : o.opacity;
+                    if (opac == 0) continue;
+
+                    x = o.x || 0;
+                    y = o.y || 0;
+                    if (r = o.radius) {
+                        t = (o.theta || 0) - Math.PI / 2;
+                        x += r * Math.cos(t);
+                        y += r * Math.sin(t);
+                    }
+
+                    if (o.angle) {
+                        g.save();
+                        g.translate(x, y);
+                        g.rotate(o.angle * Math.PI / 180);
+                        x = o.dx || 0;
+                        y = o.dy || 0;
+                    } else {
+                        x += (o.dx || 0);
+                        y += (o.dy || 0);
+                    }
+
+                    if (fill = o.fill) {
+                        g.globalAlpha = opac * (o.fillOpacity == null ? 1 : o.fillOpacity);
+                        g.fillStyle = color(g, o, fill);
+                        g.fillText(o.text, x, y);
+                    }
+
+                    if (stroke = o.stroke) {
+                        lw = (lw = o.strokeWidth) != null ? lw : 1;
+                        if (lw > 0) {
+                            g.globalAlpha = opac * (o.strokeOpacity == null ? 1 : o.strokeOpacity);
+                            g.strokeStyle = color(o, stroke);
+                            g.lineWidth = lw;
+                            g.strokeText(o.text, x, y);
+                        }
+                    }
+
+                    if (o.angle) g.restore();
+                }
+            }
+
+            function drawAll(pathFunc) {
+                return function (g, scene, bounds) {
+                    drawPathAll(pathFunc, g, scene, bounds);
+                }
+            }
+
+            function drawOne(pathFunc) {
+                return function (g, scene, bounds) {
+                    if (!scene.items.length) return;
+                    if (bounds && !bounds.intersects(scene.items[0].bounds))
+                        return; // bounds check
+                    drawPathOne(pathFunc, g, scene.items[0], scene.items);
+                }
+            }
+
+            function drawGroup(g, scene, bounds) {
+                if (!scene.items.length) return;
+                var items = scene.items, group, axes, legends,
+                    renderer = this, gx, gy, gb, i, n, j, m;
+
+                drawRect(g, scene, bounds);
+
+                for (i = 0, n = items.length; i < n; ++i) {
+                    group = items[i];
+                    axes = group.axisItems || [];
+                    legends = group.legendItems || [];
+                    gx = group.x || 0;
+                    gy = group.y || 0;
+
+                    // render group contents
+                    g.save();
+                    g.translate(gx, gy);
+                    if (group.clip) {
+                        g.beginPath();
+                        g.rect(0, 0, group.width || 0, group.height || 0);
+                        g.clip();
+                    }
+
+                    if (bounds) bounds.translate(-gx, -gy);
+
+                    for (j = 0, m = axes.length; j < m; ++j) {
+                        if (axes[j].def.layer === "back") {
+                            renderer.draw(g, axes[j], bounds);
+                        }
+                    }
+                    for (j = 0, m = group.items.length; j < m; ++j) {
+                        renderer.draw(g, group.items[j], bounds);
+                    }
+                    for (j = 0, m = axes.length; j < m; ++j) {
+                        if (axes[j].def.layer !== "back") {
+                            renderer.draw(g, axes[j], bounds);
+                        }
+                    }
+                    for (j = 0, m = legends.length; j < m; ++j) {
+                        renderer.draw(g, legends[j], bounds);
+                    }
+
+                    if (bounds) bounds.translate(gx, gy);
+                    g.restore();
+                }
+            }
+
+            function color(g, o, value) {
+                return (value.id)
+                    ? gradient(g, value, o.bounds)
+                    : value;
+            }
+
+            function gradient(g, p, b) {
+                var w = b.width(),
+                    h = b.height(),
+                    x1 = b.x1 + p.x1 * w,
+                    y1 = b.y1 + p.y1 * h,
+                    x2 = b.x1 + p.x2 * w,
+                    y2 = b.y1 + p.y2 * h,
+                    grad = g.createLinearGradient(x1, y1, x2, y2),
+                    stop = p.stops,
+                    i, n;
+
+                for (i = 0, n = stop.length; i < n; ++i) {
+                    grad.addColorStop(stop[i].offset, stop[i].color);
+                }
+                return grad;
+            }
+
+            // hit testing
+
+            function pickGroup(g, scene, x, y, gx, gy) {
+                if (scene.items.length === 0 ||
+                    scene.bounds && !scene.bounds.contains(gx, gy)) {
+                    return false;
+                }
+                var items = scene.items, subscene, group, hit, dx, dy,
+                    handler = this, i, j;
+
+                for (i = items.length; --i >= 0;) {
+                    group = items[i];
+                    dx = group.x || 0;
+                    dy = group.y || 0;
+
+                    g.save();
+                    g.translate(dx, dy);
+                    for (j = group.items.length; --j >= 0;) {
+                        subscene = group.items[j];
+                        if (subscene.interactive === false) continue;
+                        hit = handler.pick(subscene, x, y, gx - dx, gy - dy);
+                        if (hit) {
+                            g.restore();
+                            return hit;
+                        }
+                    }
+                    g.restore();
+                }
+
+                return scene.interactive
+                    ? pickAll(hitTests.group, g, scene, x, y, gx, gy)
+                    : false;
+            }
+
+            function pickAll(test, g, scene, x, y, gx, gy) {
+                if (!scene.items.length) return false;
+                var o, b, i;
+
+                if (g._ratio !== 1) {
+                    x *= g._ratio;
+                    y *= g._ratio;
+                }
+
+                for (i = scene.items.length; --i >= 0;) {
+                    o = scene.items[i];
+                    b = o.bounds;
+                    // first hit test against bounding box
+                    if ((b && !b.contains(gx, gy)) || !b) continue;
+                    // if in bounding box, perform more careful test
+                    if (test(g, o, x, y, gx, gy)) return o;
+                }
+                return false;
+            }
+
+            function pickArea(g, scene, x, y, gx, gy) {
+                if (!scene.items.length) return false;
+                var items = scene.items,
+                    o, b, i, di, dd, od, dx, dy;
+
+                b = items[0].bounds;
+                if (b && !b.contains(gx, gy)) return false;
+                if (g._ratio !== 1) {
+                    x *= g._ratio;
+                    y *= g._ratio;
+                }
+                if (!hitTests.area(g, items, x, y)) return false;
+                return items[0];
+            }
+
+            function pickLine(g, scene, x, y, gx, gy) {
+                if (!scene.items.length) return false;
+                var items = scene.items,
+                    o, b, i, di, dd, od, dx, dy;
+
+                b = items[0].bounds;
+                if (b && !b.contains(gx, gy)) return false;
+                if (g._ratio !== 1) {
+                    x *= g._ratio;
+                    y *= g._ratio;
+                }
+                if (!hitTests.line(g, items, x, y)) return false;
+                return items[0];
+            }
+
+            function pick(test) {
+                return function (g, scene, x, y, gx, gy) {
+                    return pickAll(test, g, scene, x, y, gx, gy);
+                };
+            }
+
+            function textHit(g, o, x, y, gx, gy) {
+                if (!o.fontSize) return false;
+                if (!o.angle) return true; // bounds sufficient if no rotation
+
+                var b = vg.scene.bounds.text(o, tmpBounds, true),
+                    a = -o.angle * Math.PI / 180,
+                    cos = Math.cos(a),
+                    sin = Math.sin(a),
+                    x = o.x,
+                    y = o.y,
+                    px = cos * gx - sin * gy + (x - x * cos + y * sin),
+                    py = sin * gx + cos * gy + (y - x * sin - y * cos);
+
+                return b.contains(px, py);
+            }
+
+            var hitTests = {
+                text: textHit,
+                rect: function (g, o, x, y) {
+                    return true;
+                }, // bounds test is sufficient
+                image: function (g, o, x, y) {
+                    return true;
+                }, // bounds test is sufficient
+                group: function (g, o, x, y) {
+                    return o.fill || o.stroke;
+                },
+                rule: function (g, o, x, y) {
+                    if (!g.isPointInStroke) return false;
+                    ruleStroke(g, o);
+                    return g.isPointInStroke(x, y);
+                },
+                line: function (g, s, x, y) {
+                    if (!g.isPointInStroke) return false;
+                    lineStroke(g, s);
+                    return g.isPointInStroke(x, y);
+                },
+                arc: function (g, o, x, y) {
+                    arcPath(g, o);
+                    return g.isPointInPath(x, y);
+                },
+                area: function (g, s, x, y) {
+                    areaPath(g, s);
+                    return g.isPointInPath(x, y);
+                },
+                path: function (g, o, x, y) {
+                    pathPath(g, o);
+                    return g.isPointInPath(x, y);
+                },
+                symbol: function (g, o, x, y) {
+                    symbolPath(g, o);
+                    return g.isPointInPath(x, y);
+                }
+            };
+
+            return {
+                draw: {
+                    group: drawGroup,
+                    area: drawOne(areaPath),
+                    line: drawOne(linePath),
+                    arc: drawAll(arcPath),
+                    path: drawAll(pathPath),
+                    symbol: drawAll(symbolPath),
+                    rect: drawRect,
+                    rule: drawRule,
+                    text: drawText,
+                    image: drawImage,
+                    drawOne: drawOne, // expose for extensibility
+                    drawAll: drawAll  // expose for extensibility
+                },
+                pick: {
+                    group: pickGroup,
+                    area: pickArea,
+                    line: pickLine,
+                    arc: pick(hitTests.arc),
+                    path: pick(hitTests.path),
+                    symbol: pick(hitTests.symbol),
+                    rect: pick(hitTests.rect),
+                    rule: pick(hitTests.rule),
+                    text: pick(hitTests.text),
+                    image: pick(hitTests.image),
+                    pickAll: pickAll  // expose for extensibility
+                }
+            };
+
+        })();
+        vg.canvas.Renderer = (function () {
+            var renderer = function () {
+                this._ctx = null;
+                this._el = null;
+                this._imgload = 0;
+            };
+
+            var prototype = renderer.prototype;
+
+            prototype.initialize = function (el, width, height, pad) {
+                this._el = el;
+
+                if (!el) return this; // early exit if no DOM element
+
+                // select canvas element
+                var canvas = d3.select(el)
+                    .selectAll("canvas.marks")
+                    .data([1]);
+
+                // create new canvas element if needed
+                canvas.enter()
+                    .append("canvas")
+                    .attr("class", "marks");
+
+                // remove extraneous canvas if needed
+                canvas.exit().remove();
+
+                return this.resize(width, height, pad);
+            };
+
+            prototype.resize = function (width, height, pad) {
+                this._width = width;
+                this._height = height;
+                this._padding = pad;
+
+                if (this._el) {
+                    var canvas = d3.select(this._el).select("canvas.marks");
+
+                    // initialize canvas attributes
+                    canvas
+                        .attr("width", width + pad.left + pad.right)
+                        .attr("height", height + pad.top + pad.bottom);
+
+                    // get the canvas graphics context
+                    var s;
+                    this._ctx = canvas.node().getContext("2d");
+                    this._ctx._ratio = (s = scaleCanvas(canvas.node(), this._ctx) || 1);
+                    this._ctx.setTransform(s, 0, 0, s, s * pad.left, s * pad.top);
+                }
+
+                initializeLineDash(this._ctx);
+                return this;
+            };
+
+            function scaleCanvas(canvas, ctx) {
+                // get canvas pixel data
+                var devicePixelRatio = window.devicePixelRatio || 1,
+                    backingStoreRatio = (
+                        ctx.webkitBackingStorePixelRatio ||
+                        ctx.mozBackingStorePixelRatio ||
+                        ctx.msBackingStorePixelRatio ||
+                        ctx.oBackingStorePixelRatio ||
+                        ctx.backingStorePixelRatio) || 1,
+                    ratio = devicePixelRatio / backingStoreRatio;
+
+                if (devicePixelRatio !== backingStoreRatio) {
+                    var w = canvas.width, h = canvas.height;
+                    // set actual and visible canvas size
+                    canvas.setAttribute("width", w * ratio);
+                    canvas.setAttribute("height", h * ratio);
+                    canvas.style.width = w + 'px';
+                    canvas.style.height = h + 'px';
+                }
+                return ratio;
+            }
+
+            function initializeLineDash(ctx) {
+                if (ctx.vgLineDash) return; // already set
+
+                var NODASH = [];
+                if (ctx.setLineDash) {
+                    ctx.vgLineDash = function (dash) {
+                        this.setLineDash(dash || NODASH);
+                    };
+                    ctx.vgLineDashOffset = function (off) {
+                        this.lineDashOffset = off;
+                    };
+                } else if (ctx.webkitLineDash !== undefined) {
+                    ctx.vgLineDash = function (dash) {
+                        this.webkitLineDash = dash || NODASH;
+                    };
+                    ctx.vgLineDashOffset = function (off) {
+                        this.webkitLineDashOffset = off;
+                    };
+                } else if (ctx.mozDash !== undefined) {
+                    ctx.vgLineDash = function (dash) {
+                        this.mozDash = dash;
+                    };
+                    ctx.vgLineDashOffset = function (off) { /* unsupported */
+                    };
+                } else {
+                    ctx.vgLineDash = function (dash) { /* unsupported */
+                    };
+                    ctx.vgLineDashOffset = function (off) { /* unsupported */
+                    };
+                }
+            }
+
+            prototype.context = function (ctx) {
+                if (ctx) {
+                    this._ctx = ctx;
+                    return this;
+                }
+                else return this._ctx;
+            };
+
+            prototype.element = function () {
+                return this._el;
+            };
+
+            prototype.pendingImages = function () {
+                return this._imgload;
+            };
+
+            function translatedBounds(item, bounds) {
+                var b = new vg.Bounds(bounds);
+                while ((item = item.mark.group) != null) {
+                    b.translate(item.x || 0, item.y || 0);
+                }
+                return b;
+            }
+
+            function getBounds(items) {
+                return !items ? null :
+                    vg.array(items).reduce(function (b, item) {
+                        return b.union(translatedBounds(item, item.bounds))
+                            .union(translatedBounds(item, item['bounds:prev']));
+                    }, new vg.Bounds());
+            }
+
+            function setBounds(g, bounds) {
+                var bbox = null;
+                if (bounds) {
+                    bbox = (new vg.Bounds(bounds)).round();
+                    g.beginPath();
+                    g.rect(bbox.x1, bbox.y1, bbox.width(), bbox.height());
+                    g.clip();
+                }
+                return bbox;
+            }
+
+            prototype.render = function (scene, items) {
+                var g = this._ctx,
+                    pad = this._padding,
+                    w = this._width + pad.left + pad.right,
+                    h = this._height + pad.top + pad.bottom,
+                    bb = null, bb2;
+
+                // setup
+                this._scene = scene;
+                g.save();
+                bb = setBounds(g, getBounds(items));
+                g.clearRect(-pad.left, -pad.top, w, h);
+
+                // render
+                this.draw(g, scene, bb);
+
+                // render again to handle possible bounds change
+                if (items) {
+                    g.restore();
+                    g.save();
+                    bb2 = setBounds(g, getBounds(items));
+                    if (!bb.encloses(bb2)) {
+                        g.clearRect(-pad.left, -pad.top, w, h);
+                        this.draw(g, scene, bb2);
+                    }
+                }
+
+                // takedown
+                g.restore();
+                this._scene = null;
+            };
+
+            prototype.draw = function (ctx, scene, bounds) {
+                var marktype = scene.marktype,
+                    renderer = vg.canvas.marks.draw[marktype];
+                renderer.call(this, ctx, scene, bounds);
+            };
+
+            prototype.renderAsync = function (scene) {
+                // TODO make safe for multiple scene rendering?
+                var renderer = this;
+                if (renderer._async_id) {
+                    clearTimeout(renderer._async_id);
+                }
+                renderer._async_id = setTimeout(function () {
+                    renderer.render(scene);
+                    delete renderer._async_id;
+                }, 50);
+            };
+
+            prototype.loadImage = function (uri) {
+                var renderer = this,
+                    scene = renderer._scene,
+                    image = null, url;
+
+                renderer._imgload += 1;
+                if (vg.config.isNode) {
+                    image = new (require("canvas").Image)();
+                    vg.data.load(uri, function (err, data) {
+                        if (err) {
+                            vg.error(err);
+                            return;
+                        }
+                        image.src = data;
+                        image.loaded = true;
+                        renderer._imgload -= 1;
+                    });
+                } else {
+                    image = new Image();
+                    url = vg.config.baseURL + uri;
+                    image.onload = function () {
+                        vg.log("LOAD IMAGE: " + url);
+                        image.loaded = true;
+                        renderer._imgload -= 1;
+                        renderer.renderAsync(scene);
+                    };
+                    image.src = url;
+                }
+
+                return image;
+            };
+
+            return renderer;
+        })();
+        vg.canvas.Handler = (function () {
+            var handler = function (el, model) {
+                this._active = null;
+                this._handlers = {};
+                if (el) this.initialize(el);
+                if (model) this.model(model);
+            };
+
+            var prototype = handler.prototype;
+
+            prototype.initialize = function (el, pad, obj) {
+                this._el = d3.select(el).node();
+                this._canvas = d3.select(el).select("canvas.marks").node();
+                this._padding = pad;
+                this._obj = obj || null;
+
+                // add event listeners
+                var canvas = this._canvas, that = this;
+                events.forEach(function (type) {
+                    canvas.addEventListener(type, function (evt) {
+                        prototype[type].call(that, evt);
+                    });
+                });
+
+                return this;
+            };
+
+            prototype.padding = function (pad) {
+                this._padding = pad;
+                return this;
+            };
+
+            prototype.model = function (model) {
+                if (!arguments.length) return this._model;
+                this._model = model;
+                return this;
+            };
+
+            prototype.handlers = function () {
+                var h = this._handlers;
+                return vg.keys(h).reduce(function (a, k) {
+                    return h[k].reduce(function (a, x) {
+                        return (a.push(x), a);
+                    }, a);
+                }, []);
+            };
+
+            // setup events
+            var events = [
+                "mousedown",
+                "mouseup",
+                "click",
+                "dblclick",
+                "wheel",
+                "keydown",
+                "keypress",
+                "keyup",
+                "mousewheel"
+            ];
+            events.forEach(function (type) {
+                prototype[type] = function (evt) {
+                    this.fire(type, evt);
+                };
+            });
+            events.push("mousemove");
+            events.push("mouseout");
+
+            function eventName(name) {
+                var i = name.indexOf(".");
+                return i < 0 ? name : name.slice(0, i);
+            }
+
+            prototype.mousemove = function (evt) {
+                var pad = this._padding,
+                    b = evt.target.getBoundingClientRect(),
+                    x = evt.clientX - b.left,
+                    y = evt.clientY - b.top,
+                    a = this._active,
+                    p = this.pick(this._model.scene(), x, y, x - pad.left, y - pad.top);
+
+                if (p === a) {
+                    this.fire("mousemove", evt);
+                    return;
+                } else if (a) {
+                    this.fire("mouseout", evt);
+                }
+                this._active = p;
+                if (p) {
+                    this.fire("mouseover", evt);
+                }
+            };
+
+            prototype.mouseout = function (evt) {
+                if (this._active) {
+                    this.fire("mouseout", evt);
+                }
+                this._active = null;
+            };
+
+            // to keep firefox happy
+            prototype.DOMMouseScroll = function (evt) {
+                this.fire("mousewheel", evt);
+            };
+
+            // fire an event
+            prototype.fire = function (type, evt) {
+                var a = this._active,
+                    h = this._handlers[type];
+                if (a && h) {
+                    for (var i = 0, len = h.length; i < len; ++i) {
+                        h[i].handler.call(this._obj, evt, a);
+                    }
+                }
+            };
+
+            // add an event handler
+            prototype.on = function (type, handler) {
+                var name = eventName(type),
+                    h = this._handlers;
+                h = h[name] || (h[name] = []);
+    

<TRUNCATED>

[34/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.geomap.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.geomap.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.geomap.min.js
new file mode 100644
index 0000000..45f87a0
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.geomap.min.js
@@ -0,0 +1,538 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+"use strict";
+function addAccessor(f, e, d) {
+    f[e] = function (c) {
+        return "undefined" == typeof c ? f.properties[e] || d : (f.properties[e] = c, f)
+    }
+}
+function _classCallCheck(f, e) {
+    if (!(f instanceof e))throw new TypeError("Cannot call a class as a function")
+}
+function _classCallCheck(f, e) {
+    if (!(f instanceof e))throw new TypeError("Cannot call a class as a function")
+}
+function _inherits(f, e) {
+    if ("function" != typeof e && null !== e)throw new TypeError("Super expression must either be null or a function, not " + typeof e);
+    f.prototype = Object.create(e && e.prototype, {
+        constructor: {
+            value: f,
+            enumerable: !1,
+            writable: !0,
+            configurable: !0
+        }
+    }), e && (f.__proto__ = e)
+}
+var colorbrewer = {
+    YlGn: {
+        3: ["#f7fcb9", "#addd8e", "#31a354"],
+        4: ["#ffffcc", "#c2e699", "#78c679", "#238443"],
+        5: ["#ffffcc", "#c2e699", "#78c679", "#31a354", "#006837"],
+        6: ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#31a354", "#006837"],
+        7: ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"],
+        8: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"],
+        9: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#006837", "#004529"]
+    },
+    YlGnBu: {
+        3: ["#edf8b1", "#7fcdbb", "#2c7fb8"],
+        4: ["#ffffcc", "#a1dab4", "#41b6c4", "#225ea8"],
+        5: ["#ffffcc", "#a1dab4", "#41b6c4", "#2c7fb8", "#253494"],
+        6: ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#2c7fb8", "#253494"],
+        7: ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"],
+        8: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"],
+        9: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#253494", "#081d58"]
+    },
+    GnBu: {
+        3: ["#e0f3db", "#a8ddb5", "#43a2ca"],
+        4: ["#f0f9e8", "#bae4bc", "#7bccc4", "#2b8cbe"],
+        5: ["#f0f9e8", "#bae4bc", "#7bccc4", "#43a2ca", "#0868ac"],
+        6: ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#43a2ca", "#0868ac"],
+        7: ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"],
+        8: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"],
+        9: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#0868ac", "#084081"]
+    },
+    BuGn: {
+        3: ["#e5f5f9", "#99d8c9", "#2ca25f"],
+        4: ["#edf8fb", "#b2e2e2", "#66c2a4", "#238b45"],
+        5: ["#edf8fb", "#b2e2e2", "#66c2a4", "#2ca25f", "#006d2c"],
+        6: ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#2ca25f", "#006d2c"],
+        7: ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"],
+        8: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"],
+        9: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#006d2c", "#00441b"]
+    },
+    PuBuGn: {
+        3: ["#ece2f0", "#a6bddb", "#1c9099"],
+        4: ["#f6eff7", "#bdc9e1", "#67a9cf", "#02818a"],
+        5: ["#f6eff7", "#bdc9e1", "#67a9cf", "#1c9099", "#016c59"],
+        6: ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#1c9099", "#016c59"],
+        7: ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"],
+        8: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"],
+        9: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016c59", "#014636"]
+    },
+    PuBu: {
+        3: ["#ece7f2", "#a6bddb", "#2b8cbe"],
+        4: ["#f1eef6", "#bdc9e1", "#74a9cf", "#0570b0"],
+        5: ["#f1eef6", "#bdc9e1", "#74a9cf", "#2b8cbe", "#045a8d"],
+        6: ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#2b8cbe", "#045a8d"],
+        7: ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"],
+        8: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"],
+        9: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#045a8d", "#023858"]
+    },
+    BuPu: {
+        3: ["#e0ecf4", "#9ebcda", "#8856a7"],
+        4: ["#edf8fb", "#b3cde3", "#8c96c6", "#88419d"],
+        5: ["#edf8fb", "#b3cde3", "#8c96c6", "#8856a7", "#810f7c"],
+        6: ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8856a7", "#810f7c"],
+        7: ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"],
+        8: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"],
+        9: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#810f7c", "#4d004b"]
+    },
+    RdPu: {
+        3: ["#fde0dd", "#fa9fb5", "#c51b8a"],
+        4: ["#feebe2", "#fbb4b9", "#f768a1", "#ae017e"],
+        5: ["#feebe2", "#fbb4b9", "#f768a1", "#c51b8a", "#7a0177"],
+        6: ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"],
+        7: ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"],
+        8: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"],
+        9: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177", "#49006a"]
+    },
+    PuRd: {
+        3: ["#e7e1ef", "#c994c7", "#dd1c77"],
+        4: ["#f1eef6", "#d7b5d8", "#df65b0", "#ce1256"],
+        5: ["#f1eef6", "#d7b5d8", "#df65b0", "#dd1c77", "#980043"],
+        6: ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#dd1c77", "#980043"],
+        7: ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"],
+        8: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"],
+        9: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#980043", "#67001f"]
+    },
+    OrRd: {
+        3: ["#fee8c8", "#fdbb84", "#e34a33"],
+        4: ["#fef0d9", "#fdcc8a", "#fc8d59", "#d7301f"],
+        5: ["#fef0d9", "#fdcc8a", "#fc8d59", "#e34a33", "#b30000"],
+        6: ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#e34a33", "#b30000"],
+        7: ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"],
+        8: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"],
+        9: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#b30000", "#7f0000"]
+    },
+    YlOrRd: {
+        3: ["#ffeda0", "#feb24c", "#f03b20"],
+        4: ["#ffffb2", "#fecc5c", "#fd8d3c", "#e31a1c"],
+        5: ["#ffffb2", "#fecc5c", "#fd8d3c", "#f03b20", "#bd0026"],
+        6: ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#f03b20", "#bd0026"],
+        7: ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"],
+        8: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"],
+        9: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#bd0026", "#800026"]
+    },
+    YlOrBr: {
+        3: ["#fff7bc", "#fec44f", "#d95f0e"],
+        4: ["#ffffd4", "#fed98e", "#fe9929", "#cc4c02"],
+        5: ["#ffffd4", "#fed98e", "#fe9929", "#d95f0e", "#993404"],
+        6: ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#d95f0e", "#993404"],
+        7: ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"],
+        8: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"],
+        9: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#993404", "#662506"]
+    },
+    Purples: {
+        3: ["#efedf5", "#bcbddc", "#756bb1"],
+        4: ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#6a51a3"],
+        5: ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#756bb1", "#54278f"],
+        6: ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#756bb1", "#54278f"],
+        7: ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"],
+        8: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"],
+        9: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#54278f", "#3f007d"]
+    },
+    Blues: {
+        3: ["#deebf7", "#9ecae1", "#3182bd"],
+        4: ["#eff3ff", "#bdd7e7", "#6baed6", "#2171b5"],
+        5: ["#eff3ff", "#bdd7e7", "#6baed6", "#3182bd", "#08519c"],
+        6: ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#3182bd", "#08519c"],
+        7: ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"],
+        8: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"],
+        9: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#08519c", "#08306b"]
+    },
+    Greens: {
+        3: ["#e5f5e0", "#a1d99b", "#31a354"],
+        4: ["#edf8e9", "#bae4b3", "#74c476", "#238b45"],
+        5: ["#edf8e9", "#bae4b3", "#74c476", "#31a354", "#006d2c"],
+        6: ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#31a354", "#006d2c"],
+        7: ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"],
+        8: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"],
+        9: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#006d2c", "#00441b"]
+    },
+    Oranges: {
+        3: ["#fee6ce", "#fdae6b", "#e6550d"],
+        4: ["#feedde", "#fdbe85", "#fd8d3c", "#d94701"],
+        5: ["#feedde", "#fdbe85", "#fd8d3c", "#e6550d", "#a63603"],
+        6: ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#e6550d", "#a63603"],
+        7: ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"],
+        8: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"],
+        9: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#a63603", "#7f2704"]
+    },
+    Reds: {
+        3: ["#fee0d2", "#fc9272", "#de2d26"],
+        4: ["#fee5d9", "#fcae91", "#fb6a4a", "#cb181d"],
+        5: ["#fee5d9", "#fcae91", "#fb6a4a", "#de2d26", "#a50f15"],
+        6: ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#de2d26", "#a50f15"],
+        7: ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"],
+        8: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"],
+        9: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#a50f15", "#67000d"]
+    },
+    Greys: {
+        3: ["#f0f0f0", "#bdbdbd", "#636363"],
+        4: ["#f7f7f7", "#cccccc", "#969696", "#525252"],
+        5: ["#f7f7f7", "#cccccc", "#969696", "#636363", "#252525"],
+        6: ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#636363", "#252525"],
+        7: ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"],
+        8: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"],
+        9: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525", "#000000"]
+    },
+    PuOr: {
+        3: ["#f1a340", "#f7f7f7", "#998ec3"],
+        4: ["#e66101", "#fdb863", "#b2abd2", "#5e3c99"],
+        5: ["#e66101", "#fdb863", "#f7f7f7", "#b2abd2", "#5e3c99"],
+        6: ["#b35806", "#f1a340", "#fee0b6", "#d8daeb", "#998ec3", "#542788"],
+        7: ["#b35806", "#f1a340", "#fee0b6", "#f7f7f7", "#d8daeb", "#998ec3", "#542788"],
+        8: ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788"],
+        9: ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788"],
+        10: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"],
+        11: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"]
+    },
+    BrBG: {
+        3: ["#d8b365", "#f5f5f5", "#5ab4ac"],
+        4: ["#a6611a", "#dfc27d", "#80cdc1", "#018571"],
+        5: ["#a6611a", "#dfc27d", "#f5f5f5", "#80cdc1", "#018571"],
+        6: ["#8c510a", "#d8b365", "#f6e8c3", "#c7eae5", "#5ab4ac", "#01665e"],
+        7: ["#8c510a", "#d8b365", "#f6e8c3", "#f5f5f5", "#c7eae5", "#5ab4ac", "#01665e"],
+        8: ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e"],
+        9: ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e"],
+        10: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"],
+        11: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"]
+    },
+    PRGn: {
+        3: ["#af8dc3", "#f7f7f7", "#7fbf7b"],
+        4: ["#7b3294", "#c2a5cf", "#a6dba0", "#008837"],
+        5: ["#7b3294", "#c2a5cf", "#f7f7f7", "#a6dba0", "#008837"],
+        6: ["#762a83", "#af8dc3", "#e7d4e8", "#d9f0d3", "#7fbf7b", "#1b7837"],
+        7: ["#762a83", "#af8dc3", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#7fbf7b", "#1b7837"],
+        8: ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"],
+        9: ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"],
+        10: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"],
+        11: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"]
+    },
+    PiYG: {
+        3: ["#e9a3c9", "#f7f7f7", "#a1d76a"],
+        4: ["#d01c8b", "#f1b6da", "#b8e186", "#4dac26"],
+        5: ["#d01c8b", "#f1b6da", "#f7f7f7", "#b8e186", "#4dac26"],
+        6: ["#c51b7d", "#e9a3c9", "#fde0ef", "#e6f5d0", "#a1d76a", "#4d9221"],
+        7: ["#c51b7d", "#e9a3c9", "#fde0ef", "#f7f7f7", "#e6f5d0", "#a1d76a", "#4d9221"],
+        8: ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"],
+        9: ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"],
+        10: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"],
+        11: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"]
+    },
+    RdBu: {
+        3: ["#ef8a62", "#f7f7f7", "#67a9cf"],
+        4: ["#ca0020", "#f4a582", "#92c5de", "#0571b0"],
+        5: ["#ca0020", "#f4a582", "#f7f7f7", "#92c5de", "#0571b0"],
+        6: ["#b2182b", "#ef8a62", "#fddbc7", "#d1e5f0", "#67a9cf", "#2166ac"],
+        7: ["#b2182b", "#ef8a62", "#fddbc7", "#f7f7f7", "#d1e5f0", "#67a9cf", "#2166ac"],
+        8: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"],
+        9: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"],
+        10: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"],
+        11: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"]
+    },
+    RdGy: {
+        3: ["#ef8a62", "#ffffff", "#999999"],
+        4: ["#ca0020", "#f4a582", "#bababa", "#404040"],
+        5: ["#ca0020", "#f4a582", "#ffffff", "#bababa", "#404040"],
+        6: ["#b2182b", "#ef8a62", "#fddbc7", "#e0e0e0", "#999999", "#4d4d4d"],
+        7: ["#b2182b", "#ef8a62", "#fddbc7", "#ffffff", "#e0e0e0", "#999999", "#4d4d4d"],
+        8: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"],
+        9: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"],
+        10: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"],
+        11: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"]
+    },
+    RdYlBu: {
+        3: ["#fc8d59", "#ffffbf", "#91bfdb"],
+        4: ["#d7191c", "#fdae61", "#abd9e9", "#2c7bb6"],
+        5: ["#d7191c", "#fdae61", "#ffffbf", "#abd9e9", "#2c7bb6"],
+        6: ["#d73027", "#fc8d59", "#fee090", "#e0f3f8", "#91bfdb", "#4575b4"],
+        7: ["#d73027", "#fc8d59", "#fee090", "#ffffbf", "#e0f3f8", "#91bfdb", "#4575b4"],
+        8: ["#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"],
+        9: ["#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"],
+        10: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"],
+        11: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"]
+    },
+    Spectral: {
+        3: ["#fc8d59", "#ffffbf", "#99d594"],
+        4: ["#d7191c", "#fdae61", "#abdda4", "#2b83ba"],
+        5: ["#d7191c", "#fdae61", "#ffffbf", "#abdda4", "#2b83ba"],
+        6: ["#d53e4f", "#fc8d59", "#fee08b", "#e6f598", "#99d594", "#3288bd"],
+        7: ["#d53e4f", "#fc8d59", "#fee08b", "#ffffbf", "#e6f598", "#99d594", "#3288bd"],
+        8: ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"],
+        9: ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"],
+        10: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"],
+        11: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"]
+    },
+    RdYlGn: {
+        3: ["#fc8d59", "#ffffbf", "#91cf60"],
+        4: ["#d7191c", "#fdae61", "#a6d96a", "#1a9641"],
+        5: ["#d7191c", "#fdae61", "#ffffbf", "#a6d96a", "#1a9641"],
+        6: ["#d73027", "#fc8d59", "#fee08b", "#d9ef8b", "#91cf60", "#1a9850"],
+        7: ["#d73027", "#fc8d59", "#fee08b", "#ffffbf", "#d9ef8b", "#91cf60", "#1a9850"],
+        8: ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"],
+        9: ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"],
+        10: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"],
+        11: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"]
+    },
+    Accent: {
+        3: ["#7fc97f", "#beaed4", "#fdc086"],
+        4: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99"],
+        5: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0"],
+        6: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f"],
+        7: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17"],
+        8: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17", "#666666"]
+    },
+    Dark2: {
+        3: ["#1b9e77", "#d95f02", "#7570b3"],
+        4: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a"],
+        5: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e"],
+        6: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02"],
+        7: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d"],
+        8: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d", "#666666"]
+    },
+    Paired: {
+        3: ["#a6cee3", "#1f78b4", "#b2df8a"],
+        4: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c"],
+        5: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99"],
+        6: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c"],
+        7: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f"],
+        8: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00"],
+        9: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6"],
+        10: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a"],
+        11: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99"],
+        12: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99", "#b15928"]
+    },
+    Pastel1: {
+        3: ["#fbb4ae", "#b3cde3", "#ccebc5"],
+        4: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4"],
+        5: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6"],
+        6: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc"],
+        7: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd"],
+        8: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec"],
+        9: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec", "#f2f2f2"]
+    },
+    Pastel2: {
+        3: ["#b3e2cd", "#fdcdac", "#cbd5e8"],
+        4: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4"],
+        5: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9"],
+        6: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae"],
+        7: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc"],
+        8: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc", "#cccccc"]
+    },
+    Set1: {
+        3: ["#e41a1c", "#377eb8", "#4daf4a"],
+        4: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3"],
+        5: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00"],
+        6: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33"],
+        7: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628"],
+        8: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf"],
+        9: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf", "#999999"]
+    },
+    Set2: {
+        3: ["#66c2a5", "#fc8d62", "#8da0cb"],
+        4: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3"],
+        5: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854"],
+        6: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f"],
+        7: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494"],
+        8: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"]
+    },
+    Set3: {
+        3: ["#8dd3c7", "#ffffb3", "#bebada"],
+        4: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072"],
+        5: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3"],
+        6: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462"],
+        7: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69"],
+        8: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5"],
+        9: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9"],
+        10: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd"],
+        11: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5"],
+        12: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"]
+    }
+}, _createClass = function () {
+    function f(f, e) {
+        for (var d = 0; d < e.length; d++) {
+            var c = e[d];
+            c.enumerable = c.enumerable || !1, c.configurable = !0, "value"in c && (c.writable = !0), Object.defineProperty(f, c.key, c)
+        }
+    }
+
+    return function (e, d, c) {
+        return d && f(e.prototype, d), c && f(e, c), e
+    }
+}(), Geomap = function () {
+    function f() {
+        _classCallCheck(this, f), this.properties = {
+            geofile: null,
+            height: null,
+            postUpdate: null,
+            projection: d3.geo.naturalEarth,
+            rotate: [0, 0, 0],
+            scale: null,
+            translate: null,
+            unitId: "iso3",
+            unitPrefix: "unit-",
+            units: "units",
+            unitTitle: function (f) {
+                return f.properties.name
+            },
+            width: null,
+            zoomFactor: 4
+        };
+        for (var e in this.properties)addAccessor(this, e, this.properties[e]);
+        this._ = {}
+    }
+
+    return _createClass(f, [{
+        key: "clicked", value: function (f) {
+            var e = this, d = 1, c = this.properties.width / 2, a = this.properties.height / 2, b = c, t = a;
+            if (f && f.hasOwnProperty("geometry") && this._.centered !== f) {
+                var r = this.path.centroid(f);
+                b = r[0], t = r[1], d = this.properties.zoomFactor, this._.centered = f
+            } else this._.centered = null;
+            this.svg.selectAll("path.unit").classed("active", this._.centered && function (f) {
+                    return f === e._.centered
+                }), this.svg.selectAll("g.zoom").transition().duration(750).attr("transform", "translate(" + c + ", " + a + ")scale(" + d + ")translate(-" + b + ", -" + t + ")")
+        }
+    }, {
+        key: "draw", value: function (f, e) {
+            e.properties.width || (e.properties.width = f.node().getBoundingClientRect().width), e.properties.height || (e.properties.height = e.properties.width / 1.92), e.properties.scale || (e.properties.scale = e.properties.width / 5.8), e.properties.translate || (e.properties.translate = [e.properties.width / 2, e.properties.height / 2]), e.svg = f.append("svg").attr("width", e.properties.width).attr("height", e.properties.height), e.svg.append("rect").attr("class", "background").attr("width", e.properties.width).attr("height", e.properties.height).on("click", e.clicked.bind(e));
+            var d = e.properties.projection().scale(e.properties.scale).translate(e.properties.translate).precision(.1);
+            d.hasOwnProperty("rotate") && e.properties.rotate && d.rotate(e.properties.rotate), e.path = d3.geo.path().projection(d), d3.json(e.properties.geofile, function (f, d) {
+                e.geo = d, e.svg.append("g").attr("class", "units zoom").selectAll("path").data(topojson.feature(d, d.objects[e.properties.units]).features).enter().append("path").attr("class", function (f) {
+                    return "unit " + e.properties.unitPrefix + f.id
+                }).attr("d", e.path).on("click", e.clicked.bind(e)).append("title").text(e.properties.unitTitle), e.update()
+            })
+        }
+    }, {
+        key: "update", value: function () {
+            this.properties.postUpdate && this.properties.postUpdate()
+        }
+    }]), f
+}();
+d3.geomap = function () {
+    return new Geomap
+};
+var _createClass = function () {
+    function f(f, e) {
+        for (var d = 0; d < e.length; d++) {
+            var c = e[d];
+            c.enumerable = c.enumerable || !1, c.configurable = !0, "value"in c && (c.writable = !0), Object.defineProperty(f, c.key, c)
+        }
+    }
+
+    return function (e, d, c) {
+        return d && f(e.prototype, d), c && f(e, c), e
+    }
+}(), _get = function (f, e, d) {
+    for (var c = !0; c;) {
+        var a = f, b = e, t = d;
+        r = i = n = void 0, c = !1;
+        var r = Object.getOwnPropertyDescriptor(a, b);
+        if (void 0 !== r) {
+            if ("value"in r)return r.value;
+            var n = r.get;
+            return void 0 === n ? void 0 : n.call(t)
+        }
+        var i = Object.getPrototypeOf(a);
+        if (null === i)return void 0;
+        f = i, e = b, d = t, c = !0
+    }
+}, Choropleth = function (f) {
+    function e() {
+        _classCallCheck(this, e), _get(Object.getPrototypeOf(e.prototype), "constructor", this).call(this);
+        var f = {
+            colors: colorbrewer.OrRd[9],
+            column: null,
+            domain: null,
+            duration: null,
+            format: d3.format(",.02f"),
+            legend: !1,
+            valueScale: d3.scale.quantize
+        };
+        for (var d in f)this.properties[d] = f[d], addAccessor(this, d, f[d])
+    }
+
+    return _inherits(e, f), _createClass(e, [{
+        key: "columnVal", value: function (f) {
+            return +f[this.properties.column]
+        }
+    }, {
+        key: "draw", value: function (f, d) {
+            d.data = f.datum(), _get(Object.getPrototypeOf(e.prototype), "draw", this).call(this, f, d)
+        }
+    }, {
+        key: "update", value: function () {
+            var f = this;
+            f.extent = d3.extent(f.data, f.columnVal.bind(f)), f.colorScale = f.properties.valueScale().domain(f.properties.domain || f.extent).range(f.properties.colors), f.svg.selectAll("path.unit").style("fill", null), f.data.forEach(function (e) {
+                var d = e[f.properties.unitId], c = e[f.properties.column], a = f.colorScale(c), b = f.svg.selectAll("." + f.properties.unitPrefix + d);
+                if (!b.empty()) {
+                    f.properties.duration ? b.transition().duration(f.properties.duration).style("fill", a) : b.style("fill", a);
+                    var t = f.properties.unitTitle(b.datum());
+                    c = f.properties.format(c), b.select("title").text("" + t + "\n\n" + f.properties.column + ": " + c)
+                }
+            }), f.properties.legend && f.drawLegend(f.properties.legend), _get(Object.getPrototypeOf(e.prototype), "update", this).call(this)
+        }
+    }, {
+        key: "drawLegend", value: function () {
+            var f = void 0 === arguments[0] ? null : arguments[0], e = this, d = e.properties.colors.length, c = void 0, a = void 0, b = 10, t = 3;
+            f === !0 ? (c = e.properties.width / b, a = e.properties.height / t) : (c = f.width, a = f.height);
+            var r = c / (.75 * b), n = a - a / (1.8 * t), i = r / 2, o = e.properties.height - a, s = "translate(" + i + "," + 3 * i + ")";
+            e.svg.select("g.legend").remove();
+            var p = e.properties.colors.slice().reverse(), l = n / d, u = t / l, h = e.svg.append("g").attr("class", "legend").attr("width", c).attr("height", a).attr("transform", "translate(0," + o + ")");
+            h.append("rect").style("fill", "#fff").attr("class", "legend-bg").attr("width", c).attr("height", a), h.append("rect").attr("class", "legend-bar").attr("width", r).attr("height", n).attr("transform", s);
+            var g = h.append("g").attr("transform", s);
+            g.selectAll("rect").data(p).enter().append("rect").attr("y", function (f, e) {
+                return e * l
+            }).attr("fill", function (f, e) {
+                return p[e]
+            }).attr("width", r).attr("height", l);
+            var v = e.extent[0], m = e.extent[1], y = !1, w = !1;
+            e.properties.domain && (e.properties.domain[1] < m && (w = !0), m = e.properties.domain[1], e.properties.domain[0] > v && (y = !0), v = e.properties.domain[0]), g.selectAll("text").data(p).enter().append("text").text(function (f, c) {
+                if (c === d - 1) {
+                    var a = e.properties.format(v);
+                    return y && (a = "< " + a), a
+                }
+                return e.properties.format(e.colorScale.invertExtent(f)[0])
+            }).attr("class", function (f, e) {
+                return "text-" + e
+            }).attr("x", r + i).attr("y", function (f, e) {
+                return e * l + (l + l * u)
+            }), g.append("text").text(function () {
+                var f = e.properties.format(m);
+                return w && (f = "> " + f), f
+            }).attr("x", r + i).attr("y", i * u * 2)
+        }
+    }]), e
+}(Geomap);
+d3.geomap.choropleth = function () {
+    return new Choropleth
+};
\ No newline at end of file


[33/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.min.js
new file mode 100644
index 0000000..0444ec4
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/d3.min.js
@@ -0,0 +1,6332 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+!function () {
+    function n(n, t) {
+        return t > n ? -1 : n > t ? 1 : n >= t ? 0 : 0 / 0
+    }
+
+    function t(n) {
+        return null === n ? 0 / 0 : +n
+    }
+
+    function e(n) {
+        return !isNaN(n)
+    }
+
+    function r(n) {
+        return {
+            left: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) < 0 ? r = i + 1 : u = i
+                }
+                return r
+            }, right: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) > 0 ? u = i : r = i + 1
+                }
+                return r
+            }
+        }
+    }
+
+    function u(n) {
+        return n.length
+    }
+
+    function i(n) {
+        for (var t = 1; n * t % 1;)t *= 10;
+        return t
+    }
+
+    function o(n, t) {
+        for (var e in t)Object.defineProperty(n.prototype, e, {value: t[e], enumerable: !1})
+    }
+
+    function a() {
+        this._ = Object.create(null)
+    }
+
+    function c(n) {
+        return (n += "") === da || n[0] === ma ? ma + n : n
+    }
+
+    function l(n) {
+        return (n += "")[0] === ma ? n.slice(1) : n
+    }
+
+    function s(n) {
+        return c(n)in this._
+    }
+
+    function f(n) {
+        return (n = c(n))in this._ && delete this._[n]
+    }
+
+    function h() {
+        var n = [];
+        for (var t in this._)n.push(l(t));
+        return n
+    }
+
+    function g() {
+        var n = 0;
+        for (var t in this._)++n;
+        return n
+    }
+
+    function p() {
+        for (var n in this._)return !1;
+        return !0
+    }
+
+    function v() {
+        this._ = Object.create(null)
+    }
+
+    function d(n, t, e) {
+        return function () {
+            var r = e.apply(t, arguments);
+            return r === t ? n : r
+        }
+    }
+
+    function m(n, t) {
+        if (t in n)return t;
+        t = t.charAt(0).toUpperCase() + t.slice(1);
+        for (var e = 0, r = ya.length; r > e; ++e) {
+            var u = ya[e] + t;
+            if (u in n)return u
+        }
+    }
+
+    function y() {
+    }
+
+    function M() {
+    }
+
+    function x(n) {
+        function t() {
+            for (var t, r = e, u = -1, i = r.length; ++u < i;)(t = r[u].on) && t.apply(this, arguments);
+            return n
+        }
+
+        var e = [], r = new a;
+        return t.on = function (t, u) {
+            var i, o = r.get(t);
+            return arguments.length < 2 ? o && o.on : (o && (o.on = null, e = e.slice(0, i = e.indexOf(o)).concat(e.slice(i + 1)), r.remove(t)), u && e.push(r.set(t, {on: u})), n)
+        }, t
+    }
+
+    function b() {
+        ta.event.preventDefault()
+    }
+
+    function _() {
+        for (var n, t = ta.event; n = t.sourceEvent;)t = n;
+        return t
+    }
+
+    function w(n) {
+        for (var t = new M, e = 0, r = arguments.length; ++e < r;)t[arguments[e]] = x(t);
+        return t.of = function (e, r) {
+            return function (u) {
+                try {
+                    var i = u.sourceEvent = ta.event;
+                    u.target = n, ta.event = u, t[u.type].apply(e, r)
+                } finally {
+                    ta.event = i
+                }
+            }
+        }, t
+    }
+
+    function S(n) {
+        return xa(n, ka), n
+    }
+
+    function k(n) {
+        return "function" == typeof n ? n : function () {
+            return ba(n, this)
+        }
+    }
+
+    function E(n) {
+        return "function" == typeof n ? n : function () {
+            return _a(n, this)
+        }
+    }
+
+    function A(n, t) {
+        function e() {
+            this.removeAttribute(n)
+        }
+
+        function r() {
+            this.removeAttributeNS(n.space, n.local)
+        }
+
+        function u() {
+            this.setAttribute(n, t)
+        }
+
+        function i() {
+            this.setAttributeNS(n.space, n.local, t)
+        }
+
+        function o() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttribute(n) : this.setAttribute(n, e)
+        }
+
+        function a() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttributeNS(n.space, n.local) : this.setAttributeNS(n.space, n.local, e)
+        }
+
+        return n = ta.ns.qualify(n), null == t ? n.local ? r : e : "function" == typeof t ? n.local ? a : o : n.local ? i : u
+    }
+
+    function N(n) {
+        return n.trim().replace(/\s+/g, " ")
+    }
+
+    function C(n) {
+        return new RegExp("(?:^|\\s+)" + ta.requote(n) + "(?:\\s+|$)", "g")
+    }
+
+    function z(n) {
+        return (n + "").trim().split(/^|\s+/)
+    }
+
+    function q(n, t) {
+        function e() {
+            for (var e = -1; ++e < u;)n[e](this, t)
+        }
+
+        function r() {
+            for (var e = -1, r = t.apply(this, arguments); ++e < u;)n[e](this, r)
+        }
+
+        n = z(n).map(L);
+        var u = n.length;
+        return "function" == typeof t ? r : e
+    }
+
+    function L(n) {
+        var t = C(n);
+        return function (e, r) {
+            if (u = e.classList)return r ? u.add(n) : u.remove(n);
+            var u = e.getAttribute("class") || "";
+            r ? (t.lastIndex = 0, t.test(u) || e.setAttribute("class", N(u + " " + n))) : e.setAttribute("class", N(u.replace(t, " ")))
+        }
+    }
+
+    function T(n, t, e) {
+        function r() {
+            this.style.removeProperty(n)
+        }
+
+        function u() {
+            this.style.setProperty(n, t, e)
+        }
+
+        function i() {
+            var r = t.apply(this, arguments);
+            null == r ? this.style.removeProperty(n) : this.style.setProperty(n, r, e)
+        }
+
+        return null == t ? r : "function" == typeof t ? i : u
+    }
+
+    function R(n, t) {
+        function e() {
+            delete this[n]
+        }
+
+        function r() {
+            this[n] = t
+        }
+
+        function u() {
+            var e = t.apply(this, arguments);
+            null == e ? delete this[n] : this[n] = e
+        }
+
+        return null == t ? e : "function" == typeof t ? u : r
+    }
+
+    function D(n) {
+        return "function" == typeof n ? n : (n = ta.ns.qualify(n)).local ? function () {
+            return this.ownerDocument.createElementNS(n.space, n.local)
+        } : function () {
+            return this.ownerDocument.createElementNS(this.namespaceURI, n)
+        }
+    }
+
+    function P() {
+        var n = this.parentNode;
+        n && n.removeChild(this)
+    }
+
+    function U(n) {
+        return {__data__: n}
+    }
+
+    function j(n) {
+        return function () {
+            return Sa(this, n)
+        }
+    }
+
+    function F(t) {
+        return arguments.length || (t = n), function (n, e) {
+            return n && e ? t(n.__data__, e.__data__) : !n - !e
+        }
+    }
+
+    function H(n, t) {
+        for (var e = 0, r = n.length; r > e; e++)for (var u, i = n[e], o = 0, a = i.length; a > o; o++)(u = i[o]) && t(u, o, e);
+        return n
+    }
+
+    function O(n) {
+        return xa(n, Aa), n
+    }
+
+    function Y(n) {
+        var t, e;
+        return function (r, u, i) {
+            var o, a = n[i].update, c = a.length;
+            for (i != e && (e = i, t = 0), u >= t && (t = u + 1); !(o = a[t]) && ++t < c;);
+            return o
+        }
+    }
+
+    function I(n, t, e) {
+        function r() {
+            var t = this[o];
+            t && (this.removeEventListener(n, t, t.$), delete this[o])
+        }
+
+        function u() {
+            var u = c(t, ra(arguments));
+            r.call(this), this.addEventListener(n, this[o] = u, u.$ = e), u._ = t
+        }
+
+        function i() {
+            var t, e = new RegExp("^__on([^.]+)" + ta.requote(n) + "$");
+            for (var r in this)if (t = r.match(e)) {
+                var u = this[r];
+                this.removeEventListener(t[1], u, u.$), delete this[r]
+            }
+        }
+
+        var o = "__on" + n, a = n.indexOf("."), c = Z;
+        a > 0 && (n = n.slice(0, a));
+        var l = Ca.get(n);
+        return l && (n = l, c = V), a ? t ? u : r : t ? y : i
+    }
+
+    function Z(n, t) {
+        return function (e) {
+            var r = ta.event;
+            ta.event = e, t[0] = this.__data__;
+            try {
+                n.apply(this, t)
+            } finally {
+                ta.event = r
+            }
+        }
+    }
+
+    function V(n, t) {
+        var e = Z(n, t);
+        return function (n) {
+            var t = this, r = n.relatedTarget;
+            r && (r === t || 8 & r.compareDocumentPosition(t)) || e.call(t, n)
+        }
+    }
+
+    function X() {
+        var n = ".dragsuppress-" + ++qa, t = "click" + n, e = ta.select(oa).on("touchmove" + n, b).on("dragstart" + n, b).on("selectstart" + n, b);
+        if (za) {
+            var r = ia.style, u = r[za];
+            r[za] = "none"
+        }
+        return function (i) {
+            if (e.on(n, null), za && (r[za] = u), i) {
+                var o = function () {
+                    e.on(t, null)
+                };
+                e.on(t, function () {
+                    b(), o()
+                }, !0), setTimeout(o, 0)
+            }
+        }
+    }
+
+    function $(n, t) {
+        t.changedTouches && (t = t.changedTouches[0]);
+        var e = n.ownerSVGElement || n;
+        if (e.createSVGPoint) {
+            var r = e.createSVGPoint();
+            if (0 > La && (oa.scrollX || oa.scrollY)) {
+                e = ta.select("body").append("svg").style({
+                    position: "absolute",
+                    top: 0,
+                    left: 0,
+                    margin: 0,
+                    padding: 0,
+                    border: "none"
+                }, "important");
+                var u = e[0][0].getScreenCTM();
+                La = !(u.f || u.e), e.remove()
+            }
+            return La ? (r.x = t.pageX, r.y = t.pageY) : (r.x = t.clientX, r.y = t.clientY), r = r.matrixTransform(n.getScreenCTM().inverse()), [r.x, r.y]
+        }
+        var i = n.getBoundingClientRect();
+        return [t.clientX - i.left - n.clientLeft, t.clientY - i.top - n.clientTop]
+    }
+
+    function B() {
+        return ta.event.changedTouches[0].identifier
+    }
+
+    function W() {
+        return ta.event.target
+    }
+
+    function J() {
+        return oa
+    }
+
+    function G(n) {
+        return n > 0 ? 1 : 0 > n ? -1 : 0
+    }
+
+    function K(n, t, e) {
+        return (t[0] - n[0]) * (e[1] - n[1]) - (t[1] - n[1]) * (e[0] - n[0])
+    }
+
+    function Q(n) {
+        return n > 1 ? 0 : -1 > n ? Da : Math.acos(n)
+    }
+
+    function nt(n) {
+        return n > 1 ? ja : -1 > n ? -ja : Math.asin(n)
+    }
+
+    function tt(n) {
+        return ((n = Math.exp(n)) - 1 / n) / 2
+    }
+
+    function et(n) {
+        return ((n = Math.exp(n)) + 1 / n) / 2
+    }
+
+    function rt(n) {
+        return ((n = Math.exp(2 * n)) - 1) / (n + 1)
+    }
+
+    function ut(n) {
+        return (n = Math.sin(n / 2)) * n
+    }
+
+    function it() {
+    }
+
+    function ot(n, t, e) {
+        return this instanceof ot ? (this.h = +n, this.s = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof ot ? new ot(n.h, n.s, n.l) : xt("" + n, bt, ot) : new ot(n, t, e)
+    }
+
+    function at(n, t, e) {
+        function r(n) {
+            return n > 360 ? n -= 360 : 0 > n && (n += 360), 60 > n ? i + (o - i) * n / 60 : 180 > n ? o : 240 > n ? i + (o - i) * (240 - n) / 60 : i
+        }
+
+        function u(n) {
+            return Math.round(255 * r(n))
+        }
+
+        var i, o;
+        return n = isNaN(n) ? 0 : (n %= 360) < 0 ? n + 360 : n, t = isNaN(t) ? 0 : 0 > t ? 0 : t > 1 ? 1 : t, e = 0 > e ? 0 : e > 1 ? 1 : e, o = .5 >= e ? e * (1 + t) : e + t - e * t, i = 2 * e - o, new dt(u(n + 120), u(n), u(n - 120))
+    }
+
+    function ct(n, t, e) {
+        return this instanceof ct ? (this.h = +n, this.c = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof ct ? new ct(n.h, n.c, n.l) : n instanceof st ? ht(n.l, n.a, n.b) : ht((n = _t((n = ta.rgb(n)).r, n.g, n.b)).l, n.a, n.b) : new ct(n, t, e)
+    }
+
+    function lt(n, t, e) {
+        return isNaN(n) && (n = 0), isNaN(t) && (t = 0), new st(e, Math.cos(n *= Fa) * t, Math.sin(n) * t)
+    }
+
+    function st(n, t, e) {
+        return this instanceof st ? (this.l = +n, this.a = +t, void(this.b = +e)) : arguments.length < 2 ? n instanceof st ? new st(n.l, n.a, n.b) : n instanceof ct ? lt(n.h, n.c, n.l) : _t((n = dt(n)).r, n.g, n.b) : new st(n, t, e)
+    }
+
+    function ft(n, t, e) {
+        var r = (n + 16) / 116, u = r + t / 500, i = r - e / 200;
+        return u = gt(u) * Ja, r = gt(r) * Ga, i = gt(i) * Ka, new dt(vt(3.2404542 * u - 1.5371385 * r - .4985314 * i), vt(-.969266 * u + 1.8760108 * r + .041556 * i), vt(.0556434 * u - .2040259 * r + 1.0572252 * i))
+    }
+
+    function ht(n, t, e) {
+        return n > 0 ? new ct(Math.atan2(e, t) * Ha, Math.sqrt(t * t + e * e), n) : new ct(0 / 0, 0 / 0, n)
+    }
+
+    function gt(n) {
+        return n > .206893034 ? n * n * n : (n - 4 / 29) / 7.787037
+    }
+
+    function pt(n) {
+        return n > .008856 ? Math.pow(n, 1 / 3) : 7.787037 * n + 4 / 29
+    }
+
+    function vt(n) {
+        return Math.round(255 * (.00304 >= n ? 12.92 * n : 1.055 * Math.pow(n, 1 / 2.4) - .055))
+    }
+
+    function dt(n, t, e) {
+        return this instanceof dt ? (this.r = ~~n, this.g = ~~t, void(this.b = ~~e)) : arguments.length < 2 ? n instanceof dt ? new dt(n.r, n.g, n.b) : xt("" + n, dt, at) : new dt(n, t, e)
+    }
+
+    function mt(n) {
+        return new dt(n >> 16, 255 & n >> 8, 255 & n)
+    }
+
+    function yt(n) {
+        return mt(n) + ""
+    }
+
+    function Mt(n) {
+        return 16 > n ? "0" + Math.max(0, n).toString(16) : Math.min(255, n).toString(16)
+    }
+
+    function xt(n, t, e) {
+        var r, u, i, o = 0, a = 0, c = 0;
+        if (r = /([a-z]+)\((.*)\)/i.exec(n))switch (u = r[2].split(","), r[1]) {
+            case"hsl":
+                return e(parseFloat(u[0]), parseFloat(u[1]) / 100, parseFloat(u[2]) / 100);
+            case"rgb":
+                return t(St(u[0]), St(u[1]), St(u[2]))
+        }
+        return (i = tc.get(n)) ? t(i.r, i.g, i.b) : (null == n || "#" !== n.charAt(0) || isNaN(i = parseInt(n.slice(1), 16)) || (4 === n.length ? (o = (3840 & i) >> 4, o = o >> 4 | o, a = 240 & i, a = a >> 4 | a, c = 15 & i, c = c << 4 | c) : 7 === n.length && (o = (16711680 & i) >> 16, a = (65280 & i) >> 8, c = 255 & i)), t(o, a, c))
+    }
+
+    function bt(n, t, e) {
+        var r, u, i = Math.min(n /= 255, t /= 255, e /= 255), o = Math.max(n, t, e), a = o - i, c = (o + i) / 2;
+        return a ? (u = .5 > c ? a / (o + i) : a / (2 - o - i), r = n == o ? (t - e) / a + (e > t ? 6 : 0) : t == o ? (e - n) / a + 2 : (n - t) / a + 4, r *= 60) : (r = 0 / 0, u = c > 0 && 1 > c ? 0 : r), new ot(r, u, c)
+    }
+
+    function _t(n, t, e) {
+        n = wt(n), t = wt(t), e = wt(e);
+        var r = pt((.4124564 * n + .3575761 * t + .1804375 * e) / Ja), u = pt((.2126729 * n + .7151522 * t + .072175 * e) / Ga), i = pt((.0193339 * n + .119192 * t + .9503041 * e) / Ka);
+        return st(116 * u - 16, 500 * (r - u), 200 * (u - i))
+    }
+
+    function wt(n) {
+        return (n /= 255) <= .04045 ? n / 12.92 : Math.pow((n + .055) / 1.055, 2.4)
+    }
+
+    function St(n) {
+        var t = parseFloat(n);
+        return "%" === n.charAt(n.length - 1) ? Math.round(2.55 * t) : t
+    }
+
+    function kt(n) {
+        return "function" == typeof n ? n : function () {
+            return n
+        }
+    }
+
+    function Et(n) {
+        return n
+    }
+
+    function At(n) {
+        return function (t, e, r) {
+            return 2 === arguments.length && "function" == typeof e && (r = e, e = null), Nt(t, e, n, r)
+        }
+    }
+
+    function Nt(n, t, e, r) {
+        function u() {
+            var n, t = c.status;
+            if (!t && zt(c) || t >= 200 && 300 > t || 304 === t) {
+                try {
+                    n = e.call(i, c)
+                } catch (r) {
+                    return o.error.call(i, r), void 0
+                }
+                o.load.call(i, n)
+            } else o.error.call(i, c)
+        }
+
+        var i = {}, o = ta.dispatch("beforesend", "progress", "load", "error"), a = {}, c = new XMLHttpRequest, l = null;
+        return !oa.XDomainRequest || "withCredentials"in c || !/^(http(s)?:)?\/\//.test(n) || (c = new XDomainRequest), "onload"in c ? c.onload = c.onerror = u : c.onreadystatechange = function () {
+            c.readyState > 3 && u()
+        }, c.onprogress = function (n) {
+            var t = ta.event;
+            ta.event = n;
+            try {
+                o.progress.call(i, c)
+            } finally {
+                ta.event = t
+            }
+        }, i.header = function (n, t) {
+            return n = (n + "").toLowerCase(), arguments.length < 2 ? a[n] : (null == t ? delete a[n] : a[n] = t + "", i)
+        }, i.mimeType = function (n) {
+            return arguments.length ? (t = null == n ? null : n + "", i) : t
+        }, i.responseType = function (n) {
+            return arguments.length ? (l = n, i) : l
+        }, i.response = function (n) {
+            return e = n, i
+        }, ["get", "post"].forEach(function (n) {
+            i[n] = function () {
+                return i.send.apply(i, [n].concat(ra(arguments)))
+            }
+        }), i.send = function (e, r, u) {
+            if (2 === arguments.length && "function" == typeof r && (u = r, r = null), c.open(e, n, !0), null == t || "accept"in a || (a.accept = t + ",*/*"), c.setRequestHeader)for (var s in a)c.setRequestHeader(s, a[s]);
+            return null != t && c.overrideMimeType && c.overrideMimeType(t), null != l && (c.responseType = l), null != u && i.on("error", u).on("load", function (n) {
+                u(null, n)
+            }), o.beforesend.call(i, c), c.send(null == r ? null : r), i
+        }, i.abort = function () {
+            return c.abort(), i
+        }, ta.rebind(i, o, "on"), null == r ? i : i.get(Ct(r))
+    }
+
+    function Ct(n) {
+        return 1 === n.length ? function (t, e) {
+            n(null == t ? e : null)
+        } : n
+    }
+
+    function zt(n) {
+        var t = n.responseType;
+        return t && "text" !== t ? n.response : n.responseText
+    }
+
+    function qt() {
+        var n = Lt(), t = Tt() - n;
+        t > 24 ? (isFinite(t) && (clearTimeout(ic), ic = setTimeout(qt, t)), uc = 0) : (uc = 1, ac(qt))
+    }
+
+    function Lt() {
+        var n = Date.now();
+        for (oc = ec; oc;)n >= oc.t && (oc.f = oc.c(n - oc.t)), oc = oc.n;
+        return n
+    }
+
+    function Tt() {
+        for (var n, t = ec, e = 1 / 0; t;)t.f ? t = n ? n.n = t.n : ec = t.n : (t.t < e && (e = t.t), t = (n = t).n);
+        return rc = n, e
+    }
+
+    function Rt(n, t) {
+        return t - (n ? Math.ceil(Math.log(n) / Math.LN10) : 1)
+    }
+
+    function Dt(n, t) {
+        var e = Math.pow(10, 3 * va(8 - t));
+        return {
+            scale: t > 8 ? function (n) {
+                return n / e
+            } : function (n) {
+                return n * e
+            }, symbol: n
+        }
+    }
+
+    function Pt(n) {
+        var t = n.decimal, e = n.thousands, r = n.grouping, u = n.currency, i = r && e ? function (n, t) {
+            for (var u = n.length, i = [], o = 0, a = r[0], c = 0; u > 0 && a > 0 && (c + a + 1 > t && (a = Math.max(1, t - c)), i.push(n.substring(u -= a, u + a)), !((c += a + 1) > t));)a = r[o = (o + 1) % r.length];
+            return i.reverse().join(e)
+        } : Et;
+        return function (n) {
+            var e = lc.exec(n), r = e[1] || " ", o = e[2] || ">", a = e[3] || "-", c = e[4] || "", l = e[5], s = +e[6], f = e[7], h = e[8], g = e[9], p = 1, v = "", d = "", m = !1, y = !0;
+            switch (h && (h = +h.substring(1)), (l || "0" === r && "=" === o) && (l = r = "0", o = "="), g) {
+                case"n":
+                    f = !0, g = "g";
+                    break;
+                case"%":
+                    p = 100, d = "%", g = "f";
+                    break;
+                case"p":
+                    p = 100, d = "%", g = "r";
+                    break;
+                case"b":
+                case"o":
+                case"x":
+                case"X":
+                    "#" === c && (v = "0" + g.toLowerCase());
+                case"c":
+                    y = !1;
+                case"d":
+                    m = !0, h = 0;
+                    break;
+                case"s":
+                    p = -1, g = "r"
+            }
+            "$" === c && (v = u[0], d = u[1]), "r" != g || h || (g = "g"), null != h && ("g" == g ? h = Math.max(1, Math.min(21, h)) : ("e" == g || "f" == g) && (h = Math.max(0, Math.min(20, h)))), g = sc.get(g) || Ut;
+            var M = l && f;
+            return function (n) {
+                var e = d;
+                if (m && n % 1)return "";
+                var u = 0 > n || 0 === n && 0 > 1 / n ? (n = -n, "-") : "-" === a ? "" : a;
+                if (0 > p) {
+                    var c = ta.formatPrefix(n, h);
+                    n = c.scale(n), e = c.symbol + d
+                } else n *= p;
+                n = g(n, h);
+                var x, b, _ = n.lastIndexOf(".");
+                if (0 > _) {
+                    var w = y ? n.lastIndexOf("e") : -1;
+                    0 > w ? (x = n, b = "") : (x = n.substring(0, w), b = n.substring(w))
+                } else x = n.substring(0, _), b = t + n.substring(_ + 1);
+                !l && f && (x = i(x, 1 / 0));
+                var S = v.length + x.length + b.length + (M ? 0 : u.length), k = s > S ? new Array(S = s - S + 1).join(r) : "";
+                return M && (x = i(k + x, k.length ? s - b.length : 1 / 0)), u += v, n = x + b, ("<" === o ? u + n + k : ">" === o ? k + u + n : "^" === o ? k.substring(0, S >>= 1) + u + n + k.substring(S) : u + (M ? n : k + n)) + e
+            }
+        }
+    }
+
+    function Ut(n) {
+        return n + ""
+    }
+
+    function jt() {
+        this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0])
+    }
+
+    function Ft(n, t, e) {
+        function r(t) {
+            var e = n(t), r = i(e, 1);
+            return r - t > t - e ? e : r
+        }
+
+        function u(e) {
+            return t(e = n(new hc(e - 1)), 1), e
+        }
+
+        function i(n, e) {
+            return t(n = new hc(+n), e), n
+        }
+
+        function o(n, r, i) {
+            var o = u(n), a = [];
+            if (i > 1)for (; r > o;)e(o) % i || a.push(new Date(+o)), t(o, 1); else for (; r > o;)a.push(new Date(+o)), t(o, 1);
+            return a
+        }
+
+        function a(n, t, e) {
+            try {
+                hc = jt;
+                var r = new jt;
+                return r._ = n, o(r, t, e)
+            } finally {
+                hc = Date
+            }
+        }
+
+        n.floor = n, n.round = r, n.ceil = u, n.offset = i, n.range = o;
+        var c = n.utc = Ht(n);
+        return c.floor = c, c.round = Ht(r), c.ceil = Ht(u), c.offset = Ht(i), c.range = a, n
+    }
+
+    function Ht(n) {
+        return function (t, e) {
+            try {
+                hc = jt;
+                var r = new jt;
+                return r._ = t, n(r, e)._
+            } finally {
+                hc = Date
+            }
+        }
+    }
+
+    function Ot(n) {
+        function t(n) {
+            function t(t) {
+                for (var e, u, i, o = [], a = -1, c = 0; ++a < r;)37 === n.charCodeAt(a) && (o.push(n.slice(c, a)), null != (u = pc[e = n.charAt(++a)]) && (e = n.charAt(++a)), (i = N[e]) && (e = i(t, null == u ? "e" === e ? " " : "0" : u)), o.push(e), c = a + 1);
+                return o.push(n.slice(c, a)), o.join("")
+            }
+
+            var r = n.length;
+            return t.parse = function (t) {
+                var r = {y: 1900, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0, Z: null}, u = e(r, n, t, 0);
+                if (u != t.length)return null;
+                "p"in r && (r.H = r.H % 12 + 12 * r.p);
+                var i = null != r.Z && hc !== jt, o = new (i ? jt : hc);
+                return "j"in r ? o.setFullYear(r.y, 0, r.j) : "w"in r && ("W"in r || "U"in r) ? (o.setFullYear(r.y, 0, 1), o.setFullYear(r.y, 0, "W"in r ? (r.w + 6) % 7 + 7 * r.W - (o.getDay() + 5) % 7 : r.w + 7 * r.U - (o.getDay() + 6) % 7)) : o.setFullYear(r.y, r.m, r.d), o.setHours(r.H + (0 | r.Z / 100), r.M + r.Z % 100, r.S, r.L), i ? o._ : o
+            }, t.toString = function () {
+                return n
+            }, t
+        }
+
+        function e(n, t, e, r) {
+            for (var u, i, o, a = 0, c = t.length, l = e.length; c > a;) {
+                if (r >= l)return -1;
+                if (u = t.charCodeAt(a++), 37 === u) {
+                    if (o = t.charAt(a++), i = C[o in pc ? t.charAt(a++) : o], !i || (r = i(n, e, r)) < 0)return -1
+                } else if (u != e.charCodeAt(r++))return -1
+            }
+            return r
+        }
+
+        function r(n, t, e) {
+            _.lastIndex = 0;
+            var r = _.exec(t.slice(e));
+            return r ? (n.w = w.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function u(n, t, e) {
+            x.lastIndex = 0;
+            var r = x.exec(t.slice(e));
+            return r ? (n.w = b.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function i(n, t, e) {
+            E.lastIndex = 0;
+            var r = E.exec(t.slice(e));
+            return r ? (n.m = A.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function o(n, t, e) {
+            S.lastIndex = 0;
+            var r = S.exec(t.slice(e));
+            return r ? (n.m = k.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function a(n, t, r) {
+            return e(n, N.c.toString(), t, r)
+        }
+
+        function c(n, t, r) {
+            return e(n, N.x.toString(), t, r)
+        }
+
+        function l(n, t, r) {
+            return e(n, N.X.toString(), t, r)
+        }
+
+        function s(n, t, e) {
+            var r = M.get(t.slice(e, e += 2).toLowerCase());
+            return null == r ? -1 : (n.p = r, e)
+        }
+
+        var f = n.dateTime, h = n.date, g = n.time, p = n.periods, v = n.days, d = n.shortDays, m = n.months, y = n.shortMonths;
+        t.utc = function (n) {
+            function e(n) {
+                try {
+                    hc = jt;
+                    var t = new hc;
+                    return t._ = n, r(t)
+                } finally {
+                    hc = Date
+                }
+            }
+
+            var r = t(n);
+            return e.parse = function (n) {
+                try {
+                    hc = jt;
+                    var t = r.parse(n);
+                    return t && t._
+                } finally {
+                    hc = Date
+                }
+            }, e.toString = r.toString, e
+        }, t.multi = t.utc.multi = ae;
+        var M = ta.map(), x = It(v), b = Zt(v), _ = It(d), w = Zt(d), S = It(m), k = Zt(m), E = It(y), A = Zt(y);
+        p.forEach(function (n, t) {
+            M.set(n.toLowerCase(), t)
+        });
+        var N = {
+            a: function (n) {
+                return d[n.getDay()]
+            }, A: function (n) {
+                return v[n.getDay()]
+            }, b: function (n) {
+                return y[n.getMonth()]
+            }, B: function (n) {
+                return m[n.getMonth()]
+            }, c: t(f), d: function (n, t) {
+                return Yt(n.getDate(), t, 2)
+            }, e: function (n, t) {
+                return Yt(n.getDate(), t, 2)
+            }, H: function (n, t) {
+                return Yt(n.getHours(), t, 2)
+            }, I: function (n, t) {
+                return Yt(n.getHours() % 12 || 12, t, 2)
+            }, j: function (n, t) {
+                return Yt(1 + fc.dayOfYear(n), t, 3)
+            }, L: function (n, t) {
+                return Yt(n.getMilliseconds(), t, 3)
+            }, m: function (n, t) {
+                return Yt(n.getMonth() + 1, t, 2)
+            }, M: function (n, t) {
+                return Yt(n.getMinutes(), t, 2)
+            }, p: function (n) {
+                return p[+(n.getHours() >= 12)]
+            }, S: function (n, t) {
+                return Yt(n.getSeconds(), t, 2)
+            }, U: function (n, t) {
+                return Yt(fc.sundayOfYear(n), t, 2)
+            }, w: function (n) {
+                return n.getDay()
+            }, W: function (n, t) {
+                return Yt(fc.mondayOfYear(n), t, 2)
+            }, x: t(h), X: t(g), y: function (n, t) {
+                return Yt(n.getFullYear() % 100, t, 2)
+            }, Y: function (n, t) {
+                return Yt(n.getFullYear() % 1e4, t, 4)
+            }, Z: ie, "%": function () {
+                return "%"
+            }
+        }, C = {
+            a: r,
+            A: u,
+            b: i,
+            B: o,
+            c: a,
+            d: Qt,
+            e: Qt,
+            H: te,
+            I: te,
+            j: ne,
+            L: ue,
+            m: Kt,
+            M: ee,
+            p: s,
+            S: re,
+            U: Xt,
+            w: Vt,
+            W: $t,
+            x: c,
+            X: l,
+            y: Wt,
+            Y: Bt,
+            Z: Jt,
+            "%": oe
+        };
+        return t
+    }
+
+    function Yt(n, t, e) {
+        var r = 0 > n ? "-" : "", u = (r ? -n : n) + "", i = u.length;
+        return r + (e > i ? new Array(e - i + 1).join(t) + u : u)
+    }
+
+    function It(n) {
+        return new RegExp("^(?:" + n.map(ta.requote).join("|") + ")", "i")
+    }
+
+    function Zt(n) {
+        for (var t = new a, e = -1, r = n.length; ++e < r;)t.set(n[e].toLowerCase(), e);
+        return t
+    }
+
+    function Vt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 1));
+        return r ? (n.w = +r[0], e + r[0].length) : -1
+    }
+
+    function Xt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e));
+        return r ? (n.U = +r[0], e + r[0].length) : -1
+    }
+
+    function $t(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e));
+        return r ? (n.W = +r[0], e + r[0].length) : -1
+    }
+
+    function Bt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 4));
+        return r ? (n.y = +r[0], e + r[0].length) : -1
+    }
+
+    function Wt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.y = Gt(+r[0]), e + r[0].length) : -1
+    }
+
+    function Jt(n, t, e) {
+        return /^[+-]\d{4}$/.test(t = t.slice(e, e + 5)) ? (n.Z = -t, e + 5) : -1
+    }
+
+    function Gt(n) {
+        return n + (n > 68 ? 1900 : 2e3)
+    }
+
+    function Kt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.m = r[0] - 1, e + r[0].length) : -1
+    }
+
+    function Qt(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.d = +r[0], e + r[0].length) : -1
+    }
+
+    function ne(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 3));
+        return r ? (n.j = +r[0], e + r[0].length) : -1
+    }
+
+    function te(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.H = +r[0], e + r[0].length) : -1
+    }
+
+    function ee(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.M = +r[0], e + r[0].length) : -1
+    }
+
+    function re(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 2));
+        return r ? (n.S = +r[0], e + r[0].length) : -1
+    }
+
+    function ue(n, t, e) {
+        vc.lastIndex = 0;
+        var r = vc.exec(t.slice(e, e + 3));
+        return r ? (n.L = +r[0], e + r[0].length) : -1
+    }
+
+    function ie(n) {
+        var t = n.getTimezoneOffset(), e = t > 0 ? "-" : "+", r = 0 | va(t) / 60, u = va(t) % 60;
+        return e + Yt(r, "0", 2) + Yt(u, "0", 2)
+    }
+
+    function oe(n, t, e) {
+        dc.lastIndex = 0;
+        var r = dc.exec(t.slice(e, e + 1));
+        return r ? e + r[0].length : -1
+    }
+
+    function ae(n) {
+        for (var t = n.length, e = -1; ++e < t;)n[e][0] = this(n[e][0]);
+        return function (t) {
+            for (var e = 0, r = n[e]; !r[1](t);)r = n[++e];
+            return r[0](t)
+        }
+    }
+
+    function ce() {
+    }
+
+    function le(n, t, e) {
+        var r = e.s = n + t, u = r - n, i = r - u;
+        e.t = n - i + (t - u)
+    }
+
+    function se(n, t) {
+        n && xc.hasOwnProperty(n.type) && xc[n.type](n, t)
+    }
+
+    function fe(n, t, e) {
+        var r, u = -1, i = n.length - e;
+        for (t.lineStart(); ++u < i;)r = n[u], t.point(r[0], r[1], r[2]);
+        t.lineEnd()
+    }
+
+    function he(n, t) {
+        var e = -1, r = n.length;
+        for (t.polygonStart(); ++e < r;)fe(n[e], t, 1);
+        t.polygonEnd()
+    }
+
+    function ge() {
+        function n(n, t) {
+            n *= Fa, t = t * Fa / 2 + Da / 4;
+            var e = n - r, o = e >= 0 ? 1 : -1, a = o * e, c = Math.cos(t), l = Math.sin(t), s = i * l, f = u * c + s * Math.cos(a), h = s * o * Math.sin(a);
+            _c.add(Math.atan2(h, f)), r = n, u = c, i = l
+        }
+
+        var t, e, r, u, i;
+        wc.point = function (o, a) {
+            wc.point = n, r = (t = o) * Fa, u = Math.cos(a = (e = a) * Fa / 2 + Da / 4), i = Math.sin(a)
+        }, wc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function pe(n) {
+        var t = n[0], e = n[1], r = Math.cos(e);
+        return [r * Math.cos(t), r * Math.sin(t), Math.sin(e)]
+    }
+
+    function ve(n, t) {
+        return n[0] * t[0] + n[1] * t[1] + n[2] * t[2]
+    }
+
+    function de(n, t) {
+        return [n[1] * t[2] - n[2] * t[1], n[2] * t[0] - n[0] * t[2], n[0] * t[1] - n[1] * t[0]]
+    }
+
+    function me(n, t) {
+        n[0] += t[0], n[1] += t[1], n[2] += t[2]
+    }
+
+    function ye(n, t) {
+        return [n[0] * t, n[1] * t, n[2] * t]
+    }
+
+    function Me(n) {
+        var t = Math.sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
+        n[0] /= t, n[1] /= t, n[2] /= t
+    }
+
+    function xe(n) {
+        return [Math.atan2(n[1], n[0]), nt(n[2])]
+    }
+
+    function be(n, t) {
+        return va(n[0] - t[0]) < Ta && va(n[1] - t[1]) < Ta
+    }
+
+    function _e(n, t) {
+        n *= Fa;
+        var e = Math.cos(t *= Fa);
+        we(e * Math.cos(n), e * Math.sin(n), Math.sin(t))
+    }
+
+    function we(n, t, e) {
+        ++Sc, Ec += (n - Ec) / Sc, Ac += (t - Ac) / Sc, Nc += (e - Nc) / Sc
+    }
+
+    function Se() {
+        function n(n, u) {
+            n *= Fa;
+            var i = Math.cos(u *= Fa), o = i * Math.cos(n), a = i * Math.sin(n), c = Math.sin(u), l = Math.atan2(Math.sqrt((l = e * c - r * a) * l + (l = r * o - t * c) * l + (l = t * a - e * o) * l), t * o + e * a + r * c);
+            kc += l, Cc += l * (t + (t = o)), zc += l * (e + (e = a)), qc += l * (r + (r = c)), we(t, e, r)
+        }
+
+        var t, e, r;
+        Dc.point = function (u, i) {
+            u *= Fa;
+            var o = Math.cos(i *= Fa);
+            t = o * Math.cos(u), e = o * Math.sin(u), r = Math.sin(i), Dc.point = n, we(t, e, r)
+        }
+    }
+
+    function ke() {
+        Dc.point = _e
+    }
+
+    function Ee() {
+        function n(n, t) {
+            n *= Fa;
+            var e = Math.cos(t *= Fa), o = e * Math.cos(n), a = e * Math.sin(n), c = Math.sin(t), l = u * c - i * a, s = i * o - r * c, f = r * a - u * o, h = Math.sqrt(l * l + s * s + f * f), g = r * o + u * a + i * c, p = h && -Q(g) / h, v = Math.atan2(h, g);
+            Lc += p * l, Tc += p * s, Rc += p * f, kc += v, Cc += v * (r + (r = o)), zc += v * (u + (u = a)), qc += v * (i + (i = c)), we(r, u, i)
+        }
+
+        var t, e, r, u, i;
+        Dc.point = function (o, a) {
+            t = o, e = a, Dc.point = n, o *= Fa;
+            var c = Math.cos(a *= Fa);
+            r = c * Math.cos(o), u = c * Math.sin(o), i = Math.sin(a), we(r, u, i)
+        }, Dc.lineEnd = function () {
+            n(t, e), Dc.lineEnd = ke, Dc.point = _e
+        }
+    }
+
+    function Ae(n, t) {
+        function e(e, r) {
+            return e = n(e, r), t(e[0], e[1])
+        }
+
+        return n.invert && t.invert && (e.invert = function (e, r) {
+            return e = t.invert(e, r), e && n.invert(e[0], e[1])
+        }), e
+    }
+
+    function Ne() {
+        return !0
+    }
+
+    function Ce(n, t, e, r, u) {
+        var i = [], o = [];
+        if (n.forEach(function (n) {
+                if (!((t = n.length - 1) <= 0)) {
+                    var t, e = n[0], r = n[t];
+                    if (be(e, r)) {
+                        u.lineStart();
+                        for (var a = 0; t > a; ++a)u.point((e = n[a])[0], e[1]);
+                        return u.lineEnd(), void 0
+                    }
+                    var c = new qe(e, n, null, !0), l = new qe(e, null, c, !1);
+                    c.o = l, i.push(c), o.push(l), c = new qe(r, n, null, !1), l = new qe(r, null, c, !0), c.o = l, i.push(c), o.push(l)
+                }
+            }), o.sort(t), ze(i), ze(o), i.length) {
+            for (var a = 0, c = e, l = o.length; l > a; ++a)o[a].e = c = !c;
+            for (var s, f, h = i[0]; ;) {
+                for (var g = h, p = !0; g.v;)if ((g = g.n) === h)return;
+                s = g.z, u.lineStart();
+                do {
+                    if (g.v = g.o.v = !0, g.e) {
+                        if (p)for (var a = 0, l = s.length; l > a; ++a)u.point((f = s[a])[0], f[1]); else r(g.x, g.n.x, 1, u);
+                        g = g.n
+                    } else {
+                        if (p) {
+                            s = g.p.z;
+                            for (var a = s.length - 1; a >= 0; --a)u.point((f = s[a])[0], f[1])
+                        } else r(g.x, g.p.x, -1, u);
+                        g = g.p
+                    }
+                    g = g.o, s = g.z, p = !p
+                } while (!g.v);
+                u.lineEnd()
+            }
+        }
+    }
+
+    function ze(n) {
+        if (t = n.length) {
+            for (var t, e, r = 0, u = n[0]; ++r < t;)u.n = e = n[r], e.p = u, u = e;
+            u.n = e = n[0], e.p = u
+        }
+    }
+
+    function qe(n, t, e, r) {
+        this.x = n, this.z = t, this.o = e, this.e = r, this.v = !1, this.n = this.p = null
+    }
+
+    function Le(n, t, e, r) {
+        return function (u, i) {
+            function o(t, e) {
+                var r = u(t, e);
+                n(t = r[0], e = r[1]) && i.point(t, e)
+            }
+
+            function a(n, t) {
+                var e = u(n, t);
+                d.point(e[0], e[1])
+            }
+
+            function c() {
+                y.point = a, d.lineStart()
+            }
+
+            function l() {
+                y.point = o, d.lineEnd()
+            }
+
+            function s(n, t) {
+                v.push([n, t]);
+                var e = u(n, t);
+                x.point(e[0], e[1])
+            }
+
+            function f() {
+                x.lineStart(), v = []
+            }
+
+            function h() {
+                s(v[0][0], v[0][1]), x.lineEnd();
+                var n, t = x.clean(), e = M.buffer(), r = e.length;
+                if (v.pop(), p.push(v), v = null, r)if (1 & t) {
+                    n = e[0];
+                    var u, r = n.length - 1, o = -1;
+                    if (r > 0) {
+                        for (b || (i.polygonStart(), b = !0), i.lineStart(); ++o < r;)i.point((u = n[o])[0], u[1]);
+                        i.lineEnd()
+                    }
+                } else r > 1 && 2 & t && e.push(e.pop().concat(e.shift())), g.push(e.filter(Te))
+            }
+
+            var g, p, v, d = t(i), m = u.invert(r[0], r[1]), y = {
+                point: o,
+                lineStart: c,
+                lineEnd: l,
+                polygonStart: function () {
+                    y.point = s, y.lineStart = f, y.lineEnd = h, g = [], p = []
+                },
+                polygonEnd: function () {
+                    y.point = o, y.lineStart = c, y.lineEnd = l, g = ta.merge(g);
+                    var n = Fe(m, p);
+                    g.length ? (b || (i.polygonStart(), b = !0), Ce(g, De, n, e, i)) : n && (b || (i.polygonStart(), b = !0), i.lineStart(), e(null, null, 1, i), i.lineEnd()), b && (i.polygonEnd(), b = !1), g = p = null
+                },
+                sphere: function () {
+                    i.polygonStart(), i.lineStart(), e(null, null, 1, i), i.lineEnd(), i.polygonEnd()
+                }
+            }, M = Re(), x = t(M), b = !1;
+            return y
+        }
+    }
+
+    function Te(n) {
+        return n.length > 1
+    }
+
+    function Re() {
+        var n, t = [];
+        return {
+            lineStart: function () {
+                t.push(n = [])
+            }, point: function (t, e) {
+                n.push([t, e])
+            }, lineEnd: y, buffer: function () {
+                var e = t;
+                return t = [], n = null, e
+            }, rejoin: function () {
+                t.length > 1 && t.push(t.pop().concat(t.shift()))
+            }
+        }
+    }
+
+    function De(n, t) {
+        return ((n = n.x)[0] < 0 ? n[1] - ja - Ta : ja - n[1]) - ((t = t.x)[0] < 0 ? t[1] - ja - Ta : ja - t[1])
+    }
+
+    function Pe(n) {
+        var t, e = 0 / 0, r = 0 / 0, u = 0 / 0;
+        return {
+            lineStart: function () {
+                n.lineStart(), t = 1
+            }, point: function (i, o) {
+                var a = i > 0 ? Da : -Da, c = va(i - e);
+                va(c - Da) < Ta ? (n.point(e, r = (r + o) / 2 > 0 ? ja : -ja), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), n.point(i, r), t = 0) : u !== a && c >= Da && (va(e - u) < Ta && (e -= u * Ta), va(i - a) < Ta && (i -= a * Ta), r = Ue(e, r, i, o), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), t = 0), n.point(e = i, r = o), u = a
+            }, lineEnd: function () {
+                n.lineEnd(), e = r = 0 / 0
+            }, clean: function () {
+                return 2 - t
+            }
+        }
+    }
+
+    function Ue(n, t, e, r) {
+        var u, i, o = Math.sin(n - e);
+        return va(o) > Ta ? Math.atan((Math.sin(t) * (i = Math.cos(r)) * Math.sin(e) - Math.sin(r) * (u = Math.cos(t)) * Math.sin(n)) / (u * i * o)) : (t + r) / 2
+    }
+
+    function je(n, t, e, r) {
+        var u;
+        if (null == n)u = e * ja, r.point(-Da, u), r.point(0, u), r.point(Da, u), r.point(Da, 0), r.point(Da, -u), r.point(0, -u), r.point(-Da, -u), r.point(-Da, 0), r.point(-Da, u); else if (va(n[0] - t[0]) > Ta) {
+            var i = n[0] < t[0] ? Da : -Da;
+            u = e * i / 2, r.point(-i, u), r.point(0, u), r.point(i, u)
+        } else r.point(t[0], t[1])
+    }
+
+    function Fe(n, t) {
+        var e = n[0], r = n[1], u = [Math.sin(e), -Math.cos(e), 0], i = 0, o = 0;
+        _c.reset();
+        for (var a = 0, c = t.length; c > a; ++a) {
+            var l = t[a], s = l.length;
+            if (s)for (var f = l[0], h = f[0], g = f[1] / 2 + Da / 4, p = Math.sin(g), v = Math.cos(g), d = 1; ;) {
+                d === s && (d = 0), n = l[d];
+                var m = n[0], y = n[1] / 2 + Da / 4, M = Math.sin(y), x = Math.cos(y), b = m - h, _ = b >= 0 ? 1 : -1, w = _ * b, S = w > Da, k = p * M;
+                if (_c.add(Math.atan2(k * _ * Math.sin(w), v * x + k * Math.cos(w))), i += S ? b + _ * Pa : b, S ^ h >= e ^ m >= e) {
+                    var E = de(pe(f), pe(n));
+                    Me(E);
+                    var A = de(u, E);
+                    Me(A);
+                    var N = (S ^ b >= 0 ? -1 : 1) * nt(A[2]);
+                    (r > N || r === N && (E[0] || E[1])) && (o += S ^ b >= 0 ? 1 : -1)
+                }
+                if (!d++)break;
+                h = m, p = M, v = x, f = n
+            }
+        }
+        return (-Ta > i || Ta > i && 0 > _c) ^ 1 & o
+    }
+
+    function He(n) {
+        function t(n, t) {
+            return Math.cos(n) * Math.cos(t) > i
+        }
+
+        function e(n) {
+            var e, i, c, l, s;
+            return {
+                lineStart: function () {
+                    l = c = !1, s = 1
+                }, point: function (f, h) {
+                    var g, p = [f, h], v = t(f, h), d = o ? v ? 0 : u(f, h) : v ? u(f + (0 > f ? Da : -Da), h) : 0;
+                    if (!e && (l = c = v) && n.lineStart(), v !== c && (g = r(e, p), (be(e, g) || be(p, g)) && (p[0] += Ta, p[1] += Ta, v = t(p[0], p[1]))), v !== c)s = 0, v ? (n.lineStart(), g = r(p, e), n.point(g[0], g[1])) : (g = r(e, p), n.point(g[0], g[1]), n.lineEnd()), e = g; else if (a && e && o ^ v) {
+                        var m;
+                        d & i || !(m = r(p, e, !0)) || (s = 0, o ? (n.lineStart(), n.point(m[0][0], m[0][1]), n.point(m[1][0], m[1][1]), n.lineEnd()) : (n.point(m[1][0], m[1][1]), n.lineEnd(), n.lineStart(), n.point(m[0][0], m[0][1])))
+                    }
+                    !v || e && be(e, p) || n.point(p[0], p[1]), e = p, c = v, i = d
+                }, lineEnd: function () {
+                    c && n.lineEnd(), e = null
+                }, clean: function () {
+                    return s | (l && c) << 1
+                }
+            }
+        }
+
+        function r(n, t, e) {
+            var r = pe(n), u = pe(t), o = [1, 0, 0], a = de(r, u), c = ve(a, a), l = a[0], s = c - l * l;
+            if (!s)return !e && n;
+            var f = i * c / s, h = -i * l / s, g = de(o, a), p = ye(o, f), v = ye(a, h);
+            me(p, v);
+            var d = g, m = ve(p, d), y = ve(d, d), M = m * m - y * (ve(p, p) - 1);
+            if (!(0 > M)) {
+                var x = Math.sqrt(M), b = ye(d, (-m - x) / y);
+                if (me(b, p), b = xe(b), !e)return b;
+                var _, w = n[0], S = t[0], k = n[1], E = t[1];
+                w > S && (_ = w, w = S, S = _);
+                var A = S - w, N = va(A - Da) < Ta, C = N || Ta > A;
+                if (!N && k > E && (_ = k, k = E, E = _), C ? N ? k + E > 0 ^ b[1] < (va(b[0] - w) < Ta ? k : E) : k <= b[1] && b[1] <= E : A > Da ^ (w <= b[0] && b[0] <= S)) {
+                    var z = ye(d, (-m + x) / y);
+                    return me(z, p), [b, xe(z)]
+                }
+            }
+        }
+
+        function u(t, e) {
+            var r = o ? n : Da - n, u = 0;
+            return -r > t ? u |= 1 : t > r && (u |= 2), -r > e ? u |= 4 : e > r && (u |= 8), u
+        }
+
+        var i = Math.cos(n), o = i > 0, a = va(i) > Ta, c = gr(n, 6 * Fa);
+        return Le(t, e, c, o ? [0, -n] : [-Da, n - Da])
+    }
+
+    function Oe(n, t, e, r) {
+        return function (u) {
+            var i, o = u.a, a = u.b, c = o.x, l = o.y, s = a.x, f = a.y, h = 0, g = 1, p = s - c, v = f - l;
+            if (i = n - c, p || !(i > 0)) {
+                if (i /= p, 0 > p) {
+                    if (h > i)return;
+                    g > i && (g = i)
+                } else if (p > 0) {
+                    if (i > g)return;
+                    i > h && (h = i)
+                }
+                if (i = e - c, p || !(0 > i)) {
+                    if (i /= p, 0 > p) {
+                        if (i > g)return;
+                        i > h && (h = i)
+                    } else if (p > 0) {
+                        if (h > i)return;
+                        g > i && (g = i)
+                    }
+                    if (i = t - l, v || !(i > 0)) {
+                        if (i /= v, 0 > v) {
+                            if (h > i)return;
+                            g > i && (g = i)
+                        } else if (v > 0) {
+                            if (i > g)return;
+                            i > h && (h = i)
+                        }
+                        if (i = r - l, v || !(0 > i)) {
+                            if (i /= v, 0 > v) {
+                                if (i > g)return;
+                                i > h && (h = i)
+                            } else if (v > 0) {
+                                if (h > i)return;
+                                g > i && (g = i)
+                            }
+                            return h > 0 && (u.a = {x: c + h * p, y: l + h * v}), 1 > g && (u.b = {
+                                x: c + g * p,
+                                y: l + g * v
+                            }), u
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    function Ye(n, t, e, r) {
+        function u(r, u) {
+            return va(r[0] - n) < Ta ? u > 0 ? 0 : 3 : va(r[0] - e) < Ta ? u > 0 ? 2 : 1 : va(r[1] - t) < Ta ? u > 0 ? 1 : 0 : u > 0 ? 3 : 2
+        }
+
+        function i(n, t) {
+            return o(n.x, t.x)
+        }
+
+        function o(n, t) {
+            var e = u(n, 1), r = u(t, 1);
+            return e !== r ? e - r : 0 === e ? t[1] - n[1] : 1 === e ? n[0] - t[0] : 2 === e ? n[1] - t[1] : t[0] - n[0]
+        }
+
+        return function (a) {
+            function c(n) {
+                for (var t = 0, e = d.length, r = n[1], u = 0; e > u; ++u)for (var i, o = 1, a = d[u], c = a.length, l = a[0]; c > o; ++o)i = a[o], l[1] <= r ? i[1] > r && K(l, i, n) > 0 && ++t : i[1] <= r && K(l, i, n) < 0 && --t, l = i;
+                return 0 !== t
+            }
+
+            function l(i, a, c, l) {
+                var s = 0, f = 0;
+                if (null == i || (s = u(i, c)) !== (f = u(a, c)) || o(i, a) < 0 ^ c > 0) {
+                    do l.point(0 === s || 3 === s ? n : e, s > 1 ? r : t); while ((s = (s + c + 4) % 4) !== f)
+                } else l.point(a[0], a[1])
+            }
+
+            function s(u, i) {
+                return u >= n && e >= u && i >= t && r >= i
+            }
+
+            function f(n, t) {
+                s(n, t) && a.point(n, t)
+            }
+
+            function h() {
+                C.point = p, d && d.push(m = []), S = !0, w = !1, b = _ = 0 / 0
+            }
+
+            function g() {
+                v && (p(y, M), x && w && A.rejoin(), v.push(A.buffer())), C.point = f, w && a.lineEnd()
+            }
+
+            function p(n, t) {
+                n = Math.max(-Uc, Math.min(Uc, n)), t = Math.max(-Uc, Math.min(Uc, t));
+                var e = s(n, t);
+                if (d && m.push([n, t]), S)y = n, M = t, x = e, S = !1, e && (a.lineStart(), a.point(n, t)); else if (e && w)a.point(n, t); else {
+                    var r = {a: {x: b, y: _}, b: {x: n, y: t}};
+                    N(r) ? (w || (a.lineStart(), a.point(r.a.x, r.a.y)), a.point(r.b.x, r.b.y), e || a.lineEnd(), k = !1) : e && (a.lineStart(), a.point(n, t), k = !1)
+                }
+                b = n, _ = t, w = e
+            }
+
+            var v, d, m, y, M, x, b, _, w, S, k, E = a, A = Re(), N = Oe(n, t, e, r), C = {
+                point: f,
+                lineStart: h,
+                lineEnd: g,
+                polygonStart: function () {
+                    a = A, v = [], d = [], k = !0
+                },
+                polygonEnd: function () {
+                    a = E, v = ta.merge(v);
+                    var t = c([n, r]), e = k && t, u = v.length;
+                    (e || u) && (a.polygonStart(), e && (a.lineStart(), l(null, null, 1, a), a.lineEnd()), u && Ce(v, i, t, l, a), a.polygonEnd()), v = d = m = null
+                }
+            };
+            return C
+        }
+    }
+
+    function Ie(n) {
+        var t = 0, e = Da / 3, r = ir(n), u = r(t, e);
+        return u.parallels = function (n) {
+            return arguments.length ? r(t = n[0] * Da / 180, e = n[1] * Da / 180) : [180 * (t / Da), 180 * (e / Da)]
+        }, u
+    }
+
+    function Ze(n, t) {
+        function e(n, t) {
+            var e = Math.sqrt(i - 2 * u * Math.sin(t)) / u;
+            return [e * Math.sin(n *= u), o - e * Math.cos(n)]
+        }
+
+        var r = Math.sin(n), u = (r + Math.sin(t)) / 2, i = 1 + r * (2 * u - r), o = Math.sqrt(i) / u;
+        return e.invert = function (n, t) {
+            var e = o - t;
+            return [Math.atan2(n, e) / u, nt((i - (n * n + e * e) * u * u) / (2 * u))]
+        }, e
+    }
+
+    function Ve() {
+        function n(n, t) {
+            Fc += u * n - r * t, r = n, u = t
+        }
+
+        var t, e, r, u;
+        Zc.point = function (i, o) {
+            Zc.point = n, t = r = i, e = u = o
+        }, Zc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Xe(n, t) {
+        Hc > n && (Hc = n), n > Yc && (Yc = n), Oc > t && (Oc = t), t > Ic && (Ic = t)
+    }
+
+    function $e() {
+        function n(n, t) {
+            o.push("M", n, ",", t, i)
+        }
+
+        function t(n, t) {
+            o.push("M", n, ",", t), a.point = e
+        }
+
+        function e(n, t) {
+            o.push("L", n, ",", t)
+        }
+
+        function r() {
+            a.point = n
+        }
+
+        function u() {
+            o.push("Z")
+        }
+
+        var i = Be(4.5), o = [], a = {
+            point: n, lineStart: function () {
+                a.point = t
+            }, lineEnd: r, polygonStart: function () {
+                a.lineEnd = u
+            }, polygonEnd: function () {
+                a.lineEnd = r, a.point = n
+            }, pointRadius: function (n) {
+                return i = Be(n), a
+            }, result: function () {
+                if (o.length) {
+                    var n = o.join("");
+                    return o = [], n
+                }
+            }
+        };
+        return a
+    }
+
+    function Be(n) {
+        return "m0," + n + "a" + n + "," + n + " 0 1,1 0," + -2 * n + "a" + n + "," + n + " 0 1,1 0," + 2 * n + "z"
+    }
+
+    function We(n, t) {
+        Ec += n, Ac += t, ++Nc
+    }
+
+    function Je() {
+        function n(n, r) {
+            var u = n - t, i = r - e, o = Math.sqrt(u * u + i * i);
+            Cc += o * (t + n) / 2, zc += o * (e + r) / 2, qc += o, We(t = n, e = r)
+        }
+
+        var t, e;
+        Xc.point = function (r, u) {
+            Xc.point = n, We(t = r, e = u)
+        }
+    }
+
+    function Ge() {
+        Xc.point = We
+    }
+
+    function Ke() {
+        function n(n, t) {
+            var e = n - r, i = t - u, o = Math.sqrt(e * e + i * i);
+            Cc += o * (r + n) / 2, zc += o * (u + t) / 2, qc += o, o = u * n - r * t, Lc += o * (r + n), Tc += o * (u + t), Rc += 3 * o, We(r = n, u = t)
+        }
+
+        var t, e, r, u;
+        Xc.point = function (i, o) {
+            Xc.point = n, We(t = r = i, e = u = o)
+        }, Xc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Qe(n) {
+        function t(t, e) {
+            n.moveTo(t + o, e), n.arc(t, e, o, 0, Pa)
+        }
+
+        function e(t, e) {
+            n.moveTo(t, e), a.point = r
+        }
+
+        function r(t, e) {
+            n.lineTo(t, e)
+        }
+
+        function u() {
+            a.point = t
+        }
+
+        function i() {
+            n.closePath()
+        }
+
+        var o = 4.5, a = {
+            point: t, lineStart: function () {
+                a.point = e
+            }, lineEnd: u, polygonStart: function () {
+                a.lineEnd = i
+            }, polygonEnd: function () {
+                a.lineEnd = u, a.point = t
+            }, pointRadius: function (n) {
+                return o = n, a
+            }, result: y
+        };
+        return a
+    }
+
+    function nr(n) {
+        function t(n) {
+            return (a ? r : e)(n)
+        }
+
+        function e(t) {
+            return rr(t, function (e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            })
+        }
+
+        function r(t) {
+            function e(e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            }
+
+            function r() {
+                M = 0 / 0, S.point = i, t.lineStart()
+            }
+
+            function i(e, r) {
+                var i = pe([e, r]), o = n(e, r);
+                u(M, x, y, b, _, w, M = o[0], x = o[1], y = e, b = i[0], _ = i[1], w = i[2], a, t), t.point(M, x)
+            }
+
+            function o() {
+                S.point = e, t.lineEnd()
+            }
+
+            function c() {
+                r(), S.point = l, S.lineEnd = s
+            }
+
+            function l(n, t) {
+                i(f = n, h = t), g = M, p = x, v = b, d = _, m = w, S.point = i
+            }
+
+            function s() {
+                u(M, x, y, b, _, w, g, p, f, v, d, m, a, t), S.lineEnd = o, o()
+            }
+
+            var f, h, g, p, v, d, m, y, M, x, b, _, w, S = {
+                point: e,
+                lineStart: r,
+                lineEnd: o,
+                polygonStart: function () {
+                    t.polygonStart(), S.lineStart = c
+                },
+                polygonEnd: function () {
+                    t.polygonEnd(), S.lineStart = r
+                }
+            };
+            return S
+        }
+
+        function u(t, e, r, a, c, l, s, f, h, g, p, v, d, m) {
+            var y = s - t, M = f - e, x = y * y + M * M;
+            if (x > 4 * i && d--) {
+                var b = a + g, _ = c + p, w = l + v, S = Math.sqrt(b * b + _ * _ + w * w), k = Math.asin(w /= S), E = va(va(w) - 1) < Ta || va(r - h) < Ta ? (r + h) / 2 : Math.atan2(_, b), A = n(E, k), N = A[0], C = A[1], z = N - t, q = C - e, L = M * z - y * q;
+                (L * L / x > i || va((y * z + M * q) / x - .5) > .3 || o > a * g + c * p + l * v) && (u(t, e, r, a, c, l, N, C, E, b /= S, _ /= S, w, d, m), m.point(N, C), u(N, C, E, b, _, w, s, f, h, g, p, v, d, m))
+            }
+        }
+
+        var i = .5, o = Math.cos(30 * Fa), a = 16;
+        return t.precision = function (n) {
+            return arguments.length ? (a = (i = n * n) > 0 && 16, t) : Math.sqrt(i)
+        }, t
+    }
+
+    function tr(n) {
+        var t = nr(function (t, e) {
+            return n([t * Ha, e * Ha])
+        });
+        return function (n) {
+            return or(t(n))
+        }
+    }
+
+    function er(n) {
+        this.stream = n
+    }
+
+    function rr(n, t) {
+        return {
+            point: t, sphere: function () {
+                n.sphere()
+            }, lineStart: function () {
+                n.lineStart()
+            }, lineEnd: function () {
+                n.lineEnd()
+            }, polygonStart: function () {
+                n.polygonStart()
+            }, polygonEnd: function () {
+                n.polygonEnd()
+            }
+        }
+    }
+
+    function ur(n) {
+        return ir(function () {
+            return n
+        })()
+    }
+
+    function ir(n) {
+        function t(n) {
+            return n = a(n[0] * Fa, n[1] * Fa), [n[0] * h + c, l - n[1] * h]
+        }
+
+        function e(n) {
+            return n = a.invert((n[0] - c) / h, (l - n[1]) / h), n && [n[0] * Ha, n[1] * Ha]
+        }
+
+        function r() {
+            a = Ae(o = lr(m, y, M), i);
+            var n = i(v, d);
+            return c = g - n[0] * h, l = p + n[1] * h, u()
+        }
+
+        function u() {
+            return s && (s.valid = !1, s = null), t
+        }
+
+        var i, o, a, c, l, s, f = nr(function (n, t) {
+            return n = i(n, t), [n[0] * h + c, l - n[1] * h]
+        }), h = 150, g = 480, p = 250, v = 0, d = 0, m = 0, y = 0, M = 0, x = Pc, b = Et, _ = null, w = null;
+        return t.stream = function (n) {
+            return s && (s.valid = !1), s = or(x(o, f(b(n)))), s.valid = !0, s
+        }, t.clipAngle = function (n) {
+            return arguments.length ? (x = null == n ? (_ = n, Pc) : He((_ = +n) * Fa), u()) : _
+        }, t.clipExtent = function (n) {
+            return arguments.length ? (w = n, b = n ? Ye(n[0][0], n[0][1], n[1][0], n[1][1]) : Et, u()) : w
+        }, t.scale = function (n) {
+            return arguments.length ? (h = +n, r()) : h
+        }, t.translate = function (n) {
+            return arguments.length ? (g = +n[0], p = +n[1], r()) : [g, p]
+        }, t.center = function (n) {
+            return arguments.length ? (v = n[0] % 360 * Fa, d = n[1] % 360 * Fa, r()) : [v * Ha, d * Ha]
+        }, t.rotate = function (n) {
+            return arguments.length ? (m = n[0] % 360 * Fa, y = n[1] % 360 * Fa, M = n.length > 2 ? n[2] % 360 * Fa : 0, r()) : [m * Ha, y * Ha, M * Ha]
+        }, ta.rebind(t, f, "precision"), function () {
+            return i = n.apply(this, arguments), t.invert = i.invert && e, r()
+        }
+    }
+
+    function or(n) {
+        return rr(n, function (t, e) {
+            n.point(t * Fa, e * Fa)
+        })
+    }
+
+    function ar(n, t) {
+        return [n, t]
+    }
+
+    function cr(n, t) {
+        return [n > Da ? n - Pa : -Da > n ? n + Pa : n, t]
+    }
+
+    function lr(n, t, e) {
+        return n ? t || e ? Ae(fr(n), hr(t, e)) : fr(n) : t || e ? hr(t, e) : cr
+    }
+
+    function sr(n) {
+        return function (t, e) {
+            return t += n, [t > Da ? t - Pa : -Da > t ? t + Pa : t, e]
+        }
+    }
+
+    function fr(n) {
+        var t = sr(n);
+        return t.invert = sr(-n), t
+    }
+
+    function hr(n, t) {
+        function e(n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * r + a * u;
+            return [Math.atan2(c * i - s * o, a * r - l * u), nt(s * i + c * o)]
+        }
+
+        var r = Math.cos(n), u = Math.sin(n), i = Math.cos(t), o = Math.sin(t);
+        return e.invert = function (n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * i - c * o;
+            return [Math.atan2(c * i + l * o, a * r + s * u), nt(s * r - a * u)]
+        }, e
+    }
+
+    function gr(n, t) {
+        var e = Math.cos(n), r = Math.sin(n);
+        return function (u, i, o, a) {
+            var c = o * t;
+            null != u ? (u = pr(e, u), i = pr(e, i), (o > 0 ? i > u : u > i) && (u += o * Pa)) : (u = n + o * Pa, i = n - .5 * c);
+            for (var l, s = u; o > 0 ? s > i : i > s; s -= c)a.point((l = xe([e, -r * Math.cos(s), -r * Math.sin(s)]))[0], l[1])
+        }
+    }
+
+    function pr(n, t) {
+        var e = pe(t);
+        e[0] -= n, Me(e);
+        var r = Q(-e[1]);
+        return ((-e[2] < 0 ? -r : r) + 2 * Math.PI - Ta) % (2 * Math.PI)
+    }
+
+    function vr(n, t, e) {
+        var r = ta.range(n, t - Ta, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [n, t]
+            })
+        }
+    }
+
+    function dr(n, t, e) {
+        var r = ta.range(n, t - Ta, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [t, n]
+            })
+        }
+    }
+
+    function mr(n) {
+        return n.source
+    }
+
+    function yr(n) {
+        return n.target
+    }
+
+    function Mr(n, t, e, r) {
+        var u = Math.cos(t), i = Math.sin(t), o = Math.cos(r), a = Math.sin(r), c = u * Math.cos(n), l = u * Math.sin(n), s = o * Math.cos(e), f = o * Math.sin(e), h = 2 * Math.asin(Math.sqrt(ut(r - t) + u * o * ut(e - n))), g = 1 / Math.sin(h), p = h ? function (n) {
+            var t = Math.sin(n *= h) * g, e = Math.sin(h - n) * g, r = e * c + t * s, u = e * l + t * f, o = e * i + t * a;
+            return [Math.atan2(u, r) * Ha, Math.atan2(o, Math.sqrt(r * r + u * u)) * Ha]
+        } : function () {
+            return [n * Ha, t * Ha]
+        };
+        return p.distance = h, p
+    }
+
+    function xr() {
+        function n(n, u) {
+            var i = Math.sin(u *= Fa), o = Math.cos(u), a = va((n *= Fa) - t), c = Math.cos(a);
+            $c += Math.atan2(Math.sqrt((a = o * Math.sin(a)) * a + (a = r * i - e * o * c) * a), e * i + r * o * c), t = n, e = i, r = o
+        }
+
+        var t, e, r;
+        Bc.point = function (u, i) {
+            t = u * Fa, e = Math.sin(i *= Fa), r = Math.cos(i), Bc.point = n
+        }, Bc.lineEnd = function () {
+            Bc.point = Bc.lineEnd = y
+        }
+    }
+
+    function br(n, t) {
+        function e(t, e) {
+            var r = Math.cos(t), u = Math.cos(e), i = n(r * u);
+            return [i * u * Math.sin(t), i * Math.sin(e)]
+        }
+
+        return e.invert = function (n, e) {
+            var r = Math.sqrt(n * n + e * e), u = t(r), i = Math.sin(u), o = Math.cos(u);
+            return [Math.atan2(n * i, r * o), Math.asin(r && e * i / r)]
+        }, e
+    }
+
+    function _r(n, t) {
+        function e(n, t) {
+            o > 0 ? -ja + Ta > t && (t = -ja + Ta) : t > ja - Ta && (t = ja - Ta);
+            var e = o / Math.pow(u(t), i);
+            return [e * Math.sin(i * n), o - e * Math.cos(i * n)]
+        }
+
+        var r = Math.cos(n), u = function (n) {
+            return Math.tan(Da / 4 + n / 2)
+        }, i = n === t ? Math.sin(n) : Math.log(r / Math.cos(t)) / Math.log(u(t) / u(n)), o = r * Math.pow(u(n), i) / i;
+        return i ? (e.invert = function (n, t) {
+            var e = o - t, r = G(i) * Math.sqrt(n * n + e * e);
+            return [Math.atan2(n, e) / i, 2 * Math.atan(Math.pow(o / r, 1 / i)) - ja]
+        }, e) : Sr
+    }
+
+    function wr(n, t) {
+        function e(n, t) {
+            var e = i - t;
+            return [e * Math.sin(u * n), i - e * Math.cos(u * n)]
+        }
+
+        var r = Math.cos(n), u = n === t ? Math.sin(n) : (r - Math.cos(t)) / (t - n), i = r / u + n;
+        return va(u) < Ta ? ar : (e.invert = function (n, t) {
+            var e = i - t;
+            return [Math.atan2(n, e) / u, i - G(u) * Math.sqrt(n * n + e * e)]
+        }, e)
+    }
+
+    function Sr(n, t) {
+        return [n, Math.log(Math.tan(Da / 4 + t / 2))]
+    }
+
+    function kr(n) {
+        var t, e = ur(n), r = e.scale, u = e.translate, i = e.clipExtent;
+        return e.scale = function () {
+            var n = r.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.translate = function () {
+            var n = u.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.clipExtent = function (n) {
+            var o = i.apply(e, arguments);
+            if (o === e) {
+                if (t = null == n) {
+                    var a = Da * r(), c = u();
+                    i([[c[0] - a, c[1] - a], [c[0] + a, c[1] + a]])
+                }
+            } else t && (o = null);
+            return o
+        }, e.clipExtent(null)
+    }
+
+    function Er(n, t) {
+        return [Math.log(Math.tan(Da / 4 + t / 2)), -n]
+    }
+
+    function Ar(n) {
+        return n[0]
+    }
+
+    function Nr(n) {
+        return n[1]
+    }
+
+    function Cr(n) {
+        for (var t = n.length, e = [0, 1], r = 2, u = 2; t > u; u++) {
+            for (; r > 1 && K(n[e[r - 2]], n[e[r - 1]], n[u]) <= 0;)--r;
+            e[r++] = u
+        }
+        return e.slice(0, r)
+    }
+
+    function zr(n, t) {
+        return n[0] - t[0] || n[1] - t[1]
+    }
+
+    function qr(n, t, e) {
+        return (e[0] - t[0]) * (n[1] - t[1]) < (e[1] - t[1]) * (n[0] - t[0])
+    }
+
+    function Lr(n, t, e, r) {
+        var u = n[0], i = e[0], o = t[0] - u, a = r[0] - i, c = n[1], l = e[1], s = t[1] - c, f = r[1] - l, h = (a * (c - l) - f * (u - i)) / (f * o - a * s);
+        return [u + h * o, c + h * s]
+    }
+
+    function Tr(n) {
+        var t = n[0], e = n[n.length - 1];
+        return !(t[0] - e[0] || t[1] - e[1])
+    }
+
+    function Rr() {
+        tu(this), this.edge = this.site = this.circle = null
+    }
+
+    function Dr(n) {
+        var t = ol.pop() || new Rr;
+        return t.site = n, t
+    }
+
+    function Pr(n) {
+        Xr(n), rl.remove(n), ol.push(n), tu(n)
+    }
+
+    function Ur(n) {
+        var t = n.circle, e = t.x, r = t.cy, u = {x: e, y: r}, i = n.P, o = n.N, a = [n];
+        Pr(n);
+        for (var c = i; c.circle && va(e - c.circle.x) < Ta && va(r - c.circle.cy) < Ta;)i = c.P, a.unshift(c), Pr(c), c = i;
+        a.unshift(c), Xr(c);
+        for (var l = o; l.circle && va(e - l.circle.x) < Ta && va(r - l.circle.cy) < Ta;)o = l.N, a.push(l), Pr(l), l = o;
+        a.push(l), Xr(l);
+        var s, f = a.length;
+        for (s = 1; f > s; ++s)l = a[s], c = a[s - 1], Kr(l.edge, c.site, l.site, u);
+        c = a[0], l = a[f - 1], l.edge = Jr(c.site, l.site, null, u), Vr(c), Vr(l)
+    }
+
+    function jr(n) {
+        for (var t, e, r, u, i = n.x, o = n.y, a = rl._; a;)if (r = Fr(a, o) - i, r > Ta)a = a.L; else {
+            if (u = i - Hr(a, o), !(u > Ta)) {
+                r > -Ta ? (t = a.P, e = a) : u > -Ta ? (t = a, e = a.N) : t = e = a;
+                break
+            }
+            if (!a.R) {
+                t = a;
+                break
+            }
+            a = a.R
+        }
+        var c = Dr(n);
+        if (rl.insert(t, c), t || e) {
+            if (t === e)return Xr(t), e = Dr(t.site), rl.insert(c, e), c.edge = e.edge = Jr(t.site, c.site), Vr(t), Vr(e), void 0;
+            if (!e)return c.edge = Jr(t.site, c.site), void 0;
+            Xr(t), Xr(e);
+            var l = t.site, s = l.x, f = l.y, h = n.x - s, g = n.y - f, p = e.site, v = p.x - s, d = p.y - f, m = 2 * (h * d - g * v), y = h * h + g * g, M = v * v + d * d, x = {
+                x: (d * y - g * M) / m + s,
+                y: (h * M - v * y) / m + f
+            };
+            Kr(e.edge, l, p, x), c.edge = Jr(l, n, null, x), e.edge = Jr(n, p, null, x), Vr(t), Vr(e)
+        }
+    }
+
+    function Fr(n, t) {
+        var e = n.site, r = e.x, u = e.y, i = u - t;
+        if (!i)return r;
+        var o = n.P;
+        if (!o)return -1 / 0;
+        e = o.site;
+        var a = e.x, c = e.y, l = c - t;
+        if (!l)return a;
+        var s = a - r, f = 1 / i - 1 / l, h = s / l;
+        return f ? (-h + Math.sqrt(h * h - 2 * f * (s * s / (-2 * l) - c + l / 2 + u - i / 2))) / f + r : (r + a) / 2
+    }
+
+    function Hr(n, t) {
+        var e = n.N;
+        if (e)return Fr(e, t);
+        var r = n.site;
+        return r.y === t ? r.x : 1 / 0
+    }
+
+    function Or(n) {
+        this.site = n, this.edges = []
+    }
+
+    function Yr(n) {
+        for (var t, e, r, u, i, o, a, c, l, s, f = n[0][0], h = n[1][0], g = n[0][1], p = n[1][1], v = el, d = v.length; d--;)if (i = v[d], i && i.prepare())for (a = i.edges, c = a.length, o = 0; c > o;)s = a[o].end(), r = s.x, u = s.y, l = a[++o % c].start(), t = l.x, e = l.y, (va(r - t) > Ta || va(u - e) > Ta) && (a.splice(o, 0, new Qr(Gr(i.site, s, va(r - f) < Ta && p - u > Ta ? {
+            x: f,
+            y: va(t - f) < Ta ? e : p
+        } : va(u - p) < Ta && h - r > Ta ? {x: va(e - p) < Ta ? t : h, y: p} : va(r - h) < Ta && u - g > Ta ? {
+            x: h,
+            y: va(t - h) < Ta ? e : g
+        } : va(u - g) < Ta && r - f > Ta ? {x: va(e - g) < Ta ? t : f, y: g} : null), i.site, null)), ++c)
+    }
+
+    function Ir(n, t) {
+        return t.angle - n.angle
+    }
+
+    function Zr() {
+        tu(this), this.x = this.y = this.arc = this.site = this.cy = null
+    }
+
+    function Vr(n) {
+        var t = n.P, e = n.N;
+        if (t && e) {
+            var r = t.site, u = n.site, i = e.site;
+            if (r !== i) {
+                var o = u.x, a = u.y, c = r.x - o, l = r.y - a, s = i.x - o, f = i.y - a, h = 2 * (c * f - l * s);
+                if (!(h >= -Ra)) {
+                    var g = c * c + l * l, p = s * s + f * f, v = (f * g - l * p) / h, d = (c * p - s * g) / h, f = d + a, m = al.pop() || new Zr;
+                    m.arc = n, m.site = u, m.x = v + o, m.y = f + Math.sqrt(v * v + d * d), m.cy = f, n.circle = m;
+                    for (var y = null, M = il._; M;)if (m.y < M.y || m.y === M.y && m.x <= M.x) {
+                        if (!M.L) {
+                            y = M.P;
+                            break
+                        }
+                        M = M.L
+                    } else {
+                        if (!M.R) {
+                            y = M;
+                            break
+                        }
+                        M = M.R
+                    }
+                    il.insert(y, m), y || (ul = m)
+                }
+            }
+        }
+    }
+
+    function Xr(n) {
+        var t = n.circle;
+        t && (t.P || (ul = t.N), il.remove(t), al.push(t), tu(t), n.circle = null)
+    }
+
+    function $r(n) {
+        for (var t, e = tl, r = Oe(n[0][0], n[0][1], n[1][0], n[1][1]), u = e.length; u--;)t = e[u], (!Br(t, n) || !r(t) || va(t.a.x - t.b.x) < Ta && va(t.a.y - t.b.y) < Ta) && (t.a = t.b = null, e.splice(u, 1))
+    }
+
+    function Br(n, t) {
+        var e = n.b;
+        if (e)return !0;
+        var r, u, i = n.a, o = t[0][0], a = t[1][0], c = t[0][1], l = t[1][1], s = n.l, f = n.r, h = s.x, g = s.y, p = f.x, v = f.y, d = (h + p) / 2, m = (g + v) / 2;
+        if (v === g) {
+            if (o > d || d >= a)return;
+            if (h > p) {
+                if (i) {
+                    if (i.y >= l)return
+                } else i = {x: d, y: c};
+                e = {x: d, y: l}
+            } else {
+                if (i) {
+                    if (i.y < c)return
+                } else i = {x: d, y: l};
+                e = {x: d, y: c}
+            }
+        } else if (r = (h - p) / (v - g), u = m - r * d, -1 > r || r > 1)if (h > p) {
+            if (i) {
+                if (i.y >= l)return
+            } else i = {x: (c - u) / r, y: c};
+            e = {x: (l - u) / r, y: l}
+        } else {
+            if (i) {
+                if (i.y < c)return
+            } else i = {x: (l - u) / r, y: l};
+            e = {x: (c - u) / r, y: c}
+        } else if (v > g) {
+            if (i) {
+                if (i.x >= a)return
+            } else i = {x: o, y: r * o + u};
+            e = {x: a, y: r * a + u}
+        } else {
+            if (i) {
+                if (i.x < o)return
+            } else i = {x: a, y: r * a + u};
+            e = {x: o, y: r * o + u}
+        }
+        return n.a = i, n.b = e, !0
+    }
+
+    function Wr(n, t) {
+        this.l = n, this.r = t, this.a = this.b = null
+    }
+
+    function Jr(n, t, e, r) {
+        var u = new Wr(n, t);
+        return tl.push(u), e && Kr(u, n, t, e), r && Kr(u, t, n, r), el[n.i].edges.push(new Qr(u, n, t)), el[t.i].edges.push(new Qr(u, t, n)), u
+    }
+
+    function Gr(n, t, e) {
+        var r = new Wr(n, null);
+        return r.a = t, r.b = e, tl.push(r), r
+    }
+
+    function Kr(n, t, e, r) {
+        n.a || n.b ? n.l === e ? n.b = r : n.a = r : (n.a = r, n.l = t, n.r = e)
+    }
+
+    function Qr(n, t, e) {
+        var r = n.a, u = n.b;
+        this.edge = n, this.site = t, this.angle = e ? Math.atan2(e.y - t.y, e.x - t.x) : n.l === t ? Math.atan2(u.x - r.x, r.y - u.y) : Math.atan2(r.x - u.x, u.y - r.y)
+    }
+
+    function nu() {
+        this._ = null
+    }
+
+    function tu(n) {
+        n.U = n.C = n.L = n.R = n.P = n.N = null
+    }
+
+    function eu(n, t) {
+        var e = t, r = t.R, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.R = r.L, e.R && (e.R.U = e), r.L = e
+    }
+
+    function ru(n, t) {
+        var e = t, r = t.L, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.L = r.R, e.L && (e.L.U = e), r.R = e
+    }
+
+    function uu(n) {
+        for (; n.L;)n = n.L;
+        return n
+    }
+
+    function iu(n, t) {
+        var e, r, u, i = n.sort(ou).pop();
+        for (tl = [], el = new Array(n.length), rl = new nu, il = new nu; ;)if (u = ul, i && (!u || i.y < u.y || i.y === u.y && i.x < u.x))(i.x !== e || i.y !== r) && (el[i.i] = new Or(i), jr(i), e = i.x, r = i.y), i = n.pop(); else {
+            if (!u)break;
+            Ur(u.arc)
+        }
+        t && ($r(t), Yr(t));
+        var o = {cells: el, edges: tl};
+        return rl = il = tl = el = null, o
+    }
+
+    function ou(n, t) {
+        return t.y - n.y || t.x - n.x
+    }
+
+    function au(n, t, e) {
+        return (n.x - e.x) * (t.y - n.y) - (n.x - t.x) * (e.y - n.y)
+    }
+
+    function cu(n) {
+        return n.x
+    }
+
+    function lu(n) {
+        return n.y
+    }
+
+    function su() {
+        return {leaf: !0, nodes: [], point: null, x: null, y: null}
+    }
+
+    function fu(n, t, e, r, u, i) {
+        if (!n(t, e, r, u, i)) {
+            var o = .5 * (e + u), a = .5 * (r + i), c = t.nodes;
+            c[0] && fu(n, c[0], e, r, o, a), c[1] && fu(n, c[1], o, r, u, a), c[2] && fu(n, c[2], e, a, o, i), c[3] && fu(n, c[3], o, a, u, i)
+        }
+    }
+
+    function hu(n, t, e, r, u, i, o) {
+        var a, c = 1 / 0;
+        return function l(n, s, f, h, g) {
+            if (!(s > i || f > o || r > h || u > g)) {
+                if (p = n.point) {
+                    var p, v = t - p[0], d = e - p[1], m = v * v + d * d;
+                    if (c > m) {
+                        var y = Math.sqrt(c = m);
+                        r = t - y, u = e - y, i = t + y, o = e + y, a = p
+                    }
+                }
+                for (var M = n.nodes, x = .5 * (s + h), b = .5 * (f + g), _ = t >= x, w = e >= b, S = w << 1 | _, k = S + 4; k > S; ++S)if (n = M[3 & S])switch (3 & S) {
+                    case 0:
+                        l(n, s, f, x, b);
+                        break;
+                    case 1:
+                        l(n, x, f, h, b);
+                        break;
+                    case 2:
+                        l(n, s, b, x, g);
+                        break;
+                    case 3:
+                        l(n, x, b, h, g)
+                }
+            }
+        }(n, r, u, i, o), a
+    }
+
+    function gu(n, t) {
+        n = ta.rgb(n), t = ta.rgb(t);
+        var e = n.r, r = n.g, u = n.b, i = t.r - e, o = t.g - r, a = t.b - u;
+        return function (n) {
+            return "#" + Mt(Math.round(e + i * n)) + Mt(Math.round(r + o * n)) + Mt(Math.round(u + a * n))
+        }
+    }
+
+    function pu(n, t) {
+        var e, r = {}, u = {};
+        for (e in n)e in t ? r[e] = mu(n[e], t[e]) : u[e] = n[e];
+        for (e in t)e in n || (u[e] = t[e]);
+        return function (n) {
+            for (e in r)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function vu(n, t) {
+        return n = +n, t = +t, function (e) {
+            return n * (1 - e) + t * e
+        }
+    }
+
+    function du(n, t) {
+        var e, r, u, i = ll.lastIndex = sl.lastIndex = 0, o = -1, a = [], c = [];
+        for (n += "", t += ""; (e = ll.exec(n)) && (r = sl.exec(t));)(u = r.index) > i && (u = t.slice(i, u), a[o] ? a[o] += u : a[++o] = u), (e = e[0]) === (r = r[0]) ? a[o] ? a[o] += r : a[++o] = r : (a[++o] = null, c.push({
+            i: o,
+            x: vu(e, r)
+        })), i = sl.lastIndex;
+        return i < t.length && (u = t.slice(i), a[o] ? a[o] += u : a[++o] = u), a.length < 2 ? c[0] ? (t = c[0].x, function (n) {
+            return t(n) + ""
+        }) : function () {
+            return t
+        } : (t = c.length, function (n) {
+            for (var e, r = 0; t > r; ++r)a[(e = c[r]).i] = e.x(n);
+            return a.join("")
+        })
+    }
+
+    function mu(n, t) {
+        for (var e, r = ta.interpolators.length; --r >= 0 && !(e = ta.interpolators[r](n, t)););
+        return e
+    }
+
+    function yu(n, t) {
+        var e, r = [], u = [], i = n.length, o = t.length, a = Math.min(n.length, t.length);
+        for (e = 0; a > e; ++e)r.push(mu(n[e], t[e]));
+        for (; i > e; ++e)u[e] = n[e];
+        for (; o > e; ++e)u[e] = t[e];
+        return function (n) {
+            for (e = 0; a > e; ++e)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function Mu(n) {
+        return function (t) {
+            return 0 >= t ? 0 : t >= 1 ? 1 : n(t)
+        }
+    }
+
+    function xu(n) {
+        return function (t) {
+            return 1 - n(1 - t)
+        }
+    }
+
+    function bu(n) {
+        return function (t) {
+            return .5 * (.5 > t ? n(2 * t) : 2 - n(2 - 2 * t))
+        }
+    }
+
+    function _u(n) {
+        return n * n
+    }
+
+    function wu(n) {
+        return n * n * n
+    }
+
+    function Su(n) {
+        if (0 >= n)return 0;
+        if (n >= 1)return 1;
+        var t = n * n, e = t * n;
+        return 4 * (.5 > n ? e : 3 * (n - t) + e - .75)
+    }
+
+    function ku(n) {
+        return function (t) {
+            return Math.pow(t, n)
+        }
+    }
+
+    function Eu(n) {
+        return 1 - Math.cos(n * ja)
+    }
+
+    function Au(n) {
+        return Math.pow(2, 10 * (n - 1))
+    }
+
+    function Nu(n) {
+        return 1 - Math.sqrt(1 - n * n)
+    }
+
+    function Cu(n, t) {
+        var e;
+        return arguments.length < 2 && (t = .45), arguments.length ? e = t / Pa * Math.asin(1 / n) : (n = 1, e = t / 4), function (r) {
+            return 1 + n * Math.pow(2, -10 * r) * Math.sin((r - e) * Pa / t)
+        }
+    }
+
+    function zu(n) {
+        return n || (n = 1.70158), function (t) {
+            return t * t * ((n + 1) * t - n)
+        }
+    }
+
+    function qu(n) {
+        return 1 / 2.75 > n ? 7.5625 * n * n : 2 / 2.75 > n ? 7.5625 * (n -= 1.5 / 2.75) * n + .75 : 2.5 / 2.75 > n ? 7.5625 * (n -= 2.25 / 2.75) * n + .9375 : 7.5625 * (n -= 2.625 / 2.75) * n + .984375
+    }
+
+    function Lu(n, t) {
+        n = ta.hcl(n), t = ta.hcl(t);
+        var e = n.h, r = n.c, u = n.l, i = t.h - e, o = t.c - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.c : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return lt(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Tu(n, t) {
+        n = ta.hsl(n), t = ta.hsl(t);
+        var e = n.h, r = n.s, u = n.l, i = t.h - e, o = t.s - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.s : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return at(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Ru(n, t) {
+        n = ta.lab(n), t = ta.lab(t);
+        var e = n.l, r = n.a, u = n.b, i = t.l - e, o = t.a - r, a = t.b - u;
+        return function (n) {
+            return ft(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Du(n, t) {
+        return t -= n, function (e) {
+            return Math.round(n + t * e)
+        }
+    }
+
+    function Pu(n) {
+        var t = [n.a, n.b], e = [n.c, n.d], r = ju(t), u = Uu(t, e), i = ju(Fu(e, t, -u)) || 0;
+        t[0] * e[1] < e[0] * t[1] && (t[0] *= -1, t[1] *= -1, r *= -1, u *= -1), this.rotate = (r ? Math.atan2(t[1], t[0]) : Math.atan2(-e[0], e[1])) * Ha, this.translate = [n.e, n.f], this.scale = [r, i], this.skew = i ? Math.atan2(u, i) * Ha : 0
+    }
+
+    function Uu(n, t) {
+        return n[0] * t[0] + n[1] * t[1]
+    }
+
+    function ju(n) {
+        var t = Math.sqrt(Uu(n, n));
+        return t && (n[0] /= t, n[1] /= t), t
+    }
+
+    function Fu(n, t, e) {
+        return n[0] += e * t[0], n[1] += e * t[1], n
+    }
+
+    function Hu(n, t) {
+        var e, r = [], u = [], i = ta.transform(n), o = ta.transform(t), a = i.translate, c = o.translate, l = i.rotate, s = o.rotate, f = i.skew, h = o.skew, g = i.scale, p = o.scale;
+        return a[0] != c[0] || a[1] != c[1] ? (r.push("translate(", null, ",", null, ")"), u.push({
+            i: 1,
+            x: vu(a[0], c[0])
+        }, {
+            i: 3,
+            x: vu(a[1], c[1])
+        })) : c[0] || c[1] ? r.push("translate(" + c + ")") : r.push(""), l != s ? (l - s > 180 ? s += 360 : s - l > 180 && (l += 360), u.push({
+            i: r.push(r.pop() + "rotate(", null, ")") - 2,
+            x: vu(l, s)
+        })) : s && r.push(r.pop() + "rotate(" + s + ")"), f != h ? u.push({
+            i: r.push(r.pop() + "skewX(", null, ")") - 2,
+            x: vu(f, h)
+        }) : h && r.push(r.pop() + "skewX(" + h + ")"), g[0] != p[0] || g[1] != p[1] ? (e = r.push(r.pop() + "scale(", null, ",", null, ")"), u.push({
+            i: e - 4,
+            x: vu(g[0], p[0])
+        }, {
+            i: e - 2,
+            x: vu(g[1], p[1])
+        })) : (1 != p[0] || 1 != p[1]) && r.push(r.pop() + "scale(" + p + ")"), e = u.length, function (n) {
+            for (var t, i = -1; ++i < e;)r[(t = u[i]).i] = t.x(n);
+            return r.join("")
+        }
+    }
+
+    function Ou(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return (e - n) / t
+        }
+    }
+
+    function Yu(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return Math.max(0, Math.min(1, (e - n) / t))
+        }
+    }
+
+    function Iu(n) {
+        for (var t = n.source, e = n.target, r = Vu(t, e), u = [t]; t !== r;)t = t.parent, u.push(t);
+        for (var i = u.length; e !== r;)u.splice(i, 0, e), e = e.parent;
+        return u
+    }
+
+    function Zu(n) {
+        for (var t = [], e = n.parent; null != e;)t.push(n), n = e, e = e.parent;
+        return t.push(n), t
+    }
+
+    function Vu(n, t) {
+        if (n === t)return n;
+        for (var e = Zu(n), r = Zu(t), u = e.pop(), i = r.pop(), o = null; u === i;)o = u, u = e.pop(), i = r.pop();
+        return o
+    }
+
+    function Xu(n) {
+        n.fixed |= 2
+    }
+
+    function $u(n) {
+        n.fixed &= -7
+    }
+
+    function Bu(n) {
+        n.fixed |= 4, n.px = n.x, n.py = n.y
+    }
+
+    function Wu(n) {
+        n.fixed &= -5
+    }
+
+    function Ju(n, t, e) {
+        var r = 0, u = 0;
+        if (n.charge = 0, !n.leaf)for (var i, o = n.nodes, a = o.length, c = -1; ++c < a;)i = o[c], null != i && (Ju(i, t, e), n.charge += i.charge, r += i.charge * i.cx, u += i.charge * i.cy);
+        if (n.point) {
+            n.leaf || (n.point.x += Math.random() - .5, n.point.y += Math.random() - .5);
+            var l = t * e[n.point.index];
+            n.charge += n.pointCharge = l, r += l * n.point.x, u += l * n.point.y
+        }
+        n.cx = r / n.charge, n.cy = u / n.charge
+    }
+
+    function Gu(n, t) {
+        return ta.rebind(n, t, "sort", "children", "value"), n.nodes = n, n.links = ri, n
+    }
+
+    function Ku(n, t) {
+        for (var e = [n]; null != (n = e.pop());)if (t(n), (u = n.children) && (r = u.length))for (var r, u; --r >= 0;)e.push(u[r])
+    }
+
+    function Qu(n, t) {
+        for (var e = [n], r = []; null != (n = e.pop());)if (r.push(n), (i = n.children) && (u = i.length))for (var u, i, o = -1; ++o < u;)e.push(i[o]);
+        for (; null != (n = r.pop());)t(n)
+    }
+
+    function ni(n) {
+        return 

<TRUNCATED>

[07/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/igviz.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/igviz.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/igviz.js
new file mode 100644
index 0000000..8d31b36
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/igviz.js
@@ -0,0 +1,3565 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+(function () {
+
+    var igviz = window.igviz || {};
+
+    igviz.version = '1.0.0';
+
+    igviz.val = 0;
+    window.igviz = igviz;
+    var persistedData = [];
+    var maxValueForUpdate;
+    var singleNumSvg;
+    var singleNumCurveSvg;
+    var mapChart;
+    var mapSVG;
+    var worldMapCodes;
+    var usaMapCodes;
+
+    /*************************************************** Initializtion functions ***************************************************************************************************/
+
+
+    igviz.draw = function (canvas, config, dataTable) {
+        var chart = new Chart(canvas, config, dataTable);
+
+        if (config.chartType == "singleNumber") {
+            this.drawSingleNumberDiagram(chart);
+        } else if (config.chartType == "map") {
+            this.drawMap(canvas, config, dataTable);
+        } else if (config.chartType == "tabular") {
+            this.drawTable(canvas, config, dataTable);
+        } else if (config.chartType == "arc") {
+            this.drawArc(canvas, config, dataTable);
+        } else if (config.chartType == "drill") {
+            this.drillDown(0, canvas, config, dataTable, dataTable);
+        }
+        return chart;
+        //return
+    };
+
+    igviz.setUp = function (canvas, config, dataTable) {
+        var chartObject = new Chart(canvas, config, dataTable);
+
+        if (config.chartType == "bar") {
+            this.drawBarChart(chartObject, canvas, config, dataTable);
+        } else if (config.chartType == "scatter") {
+            this.drawScatterPlot(chartObject);
+        } else if (config.chartType == "line") {
+            this.drawLineChart(chartObject);
+        } else if (config.chartType == "area") {
+            this.drawAreaChart(chartObject);
+        }
+        return chartObject;
+    };
+
+
+    /*************************************************** Line chart ***************************************************************************************************/
+
+    igviz.drawLineChart = function (chartObj) {
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+        // table=setData(dataTable,chartConfig)
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = [];
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            yStrings[i] = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "range": "width",
+            "zero": false,
+            "clamp": false,
+            "field": xString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis[0],
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yStrings[0]
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": "values",
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        if (chartConfig.interpolationMode == undefined) {
+            chartConfig.interpolationMode = "monotone";
+        }
+        var spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height,
+            //  "padding":{"top":40,"bottom":60,'left':90,"right":150},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category20"
+                }
+            ],
+            "axes": [xAxis, yAxis
+            ],
+            "legends": [
+                {
+
+                    "orient": "right",
+                    "fill": "color",
+                    "title": "Legend",
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 1.5}
+
+                        }
+                    }
+                }
+            ],
+
+            "marks": []
+        }
+
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            markObj = {
+                "type": "line",
+                "key": xString,
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"value": 400},
+                        "interpolate": {"value": chartConfig.interpolationMode},
+                        "y": {"scale": "y:prev", "field": yStrings[i]},
+                        "stroke": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "strokeWidth": {"value": 1.5}
+                    },
+                    "update": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    },
+                    "exit": {
+                        "x": {"value": -20},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    }
+                }
+            };
+            pointObj = {
+                "type": "symbol",
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]},
+                        "fill": {
+                            "scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]
+                            //"fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            //"size": {"scale":"r","field":rString},
+                            // "stroke": {"value": "transparent"}
+                        },
+                        "hover": {
+                            "size": {"value": 300},
+                            "stroke": {"value": "white"}
+                        }
+                    }
+                }
+            }
+
+
+            spec.marks.push(markObj);
+            spec.marks.push(pointObj);
+            spec.legends[0].values.push(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+
+            console.log(tool, event, item);
+            if (item.mark.marktype == 'symbol') {
+                xVar = dataTable.metadata.names[chartConfig.xAxis]
+                yVar = dataTable.metadata.names[chartConfig.yAxis]
+
+                contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr></table>';
+
+
+                tool.html(contentString).style({
+                    'left': event.pageX + 10 + 'px',
+                    'top': event.pageY + 10 + 'px',
+                    'opacity': 1
+                })
+                tool.selectAll('tr td').style('padding', "3px");
+            }
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+        chartObj.spec = spec;
+
+    }
+
+
+    /*************************************************** Bar chart ***************************************************************************************************/
+    igviz.drawBarChart = function (mychart, divId, chartConfig, dataTable) {
+        //  console.log(this);
+        divId = mychart.canvas;
+        chartConfig = mychart.config;
+        dataTable = mychart.dataTable;
+        if (chartConfig.hasOwnProperty("groupedBy")) {
+            var format = "grouped";
+            if (chartConfig.hasOwnProperty("format")) {
+                format = chartConfig.format;
+
+            }
+            if (format == "grouped") {
+                console.log("groupedDFJSDFKSD:JFKDJF");
+                if (chartConfig.orientation == 'H') {
+                    console.log('horizontal');
+                    return this.drawGroupedBarChart(mychart);
+
+                }
+                return this.drawGroupedBarChartVertical(mychart);
+            }
+            else {
+                return this.drawStackedBarChart(mychart);
+            }
+        }
+
+        var xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis]);
+        var yString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis])
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "zero": false,
+            "range": "width",
+            "round": true,
+            "field": xString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yString
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": 30,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -35,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        if (chartConfig.barColor == undefined) {
+            chartConfig.barColor = "steelblue";
+        }
+
+//        console.log(table)
+        var spec = {
+
+            "width": chartConfig.width - 150,
+            //"padding":{'top':30,"left":80,"right":80,'bottom':60},
+            "height": chartConfig.height,
+            "data": [
+                {
+                    "name": "table"
+                }
+            ],
+            "scales": [
+                xScale,
+                yScale
+            ],
+            "axes": [
+                xAxis,
+                yAxis
+
+
+            ],
+            "marks": [
+                {
+                    "key": xString,
+                    "type": "rect",
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "width": {"scale": "x", "band": true, "offset": -10},
+                            "y": {"scale": "y:prev", "field": yString, "duration": 2000},
+                            "y2": {"scale": "y", "value": 0}
+
+                        },
+                        "update": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yString},
+                            "y2": {"scale": "y", "value": 0},
+                            "fill": {"value": chartConfig.barColor}
+                        },
+                        "exit": {
+                            "x": {"value": 0},
+                            "y": {"scale": "y:prev", "field": yString},
+                            "y2": {"scale": "y", "value": 0}
+                        },
+
+                        "hover": {
+
+                            "fill": {'value': 'orange'}
+                        }
+
+                    }
+                }
+            ]
+        }
+
+
+//        var data = {table: table}
+
+        mychart.originalWidth = chartConfig.width;
+        mychart.originalHeight = chartConfig.height;
+
+        mychart.spec = spec;
+        //mychart.data = data;
+        //mychart.table = table;
+        ////vg.parse.spec(spec, function (chart) {
+        //    mychart.chart = chart({
+        //        el: divId,
+        //        renderer: 'svg',
+        //        data: data,
+        //        hover: false
+        //
+        //    }).update();
+        //
+        //    // mychart.chart.data(data).update();
+        //    //self.counter=0;
+        //    //console.log('abc');
+        //    //setInterval(updateTable,1500);
+        //
+        //});
+    };
+
+    igviz.drawStackedBarChart = function (chartObj) {
+
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //   var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        groupedBy = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.groupedBy]);
+
+        // console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.groupedBy,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "width",
+            "field": groupedBy,
+            "padding": 0.2
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "height",
+            "dataFrom": "stats",
+            "field": "sum",
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "cat",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.groupedBy],
+            "grid": false,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "val",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height - 100,
+            "padding": {"top": 10, "left": 60, "bottom": 60, "right": 100},
+            "data": [
+                {
+                    "name": "table"
+                },
+                {
+                    "name": "stats",
+                    "source": "table",
+                    "transform": [
+                        {"type": "facet", "keys": [groupedBy]},
+                        {"type": "stats", "value": yStrings}
+                    ]
+                }
+            ],
+            "scales": [
+                cScale,
+                vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.xAxis],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+            "axes": [
+                xAxis, yAxis
+            ],
+
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [
+                            {"type": "facet", "keys": [xString]},
+                            {"type": "stack", "point": groupedBy, "height": yStrings}
+                        ]
+                    },
+                    "marks": [
+                        {
+                            "type": "rect",
+                            "properties": {
+                                "enter": {
+                                    "x": {"scale": "cat", "field": groupedBy},
+                                    "width": {"scale": "cat", "band": true, "offset": -1},
+                                    "y": {"scale": "val", "field": "y"},
+                                    "y2": {"scale": "val", "field": "y2"},
+                                    "fill": {"scale": "color", "field": xString}
+                                },
+                                "update": {
+                                    "fillOpacity": {"value": 1}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                            }
+                        }
+                    ]
+                }
+            ]
+        }
+
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.xAxis;
+        chartObj.spec = spec;
+
+    }
+
+    igviz.drawGroupedBarChart = function (chartObj) {
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //  var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        groupedBy = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.groupedBy]);
+
+        //  console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.groupedBy,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "height",
+            "field": groupedBy,
+            "padding": 0.2
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "width",
+            "round": 'true',
+            "field": yStrings,
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "val",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "cat",
+            "angle": 0,
+            "tickSize": 0,
+            "tickPadding": 8,
+            "title": dataTable.metadata.names[chartConfig.groupedBy],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width,
+            "height": chartConfig.height,
+
+            "data": [
+                {
+                    "name": "table"
+                }
+            ],
+            "scales": [
+                cScale, vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "axes": [
+                xAxis, yAxis
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.xAxis],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [{"type": "facet", "keys": [groupedBy]}]
+                    },
+                    "properties": {
+                        "enter": {
+                            "y": {"scale": "cat", "field": "key"},
+                            "height": {"scale": "cat", "band": true}
+                        }
+                    },
+                    "scales": [
+                        {
+                            "name": "pos",
+                            "type": "ordinal",
+                            "range": "height",
+                            "domain": {"field": xString}
+                        }
+                    ],
+                    "marks": [
+                        {
+                            "type": "rect",
+                            "properties": {
+                                "enter": {
+                                    "y": {"scale": "pos", "field": xString},
+                                    "height": {"scale": "pos", "band": true},
+                                    "x": {"scale": "val", "field": yStrings},
+                                    "x2": {"scale": "val", "value": 0},
+                                    "fill": {"scale": "color", "field": xString}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                                ,
+
+                                "update": {
+                                    "fillOpacity": {"value": 1}
+                                }
+                            }
+                        },
+                        //{
+                        //    "type": "text",
+                        //    "properties": {
+                        //        "enter": {
+                        //            "y": {"scale": "pos", "field": xString},
+                        //            "dy": {"scale": "pos", "band": true, "mult": 0.5},
+                        //            "x": {"scale": "val", "field": yStrings, "offset": -4},
+                        //            "fill": {"value": "white"},
+                        //            "align": {"value": "right"},
+                        //            "baseline": {"value": "middle"},
+                        //            "text": {"field": xString}
+                        //        }
+                        //    }
+                        //}
+                    ]
+                }
+            ]
+        }
+
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.xAxis;
+        chartObj.spec = spec;
+
+    }
+
+    igviz.drawGroupedBarChartVertical = function (chartObj) {
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //  var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        groupedBy = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.groupedBy]);
+
+        //  console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.groupedBy,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "width",
+            "field": groupedBy,
+            "padding": 0.2
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "height",
+            "round": 'true',
+            "field": yStrings,
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "val",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "cat",
+            "angle": 0,
+            "tickSize": 0,
+            "tickPadding": 8,
+            "title": dataTable.metadata.names[chartConfig.groupedBy],
+            "grid": false,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width - 150,
+            "height": chartConfig.height,
+            "data": [
+                {
+                    "name": "table"
+                }
+            ],
+            "scales": [
+                cScale, vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "axes": [
+                xAxis, yAxis
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.xAxis],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [{"type": "facet", "keys": [groupedBy]}]
+                    },
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "cat", "field": "key"},
+                            "width": {"scale": "cat", "band": true}
+                        }
+                    },
+                    "scales": [
+                        {
+                            "name": "pos",
+                            "type": "ordinal",
+                            "range": "width",
+                            "domain": {"field": xString}
+                        }
+                    ],
+                    "marks": [
+                        {
+                            "type": "rect",
+                            "properties": {
+                                "enter": {
+                                    "x": {"scale": "pos", "field": xString},
+                                    "width": {"scale": "pos", "band": true},
+                                    "y": {"scale": "val", "field": yStrings},
+                                    "y2": {"scale": "val", "value": 0},
+                                    "fill": {"scale": "color", "field": xString}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                                ,
+
+                                "update": {
+                                    "fillOpacity": {"value": 1}
+                                }
+                            }
+                        },
+                        //{
+                        //    "type": "text",
+                        //    "properties": {
+                        //        "enter": {
+                        //            "y": {"scale": "pos", "field": xString},
+                        //            "dy": {"scale": "pos", "band": true, "mult": 0.5},
+                        //            "x": {"scale": "val", "field": yStrings, "offset": -4},
+                        //            "fill": {"value": "white"},
+                        //            "align": {"value": "right"},
+                        //            "baseline": {"value": "middle"},
+                        //            "text": {"field": xString}
+                        //        }
+                        //    }
+                        //}
+                    ]
+                }
+            ]
+        }
+
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.xAxis;
+        chartObj.spec = spec;
+
+    }
+
+
+    /*************************************************** Area chart ***************************************************************************************************/
+
+    igviz.drawAreaChart = function (chartObj) {
+        // var padding = chartConfig.padding;
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+
+        if (chartConfig.yAxis.constructor === Array) {
+            return this.drawMultiAreaChart(chartObj)
+        }
+        if (chartConfig.hasOwnProperty("areaVar")) {
+            return this.drawStackedAreaChart(chartObj);
+        }
+
+        divId = chartObj.canvas;
+
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        //   console.log(table,xString,yStrings);
+        // sortDataSet(table);
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "zero": false,
+            "range": "width",
+            "field": xString
+        }
+
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "field": yStrings
+        }
+
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "right",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        if (chartConfig.interpolationMode == undefined) {
+            chartConfig.interpolationMode = "monotone"
+        }
+
+
+        var spec = {
+            "width": chartConfig.width - 100,
+            "height": chartConfig.height,
+            //  "padding":{"top":40,"bottom":60,'left':60,"right":40},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category10"
+                }
+            ],
+
+            "axes": [xAxis, yAxis]
+            ,
+
+            "marks": [
+                {
+                    "type": "area",
+                    "key": xString,
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "interpolate": {"value": chartConfig.interpolationMode},
+
+                            "y": {"scale": "y", "field": yStrings},
+                            "y2": {"scale": "y", "value": 0},
+                            "fill": {"scale": "color", "value": 2},
+                            "fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            "fillOpacity": {"value": 0.5}
+
+                        },
+                        "hover": {
+                            "fillOpacity": {"value": 0.2}
+
+                        }
+
+                    }
+                },
+                {
+                    "type": "line",
+                    "key": xString,
+
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"value": 400},
+                            "interpolate": {"value": chartConfig.interpolationMode},
+                            "y": {"scale": "y:prev", "field": yStrings},
+                            "stroke": {"scale": "color", "value": 2},
+                            "strokeWidth": {"value": 1.5}
+                        },
+                        "update": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yStrings}
+                        },
+                        "exit": {
+                            "x": {"value": -20},
+                            "y": {"scale": "y", "field": yStrings}
+                        }
+                    }
+                },
+                {
+                    "type": "symbol",
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yStrings},
+                            "fill": {"scale": "color", "value": 2},
+                            "size": {"value": 50}
+                            //"fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            "size": {"value": 50}
+
+                            //"size": {"scale":"r","field":rString},
+                            // "stroke": {"value": "transparent"}
+                        },
+                        "hover": {
+                            "size": {"value": 100},
+                            "stroke": {"value": "white"}
+                        }
+                    }
+                }
+
+            ]
+        }
+
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+
+
+            console.log(tool, event, item);
+            if (item.mark.marktype == 'symbol') {
+
+
+                xVar = dataTable.metadata.names[chartConfig.xAxis]
+                yVar = dataTable.metadata.names[chartConfig.yAxis]
+
+                contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr></table>';
+
+
+                tool.html(contentString).style({
+                    'left': event.pageX + 10 + 'px',
+                    'top': event.pageY + 10 + 'px',
+                    'opacity': 1
+                })
+                tool.selectAll('tr td').style('padding', "3px");
+            }
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+        chartObj.spec = spec;
+
+
+    };
+
+    igviz.drawMultiAreaChart = function (chartObj) {
+
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+        // table=setData(dataTable,chartConfig)
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yStrings = [];
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            yStrings[i] = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "range": "width",
+            "clamp": false,
+            "field": xString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis[0],
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yStrings[0]
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "left",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": "values",
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        if (chartConfig.interpolationMode == undefined) {
+            chartConfig.interpolationMode = "monotone";
+        }
+
+
+        var spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height,
+            //    "padding":{"top":40,"bottom":60,'left':60,"right":145},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category20"
+                }
+            ],
+            "legends": [
+                {
+
+                    "orient": "right",
+                    "fill": "color",
+                    "title": "Area",
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 1.5}
+
+                        }
+                    }
+                }
+            ],
+            "axes": [xAxis, yAxis]
+            ,
+
+            "marks": []
+        }
+
+        for (i = 0; i < chartConfig.yAxis.length; i++) {
+            areaObj = {
+                "type": "area",
+                "key": xString,
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"scale": "x", "field": xString},
+                        "interpolate": {"value": chartConfig.interpolationMode},
+                        "y": {"scale": "y", "field": yStrings[i]},
+                        "y2": {"scale": "y", "value": 0},
+                        "fill": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "fillOpacity": {"value": 0.5}
+                    },
+                    "update": {
+                        "fillOpacity": {"value": 0.5}
+
+                    },
+                    "hover": {
+                        "fillOpacity": {"value": 0.2}
+                    }
+
+                }
+            }
+
+            lineObj = {
+                "type": "line",
+                "key": xString,
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"value": 400},
+                        "interpolate": {"value": chartConfig.interpolationMode},
+                        "y": {"scale": "y:prev", "field": yStrings[i]},
+                        "stroke": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "strokeWidth": {"value": 1.5}
+                    },
+                    "update": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    },
+                    "exit": {
+                        "x": {"value": -20},
+                        "y": {"scale": "y", "field": yStrings[i]}
+                    }
+                }
+            }
+
+
+            pointObj = {
+                "type": "symbol",
+                "from": {"data": "table"},
+                "properties": {
+                    "enter": {
+                        "x": {"scale": "x", "field": xString},
+                        "y": {"scale": "y", "field": yStrings[i]},
+                        "fill": {"scale": "color", "value": dataTable.metadata.names[chartConfig.yAxis[i]]},
+                        "size": {"value": 50}
+                        //"fillOpacity": {"value": 0.5}
+                    },
+                    "update": {
+                        "size": {"value": 50}
+                        //"size": {"scale":"r","field":rString},
+                        // "stroke": {"value": "transparent"}
+                    },
+                    "hover": {
+                        "size": {"value": 100},
+                        "stroke": {"value": "white"}
+                    }
+                }
+            }
+
+
+            spec.marks.push(areaObj);
+
+            spec.marks.push(pointObj);
+            spec.marks.push(lineObj);
+            spec.legends[0].values.push(dataTable.metadata.names[chartConfig.yAxis[i]])
+
+        }
+
+
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+
+            a = 4
+
+            console.log(tool, event, item);
+            if (item.mark.marktype == 'symbol') {
+                // window.alert(a);
+
+                xVar = dataTable.metadata.names[chartConfig.xAxis]
+                yVar = dataTable.metadata.names[chartConfig.yAxis]
+
+                contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr></table>';
+
+
+                tool.html(contentString).style({
+                    'left': event.pageX + 10 + 'px',
+                    'top': event.pageY + 10 + 'px',
+                    'opacity': 1
+                })
+                tool.selectAll('tr td').style('padding', "3px");
+            }
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+        chartObj.spec = spec;
+
+        chartObj.spec = spec;
+
+
+    };
+
+    igviz.drawStackedAreaChart = function (chartObj) {
+
+        var chartConfig = chartObj.config;
+        var dataTable = chartObj.dataTable;
+        //  var table = setData(dataTable,chartConfig);
+        divId = chartObj.canvas;
+
+
+        areaString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.areaVar])
+        yStrings = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis]);
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis]);
+
+        //     console.log(table,xString,yStrings,groupedBy);
+        // sortDataSet(table);
+
+        cat = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "cat",
+            "range": "width",
+            "field": xString,
+            "padding": 0.2,
+            "zero": false,
+            "nice": true
+        }
+
+
+        val = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "val",
+            "range": "height",
+            "dataFrom": "stats",
+            "field": "sum",
+            "nice": true
+        }
+
+
+        var cScale = setScale(cat)
+        var vScale = setScale(val);
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "cat",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": -10,
+            "dy": 10,
+            "align": "left",
+            "titleDy": 10,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "val",
+            "angle": 0,
+            "title": dataTable.metadata.names[chartConfig.yAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -10,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+
+        spec = {
+            "width": chartConfig.width - 160,
+            "height": chartConfig.height - 100,
+            "padding": {"top": 10, "left": 60, "bottom": 60, "right": 100},
+            "data": [
+                {
+                    "name": "table"
+                },
+                {
+                    "name": "stats",
+                    "source": "table",
+                    "transform": [
+                        {"type": "facet", "keys": [xString]},
+                        {"type": "stats", "value": yStrings}
+                    ]
+                }
+            ],
+            "scales": [
+                cScale,
+                vScale,
+                {
+                    "name": "color",
+                    "type": "ordinal",
+                    "range": "category20"
+                }
+            ],
+            "legends": [
+                {
+                    "orient": {"value": "right"},
+                    "fill": "color",
+                    "title": dataTable.metadata.names[chartConfig.areaVar
+                        ],
+                    "values": [],
+                    "properties": {
+                        "title": {
+                            "fontSize": {"value": 14}
+                        },
+                        "labels": {
+                            "fontSize": {"value": 12}
+                        },
+                        "symbols": {
+                            "stroke": {"value": "transparent"}
+                        },
+                        "legend": {
+                            "stroke": {"value": "steelblue"},
+                            "strokeWidth": {"value": 0.5}
+
+
+                        }
+                    }
+                }
+            ],
+
+            "axes": [
+                xAxis, yAxis
+            ],
+            "marks": [
+                {
+                    "type": "group",
+                    "from": {
+                        "data": "table",
+                        "transform": [
+                            {"type": "facet", "keys": [areaString]},
+                            {"type": "stack", "point": xString, "height": yStrings}
+                        ]
+                    },
+                    "marks": [
+                        {
+                            "type": "area",
+                            "properties": {
+                                "enter": {
+                                    "interpolate": {"value": "monotone"},
+                                    "x": {"scale": "cat", "field": xString},
+                                    "y": {"scale": "val", "field": "y"},
+                                    "y2": {"scale": "val", "field": "y2"},
+                                    "fill": {"scale": "color", "field": areaString},
+                                    "fillOpacity": {"value": 0.8}
+
+                                },
+                                "update": {
+                                    "fillOpacity": {"value": 0.8}
+                                },
+                                "hover": {
+                                    "fillOpacity": {"value": 0.5}
+                                }
+                            }
+                        },
+                        {
+                            "type": "line",
+                            "properties": {
+                                "enter": {
+                                    "x": {"scale": "cat", "field": xString},
+                                    //"x": {"value": 400},
+                                    "interpolate": {"value": "monotone"},
+                                    "y": {"scale": "val", "field": "y"},
+                                    "stroke": {"scale": "color", "field": areaString},
+                                    "strokeWidth": {"value": 3}
+                                }
+                            }
+                        }
+                    ]
+                }
+            ]
+        }
+
+        chartObj.spec = spec;
+        chartObj.legend = true;
+        chartObj.legendIndex = chartConfig.areaVar;
+
+
+    }
+
+
+    /*************************************************** Arc chart ***************************************************************************************************/
+
+
+    igviz.drawArc = function (divId, chartConfig, dataTable) {
+
+        radialProgress(divId)
+            .label(dataTable.metadata.names[chartConfig.percentage])
+            .diameter(200)
+            .value(dataTable.data[0][chartConfig.percentage])
+            .render();
+
+
+        function radialProgress(parent) {
+            var _data = null,
+                _duration = 1000,
+                _selection,
+                _margin = {
+                    top: 0,
+                    right: 0,
+                    bottom: 30,
+                    left: 0
+                },
+                __width = chartConfig.width,
+                __height = chartConfig.height,
+                _diameter,
+                _label = "",
+                _fontSize = 10;
+
+
+            var _mouseClick;
+
+            var _value = 0,
+                _minValue = 0,
+                _maxValue = 100;
+
+            var _currentArc = 0,
+                _currentArc2 = 0,
+                _currentValue = 0;
+
+            var _arc = d3.svg.arc()
+                .startAngle(0 * (Math.PI / 180)); //just radians
+
+            var _arc2 = d3.svg.arc()
+                .startAngle(0 * (Math.PI / 180))
+                .endAngle(0); //just radians
+
+
+            _selection = d3.select(parent);
+
+
+            function component() {
+
+                _selection.each(function (data) {
+
+                    // Select the svg element, if it exists.
+                    var svg = d3.select(this).selectAll("svg").data([data]);
+
+                    var enter = svg.enter().append("svg").attr("class", "radial-svg").append("g");
+
+                    measure();
+
+                    svg.attr("width", __width)
+                        .attr("height", __height);
+
+
+                    var background = enter.append("g").attr("class", "component")
+                        .attr("cursor", "pointer")
+                        .on("click", onMouseClick);
+
+
+                    _arc.endAngle(360 * (Math.PI / 180))
+
+                    background.append("rect")
+                        .attr("class", "background")
+                        .attr("width", _width)
+                        .attr("height", _height);
+
+                    background.append("path")
+                        .attr("transform", "translate(" + _width / 2 + "," + _width / 2 + ")")
+                        .attr("d", _arc);
+
+                    background.append("text")
+                        .attr("class", "label")
+                        .attr("transform", "translate(" + _width / 2 + "," + (_width + _fontSize) + ")")
+                        .text(_label);
+
+                    //outer g element that wraps all other elements
+                    var gx = chartConfig.width / 2 - _width / 2;
+                    var gy = (chartConfig.height / 2 - _height / 2) - 17;
+                    var g = svg.select("g")
+                        .attr("transform", "translate(" + gx + "," + gy + ")");
+
+
+                    _arc.endAngle(_currentArc);
+                    enter.append("g").attr("class", "arcs");
+                    var path = svg.select(".arcs").selectAll(".arc").data(data);
+                    path.enter().append("path")
+                        .attr("class", "arc")
+                        .attr("transform", "translate(" + _width / 2 + "," + _width / 2 + ")")
+                        .attr("d", _arc);
+
+                    //Another path in case we exceed 100%
+                    var path2 = svg.select(".arcs").selectAll(".arc2").data(data);
+                    path2.enter().append("path")
+                        .attr("class", "arc2")
+                        .attr("transform", "translate(" + _width / 2 + "," + _width / 2 + ")")
+                        .attr("d", _arc2);
+
+
+                    enter.append("g").attr("class", "labels");
+                    var label = svg.select(".labels").selectAll(".labelArc").data(data);
+                    label.enter().append("text")
+                        .attr("class", "labelArc")
+                        .attr("y", _width / 2 + _fontSize / 3)
+                        .attr("x", _width / 2)
+                        .attr("cursor", "pointer")
+                        .attr("width", _width)
+                        // .attr("x",(3*_fontSize/2))
+                        .text(function (d) {
+                            return Math.round((_value - _minValue) / (_maxValue - _minValue) * 100) + "%"
+                        })
+                        .style("font-size", _fontSize + "px")
+                        .on("click", onMouseClick);
+
+                    path.exit().transition().duration(500).attr("x", 1000).remove();
+
+
+                    layout(svg);
+
+                    function layout(svg) {
+
+                        var ratio = (_value - _minValue) / (_maxValue - _minValue);
+                        var endAngle = Math.min(360 * ratio, 360);
+                        endAngle = endAngle * Math.PI / 180;
+
+                        path.datum(endAngle);
+                        path.transition().duration(_duration)
+                            .attrTween("d", arcTween);
+
+                        if (ratio > 1) {
+                            path2.datum(Math.min(360 * (ratio - 1), 360) * Math.PI / 180);
+                            path2.transition().delay(_duration).duration(_duration)
+                                .attrTween("d", arcTween2);
+                        }
+
+                        label.datum(Math.round(ratio * 100));
+                        label.transition().duration(_duration)
+                            .tween("text", labelTween);
+
+                    }
+
+                });
+
+                function onMouseClick(d) {
+                    if (typeof _mouseClick == "function") {
+                        _mouseClick.call();
+                    }
+                }
+            }
+
+            function labelTween(a) {
+                var i = d3.interpolate(_currentValue, a);
+                _currentValue = i(0);
+
+                return function (t) {
+                    _currentValue = i(t);
+                    this.textContent = Math.round(i(t)) + "%";
+                }
+            }
+
+            function arcTween(a) {
+                var i = d3.interpolate(_currentArc, a);
+
+                return function (t) {
+                    _currentArc = i(t);
+                    return _arc.endAngle(i(t))();
+                };
+            }
+
+            function arcTween2(a) {
+                var i = d3.interpolate(_currentArc2, a);
+
+                return function (t) {
+                    return _arc2.endAngle(i(t))();
+                };
+            }
+
+
+            function measure() {
+                _width = _diameter - _margin.right - _margin.left - _margin.top - _margin.bottom;
+                _height = _width;
+                _fontSize = _width * .2;
+                _arc.outerRadius(_width / 2);
+                _arc.innerRadius(_width / 2 * .85);
+                _arc2.outerRadius(_width / 2 * .85);
+                _arc2.innerRadius(_width / 2 * .85 - (_width / 2 * .15));
+            }
+
+
+            component.render = function () {
+                measure();
+                component();
+                return component;
+            }
+
+            component.value = function (_) {
+                if (!arguments.length) return _value;
+                _value = [_];
+                _selection.datum([_value]);
+                return component;
+            }
+
+
+            component.margin = function (_) {
+                if (!arguments.length) return _margin;
+                _margin = _;
+                return component;
+            };
+
+            component.diameter = function (_) {
+                if (!arguments.length) return _diameter
+                _diameter = _;
+                return component;
+            };
+
+            component.minValue = function (_) {
+                if (!arguments.length) return _minValue;
+                _minValue = _;
+                return component;
+            };
+
+            component.maxValue = function (_) {
+                if (!arguments.length) return _maxValue;
+                _maxValue = _;
+                return component;
+            };
+
+            component.label = function (_) {
+                if (!arguments.length) return _label;
+                _label = _;
+                return component;
+            };
+
+            component._duration = function (_) {
+                if (!arguments.length) return _duration;
+                _duration = _;
+                return component;
+            }
+
+            component.onClick = function (_) {
+                if (!arguments.length) return _mouseClick;
+                _mouseClick = _;
+                return component;
+            }
+
+            return component;
+
+        };
+
+    };
+
+
+    /*************************************************** Scatter chart ***************************************************************************************************/
+
+    igviz.drawScatterPlot = function (chartObj) {
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+        //    table=setData(dataTable,chartConfig)
+
+        xString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.xAxis])
+        yString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.yAxis])
+        rString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.pointSize])
+        cString = "data." + createAttributeNames(dataTable.metadata.names[chartConfig.pointColor])
+
+
+        xScaleConfig = {
+            "index": chartConfig.xAxis,
+            "schema": dataTable.metadata,
+            "name": "x",
+            "range": "width",
+            "zero": false,
+            "field": xString
+
+        }
+
+        rScaleConfig = {
+            "index": chartConfig.pointSize,
+            "range": [0, 576],
+            "schema": dataTable.metadata,
+            "name": "r",
+            "field": rString
+        }
+        cScaleConfig = {
+            "index": chartConfig.pointColor,
+            "schema": dataTable.metadata,
+            "name": "c",
+            "range": [chartConfig.minColor, chartConfig.maxColor],
+            "field": cString
+        }
+
+        yScaleConfig = {
+            "index": chartConfig.yAxis,
+            "schema": dataTable.metadata,
+            "name": "y",
+            "range": "height",
+            "nice": true,
+            "field": yString
+        }
+
+        var xScale = setScale(xScaleConfig)
+        var yScale = setScale(yScaleConfig);
+        var rScale = setScale(rScaleConfig);
+        var cScale = setScale(cScaleConfig)
+
+        var xAxisConfig = {
+            "type": "x",
+            "scale": "x",
+            "angle": -35,
+            "title": dataTable.metadata.names[chartConfig.xAxis],
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": 25,
+            "titleDx": 0
+        }
+        var yAxisConfig = {
+            "type": "y",
+            "scale": "y",
+            "angle": 0,
+            "title": "values",
+            "grid": true,
+            "dx": 0,
+            "dy": 0,
+            "align": "right",
+            "titleDy": -30,
+            "titleDx": 0
+        }
+        var xAxis = setAxis(xAxisConfig);
+        var yAxis = setAxis(yAxisConfig);
+
+        var spec = {
+            "width": chartConfig.width - 130,
+            "height": chartConfig.height,
+            //"padding":{"top":40,"bottom":60,'left':60,"right":60},
+            "data": [
+                {
+                    "name": "table"
+
+                }
+            ],
+            "scales": [
+                xScale, yScale,
+                {
+                    "name": "color", "type": "ordinal", "range": "category20"
+                },
+                rScale, cScale
+            ],
+            "axes": [xAxis, yAxis
+            ],
+            //"legends": [
+            //    {
+            //
+            //        "orient": "right",
+            //        "fill": "color",
+            //        "title": "Legend",
+            //        "values": [],
+            //        "properties": {
+            //            "title": {
+            //                "fontSize": {"value": 14}
+            //            },
+            //            "labels": {
+            //                "fontSize": {"value": 12}
+            //            },
+            //            "symbols": {
+            //                "stroke": {"value": "transparent"}
+            //            },
+            //            "legend": {
+            //                "stroke": {"value": "steelblue"},
+            //                "strokeWidth": {"value": 1.5}
+            //
+            //            }
+            //        }
+            //    }],
+
+
+            //    "scales": [
+            //    {
+            //        "name": "x",
+            //        "nice": true,
+            //        "range": "width",
+            //        "domain": {"data": "iris", "field": "data.sepalWidth"}
+            //    },
+            //    {
+            //        "name": "y",
+            //        "nice": true,
+            //        "range": "height",
+            //        "domain": {"data": "iris", "field": "data.petalLength"}
+            //    },
+            //    {
+            //        "name": "c",
+            //        "type": "ordinal",
+            //        "domain": {"data": "iris", "field": "data.species"},
+            //        "range": ["#800", "#080", "#008"]
+            //    }
+            //],
+            //    "axes": [
+            //    {"type": "x", "scale": "x", "offset": 5, "ticks": 5, "title": "Sepal Width"},
+            //    {"type": "y", "scale": "y", "offset": 5, "ticks": 5, "title": "Petal Length"}
+            //],
+            //    "legends": [
+            //    {
+            //        "fill": "c",
+            //        "title": "Species",
+            //        "offset": 0,
+            //        "properties": {
+            //            "symbols": {
+            //                "fillOpacity": {"value": 0.5},
+            //                "stroke": {"value": "transparent"}
+            //            }
+            //        }
+            //    }
+            //],
+            "marks": [
+                {
+                    "type": "symbol",
+                    "from": {"data": "table"},
+                    "properties": {
+                        "enter": {
+                            "x": {"scale": "x", "field": xString},
+                            "y": {"scale": "y", "field": yString},
+                            "fill": {"scale": "c", "field": cString}
+                            //"fillOpacity": {"value": 0.5}
+                        },
+                        "update": {
+                            "size": {"scale": "r", "field": rString}
+                            // "stroke": {"value": "transparent"}
+                        },
+                        "hover": {
+                            "size": {"value": 300},
+                            "stroke": {"value": "white"}
+                        }
+                    }
+                }
+            ]
+        }
+        chartObj.toolTipFunction = [];
+        chartObj.toolTipFunction[0] = function (event, item) {
+            console.log(tool, event, item);
+            xVar = dataTable.metadata.names[chartConfig.xAxis]
+            yVar = dataTable.metadata.names[chartConfig.yAxis]
+            pSize = dataTable.metadata.names[chartConfig.pointSize]
+            pColor = dataTable.metadata.names[chartConfig.pointColor]
+
+            contentString = '<table><tr><td> X </td><td> (' + xVar + ') </td><td>' + item.datum.data[xVar] + '</td></tr>' + '<tr><td> Y </td><td> (' + yVar + ') </td><td>' + item.datum.data[yVar] + '</td></tr>' + '<tr><td> Size </td><td> (' + pSize + ') </td><td>' + item.datum.data[pSize] + '</td></tr>' + '<tr><td bgcolor="' + item.fill + '">&nbsp; </td><td> (' + pColor + ') </td><td>' + item.datum.data[pColor] + '</td></tr>' +
+                '</table>';
+
+
+            tool.html(contentString).style({
+                'left': event.pageX + 10 + 'px',
+                'top': event.pageY + 10 + 'px',
+                'opacity': 1
+            })
+            tool.selectAll('tr td').style('padding', "3px");
+
+        }
+
+        chartObj.toolTipFunction[1] = function (event, item) {
+
+            tool.html("").style({'left': event.pageX + 10 + 'px', 'top': event.pageY + 10 + 'px', 'opacity': 0})
+
+        }
+
+        chartObj.spec = spec;
+        chartObj.toolTip = true;
+    }
+
+
+    /*************************************************** Single Number chart ***************************************************************************************************/
+
+    igviz.drawSingleNumberDiagram = function (chartObj) {
+
+        divId = chartObj.canvas;
+        chartConfig = chartObj.config;
+        dataTable = chartObj.dataTable;
+
+        //Width and height
+        var w = chartConfig.width;
+        var h = chartConfig.height;
+        var padding = chartConfig.padding;
+
+        var svgID = divId + "_svg";
+        //Remove current SVG if it is already there
+        d3.select(svgID).remove();
+
+        //Create SVG element
+        singleNumSvg = d3.select(divId)
+            .append("svg")
+            .attr("id", svgID.replace("#", ""))
+            .attr("width", w)
+            .attr("height", h);
+
+
+        singleNumSvg.append("rect")
+            .attr("id", "rect")
+            .attr("width", w)
+            .attr("height", h);
+
+        /*singleNumCurveSvg = d3.select(divId)
+         .append("svg")
+         .attr("id", svgID.replace("#",""))
+         .attr("width", 207)
+         .attr("height", 161);*/
+
+    };
+
+
+    /*************************************************** Table chart ***************************************************************************************************/
+
+    var cnt = 0;
+
+    igviz.drawTable = function (divId, chartConfig, dataTable) {
+
+        //remove the current table if it is already exist
+        d3.select(divId).select("table").remove();
+
+        var rowLabel = dataTable.metadata.names;
+
+        //append the Table to the div
+        var table = d3.select(divId).append("table").attr('class', 'table table-bordered');
+
+        //create the table head
+        thead = table.append("thead");
+        tbody = table.append("tbody")
+
+        //Append the header to the table
+        thead.append("tr")
+            .selectAll("th")
+            .data(rowLabel)
+            .enter()
+            .append("th")
+            .text(function (d) {
+                return d;
+            });
+    };
+
+    /*************************************************** map ***************************************************************************************************/
+    function loadWorldMapCodes() {
+        var fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/countryInfo/';
+        $.ajaxSetup({async: false});
+        $.getJSON(fileName, function (json) {
+            worldMapCodes = json;
+        });
+        $.ajaxSetup({async: true});
+    }
+
+    function loadUSAMapCodes() {
+        var fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/usaInfo/';
+        $.ajaxSetup({async: false});
+        $.getJSON(fileName, function (json) {
+            usaMapCodes = json;
+        });
+        $.ajaxSetup({async: true});
+    }
+
+    function getMapCode(name, region) {
+        if (region == "usa") {
+            $.each(usaMapCodes, function (i, location) {
+                if (usaMapCodes[name] != null && usaMapCodes[name] != "") {
+                    name = "US" + usaMapCodes[name];
+                }
+            });
+
+        } else {
+            $.each(worldMapCodes, function (i, location) {
+                if (name.toUpperCase() == location["name"].toUpperCase()) {
+                    name = location["alpha-3"];
+                }
+            });
+        }
+        return name;
+    };
+
+    igviz.drawMap = function (divId, chartConfig, dataTable) {
+
+        var fileName;
+        var width = chartConfig.width;
+        var height = chartConfig.height;
+        var xAxis = chartConfig.xAxis;
+        var yAxis = chartConfig.yAxis;
+
+        if (chartConfig.region == "usa") {
+            fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/usa/';
+            loadUSAMapCodes();
+            mapChart = d3.geomap.choropleth()
+                .geofile(fileName)
+                .projection(d3.geo.albersUsa)
+                .unitId(xAxis)
+                .width(width)
+                .height(height)
+                .colors(colorbrewer.RdPu[chartConfig.legendGradientLevel])
+                .column(yAxis)
+                .scale([width / 1.1])
+                .translate([width / 2, height / 2.2])
+                .legend(true);
+
+
+        } else {
+            fileName = document.location.protocol + "//" + document.location.host + '/portal/geojson/world/';
+
+            var scaleDivision = 5.5;
+            var widthDivision = 2;
+            var heightDivision = 2;
+
+            if (chartConfig.region == "europe") {
+
+                scaleDivision = width / height;
+                widthDivision = 3;
+                heightDivision = 0.8;
+
+            }
+            loadWorldMapCodes();
+            mapChart = d3.geomap.choropleth()
+                .geofile(fileName)
+                .unitId(xAxis)
+                .width(width)
+                .height(height)
+                .colors(colorbrewer.RdPu[chartConfig.legendGradientLevel])
+                .column(yAxis)
+                .scale([width / scaleDivision])
+                .translate([width / widthDivision, height / heightDivision])
+                .legend(true);
+        }
+    };
+
+
+    /*************************************************** Bar chart Drill Dowining Function  ***************************************************************************************************/
+
+    igviz.drillDown = function drillDown(index, divId, chartConfig, dataTable, originaltable) {
+        //  console.log(dataTable,chartConfig,divId);
+        if (index == 0) {
+            d3.select(divId).append('div').attr({id: 'links', height: 20, 'bgcolor': 'blue'})
+            d3.select(divId).append('div').attr({id: 'chartDiv'})
+            chartConfig.height = chartConfig.height - 20;
+            divId = "#chartDiv";
+        }
+        var currentChartConfig = JSON.parse(JSON.stringify(chartConfig));
+        var current_x = 0;
+        if (index < chartConfig.xAxis.length)
+            current_x = chartConfig.xAxis[index].index
+        else
+            current_x = chartConfig.xAxis[index - 1].child;
+
+        var current_y = chartConfig.yAxis;
+        var currentData = {
+            metadata: {
+                names: [dataTable.metadata.names[current_x], dataTable.metadata.names[current_y]],
+                types: [dataTable.metadata.types[current_x], dataTable.metadata.types[current_y]]
+            },
+            data: []
+        }
+
+        var tempData = [];
+        for (i = 0; i < dataTable.data.length; i++) {
+            name = dataTable.data[i][current_x];
+            currentYvalue = dataTable.data[i][current_y];
+            isFound = false;
+            var j = 0;
+            for (; j < tempData.length; j++) {
+                if (tempData[j][0] === name) {
+                    isFound = true;
+                    break;
+                }
+            }
+            if (isFound) {
+                tempData[j][1] += currentYvalue;
+                console.log(name, currentYvalue, tempData[j][1]);
+            } else {
+                console.log("create", name, currentYvalue);
+                tempData.push([name, currentYvalue])
+            }
+        }
+
+        currentData.data = tempData;
+        currentChartConfig.xAxis = 0;
+        currentChartConfig.yAxis = 1;
+        currentChartConfig.chartType = 'bar';
+
+
+        var x = this.setUp(divId, currentChartConfig, currentData);
+        x.plot(currentData.data, function () {
+
+            var filters = d3.select('#links .root').on('click', function () {
+                d3.select("#links").html('');
+                igviz.drillDown(0, divId, chartConfig, originaltable, originaltable);
+
+            })
+
+
+            var filters = d3.select('#links').selectAll('.filter');
+            filters.on('click', function (d, i) {
+
+                filtersList = filters.data();
+
+                console.log(filtersList)
+                var filterdDataset = [];
+                var selectionObj = JSON.parse(JSON.stringify(originaltable));
+                itr = 0;
+                for (l = 0; l < originaltable.data.length; l++) {
+                    isFiltered = true;
+                    for (k = 0; k <= i; k++) {
+
+                        if (originaltable.data[l][filtersList[k][0]] !== filtersList[k][1]) {
+                            isFiltered = false;
+                            break;
+                        }
+                    }
+                    if (isFiltered) {
+                        filterdDataset[itr++] = originaltable.data[l];
+                    }
+
+                }
+
+                d3.selectAll('#links g').each(function (d, indx) {
+                    if (indx > i) {
+                        this.remove();
+                    }
+                })
+
+
+                selectionObj.data = filterdDataset;
+
+                igviz.drillDown(i + 1, divId, chartConfig, selectionObj, originaltable, true);
+
+
+            });
+
+
+            if (index < chartConfig.xAxis.length) {
+                console.log(x);
+                d3.select(x.chart._el).selectAll('g.type-rect rect').on('click', function (d, i) {
+                    // console.log(d, i, this);
+                    console.log(d, i);
+                    var selectedName = d.datum.data[x.dataTable.metadata.names[x.config.xAxis]];
+                    //  console.log(selectedName);
+                    var selectedCurrentData = JSON.parse(JSON.stringify(dataTable));
+                    var innerText;
+
+                    var links = d3.select('#links').append('g').append('text').text(dataTable.metadata.names[current_x] + " : ").attr({
+
+                        "font-size": "10px",
+                        "x": 10,
+                        "y": 20
+
+                    });
+
+                    d3.select('#links:first-child').selectAll('text').attr('class', 'root');
+
+                    d3.select('#links g:last-child').append('span').data([[current_x, selectedName]]).attr('class', 'filter').text(selectedName + "  >  ")
+
+                    var l = selectedCurrentData.data.length;
+                    var newdata = [];
+                    b = 0;
+                    for (a = 0; a < l; a++) {
+                        if (selectedCurrentData.data[a][current_x] === selectedName) {
+                            newdata[b++] = selectedCurrentData.data[a];
+                        }
+                    }
+
+
+                    selectedCurrentData.data = newdata;
+
+
+                    igviz.drillDown(index + 1, divId, chartConfig, selectedCurrentData, originaltable, true);
+
+
+                });
+
+            }
+        });
+
+
+    }
+
+
+    /*************************************************** Specification Generation method ***************************************************************************************************/
+
+
+    function setScale(scaleConfig) {
+        var scale = {"name": scaleConfig.name};
+
+        console.log(scaleConfig.schema, scaleConfig.index);
+
+        dataFrom = "table";
+
+        scale.range = scaleConfig.range;
+
+
+        switch (scaleConfig.schema.types[scaleConfig.index]) {
+            case 'T':
+                scale["type"] = 'time'
+
+                break;
+
+            case 'C':
+                scale["type"] = 'ordinal'
+                if (scale.name === "c") {
+                    scale.range = "category20";
+                }
+
+                break;
+            case 'N':
+                scale["type"] = 'linear'
+
+                break;
+        }
+        if (scaleConfig.hasOwnProperty("dataFrom")) {
+            dataFrom = scaleConfig.dataFrom;
+        }
+
+        scale.range = scaleConfig.range;
+        scale.domain = {"data": dataFrom, "field": scaleConfig.field}
+
+        //optional attributes
+        if (scaleConfig.hasOwnProperty("round")) {
+            scale["round"] = scaleConfig.round;
+        }
+
+        if (scaleConfig.hasOwnProperty("nice")) {
+            scale["nice"] = scaleConfig.nice;
+        }
+
+        if (scaleConfig.hasOwnProperty("padding")) {
+            scale["padding"] = scaleConfig.padding;
+        }
+
+        if (scaleConfig.hasOwnProperty("reverse")) {
+            scale["reverse"] = scaleConfig.reverse;
+        }
+
+        if (scaleConfig.hasOwnProperty("sort")) {
+            scale["sort"] = scaleConfig.sort;
+        }
+
+        if (scale.name == 'x' && scale.type == 'linear') {
+            scale.sort = true;
+        }
+        if (scaleConfig.hasOwnProperty("clamp")) {
+            scale["clamp"] = scaleConfig.clamp;
+        }
+
+
+        if (scaleConfig.hasOwnProperty("zero")) {
+            scale["zero"] = scaleConfig.zero;
+        }
+        console.log(scale);
+        return scale;
+
+    }
+
+    function setAxis(axisConfig) {
+
+        console.log("Axis", axisConfig);
+
+        axis = {
+            "type": axisConfig.type,
+            "scale": axisConfig.scale,
+            'title': axisConfig.title,
+            "grid": axisConfig.grid,
+
+            "properties": {
+                "ticks": {
+                    // "stroke": {"value": "steelblue"}
+                },
+                "majorTicks": {
+                    "strokeWidth": {"value": 2}
+                },
+                "labels": {
+                    // "fill": {"value": "steelblue"},
+                    "angle": {"value": axisConfig.angle},
+                    // "fontSize": {"value": 14},
+                    "align": {"value": axisConfig.align},
+                    "baseline": {"value": "middle"},
+                    "dx": {"value": axisConfig.dx},
+                    "dy": {"value": axisConfig.dy}
+                },
+                "title": {
+                    "fontSize": {"value": 16},
+
+                    "dx": {'value': axisConfig.titleDx},
+                    "dy": {'value': axisConfig.titleDy}
+                },
+                "axis": {
+                    "stroke": {"value": "#333"},
+                    "strokeWidth": {"value": 1.5}
+                }
+
+            }
+
+        }
+
+        if (axisConfig.hasOwnProperty("tickSize")) {
+            axis["tickSize"] = axisConfig.tickSize;
+        }
+
+
+        if (axisConfig.hasOwnProperty("tickPadding")) {
+            axis["tickPadding"] = axisConfig.tickPadding;
+        }
+
+        console.log("SpecAxis", axis);
+        return axis;
+    }
+
+    function setLegends(chartConfig, schema) {
+
+    }
+
+    function setData(dataTableObj, chartConfig, schema) {
+
+        var table = [];
+        for (i = 0; i < dataTableObj.length; i++) {
+            var ptObj = {};
+            namesArray = schema.names;
+            for (j = 0; j < namesArray.length; j++) {
+                if (schema.types[j] == 'T') {
+                    ptObj[createAttributeNames(namesArray[j])] = new Date(dataTableObj[i][j]);
+                } else
+                    ptObj[createAttributeNames(namesArray[j])] = dataTableObj[i][j];
+            }
+
+            table[i] = ptObj;
+        }
+
+        return table;
+    }
+
+    function createAttributeNames(str) {
+        return str.replace(' ', '_');
+    }
+
+    function setGenericAxis(axisConfig, spec) {
+        MappingObj = {};
+        MappingObj["tickSize"] = "tickSize";
+        MappingObj["tickPadding"] = "tickPadding";
+        MappingObj["title"] = "title";
+        MappingObj["grid"] = "grid";
+        MappingObj["offset"] = "offset";
+        MappingObj["ticks"] = "ticks";
+
+        MappingObj["labelColor"] = "fill";
+        MappingObj["labelAngle"] = "angle";
+        MappingObj["labelAlign"] = "align";
+        MappingObj["labelFontSize"] = "fontSize";
+        MappingObj["labelDx"] = "dx";
+        MappingObj["labelDy"] = "dy";
+        MappingObj["labelBaseLine"] = "baseline";
+
+        MappingObj["titleDx"] = "dx";
+        MappingObj["titleDy"] = "dy";
+        MappingObj["titleFontSize"] = "fontSize";
+
+        MappingObj["axisColor"] = "stroke";
+        MappingObj["axisWidth"] = "strokeWidth";
+
+        MappingObj["tickColor"] = "ticks.stroke";
+        MappingObj["tickWidth"] = "ticks.strokeWidth";
+
+
+        console.log("previous Axis", spec)
+        for (var propt in axisConfig) {
+
+            if (propt == "tickSize" || propt == "tickPadding")
+                continue;
+
+            if (axisConfig.hasOwnProperty(propt)) {
+
+                if (propt.indexOf("label") == 0)
+                    spec.properties.labels[MappingObj[propt]].value = axisConfig[propt];
+                else if (propt.indexOf("ticks") == 0)
+                    spec.properties.ticks[MappingObj[propt]].value = axisConfig[propt];
+                else if (propt.indexOf("title") == 0)
+                    spec.properties.title[MappingObj[propt]].value = axisConfig[propt];
+                else if (propt.indexOf("axis") == 0)
+                    spec.properties.axis[MappingObj[propt]].value = axisConfig[propt];
+                else
+                    spec[MappingObj[propt]] = axisConfig[propt];
+            }
+        }
+
+        console.log("NEW SPEC", spec);
+    }
+
+    function createS

<TRUNCATED>

[38/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
Removing artifact version from stratos-metering-service capps


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/9d7226a7
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/9d7226a7
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/9d7226a7

Branch: refs/heads/stratos-4.1.x
Commit: 9d7226a747941265074d408a10e7f110303337d8
Parents: 7656e20
Author: Thanuja <th...@wso2.com>
Authored: Tue Oct 13 20:17:32 2015 +0530
Committer: Thanuja <th...@wso2.com>
Committed: Tue Oct 13 20:17:32 2015 +0530

----------------------------------------------------------------------
 .../Dashboard/artifact.xml                      |    24 +
 .../Dashboard/stratos-metering-dashboard.json   |   267 +
 .../EventreceiverMemberInfo/artifact.xml        |    24 +
 .../member_info_receiver.xml                    |    29 +
 .../EventreceiverMemberLifecycle/artifact.xml   |    24 +
 .../member_lifecycle_receiver.xml               |    29 +
 .../EventstoreMemberInfo/artifact.xml           |    24 +
 .../EventstoreMemberInfo/member_info.xml        |   148 +
 .../EventstoreMemberLifecycle/artifact.xml      |    24 +
 .../member_lifecycle.xml                        |    99 +
 .../EventstreamMemberInfo/artifact.xml          |    24 +
 .../member_info_1.0.0.json                      |    76 +
 .../EventstreamMemberLifecycle/artifact.xml     |    24 +
 .../member_lifecycle_1.0.0.json                 |    48 +
 .../Member_Count/css/bootstrap.min.css          |  5935 ++++++
 .../Member_Count/css/d3.geomap.css              |    48 +
 .../Member_Count/css/igviz.css                  |    86 +
 .../GadgetMemberCount/Member_Count/gadget.json  |    19 +
 .../GadgetMemberCount/Member_Count/index.xml    |    85 +
 .../js/d3.geomap.dependencies.min.js            |  8249 ++++++++
 .../Member_Count/js/d3.geomap.min.js            |   538 +
 .../GadgetMemberCount/Member_Count/js/d3.min.js |  6332 +++++++
 .../Member_Count/js/excanvas.min.js             |   954 +
 .../Member_Count/js/gadgetconf.js               |    56 +
 .../GadgetMemberCount/Member_Count/js/igviz.js  |  3585 ++++
 .../GadgetMemberCount/Member_Count/js/jquery.js |  9496 ++++++++++
 .../GadgetMemberCount/Member_Count/js/main.js   |   170 +
 .../Member_Count/js/outputAdapterUiLibrary.js   |   275 +
 .../GadgetMemberCount/Member_Count/js/vega.js   |  8006 ++++++++
 .../GadgetMemberCount/artifact.xml              |    24 +
 .../Member_Details_Filter/css/jquery-ui.css     |  1225 ++
 .../Member_Details_Filter/css/style.css         |   221 +
 .../Member_Details_Filter/gadget.json           |    23 +
 .../Member_Details_Filter/index.png             |   Bin 0 -> 6754 bytes
 .../Member_Details_Filter/index.xml             |    67 +
 .../Member_Details_Filter/js/jquery-ui.js       | 16617 +++++++++++++++++
 .../js/member-details-filter.js                 |   138 +
 .../GadgetMemberDetailsFilter/artifact.xml      |    24 +
 .../Member_Information/css/bootstrap.min.css    |  5935 ++++++
 .../Member_Information/css/d3.geomap.css        |    48 +
 .../Member_Information/css/igviz.css            |    86 +
 .../Member_Information/gadget.json              |    19 +
 .../Member_Information/index.xml                |    88 +
 .../js/d3.geomap.dependencies.min.js            |  8249 ++++++++
 .../Member_Information/js/d3.geomap.min.js      |   538 +
 .../Member_Information/js/d3.min.js             |  6332 +++++++
 .../Member_Information/js/excanvas.min.js       |   954 +
 .../Member_Information/js/gadgetconf.js         |    89 +
 .../Member_Information/js/igviz.js              |  3565 ++++
 .../Member_Information/js/jquery.js             |  9496 ++++++++++
 .../Member_Information/js/main.js               |   168 +
 .../js/outputAdapterUiLibrary.js                |   276 +
 .../Member_Information/js/vega.js               |  8006 ++++++++
 .../GadgetMemberInformation/artifact.xml        |    24 +
 .../Member_Status/css/bootstrap.min.css         |  5935 ++++++
 .../Member_Status/css/d3.geomap.css             |    67 +
 .../Member_Status/css/igviz.css                 |    86 +
 .../Member_Status/gadget.json                   |    19 +
 .../GadgetMemberStatus/Member_Status/index.xml  |    87 +
 .../js/d3.geomap.dependencies.min.js            |  8249 ++++++++
 .../Member_Status/js/d3.geomap.min.js           |   538 +
 .../Member_Status/js/d3.min.js                  |  6332 +++++++
 .../Member_Status/js/excanvas.min.js            |   954 +
 .../Member_Status/js/gadgetconf.js              |    50 +
 .../Member_Status/js/igviz.js                   |  3565 ++++
 .../Member_Status/js/jquery.js                  |  9496 ++++++++++
 .../GadgetMemberStatus/Member_Status/js/main.js |   170 +
 .../Member_Status/js/outputAdapterUiLibrary.js  |   276 +
 .../GadgetMemberStatus/Member_Status/js/vega.js |  8006 ++++++++
 .../GadgetMemberStatus/artifact.xml             |    24 +
 .../Member_Status_Filter/css/jquery-ui.css      |  1225 ++
 .../Member_Status_Filter/css/style.css          |   253 +
 .../Member_Status_Filter/gadget.json            |    23 +
 .../Member_Status_Filter/index.png              |   Bin 0 -> 12554 bytes
 .../Member_Status_Filter/index.xml              |    72 +
 .../Member_Status_Filter/js/jquery-ui.js        | 16617 +++++++++++++++++
 .../js/member-status-filter.js                  |   140 +
 .../GadgetMemberStatusFilter/artifact.xml       |    24 +
 .../SparkscriptsMemberInfo/artifact.xml         |    24 +
 .../member_information.xml                      |    36 +
 .../SparkscriptsMemberLifecycle/artifact.xml    |    24 +
 .../member_count.xml                            |    55 +
 82 files changed, 169257 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/artifact.xml
new file mode 100644
index 0000000..bd6d164
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="Dashboard" version="1.0.0" type="dashboards/dashboard" serverRole="DataAnalyticsServer">
+    <file>stratos-metering-dashboard.json</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json
new file mode 100644
index 0000000..96413db
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/Dashboard/stratos-metering-dashboard.json
@@ -0,0 +1,267 @@
+{
+  "id": "stratos-metering-dashboard",
+  "title": "Stratos Metering Dashboard",
+  "description": "This dashboard is to show metering data.",
+  "permissions": {
+    "viewers": [],
+    "editors": [
+      "Internal/everyone"
+    ]
+  },
+  "pages": [
+    {
+      "id": "member-status",
+      "title": "Member Status",
+      "layout": {
+        "id": "single-column",
+        "title": "Single Column",
+        "description": "This is a layout generated through single-column.io",
+        "thumbnail": "store://layout/single-column/index.png",
+        "url": "store://layout/single-column/index.hbs",
+        "content": "<!--\n\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n\n-->\n<div class=\"container\">\n<div class=\"row\">\n    <div id=\"a\" class=\"col-md-12 ues-component-box\"></div>\n    <div id=\"b\" class=\"col-md-12 ues-component-box\"></div
 >\n    <div id=\"c\" class=\"col-md-12 ues-component-box\"></div>\n</div>\n</div>\n"
+      },
+      "content": {
+        "a": [
+          {
+            "id": "ehng97cyk3kxogvi",
+            "content": {
+              "id": "Member_Status_Filter",
+              "title": "Member Status Filter",
+              "type": "gadget",
+              "thumbnail": "store://gadget/Member_Status_Filter/index.png",
+              "data": {
+                "url": "store://gadget/Member_Status_Filter/index.xml"
+              },
+              "styles": {
+                "title": "",
+                "height": "100",
+                "borders": false,
+                "titlePosition": "left"
+              },
+              "notify": {
+                "member-status-filter": {
+                  "type": "address",
+                  "description": "This notifies time interval"
+                },
+                "cancel": {
+                  "type": "boolean",
+                  "description": "This notifies cancellation of state selection"
+                }
+              },
+              "options": {},
+              "settings": {}
+            }
+          }
+        ],
+        "b": [
+          {
+            "id": "q1pf6m8s5bq08uxr",
+            "content": {
+              "id": "Member_Count",
+              "title": "Member Count",
+              "type": "gadget",
+              "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png",
+              "data": {
+                "url": "local://store/carbon.super/gadget/Member_Count/index.xml"
+              },
+              "listen": {
+                "member-status-filter": {
+                  "type": "address",
+                  "description": "Used to filter based on state",
+                  "on": [
+                    {
+                      "from": "ehng97cyk3kxogvi",
+                      "event": "member-status-filter"
+                    }
+                  ]
+                },
+                "auto-update": {
+                  "type": "boolean",
+                  "description": "Used to filter based on state",
+                  "on": []
+                }
+              },
+              "styles": {
+                "title": "",
+                "height": "400",
+                "borders": true,
+                "titlePosition": "left"
+              },
+              "options": {
+                "dataSource": {
+                  "type": "STRING",
+                  "title": "Data Source",
+                  "value": "/portal/gadgets/bar-chart/datasource/dataFile4.jag",
+                  "options": [],
+                  "required": false
+                },
+                "updateGraph": {
+                  "type": "STRING",
+                  "title": "Update Interval (s)",
+                  "value": "No",
+                  "options": [],
+                  "required": false
+                }
+              },
+              "settings": {}
+            }
+          }
+        ],
+        "c": [
+          {
+            "id": "qf9lnn9oiv1pds4i",
+            "content": {
+              "id": "Member_Update",
+              "title": "Member Status",
+              "type": "gadget",
+              "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png",
+              "data": {
+                "url": "local://store/carbon.super/gadget/Member_Status/index.xml"
+              },
+              "listen": {
+                "member-status-filter": {
+                  "type": "address",
+                  "description": "Used to filter based on state",
+                  "on": [
+                    {
+                      "from": "ehng97cyk3kxogvi",
+                      "event": "member-status-filter"
+                    }
+                  ]
+                },
+                "auto-update": {
+                  "type": "boolean",
+                  "description": "Used to filter based on state",
+                  "on": []
+                }
+              },
+              "styles": {
+                "title": "",
+                "height": "800",
+                "borders": true,
+                "titlePosition": "left"
+              },
+              "options": {
+                "dataSource": {
+                  "type": "STRING",
+                  "title": "Data Source",
+                  "value": "/portal/gadgets/bar-chart/datasource/dataFile4.jag",
+                  "options": [],
+                  "required": false
+                },
+                "updateGraph": {
+                  "type": "STRING",
+                  "title": "Update Interval (s)",
+                  "value": "No",
+                  "options": [],
+                  "required": false
+                }
+              },
+              "settings": {}
+            }
+          }
+        ]
+      }
+    },
+    {
+      "id": "member-details",
+      "title": "Member Details",
+      "layout": {
+        "id": "single-column",
+        "title": "Single Column",
+        "description": "This is a layout generated through single-column.io",
+        "thumbnail": "store://layout/single-column/index.png",
+        "url": "store://layout/single-column/index.hbs",
+        "content": "<!--\n\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements.  See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership.  The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License.  You may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied.  See the License for the\n specific language governing permissions and limitations\n under the License.\n\n-->\n<div class=\"container\">\n<div class=\"row\">\n    <div id=\"a\" class=\"col-md-12 ues-component-box\"></div>\n    <div id=\"b\" class=\"col-md-12 ues-component-box\"></div
 >\n    <div id=\"c\" class=\"col-md-12 ues-component-box\"></div>\n</div>\n</div>\n"
+      },
+      "content": {
+        "a": [
+          {
+            "id": "8zgl65uoackgldi",
+            "content": {
+              "id": "Member_Details_Filter",
+              "title": "Member Details Filter",
+              "type": "gadget",
+              "thumbnail": "store://gadget/Member_Details_Filter/index.png",
+              "data": {
+                "url": "store://gadget/Member_Details_Filter/index.xml"
+              },
+              "styles": {
+                "title": "",
+                "height": "100",
+                "borders": false,
+                "titlePosition": "left"
+              },
+              "notify": {
+                "member-details-filter": {
+                  "type": "address",
+                  "description": "This notifies applicationId and clusterId"
+                }
+              },
+              "cancel": {
+                "type": "boolean",
+                "description": "This notifies cancellation of state selection"
+              },
+              "options": {},
+              "settings": {}
+            }
+          }
+        ],
+        "b": [
+          {
+            "id": "hoqfz4b6z91nstt9",
+            "content": {
+              "id": "Member_Details",
+              "title": "Member Details",
+              "type": "gadget",
+              "thumbnail": "local://store/carbon.super/gadget/usa-business-revenue/index.png",
+              "data": {
+                "url": "local://store/carbon.super/gadget/Member_Information/index.xml"
+              },
+              "listen": {
+                "member-details-filter": {
+                  "type": "address",
+                  "description": "Used to filter based on state",
+                  "on": [
+                    {
+                      "from": "8zgl65uoackgldi",
+                      "event": "member-details-filter"
+                    }
+                  ]
+                },
+                "auto-update": {
+                  "type": "boolean",
+                  "description": "Used to filter based on state"
+                }
+              },
+              "styles": {
+                "title": "",
+                "height": "800",
+                "borders": true,
+                "titlePosition": "left"
+              },
+              "options": {
+                "dataSource": {
+                  "type": "STRING",
+                  "title": "Data Source",
+                  "value": "/portal/gadgets/bar-chart/datasource/dataFile4.jag",
+                  "options": [],
+                  "required": false
+                },
+                "updateGraph": {
+                  "type": "STRING",
+                  "title": "Update Interval (s)",
+                  "value": "No",
+                  "options": [],
+                  "required": false
+                }
+              },
+              "settings": {}
+            }
+          }
+        ]
+      }
+    }
+  ],
+  "landing": "member-status"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberInfo/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberInfo/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberInfo/artifact.xml
new file mode 100644
index 0000000..c64b395
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberInfo/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventreceiverMemberInfo" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
+    <file>member_info_receiver.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberInfo/member_info_receiver.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberInfo/member_info_receiver.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberInfo/member_info_receiver.xml
new file mode 100644
index 0000000..509788e
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberInfo/member_info_receiver.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<eventReceiver name="MemberInfoEventReceiver" statistics="disable"
+               trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
+    <from eventAdapterType="wso2event">
+        <property name="events.duplicated.in.cluster">false</property>
+    </from>
+    <mapping customMapping="disable" type="wso2event"/>
+    <to streamName="member_info" version="1.0.0"/>
+</eventReceiver>

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberLifecycle/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberLifecycle/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberLifecycle/artifact.xml
new file mode 100644
index 0000000..a6a68ff
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberLifecycle/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventreceiverMemberLifecycle" version="1.0.0" type="event/receiver" serverRole="DataAnalyticsServer">
+    <file>member_lifecycle_receiver.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberLifecycle/member_lifecycle_receiver.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberLifecycle/member_lifecycle_receiver.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberLifecycle/member_lifecycle_receiver.xml
new file mode 100644
index 0000000..146a5bc
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventreceiverMemberLifecycle/member_lifecycle_receiver.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<eventReceiver name="MemberLifecycleEventReceiver" statistics="disable"
+               trace="disable" xmlns="http://wso2.org/carbon/eventreceiver">
+    <from eventAdapterType="wso2event">
+        <property name="events.duplicated.in.cluster">false</property>
+    </from>
+    <mapping customMapping="disable" type="wso2event"/>
+    <to streamName="member_lifecycle" version="1.0.0"/>
+</eventReceiver>

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberInfo/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberInfo/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberInfo/artifact.xml
new file mode 100644
index 0000000..e018b0c
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberInfo/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventstoreMemberInfo" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
+    <file>member_info.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberInfo/member_info.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberInfo/member_info.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberInfo/member_info.xml
new file mode 100644
index 0000000..8b33298
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberInfo/member_info.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<EventStoreConfiguration>
+    <TableSchema>
+        <ColumnDefinition>
+            <Name>member_id</Name>
+            <EnableIndexing>true</EnableIndexing>
+            <IsPrimaryKey>true</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>instance_type</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>scaling_decision_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>is_multi_tenant</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>private_IP_addresses</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>public_IP_addresses</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>allocated_IP_addresses</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>host_name</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>hypervisor</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>cpu</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>ram</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>image_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>login_port</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>INTEGER</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>os_name</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>os_version</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>os_architecture</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>is_64bit_os</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>BOOLEAN</Type>
+        </ColumnDefinition>
+    </TableSchema>
+    <Source>
+        <StreamId>member_info:1.0.0</StreamId>
+    </Source>
+    <RecordStoreName>EVENT_STORE</RecordStoreName>
+</EventStoreConfiguration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberLifecycle/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberLifecycle/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberLifecycle/artifact.xml
new file mode 100644
index 0000000..b6b4438
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberLifecycle/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventstoreMemberLifecycle" version="1.0.0" type="analytics/eventstore" serverRole="DataAnalyticsServer">
+    <file>member_lifecycle.xml</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberLifecycle/member_lifecycle.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberLifecycle/member_lifecycle.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberLifecycle/member_lifecycle.xml
new file mode 100644
index 0000000..bf3b220
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstoreMemberLifecycle/member_lifecycle.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<EventStoreConfiguration>
+    <TableSchema>
+        <ColumnDefinition>
+            <Name>timestamp</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>LONG</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>application_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>cluster_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>cluster_alias</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>cluster_instance_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>service_name</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>network_partition_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>partition_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>member_id</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+        <ColumnDefinition>
+            <Name>member_status</Name>
+            <EnableIndexing>false</EnableIndexing>
+            <IsPrimaryKey>false</IsPrimaryKey>
+            <EnableScoreParam>false</EnableScoreParam>
+            <Type>STRING</Type>
+        </ColumnDefinition>
+    </TableSchema>
+    <Source>
+        <StreamId>member_lifecycle:1.0.0</StreamId>
+    </Source>
+    <RecordStoreName>EVENT_STORE</RecordStoreName>
+</EventStoreConfiguration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberInfo/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberInfo/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberInfo/artifact.xml
new file mode 100644
index 0000000..3d957ce
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberInfo/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventstreamMemberInfo" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
+    <file>member_info_1.0.0.json</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberInfo/member_info_1.0.0.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberInfo/member_info_1.0.0.json b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberInfo/member_info_1.0.0.json
new file mode 100644
index 0000000..d0b89a6
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberInfo/member_info_1.0.0.json
@@ -0,0 +1,76 @@
+{
+  "name": "member_info",
+  "version": "1.0.0",
+  "nickName": "Member Information",
+  "description": "Member Information",
+  "payloadData": [
+    {
+      "name": "member_id",
+      "type": "STRING"
+    },
+    {
+      "name": "instance_type",
+      "type": "STRING"
+    },
+    {
+      "name": "scaling_decision_id",
+      "type": "STRING"
+    },
+    {
+      "name": "is_multi_tenant",
+      "type": "STRING"
+    },
+    {
+      "name": "private_IP_addresses",
+      "type": "STRING"
+    },
+    {
+      "name": "public_IP_addresses",
+      "type": "STRING"
+    },
+    {
+      "name": "allocated_IP_addresses",
+      "type": "STRING"
+    },
+    {
+      "name": "host_name",
+      "type": "STRING"
+    },
+    {
+      "name": "hypervisor",
+      "type": "STRING"
+    },
+    {
+      "name": "cpu",
+      "type": "STRING"
+    },
+    {
+      "name": "ram",
+      "type": "STRING"
+    },
+    {
+      "name": "image_id",
+      "type": "STRING"
+    },
+    {
+      "name": "login_port",
+      "type": "INT"
+    },
+    {
+      "name": "os_name",
+      "type": "STRING"
+    },
+    {
+      "name": "os_version",
+      "type": "STRING"
+    },
+    {
+      "name": "os_architecture",
+      "type": "STRING"
+    },
+    {
+      "name": "is_64bit_os",
+      "type": "BOOL"
+    }
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberLifecycle/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberLifecycle/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberLifecycle/artifact.xml
new file mode 100644
index 0000000..40de1f3
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberLifecycle/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="EventstreamMemberLifecycle" version="1.0.0" type="event/stream" serverRole="DataAnalyticsServer">
+    <file>member_lifecycle_1.0.0.json</file>
+</artifact>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberLifecycle/member_lifecycle_1.0.0.json
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberLifecycle/member_lifecycle_1.0.0.json b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberLifecycle/member_lifecycle_1.0.0.json
new file mode 100644
index 0000000..4e6699a
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/EventstreamMemberLifecycle/member_lifecycle_1.0.0.json
@@ -0,0 +1,48 @@
+{
+  "name": "member_lifecycle",
+  "version": "1.0.0",
+  "nickName": "Member Lifecycle",
+  "description": "Member Lifecycle",
+  "payloadData": [
+    {
+      "name": "timestamp",
+      "type": "LONG"
+    },
+    {
+      "name": "application_id",
+      "type": "STRING"
+    },
+    {
+      "name": "cluster_id",
+      "type": "STRING"
+    },
+    {
+      "name": "cluster_alias",
+      "type": "STRING"
+    },
+    {
+      "name": "cluster_instance_id",
+      "type": "STRING"
+    },
+    {
+      "name": "service_name",
+      "type": "STRING"
+    },
+    {
+      "name": "network_partition_id",
+      "type": "STRING"
+    },
+    {
+      "name": "partition_id",
+      "type": "STRING"
+    },
+    {
+      "name": "member_id",
+      "type": "STRING"
+    },
+    {
+      "name": "member_status",
+      "type": "STRING"
+    }
+  ]
+}
\ No newline at end of file


[32/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/excanvas.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/excanvas.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/excanvas.min.js
new file mode 100644
index 0000000..815045d
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/excanvas.min.js
@@ -0,0 +1,954 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+if (navigator.appVersion.indexOf("MSIE") != -1 && parseFloat(navigator.appVersion.split("MSIE")[1]) <= 8 && !document.createElement("canvas").getContext)(function () {
+    var m = Math;
+    var mr = m.round;
+    var ms = m.sin;
+    var mc = m.cos;
+    var abs = m.abs;
+    var sqrt = m.sqrt;
+    var Z = 10;
+    var Z2 = Z / 2;
+    var IE_VERSION = +navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];
+
+    function getContext() {
+        return this.context_ || (this.context_ = new CanvasRenderingContext2D_(this))
+    }
+
+    var slice = Array.prototype.slice;
+
+    function bind(f, obj, var_args) {
+        var a = slice.call(arguments,
+            2);
+        return function () {
+            return f.apply(obj, a.concat(slice.call(arguments)))
+        }
+    }
+
+    function encodeHtmlAttribute(s) {
+        return String(s).replace(/&/g, "&amp;").replace(/"/g, "&quot;")
+    }
+
+    function addNamespace(doc, prefix, urn) {
+        if (!doc.namespaces[prefix])doc.namespaces.add(prefix, urn, "#default#VML")
+    }
+
+    function addNamespacesAndStylesheet(doc) {
+        addNamespace(doc, "g_vml_", "urn:schemas-microsoft-com:vml");
+        addNamespace(doc, "g_o_", "urn:schemas-microsoft-com:office:office");
+        if (!doc.styleSheets["ex_canvas_"]) {
+            var ss = doc.createStyleSheet();
+            ss.owningElement.id = "ex_canvas_";
+            ss.cssText = "canvas{display:inline-block;overflow:hidden;" + "text-align:left;width:300px;height:150px}"
+        }
+    }
+
+    addNamespacesAndStylesheet(document);
+    var G_vmlCanvasManager_ = {
+        init: function (opt_doc) {
+            var doc = opt_doc || document;
+            doc.createElement("canvas");
+            doc.attachEvent("onreadystatechange", bind(this.init_, this, doc))
+        }, init_: function (doc) {
+            var els = doc.getElementsByTagName("canvas");
+            for (var i = 0; i < els.length; i++)this.initElement(els[i])
+        }, initElement: function (el) {
+            if (!el.getContext) {
+                el.getContext =
+                    getContext;
+                addNamespacesAndStylesheet(el.ownerDocument);
+                el.innerHTML = "";
+                el.attachEvent("onpropertychange", onPropertyChange);
+                el.attachEvent("onresize", onResize);
+                var attrs = el.attributes;
+                if (attrs.width && attrs.width.specified)el.style.width = attrs.width.nodeValue + "px"; else el.width = el.clientWidth;
+                if (attrs.height && attrs.height.specified)el.style.height = attrs.height.nodeValue + "px"; else el.height = el.clientHeight
+            }
+            return el
+        }
+    };
+
+    function onPropertyChange(e) {
+        var el = e.srcElement;
+        switch (e.propertyName) {
+            case "width":
+                el.getContext().clearRect();
+                el.style.width = el.attributes.width.nodeValue + "px";
+                el.firstChild.style.width = el.clientWidth + "px";
+                break;
+            case "height":
+                el.getContext().clearRect();
+                el.style.height = el.attributes.height.nodeValue + "px";
+                el.firstChild.style.height = el.clientHeight + "px";
+                break
+        }
+    }
+
+    function onResize(e) {
+        var el = e.srcElement;
+        if (el.firstChild) {
+            el.firstChild.style.width = el.clientWidth + "px";
+            el.firstChild.style.height = el.clientHeight + "px"
+        }
+    }
+
+    G_vmlCanvasManager_.init();
+    var decToHex = [];
+    for (var i = 0; i < 16; i++)for (var j = 0; j < 16; j++)decToHex[i *
+    16 + j] = i.toString(16) + j.toString(16);
+    function createMatrixIdentity() {
+        return [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
+    }
+
+    function matrixMultiply(m1, m2) {
+        var result = createMatrixIdentity();
+        for (var x = 0; x < 3; x++)for (var y = 0; y < 3; y++) {
+            var sum = 0;
+            for (var z = 0; z < 3; z++)sum += m1[x][z] * m2[z][y];
+            result[x][y] = sum
+        }
+        return result
+    }
+
+    function copyState(o1, o2) {
+        o2.fillStyle = o1.fillStyle;
+        o2.lineCap = o1.lineCap;
+        o2.lineJoin = o1.lineJoin;
+        o2.lineWidth = o1.lineWidth;
+        o2.miterLimit = o1.miterLimit;
+        o2.shadowBlur = o1.shadowBlur;
+        o2.shadowColor = o1.shadowColor;
+        o2.shadowOffsetX =
+            o1.shadowOffsetX;
+        o2.shadowOffsetY = o1.shadowOffsetY;
+        o2.strokeStyle = o1.strokeStyle;
+        o2.globalAlpha = o1.globalAlpha;
+        o2.font = o1.font;
+        o2.textAlign = o1.textAlign;
+        o2.textBaseline = o1.textBaseline;
+        o2.arcScaleX_ = o1.arcScaleX_;
+        o2.arcScaleY_ = o1.arcScaleY_;
+        o2.lineScale_ = o1.lineScale_
+    }
+
+    var colorData = {
+        aliceblue: "#F0F8FF",
+        antiquewhite: "#FAEBD7",
+        aquamarine: "#7FFFD4",
+        azure: "#F0FFFF",
+        beige: "#F5F5DC",
+        bisque: "#FFE4C4",
+        black: "#000000",
+        blanchedalmond: "#FFEBCD",
+        blueviolet: "#8A2BE2",
+        brown: "#A52A2A",
+        burlywood: "#DEB887",
+        cadetblue: "#5F9EA0",
+        chartreuse: "#7FFF00",
+        chocolate: "#D2691E",
+        coral: "#FF7F50",
+        cornflowerblue: "#6495ED",
+        cornsilk: "#FFF8DC",
+        crimson: "#DC143C",
+        cyan: "#00FFFF",
+        darkblue: "#00008B",
+        darkcyan: "#008B8B",
+        darkgoldenrod: "#B8860B",
+        darkgray: "#A9A9A9",
+        darkgreen: "#006400",
+        darkgrey: "#A9A9A9",
+        darkkhaki: "#BDB76B",
+        darkmagenta: "#8B008B",
+        darkolivegreen: "#556B2F",
+        darkorange: "#FF8C00",
+        darkorchid: "#9932CC",
+        darkred: "#8B0000",
+        darksalmon: "#E9967A",
+        darkseagreen: "#8FBC8F",
+        darkslateblue: "#483D8B",
+        darkslategray: "#2F4F4F",
+        darkslategrey: "#2F4F4F",
+        darkturquoise: "#00CED1",
+        darkviolet: "#9400D3",
+        deeppink: "#FF1493",
+        deepskyblue: "#00BFFF",
+        dimgray: "#696969",
+        dimgrey: "#696969",
+        dodgerblue: "#1E90FF",
+        firebrick: "#B22222",
+        floralwhite: "#FFFAF0",
+        forestgreen: "#228B22",
+        gainsboro: "#DCDCDC",
+        ghostwhite: "#F8F8FF",
+        gold: "#FFD700",
+        goldenrod: "#DAA520",
+        grey: "#808080",
+        greenyellow: "#ADFF2F",
+        honeydew: "#F0FFF0",
+        hotpink: "#FF69B4",
+        indianred: "#CD5C5C",
+        indigo: "#4B0082",
+        ivory: "#FFFFF0",
+        khaki: "#F0E68C",
+        lavender: "#E6E6FA",
+        lavenderblush: "#FFF0F5",
+        lawngreen: "#7CFC00",
+        lemonchiffon: "#FFFACD",
+        lightblue: "#ADD8E6",
+        lightcoral: "#F08080",
+        lightcyan: "#E0FFFF",
+        lightgoldenrodyellow: "#FAFAD2",
+        lightgreen: "#90EE90",
+        lightgrey: "#D3D3D3",
+        lightpink: "#FFB6C1",
+        lightsalmon: "#FFA07A",
+        lightseagreen: "#20B2AA",
+        lightskyblue: "#87CEFA",
+        lightslategray: "#778899",
+        lightslategrey: "#778899",
+        lightsteelblue: "#B0C4DE",
+        lightyellow: "#FFFFE0",
+        limegreen: "#32CD32",
+        linen: "#FAF0E6",
+        magenta: "#FF00FF",
+        mediumaquamarine: "#66CDAA",
+        mediumblue: "#0000CD",
+        mediumorchid: "#BA55D3",
+        mediumpurple: "#9370DB",
+        mediumseagreen: "#3CB371",
+        mediumslateblue: "#7B68EE",
+        mediumspringgreen: "#00FA9A",
+        mediumturquoise: "#48D1CC",
+        mediumvioletred: "#C71585",
+        midnightblue: "#191970",
+        mintcream: "#F5FFFA",
+        mistyrose: "#FFE4E1",
+        moccasin: "#FFE4B5",
+        navajowhite: "#FFDEAD",
+        oldlace: "#FDF5E6",
+        olivedrab: "#6B8E23",
+        orange: "#FFA500",
+        orangered: "#FF4500",
+        orchid: "#DA70D6",
+        palegoldenrod: "#EEE8AA",
+        palegreen: "#98FB98",
+        paleturquoise: "#AFEEEE",
+        palevioletred: "#DB7093",
+        papayawhip: "#FFEFD5",
+        peachpuff: "#FFDAB9",
+        peru: "#CD853F",
+        pink: "#FFC0CB",
+        plum: "#DDA0DD",
+        powderblue: "#B0E0E6",
+        rosybrown: "#BC8F8F",
+        royalblue: "#4169E1",
+        saddlebrown: "#8B4513",
+        salmon: "#FA8072",
+        sandybrown: "#F4A460",
+        seagreen: "#2E8B57",
+        seashell: "#FFF5EE",
+        sienna: "#A0522D",
+        skyblue: "#87CEEB",
+        slateblue: "#6A5ACD",
+        slategray: "#708090",
+        slategrey: "#708090",
+        snow: "#FFFAFA",
+        springgreen: "#00FF7F",
+        steelblue: "#4682B4",
+        tan: "#D2B48C",
+        thistle: "#D8BFD8",
+        tomato: "#FF6347",
+        turquoise: "#40E0D0",
+        violet: "#EE82EE",
+        wheat: "#F5DEB3",
+        whitesmoke: "#F5F5F5",
+        yellowgreen: "#9ACD32"
+    };
+
+    function getRgbHslContent(styleString) {
+        var start = styleString.indexOf("(", 3);
+        var end = styleString.indexOf(")", start + 1);
+        var parts =
+            styleString.substring(start + 1, end).split(",");
+        if (parts.length != 4 || styleString.charAt(3) != "a")parts[3] = 1;
+        return parts
+    }
+
+    function percent(s) {
+        return parseFloat(s) / 100
+    }
+
+    function clamp(v, min, max) {
+        return Math.min(max, Math.max(min, v))
+    }
+
+    function hslToRgb(parts) {
+        var r, g, b, h, s, l;
+        h = parseFloat(parts[0]) / 360 % 360;
+        if (h < 0)h++;
+        s = clamp(percent(parts[1]), 0, 1);
+        l = clamp(percent(parts[2]), 0, 1);
+        if (s == 0)r = g = b = l; else {
+            var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+            var p = 2 * l - q;
+            r = hueToRgb(p, q, h + 1 / 3);
+            g = hueToRgb(p, q, h);
+            b = hueToRgb(p, q, h - 1 / 3)
+        }
+        return "#" +
+            decToHex[Math.floor(r * 255)] + decToHex[Math.floor(g * 255)] + decToHex[Math.floor(b * 255)]
+    }
+
+    function hueToRgb(m1, m2, h) {
+        if (h < 0)h++;
+        if (h > 1)h--;
+        if (6 * h < 1)return m1 + (m2 - m1) * 6 * h; else if (2 * h < 1)return m2; else if (3 * h < 2)return m1 + (m2 - m1) * (2 / 3 - h) * 6; else return m1
+    }
+
+    var processStyleCache = {};
+
+    function processStyle(styleString) {
+        if (styleString in processStyleCache)return processStyleCache[styleString];
+        var str, alpha = 1;
+        styleString = String(styleString);
+        if (styleString.charAt(0) == "#")str = styleString; else if (/^rgb/.test(styleString)) {
+            var parts =
+                getRgbHslContent(styleString);
+            var str = "#", n;
+            for (var i = 0; i < 3; i++) {
+                if (parts[i].indexOf("%") != -1)n = Math.floor(percent(parts[i]) * 255); else n = +parts[i];
+                str += decToHex[clamp(n, 0, 255)]
+            }
+            alpha = +parts[3]
+        } else if (/^hsl/.test(styleString)) {
+            var parts = getRgbHslContent(styleString);
+            str = hslToRgb(parts);
+            alpha = parts[3]
+        } else str = colorData[styleString] || styleString;
+        return processStyleCache[styleString] = {color: str, alpha: alpha}
+    }
+
+    var DEFAULT_STYLE = {style: "normal", variant: "normal", weight: "normal", size: 10, family: "sans-serif"};
+    var fontStyleCache = {};
+
+    function processFontStyle(styleString) {
+        if (fontStyleCache[styleString])return fontStyleCache[styleString];
+        var el = document.createElement("div");
+        var style = el.style;
+        try {
+            style.font = styleString
+        } catch (ex) {
+        }
+        return fontStyleCache[styleString] = {
+            style: style.fontStyle || DEFAULT_STYLE.style,
+            variant: style.fontVariant || DEFAULT_STYLE.variant,
+            weight: style.fontWeight || DEFAULT_STYLE.weight,
+            size: style.fontSize || DEFAULT_STYLE.size,
+            family: style.fontFamily || DEFAULT_STYLE.family
+        }
+    }
+
+    function getComputedStyle(style,
+                              element) {
+        var computedStyle = {};
+        for (var p in style)computedStyle[p] = style[p];
+        var canvasFontSize = parseFloat(element.currentStyle.fontSize), fontSize = parseFloat(style.size);
+        if (typeof style.size == "number")computedStyle.size = style.size; else if (style.size.indexOf("px") != -1)computedStyle.size = fontSize; else if (style.size.indexOf("em") != -1)computedStyle.size = canvasFontSize * fontSize; else if (style.size.indexOf("%") != -1)computedStyle.size = canvasFontSize / 100 * fontSize; else if (style.size.indexOf("pt") != -1)computedStyle.size =
+            fontSize / 0.75; else computedStyle.size = canvasFontSize;
+        computedStyle.size *= 0.981;
+        return computedStyle
+    }
+
+    function buildStyle(style) {
+        return style.style + " " + style.variant + " " + style.weight + " " + style.size + "px " + style.family
+    }
+
+    var lineCapMap = {"butt": "flat", "round": "round"};
+
+    function processLineCap(lineCap) {
+        return lineCapMap[lineCap] || "square"
+    }
+
+    function CanvasRenderingContext2D_(canvasElement) {
+        this.m_ = createMatrixIdentity();
+        this.mStack_ = [];
+        this.aStack_ = [];
+        this.currentPath_ = [];
+        this.strokeStyle = "#000";
+        this.fillStyle =
+            "#000";
+        this.lineWidth = 1;
+        this.lineJoin = "miter";
+        this.lineCap = "butt";
+        this.miterLimit = Z * 1;
+        this.globalAlpha = 1;
+        this.font = "10px sans-serif";
+        this.textAlign = "left";
+        this.textBaseline = "alphabetic";
+        this.canvas = canvasElement;
+        var cssText = "width:" + canvasElement.clientWidth + "px;height:" + canvasElement.clientHeight + "px;overflow:hidden;position:absolute";
+        var el = canvasElement.ownerDocument.createElement("div");
+        el.style.cssText = cssText;
+        canvasElement.appendChild(el);
+        var overlayEl = el.cloneNode(false);
+        overlayEl.style.backgroundColor =
+            "red";
+        overlayEl.style.filter = "alpha(opacity=0)";
+        canvasElement.appendChild(overlayEl);
+        this.element_ = el;
+        this.arcScaleX_ = 1;
+        this.arcScaleY_ = 1;
+        this.lineScale_ = 1
+    }
+
+    var contextPrototype = CanvasRenderingContext2D_.prototype;
+    contextPrototype.clearRect = function () {
+        if (this.textMeasureEl_) {
+            this.textMeasureEl_.removeNode(true);
+            this.textMeasureEl_ = null
+        }
+        this.element_.innerHTML = ""
+    };
+    contextPrototype.beginPath = function () {
+        this.currentPath_ = []
+    };
+    contextPrototype.moveTo = function (aX, aY) {
+        var p = getCoords(this, aX, aY);
+        this.currentPath_.push({
+            type: "moveTo",
+            x: p.x, y: p.y
+        });
+        this.currentX_ = p.x;
+        this.currentY_ = p.y
+    };
+    contextPrototype.lineTo = function (aX, aY) {
+        var p = getCoords(this, aX, aY);
+        this.currentPath_.push({type: "lineTo", x: p.x, y: p.y});
+        this.currentX_ = p.x;
+        this.currentY_ = p.y
+    };
+    contextPrototype.bezierCurveTo = function (aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {
+        var p = getCoords(this, aX, aY);
+        var cp1 = getCoords(this, aCP1x, aCP1y);
+        var cp2 = getCoords(this, aCP2x, aCP2y);
+        bezierCurveTo(this, cp1, cp2, p)
+    };
+    function bezierCurveTo(self, cp1, cp2, p) {
+        self.currentPath_.push({
+            type: "bezierCurveTo", cp1x: cp1.x,
+            cp1y: cp1.y, cp2x: cp2.x, cp2y: cp2.y, x: p.x, y: p.y
+        });
+        self.currentX_ = p.x;
+        self.currentY_ = p.y
+    }
+
+    contextPrototype.quadraticCurveTo = function (aCPx, aCPy, aX, aY) {
+        var cp = getCoords(this, aCPx, aCPy);
+        var p = getCoords(this, aX, aY);
+        var cp1 = {
+            x: this.currentX_ + 2 / 3 * (cp.x - this.currentX_),
+            y: this.currentY_ + 2 / 3 * (cp.y - this.currentY_)
+        };
+        var cp2 = {x: cp1.x + (p.x - this.currentX_) / 3, y: cp1.y + (p.y - this.currentY_) / 3};
+        bezierCurveTo(this, cp1, cp2, p)
+    };
+    contextPrototype.arc = function (aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {
+        aRadius *= Z;
+        var arcType =
+            aClockwise ? "at" : "wa";
+        var xStart = aX + mc(aStartAngle) * aRadius - Z2;
+        var yStart = aY + ms(aStartAngle) * aRadius - Z2;
+        var xEnd = aX + mc(aEndAngle) * aRadius - Z2;
+        var yEnd = aY + ms(aEndAngle) * aRadius - Z2;
+        if (xStart == xEnd && !aClockwise)xStart += 0.125;
+        var p = getCoords(this, aX, aY);
+        var pStart = getCoords(this, xStart, yStart);
+        var pEnd = getCoords(this, xEnd, yEnd);
+        this.currentPath_.push({
+            type: arcType,
+            x: p.x,
+            y: p.y,
+            radius: aRadius,
+            xStart: pStart.x,
+            yStart: pStart.y,
+            xEnd: pEnd.x,
+            yEnd: pEnd.y
+        })
+    };
+    contextPrototype.rect = function (aX, aY, aWidth, aHeight) {
+        this.moveTo(aX,
+            aY);
+        this.lineTo(aX + aWidth, aY);
+        this.lineTo(aX + aWidth, aY + aHeight);
+        this.lineTo(aX, aY + aHeight);
+        this.closePath()
+    };
+    contextPrototype.strokeRect = function (aX, aY, aWidth, aHeight) {
+        var oldPath = this.currentPath_;
+        this.beginPath();
+        this.moveTo(aX, aY);
+        this.lineTo(aX + aWidth, aY);
+        this.lineTo(aX + aWidth, aY + aHeight);
+        this.lineTo(aX, aY + aHeight);
+        this.closePath();
+        this.stroke();
+        this.currentPath_ = oldPath
+    };
+    contextPrototype.fillRect = function (aX, aY, aWidth, aHeight) {
+        var oldPath = this.currentPath_;
+        this.beginPath();
+        this.moveTo(aX, aY);
+        this.lineTo(aX + aWidth, aY);
+        this.lineTo(aX + aWidth, aY + aHeight);
+        this.lineTo(aX, aY + aHeight);
+        this.closePath();
+        this.fill();
+        this.currentPath_ = oldPath
+    };
+    contextPrototype.createLinearGradient = function (aX0, aY0, aX1, aY1) {
+        var gradient = new CanvasGradient_("gradient");
+        gradient.x0_ = aX0;
+        gradient.y0_ = aY0;
+        gradient.x1_ = aX1;
+        gradient.y1_ = aY1;
+        return gradient
+    };
+    contextPrototype.createRadialGradient = function (aX0, aY0, aR0, aX1, aY1, aR1) {
+        var gradient = new CanvasGradient_("gradientradial");
+        gradient.x0_ = aX0;
+        gradient.y0_ = aY0;
+        gradient.r0_ =
+            aR0;
+        gradient.x1_ = aX1;
+        gradient.y1_ = aY1;
+        gradient.r1_ = aR1;
+        return gradient
+    };
+    contextPrototype.drawImage = function (image, var_args) {
+        var dx, dy, dw, dh, sx, sy, sw, sh;
+        var oldRuntimeWidth = image.runtimeStyle.width;
+        var oldRuntimeHeight = image.runtimeStyle.height;
+        image.runtimeStyle.width = "auto";
+        image.runtimeStyle.height = "auto";
+        var w = image.width;
+        var h = image.height;
+        image.runtimeStyle.width = oldRuntimeWidth;
+        image.runtimeStyle.height = oldRuntimeHeight;
+        if (arguments.length == 3) {
+            dx = arguments[1];
+            dy = arguments[2];
+            sx = sy = 0;
+            sw = dw = w;
+            sh = dh = h
+        } else if (arguments.length == 5) {
+            dx = arguments[1];
+            dy = arguments[2];
+            dw = arguments[3];
+            dh = arguments[4];
+            sx = sy = 0;
+            sw = w;
+            sh = h
+        } else if (arguments.length == 9) {
+            sx = arguments[1];
+            sy = arguments[2];
+            sw = arguments[3];
+            sh = arguments[4];
+            dx = arguments[5];
+            dy = arguments[6];
+            dw = arguments[7];
+            dh = arguments[8]
+        } else throw Error("Invalid number of arguments");
+        var d = getCoords(this, dx, dy);
+        var w2 = sw / 2;
+        var h2 = sh / 2;
+        var vmlStr = [];
+        var W = 10;
+        var H = 10;
+        vmlStr.push(" <g_vml_:group", ' coordsize="', Z * W, ",", Z * H, '"', ' coordorigin="0,0"', ' style="width:',
+            W, "px;height:", H, "px;position:absolute;");
+        if (this.m_[0][0] != 1 || this.m_[0][1] || this.m_[1][1] != 1 || this.m_[1][0]) {
+            var filter = [];
+            filter.push("M11=", this.m_[0][0], ",", "M12=", this.m_[1][0], ",", "M21=", this.m_[0][1], ",", "M22=", this.m_[1][1], ",", "Dx=", mr(d.x / Z), ",", "Dy=", mr(d.y / Z), "");
+            var max = d;
+            var c2 = getCoords(this, dx + dw, dy);
+            var c3 = getCoords(this, dx, dy + dh);
+            var c4 = getCoords(this, dx + dw, dy + dh);
+            max.x = m.max(max.x, c2.x, c3.x, c4.x);
+            max.y = m.max(max.y, c2.y, c3.y, c4.y);
+            vmlStr.push("padding:0 ", mr(max.x / Z), "px ", mr(max.y /
+                Z), "px 0;filter:progid:DXImageTransform.Microsoft.Matrix(", filter.join(""), ", sizingmethod='clip');")
+        } else vmlStr.push("top:", mr(d.y / Z), "px;left:", mr(d.x / Z), "px;");
+        vmlStr.push(' ">', '<g_vml_:image src="', image.src, '"', ' style="width:', Z * dw, "px;", " height:", Z * dh, 'px"', ' cropleft="', sx / w, '"', ' croptop="', sy / h, '"', ' cropright="', (w - sx - sw) / w, '"', ' cropbottom="', (h - sy - sh) / h, '"', " />", "</g_vml_:group>");
+        this.element_.insertAdjacentHTML("BeforeEnd", vmlStr.join(""))
+    };
+    contextPrototype.stroke = function (aFill) {
+        var W =
+            10;
+        var H = 10;
+        var chunkSize = 5E3;
+        var min = {x: null, y: null};
+        var max = {x: null, y: null};
+        for (var j = 0; j < this.currentPath_.length; j += chunkSize) {
+            var lineStr = [];
+            var lineOpen = false;
+            lineStr.push("<g_vml_:shape", ' filled="', !!aFill, '"', ' style="position:absolute;width:', W, "px;height:", H, 'px;"', ' coordorigin="0,0"', ' coordsize="', Z * W, ",", Z * H, '"', ' stroked="', !aFill, '"', ' path="');
+            var newSeq = false;
+            for (var i = j; i < Math.min(j + chunkSize, this.currentPath_.length); i++) {
+                if (i % chunkSize == 0 && i > 0)lineStr.push(" m ", mr(this.currentPath_[i -
+                1].x), ",", mr(this.currentPath_[i - 1].y));
+                var p = this.currentPath_[i];
+                var c;
+                switch (p.type) {
+                    case "moveTo":
+                        c = p;
+                        lineStr.push(" m ", mr(p.x), ",", mr(p.y));
+                        break;
+                    case "lineTo":
+                        lineStr.push(" l ", mr(p.x), ",", mr(p.y));
+                        break;
+                    case "close":
+                        lineStr.push(" x ");
+                        p = null;
+                        break;
+                    case "bezierCurveTo":
+                        lineStr.push(" c ", mr(p.cp1x), ",", mr(p.cp1y), ",", mr(p.cp2x), ",", mr(p.cp2y), ",", mr(p.x), ",", mr(p.y));
+                        break;
+                    case "at":
+                    case "wa":
+                        lineStr.push(" ", p.type, " ", mr(p.x - this.arcScaleX_ * p.radius), ",", mr(p.y - this.arcScaleY_ * p.radius),
+                            " ", mr(p.x + this.arcScaleX_ * p.radius), ",", mr(p.y + this.arcScaleY_ * p.radius), " ", mr(p.xStart), ",", mr(p.yStart), " ", mr(p.xEnd), ",", mr(p.yEnd));
+                        break
+                }
+                if (p) {
+                    if (min.x == null || p.x < min.x)min.x = p.x;
+                    if (max.x == null || p.x > max.x)max.x = p.x;
+                    if (min.y == null || p.y < min.y)min.y = p.y;
+                    if (max.y == null || p.y > max.y)max.y = p.y
+                }
+            }
+            lineStr.push(' ">');
+            if (!aFill)appendStroke(this, lineStr); else appendFill(this, lineStr, min, max);
+            lineStr.push("</g_vml_:shape>");
+            this.element_.insertAdjacentHTML("beforeEnd", lineStr.join(""))
+        }
+    };
+    function appendStroke(ctx,
+                          lineStr) {
+        var a = processStyle(ctx.strokeStyle);
+        var color = a.color;
+        var opacity = a.alpha * ctx.globalAlpha;
+        var lineWidth = ctx.lineScale_ * ctx.lineWidth;
+        if (lineWidth < 1)opacity *= lineWidth;
+        lineStr.push("<g_vml_:stroke", ' opacity="', opacity, '"', ' joinstyle="', ctx.lineJoin, '"', ' miterlimit="', ctx.miterLimit, '"', ' endcap="', processLineCap(ctx.lineCap), '"', ' weight="', lineWidth, 'px"', ' color="', color, '" />')
+    }
+
+    function appendFill(ctx, lineStr, min, max) {
+        var fillStyle = ctx.fillStyle;
+        var arcScaleX = ctx.arcScaleX_;
+        var arcScaleY =
+            ctx.arcScaleY_;
+        var width = max.x - min.x;
+        var height = max.y - min.y;
+        if (fillStyle instanceof CanvasGradient_) {
+            var angle = 0;
+            var focus = {x: 0, y: 0};
+            var shift = 0;
+            var expansion = 1;
+            if (fillStyle.type_ == "gradient") {
+                var x0 = fillStyle.x0_ / arcScaleX;
+                var y0 = fillStyle.y0_ / arcScaleY;
+                var x1 = fillStyle.x1_ / arcScaleX;
+                var y1 = fillStyle.y1_ / arcScaleY;
+                var p0 = getCoords(ctx, x0, y0);
+                var p1 = getCoords(ctx, x1, y1);
+                var dx = p1.x - p0.x;
+                var dy = p1.y - p0.y;
+                angle = Math.atan2(dx, dy) * 180 / Math.PI;
+                if (angle < 0)angle += 360;
+                if (angle < 1E-6)angle = 0
+            } else {
+                var p0 = getCoords(ctx,
+                    fillStyle.x0_, fillStyle.y0_);
+                focus = {x: (p0.x - min.x) / width, y: (p0.y - min.y) / height};
+                width /= arcScaleX * Z;
+                height /= arcScaleY * Z;
+                var dimension = m.max(width, height);
+                shift = 2 * fillStyle.r0_ / dimension;
+                expansion = 2 * fillStyle.r1_ / dimension - shift
+            }
+            var stops = fillStyle.colors_;
+            stops.sort(function (cs1, cs2) {
+                return cs1.offset - cs2.offset
+            });
+            var length = stops.length;
+            var color1 = stops[0].color;
+            var color2 = stops[length - 1].color;
+            var opacity1 = stops[0].alpha * ctx.globalAlpha;
+            var opacity2 = stops[length - 1].alpha * ctx.globalAlpha;
+            var colors =
+                [];
+            for (var i = 0; i < length; i++) {
+                var stop = stops[i];
+                colors.push(stop.offset * expansion + shift + " " + stop.color)
+            }
+            lineStr.push('<g_vml_:fill type="', fillStyle.type_, '"', ' method="none" focus="100%"', ' color="', color1, '"', ' color2="', color2, '"', ' colors="', colors.join(","), '"', ' opacity="', opacity2, '"', ' g_o_:opacity2="', opacity1, '"', ' angle="', angle, '"', ' focusposition="', focus.x, ",", focus.y, '" />')
+        } else if (fillStyle instanceof CanvasPattern_) {
+            if (width && height) {
+                var deltaLeft = -min.x;
+                var deltaTop = -min.y;
+                lineStr.push("<g_vml_:fill",
+                    ' position="', deltaLeft / width * arcScaleX * arcScaleX, ",", deltaTop / height * arcScaleY * arcScaleY, '"', ' type="tile"', ' src="', fillStyle.src_, '" />')
+            }
+        } else {
+            var a = processStyle(ctx.fillStyle);
+            var color = a.color;
+            var opacity = a.alpha * ctx.globalAlpha;
+            lineStr.push('<g_vml_:fill color="', color, '" opacity="', opacity, '" />')
+        }
+    }
+
+    contextPrototype.fill = function () {
+        this.stroke(true)
+    };
+    contextPrototype.closePath = function () {
+        this.currentPath_.push({type: "close"})
+    };
+    function getCoords(ctx, aX, aY) {
+        var m = ctx.m_;
+        return {
+            x: Z * (aX * m[0][0] +
+            aY * m[1][0] + m[2][0]) - Z2, y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2
+        }
+    }
+
+    contextPrototype.save = function () {
+        var o = {};
+        copyState(this, o);
+        this.aStack_.push(o);
+        this.mStack_.push(this.m_);
+        this.m_ = matrixMultiply(createMatrixIdentity(), this.m_)
+    };
+    contextPrototype.restore = function () {
+        if (this.aStack_.length) {
+            copyState(this.aStack_.pop(), this);
+            this.m_ = this.mStack_.pop()
+        }
+    };
+    function matrixIsFinite(m) {
+        return isFinite(m[0][0]) && isFinite(m[0][1]) && isFinite(m[1][0]) && isFinite(m[1][1]) && isFinite(m[2][0]) && isFinite(m[2][1])
+    }
+
+    function setM(ctx,
+                  m, updateLineScale) {
+        if (!matrixIsFinite(m))return;
+        ctx.m_ = m;
+        if (updateLineScale) {
+            var det = m[0][0] * m[1][1] - m[0][1] * m[1][0];
+            ctx.lineScale_ = sqrt(abs(det))
+        }
+    }
+
+    contextPrototype.translate = function (aX, aY) {
+        var m1 = [[1, 0, 0], [0, 1, 0], [aX, aY, 1]];
+        setM(this, matrixMultiply(m1, this.m_), false)
+    };
+    contextPrototype.rotate = function (aRot) {
+        var c = mc(aRot);
+        var s = ms(aRot);
+        var m1 = [[c, s, 0], [-s, c, 0], [0, 0, 1]];
+        setM(this, matrixMultiply(m1, this.m_), false)
+    };
+    contextPrototype.scale = function (aX, aY) {
+        this.arcScaleX_ *= aX;
+        this.arcScaleY_ *= aY;
+        var m1 =
+            [[aX, 0, 0], [0, aY, 0], [0, 0, 1]];
+        setM(this, matrixMultiply(m1, this.m_), true)
+    };
+    contextPrototype.transform = function (m11, m12, m21, m22, dx, dy) {
+        var m1 = [[m11, m12, 0], [m21, m22, 0], [dx, dy, 1]];
+        setM(this, matrixMultiply(m1, this.m_), true)
+    };
+    contextPrototype.setTransform = function (m11, m12, m21, m22, dx, dy) {
+        var m = [[m11, m12, 0], [m21, m22, 0], [dx, dy, 1]];
+        setM(this, m, true)
+    };
+    contextPrototype.drawText_ = function (text, x, y, maxWidth, stroke) {
+        var m = this.m_, delta = 1E3, left = 0, right = delta, offset = {x: 0, y: 0}, lineStr = [];
+        var fontStyle = getComputedStyle(processFontStyle(this.font),
+            this.element_);
+        var fontStyleString = buildStyle(fontStyle);
+        var elementStyle = this.element_.currentStyle;
+        var textAlign = this.textAlign.toLowerCase();
+        switch (textAlign) {
+            case "left":
+            case "center":
+            case "right":
+                break;
+            case "end":
+                textAlign = elementStyle.direction == "ltr" ? "right" : "left";
+                break;
+            case "start":
+                textAlign = elementStyle.direction == "rtl" ? "right" : "left";
+                break;
+            default:
+                textAlign = "left"
+        }
+        switch (this.textBaseline) {
+            case "hanging":
+            case "top":
+                offset.y = fontStyle.size / 1.75;
+                break;
+            case "middle":
+                break;
+            default:
+            case null:
+            case "alphabetic":
+            case "ideographic":
+            case "bottom":
+                offset.y =
+                    -fontStyle.size / 2.25;
+                break
+        }
+        switch (textAlign) {
+            case "right":
+                left = delta;
+                right = 0.05;
+                break;
+            case "center":
+                left = right = delta / 2;
+                break
+        }
+        var d = getCoords(this, x + offset.x, y + offset.y);
+        lineStr.push('<g_vml_:line from="', -left, ' 0" to="', right, ' 0.05" ', ' coordsize="100 100" coordorigin="0 0"', ' filled="', !stroke, '" stroked="', !!stroke, '" style="position:absolute;width:1px;height:1px;">');
+        if (stroke)appendStroke(this, lineStr); else appendFill(this, lineStr, {x: -left, y: 0}, {
+            x: right,
+            y: fontStyle.size
+        });
+        var skewM = m[0][0].toFixed(3) +
+            "," + m[1][0].toFixed(3) + "," + m[0][1].toFixed(3) + "," + m[1][1].toFixed(3) + ",0,0";
+        var skewOffset = mr(d.x / Z) + "," + mr(d.y / Z);
+        lineStr.push('<g_vml_:skew on="t" matrix="', skewM, '" ', ' offset="', skewOffset, '" origin="', left, ' 0" />', '<g_vml_:path textpathok="true" />', '<g_vml_:textpath on="true" string="', encodeHtmlAttribute(text), '" style="v-text-align:', textAlign, ";font:", encodeHtmlAttribute(fontStyleString), '" /></g_vml_:line>');
+        this.element_.insertAdjacentHTML("beforeEnd", lineStr.join(""))
+    };
+    contextPrototype.fillText =
+        function (text, x, y, maxWidth) {
+            this.drawText_(text, x, y, maxWidth, false)
+        };
+    contextPrototype.strokeText = function (text, x, y, maxWidth) {
+        this.drawText_(text, x, y, maxWidth, true)
+    };
+    contextPrototype.measureText = function (text) {
+        if (!this.textMeasureEl_) {
+            var s = '<span style="position:absolute;' + "top:-20000px;left:0;padding:0;margin:0;border:none;" + 'white-space:pre;"></span>';
+            this.element_.insertAdjacentHTML("beforeEnd", s);
+            this.textMeasureEl_ = this.element_.lastChild
+        }
+        var doc = this.element_.ownerDocument;
+        this.textMeasureEl_.innerHTML =
+            "";
+        this.textMeasureEl_.style.font = this.font;
+        this.textMeasureEl_.appendChild(doc.createTextNode(text));
+        return {width: this.textMeasureEl_.offsetWidth}
+    };
+    contextPrototype.clip = function () {
+    };
+    contextPrototype.arcTo = function () {
+    };
+    contextPrototype.createPattern = function (image, repetition) {
+        return new CanvasPattern_(image, repetition)
+    };
+    function CanvasGradient_(aType) {
+        this.type_ = aType;
+        this.x0_ = 0;
+        this.y0_ = 0;
+        this.r0_ = 0;
+        this.x1_ = 0;
+        this.y1_ = 0;
+        this.r1_ = 0;
+        this.colors_ = []
+    }
+
+    CanvasGradient_.prototype.addColorStop = function (aOffset,
+                                                       aColor) {
+        aColor = processStyle(aColor);
+        this.colors_.push({offset: aOffset, color: aColor.color, alpha: aColor.alpha})
+    };
+    function CanvasPattern_(image, repetition) {
+        assertImageIsValid(image);
+        switch (repetition) {
+            case "repeat":
+            case null:
+            case "":
+                this.repetition_ = "repeat";
+                break;
+            case "repeat-x":
+            case "repeat-y":
+            case "no-repeat":
+                this.repetition_ = repetition;
+                break;
+            default:
+                throwException("SYNTAX_ERR")
+        }
+        this.src_ = image.src;
+        this.width_ = image.width;
+        this.height_ = image.height
+    }
+
+    function throwException(s) {
+        throw new DOMException_(s);
+    }
+
+    function assertImageIsValid(img) {
+        if (!img || img.nodeType != 1 || img.tagName != "IMG")throwException("TYPE_MISMATCH_ERR");
+        if (img.readyState != "complete")throwException("INVALID_STATE_ERR")
+    }
+
+    function DOMException_(s) {
+        this.code = this[s];
+        this.message = s + ": DOM Exception " + this.code
+    }
+
+    var p = DOMException_.prototype = new Error;
+    p.INDEX_SIZE_ERR = 1;
+    p.DOMSTRING_SIZE_ERR = 2;
+    p.HIERARCHY_REQUEST_ERR = 3;
+    p.WRONG_DOCUMENT_ERR = 4;
+    p.INVALID_CHARACTER_ERR = 5;
+    p.NO_DATA_ALLOWED_ERR = 6;
+    p.NO_MODIFICATION_ALLOWED_ERR = 7;
+    p.NOT_FOUND_ERR = 8;
+    p.NOT_SUPPORTED_ERR =
+        9;
+    p.INUSE_ATTRIBUTE_ERR = 10;
+    p.INVALID_STATE_ERR = 11;
+    p.SYNTAX_ERR = 12;
+    p.INVALID_MODIFICATION_ERR = 13;
+    p.NAMESPACE_ERR = 14;
+    p.INVALID_ACCESS_ERR = 15;
+    p.VALIDATION_ERR = 16;
+    p.TYPE_MISMATCH_ERR = 17;
+    G_vmlCanvasManager = G_vmlCanvasManager_;
+    CanvasRenderingContext2D = CanvasRenderingContext2D_;
+    CanvasGradient = CanvasGradient_;
+    CanvasPattern = CanvasPattern_;
+    DOMException = DOMException_
+})();

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/gadgetconf.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/gadgetconf.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/gadgetconf.js
new file mode 100644
index 0000000..5cee4a2
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberCount/Member_Count/js/gadgetconf.js
@@ -0,0 +1,56 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+var gadgetConfig = {
+    "id": "Member_Count",
+    "title": "Member_Count",
+    "datasource": "MEMBER_COUNT",
+    "type": "batch",
+    "columns": [
+        {
+            "COLUMN_NAME": "Time",
+            "DATA_TYPE": "varchar"
+        },
+        {
+            "COLUMN_NAME": "CreatedInstanceCount",
+            "DATA_TYPE": "int"
+        },
+        {
+            "COLUMN_NAME": "InitializedInstanceCount",
+            "DATA_TYPE": "int"
+        },
+        {
+            "COLUMN_NAME": "ActiveInstanceCount",
+            "DATA_TYPE": "int"
+        },
+        {
+            "COLUMN_NAME": "TerminatedInstanceCount",
+            "DATA_TYPE": "int"
+        }
+    ],
+    "maxUpdateValue": 10,
+    "chartConfig": {
+        "chartType": "line",
+        "yAxis": [1, 2, 3, 4],
+        "xAxis": 0,
+        "interpolationMode": "line"
+    },
+    "domain": "carbon.super"
+};
\ No newline at end of file


[22/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.geomap.dependencies.min.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.geomap.dependencies.min.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.geomap.dependencies.min.js
new file mode 100644
index 0000000..b6b4aff
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberInformation/Member_Information/js/d3.geomap.dependencies.min.js
@@ -0,0 +1,8249 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+!function () {
+    function n(n) {
+        return n && (n.ownerDocument || n.document || n).documentElement
+    }
+
+    function t(n) {
+        return n && (n.ownerDocument && n.ownerDocument.defaultView || n.document && n || n.defaultView)
+    }
+
+    function e(n, t) {
+        return t > n ? -1 : n > t ? 1 : n >= t ? 0 : 0 / 0
+    }
+
+    function r(n) {
+        return null === n ? 0 / 0 : +n
+    }
+
+    function u(n) {
+        return !isNaN(n)
+    }
+
+    function i(n) {
+        return {
+            left: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) < 0 ? r = i + 1 : u = i
+                }
+                return r
+            }, right: function (t, e, r, u) {
+                for (arguments.length < 3 && (r = 0), arguments.length < 4 && (u = t.length); u > r;) {
+                    var i = r + u >>> 1;
+                    n(t[i], e) > 0 ? u = i : r = i + 1
+                }
+                return r
+            }
+        }
+    }
+
+    function o(n) {
+        return n.length
+    }
+
+    function a(n) {
+        for (var t = 1; n * t % 1;)t *= 10;
+        return t
+    }
+
+    function c(n, t) {
+        for (var e in t)Object.defineProperty(n.prototype, e, {value: t[e], enumerable: !1})
+    }
+
+    function l() {
+        this._ = Object.create(null)
+    }
+
+    function s(n) {
+        return (n += "") === pa || n[0] === va ? va + n : n
+    }
+
+    function f(n) {
+        return (n += "")[0] === va ? n.slice(1) : n
+    }
+
+    function h(n) {
+        return s(n)in this._
+    }
+
+    function g(n) {
+        return (n = s(n))in this._ && delete this._[n]
+    }
+
+    function p() {
+        var n = [];
+        for (var t in this._)n.push(f(t));
+        return n
+    }
+
+    function v() {
+        var n = 0;
+        for (var t in this._)++n;
+        return n
+    }
+
+    function d() {
+        for (var n in this._)return !1;
+        return !0
+    }
+
+    function m() {
+        this._ = Object.create(null)
+    }
+
+    function y(n) {
+        return n
+    }
+
+    function M(n, t, e) {
+        return function () {
+            var r = e.apply(t, arguments);
+            return r === t ? n : r
+        }
+    }
+
+    function x(n, t) {
+        if (t in n)return t;
+        t = t.charAt(0).toUpperCase() + t.slice(1);
+        for (var e = 0, r = da.length; r > e; ++e) {
+            var u = da[e] + t;
+            if (u in n)return u
+        }
+    }
+
+    function b() {
+    }
+
+    function _() {
+    }
+
+    function w(n) {
+        function t() {
+            for (var t, r = e, u = -1, i = r.length; ++u < i;)(t = r[u].on) && t.apply(this, arguments);
+            return n
+        }
+
+        var e = [], r = new l;
+        return t.on = function (t, u) {
+            var i, o = r.get(t);
+            return arguments.length < 2 ? o && o.on : (o && (o.on = null, e = e.slice(0, i = e.indexOf(o)).concat(e.slice(i + 1)), r.remove(t)), u && e.push(r.set(t, {on: u})), n)
+        }, t
+    }
+
+    function S() {
+        ta.event.preventDefault()
+    }
+
+    function k() {
+        for (var n, t = ta.event; n = t.sourceEvent;)t = n;
+        return t
+    }
+
+    function E(n) {
+        for (var t = new _, e = 0, r = arguments.length; ++e < r;)t[arguments[e]] = w(t);
+        return t.of = function (e, r) {
+            return function (u) {
+                try {
+                    var i = u.sourceEvent = ta.event;
+                    u.target = n, ta.event = u, t[u.type].apply(e, r)
+                } finally {
+                    ta.event = i
+                }
+            }
+        }, t
+    }
+
+    function A(n) {
+        return ya(n, _a), n
+    }
+
+    function N(n) {
+        return "function" == typeof n ? n : function () {
+            return Ma(n, this)
+        }
+    }
+
+    function C(n) {
+        return "function" == typeof n ? n : function () {
+            return xa(n, this)
+        }
+    }
+
+    function z(n, t) {
+        function e() {
+            this.removeAttribute(n)
+        }
+
+        function r() {
+            this.removeAttributeNS(n.space, n.local)
+        }
+
+        function u() {
+            this.setAttribute(n, t)
+        }
+
+        function i() {
+            this.setAttributeNS(n.space, n.local, t)
+        }
+
+        function o() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttribute(n) : this.setAttribute(n, e)
+        }
+
+        function a() {
+            var e = t.apply(this, arguments);
+            null == e ? this.removeAttributeNS(n.space, n.local) : this.setAttributeNS(n.space, n.local, e)
+        }
+
+        return n = ta.ns.qualify(n), null == t ? n.local ? r : e : "function" == typeof t ? n.local ? a : o : n.local ? i : u
+    }
+
+    function q(n) {
+        return n.trim().replace(/\s+/g, " ")
+    }
+
+    function L(n) {
+        return new RegExp("(?:^|\\s+)" + ta.requote(n) + "(?:\\s+|$)", "g")
+    }
+
+    function T(n) {
+        return (n + "").trim().split(/^|\s+/)
+    }
+
+    function R(n, t) {
+        function e() {
+            for (var e = -1; ++e < u;)n[e](this, t)
+        }
+
+        function r() {
+            for (var e = -1, r = t.apply(this, arguments); ++e < u;)n[e](this, r)
+        }
+
+        n = T(n).map(D);
+        var u = n.length;
+        return "function" == typeof t ? r : e
+    }
+
+    function D(n) {
+        var t = L(n);
+        return function (e, r) {
+            if (u = e.classList)return r ? u.add(n) : u.remove(n);
+            var u = e.getAttribute("class") || "";
+            r ? (t.lastIndex = 0, t.test(u) || e.setAttribute("class", q(u + " " + n))) : e.setAttribute("class", q(u.replace(t, " ")))
+        }
+    }
+
+    function P(n, t, e) {
+        function r() {
+            this.style.removeProperty(n)
+        }
+
+        function u() {
+            this.style.setProperty(n, t, e)
+        }
+
+        function i() {
+            var r = t.apply(this, arguments);
+            null == r ? this.style.removeProperty(n) : this.style.setProperty(n, r, e)
+        }
+
+        return null == t ? r : "function" == typeof t ? i : u
+    }
+
+    function U(n, t) {
+        function e() {
+            delete this[n]
+        }
+
+        function r() {
+            this[n] = t
+        }
+
+        function u() {
+            var e = t.apply(this, arguments);
+            null == e ? delete this[n] : this[n] = e
+        }
+
+        return null == t ? e : "function" == typeof t ? u : r
+    }
+
+    function j(n) {
+        function t() {
+            var t = this.ownerDocument, e = this.namespaceURI;
+            return e ? t.createElementNS(e, n) : t.createElement(n)
+        }
+
+        function e() {
+            return this.ownerDocument.createElementNS(n.space, n.local)
+        }
+
+        return "function" == typeof n ? n : (n = ta.ns.qualify(n)).local ? e : t
+    }
+
+    function F() {
+        var n = this.parentNode;
+        n && n.removeChild(this)
+    }
+
+    function H(n) {
+        return {__data__: n}
+    }
+
+    function O(n) {
+        return function () {
+            return ba(this, n)
+        }
+    }
+
+    function I(n) {
+        return arguments.length || (n = e), function (t, e) {
+            return t && e ? n(t.__data__, e.__data__) : !t - !e
+        }
+    }
+
+    function Y(n, t) {
+        for (var e = 0, r = n.length; r > e; e++)for (var u, i = n[e], o = 0, a = i.length; a > o; o++)(u = i[o]) && t(u, o, e);
+        return n
+    }
+
+    function Z(n) {
+        return ya(n, Sa), n
+    }
+
+    function V(n) {
+        var t, e;
+        return function (r, u, i) {
+            var o, a = n[i].update, c = a.length;
+            for (i != e && (e = i, t = 0), u >= t && (t = u + 1); !(o = a[t]) && ++t < c;);
+            return o
+        }
+    }
+
+    function X(n, t, e) {
+        function r() {
+            var t = this[o];
+            t && (this.removeEventListener(n, t, t.$), delete this[o])
+        }
+
+        function u() {
+            var u = c(t, ra(arguments));
+            r.call(this), this.addEventListener(n, this[o] = u, u.$ = e), u._ = t
+        }
+
+        function i() {
+            var t, e = new RegExp("^__on([^.]+)" + ta.requote(n) + "$");
+            for (var r in this)if (t = r.match(e)) {
+                var u = this[r];
+                this.removeEventListener(t[1], u, u.$), delete this[r]
+            }
+        }
+
+        var o = "__on" + n, a = n.indexOf("."), c = $;
+        a > 0 && (n = n.slice(0, a));
+        var l = ka.get(n);
+        return l && (n = l, c = B), a ? t ? u : r : t ? b : i
+    }
+
+    function $(n, t) {
+        return function (e) {
+            var r = ta.event;
+            ta.event = e, t[0] = this.__data__;
+            try {
+                n.apply(this, t)
+            } finally {
+                ta.event = r
+            }
+        }
+    }
+
+    function B(n, t) {
+        var e = $(n, t);
+        return function (n) {
+            var t = this, r = n.relatedTarget;
+            r && (r === t || 8 & r.compareDocumentPosition(t)) || e.call(t, n)
+        }
+    }
+
+    function W(e) {
+        var r = ".dragsuppress-" + ++Aa, u = "click" + r, i = ta.select(t(e)).on("touchmove" + r, S).on("dragstart" + r, S).on("selectstart" + r, S);
+        if (null == Ea && (Ea = "onselectstart"in e ? !1 : x(e.style, "userSelect")), Ea) {
+            var o = n(e).style, a = o[Ea];
+            o[Ea] = "none"
+        }
+        return function (n) {
+            if (i.on(r, null), Ea && (o[Ea] = a), n) {
+                var t = function () {
+                    i.on(u, null)
+                };
+                i.on(u, function () {
+                    S(), t()
+                }, !0), setTimeout(t, 0)
+            }
+        }
+    }
+
+    function J(n, e) {
+        e.changedTouches && (e = e.changedTouches[0]);
+        var r = n.ownerSVGElement || n;
+        if (r.createSVGPoint) {
+            var u = r.createSVGPoint();
+            if (0 > Na) {
+                var i = t(n);
+                if (i.scrollX || i.scrollY) {
+                    r = ta.select("body").append("svg").style({
+                        position: "absolute",
+                        top: 0,
+                        left: 0,
+                        margin: 0,
+                        padding: 0,
+                        border: "none"
+                    }, "important");
+                    var o = r[0][0].getScreenCTM();
+                    Na = !(o.f || o.e), r.remove()
+                }
+            }
+            return Na ? (u.x = e.pageX, u.y = e.pageY) : (u.x = e.clientX, u.y = e.clientY), u = u.matrixTransform(n.getScreenCTM().inverse()), [u.x, u.y]
+        }
+        var a = n.getBoundingClientRect();
+        return [e.clientX - a.left - n.clientLeft, e.clientY - a.top - n.clientTop]
+    }
+
+    function G() {
+        return ta.event.changedTouches[0].identifier
+    }
+
+    function K(n) {
+        return n > 0 ? 1 : 0 > n ? -1 : 0
+    }
+
+    function Q(n, t, e) {
+        return (t[0] - n[0]) * (e[1] - n[1]) - (t[1] - n[1]) * (e[0] - n[0])
+    }
+
+    function nt(n) {
+        return n > 1 ? 0 : -1 > n ? qa : Math.acos(n)
+    }
+
+    function tt(n) {
+        return n > 1 ? Ra : -1 > n ? -Ra : Math.asin(n)
+    }
+
+    function et(n) {
+        return ((n = Math.exp(n)) - 1 / n) / 2
+    }
+
+    function rt(n) {
+        return ((n = Math.exp(n)) + 1 / n) / 2
+    }
+
+    function ut(n) {
+        return ((n = Math.exp(2 * n)) - 1) / (n + 1)
+    }
+
+    function it(n) {
+        return (n = Math.sin(n / 2)) * n
+    }
+
+    function ot() {
+    }
+
+    function at(n, t, e) {
+        return this instanceof at ? (this.h = +n, this.s = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof at ? new at(n.h, n.s, n.l) : bt("" + n, _t, at) : new at(n, t, e)
+    }
+
+    function ct(n, t, e) {
+        function r(n) {
+            return n > 360 ? n -= 360 : 0 > n && (n += 360), 60 > n ? i + (o - i) * n / 60 : 180 > n ? o : 240 > n ? i + (o - i) * (240 - n) / 60 : i
+        }
+
+        function u(n) {
+            return Math.round(255 * r(n))
+        }
+
+        var i, o;
+        return n = isNaN(n) ? 0 : (n %= 360) < 0 ? n + 360 : n, t = isNaN(t) ? 0 : 0 > t ? 0 : t > 1 ? 1 : t, e = 0 > e ? 0 : e > 1 ? 1 : e, o = .5 >= e ? e * (1 + t) : e + t - e * t, i = 2 * e - o, new mt(u(n + 120), u(n), u(n - 120))
+    }
+
+    function lt(n, t, e) {
+        return this instanceof lt ? (this.h = +n, this.c = +t, void(this.l = +e)) : arguments.length < 2 ? n instanceof lt ? new lt(n.h, n.c, n.l) : n instanceof ft ? gt(n.l, n.a, n.b) : gt((n = wt((n = ta.rgb(n)).r, n.g, n.b)).l, n.a, n.b) : new lt(n, t, e)
+    }
+
+    function st(n, t, e) {
+        return isNaN(n) && (n = 0), isNaN(t) && (t = 0), new ft(e, Math.cos(n *= Da) * t, Math.sin(n) * t)
+    }
+
+    function ft(n, t, e) {
+        return this instanceof ft ? (this.l = +n, this.a = +t, void(this.b = +e)) : arguments.length < 2 ? n instanceof ft ? new ft(n.l, n.a, n.b) : n instanceof lt ? st(n.h, n.c, n.l) : wt((n = mt(n)).r, n.g, n.b) : new ft(n, t, e)
+    }
+
+    function ht(n, t, e) {
+        var r = (n + 16) / 116, u = r + t / 500, i = r - e / 200;
+        return u = pt(u) * Xa, r = pt(r) * $a, i = pt(i) * Ba, new mt(dt(3.2404542 * u - 1.5371385 * r - .4985314 * i), dt(-.969266 * u + 1.8760108 * r + .041556 * i), dt(.0556434 * u - .2040259 * r + 1.0572252 * i))
+    }
+
+    function gt(n, t, e) {
+        return n > 0 ? new lt(Math.atan2(e, t) * Pa, Math.sqrt(t * t + e * e), n) : new lt(0 / 0, 0 / 0, n)
+    }
+
+    function pt(n) {
+        return n > .206893034 ? n * n * n : (n - 4 / 29) / 7.787037
+    }
+
+    function vt(n) {
+        return n > .008856 ? Math.pow(n, 1 / 3) : 7.787037 * n + 4 / 29
+    }
+
+    function dt(n) {
+        return Math.round(255 * (.00304 >= n ? 12.92 * n : 1.055 * Math.pow(n, 1 / 2.4) - .055))
+    }
+
+    function mt(n, t, e) {
+        return this instanceof mt ? (this.r = ~~n, this.g = ~~t, void(this.b = ~~e)) : arguments.length < 2 ? n instanceof mt ? new mt(n.r, n.g, n.b) : bt("" + n, mt, ct) : new mt(n, t, e)
+    }
+
+    function yt(n) {
+        return new mt(n >> 16, n >> 8 & 255, 255 & n)
+    }
+
+    function Mt(n) {
+        return yt(n) + ""
+    }
+
+    function xt(n) {
+        return 16 > n ? "0" + Math.max(0, n).toString(16) : Math.min(255, n).toString(16)
+    }
+
+    function bt(n, t, e) {
+        var r, u, i, o = 0, a = 0, c = 0;
+        if (r = /([a-z]+)\((.*)\)/i.exec(n))switch (u = r[2].split(","), r[1]) {
+            case"hsl":
+                return e(parseFloat(u[0]), parseFloat(u[1]) / 100, parseFloat(u[2]) / 100);
+            case"rgb":
+                return t(kt(u[0]), kt(u[1]), kt(u[2]))
+        }
+        return (i = Ga.get(n.toLowerCase())) ? t(i.r, i.g, i.b) : (null == n || "#" !== n.charAt(0) || isNaN(i = parseInt(n.slice(1), 16)) || (4 === n.length ? (o = (3840 & i) >> 4, o = o >> 4 | o, a = 240 & i, a = a >> 4 | a, c = 15 & i, c = c << 4 | c) : 7 === n.length && (o = (16711680 & i) >> 16, a = (65280 & i) >> 8, c = 255 & i)), t(o, a, c))
+    }
+
+    function _t(n, t, e) {
+        var r, u, i = Math.min(n /= 255, t /= 255, e /= 255), o = Math.max(n, t, e), a = o - i, c = (o + i) / 2;
+        return a ? (u = .5 > c ? a / (o + i) : a / (2 - o - i), r = n == o ? (t - e) / a + (e > t ? 6 : 0) : t == o ? (e - n) / a + 2 : (n - t) / a + 4, r *= 60) : (r = 0 / 0, u = c > 0 && 1 > c ? 0 : r), new at(r, u, c)
+    }
+
+    function wt(n, t, e) {
+        n = St(n), t = St(t), e = St(e);
+        var r = vt((.4124564 * n + .3575761 * t + .1804375 * e) / Xa), u = vt((.2126729 * n + .7151522 * t + .072175 * e) / $a), i = vt((.0193339 * n + .119192 * t + .9503041 * e) / Ba);
+        return ft(116 * u - 16, 500 * (r - u), 200 * (u - i))
+    }
+
+    function St(n) {
+        return (n /= 255) <= .04045 ? n / 12.92 : Math.pow((n + .055) / 1.055, 2.4)
+    }
+
+    function kt(n) {
+        var t = parseFloat(n);
+        return "%" === n.charAt(n.length - 1) ? Math.round(2.55 * t) : t
+    }
+
+    function Et(n) {
+        return "function" == typeof n ? n : function () {
+            return n
+        }
+    }
+
+    function At(n) {
+        return function (t, e, r) {
+            return 2 === arguments.length && "function" == typeof e && (r = e, e = null), Nt(t, e, n, r)
+        }
+    }
+
+    function Nt(n, t, e, r) {
+        function u() {
+            var n, t = c.status;
+            if (!t && zt(c) || t >= 200 && 300 > t || 304 === t) {
+                try {
+                    n = e.call(i, c)
+                } catch (r) {
+                    return void o.error.call(i, r)
+                }
+                o.load.call(i, n)
+            } else o.error.call(i, c)
+        }
+
+        var i = {}, o = ta.dispatch("beforesend", "progress", "load", "error"), a = {}, c = new XMLHttpRequest, l = null;
+        return !this.XDomainRequest || "withCredentials"in c || !/^(http(s)?:)?\/\//.test(n) || (c = new XDomainRequest), "onload"in c ? c.onload = c.onerror = u : c.onreadystatechange = function () {
+            c.readyState > 3 && u()
+        }, c.onprogress = function (n) {
+            var t = ta.event;
+            ta.event = n;
+            try {
+                o.progress.call(i, c)
+            } finally {
+                ta.event = t
+            }
+        }, i.header = function (n, t) {
+            return n = (n + "").toLowerCase(), arguments.length < 2 ? a[n] : (null == t ? delete a[n] : a[n] = t + "", i)
+        }, i.mimeType = function (n) {
+            return arguments.length ? (t = null == n ? null : n + "", i) : t
+        }, i.responseType = function (n) {
+            return arguments.length ? (l = n, i) : l
+        }, i.response = function (n) {
+            return e = n, i
+        }, ["get", "post"].forEach(function (n) {
+            i[n] = function () {
+                return i.send.apply(i, [n].concat(ra(arguments)))
+            }
+        }), i.send = function (e, r, u) {
+            if (2 === arguments.length && "function" == typeof r && (u = r, r = null), c.open(e, n, !0), null == t || "accept"in a || (a.accept = t + ",*/*"), c.setRequestHeader)for (var s in a)c.setRequestHeader(s, a[s]);
+            return null != t && c.overrideMimeType && c.overrideMimeType(t), null != l && (c.responseType = l), null != u && i.on("error", u).on("load", function (n) {
+                u(null, n)
+            }), o.beforesend.call(i, c), c.send(null == r ? null : r), i
+        }, i.abort = function () {
+            return c.abort(), i
+        }, ta.rebind(i, o, "on"), null == r ? i : i.get(Ct(r))
+    }
+
+    function Ct(n) {
+        return 1 === n.length ? function (t, e) {
+            n(null == t ? e : null)
+        } : n
+    }
+
+    function zt(n) {
+        var t = n.responseType;
+        return t && "text" !== t ? n.response : n.responseText
+    }
+
+    function qt() {
+        var n = Lt(), t = Tt() - n;
+        t > 24 ? (isFinite(t) && (clearTimeout(tc), tc = setTimeout(qt, t)), nc = 0) : (nc = 1, rc(qt))
+    }
+
+    function Lt() {
+        var n = Date.now();
+        for (ec = Ka; ec;)n >= ec.t && (ec.f = ec.c(n - ec.t)), ec = ec.n;
+        return n
+    }
+
+    function Tt() {
+        for (var n, t = Ka, e = 1 / 0; t;)t.f ? t = n ? n.n = t.n : Ka = t.n : (t.t < e && (e = t.t), t = (n = t).n);
+        return Qa = n, e
+    }
+
+    function Rt(n, t) {
+        return t - (n ? Math.ceil(Math.log(n) / Math.LN10) : 1)
+    }
+
+    function Dt(n, t) {
+        var e = Math.pow(10, 3 * ga(8 - t));
+        return {
+            scale: t > 8 ? function (n) {
+                return n / e
+            } : function (n) {
+                return n * e
+            }, symbol: n
+        }
+    }
+
+    function Pt(n) {
+        var t = n.decimal, e = n.thousands, r = n.grouping, u = n.currency, i = r && e ? function (n, t) {
+            for (var u = n.length, i = [], o = 0, a = r[0], c = 0; u > 0 && a > 0 && (c + a + 1 > t && (a = Math.max(1, t - c)), i.push(n.substring(u -= a, u + a)), !((c += a + 1) > t));)a = r[o = (o + 1) % r.length];
+            return i.reverse().join(e)
+        } : y;
+        return function (n) {
+            var e = ic.exec(n), r = e[1] || " ", o = e[2] || ">", a = e[3] || "-", c = e[4] || "", l = e[5], s = +e[6], f = e[7], h = e[8], g = e[9], p = 1, v = "", d = "", m = !1, y = !0;
+            switch (h && (h = +h.substring(1)), (l || "0" === r && "=" === o) && (l = r = "0", o = "="), g) {
+                case"n":
+                    f = !0, g = "g";
+                    break;
+                case"%":
+                    p = 100, d = "%", g = "f";
+                    break;
+                case"p":
+                    p = 100, d = "%", g = "r";
+                    break;
+                case"b":
+                case"o":
+                case"x":
+                case"X":
+                    "#" === c && (v = "0" + g.toLowerCase());
+                case"c":
+                    y = !1;
+                case"d":
+                    m = !0, h = 0;
+                    break;
+                case"s":
+                    p = -1, g = "r"
+            }
+            "$" === c && (v = u[0], d = u[1]), "r" != g || h || (g = "g"), null != h && ("g" == g ? h = Math.max(1, Math.min(21, h)) : ("e" == g || "f" == g) && (h = Math.max(0, Math.min(20, h)))), g = oc.get(g) || Ut;
+            var M = l && f;
+            return function (n) {
+                var e = d;
+                if (m && n % 1)return "";
+                var u = 0 > n || 0 === n && 0 > 1 / n ? (n = -n, "-") : "-" === a ? "" : a;
+                if (0 > p) {
+                    var c = ta.formatPrefix(n, h);
+                    n = c.scale(n), e = c.symbol + d
+                } else n *= p;
+                n = g(n, h);
+                var x, b, _ = n.lastIndexOf(".");
+                if (0 > _) {
+                    var w = y ? n.lastIndexOf("e") : -1;
+                    0 > w ? (x = n, b = "") : (x = n.substring(0, w), b = n.substring(w))
+                } else x = n.substring(0, _), b = t + n.substring(_ + 1);
+                !l && f && (x = i(x, 1 / 0));
+                var S = v.length + x.length + b.length + (M ? 0 : u.length), k = s > S ? new Array(S = s - S + 1).join(r) : "";
+                return M && (x = i(k + x, k.length ? s - b.length : 1 / 0)), u += v, n = x + b, ("<" === o ? u + n + k : ">" === o ? k + u + n : "^" === o ? k.substring(0, S >>= 1) + u + n + k.substring(S) : u + (M ? n : k + n)) + e
+            }
+        }
+    }
+
+    function Ut(n) {
+        return n + ""
+    }
+
+    function jt() {
+        this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0])
+    }
+
+    function Ft(n, t, e) {
+        function r(t) {
+            var e = n(t), r = i(e, 1);
+            return r - t > t - e ? e : r
+        }
+
+        function u(e) {
+            return t(e = n(new cc(e - 1)), 1), e
+        }
+
+        function i(n, e) {
+            return t(n = new cc(+n), e), n
+        }
+
+        function o(n, r, i) {
+            var o = u(n), a = [];
+            if (i > 1)for (; r > o;)e(o) % i || a.push(new Date(+o)), t(o, 1); else for (; r > o;)a.push(new Date(+o)), t(o, 1);
+            return a
+        }
+
+        function a(n, t, e) {
+            try {
+                cc = jt;
+                var r = new jt;
+                return r._ = n, o(r, t, e)
+            } finally {
+                cc = Date
+            }
+        }
+
+        n.floor = n, n.round = r, n.ceil = u, n.offset = i, n.range = o;
+        var c = n.utc = Ht(n);
+        return c.floor = c, c.round = Ht(r), c.ceil = Ht(u), c.offset = Ht(i), c.range = a, n
+    }
+
+    function Ht(n) {
+        return function (t, e) {
+            try {
+                cc = jt;
+                var r = new jt;
+                return r._ = t, n(r, e)._
+            } finally {
+                cc = Date
+            }
+        }
+    }
+
+    function Ot(n) {
+        function t(n) {
+            function t(t) {
+                for (var e, u, i, o = [], a = -1, c = 0; ++a < r;)37 === n.charCodeAt(a) && (o.push(n.slice(c, a)), null != (u = sc[e = n.charAt(++a)]) && (e = n.charAt(++a)), (i = N[e]) && (e = i(t, null == u ? "e" === e ? " " : "0" : u)), o.push(e), c = a + 1);
+                return o.push(n.slice(c, a)), o.join("")
+            }
+
+            var r = n.length;
+            return t.parse = function (t) {
+                var r = {y: 1900, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0, Z: null}, u = e(r, n, t, 0);
+                if (u != t.length)return null;
+                "p"in r && (r.H = r.H % 12 + 12 * r.p);
+                var i = null != r.Z && cc !== jt, o = new (i ? jt : cc);
+                return "j"in r ? o.setFullYear(r.y, 0, r.j) : "w"in r && ("W"in r || "U"in r) ? (o.setFullYear(r.y, 0, 1), o.setFullYear(r.y, 0, "W"in r ? (r.w + 6) % 7 + 7 * r.W - (o.getDay() + 5) % 7 : r.w + 7 * r.U - (o.getDay() + 6) % 7)) : o.setFullYear(r.y, r.m, r.d), o.setHours(r.H + (r.Z / 100 | 0), r.M + r.Z % 100, r.S, r.L), i ? o._ : o
+            }, t.toString = function () {
+                return n
+            }, t
+        }
+
+        function e(n, t, e, r) {
+            for (var u, i, o, a = 0, c = t.length, l = e.length; c > a;) {
+                if (r >= l)return -1;
+                if (u = t.charCodeAt(a++), 37 === u) {
+                    if (o = t.charAt(a++), i = C[o in sc ? t.charAt(a++) : o], !i || (r = i(n, e, r)) < 0)return -1
+                } else if (u != e.charCodeAt(r++))return -1
+            }
+            return r
+        }
+
+        function r(n, t, e) {
+            _.lastIndex = 0;
+            var r = _.exec(t.slice(e));
+            return r ? (n.w = w.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function u(n, t, e) {
+            x.lastIndex = 0;
+            var r = x.exec(t.slice(e));
+            return r ? (n.w = b.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function i(n, t, e) {
+            E.lastIndex = 0;
+            var r = E.exec(t.slice(e));
+            return r ? (n.m = A.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function o(n, t, e) {
+            S.lastIndex = 0;
+            var r = S.exec(t.slice(e));
+            return r ? (n.m = k.get(r[0].toLowerCase()), e + r[0].length) : -1
+        }
+
+        function a(n, t, r) {
+            return e(n, N.c.toString(), t, r)
+        }
+
+        function c(n, t, r) {
+            return e(n, N.x.toString(), t, r)
+        }
+
+        function l(n, t, r) {
+            return e(n, N.X.toString(), t, r)
+        }
+
+        function s(n, t, e) {
+            var r = M.get(t.slice(e, e += 2).toLowerCase());
+            return null == r ? -1 : (n.p = r, e)
+        }
+
+        var f = n.dateTime, h = n.date, g = n.time, p = n.periods, v = n.days, d = n.shortDays, m = n.months, y = n.shortMonths;
+        t.utc = function (n) {
+            function e(n) {
+                try {
+                    cc = jt;
+                    var t = new cc;
+                    return t._ = n, r(t)
+                } finally {
+                    cc = Date
+                }
+            }
+
+            var r = t(n);
+            return e.parse = function (n) {
+                try {
+                    cc = jt;
+                    var t = r.parse(n);
+                    return t && t._
+                } finally {
+                    cc = Date
+                }
+            }, e.toString = r.toString, e
+        }, t.multi = t.utc.multi = ae;
+        var M = ta.map(), x = Yt(v), b = Zt(v), _ = Yt(d), w = Zt(d), S = Yt(m), k = Zt(m), E = Yt(y), A = Zt(y);
+        p.forEach(function (n, t) {
+            M.set(n.toLowerCase(), t)
+        });
+        var N = {
+            a: function (n) {
+                return d[n.getDay()]
+            }, A: function (n) {
+                return v[n.getDay()]
+            }, b: function (n) {
+                return y[n.getMonth()]
+            }, B: function (n) {
+                return m[n.getMonth()]
+            }, c: t(f), d: function (n, t) {
+                return It(n.getDate(), t, 2)
+            }, e: function (n, t) {
+                return It(n.getDate(), t, 2)
+            }, H: function (n, t) {
+                return It(n.getHours(), t, 2)
+            }, I: function (n, t) {
+                return It(n.getHours() % 12 || 12, t, 2)
+            }, j: function (n, t) {
+                return It(1 + ac.dayOfYear(n), t, 3)
+            }, L: function (n, t) {
+                return It(n.getMilliseconds(), t, 3)
+            }, m: function (n, t) {
+                return It(n.getMonth() + 1, t, 2)
+            }, M: function (n, t) {
+                return It(n.getMinutes(), t, 2)
+            }, p: function (n) {
+                return p[+(n.getHours() >= 12)]
+            }, S: function (n, t) {
+                return It(n.getSeconds(), t, 2)
+            }, U: function (n, t) {
+                return It(ac.sundayOfYear(n), t, 2)
+            }, w: function (n) {
+                return n.getDay()
+            }, W: function (n, t) {
+                return It(ac.mondayOfYear(n), t, 2)
+            }, x: t(h), X: t(g), y: function (n, t) {
+                return It(n.getFullYear() % 100, t, 2)
+            }, Y: function (n, t) {
+                return It(n.getFullYear() % 1e4, t, 4)
+            }, Z: ie, "%": function () {
+                return "%"
+            }
+        }, C = {
+            a: r,
+            A: u,
+            b: i,
+            B: o,
+            c: a,
+            d: Qt,
+            e: Qt,
+            H: te,
+            I: te,
+            j: ne,
+            L: ue,
+            m: Kt,
+            M: ee,
+            p: s,
+            S: re,
+            U: Xt,
+            w: Vt,
+            W: $t,
+            x: c,
+            X: l,
+            y: Wt,
+            Y: Bt,
+            Z: Jt,
+            "%": oe
+        };
+        return t
+    }
+
+    function It(n, t, e) {
+        var r = 0 > n ? "-" : "", u = (r ? -n : n) + "", i = u.length;
+        return r + (e > i ? new Array(e - i + 1).join(t) + u : u)
+    }
+
+    function Yt(n) {
+        return new RegExp("^(?:" + n.map(ta.requote).join("|") + ")", "i")
+    }
+
+    function Zt(n) {
+        for (var t = new l, e = -1, r = n.length; ++e < r;)t.set(n[e].toLowerCase(), e);
+        return t
+    }
+
+    function Vt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 1));
+        return r ? (n.w = +r[0], e + r[0].length) : -1
+    }
+
+    function Xt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e));
+        return r ? (n.U = +r[0], e + r[0].length) : -1
+    }
+
+    function $t(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e));
+        return r ? (n.W = +r[0], e + r[0].length) : -1
+    }
+
+    function Bt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 4));
+        return r ? (n.y = +r[0], e + r[0].length) : -1
+    }
+
+    function Wt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.y = Gt(+r[0]), e + r[0].length) : -1
+    }
+
+    function Jt(n, t, e) {
+        return /^[+-]\d{4}$/.test(t = t.slice(e, e + 5)) ? (n.Z = -t, e + 5) : -1
+    }
+
+    function Gt(n) {
+        return n + (n > 68 ? 1900 : 2e3)
+    }
+
+    function Kt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.m = r[0] - 1, e + r[0].length) : -1
+    }
+
+    function Qt(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.d = +r[0], e + r[0].length) : -1
+    }
+
+    function ne(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 3));
+        return r ? (n.j = +r[0], e + r[0].length) : -1
+    }
+
+    function te(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.H = +r[0], e + r[0].length) : -1
+    }
+
+    function ee(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.M = +r[0], e + r[0].length) : -1
+    }
+
+    function re(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 2));
+        return r ? (n.S = +r[0], e + r[0].length) : -1
+    }
+
+    function ue(n, t, e) {
+        fc.lastIndex = 0;
+        var r = fc.exec(t.slice(e, e + 3));
+        return r ? (n.L = +r[0], e + r[0].length) : -1
+    }
+
+    function ie(n) {
+        var t = n.getTimezoneOffset(), e = t > 0 ? "-" : "+", r = ga(t) / 60 | 0, u = ga(t) % 60;
+        return e + It(r, "0", 2) + It(u, "0", 2)
+    }
+
+    function oe(n, t, e) {
+        hc.lastIndex = 0;
+        var r = hc.exec(t.slice(e, e + 1));
+        return r ? e + r[0].length : -1
+    }
+
+    function ae(n) {
+        for (var t = n.length, e = -1; ++e < t;)n[e][0] = this(n[e][0]);
+        return function (t) {
+            for (var e = 0, r = n[e]; !r[1](t);)r = n[++e];
+            return r[0](t)
+        }
+    }
+
+    function ce() {
+    }
+
+    function le(n, t, e) {
+        var r = e.s = n + t, u = r - n, i = r - u;
+        e.t = n - i + (t - u)
+    }
+
+    function se(n, t) {
+        n && dc.hasOwnProperty(n.type) && dc[n.type](n, t)
+    }
+
+    function fe(n, t, e) {
+        var r, u = -1, i = n.length - e;
+        for (t.lineStart(); ++u < i;)r = n[u], t.point(r[0], r[1], r[2]);
+        t.lineEnd()
+    }
+
+    function he(n, t) {
+        var e = -1, r = n.length;
+        for (t.polygonStart(); ++e < r;)fe(n[e], t, 1);
+        t.polygonEnd()
+    }
+
+    function ge() {
+        function n(n, t) {
+            n *= Da, t = t * Da / 2 + qa / 4;
+            var e = n - r, o = e >= 0 ? 1 : -1, a = o * e, c = Math.cos(t), l = Math.sin(t), s = i * l, f = u * c + s * Math.cos(a), h = s * o * Math.sin(a);
+            yc.add(Math.atan2(h, f)), r = n, u = c, i = l
+        }
+
+        var t, e, r, u, i;
+        Mc.point = function (o, a) {
+            Mc.point = n, r = (t = o) * Da, u = Math.cos(a = (e = a) * Da / 2 + qa / 4), i = Math.sin(a)
+        }, Mc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function pe(n) {
+        var t = n[0], e = n[1], r = Math.cos(e);
+        return [r * Math.cos(t), r * Math.sin(t), Math.sin(e)]
+    }
+
+    function ve(n, t) {
+        return n[0] * t[0] + n[1] * t[1] + n[2] * t[2]
+    }
+
+    function de(n, t) {
+        return [n[1] * t[2] - n[2] * t[1], n[2] * t[0] - n[0] * t[2], n[0] * t[1] - n[1] * t[0]]
+    }
+
+    function me(n, t) {
+        n[0] += t[0], n[1] += t[1], n[2] += t[2]
+    }
+
+    function ye(n, t) {
+        return [n[0] * t, n[1] * t, n[2] * t]
+    }
+
+    function Me(n) {
+        var t = Math.sqrt(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
+        n[0] /= t, n[1] /= t, n[2] /= t
+    }
+
+    function xe(n) {
+        return [Math.atan2(n[1], n[0]), tt(n[2])]
+    }
+
+    function be(n, t) {
+        return ga(n[0] - t[0]) < Ca && ga(n[1] - t[1]) < Ca
+    }
+
+    function _e(n, t) {
+        n *= Da;
+        var e = Math.cos(t *= Da);
+        we(e * Math.cos(n), e * Math.sin(n), Math.sin(t))
+    }
+
+    function we(n, t, e) {
+        ++xc, _c += (n - _c) / xc, wc += (t - wc) / xc, Sc += (e - Sc) / xc
+    }
+
+    function Se() {
+        function n(n, u) {
+            n *= Da;
+            var i = Math.cos(u *= Da), o = i * Math.cos(n), a = i * Math.sin(n), c = Math.sin(u), l = Math.atan2(Math.sqrt((l = e * c - r * a) * l + (l = r * o - t * c) * l + (l = t * a - e * o) * l), t * o + e * a + r * c);
+            bc += l, kc += l * (t + (t = o)), Ec += l * (e + (e = a)), Ac += l * (r + (r = c)), we(t, e, r)
+        }
+
+        var t, e, r;
+        qc.point = function (u, i) {
+            u *= Da;
+            var o = Math.cos(i *= Da);
+            t = o * Math.cos(u), e = o * Math.sin(u), r = Math.sin(i), qc.point = n, we(t, e, r)
+        }
+    }
+
+    function ke() {
+        qc.point = _e
+    }
+
+    function Ee() {
+        function n(n, t) {
+            n *= Da;
+            var e = Math.cos(t *= Da), o = e * Math.cos(n), a = e * Math.sin(n), c = Math.sin(t), l = u * c - i * a, s = i * o - r * c, f = r * a - u * o, h = Math.sqrt(l * l + s * s + f * f), g = r * o + u * a + i * c, p = h && -nt(g) / h, v = Math.atan2(h, g);
+            Nc += p * l, Cc += p * s, zc += p * f, bc += v, kc += v * (r + (r = o)), Ec += v * (u + (u = a)), Ac += v * (i + (i = c)), we(r, u, i)
+        }
+
+        var t, e, r, u, i;
+        qc.point = function (o, a) {
+            t = o, e = a, qc.point = n, o *= Da;
+            var c = Math.cos(a *= Da);
+            r = c * Math.cos(o), u = c * Math.sin(o), i = Math.sin(a), we(r, u, i)
+        }, qc.lineEnd = function () {
+            n(t, e), qc.lineEnd = ke, qc.point = _e
+        }
+    }
+
+    function Ae(n, t) {
+        function e(e, r) {
+            return e = n(e, r), t(e[0], e[1])
+        }
+
+        return n.invert && t.invert && (e.invert = function (e, r) {
+            return e = t.invert(e, r), e && n.invert(e[0], e[1])
+        }), e
+    }
+
+    function Ne() {
+        return !0
+    }
+
+    function Ce(n, t, e, r, u) {
+        var i = [], o = [];
+        if (n.forEach(function (n) {
+                if (!((t = n.length - 1) <= 0)) {
+                    var t, e = n[0], r = n[t];
+                    if (be(e, r)) {
+                        u.lineStart();
+                        for (var a = 0; t > a; ++a)u.point((e = n[a])[0], e[1]);
+                        return void u.lineEnd()
+                    }
+                    var c = new qe(e, n, null, !0), l = new qe(e, null, c, !1);
+                    c.o = l, i.push(c), o.push(l), c = new qe(r, n, null, !1), l = new qe(r, null, c, !0), c.o = l, i.push(c), o.push(l)
+                }
+            }), o.sort(t), ze(i), ze(o), i.length) {
+            for (var a = 0, c = e, l = o.length; l > a; ++a)o[a].e = c = !c;
+            for (var s, f, h = i[0]; ;) {
+                for (var g = h, p = !0; g.v;)if ((g = g.n) === h)return;
+                s = g.z, u.lineStart();
+                do {
+                    if (g.v = g.o.v = !0, g.e) {
+                        if (p)for (var a = 0, l = s.length; l > a; ++a)u.point((f = s[a])[0], f[1]); else r(g.x, g.n.x, 1, u);
+                        g = g.n
+                    } else {
+                        if (p) {
+                            s = g.p.z;
+                            for (var a = s.length - 1; a >= 0; --a)u.point((f = s[a])[0], f[1])
+                        } else r(g.x, g.p.x, -1, u);
+                        g = g.p
+                    }
+                    g = g.o, s = g.z, p = !p
+                } while (!g.v);
+                u.lineEnd()
+            }
+        }
+    }
+
+    function ze(n) {
+        if (t = n.length) {
+            for (var t, e, r = 0, u = n[0]; ++r < t;)u.n = e = n[r], e.p = u, u = e;
+            u.n = e = n[0], e.p = u
+        }
+    }
+
+    function qe(n, t, e, r) {
+        this.x = n, this.z = t, this.o = e, this.e = r, this.v = !1, this.n = this.p = null
+    }
+
+    function Le(n, t, e, r) {
+        return function (u, i) {
+            function o(t, e) {
+                var r = u(t, e);
+                n(t = r[0], e = r[1]) && i.point(t, e)
+            }
+
+            function a(n, t) {
+                var e = u(n, t);
+                d.point(e[0], e[1])
+            }
+
+            function c() {
+                y.point = a, d.lineStart()
+            }
+
+            function l() {
+                y.point = o, d.lineEnd()
+            }
+
+            function s(n, t) {
+                v.push([n, t]);
+                var e = u(n, t);
+                x.point(e[0], e[1])
+            }
+
+            function f() {
+                x.lineStart(), v = []
+            }
+
+            function h() {
+                s(v[0][0], v[0][1]), x.lineEnd();
+                var n, t = x.clean(), e = M.buffer(), r = e.length;
+                if (v.pop(), p.push(v), v = null, r)if (1 & t) {
+                    n = e[0];
+                    var u, r = n.length - 1, o = -1;
+                    if (r > 0) {
+                        for (b || (i.polygonStart(), b = !0), i.lineStart(); ++o < r;)i.point((u = n[o])[0], u[1]);
+                        i.lineEnd()
+                    }
+                } else r > 1 && 2 & t && e.push(e.pop().concat(e.shift())), g.push(e.filter(Te))
+            }
+
+            var g, p, v, d = t(i), m = u.invert(r[0], r[1]), y = {
+                point: o,
+                lineStart: c,
+                lineEnd: l,
+                polygonStart: function () {
+                    y.point = s, y.lineStart = f, y.lineEnd = h, g = [], p = []
+                },
+                polygonEnd: function () {
+                    y.point = o, y.lineStart = c, y.lineEnd = l, g = ta.merge(g);
+                    var n = Fe(m, p);
+                    g.length ? (b || (i.polygonStart(), b = !0), Ce(g, De, n, e, i)) : n && (b || (i.polygonStart(), b = !0), i.lineStart(), e(null, null, 1, i), i.lineEnd()), b && (i.polygonEnd(), b = !1), g = p = null
+                },
+                sphere: function () {
+                    i.polygonStart(), i.lineStart(), e(null, null, 1, i), i.lineEnd(), i.polygonEnd()
+                }
+            }, M = Re(), x = t(M), b = !1;
+            return y
+        }
+    }
+
+    function Te(n) {
+        return n.length > 1
+    }
+
+    function Re() {
+        var n, t = [];
+        return {
+            lineStart: function () {
+                t.push(n = [])
+            }, point: function (t, e) {
+                n.push([t, e])
+            }, lineEnd: b, buffer: function () {
+                var e = t;
+                return t = [], n = null, e
+            }, rejoin: function () {
+                t.length > 1 && t.push(t.pop().concat(t.shift()))
+            }
+        }
+    }
+
+    function De(n, t) {
+        return ((n = n.x)[0] < 0 ? n[1] - Ra - Ca : Ra - n[1]) - ((t = t.x)[0] < 0 ? t[1] - Ra - Ca : Ra - t[1])
+    }
+
+    function Pe(n) {
+        var t, e = 0 / 0, r = 0 / 0, u = 0 / 0;
+        return {
+            lineStart: function () {
+                n.lineStart(), t = 1
+            }, point: function (i, o) {
+                var a = i > 0 ? qa : -qa, c = ga(i - e);
+                ga(c - qa) < Ca ? (n.point(e, r = (r + o) / 2 > 0 ? Ra : -Ra), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), n.point(i, r), t = 0) : u !== a && c >= qa && (ga(e - u) < Ca && (e -= u * Ca), ga(i - a) < Ca && (i -= a * Ca), r = Ue(e, r, i, o), n.point(u, r), n.lineEnd(), n.lineStart(), n.point(a, r), t = 0), n.point(e = i, r = o), u = a
+            }, lineEnd: function () {
+                n.lineEnd(), e = r = 0 / 0
+            }, clean: function () {
+                return 2 - t
+            }
+        }
+    }
+
+    function Ue(n, t, e, r) {
+        var u, i, o = Math.sin(n - e);
+        return ga(o) > Ca ? Math.atan((Math.sin(t) * (i = Math.cos(r)) * Math.sin(e) - Math.sin(r) * (u = Math.cos(t)) * Math.sin(n)) / (u * i * o)) : (t + r) / 2
+    }
+
+    function je(n, t, e, r) {
+        var u;
+        if (null == n)u = e * Ra, r.point(-qa, u), r.point(0, u), r.point(qa, u), r.point(qa, 0), r.point(qa, -u), r.point(0, -u), r.point(-qa, -u), r.point(-qa, 0), r.point(-qa, u); else if (ga(n[0] - t[0]) > Ca) {
+            var i = n[0] < t[0] ? qa : -qa;
+            u = e * i / 2, r.point(-i, u), r.point(0, u), r.point(i, u)
+        } else r.point(t[0], t[1])
+    }
+
+    function Fe(n, t) {
+        var e = n[0], r = n[1], u = [Math.sin(e), -Math.cos(e), 0], i = 0, o = 0;
+        yc.reset();
+        for (var a = 0, c = t.length; c > a; ++a) {
+            var l = t[a], s = l.length;
+            if (s)for (var f = l[0], h = f[0], g = f[1] / 2 + qa / 4, p = Math.sin(g), v = Math.cos(g), d = 1; ;) {
+                d === s && (d = 0), n = l[d];
+                var m = n[0], y = n[1] / 2 + qa / 4, M = Math.sin(y), x = Math.cos(y), b = m - h, _ = b >= 0 ? 1 : -1, w = _ * b, S = w > qa, k = p * M;
+                if (yc.add(Math.atan2(k * _ * Math.sin(w), v * x + k * Math.cos(w))), i += S ? b + _ * La : b, S ^ h >= e ^ m >= e) {
+                    var E = de(pe(f), pe(n));
+                    Me(E);
+                    var A = de(u, E);
+                    Me(A);
+                    var N = (S ^ b >= 0 ? -1 : 1) * tt(A[2]);
+                    (r > N || r === N && (E[0] || E[1])) && (o += S ^ b >= 0 ? 1 : -1)
+                }
+                if (!d++)break;
+                h = m, p = M, v = x, f = n
+            }
+        }
+        return (-Ca > i || Ca > i && 0 > yc) ^ 1 & o
+    }
+
+    function He(n) {
+        function t(n, t) {
+            return Math.cos(n) * Math.cos(t) > i
+        }
+
+        function e(n) {
+            var e, i, c, l, s;
+            return {
+                lineStart: function () {
+                    l = c = !1, s = 1
+                }, point: function (f, h) {
+                    var g, p = [f, h], v = t(f, h), d = o ? v ? 0 : u(f, h) : v ? u(f + (0 > f ? qa : -qa), h) : 0;
+                    if (!e && (l = c = v) && n.lineStart(), v !== c && (g = r(e, p), (be(e, g) || be(p, g)) && (p[0] += Ca, p[1] += Ca, v = t(p[0], p[1]))), v !== c)s = 0, v ? (n.lineStart(), g = r(p, e), n.point(g[0], g[1])) : (g = r(e, p), n.point(g[0], g[1]), n.lineEnd()), e = g; else if (a && e && o ^ v) {
+                        var m;
+                        d & i || !(m = r(p, e, !0)) || (s = 0, o ? (n.lineStart(), n.point(m[0][0], m[0][1]), n.point(m[1][0], m[1][1]), n.lineEnd()) : (n.point(m[1][0], m[1][1]), n.lineEnd(), n.lineStart(), n.point(m[0][0], m[0][1])))
+                    }
+                    !v || e && be(e, p) || n.point(p[0], p[1]), e = p, c = v, i = d
+                }, lineEnd: function () {
+                    c && n.lineEnd(), e = null
+                }, clean: function () {
+                    return s | (l && c) << 1
+                }
+            }
+        }
+
+        function r(n, t, e) {
+            var r = pe(n), u = pe(t), o = [1, 0, 0], a = de(r, u), c = ve(a, a), l = a[0], s = c - l * l;
+            if (!s)return !e && n;
+            var f = i * c / s, h = -i * l / s, g = de(o, a), p = ye(o, f), v = ye(a, h);
+            me(p, v);
+            var d = g, m = ve(p, d), y = ve(d, d), M = m * m - y * (ve(p, p) - 1);
+            if (!(0 > M)) {
+                var x = Math.sqrt(M), b = ye(d, (-m - x) / y);
+                if (me(b, p), b = xe(b), !e)return b;
+                var _, w = n[0], S = t[0], k = n[1], E = t[1];
+                w > S && (_ = w, w = S, S = _);
+                var A = S - w, N = ga(A - qa) < Ca, C = N || Ca > A;
+                if (!N && k > E && (_ = k, k = E, E = _), C ? N ? k + E > 0 ^ b[1] < (ga(b[0] - w) < Ca ? k : E) : k <= b[1] && b[1] <= E : A > qa ^ (w <= b[0] && b[0] <= S)) {
+                    var z = ye(d, (-m + x) / y);
+                    return me(z, p), [b, xe(z)]
+                }
+            }
+        }
+
+        function u(t, e) {
+            var r = o ? n : qa - n, u = 0;
+            return -r > t ? u |= 1 : t > r && (u |= 2), -r > e ? u |= 4 : e > r && (u |= 8), u
+        }
+
+        var i = Math.cos(n), o = i > 0, a = ga(i) > Ca, c = gr(n, 6 * Da);
+        return Le(t, e, c, o ? [0, -n] : [-qa, n - qa])
+    }
+
+    function Oe(n, t, e, r) {
+        return function (u) {
+            var i, o = u.a, a = u.b, c = o.x, l = o.y, s = a.x, f = a.y, h = 0, g = 1, p = s - c, v = f - l;
+            if (i = n - c, p || !(i > 0)) {
+                if (i /= p, 0 > p) {
+                    if (h > i)return;
+                    g > i && (g = i)
+                } else if (p > 0) {
+                    if (i > g)return;
+                    i > h && (h = i)
+                }
+                if (i = e - c, p || !(0 > i)) {
+                    if (i /= p, 0 > p) {
+                        if (i > g)return;
+                        i > h && (h = i)
+                    } else if (p > 0) {
+                        if (h > i)return;
+                        g > i && (g = i)
+                    }
+                    if (i = t - l, v || !(i > 0)) {
+                        if (i /= v, 0 > v) {
+                            if (h > i)return;
+                            g > i && (g = i)
+                        } else if (v > 0) {
+                            if (i > g)return;
+                            i > h && (h = i)
+                        }
+                        if (i = r - l, v || !(0 > i)) {
+                            if (i /= v, 0 > v) {
+                                if (i > g)return;
+                                i > h && (h = i)
+                            } else if (v > 0) {
+                                if (h > i)return;
+                                g > i && (g = i)
+                            }
+                            return h > 0 && (u.a = {x: c + h * p, y: l + h * v}), 1 > g && (u.b = {
+                                x: c + g * p,
+                                y: l + g * v
+                            }), u
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    function Ie(n, t, e, r) {
+        function u(r, u) {
+            return ga(r[0] - n) < Ca ? u > 0 ? 0 : 3 : ga(r[0] - e) < Ca ? u > 0 ? 2 : 1 : ga(r[1] - t) < Ca ? u > 0 ? 1 : 0 : u > 0 ? 3 : 2
+        }
+
+        function i(n, t) {
+            return o(n.x, t.x)
+        }
+
+        function o(n, t) {
+            var e = u(n, 1), r = u(t, 1);
+            return e !== r ? e - r : 0 === e ? t[1] - n[1] : 1 === e ? n[0] - t[0] : 2 === e ? n[1] - t[1] : t[0] - n[0]
+        }
+
+        return function (a) {
+            function c(n) {
+                for (var t = 0, e = d.length, r = n[1], u = 0; e > u; ++u)for (var i, o = 1, a = d[u], c = a.length, l = a[0]; c > o; ++o)i = a[o], l[1] <= r ? i[1] > r && Q(l, i, n) > 0 && ++t : i[1] <= r && Q(l, i, n) < 0 && --t, l = i;
+                return 0 !== t
+            }
+
+            function l(i, a, c, l) {
+                var s = 0, f = 0;
+                if (null == i || (s = u(i, c)) !== (f = u(a, c)) || o(i, a) < 0 ^ c > 0) {
+                    do l.point(0 === s || 3 === s ? n : e, s > 1 ? r : t); while ((s = (s + c + 4) % 4) !== f)
+                } else l.point(a[0], a[1])
+            }
+
+            function s(u, i) {
+                return u >= n && e >= u && i >= t && r >= i
+            }
+
+            function f(n, t) {
+                s(n, t) && a.point(n, t)
+            }
+
+            function h() {
+                C.point = p, d && d.push(m = []), S = !0, w = !1, b = _ = 0 / 0
+            }
+
+            function g() {
+                v && (p(y, M), x && w && A.rejoin(), v.push(A.buffer())), C.point = f, w && a.lineEnd()
+            }
+
+            function p(n, t) {
+                n = Math.max(-Tc, Math.min(Tc, n)), t = Math.max(-Tc, Math.min(Tc, t));
+                var e = s(n, t);
+                if (d && m.push([n, t]), S)y = n, M = t, x = e, S = !1, e && (a.lineStart(), a.point(n, t)); else if (e && w)a.point(n, t); else {
+                    var r = {a: {x: b, y: _}, b: {x: n, y: t}};
+                    N(r) ? (w || (a.lineStart(), a.point(r.a.x, r.a.y)), a.point(r.b.x, r.b.y), e || a.lineEnd(), k = !1) : e && (a.lineStart(), a.point(n, t), k = !1)
+                }
+                b = n, _ = t, w = e
+            }
+
+            var v, d, m, y, M, x, b, _, w, S, k, E = a, A = Re(), N = Oe(n, t, e, r), C = {
+                point: f,
+                lineStart: h,
+                lineEnd: g,
+                polygonStart: function () {
+                    a = A, v = [], d = [], k = !0
+                },
+                polygonEnd: function () {
+                    a = E, v = ta.merge(v);
+                    var t = c([n, r]), e = k && t, u = v.length;
+                    (e || u) && (a.polygonStart(), e && (a.lineStart(), l(null, null, 1, a), a.lineEnd()), u && Ce(v, i, t, l, a), a.polygonEnd()), v = d = m = null
+                }
+            };
+            return C
+        }
+    }
+
+    function Ye(n) {
+        var t = 0, e = qa / 3, r = ir(n), u = r(t, e);
+        return u.parallels = function (n) {
+            return arguments.length ? r(t = n[0] * qa / 180, e = n[1] * qa / 180) : [t / qa * 180, e / qa * 180]
+        }, u
+    }
+
+    function Ze(n, t) {
+        function e(n, t) {
+            var e = Math.sqrt(i - 2 * u * Math.sin(t)) / u;
+            return [e * Math.sin(n *= u), o - e * Math.cos(n)]
+        }
+
+        var r = Math.sin(n), u = (r + Math.sin(t)) / 2, i = 1 + r * (2 * u - r), o = Math.sqrt(i) / u;
+        return e.invert = function (n, t) {
+            var e = o - t;
+            return [Math.atan2(n, e) / u, tt((i - (n * n + e * e) * u * u) / (2 * u))]
+        }, e
+    }
+
+    function Ve() {
+        function n(n, t) {
+            Dc += u * n - r * t, r = n, u = t
+        }
+
+        var t, e, r, u;
+        Hc.point = function (i, o) {
+            Hc.point = n, t = r = i, e = u = o
+        }, Hc.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Xe(n, t) {
+        Pc > n && (Pc = n), n > jc && (jc = n), Uc > t && (Uc = t), t > Fc && (Fc = t)
+    }
+
+    function $e() {
+        function n(n, t) {
+            o.push("M", n, ",", t, i)
+        }
+
+        function t(n, t) {
+            o.push("M", n, ",", t), a.point = e
+        }
+
+        function e(n, t) {
+            o.push("L", n, ",", t)
+        }
+
+        function r() {
+            a.point = n
+        }
+
+        function u() {
+            o.push("Z")
+        }
+
+        var i = Be(4.5), o = [], a = {
+            point: n, lineStart: function () {
+                a.point = t
+            }, lineEnd: r, polygonStart: function () {
+                a.lineEnd = u
+            }, polygonEnd: function () {
+                a.lineEnd = r, a.point = n
+            }, pointRadius: function (n) {
+                return i = Be(n), a
+            }, result: function () {
+                if (o.length) {
+                    var n = o.join("");
+                    return o = [], n
+                }
+            }
+        };
+        return a
+    }
+
+    function Be(n) {
+        return "m0," + n + "a" + n + "," + n + " 0 1,1 0," + -2 * n + "a" + n + "," + n + " 0 1,1 0," + 2 * n + "z"
+    }
+
+    function We(n, t) {
+        _c += n, wc += t, ++Sc
+    }
+
+    function Je() {
+        function n(n, r) {
+            var u = n - t, i = r - e, o = Math.sqrt(u * u + i * i);
+            kc += o * (t + n) / 2, Ec += o * (e + r) / 2, Ac += o, We(t = n, e = r)
+        }
+
+        var t, e;
+        Ic.point = function (r, u) {
+            Ic.point = n, We(t = r, e = u)
+        }
+    }
+
+    function Ge() {
+        Ic.point = We
+    }
+
+    function Ke() {
+        function n(n, t) {
+            var e = n - r, i = t - u, o = Math.sqrt(e * e + i * i);
+            kc += o * (r + n) / 2, Ec += o * (u + t) / 2, Ac += o, o = u * n - r * t, Nc += o * (r + n), Cc += o * (u + t), zc += 3 * o, We(r = n, u = t)
+        }
+
+        var t, e, r, u;
+        Ic.point = function (i, o) {
+            Ic.point = n, We(t = r = i, e = u = o)
+        }, Ic.lineEnd = function () {
+            n(t, e)
+        }
+    }
+
+    function Qe(n) {
+        function t(t, e) {
+            n.moveTo(t + o, e), n.arc(t, e, o, 0, La)
+        }
+
+        function e(t, e) {
+            n.moveTo(t, e), a.point = r
+        }
+
+        function r(t, e) {
+            n.lineTo(t, e)
+        }
+
+        function u() {
+            a.point = t
+        }
+
+        function i() {
+            n.closePath()
+        }
+
+        var o = 4.5, a = {
+            point: t, lineStart: function () {
+                a.point = e
+            }, lineEnd: u, polygonStart: function () {
+                a.lineEnd = i
+            }, polygonEnd: function () {
+                a.lineEnd = u, a.point = t
+            }, pointRadius: function (n) {
+                return o = n, a
+            }, result: b
+        };
+        return a
+    }
+
+    function nr(n) {
+        function t(n) {
+            return (a ? r : e)(n)
+        }
+
+        function e(t) {
+            return rr(t, function (e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            })
+        }
+
+        function r(t) {
+            function e(e, r) {
+                e = n(e, r), t.point(e[0], e[1])
+            }
+
+            function r() {
+                M = 0 / 0, S.point = i, t.lineStart()
+            }
+
+            function i(e, r) {
+                var i = pe([e, r]), o = n(e, r);
+                u(M, x, y, b, _, w, M = o[0], x = o[1], y = e, b = i[0], _ = i[1], w = i[2], a, t), t.point(M, x)
+            }
+
+            function o() {
+                S.point = e, t.lineEnd()
+            }
+
+            function c() {
+                r(), S.point = l, S.lineEnd = s
+            }
+
+            function l(n, t) {
+                i(f = n, h = t), g = M, p = x, v = b, d = _, m = w, S.point = i
+            }
+
+            function s() {
+                u(M, x, y, b, _, w, g, p, f, v, d, m, a, t), S.lineEnd = o, o()
+            }
+
+            var f, h, g, p, v, d, m, y, M, x, b, _, w, S = {
+                point: e, lineStart: r, lineEnd: o, polygonStart: function () {
+                    t.polygonStart(), S.lineStart = c
+                }, polygonEnd: function () {
+                    t.polygonEnd(), S.lineStart = r
+                }
+            };
+            return S
+        }
+
+        function u(t, e, r, a, c, l, s, f, h, g, p, v, d, m) {
+            var y = s - t, M = f - e, x = y * y + M * M;
+            if (x > 4 * i && d--) {
+                var b = a + g, _ = c + p, w = l + v, S = Math.sqrt(b * b + _ * _ + w * w), k = Math.asin(w /= S), E = ga(ga(w) - 1) < Ca || ga(r - h) < Ca ? (r + h) / 2 : Math.atan2(_, b), A = n(E, k), N = A[0], C = A[1], z = N - t, q = C - e, L = M * z - y * q;
+                (L * L / x > i || ga((y * z + M * q) / x - .5) > .3 || o > a * g + c * p + l * v) && (u(t, e, r, a, c, l, N, C, E, b /= S, _ /= S, w, d, m), m.point(N, C), u(N, C, E, b, _, w, s, f, h, g, p, v, d, m))
+            }
+        }
+
+        var i = .5, o = Math.cos(30 * Da), a = 16;
+        return t.precision = function (n) {
+            return arguments.length ? (a = (i = n * n) > 0 && 16, t) : Math.sqrt(i)
+        }, t
+    }
+
+    function tr(n) {
+        var t = nr(function (t, e) {
+            return n([t * Pa, e * Pa])
+        });
+        return function (n) {
+            return or(t(n))
+        }
+    }
+
+    function er(n) {
+        this.stream = n
+    }
+
+    function rr(n, t) {
+        return {
+            point: t, sphere: function () {
+                n.sphere()
+            }, lineStart: function () {
+                n.lineStart()
+            }, lineEnd: function () {
+                n.lineEnd()
+            }, polygonStart: function () {
+                n.polygonStart()
+            }, polygonEnd: function () {
+                n.polygonEnd()
+            }
+        }
+    }
+
+    function ur(n) {
+        return ir(function () {
+            return n
+        })()
+    }
+
+    function ir(n) {
+        function t(n) {
+            return n = a(n[0] * Da, n[1] * Da), [n[0] * h + c, l - n[1] * h]
+        }
+
+        function e(n) {
+            return n = a.invert((n[0] - c) / h, (l - n[1]) / h), n && [n[0] * Pa, n[1] * Pa]
+        }
+
+        function r() {
+            a = Ae(o = lr(m, M, x), i);
+            var n = i(v, d);
+            return c = g - n[0] * h, l = p + n[1] * h, u()
+        }
+
+        function u() {
+            return s && (s.valid = !1, s = null), t
+        }
+
+        var i, o, a, c, l, s, f = nr(function (n, t) {
+            return n = i(n, t), [n[0] * h + c, l - n[1] * h]
+        }), h = 150, g = 480, p = 250, v = 0, d = 0, m = 0, M = 0, x = 0, b = Lc, _ = y, w = null, S = null;
+        return t.stream = function (n) {
+            return s && (s.valid = !1), s = or(b(o, f(_(n)))), s.valid = !0, s
+        }, t.clipAngle = function (n) {
+            return arguments.length ? (b = null == n ? (w = n, Lc) : He((w = +n) * Da), u()) : w
+        }, t.clipExtent = function (n) {
+            return arguments.length ? (S = n, _ = n ? Ie(n[0][0], n[0][1], n[1][0], n[1][1]) : y, u()) : S
+        }, t.scale = function (n) {
+            return arguments.length ? (h = +n, r()) : h
+        }, t.translate = function (n) {
+            return arguments.length ? (g = +n[0], p = +n[1], r()) : [g, p]
+        }, t.center = function (n) {
+            return arguments.length ? (v = n[0] % 360 * Da, d = n[1] % 360 * Da, r()) : [v * Pa, d * Pa]
+        }, t.rotate = function (n) {
+            return arguments.length ? (m = n[0] % 360 * Da, M = n[1] % 360 * Da, x = n.length > 2 ? n[2] % 360 * Da : 0, r()) : [m * Pa, M * Pa, x * Pa]
+        }, ta.rebind(t, f, "precision"), function () {
+            return i = n.apply(this, arguments), t.invert = i.invert && e, r()
+        }
+    }
+
+    function or(n) {
+        return rr(n, function (t, e) {
+            n.point(t * Da, e * Da)
+        })
+    }
+
+    function ar(n, t) {
+        return [n, t]
+    }
+
+    function cr(n, t) {
+        return [n > qa ? n - La : -qa > n ? n + La : n, t]
+    }
+
+    function lr(n, t, e) {
+        return n ? t || e ? Ae(fr(n), hr(t, e)) : fr(n) : t || e ? hr(t, e) : cr
+    }
+
+    function sr(n) {
+        return function (t, e) {
+            return t += n, [t > qa ? t - La : -qa > t ? t + La : t, e]
+        }
+    }
+
+    function fr(n) {
+        var t = sr(n);
+        return t.invert = sr(-n), t
+    }
+
+    function hr(n, t) {
+        function e(n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * r + a * u;
+            return [Math.atan2(c * i - s * o, a * r - l * u), tt(s * i + c * o)]
+        }
+
+        var r = Math.cos(n), u = Math.sin(n), i = Math.cos(t), o = Math.sin(t);
+        return e.invert = function (n, t) {
+            var e = Math.cos(t), a = Math.cos(n) * e, c = Math.sin(n) * e, l = Math.sin(t), s = l * i - c * o;
+            return [Math.atan2(c * i + l * o, a * r + s * u), tt(s * r - a * u)]
+        }, e
+    }
+
+    function gr(n, t) {
+        var e = Math.cos(n), r = Math.sin(n);
+        return function (u, i, o, a) {
+            var c = o * t;
+            null != u ? (u = pr(e, u), i = pr(e, i), (o > 0 ? i > u : u > i) && (u += o * La)) : (u = n + o * La, i = n - .5 * c);
+            for (var l, s = u; o > 0 ? s > i : i > s; s -= c)a.point((l = xe([e, -r * Math.cos(s), -r * Math.sin(s)]))[0], l[1])
+        }
+    }
+
+    function pr(n, t) {
+        var e = pe(t);
+        e[0] -= n, Me(e);
+        var r = nt(-e[1]);
+        return ((-e[2] < 0 ? -r : r) + 2 * Math.PI - Ca) % (2 * Math.PI)
+    }
+
+    function vr(n, t, e) {
+        var r = ta.range(n, t - Ca, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [n, t]
+            })
+        }
+    }
+
+    function dr(n, t, e) {
+        var r = ta.range(n, t - Ca, e).concat(t);
+        return function (n) {
+            return r.map(function (t) {
+                return [t, n]
+            })
+        }
+    }
+
+    function mr(n) {
+        return n.source
+    }
+
+    function yr(n) {
+        return n.target
+    }
+
+    function Mr(n, t, e, r) {
+        var u = Math.cos(t), i = Math.sin(t), o = Math.cos(r), a = Math.sin(r), c = u * Math.cos(n), l = u * Math.sin(n), s = o * Math.cos(e), f = o * Math.sin(e), h = 2 * Math.asin(Math.sqrt(it(r - t) + u * o * it(e - n))), g = 1 / Math.sin(h), p = h ? function (n) {
+            var t = Math.sin(n *= h) * g, e = Math.sin(h - n) * g, r = e * c + t * s, u = e * l + t * f, o = e * i + t * a;
+            return [Math.atan2(u, r) * Pa, Math.atan2(o, Math.sqrt(r * r + u * u)) * Pa]
+        } : function () {
+            return [n * Pa, t * Pa]
+        };
+        return p.distance = h, p
+    }
+
+    function xr() {
+        function n(n, u) {
+            var i = Math.sin(u *= Da), o = Math.cos(u), a = ga((n *= Da) - t), c = Math.cos(a);
+            Yc += Math.atan2(Math.sqrt((a = o * Math.sin(a)) * a + (a = r * i - e * o * c) * a), e * i + r * o * c), t = n, e = i, r = o
+        }
+
+        var t, e, r;
+        Zc.point = function (u, i) {
+            t = u * Da, e = Math.sin(i *= Da), r = Math.cos(i), Zc.point = n
+        }, Zc.lineEnd = function () {
+            Zc.point = Zc.lineEnd = b
+        }
+    }
+
+    function br(n, t) {
+        function e(t, e) {
+            var r = Math.cos(t), u = Math.cos(e), i = n(r * u);
+            return [i * u * Math.sin(t), i * Math.sin(e)]
+        }
+
+        return e.invert = function (n, e) {
+            var r = Math.sqrt(n * n + e * e), u = t(r), i = Math.sin(u), o = Math.cos(u);
+            return [Math.atan2(n * i, r * o), Math.asin(r && e * i / r)]
+        }, e
+    }
+
+    function _r(n, t) {
+        function e(n, t) {
+            o > 0 ? -Ra + Ca > t && (t = -Ra + Ca) : t > Ra - Ca && (t = Ra - Ca);
+            var e = o / Math.pow(u(t), i);
+            return [e * Math.sin(i * n), o - e * Math.cos(i * n)]
+        }
+
+        var r = Math.cos(n), u = function (n) {
+            return Math.tan(qa / 4 + n / 2)
+        }, i = n === t ? Math.sin(n) : Math.log(r / Math.cos(t)) / Math.log(u(t) / u(n)), o = r * Math.pow(u(n), i) / i;
+        return i ? (e.invert = function (n, t) {
+            var e = o - t, r = K(i) * Math.sqrt(n * n + e * e);
+            return [Math.atan2(n, e) / i, 2 * Math.atan(Math.pow(o / r, 1 / i)) - Ra]
+        }, e) : Sr
+    }
+
+    function wr(n, t) {
+        function e(n, t) {
+            var e = i - t;
+            return [e * Math.sin(u * n), i - e * Math.cos(u * n)]
+        }
+
+        var r = Math.cos(n), u = n === t ? Math.sin(n) : (r - Math.cos(t)) / (t - n), i = r / u + n;
+        return ga(u) < Ca ? ar : (e.invert = function (n, t) {
+            var e = i - t;
+            return [Math.atan2(n, e) / u, i - K(u) * Math.sqrt(n * n + e * e)]
+        }, e)
+    }
+
+    function Sr(n, t) {
+        return [n, Math.log(Math.tan(qa / 4 + t / 2))]
+    }
+
+    function kr(n) {
+        var t, e = ur(n), r = e.scale, u = e.translate, i = e.clipExtent;
+        return e.scale = function () {
+            var n = r.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.translate = function () {
+            var n = u.apply(e, arguments);
+            return n === e ? t ? e.clipExtent(null) : e : n
+        }, e.clipExtent = function (n) {
+            var o = i.apply(e, arguments);
+            if (o === e) {
+                if (t = null == n) {
+                    var a = qa * r(), c = u();
+                    i([[c[0] - a, c[1] - a], [c[0] + a, c[1] + a]])
+                }
+            } else t && (o = null);
+            return o
+        }, e.clipExtent(null)
+    }
+
+    function Er(n, t) {
+        return [Math.log(Math.tan(qa / 4 + t / 2)), -n]
+    }
+
+    function Ar(n) {
+        return n[0]
+    }
+
+    function Nr(n) {
+        return n[1]
+    }
+
+    function Cr(n) {
+        for (var t = n.length, e = [0, 1], r = 2, u = 2; t > u; u++) {
+            for (; r > 1 && Q(n[e[r - 2]], n[e[r - 1]], n[u]) <= 0;)--r;
+            e[r++] = u
+        }
+        return e.slice(0, r)
+    }
+
+    function zr(n, t) {
+        return n[0] - t[0] || n[1] - t[1]
+    }
+
+    function qr(n, t, e) {
+        return (e[0] - t[0]) * (n[1] - t[1]) < (e[1] - t[1]) * (n[0] - t[0])
+    }
+
+    function Lr(n, t, e, r) {
+        var u = n[0], i = e[0], o = t[0] - u, a = r[0] - i, c = n[1], l = e[1], s = t[1] - c, f = r[1] - l, h = (a * (c - l) - f * (u - i)) / (f * o - a * s);
+        return [u + h * o, c + h * s]
+    }
+
+    function Tr(n) {
+        var t = n[0], e = n[n.length - 1];
+        return !(t[0] - e[0] || t[1] - e[1])
+    }
+
+    function Rr() {
+        tu(this), this.edge = this.site = this.circle = null
+    }
+
+    function Dr(n) {
+        var t = el.pop() || new Rr;
+        return t.site = n, t
+    }
+
+    function Pr(n) {
+        Xr(n), Qc.remove(n), el.push(n), tu(n)
+    }
+
+    function Ur(n) {
+        var t = n.circle, e = t.x, r = t.cy, u = {x: e, y: r}, i = n.P, o = n.N, a = [n];
+        Pr(n);
+        for (var c = i; c.circle && ga(e - c.circle.x) < Ca && ga(r - c.circle.cy) < Ca;)i = c.P, a.unshift(c), Pr(c), c = i;
+        a.unshift(c), Xr(c);
+        for (var l = o; l.circle && ga(e - l.circle.x) < Ca && ga(r - l.circle.cy) < Ca;)o = l.N, a.push(l), Pr(l), l = o;
+        a.push(l), Xr(l);
+        var s, f = a.length;
+        for (s = 1; f > s; ++s)l = a[s], c = a[s - 1], Kr(l.edge, c.site, l.site, u);
+        c = a[0], l = a[f - 1], l.edge = Jr(c.site, l.site, null, u), Vr(c), Vr(l)
+    }
+
+    function jr(n) {
+        for (var t, e, r, u, i = n.x, o = n.y, a = Qc._; a;)if (r = Fr(a, o) - i, r > Ca)a = a.L; else {
+            if (u = i - Hr(a, o), !(u > Ca)) {
+                r > -Ca ? (t = a.P, e = a) : u > -Ca ? (t = a, e = a.N) : t = e = a;
+                break
+            }
+            if (!a.R) {
+                t = a;
+                break
+            }
+            a = a.R
+        }
+        var c = Dr(n);
+        if (Qc.insert(t, c), t || e) {
+            if (t === e)return Xr(t), e = Dr(t.site), Qc.insert(c, e), c.edge = e.edge = Jr(t.site, c.site), Vr(t), void Vr(e);
+            if (!e)return void(c.edge = Jr(t.site, c.site));
+            Xr(t), Xr(e);
+            var l = t.site, s = l.x, f = l.y, h = n.x - s, g = n.y - f, p = e.site, v = p.x - s, d = p.y - f, m = 2 * (h * d - g * v), y = h * h + g * g, M = v * v + d * d, x = {
+                x: (d * y - g * M) / m + s,
+                y: (h * M - v * y) / m + f
+            };
+            Kr(e.edge, l, p, x), c.edge = Jr(l, n, null, x), e.edge = Jr(n, p, null, x), Vr(t), Vr(e)
+        }
+    }
+
+    function Fr(n, t) {
+        var e = n.site, r = e.x, u = e.y, i = u - t;
+        if (!i)return r;
+        var o = n.P;
+        if (!o)return -1 / 0;
+        e = o.site;
+        var a = e.x, c = e.y, l = c - t;
+        if (!l)return a;
+        var s = a - r, f = 1 / i - 1 / l, h = s / l;
+        return f ? (-h + Math.sqrt(h * h - 2 * f * (s * s / (-2 * l) - c + l / 2 + u - i / 2))) / f + r : (r + a) / 2
+    }
+
+    function Hr(n, t) {
+        var e = n.N;
+        if (e)return Fr(e, t);
+        var r = n.site;
+        return r.y === t ? r.x : 1 / 0
+    }
+
+    function Or(n) {
+        this.site = n, this.edges = []
+    }
+
+    function Ir(n) {
+        for (var t, e, r, u, i, o, a, c, l, s, f = n[0][0], h = n[1][0], g = n[0][1], p = n[1][1], v = Kc, d = v.length; d--;)if (i = v[d], i && i.prepare())for (a = i.edges, c = a.length, o = 0; c > o;)s = a[o].end(), r = s.x, u = s.y, l = a[++o % c].start(), t = l.x, e = l.y, (ga(r - t) > Ca || ga(u - e) > Ca) && (a.splice(o, 0, new Qr(Gr(i.site, s, ga(r - f) < Ca && p - u > Ca ? {
+            x: f,
+            y: ga(t - f) < Ca ? e : p
+        } : ga(u - p) < Ca && h - r > Ca ? {x: ga(e - p) < Ca ? t : h, y: p} : ga(r - h) < Ca && u - g > Ca ? {
+            x: h,
+            y: ga(t - h) < Ca ? e : g
+        } : ga(u - g) < Ca && r - f > Ca ? {x: ga(e - g) < Ca ? t : f, y: g} : null), i.site, null)), ++c)
+    }
+
+    function Yr(n, t) {
+        return t.angle - n.angle
+    }
+
+    function Zr() {
+        tu(this), this.x = this.y = this.arc = this.site = this.cy = null
+    }
+
+    function Vr(n) {
+        var t = n.P, e = n.N;
+        if (t && e) {
+            var r = t.site, u = n.site, i = e.site;
+            if (r !== i) {
+                var o = u.x, a = u.y, c = r.x - o, l = r.y - a, s = i.x - o, f = i.y - a, h = 2 * (c * f - l * s);
+                if (!(h >= -za)) {
+                    var g = c * c + l * l, p = s * s + f * f, v = (f * g - l * p) / h, d = (c * p - s * g) / h, f = d + a, m = rl.pop() || new Zr;
+                    m.arc = n, m.site = u, m.x = v + o, m.y = f + Math.sqrt(v * v + d * d), m.cy = f, n.circle = m;
+                    for (var y = null, M = tl._; M;)if (m.y < M.y || m.y === M.y && m.x <= M.x) {
+                        if (!M.L) {
+                            y = M.P;
+                            break
+                        }
+                        M = M.L
+                    } else {
+                        if (!M.R) {
+                            y = M;
+                            break
+                        }
+                        M = M.R
+                    }
+                    tl.insert(y, m), y || (nl = m)
+                }
+            }
+        }
+    }
+
+    function Xr(n) {
+        var t = n.circle;
+        t && (t.P || (nl = t.N), tl.remove(t), rl.push(t), tu(t), n.circle = null)
+    }
+
+    function $r(n) {
+        for (var t, e = Gc, r = Oe(n[0][0], n[0][1], n[1][0], n[1][1]), u = e.length; u--;)t = e[u], (!Br(t, n) || !r(t) || ga(t.a.x - t.b.x) < Ca && ga(t.a.y - t.b.y) < Ca) && (t.a = t.b = null, e.splice(u, 1))
+    }
+
+    function Br(n, t) {
+        var e = n.b;
+        if (e)return !0;
+        var r, u, i = n.a, o = t[0][0], a = t[1][0], c = t[0][1], l = t[1][1], s = n.l, f = n.r, h = s.x, g = s.y, p = f.x, v = f.y, d = (h + p) / 2, m = (g + v) / 2;
+        if (v === g) {
+            if (o > d || d >= a)return;
+            if (h > p) {
+                if (i) {
+                    if (i.y >= l)return
+                } else i = {x: d, y: c};
+                e = {x: d, y: l}
+            } else {
+                if (i) {
+                    if (i.y < c)return
+                } else i = {x: d, y: l};
+                e = {x: d, y: c}
+            }
+        } else if (r = (h - p) / (v - g), u = m - r * d, -1 > r || r > 1)if (h > p) {
+            if (i) {
+                if (i.y >= l)return
+            } else i = {x: (c - u) / r, y: c};
+            e = {x: (l - u) / r, y: l}
+        } else {
+            if (i) {
+                if (i.y < c)return
+            } else i = {x: (l - u) / r, y: l};
+            e = {x: (c - u) / r, y: c}
+        } else if (v > g) {
+            if (i) {
+                if (i.x >= a)return
+            } else i = {x: o, y: r * o + u};
+            e = {x: a, y: r * a + u}
+        } else {
+            if (i) {
+                if (i.x < o)return
+            } else i = {x: a, y: r * a + u};
+            e = {x: o, y: r * o + u}
+        }
+        return n.a = i, n.b = e, !0
+    }
+
+    function Wr(n, t) {
+        this.l = n, this.r = t, this.a = this.b = null
+    }
+
+    function Jr(n, t, e, r) {
+        var u = new Wr(n, t);
+        return Gc.push(u), e && Kr(u, n, t, e), r && Kr(u, t, n, r), Kc[n.i].edges.push(new Qr(u, n, t)), Kc[t.i].edges.push(new Qr(u, t, n)), u
+    }
+
+    function Gr(n, t, e) {
+        var r = new Wr(n, null);
+        return r.a = t, r.b = e, Gc.push(r), r
+    }
+
+    function Kr(n, t, e, r) {
+        n.a || n.b ? n.l === e ? n.b = r : n.a = r : (n.a = r, n.l = t, n.r = e)
+    }
+
+    function Qr(n, t, e) {
+        var r = n.a, u = n.b;
+        this.edge = n, this.site = t, this.angle = e ? Math.atan2(e.y - t.y, e.x - t.x) : n.l === t ? Math.atan2(u.x - r.x, r.y - u.y) : Math.atan2(r.x - u.x, u.y - r.y)
+    }
+
+    function nu() {
+        this._ = null
+    }
+
+    function tu(n) {
+        n.U = n.C = n.L = n.R = n.P = n.N = null
+    }
+
+    function eu(n, t) {
+        var e = t, r = t.R, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.R = r.L, e.R && (e.R.U = e), r.L = e
+    }
+
+    function ru(n, t) {
+        var e = t, r = t.L, u = e.U;
+        u ? u.L === e ? u.L = r : u.R = r : n._ = r, r.U = u, e.U = r, e.L = r.R, e.L && (e.L.U = e), r.R = e
+    }
+
+    function uu(n) {
+        for (; n.L;)n = n.L;
+        return n
+    }
+
+    function iu(n, t) {
+        var e, r, u, i = n.sort(ou).pop();
+        for (Gc = [], Kc = new Array(n.length), Qc = new nu, tl = new nu; ;)if (u = nl, i && (!u || i.y < u.y || i.y === u.y && i.x < u.x))(i.x !== e || i.y !== r) && (Kc[i.i] = new Or(i), jr(i), e = i.x, r = i.y), i = n.pop(); else {
+            if (!u)break;
+            Ur(u.arc)
+        }
+        t && ($r(t), Ir(t));
+        var o = {cells: Kc, edges: Gc};
+        return Qc = tl = Gc = Kc = null, o
+    }
+
+    function ou(n, t) {
+        return t.y - n.y || t.x - n.x
+    }
+
+    function au(n, t, e) {
+        return (n.x - e.x) * (t.y - n.y) - (n.x - t.x) * (e.y - n.y)
+    }
+
+    function cu(n) {
+        return n.x
+    }
+
+    function lu(n) {
+        return n.y
+    }
+
+    function su() {
+        return {leaf: !0, nodes: [], point: null, x: null, y: null}
+    }
+
+    function fu(n, t, e, r, u, i) {
+        if (!n(t, e, r, u, i)) {
+            var o = .5 * (e + u), a = .5 * (r + i), c = t.nodes;
+            c[0] && fu(n, c[0], e, r, o, a), c[1] && fu(n, c[1], o, r, u, a), c[2] && fu(n, c[2], e, a, o, i), c[3] && fu(n, c[3], o, a, u, i)
+        }
+    }
+
+    function hu(n, t, e, r, u, i, o) {
+        var a, c = 1 / 0;
+        return function l(n, s, f, h, g) {
+            if (!(s > i || f > o || r > h || u > g)) {
+                if (p = n.point) {
+                    var p, v = t - n.x, d = e - n.y, m = v * v + d * d;
+                    if (c > m) {
+                        var y = Math.sqrt(c = m);
+                        r = t - y, u = e - y, i = t + y, o = e + y, a = p
+                    }
+                }
+                for (var M = n.nodes, x = .5 * (s + h), b = .5 * (f + g), _ = t >= x, w = e >= b, S = w << 1 | _, k = S + 4; k > S; ++S)if (n = M[3 & S])switch (3 & S) {
+                    case 0:
+                        l(n, s, f, x, b);
+                        break;
+                    case 1:
+                        l(n, x, f, h, b);
+                        break;
+                    case 2:
+                        l(n, s, b, x, g);
+                        break;
+                    case 3:
+                        l(n, x, b, h, g)
+                }
+            }
+        }(n, r, u, i, o), a
+    }
+
+    function gu(n, t) {
+        n = ta.rgb(n), t = ta.rgb(t);
+        var e = n.r, r = n.g, u = n.b, i = t.r - e, o = t.g - r, a = t.b - u;
+        return function (n) {
+            return "#" + xt(Math.round(e + i * n)) + xt(Math.round(r + o * n)) + xt(Math.round(u + a * n))
+        }
+    }
+
+    function pu(n, t) {
+        var e, r = {}, u = {};
+        for (e in n)e in t ? r[e] = mu(n[e], t[e]) : u[e] = n[e];
+        for (e in t)e in n || (u[e] = t[e]);
+        return function (n) {
+            for (e in r)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function vu(n, t) {
+        return n = +n, t = +t, function (e) {
+            return n * (1 - e) + t * e
+        }
+    }
+
+    function du(n, t) {
+        var e, r, u, i = il.lastIndex = ol.lastIndex = 0, o = -1, a = [], c = [];
+        for (n += "", t += ""; (e = il.exec(n)) && (r = ol.exec(t));)(u = r.index) > i && (u = t.slice(i, u), a[o] ? a[o] += u : a[++o] = u), (e = e[0]) === (r = r[0]) ? a[o] ? a[o] += r : a[++o] = r : (a[++o] = null, c.push({
+            i: o,
+            x: vu(e, r)
+        })), i = ol.lastIndex;
+        return i < t.length && (u = t.slice(i), a[o] ? a[o] += u : a[++o] = u), a.length < 2 ? c[0] ? (t = c[0].x, function (n) {
+            return t(n) + ""
+        }) : function () {
+            return t
+        } : (t = c.length, function (n) {
+            for (var e, r = 0; t > r; ++r)a[(e = c[r]).i] = e.x(n);
+            return a.join("")
+        })
+    }
+
+    function mu(n, t) {
+        for (var e, r = ta.interpolators.length; --r >= 0 && !(e = ta.interpolators[r](n, t)););
+        return e
+    }
+
+    function yu(n, t) {
+        var e, r = [], u = [], i = n.length, o = t.length, a = Math.min(n.length, t.length);
+        for (e = 0; a > e; ++e)r.push(mu(n[e], t[e]));
+        for (; i > e; ++e)u[e] = n[e];
+        for (; o > e; ++e)u[e] = t[e];
+        return function (n) {
+            for (e = 0; a > e; ++e)u[e] = r[e](n);
+            return u
+        }
+    }
+
+    function Mu(n) {
+        return function (t) {
+            return 0 >= t ? 0 : t >= 1 ? 1 : n(t)
+        }
+    }
+
+    function xu(n) {
+        return function (t) {
+            return 1 - n(1 - t)
+        }
+    }
+
+    function bu(n) {
+        return function (t) {
+            return .5 * (.5 > t ? n(2 * t) : 2 - n(2 - 2 * t))
+        }
+    }
+
+    function _u(n) {
+        return n * n
+    }
+
+    function wu(n) {
+        return n * n * n
+    }
+
+    function Su(n) {
+        if (0 >= n)return 0;
+        if (n >= 1)return 1;
+        var t = n * n, e = t * n;
+        return 4 * (.5 > n ? e : 3 * (n - t) + e - .75)
+    }
+
+    function ku(n) {
+        return function (t) {
+            return Math.pow(t, n)
+        }
+    }
+
+    function Eu(n) {
+        return 1 - Math.cos(n * Ra)
+    }
+
+    function Au(n) {
+        return Math.pow(2, 10 * (n - 1))
+    }
+
+    function Nu(n) {
+        return 1 - Math.sqrt(1 - n * n)
+    }
+
+    function Cu(n, t) {
+        var e;
+        return arguments.length < 2 && (t = .45), arguments.length ? e = t / La * Math.asin(1 / n) : (n = 1, e = t / 4), function (r) {
+            return 1 + n * Math.pow(2, -10 * r) * Math.sin((r - e) * La / t)
+        }
+    }
+
+    function zu(n) {
+        return n || (n = 1.70158), function (t) {
+            return t * t * ((n + 1) * t - n)
+        }
+    }
+
+    function qu(n) {
+        return 1 / 2.75 > n ? 7.5625 * n * n : 2 / 2.75 > n ? 7.5625 * (n -= 1.5 / 2.75) * n + .75 : 2.5 / 2.75 > n ? 7.5625 * (n -= 2.25 / 2.75) * n + .9375 : 7.5625 * (n -= 2.625 / 2.75) * n + .984375
+    }
+
+    function Lu(n, t) {
+        n = ta.hcl(n), t = ta.hcl(t);
+        var e = n.h, r = n.c, u = n.l, i = t.h - e, o = t.c - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.c : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return st(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Tu(n, t) {
+        n = ta.hsl(n), t = ta.hsl(t);
+        var e = n.h, r = n.s, u = n.l, i = t.h - e, o = t.s - r, a = t.l - u;
+        return isNaN(o) && (o = 0, r = isNaN(r) ? t.s : r), isNaN(i) ? (i = 0, e = isNaN(e) ? t.h : e) : i > 180 ? i -= 360 : -180 > i && (i += 360), function (n) {
+            return ct(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Ru(n, t) {
+        n = ta.lab(n), t = ta.lab(t);
+        var e = n.l, r = n.a, u = n.b, i = t.l - e, o = t.a - r, a = t.b - u;
+        return function (n) {
+            return ht(e + i * n, r + o * n, u + a * n) + ""
+        }
+    }
+
+    function Du(n, t) {
+        return t -= n, function (e) {
+            return Math.round(n + t * e)
+        }
+    }
+
+    function Pu(n) {
+        var t = [n.a, n.b], e = [n.c, n.d], r = ju(t), u = Uu(t, e), i = ju(Fu(e, t, -u)) || 0;
+        t[0] * e[1] < e[0] * t[1] && (t[0] *= -1, t[1] *= -1, r *= -1, u *= -1), this.rotate = (r ? Math.atan2(t[1], t[0]) : Math.atan2(-e[0], e[1])) * Pa, this.translate = [n.e, n.f], this.scale = [r, i], this.skew = i ? Math.atan2(u, i) * Pa : 0
+    }
+
+    function Uu(n, t) {
+        return n[0] * t[0] + n[1] * t[1]
+    }
+
+    function ju(n) {
+        var t = Math.sqrt(Uu(n, n));
+        return t && (n[0] /= t, n[1] /= t), t
+    }
+
+    function Fu(n, t, e) {
+        return n[0] += e * t[0], n[1] += e * t[1], n
+    }
+
+    function Hu(n, t) {
+        var e, r = [], u = [], i = ta.transform(n), o = ta.transform(t), a = i.translate, c = o.translate, l = i.rotate, s = o.rotate, f = i.skew, h = o.skew, g = i.scale, p = o.scale;
+        return a[0] != c[0] || a[1] != c[1] ? (r.push("translate(", null, ",", null, ")"), u.push({
+            i: 1,
+            x: vu(a[0], c[0])
+        }, {
+            i: 3,
+            x: vu(a[1], c[1])
+        })) : r.push(c[0] || c[1] ? "translate(" + c + ")" : ""), l != s ? (l - s > 180 ? s += 360 : s - l > 180 && (l += 360), u.push({
+            i: r.push(r.pop() + "rotate(", null, ")") - 2,
+            x: vu(l, s)
+        })) : s && r.push(r.pop() + "rotate(" + s + ")"), f != h ? u.push({
+            i: r.push(r.pop() + "skewX(", null, ")") - 2,
+            x: vu(f, h)
+        }) : h && r.push(r.pop() + "skewX(" + h + ")"), g[0] != p[0] || g[1] != p[1] ? (e = r.push(r.pop() + "scale(", null, ",", null, ")"), u.push({
+            i: e - 4,
+            x: vu(g[0], p[0])
+        }, {
+            i: e - 2,
+            x: vu(g[1], p[1])
+        })) : (1 != p[0] || 1 != p[1]) && r.push(r.pop() + "scale(" + p + ")"), e = u.length, function (n) {
+            for (var t, i = -1; ++i < e;)r[(t = u[i]).i] = t.x(n);
+            return r.join("")
+        }
+    }
+
+    function Ou(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return (e - n) / t
+        }
+    }
+
+    function Iu(n, t) {
+        return t = (t -= n = +n) || 1 / t, function (e) {
+            return Math.max(0, Math.min(1, (e - n) / t))
+        }
+    }
+
+    function Yu(n) {
+        for (var t = n.source, e = n.target, r = Vu(t, e), u = [t]; t !== r;)t = t.parent, u.push(t);
+        for (var i = u.length; e !== r;)u.splice(i, 0, e), e = e.parent;
+        return u
+    }
+
+    function Zu(n) {
+        for (var t = [], e = n.parent; null != e;)t.push(n), n = e, e = e.parent;
+        return t.push(n), t
+    }
+
+    function Vu(n, t) {
+        if (n === t)return n;
+        for (var e = Zu(n), r = Zu(t), u = e.pop(), i = r.pop(), o = null; u === i;)o = u, u = e.pop(), i = r.pop();
+        return o
+    }
+
+    function Xu(n) {
+        n.fixed |= 2
+    }
+
+    function $u(n) {
+        n.fixed &= -7
+    }
+
+    function Bu(n) {
+        n.fixed |= 4, n.px = n.x, n.py = n.y
+    }
+
+    function Wu(n) {
+        n.fixed &= -5
+    }
+
+    function Ju(n, t, e) {
+        var r = 0, u = 0;
+        if (n.charge = 0, !n.leaf)for (var i, o = n.nodes, a = o.length, c = -1; ++c < a;)i = o[c], null != i && (Ju(i, t, e), n.charge += i.charge, r += i.charge * i.cx, u += i.charge * i.cy);
+        if (n.point) {
+            n.leaf || (n.point.x += Math.random() - .5, n.point.y += Math.random() - .5);
+            var l = t * e[n.point.index];
+            n.charge += n.pointCharge = l, r += l * n.point.x, u += l * n.point.y
+        }
+        n.cx = r / n.charge, n.cy = u / n.charge
+    }
+
+    function Gu(n, t) {
+        return ta.rebind(n, t, "sort", "children", "value"), n.nodes = n, n.links = r

<TRUNCATED>

[25/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/member-details-filter.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/member-details-filter.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/member-details-filter.js
new file mode 100644
index 0000000..bbc4312
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/Member_Details_Filter/js/member-details-filter.js
@@ -0,0 +1,138 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+var applicationId;
+var clusterId;
+
+$(document).ready(function () {
+    loadApplication();
+
+    setTimeout(function () {
+        if (applicationId != null) {
+            loadCluster(applicationId);
+            $('#' + window.frameElement.id).ready(function () {
+                $(this).contents().find('body').contents().find('#application-filter').val(applicationId);
+                publish();
+            });
+        }
+    }, 2000);
+
+    setTimeout(function () {
+        if (clusterId != null) {
+            $('#' + window.frameElement.id).ready(function () {
+                $(this).contents().find('body').contents().find('#cluster-filter').val(clusterId);
+                publish();
+            });
+        }
+    }, 3000);
+
+});
+
+gadgets.HubSettings.onConnect = function () {
+    gadgets.Hub.subscribe("request-params", function (topic, data) {
+        applicationId = data.applicationId;
+        clusterId = data.clusterId;
+        console.log("Application Id: " + applicationId);
+        console.log("Cluster Id: " + clusterId);
+    });
+};
+
+$('body').on('change', '#application-filter', function () {
+    var e = document.getElementById("application-filter");
+    applicationId = e.options[e.selectedIndex].value;
+    loadCluster(applicationId);
+    publish();
+});
+
+$('body').on('change', '#cluster-filter', function () {
+    var e = document.getElementById("cluster-filter");
+    clusterId = e.options[e.selectedIndex].value;
+    publish();
+});
+
+function loadApplication() {
+    console.log("Getting Application Ids");
+    $.ajax({
+        url: '/portal/apis/applications',
+        dataType: 'json',
+        success: function (result) {
+            var applicationIds = [];
+            var records = JSON.parse(JSON.stringify(result));
+            records.forEach(function (record) {
+                applicationIds.push(record.ApplicationId);
+            });
+
+            var elem = document.getElementById('application-filter');
+            for (i = 0; i < applicationIds.length; i = i + 1) {
+                var option = document.createElement("option");
+                option.text = applicationIds[i];
+                option.value = applicationIds[i];
+                elem.appendChild(option);
+            }
+
+            document.getElementById('application').appendChild(elem);
+        }
+    });
+
+}
+
+function loadCluster(application) {
+    $.ajax({
+        url: '/portal/apis/clusters?applicationId=' + application,
+        dataType: 'json',
+        success: function (result) {
+            var elem = document.getElementById('cluster-filter');
+            var clusterAlias = [];
+            var records = JSON.parse(JSON.stringify(result));
+            records.forEach(function (record) {
+                clusterAlias.push(record.ClusterAlias);
+            });
+
+            if (elem != null) {
+                elem.parentNode.removeChild(elem);
+            }
+
+            var clusterList = document.createElement('select');
+            clusterList.id = "cluster-filter";
+
+            var optionList = "";
+
+            optionList += "<option value= 'All Clusters'>All Clusters</option>";
+            for (i = 0; i < clusterAlias.length; i = i + 1) {
+                optionList += "<option value='" + clusterAlias[i] + "'>" + clusterAlias[i] + "</option>";
+            }
+
+            clusterList.innerHTML = optionList;
+            document.getElementById('cluster').appendChild(clusterList);
+        }
+    });
+    if (clusterId == null) {
+        var e = document.getElementById("cluster-filter");
+        clusterId = e.options[e.selectedIndex].value
+    }
+}
+
+function publish() {
+    var data = {applicationId: applicationId, clusterId: clusterId};
+    gadgets.Hub.publish("member-details-filter", data);
+    console.log("Publishing filter values: " + JSON.stringify(data));
+}
+
+

http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/artifact.xml
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/artifact.xml b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/artifact.xml
new file mode 100644
index 0000000..15df037
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberDetailsFilter/artifact.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<artifact name="GadgetMemberDetailsFilter" version="1.0.0" type="dashboards/gadget" serverRole="DataAnalyticsServer">
+    <file>Member_Details_Filter</file>
+</artifact>
\ No newline at end of file


[06/41] stratos git commit: Removing artifact version from stratos-metering-service capps

Posted by im...@apache.org.
http://git-wip-us.apache.org/repos/asf/stratos/blob/9d7226a7/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/jquery.js
----------------------------------------------------------------------
diff --git a/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/jquery.js b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/jquery.js
new file mode 100644
index 0000000..d332fe2
--- /dev/null
+++ b/extensions/das/modules/artifacts/metering-dashboard/capps/stratos-metering-service/GadgetMemberStatus/Member_Status/js/jquery.js
@@ -0,0 +1,9496 @@
+/*!
+ * jQuery JavaScript Library v1.8.3
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
+ */
+(function (window, undefined) {
+    var
+    // A central reference to the root jQuery(document)
+        rootjQuery,
+
+    // The deferred used on DOM ready
+        readyList,
+
+    // Use the correct document accordingly with window argument (sandbox)
+        document = window.document,
+        location = window.location,
+        navigator = window.navigator,
+
+    // Map over jQuery in case of overwrite
+        _jQuery = window.jQuery,
+
+    // Map over the $ in case of overwrite
+        _$ = window.$,
+
+    // Save a reference to some core methods
+        core_push = Array.prototype.push,
+        core_slice = Array.prototype.slice,
+        core_indexOf = Array.prototype.indexOf,
+        core_toString = Object.prototype.toString,
+        core_hasOwn = Object.prototype.hasOwnProperty,
+        core_trim = String.prototype.trim,
+
+    // Define a local copy of jQuery
+        jQuery = function (selector, context) {
+            // The jQuery object is actually just the init constructor 'enhanced'
+            return new jQuery.fn.init(selector, context, rootjQuery);
+        },
+
+    // Used for matching numbers
+        core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
+
+    // Used for detecting and trimming whitespace
+        core_rnotwhite = /\S/,
+        core_rspace = /\s+/,
+
+    // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+        rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+    // A simple way to check for HTML strings
+    // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+        rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+    // Match a standalone tag
+        rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+    // JSON RegExp
+        rvalidchars = /^[\],:{}\s]*$/,
+        rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+        rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+        rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
+
+    // Matches dashed string for camelizing
+        rmsPrefix = /^-ms-/,
+        rdashAlpha = /-([\da-z])/gi,
+
+    // Used by jQuery.camelCase as callback to replace()
+        fcamelCase = function (all, letter) {
+            return ( letter + "" ).toUpperCase();
+        },
+
+    // The ready event handler and self cleanup method
+        DOMContentLoaded = function () {
+            if (document.addEventListener) {
+                document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false);
+                jQuery.ready();
+            } else if (document.readyState === "complete") {
+                // we're here because readyState === "complete" in oldIE
+                // which is good enough for us to call the dom ready!
+                document.detachEvent("onreadystatechange", DOMContentLoaded);
+                jQuery.ready();
+            }
+        },
+
+    // [[Class]] -> type pairs
+        class2type = {};
+
+    jQuery.fn = jQuery.prototype = {
+        constructor: jQuery,
+        init: function (selector, context, rootjQuery) {
+            var match, elem, ret, doc;
+
+            // Handle $(""), $(null), $(undefined), $(false)
+            if (!selector) {
+                return this;
+            }
+
+            // Handle $(DOMElement)
+            if (selector.nodeType) {
+                this.context = this[0] = selector;
+                this.length = 1;
+                return this;
+            }
+
+            // Handle HTML strings
+            if (typeof selector === "string") {
+                if (selector.charAt(0) === "<" && selector.charAt(selector.length - 1) === ">" && selector.length >= 3) {
+                    // Assume that strings that start and end with <> are HTML and skip the regex check
+                    match = [null, selector, null];
+
+                } else {
+                    match = rquickExpr.exec(selector);
+                }
+
+                // Match html or make sure no context is specified for #id
+                if (match && (match[1] || !context)) {
+
+                    // HANDLE: $(html) -> $(array)
+                    if (match[1]) {
+                        context = context instanceof jQuery ? context[0] : context;
+                        doc = ( context && context.nodeType ? context.ownerDocument || context : document );
+
+                        // scripts is true for back-compat
+                        selector = jQuery.parseHTML(match[1], doc, true);
+                        if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) {
+                            this.attr.call(selector, context, true);
+                        }
+
+                        return jQuery.merge(this, selector);
+
+                        // HANDLE: $(#id)
+                    } else {
+                        elem = document.getElementById(match[2]);
+
+                        // Check parentNode to catch when Blackberry 4.6 returns
+                        // nodes that are no longer in the document #6963
+                        if (elem && elem.parentNode) {
+                            // Handle the case where IE and Opera return items
+                            // by name instead of ID
+                            if (elem.id !== match[2]) {
+                                return rootjQuery.find(selector);
+                            }
+
+                            // Otherwise, we inject the element directly into the jQuery object
+                            this.length = 1;
+                            this[0] = elem;
+                        }
+
+                        this.context = document;
+                        this.selector = selector;
+                        return this;
+                    }
+
+                    // HANDLE: $(expr, $(...))
+                } else if (!context || context.jquery) {
+                    return ( context || rootjQuery ).find(selector);
+
+                    // HANDLE: $(expr, context)
+                    // (which is just equivalent to: $(context).find(expr)
+                } else {
+                    return this.constructor(context).find(selector);
+                }
+
+                // HANDLE: $(function)
+                // Shortcut for document ready
+            } else if (jQuery.isFunction(selector)) {
+                return rootjQuery.ready(selector);
+            }
+
+            if (selector.selector !== undefined) {
+                this.selector = selector.selector;
+                this.context = selector.context;
+            }
+
+            return jQuery.makeArray(selector, this);
+        },
+
+        // Start with an empty selector
+        selector: "",
+
+        // The current version of jQuery being used
+        jquery: "1.8.3",
+
+        // The default length of a jQuery object is 0
+        length: 0,
+
+        // The number of elements contained in the matched element set
+        size: function () {
+            return this.length;
+        },
+
+        toArray: function () {
+            return core_slice.call(this);
+        },
+
+        // Get the Nth element in the matched element set OR
+        // Get the whole matched element set as a clean array
+        get: function (num) {
+            return num == null ?
+
+                // Return a 'clean' array
+                this.toArray() :
+
+                // Return just the object
+                ( num < 0 ? this[this.length + num] : this[num] );
+        },
+
+        // Take an array of elements and push it onto the stack
+        // (returning the new matched element set)
+        pushStack: function (elems, name, selector) {
+
+            // Build a new jQuery matched element set
+            var ret = jQuery.merge(this.constructor(), elems);
+
+            // Add the old object onto the stack (as a reference)
+            ret.prevObject = this;
+
+            ret.context = this.context;
+
+            if (name === "find") {
+                ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+            } else if (name) {
+                ret.selector = this.selector + "." + name + "(" + selector + ")";
+            }
+
+            // Return the newly-formed element set
+            return ret;
+        },
+
+        // Execute a callback for every element in the matched set.
+        // (You can seed the arguments with an array of args, but this is
+        // only used internally.)
+        each: function (callback, args) {
+            return jQuery.each(this, callback, args);
+        },
+
+        ready: function (fn) {
+            // Add the callback
+            jQuery.ready.promise().done(fn);
+
+            return this;
+        },
+
+        eq: function (i) {
+            i = +i;
+            return i === -1 ?
+                this.slice(i) :
+                this.slice(i, i + 1);
+        },
+
+        first: function () {
+            return this.eq(0);
+        },
+
+        last: function () {
+            return this.eq(-1);
+        },
+
+        slice: function () {
+            return this.pushStack(core_slice.apply(this, arguments),
+                "slice", core_slice.call(arguments).join(","));
+        },
+
+        map: function (callback) {
+            return this.pushStack(jQuery.map(this, function (elem, i) {
+                return callback.call(elem, i, elem);
+            }));
+        },
+
+        end: function () {
+            return this.prevObject || this.constructor(null);
+        },
+
+        // For internal use only.
+        // Behaves like an Array's method, not like a jQuery method.
+        push: core_push,
+        sort: [].sort,
+        splice: [].splice
+    };
+
+// Give the init function the jQuery prototype for later instantiation
+    jQuery.fn.init.prototype = jQuery.fn;
+
+    jQuery.extend = jQuery.fn.extend = function () {
+        var options, name, src, copy, copyIsArray, clone,
+            target = arguments[0] || {},
+            i = 1,
+            length = arguments.length,
+            deep = false;
+
+        // Handle a deep copy situation
+        if (typeof target === "boolean") {
+            deep = target;
+            target = arguments[1] || {};
+            // skip the boolean and the target
+            i = 2;
+        }
+
+        // Handle case when target is a string or something (possible in deep copy)
+        if (typeof target !== "object" && !jQuery.isFunction(target)) {
+            target = {};
+        }
+
+        // extend jQuery itself if only one argument is passed
+        if (length === i) {
+            target = this;
+            --i;
+        }
+
+        for (; i < length; i++) {
+            // Only deal with non-null/undefined values
+            if ((options = arguments[i]) != null) {
+                // Extend the base object
+                for (name in options) {
+                    src = target[name];
+                    copy = options[name];
+
+                    // Prevent never-ending loop
+                    if (target === copy) {
+                        continue;
+                    }
+
+                    // Recurse if we're merging plain objects or arrays
+                    if (deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) )) {
+                        if (copyIsArray) {
+                            copyIsArray = false;
+                            clone = src && jQuery.isArray(src) ? src : [];
+
+                        } else {
+                            clone = src && jQuery.isPlainObject(src) ? src : {};
+                        }
+
+                        // Never move original objects, clone them
+                        target[name] = jQuery.extend(deep, clone, copy);
+
+                        // Don't bring in undefined values
+                    } else if (copy !== undefined) {
+                        target[name] = copy;
+                    }
+                }
+            }
+        }
+
+        // Return the modified object
+        return target;
+    };
+
+    jQuery.extend({
+        noConflict: function (deep) {
+            if (window.$ === jQuery) {
+                window.$ = _$;
+            }
+
+            if (deep && window.jQuery === jQuery) {
+                window.jQuery = _jQuery;
+            }
+
+            return jQuery;
+        },
+
+        // Is the DOM ready to be used? Set to true once it occurs.
+        isReady: false,
+
+        // A counter to track how many items to wait for before
+        // the ready event fires. See #6781
+        readyWait: 1,
+
+        // Hold (or release) the ready event
+        holdReady: function (hold) {
+            if (hold) {
+                jQuery.readyWait++;
+            } else {
+                jQuery.ready(true);
+            }
+        },
+
+        // Handle when the DOM is ready
+        ready: function (wait) {
+
+            // Abort if there are pending holds or we're already ready
+            if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
+                return;
+            }
+
+            // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+            if (!document.body) {
+                return setTimeout(jQuery.ready, 1);
+            }
+
+            // Remember that the DOM is ready
+            jQuery.isReady = true;
+
+            // If a normal DOM Ready event fired, decrement, and wait if need be
+            if (wait !== true && --jQuery.readyWait > 0) {
+                return;
+            }
+
+            // If there are functions bound, to execute
+            readyList.resolveWith(document, [jQuery]);
+
+            // Trigger any bound ready events
+            if (jQuery.fn.trigger) {
+                jQuery(document).trigger("ready").off("ready");
+            }
+        },
+
+        // See test/unit/core.js for details concerning isFunction.
+        // Since version 1.3, DOM methods and functions like alert
+        // aren't supported. They return false on IE (#2968).
+        isFunction: function (obj) {
+            return jQuery.type(obj) === "function";
+        },
+
+        isArray: Array.isArray || function (obj) {
+            return jQuery.type(obj) === "array";
+        },
+
+        isWindow: function (obj) {
+            return obj != null && obj == obj.window;
+        },
+
+        isNumeric: function (obj) {
+            return !isNaN(parseFloat(obj)) && isFinite(obj);
+        },
+
+        type: function (obj) {
+            return obj == null ?
+                String(obj) :
+            class2type[core_toString.call(obj)] || "object";
+        },
+
+        isPlainObject: function (obj) {
+            // Must be an Object.
+            // Because of IE, we also have to check the presence of the constructor property.
+            // Make sure that DOM nodes and window objects don't pass through, as well
+            if (!obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow(obj)) {
+                return false;
+            }
+
+            try {
+                // Not own constructor property must be Object
+                if (obj.constructor && !core_hasOwn.call(obj, "constructor") && !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
+                    return false;
+                }
+            } catch (e) {
+                // IE8,9 Will throw exceptions on certain host objects #9897
+                return false;
+            }
+
+            // Own properties are enumerated firstly, so to speed up,
+            // if last one is own, then all properties are own.
+
+            var key;
+            for (key in obj) {
+            }
+
+            return key === undefined || core_hasOwn.call(obj, key);
+        },
+
+        isEmptyObject: function (obj) {
+            var name;
+            for (name in obj) {
+                return false;
+            }
+            return true;
+        },
+
+        error: function (msg) {
+            throw new Error(msg);
+        },
+
+        // data: string of html
+        // context (optional): If specified, the fragment will be created in this context, defaults to document
+        // scripts (optional): If true, will include scripts passed in the html string
+        parseHTML: function (data, context, scripts) {
+            var parsed;
+            if (!data || typeof data !== "string") {
+                return null;
+            }
+            if (typeof context === "boolean") {
+                scripts = context;
+                context = 0;
+            }
+            context = context || document;
+
+            // Single tag
+            if ((parsed = rsingleTag.exec(data))) {
+                return [context.createElement(parsed[1])];
+            }
+
+            parsed = jQuery.buildFragment([data], context, scripts ? null : []);
+            return jQuery.merge([],
+                (parsed.cacheable ? jQuery.clone(parsed.fragment) : parsed.fragment).childNodes);
+        },
+
+        parseJSON: function (data) {
+            if (!data || typeof data !== "string") {
+                return null;
+            }
+
+            // Make sure leading/trailing whitespace is removed (IE can't handle it)
+            data = jQuery.trim(data);
+
+            // Attempt to parse using the native JSON parser first
+            if (window.JSON && window.JSON.parse) {
+                return window.JSON.parse(data);
+            }
+
+            // Make sure the incoming data is actual JSON
+            // Logic borrowed from http://json.org/json2.js
+            if (rvalidchars.test(data.replace(rvalidescape, "@")
+                    .replace(rvalidtokens, "]")
+                    .replace(rvalidbraces, ""))) {
+
+                return ( new Function("return " + data) )();
+
+            }
+            jQuery.error("Invalid JSON: " + data);
+        },
+
+        // Cross-browser xml parsing
+        parseXML: function (data) {
+            var xml, tmp;
+            if (!data || typeof data !== "string") {
+                return null;
+            }
+            try {
+                if (window.DOMParser) { // Standard
+                    tmp = new DOMParser();
+                    xml = tmp.parseFromString(data, "text/xml");
+                } else { // IE
+                    xml = new ActiveXObject("Microsoft.XMLDOM");
+                    xml.async = "false";
+                    xml.loadXML(data);
+                }
+            } catch (e) {
+                xml = undefined;
+            }
+            if (!xml || !xml.documentElement || xml.getElementsByTagName("parsererror").length) {
+                jQuery.error("Invalid XML: " + data);
+            }
+            return xml;
+        },
+
+        noop: function () {
+        },
+
+        // Evaluates a script in a global context
+        // Workarounds based on findings by Jim Driscoll
+        // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+        globalEval: function (data) {
+            if (data && core_rnotwhite.test(data)) {
+                // We use execScript on Internet Explorer
+                // We use an anonymous function so that context is window
+                // rather than jQuery in Firefox
+                ( window.execScript || function (data) {
+                    window["eval"].call(window, data);
+                } )(data);
+            }
+        },
+
+        // Convert dashed to camelCase; used by the css and data modules
+        // Microsoft forgot to hump their vendor prefix (#9572)
+        camelCase: function (string) {
+            return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
+        },
+
+        nodeName: function (elem, name) {
+            return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+        },
+
+        // args is for internal usage only
+        each: function (obj, callback, args) {
+            var name,
+                i = 0,
+                length = obj.length,
+                isObj = length === undefined || jQuery.isFunction(obj);
+
+            if (args) {
+                if (isObj) {
+                    for (name in obj) {
+                        if (callback.apply(obj[name], args) === false) {
+                            break;
+                        }
+                    }
+                } else {
+                    for (; i < length;) {
+                        if (callback.apply(obj[i++], args) === false) {
+                            break;
+                        }
+                    }
+                }
+
+                // A special, fast, case for the most common use of each
+            } else {
+                if (isObj) {
+                    for (name in obj) {
+                        if (callback.call(obj[name], name, obj[name]) === false) {
+                            break;
+                        }
+                    }
+                } else {
+                    for (; i < length;) {
+                        if (callback.call(obj[i], i, obj[i++]) === false) {
+                            break;
+                        }
+                    }
+                }
+            }
+
+            return obj;
+        },
+
+        // Use native String.trim function wherever possible
+        trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+            function (text) {
+                return text == null ?
+                    "" :
+                    core_trim.call(text);
+            } :
+
+            // Otherwise use our own trimming functionality
+            function (text) {
+                return text == null ?
+                    "" :
+                    ( text + "" ).replace(rtrim, "");
+            },
+
+        // results is for internal usage only
+        makeArray: function (arr, results) {
+            var type,
+                ret = results || [];
+
+            if (arr != null) {
+                // The window, strings (and functions) also have 'length'
+                // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+                type = jQuery.type(arr);
+
+                if (arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow(arr)) {
+                    core_push.call(ret, arr);
+                } else {
+                    jQuery.merge(ret, arr);
+                }
+            }
+
+            return ret;
+        },
+
+        inArray: function (elem, arr, i) {
+            var len;
+
+            if (arr) {
+                if (core_indexOf) {
+                    return core_indexOf.call(arr, elem, i);
+                }
+
+                len = arr.length;
+                i = i ? i < 0 ? Math.max(0, len + i) : i : 0;
+
+                for (; i < len; i++) {
+                    // Skip accessing in sparse arrays
+                    if (i in arr && arr[i] === elem) {
+                        return i;
+                    }
+                }
+            }
+
+            return -1;
+        },
+
+        merge: function (first, second) {
+            var l = second.length,
+                i = first.length,
+                j = 0;
+
+            if (typeof l === "number") {
+                for (; j < l; j++) {
+                    first[i++] = second[j];
+                }
+
+            } else {
+                while (second[j] !== undefined) {
+                    first[i++] = second[j++];
+                }
+            }
+
+            first.length = i;
+
+            return first;
+        },
+
+        grep: function (elems, callback, inv) {
+            var retVal,
+                ret = [],
+                i = 0,
+                length = elems.length;
+            inv = !!inv;
+
+            // Go through the array, only saving the items
+            // that pass the validator function
+            for (; i < length; i++) {
+                retVal = !!callback(elems[i], i);
+                if (inv !== retVal) {
+                    ret.push(elems[i]);
+                }
+            }
+
+            return ret;
+        },
+
+        // arg is for internal usage only
+        map: function (elems, callback, arg) {
+            var value, key,
+                ret = [],
+                i = 0,
+                length = elems.length,
+            // jquery objects are treated as arrays
+                isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[0] && elems[length - 1] ) || length === 0 || jQuery.isArray(elems) );
+
+            // Go through the array, translating each of the items to their
+            if (isArray) {
+                for (; i < length; i++) {
+                    value = callback(elems[i], i, arg);
+
+                    if (value != null) {
+                        ret[ret.length] = value;
+                    }
+                }
+
+                // Go through every key on the object,
+            } else {
+                for (key in elems) {
+                    value = callback(elems[key], key, arg);
+
+                    if (value != null) {
+                        ret[ret.length] = value;
+                    }
+                }
+            }
+
+            // Flatten any nested arrays
+            return ret.concat.apply([], ret);
+        },
+
+        // A global GUID counter for objects
+        guid: 1,
+
+        // Bind a function to a context, optionally partially applying any
+        // arguments.
+        proxy: function (fn, context) {
+            var tmp, args, proxy;
+
+            if (typeof context === "string") {
+                tmp = fn[context];
+                context = fn;
+                fn = tmp;
+            }
+
+            // Quick check to determine if target is callable, in the spec
+            // this throws a TypeError, but we will just return undefined.
+            if (!jQuery.isFunction(fn)) {
+                return undefined;
+            }
+
+            // Simulated bind
+            args = core_slice.call(arguments, 2);
+            proxy = function () {
+                return fn.apply(context, args.concat(core_slice.call(arguments)));
+            };
+
+            // Set the guid of unique handler to the same of original handler, so it can be removed
+            proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+            return proxy;
+        },
+
+        // Multifunctional method to get and set values of a collection
+        // The value/s can optionally be executed if it's a function
+        access: function (elems, fn, key, value, chainable, emptyGet, pass) {
+            var exec,
+                bulk = key == null,
+                i = 0,
+                length = elems.length;
+
+            // Sets many values
+            if (key && typeof key === "object") {
+                for (i in key) {
+                    jQuery.access(elems, fn, i, key[i], 1, emptyGet, value);
+                }
+                chainable = 1;
+
+                // Sets one value
+            } else if (value !== undefined) {
+                // Optionally, function values get executed if exec is true
+                exec = pass === undefined && jQuery.isFunction(value);
+
+                if (bulk) {
+                    // Bulk operations only iterate when executing function values
+                    if (exec) {
+                        exec = fn;
+                        fn = function (elem, key, value) {
+                            return exec.call(jQuery(elem), value);
+                        };
+
+                        // Otherwise they run against the entire set
+                    } else {
+                        fn.call(elems, value);
+                        fn = null;
+                    }
+                }
+
+                if (fn) {
+                    for (; i < length; i++) {
+                        fn(elems[i], key, exec ? value.call(elems[i], i, fn(elems[i], key)) : value, pass);
+                    }
+                }
+
+                chainable = 1;
+            }
+
+            return chainable ?
+                elems :
+
+                // Gets
+                bulk ?
+                    fn.call(elems) :
+                    length ? fn(elems[0], key) : emptyGet;
+        },
+
+        now: function () {
+            return ( new Date() ).getTime();
+        }
+    });
+
+    jQuery.ready.promise = function (obj) {
+        if (!readyList) {
+
+            readyList = jQuery.Deferred();
+
+            // Catch cases where $(document).ready() is called after the browser event has already occurred.
+            // we once tried to use readyState "interactive" here, but it caused issues like the one
+            // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+            if (document.readyState === "complete") {
+                // Handle it asynchronously to allow scripts the opportunity to delay ready
+                setTimeout(jQuery.ready, 1);
+
+                // Standards-based browsers support DOMContentLoaded
+            } else if (document.addEventListener) {
+                // Use the handy event callback
+                document.addEventListener("DOMContentLoaded", DOMContentLoaded, false);
+
+                // A fallback to window.onload, that will always work
+                window.addEventListener("load", jQuery.ready, false);
+
+                // If IE event model is used
+            } else {
+                // Ensure firing before onload, maybe late but safe also for iframes
+                document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+                // A fallback to window.onload, that will always work
+                window.attachEvent("onload", jQuery.ready);
+
+                // If IE and not a frame
+                // continually check to see if the document is ready
+                var top = false;
+
+                try {
+                    top = window.frameElement == null && document.documentElement;
+                } catch (e) {
+                }
+
+                if (top && top.doScroll) {
+                    (function doScrollCheck() {
+                        if (!jQuery.isReady) {
+
+                            try {
+                                // Use the trick by Diego Perini
+                                // http://javascript.nwbox.com/IEContentLoaded/
+                                top.doScroll("left");
+                            } catch (e) {
+                                return setTimeout(doScrollCheck, 50);
+                            }
+
+                            // and execute any waiting functions
+                            jQuery.ready();
+                        }
+                    })();
+                }
+            }
+        }
+        return readyList.promise(obj);
+    };
+
+// Populate the class2type map
+    jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (i, name) {
+        class2type["[object " + name + "]"] = name.toLowerCase();
+    });
+
+// All jQuery objects should point back to these
+    rootjQuery = jQuery(document);
+// String to Object options format cache
+    var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+    function createOptions(options) {
+        var object = optionsCache[options] = {};
+        jQuery.each(options.split(core_rspace), function (_, flag) {
+            object[flag] = true;
+        });
+        return object;
+    }
+
+    /*
+     * Create a callback list using the following parameters:
+     *
+     *	options: an optional list of space-separated options that will change how
+     *			the callback list behaves or a more traditional option object
+     *
+     * By default a callback list will act like an event callback list and can be
+     * "fired" multiple times.
+     *
+     * Possible options:
+     *
+     *	once:			will ensure the callback list can only be fired once (like a Deferred)
+     *
+     *	memory:			will keep track of previous values and will call any callback added
+     *					after the list has been fired right away with the latest "memorized"
+     *					values (like a Deferred)
+     *
+     *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+     *
+     *	stopOnFalse:	interrupt callings when a callback returns false
+     *
+     */
+    jQuery.Callbacks = function (options) {
+
+        // Convert options from String-formatted to Object-formatted if needed
+        // (we check in cache first)
+        options = typeof options === "string" ?
+            ( optionsCache[options] || createOptions(options) ) :
+            jQuery.extend({}, options);
+
+        var // Last fire value (for non-forgettable lists)
+            memory,
+        // Flag to know if list was already fired
+            fired,
+        // Flag to know if list is currently firing
+            firing,
+        // First callback to fire (used internally by add and fireWith)
+            firingStart,
+        // End of the loop when firing
+            firingLength,
+        // Index of currently firing callback (modified by remove if needed)
+            firingIndex,
+        // Actual callback list
+            list = [],
+        // Stack of fire calls for repeatable lists
+            stack = !options.once && [],
+        // Fire callbacks
+            fire = function (data) {
+                memory = options.memory && data;
+                fired = true;
+                firingIndex = firingStart || 0;
+                firingStart = 0;
+                firingLength = list.length;
+                firing = true;
+                for (; list && firingIndex < firingLength; firingIndex++) {
+                    if (list[firingIndex].apply(data[0], data[1]) === false && options.stopOnFalse) {
+                        memory = false; // To prevent further calls using add
+                        break;
+                    }
+                }
+                firing = false;
+                if (list) {
+                    if (stack) {
+                        if (stack.length) {
+                            fire(stack.shift());
+                        }
+                    } else if (memory) {
+                        list = [];
+                    } else {
+                        self.disable();
+                    }
+                }
+            },
+        // Actual Callbacks object
+            self = {
+                // Add a callback or a collection of callbacks to the list
+                add: function () {
+                    if (list) {
+                        // First, we save the current length
+                        var start = list.length;
+                        (function add(args) {
+                            jQuery.each(args, function (_, arg) {
+                                var type = jQuery.type(arg);
+                                if (type === "function") {
+                                    if (!options.unique || !self.has(arg)) {
+                                        list.push(arg);
+                                    }
+                                } else if (arg && arg.length && type !== "string") {
+                                    // Inspect recursively
+                                    add(arg);
+                                }
+                            });
+                        })(arguments);
+                        // Do we need to add the callbacks to the
+                        // current firing batch?
+                        if (firing) {
+                            firingLength = list.length;
+                            // With memory, if we're not firing then
+                            // we should call right away
+                        } else if (memory) {
+                            firingStart = start;
+                            fire(memory);
+                        }
+                    }
+                    return this;
+                },
+                // Remove a callback from the list
+                remove: function () {
+                    if (list) {
+                        jQuery.each(arguments, function (_, arg) {
+                            var index;
+                            while (( index = jQuery.inArray(arg, list, index) ) > -1) {
+                                list.splice(index, 1);
+                                // Handle firing indexes
+                                if (firing) {
+                                    if (index <= firingLength) {
+                                        firingLength--;
+                                    }
+                                    if (index <= firingIndex) {
+                                        firingIndex--;
+                                    }
+                                }
+                            }
+                        });
+                    }
+                    return this;
+                },
+                // Control if a given callback is in the list
+                has: function (fn) {
+                    return jQuery.inArray(fn, list) > -1;
+                },
+                // Remove all callbacks from the list
+                empty: function () {
+                    list = [];
+                    return this;
+                },
+                // Have the list do nothing anymore
+                disable: function () {
+                    list = stack = memory = undefined;
+                    return this;
+                },
+                // Is it disabled?
+                disabled: function () {
+                    return !list;
+                },
+                // Lock the list in its current state
+                lock: function () {
+                    stack = undefined;
+                    if (!memory) {
+                        self.disable();
+                    }
+                    return this;
+                },
+                // Is it locked?
+                locked: function () {
+                    return !stack;
+                },
+                // Call all callbacks with the given context and arguments
+                fireWith: function (context, args) {
+                    args = args || [];
+                    args = [context, args.slice ? args.slice() : args];
+                    if (list && ( !fired || stack )) {
+                        if (firing) {
+                            stack.push(args);
+                        } else {
+                            fire(args);
+                        }
+                    }
+                    return this;
+                },
+                // Call all the callbacks with the given arguments
+                fire: function () {
+                    self.fireWith(this, arguments);
+                    return this;
+                },
+                // To know if the callbacks have already been called at least once
+                fired: function () {
+                    return !!fired;
+                }
+            };
+
+        return self;
+    };
+    jQuery.extend({
+
+        Deferred: function (func) {
+            var tuples = [
+                    // action, add listener, listener list, final state
+                    ["resolve", "done", jQuery.Callbacks("once memory"), "resolved"],
+                    ["reject", "fail", jQuery.Callbacks("once memory"), "rejected"],
+                    ["notify", "progress", jQuery.Callbacks("memory")]
+                ],
+                state = "pending",
+                promise = {
+                    state: function () {
+                        return state;
+                    },
+                    always: function () {
+                        deferred.done(arguments).fail(arguments);
+                        return this;
+                    },
+                    then: function (/* fnDone, fnFail, fnProgress */) {
+                        var fns = arguments;
+                        return jQuery.Deferred(function (newDefer) {
+                            jQuery.each(tuples, function (i, tuple) {
+                                var action = tuple[0],
+                                    fn = fns[i];
+                                // deferred[ done | fail | progress ] for forwarding actions to newDefer
+                                deferred[tuple[1]](jQuery.isFunction(fn) ?
+                                        function () {
+                                            var returned = fn.apply(this, arguments);
+                                            if (returned && jQuery.isFunction(returned.promise)) {
+                                                returned.promise()
+                                                    .done(newDefer.resolve)
+                                                    .fail(newDefer.reject)
+                                                    .progress(newDefer.notify);
+                                            } else {
+                                                newDefer[action + "With"](this === deferred ? newDefer : this, [returned]);
+                                            }
+                                        } :
+                                        newDefer[action]
+                                );
+                            });
+                            fns = null;
+                        }).promise();
+                    },
+                    // Get a promise for this deferred
+                    // If obj is provided, the promise aspect is added to the object
+                    promise: function (obj) {
+                        return obj != null ? jQuery.extend(obj, promise) : promise;
+                    }
+                },
+                deferred = {};
+
+            // Keep pipe for back-compat
+            promise.pipe = promise.then;
+
+            // Add list-specific methods
+            jQuery.each(tuples, function (i, tuple) {
+                var list = tuple[2],
+                    stateString = tuple[3];
+
+                // promise[ done | fail | progress ] = list.add
+                promise[tuple[1]] = list.add;
+
+                // Handle state
+                if (stateString) {
+                    list.add(function () {
+                        // state = [ resolved | rejected ]
+                        state = stateString;
+
+                        // [ reject_list | resolve_list ].disable; progress_list.lock
+                    }, tuples[i ^ 1][2].disable, tuples[2][2].lock);
+                }
+
+                // deferred[ resolve | reject | notify ] = list.fire
+                deferred[tuple[0]] = list.fire;
+                deferred[tuple[0] + "With"] = list.fireWith;
+            });
+
+            // Make the deferred a promise
+            promise.promise(deferred);
+
+            // Call given func if any
+            if (func) {
+                func.call(deferred, deferred);
+            }
+
+            // All done!
+            return deferred;
+        },
+
+        // Deferred helper
+        when: function (subordinate /* , ..., subordinateN */) {
+            var i = 0,
+                resolveValues = core_slice.call(arguments),
+                length = resolveValues.length,
+
+            // the count of uncompleted subordinates
+                remaining = length !== 1 || ( subordinate && jQuery.isFunction(subordinate.promise) ) ? length : 0,
+
+            // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+                deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+            // Update function for both resolve and progress values
+                updateFunc = function (i, contexts, values) {
+                    return function (value) {
+                        contexts[i] = this;
+                        values[i] = arguments.length > 1 ? core_slice.call(arguments) : value;
+                        if (values === progressValues) {
+                            deferred.notifyWith(contexts, values);
+                        } else if (!( --remaining )) {
+                            deferred.resolveWith(contexts, values);
+                        }
+                    };
+                },
+
+                progressValues, progressContexts, resolveContexts;
+
+            // add listeners to Deferred subordinates; treat others as resolved
+            if (length > 1) {
+                progressValues = new Array(length);
+                progressContexts = new Array(length);
+                resolveContexts = new Array(length);
+                for (; i < length; i++) {
+                    if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) {
+                        resolveValues[i].promise()
+                            .done(updateFunc(i, resolveContexts, resolveValues))
+                            .fail(deferred.reject)
+                            .progress(updateFunc(i, progressContexts, progressValues));
+                    } else {
+                        --remaining;
+                    }
+                }
+            }
+
+            // if we're not waiting on anything, resolve the master
+            if (!remaining) {
+                deferred.resolveWith(resolveContexts, resolveValues);
+            }
+
+            return deferred.promise();
+        }
+    });
+    jQuery.support = (function () {
+
+        var support,
+            all,
+            a,
+            select,
+            opt,
+            input,
+            fragment,
+            eventName,
+            i,
+            isSupported,
+            clickFn,
+            div = document.createElement("div");
+
+        // Setup
+        div.setAttribute("className", "t");
+        div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+        // Support tests won't run in some limited or non-browser environments
+        all = div.getElementsByTagName("*");
+        a = div.getElementsByTagName("a")[0];
+        if (!all || !a || !all.length) {
+            return {};
+        }
+
+        // First batch of tests
+        select = document.createElement("select");
+        opt = select.appendChild(document.createElement("option"));
+        input = div.getElementsByTagName("input")[0];
+
+        a.style.cssText = "top:1px;float:left;opacity:.5";
+        support = {
+            // IE strips leading whitespace when .innerHTML is used
+            leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+            // Make sure that tbody elements aren't automatically inserted
+            // IE will insert them into empty tables
+            tbody: !div.getElementsByTagName("tbody").length,
+
+            // Make sure that link elements get serialized correctly by innerHTML
+            // This requires a wrapper element in IE
+            htmlSerialize: !!div.getElementsByTagName("link").length,
+
+            // Get the style information from getAttribute
+            // (IE uses .cssText instead)
+            style: /top/.test(a.getAttribute("style")),
+
+            // Make sure that URLs aren't manipulated
+            // (IE normalizes it by default)
+            hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+            // Make sure that element opacity exists
+            // (IE uses filter instead)
+            // Use a regex to work around a WebKit issue. See #5145
+            opacity: /^0.5/.test(a.style.opacity),
+
+            // Verify style float existence
+            // (IE uses styleFloat instead of cssFloat)
+            cssFloat: !!a.style.cssFloat,
+
+            // Make sure that if no value is specified for a checkbox
+            // that it defaults to "on".
+            // (WebKit defaults to "" instead)
+            checkOn: ( input.value === "on" ),
+
+            // Make sure that a selected-by-default option has a working selected property.
+            // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+            optSelected: opt.selected,
+
+            // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+            getSetAttribute: div.className !== "t",
+
+            // Tests for enctype support on a form (#6743)
+            enctype: !!document.createElement("form").enctype,
+
+            // Makes sure cloning an html5 element does not cause problems
+            // Where outerHTML is undefined, this still works
+            html5Clone: document.createElement("nav").cloneNode(true).outerHTML !== "<:nav></:nav>",
+
+            // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+            boxModel: ( document.compatMode === "CSS1Compat" ),
+
+            // Will be defined later
+            submitBubbles: true,
+            changeBubbles: true,
+            focusinBubbles: false,
+            deleteExpando: true,
+            noCloneEvent: true,
+            inlineBlockNeedsLayout: false,
+            shrinkWrapBlocks: false,
+            reliableMarginRight: true,
+            boxSizingReliable: true,
+            pixelPosition: false
+        };
+
+        // Make sure checked status is properly cloned
+        input.checked = true;
+        support.noCloneChecked = input.cloneNode(true).checked;
+
+        // Make sure that the options inside disabled selects aren't marked as disabled
+        // (WebKit marks them as disabled)
+        select.disabled = true;
+        support.optDisabled = !opt.disabled;
+
+        // Test to see if it's possible to delete an expando from an element
+        // Fails in Internet Explorer
+        try {
+            delete div.test;
+        } catch (e) {
+            support.deleteExpando = false;
+        }
+
+        if (!div.addEventListener && div.attachEvent && div.fireEvent) {
+            div.attachEvent("onclick", clickFn = function () {
+                // Cloning a node shouldn't copy over any
+                // bound event handlers (IE does this)
+                support.noCloneEvent = false;
+            });
+            div.cloneNode(true).fireEvent("onclick");
+            div.detachEvent("onclick", clickFn);
+        }
+
+        // Check if a radio maintains its value
+        // after being appended to the DOM
+        input = document.createElement("input");
+        input.value = "t";
+        input.setAttribute("type", "radio");
+        support.radioValue = input.value === "t";
+
+        input.setAttribute("checked", "checked");
+
+        // #11217 - WebKit loses check when the name is after the checked attribute
+        input.setAttribute("name", "t");
+
+        div.appendChild(input);
+        fragment = document.createDocumentFragment();
+        fragment.appendChild(div.lastChild);
+
+        // WebKit doesn't clone checked state correctly in fragments
+        support.checkClone = fragment.cloneNode(true).cloneNode(true).lastChild.checked;
+
+        // Check if a disconnected checkbox will retain its checked
+        // value of true after appended to the DOM (IE6/7)
+        support.appendChecked = input.checked;
+
+        fragment.removeChild(input);
+        fragment.appendChild(div);
+
+        // Technique from Juriy Zaytsev
+        // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+        // We only care about the case where non-standard event systems
+        // are used, namely in IE. Short-circuiting here helps us to
+        // avoid an eval call (in setAttribute) which can cause CSP
+        // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+        if (div.attachEvent) {
+            for (i in {
+                submit: true,
+                change: true,
+                focusin: true
+            }) {
+                eventName = "on" + i;
+                isSupported = ( eventName in div );
+                if (!isSupported) {
+                    div.setAttribute(eventName, "return;");
+                    isSupported = ( typeof div[eventName] === "function" );
+                }
+                support[i + "Bubbles"] = isSupported;
+            }
+        }
+
+        // Run tests that need a body at doc ready
+        jQuery(function () {
+            var container, div, tds, marginDiv,
+                divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
+                body = document.getElementsByTagName("body")[0];
+
+            if (!body) {
+                // Return for frameset docs that don't have a body
+                return;
+            }
+
+            container = document.createElement("div");
+            container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
+            body.insertBefore(container, body.firstChild);
+
+            // Construct the test element
+            div = document.createElement("div");
+            container.appendChild(div);
+
+            // Check if table cells still have offsetWidth/Height when they are set
+            // to display:none and there are still other visible table cells in a
+            // table row; if so, offsetWidth/Height are not reliable for use when
+            // determining if an element has been hidden directly using
+            // display:none (it is still safe to use offsets if a parent element is
+            // hidden; don safety goggles and see bug #4512 for more information).
+            // (only IE 8 fails this test)
+            div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+            tds = div.getElementsByTagName("td");
+            tds[0].style.cssText = "padding:0;margin:0;border:0;display:none";
+            isSupported = ( tds[0].offsetHeight === 0 );
+
+            tds[0].style.display = "";
+            tds[1].style.display = "none";
+
+            // Check if empty table cells still have offsetWidth/Height
+            // (IE <= 8 fail this test)
+            support.reliableHiddenOffsets = isSupported && ( tds[0].offsetHeight === 0 );
+
+            // Check box-sizing and margin behavior
+            div.innerHTML = "";
+            div.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%;";
+            support.boxSizing = ( div.offsetWidth === 4 );
+            support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+            // NOTE: To any future maintainer, we've window.getComputedStyle
+            // because jsdom on node.js will break without it.
+            if (window.getComputedStyle) {
+                support.pixelPosition = ( window.getComputedStyle(div, null) || {} ).top !== "1%";
+                support.boxSizingReliable = ( window.getComputedStyle(div, null) || {width: "4px"} ).width === "4px";
+
+                // Check if div with explicit width and no margin-right incorrectly
+                // gets computed margin-right based on width of container. For more
+                // info see bug #3333
+                // Fails in WebKit before Feb 2011 nightlies
+                // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                marginDiv = document.createElement("div");
+                marginDiv.style.cssText = div.style.cssText = divReset;
+                marginDiv.style.marginRight = marginDiv.style.width = "0";
+                div.style.width = "1px";
+                div.appendChild(marginDiv);
+                support.reliableMarginRight = !parseFloat(( window.getComputedStyle(marginDiv, null) || {} ).marginRight);
+            }
+
+            if (typeof div.style.zoom !== "undefined") {
+                // Check if natively block-level elements act like inline-block
+                // elements when setting their display to 'inline' and giving
+                // them layout
+                // (IE < 8 does this)
+                div.innerHTML = "";
+                div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+                support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+                // Check if elements with layout shrink-wrap their children
+                // (IE 6 does this)
+                div.style.display = "block";
+                div.style.overflow = "visible";
+                div.innerHTML = "<div></div>";
+                div.firstChild.style.width = "5px";
+                support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+                container.style.zoom = 1;
+            }
+
+            // Null elements to avoid leaks in IE
+            body.removeChild(container);
+            container = div = tds = marginDiv = null;
+        });
+
+        // Null elements to avoid leaks in IE
+        fragment.removeChild(div);
+        all = a = select = opt = input = fragment = div = null;
+
+        return support;
+    })();
+    var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+        rmultiDash = /([A-Z])/g;
+
+    jQuery.extend({
+        cache: {},
+
+        deletedIds: [],
+
+        // Remove at next major release (1.9/2.0)
+        uuid: 0,
+
+        // Unique for each copy of jQuery on the page
+        // Non-digits removed to match rinlinejQuery
+        expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace(/\D/g, ""),
+
+        // The following elements throw uncatchable exceptions if you
+        // attempt to add expando properties to them.
+        noData: {
+            "embed": true,
+            // Ban all objects except for Flash (which handle expandos)
+            "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+            "applet": true
+        },
+
+        hasData: function (elem) {
+            elem = elem.nodeType ? jQuery.cache[elem[jQuery.expando]] : elem[jQuery.expando];
+            return !!elem && !isEmptyDataObject(elem);
+        },
+
+        data: function (elem, name, data, pvt /* Internal Use Only */) {
+            if (!jQuery.acceptData(elem)) {
+                return;
+            }
+
+            var thisCache, ret,
+                internalKey = jQuery.expando,
+                getByName = typeof name === "string",
+
+            // We have to handle DOM nodes and JS objects differently because IE6-7
+            // can't GC object references properly across the DOM-JS boundary
+                isNode = elem.nodeType,
+
+            // Only DOM nodes need the global jQuery cache; JS object data is
+            // attached directly to the object so GC can occur automatically
+                cache = isNode ? jQuery.cache : elem,
+
+            // Only defining an ID for JS objects if its cache already exists allows
+            // the code to shortcut on the same path as a DOM node with no cache
+                id = isNode ? elem[internalKey] : elem[internalKey] && internalKey;
+
+            // Avoid doing any more work than we need to when trying to get data on an
+            // object that has no data at all
+            if ((!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined) {
+                return;
+            }
+
+            if (!id) {
+                // Only DOM nodes need a new unique ID for each element since their data
+                // ends up in the global cache
+                if (isNode) {
+                    elem[internalKey] = id = jQuery.deletedIds.pop() || jQuery.guid++;
+                } else {
+                    id = internalKey;
+                }
+            }
+
+            if (!cache[id]) {
+                cache[id] = {};
+
+                // Avoids exposing jQuery metadata on plain JS objects when the object
+                // is serialized using JSON.stringify
+                if (!isNode) {
+                    cache[id].toJSON = jQuery.noop;
+                }
+            }
+
+            // An object can be passed to jQuery.data instead of a key/value pair; this gets
+            // shallow copied over onto the existing cache
+            if (typeof name === "object" || typeof name === "function") {
+                if (pvt) {
+                    cache[id] = jQuery.extend(cache[id], name);
+                } else {
+                    cache[id].data = jQuery.extend(cache[id].data, name);
+                }
+            }
+
+            thisCache = cache[id];
+
+            // jQuery data() is stored in a separate object inside the object's internal data
+            // cache in order to avoid key collisions between internal data and user-defined
+            // data.
+            if (!pvt) {
+                if (!thisCache.data) {
+                    thisCache.data = {};
+                }
+
+                thisCache = thisCache.data;
+            }
+
+            if (data !== undefined) {
+                thisCache[jQuery.camelCase(name)] = data;
+            }
+
+            // Check for both converted-to-camel and non-converted data property names
+            // If a data property was specified
+            if (getByName) {
+
+                // First Try to find as-is property data
+                ret = thisCache[name];
+
+                // Test for null|undefined property data
+                if (ret == null) {
+
+                    // Try to find the camelCased property
+                    ret = thisCache[jQuery.camelCase(name)];
+                }
+            } else {
+                ret = thisCache;
+            }
+
+            return ret;
+        },
+
+        removeData: function (elem, name, pvt /* Internal Use Only */) {
+            if (!jQuery.acceptData(elem)) {
+                return;
+            }
+
+            var thisCache, i, l,
+
+                isNode = elem.nodeType,
+
+            // See jQuery.data for more information
+                cache = isNode ? jQuery.cache : elem,
+                id = isNode ? elem[jQuery.expando] : jQuery.expando;
+
+            // If there is already no cache entry for this object, there is no
+            // purpose in continuing
+            if (!cache[id]) {
+                return;
+            }
+
+            if (name) {
+
+                thisCache = pvt ? cache[id] : cache[id].data;
+
+                if (thisCache) {
+
+                    // Support array or space separated string names for data keys
+                    if (!jQuery.isArray(name)) {
+
+                        // try the string as a key before any manipulation
+                        if (name in thisCache) {
+                            name = [name];
+                        } else {
+
+                            // split the camel cased version by spaces unless a key with the spaces exists
+                            name = jQuery.camelCase(name);
+                            if (name in thisCache) {
+                                name = [name];
+                            } else {
+                                name = name.split(" ");
+                            }
+                        }
+                    }
+
+                    for (i = 0, l = name.length; i < l; i++) {
+                        delete thisCache[name[i]];
+                    }
+
+                    // If there is no data left in the cache, we want to continue
+                    // and let the cache object itself get destroyed
+                    if (!( pvt ? isEmptyDataObject : jQuery.isEmptyObject )(thisCache)) {
+                        return;
+                    }
+                }
+            }
+
+            // See jQuery.data for more information
+            if (!pvt) {
+                delete cache[id].data;
+
+                // Don't destroy the parent cache unless the internal data object
+                // had been the only thing left in it
+                if (!isEmptyDataObject(cache[id])) {
+                    return;
+                }
+            }
+
+            // Destroy the cache
+            if (isNode) {
+                jQuery.cleanData([elem], true);
+
+                // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+            } else if (jQuery.support.deleteExpando || cache != cache.window) {
+                delete cache[id];
+
+                // When all else fails, null
+            } else {
+                cache[id] = null;
+            }
+        },
+
+        // For internal use only.
+        _data: function (elem, name, data) {
+            return jQuery.data(elem, name, data, true);
+        },
+
+        // A method for determining if a DOM node can handle the data expando
+        acceptData: function (elem) {
+            var noData = elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()];
+
+            // nodes accept data unless otherwise specified; rejection can be conditional
+            return !noData || noData !== true && elem.getAttribute("classid") === noData;
+        }
+    });
+
+    jQuery.fn.extend({
+        data: function (key, value) {
+            var parts, part, attr, name, l,
+                elem = this[0],
+                i = 0,
+                data = null;
+
+            // Gets all values
+            if (key === undefined) {
+                if (this.length) {
+                    data = jQuery.data(elem);
+
+                    if (elem.nodeType === 1 && !jQuery._data(elem, "parsedAttrs")) {
+                        attr = elem.attributes;
+                        for (l = attr.length; i < l; i++) {
+                            name = attr[i].name;
+
+                            if (!name.indexOf("data-")) {
+                                name = jQuery.camelCase(name.substring(5));
+
+                                dataAttr(elem, name, data[name]);
+                            }
+                        }
+                        jQuery._data(elem, "parsedAttrs", true);
+                    }
+                }
+
+                return data;
+            }
+
+            // Sets multiple values
+            if (typeof key === "object") {
+                return this.each(function () {
+                    jQuery.data(this, key);
+                });
+            }
+
+            parts = key.split(".", 2);
+            parts[1] = parts[1] ? "." + parts[1] : "";
+            part = parts[1] + "!";
+
+            return jQuery.access(this, function (value) {
+
+                if (value === undefined) {
+                    data = this.triggerHandler("getData" + part, [parts[0]]);
+
+                    // Try to fetch any internally stored data first
+                    if (data === undefined && elem) {
+                        data = jQuery.data(elem, key);
+                        data = dataAttr(elem, key, data);
+                    }
+
+                    return data === undefined && parts[1] ?
+                        this.data(parts[0]) :
+                        data;
+                }
+
+                parts[1] = value;
+                this.each(function () {
+                    var self = jQuery(this);
+
+                    self.triggerHandler("setData" + part, parts);
+                    jQuery.data(this, key, value);
+                    self.triggerHandler("changeData" + part, parts);
+                });
+            }, null, value, arguments.length > 1, null, false);
+        },
+
+        removeData: function (key) {
+            return this.each(function () {
+                jQuery.removeData(this, key);
+            });
+        }
+    });
+
+    function dataAttr(elem, key, data) {
+        // If nothing was found internally, try to fetch any
+        // data from the HTML5 data-* attribute
+        if (data === undefined && elem.nodeType === 1) {
+
+            var name = "data-" + key.replace(rmultiDash, "-$1").toLowerCase();
+
+            data = elem.getAttribute(name);
+
+            if (typeof data === "string") {
+                try {
+                    data = data === "true" ? true :
+                        data === "false" ? false :
+                            data === "null" ? null :
+                                // Only convert to a number if it doesn't change the string
+                                +data + "" === data ? +data :
+                                    rbrace.test(data) ? jQuery.parseJSON(data) :
+                                        data;
+                } catch (e) {
+                }
+
+                // Make sure we set the data so it isn't changed later
+                jQuery.data(elem, key, data);
+
+            } else {
+                data = undefined;
+            }
+        }
+
+        return data;
+    }
+
+// checks a cache object for emptiness
+    function isEmptyDataObject(obj) {
+        var name;
+        for (name in obj) {
+
+            // if the public data object is empty, the private is still empty
+            if (name === "data" && jQuery.isEmptyObject(obj[name])) {
+                continue;
+            }
+            if (name !== "toJSON") {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    jQuery.extend({
+        queue: function (elem, type, data) {
+            var queue;
+
+            if (elem) {
+                type = ( type || "fx" ) + "queue";
+                queue = jQuery._data(elem, type);
+
+                // Speed up dequeue by getting out quickly if this is just a lookup
+                if (data) {
+                    if (!queue || jQuery.isArray(data)) {
+                        queue = jQuery._data(elem, type, jQuery.makeArray(data));
+                    } else {
+                        queue.push(data);
+                    }
+                }
+                return queue || [];
+            }
+        },
+
+        dequeue: function (elem, type) {
+            type = type || "fx";
+
+            var queue = jQuery.queue(elem, type),
+                startLength = queue.length,
+                fn = queue.shift(),
+                hooks = jQuery._queueHooks(elem, type),
+                next = function () {
+                    jQuery.dequeue(elem, type);
+                };
+
+            // If the fx queue is dequeued, always remove the progress sentinel
+            if (fn === "inprogress") {
+                fn = queue.shift();
+                startLength--;
+            }
+
+            if (fn) {
+
+                // Add a progress sentinel to prevent the fx queue from being
+                // automatically dequeued
+                if (type === "fx") {
+                    queue.unshift("inprogress");
+                }
+
+                // clear up the last queue stop function
+                delete hooks.stop;
+                fn.call(elem, next, hooks);
+            }
+
+            if (!startLength && hooks) {
+                hooks.empty.fire();
+            }
+        },
+
+        // not intended for public consumption - generates a queueHooks object, or returns the current one
+        _queueHooks: function (elem, type) {
+            var key = type + "queueHooks";
+            return jQuery._data(elem, key) || jQuery._data(elem, key, {
+                    empty: jQuery.Callbacks("once memory").add(function () {
+                        jQuery.removeData(elem, type + "queue", true);
+                        jQuery.removeData(elem, key, true);
+                    })
+                });
+        }
+    });
+
+    jQuery.fn.extend({
+        queue: function (type, data) {
+            var setter = 2;
+
+            if (typeof type !== "string") {
+                data = type;
+                type = "fx";
+                setter--;
+            }
+
+            if (arguments.length < setter) {
+                return jQuery.queue(this[0], type);
+            }
+
+            return data === undefined ?
+                this :
+                this.each(function () {
+                    var queue = jQuery.queue(this, type, data);
+
+                    // ensure a hooks for this queue
+                    jQuery._queueHooks(this, type);
+
+                    if (type === "fx" && queue[0] !== "inprogress") {
+                        jQuery.dequeue(this, type);
+                    }
+                });
+        },
+        dequeue: function (type) {
+            return this.each(function () {
+                jQuery.dequeue(this, type);
+            });
+        },
+        // Based off of the plugin by Clint Helfers, with permission.
+        // http://blindsignals.com/index.php/2009/07/jquery-delay/
+        delay: function (time, type) {
+            time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
+            type = type || "fx";
+
+            return this.queue(type, function (next, hooks) {
+                var timeout = setTimeout(next, time);
+                hooks.stop = function () {
+                    clearTimeout(timeout);
+                };
+            });
+        },
+        clearQueue: function (type) {
+            return this.queue(type || "fx", []);
+        },
+        // Get a promise resolved when queues of a certain type
+        // are emptied (fx is the type by default)
+        promise: function (type, obj) {
+            var tmp,
+                count = 1,
+                defer = jQuery.Deferred(),
+                elements = this,
+                i = this.length,
+                resolve = function () {
+                    if (!( --count )) {
+                        defer.resolveWith(elements, [elements]);
+                    }
+                };
+
+            if (typeof type !== "string") {
+                obj = type;
+                type = undefined;
+            }
+            type = type || "fx";
+
+            while (i--) {
+                tmp = jQuery._data(elements[i], type + "queueHooks");
+                if (tmp && tmp.empty) {
+                    count++;
+                    tmp.empty.add(resolve);
+                }
+            }
+            resolve();
+            return defer.promise(obj);
+        }
+    });
+    var nodeHook, boolHook, fixSpecified,
+        rclass = /[\t\r\n]/g,
+        rreturn = /\r/g,
+        rtype = /^(?:button|input)$/i,
+        rfocusable = /^(?:button|input|object|select|textarea)$/i,
+        rclickable = /^a(?:rea|)$/i,
+        rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+        getSetAttribute = jQuery.support.getSetAttribute;
+
+    jQuery.fn.extend({
+        attr: function (name, value) {
+            return jQuery.access(this, jQuery.attr, name, value, arguments.length > 1);
+        },
+
+        removeAttr: function (name) {
+            return this.each(function () {
+                jQuery.removeAttr(this, name);
+            });
+        },
+
+        prop: function (name, value) {
+            return jQuery.access(this, jQuery.prop, name, value, arguments.length > 1);
+        },
+
+        removeProp: function (name) {
+            name = jQuery.propFix[name] || name;
+            return this.each(function () {
+                // try/catch handles cases where IE balks (such as removing a property on window)
+                try {
+                    this[name] = undefined;
+                    delete this[name];
+                } catch (e) {
+                }
+            });
+        },
+
+        addClass: function (value) {
+            var classNames, i, l, elem,
+                setClass, c, cl;
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (j) {
+                    jQuery(this).addClass(value.call(this, j, this.className));
+                });
+            }
+
+            if (value && typeof value === "string") {
+                classNames = value.split(core_rspace);
+
+                for (i = 0, l = this.length; i < l; i++) {
+                    elem = this[i];
+
+                    if (elem.nodeType === 1) {
+                        if (!elem.className && classNames.length === 1) {
+                            elem.className = value;
+
+                        } else {
+                            setClass = " " + elem.className + " ";
+
+                            for (c = 0, cl = classNames.length; c < cl; c++) {
+                                if (setClass.indexOf(" " + classNames[c] + " ") < 0) {
+                                    setClass += classNames[c] + " ";
+                                }
+                            }
+                            elem.className = jQuery.trim(setClass);
+                        }
+                    }
+                }
+            }
+
+            return this;
+        },
+
+        removeClass: function (value) {
+            var removes, className, elem, c, cl, i, l;
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (j) {
+                    jQuery(this).removeClass(value.call(this, j, this.className));
+                });
+            }
+            if ((value && typeof value === "string") || value === undefined) {
+                removes = ( value || "" ).split(core_rspace);
+
+                for (i = 0, l = this.length; i < l; i++) {
+                    elem = this[i];
+                    if (elem.nodeType === 1 && elem.className) {
+
+                        className = (" " + elem.className + " ").replace(rclass, " ");
+
+                        // loop over each item in the removal list
+                        for (c = 0, cl = removes.length; c < cl; c++) {
+                            // Remove until there is nothing to remove,
+                            while (className.indexOf(" " + removes[c] + " ") >= 0) {
+                                className = className.replace(" " + removes[c] + " ", " ");
+                            }
+                        }
+                        elem.className = value ? jQuery.trim(className) : "";
+                    }
+                }
+            }
+
+            return this;
+        },
+
+        toggleClass: function (value, stateVal) {
+            var type = typeof value,
+                isBool = typeof stateVal === "boolean";
+
+            if (jQuery.isFunction(value)) {
+                return this.each(function (i) {
+                    jQuery(this).toggleClass(value.call(this, i, this.className, stateVal), stateVal);
+                });
+            }
+
+            return this.each(function () {
+                if (type === "string") {
+                    // toggle individual class names
+                    var className,
+                        i = 0,
+                        self = jQuery(this),
+                        state = stateVal,
+                        classNames = value.split(core_rspace);
+
+                    while ((className = classNames[i++])) {
+                        // check each className given, space separated list
+                        state = isBool ? state : !self.hasClass(className);
+                        self[state ? "addClass" : "removeClass"](className);
+                    }
+
+                } else if (type === "undefined" || type === "boolean") {
+                    if (this.className) {
+                        // store className if set
+                        jQuery._data(this, "__className__", this.className);
+                    }
+
+                    // toggle whole className
+                    this.className = this.className || value === false ? "" : jQuery._data(this, "__className__") || "";
+                }
+            });
+        },
+
+        hasClass: function (selector) {
+            var className = " " + selector + " ",
+                i = 0,
+                l = this.length;
+            for (; i < l; i++) {
+                if (this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf(className) >= 0) {
+                    return true;
+                }
+            }
+
+            return false;
+        },
+
+        val: function (value) {
+            var hooks, ret, isFunction,
+                elem = this[0];
+
+            if (!arguments.length) {
+                if (elem) {
+                    hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
+
+                    if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== undefined) {
+                        return ret;
+                    }
+
+                    ret = elem.value;
+
+                    return typeof ret === "string" ?
+                        // handle most common string cases
+                        ret.replace(rreturn, "") :
+                        // handle cases where value is null/undef or number
+                        ret == null ? "" : ret;
+                }
+
+                return;
+            }
+
+            isFunction = jQuery.isFunction(value);
+
+            return this.each(function (i) {
+                var val,
+                    self = jQuery(this);
+
+                if (this.nodeType !== 1) {
+                    return;
+                }
+
+                if (isFunction) {
+                    val = value.call(this, i, self.val());
+                } else {
+                    val = value;
+                }
+
+                // Treat null/undefined as ""; convert numbers to string
+                if (val == null) {
+                    val = "";
+                } else if (typeof val === "number") {
+                    val += "";
+                } else if (jQuery.isArray(val)) {
+                    val = jQuery.map(val, function (value) {
+                        return value == null ? "" : value + "";
+                    });
+                }
+
+                hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
+
+                // If set returns undefined, fall back to normal setting
+                if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === undefined) {
+                    this.value = val;
+                }
+            });
+        }
+    });
+
+    jQuery.extend({
+        valHooks: {
+            option: {
+                get: function (elem) {
+                    // attributes.value is undefined in Blackberry 4.7 but
+                    // uses .value. See #6932
+                    var val = elem.attributes.value;
+                    return !val || val.specified ? elem.value : elem.text;
+                }
+            },
+            select: {
+                get: function (elem) {
+                    var value, option,
+                        options = elem.options,
+                        index = elem.selectedIndex,
+                        one = elem.type === "select-one" || index < 0,
+                        values = one ? null : [],
+                        max = one ? index + 1 : options.length,
+                        i = index < 0 ?
+                            max :
+                            one ? index : 0;
+
+                    // Loop through all the selected options
+                    for (; i < max; i++) {
+                        option = options[i];
+
+                        // oldIE doesn't update selected after form reset (#2551)
+                        if (( option.selected || i === index ) &&
+                                // Don't return options that are disabled or in a disabled optgroup
+                            ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+                            ( !option.parentNode.disabled || !jQuery.nodeName(option.parentNode, "optgroup") )) {
+
+                            // Get the specific value for the option
+                            value = jQuery(option).val();
+
+                            // We don't need an array for one selects
+                            if (one) {
+                                return value;
+                            }
+
+                            // Multi-Selects return an array
+                            values.push(value);
+                        }
+                    }
+
+                    return values;
+                },
+
+                set: function (elem, value) {
+                    var values = jQuery.makeArray(value);
+
+                    jQuery(elem).find("option").each(function () {
+                        this.selected = jQuery.inArray(jQuery(this).val(), values) >= 0;
+                    });
+
+                    if (!values.length) {
+                        elem.selectedIndex = -1;
+                    }
+                    return values;
+                }
+            }
+        },
+
+        // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9
+        attrFn: {},
+
+        attr: function (elem, name, value, pass) {
+            var ret, hooks, notxml,
+                nType = elem.nodeType;
+
+            // don't get/set attributes on text, comment and attribute nodes
+            if (!elem || nType === 3 || nType === 8 || nType === 2) {
+                return;
+            }
+
+            if (pass && jQuery.isFunction(jQuery.fn[name])) {
+                return jQuery(elem)[name](value);
+            }
+
+            // Fallback to prop when attributes are not supported
+            if (typeof elem.getAttribute === "undefined") {
+                return jQuery.prop(elem, name, value);
+            }
+
+            notxml = nType !== 1 || !jQuery.isXMLDoc(elem);
+
+            // All attributes are lowercase
+            // Grab necessary hook if one is defined
+            if (notxml) {
+                n

<TRUNCATED>