diff --git a/_config.yml b/_config.yml index 517e8ef..8bafac6 100644 --- a/_config.yml +++ b/_config.yml @@ -7,7 +7,7 @@ # Site settings name: Parse Community -title: Parse + Open Source = ❤️ +title: Parse Platform email: community@parseplatform.org description: The open source GitHub page for the Parse platform. baseurl: "" # the subpath of your site, e.g. /blog diff --git a/_includes/contactus.html b/_includes/contactus.html deleted file mode 100644 index 8ca8ebd..0000000 --- a/_includes/contactus.html +++ /dev/null @@ -1,8 +0,0 @@ -
-

Parse Shutdown Reminder

-
- The hosted Parse service is now shut down. - To all the developers out there, it was a pleasure helping you build apps. - Goodbye and good luck! -
-
diff --git a/_includes/nav.html b/_includes/nav.html index a73e79a..277cfb0 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -4,10 +4,10 @@ diff --git a/img/dart.svg b/img/dart.svg new file mode 100644 index 0000000..0bf93ab --- /dev/null +++ b/img/dart.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + diff --git a/img/flutter.svg b/img/flutter.svg new file mode 100644 index 0000000..8a2da70 --- /dev/null +++ b/img/flutter.svg @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/img/swiftColour.svg b/img/swiftColour.svg new file mode 100755 index 0000000..9e97bfa --- /dev/null +++ b/img/swiftColour.svg @@ -0,0 +1,22 @@ + + + + + + + + diff --git a/index.html b/index.html index 4638c13..714837a 100755 --- a/index.html +++ b/index.html @@ -1,6 +1,6 @@ --- layout: default -slug: Parse + Open Source +slug: Parse Platform --- @@ -70,7 +70,7 @@
The open source versions of our SDKs with relevant links to learn more.
-

iOS + OS X + tvOS

+

Objective-C

@@ -96,15 +96,13 @@

iOS + OS X + tvOS

@@ -140,15 +138,14 @@

Android

@@ -184,16 +181,12 @@

JavaScript

@@ -204,10 +197,10 @@

JavaScript

-
+
- -

.NET + Xamarin

+ +

Swift

@@ -219,31 +212,31 @@

.NET + Xamarin

- + - + - +
- +
+ +
+
+ +

.NET + Xamarin

+

+ + + + + + + + +

+
+ @@ -267,7 +370,7 @@

Unity

@@ -276,38 +379,38 @@

Unity

-
+
- -

PHP

+ +

Unity

- - - - - - - - + + + + + + + +

- + - + - + @@ -341,7 +444,7 @@

Arduino

@@ -377,7 +480,7 @@

Embedded C

@@ -390,28 +493,15 @@

Embedded C

Cloud Code

-

- - - - - - - - -

-
+
+
@@ -434,14 +524,13 @@

GraphQL API

-

Parse Server Adapters

-
Official adapters for parse server
+
Official adapters for Parse Server.
diff --git a/js/main.js b/js/main.js index 6d37eb0..8203091 100755 --- a/js/main.js +++ b/js/main.js @@ -32,6 +32,7 @@ $(document).ready(function(){ sortTitle = title.toLowerCase(), url = gitJson[j].html_url, hasIssues = gitJson[j].has_issues, + archived = gitJson[j].archived, description = gitJson[j].description, stars = parseInt(gitJson[j].stargazers_count), forks = parseInt(gitJson[j].forks_count), @@ -64,7 +65,7 @@ $(document).ready(function(){ //Sort SDK Repos //if title contains sdk hide it (since we hardcode them) - if (sortTitle.indexOf("sdk") >= 0 || sortTitle.indexOf("cli") >= 0) { + if (sortTitle.indexOf("sdk") >= 0 || sortTitle.indexOf("cli") >= 0 || sortTitle.indexOf("parse-swift") >= 0) { //if title matches hardcoded repo title then use these forks/stars if (sortTitle.includes("ios") === true){ //ios stars/forks @@ -96,41 +97,34 @@ $(document).ready(function(){ } else if (sortTitle.includes("cli") === true){ $(".cloudCodeRepo .sdkRepoStar").text(stars); $(".cloudCodeRepo .sdkRepoFork").text(forks); + } else if (sortTitle.includes("swift") === true){ + $(".swiftRepo .sdkRepoStar").text(stars); + $(".swiftRepo .sdkRepoFork").text(forks); + } else if (sortTitle.includes("flutter") === true){ + $(".flutterRepo .sdkRepoStar").text(stars); + $(".flutterRepo .sdkRepoFork").text(forks); + $(".dartRepo .sdkRepoStar").text(stars); + $(".dartRepo .sdkRepoFork").text(forks); } continue; } //ignore repos with issues turned off - if (hasIssues === false){ + if (hasIssues === false || archived === true || title === '.github' || title === 'Governance' || title === 'parse-community-peril' || title === 'parse-community.github.io' || title === 'blog' || title === 'relay-examples' || title === 'docs'|| title === 'parse-facebook-user-session'){ continue; } //Sort non-SDK repos into categories - //SOCIAL CATEGORY - // if name includes facebook, twitter - if (sortTitle.includes("facebook") === true || sortTitle.includes("twitter") === true){ - //write them to the page - addToSection($("section.socialRepos table"), url, title, description, forks, stars, language); - //TUTORIALS CATEGORY - // if name tutorial - } else if (sortTitle.includes("tutorial") === true || sortDescription.includes("tutorial")){ - //write them to the page - addToSection($("section.tutorials table"), url, title, description, forks, stars, language); //PARSE SERVER CATEGORY // if name parse-server, parse-dashboard - } else if (sortTitle === "parse-server" || sortTitle === "parse-dashboard"){ + if (sortTitle === "parse-server" || sortTitle === "parse-dashboard" || sortTitle === "parse-server-example"){ //write them to the page addToSection($("section.parseServer table"), url, title, description, forks, stars, language); //ADAPTERS REPOSITORIES } else if (sortTitle.includes("parse-server") === true || sortTitle.includes("parse-dashboard")){ //write them to the page addToSection($("section.parseServerAdapters table"), url, title, description, forks, stars, language); - //SAMPLES CATEGORY - // if name todo, demo, any, scrumptious, store, f8, internetcar - } else if (sortTitle.includes("todo") === true || sortTitle.includes("demo") === true || sortTitle.includes("any") === true || sortTitle.includes("store") === true || sortTitle.includes("f8") === true || sortTitle.includes("internetcar") === true || sortDescription.includes("example") || sortDescription.includes("sample")){ - //write them to the page - addToSection($("section.sampleApps table"), url, title, description, forks, stars, language); //OTHER CATEGORY // ...everything else } else if (description) { @@ -439,39 +433,23 @@ $(document).ready(function(){ } var communityRepos = [{ - title: "Bolts Android", - description: "Collection of low-level libraries to make developing mobile apps easier.", - url: "https://github.com/BoltsFramework/Bolts-Android" - },{ - title: "Bolts ObjC", - description: "Collection of low-level libraries to make developing mobile apps easier.", - url: "https://github.com/BoltsFramework/Bolts-ObjC" - },{ - title: "Bolts Swift", - description: "Collection of low-level libraries to make developing mobile apps easier.", - url: "https://github.com/BoltsFramework/Bolts-Swift" + title: "Parse Client in Ruby", + description: "An object-relational mapper and cloud code webhooks server.", + url: "https://github.com/modernistik/parse-stack" },{ - title: "Parse Client in Go", - description: "Parse API Client Library written in Go.", - url: "https://github.com/kylemcc/parse" + title: "Parse Cloud Class", + description: "Extendable way to set up Parse Cloud classes behaviour.", + url: "https://github.com/owsas/parse-cloud-class" },{ - title: "Parse Ember Wrapper", - description: "Includes an adapter, serializer and a session service for auth.", - url: "https://github.com/GetBlimp/ember-parse" + title: "Parse Auditor", + description: "Add automated data auditing/versioning to classes.", + url: "https://github.com/Blackburn-Labs/parse-auditor" },{ title: "Parse Python Wrapper", - description: "A Python wrapper for the Parse.com API.", + description: "A Python wrapper for the Parse Server API.", url: "https://github.com/dgrtwo/ParsePy" },{ - title: "Parse Client in Ruby", - description: "An object-relational mapper and cloud code webhooks server.", - url: "https://github.com/modernistik/parse-stack" - },{ - title: "Parse SDK for Flutter", - description: "A Parse SDK for Flutter in development.", - url: "https://github.com/phillwiggins/FlutterParseSDK" - },{ - title: "Parse Dashboard for iOS", + title: "Parse Dashboard for iOS", description: "A beautiful iOS client for managing your Parse apps.", url: "https://github.com/nathantannar4/Parse-Dashboard-for-iOS" },{ @@ -491,13 +469,13 @@ $(document).ready(function(){ description: "DynamoDB Adapter for Parse Server.", url: "https://github.com/benishak/parse-server-dynamodb-adapter" },{ - title: "Parse Cloud Class", - description: "Extendable way to set up Parse Cloud classes behaviour.", - url: "https://github.com/owsas/parse-cloud-class" + title: "Parse Ember Wrapper", + description: "Includes an adapter, serializer and a session service for auth.", + url: "https://github.com/GetBlimp/ember-parse" },{ - title: "Parse Auditor", - description: "Add automated data auditing/versioning to classes.", - url: "https://github.com/Blackburn-Labs/parse-auditor" + title: "Parse Client in Go", + description: "Parse API Client Library written in Go.", + url: "https://github.com/kylemcc/parse" }]; for (var i = 0; i < communityRepos.length; i++) { diff --git a/js/min/main-min.js b/js/min/main-min.js deleted file mode 100644 index 56572ae..0000000 --- a/js/min/main-min.js +++ /dev/null @@ -1 +0,0 @@ -Parse.initialize("vc59bNX5cbtFv4Upaz4y31IJ6zOH5uKqJbRqoSgy","jbMROx6VuQ6wVWRur29gYcQ7o3ucD4VYdh7DoFHj"),$(document).ready(function(){"use strict";function e(e,t,o,a,n,i,s){e.append("

"+o+"

"+a+"

"+s+"
"+i+""+n+"")}function t(){function e(){var e=1;k>=1480?(e=.75,$(".wheelsContainer, .hoist, .hoistParts").velocity({scale:[e,e]},{queue:!1,duration:0})):$(".wheelsContainer, .hoist, .hoistParts").velocity({scale:[e,e]},{queue:!1,duration:0})}$(".craneLine").velocity({translateY:[0,"-25%"]},{queue:!1,duration:600,easing:[.4,0,.2,1],complete:function(){$(".craneLine").velocity({translateX:["13%",0],translateY:["-14.8%",0]},{queue:!1,duration:600,delay:200,easing:[.4,0,.2,1]}),$(".cranePivot").velocity({translateX:["13%",0]},{queue:!1,duration:600,delay:200,easing:[.4,0,.2,1]}),$(".craneVideo").velocity({translateY:["-14.8%",0],translateX:["13.4%",0]},{queue:!1,duration:600,delay:200,easing:[.4,0,.2,1],complete:function(){$(".craneLine").velocity({translateY:["-30%","-14.8%"]},{queue:!1,duration:800,easing:[.4,0,.2,1]});for(var e=$(".appRect"),t=$(".appSquare"),o=0;o=0&&R>=e&&k>960&&($(".heroText").css({transform:"translateY(-"+e/1.6+"px)",opacity:1-e/t}),$(".skyline").css({transform:"translateY("+.135*e+"px)"}));var o=$(".secondaryNav");e>=$(".header").height()?o.addClass("shown"):o.removeClass("shown");for(var a=$("section"),n=0;ni-64&&i+s-64>e&&q===!1&&($(".secondaryNav ul a").removeClass("active"),$(".secondaryNav ul a").eq(n).addClass("active"))}}function n(e,t,o){$("section.community").append("

"+e+"

"+t+"

")}var i=0,s=0,r=0;if("undefined"!=typeof gitJson)for(var d=0;d=0||c.indexOf("cli")>=0?c.includes("ios")===!0?($(".iosRepo .sdkRepoStar").text(g),$(".iosRepo .sdkRepoFork").text(v)):c.includes("android")===!0?($(".androidRepo .sdkRepoStar").text(g),$(".androidRepo .sdkRepoFork").text(v)):c.includes("javascript")===!0||c.includes("js")===!0?($(".javascriptRepo .sdkRepoStar").text(g),$(".javascriptRepo .sdkRepoFork").text(v)):c.includes("php")===!0?($(".phpRepo .sdkRepoStar").text(g),$(".phpRepo .sdkRepoFork").text(v)):c.includes("net")===!0?($(".xamarinRepo .sdkRepoStar").text(g),$(".xamarinRepo .sdkRepoFork").text(v),$(".unityRepo .sdkRepoStar").text(g),$(".unityRepo .sdkRepoFork").text(v)):c.includes("arduino")===!0?($(".arduinoRepo .sdkRepoStar").text(g),$(".arduinoRepo .sdkRepoFork").text(v)):c.includes("embedded")===!0?($(".embeddedRepo .sdkRepoStar").text(g),$(".embeddedRepo .sdkRepoFork").text(v)):c.includes("cli")===!0&&($(".cloudCodeRepo .sdkRepoStar").text(g),$(".cloudCodeRepo .sdkRepoFork").text(v)):p!==!1&&(c.includes("facebook")===!0||c.includes("twitter")===!0?e($("section.socialRepos table"),u,l,h,v,g,y):c.includes("tutorial")===!0||f.includes("tutorial")?e($("section.tutorials table"),u,l,h,v,g,y):c.includes("todo")===!0||c.includes("demo")===!0||c.includes("any")===!0||c.includes("store")===!0||c.includes("f8")===!0||c.includes("internetcar")===!0||f.includes("example")||f.includes("sample")?e($("section.sampleApps table"),u,l,h,v,g,y):e($("section.other table"),u,l,h,v,g,y))}$(".heroText .repoCount").text(r),$(".heroText .starCount").text(i),$(".heroText .forkCount").text(s),$(".expandableRepoLink").click(function(){var e=$(this);$(".expandableRepoLink").not(e).removeClass("expanded"),e.toggleClass("expanded")});var R=$(window).height(),k=$(window).width();$(window).resize(function(){R=$(window).height(),k=$(window).width()}),o(),$(window).load(function(){o(),t()}),$(window).resize(function(){o()});var w=0,x,q=!1;$(window).on("mousewheel",function(){a(),w=1,clearTimeout($.data(this,"timer")),$.data(this,"timer",setTimeout(function(){w=0},100))}).scroll(function(){return 1===w?!1:void a()}),$("a[href*=#]:not([href=#])").click(function(){var e=$(this),t=e.attr("href");location.pathname.replace(/^\//,"")===this.pathname.replace(/^\//,"")&&location.hostname===this.hostname&&$(t).velocity("scroll",{duration:600,easing:[.4,0,.2,1],begin:function(){$(".secondaryNav ul a").removeClass("active"),e.addClass("active"),q=!0},complete:function(){q=!1}})});var C=Parse.Object.extend("CommunityRepos"),b=new Parse.Query(C);b.ascending("repoName"),b.find({success:function(e){for(var t=0;td)&&(a=d,r(o,d)&&(a/=40)),r(o,d)&&(u/=40,f/=40,p/=40),u=Math[u>=1?"floor":"ceil"](u/a),f=Math[f>=1?"floor":"ceil"](f/a),p=Math[p>=1?"floor":"ceil"](p/a),c.settings.normalizeOffset&&this.getBoundingClientRect){var v=this.getBoundingClientRect();h=e.clientX-v.left,g=e.clientY-v.top}return e.deltaX=f,e.deltaY=p,e.deltaFactor=a,e.offsetX=h,e.offsetY=g,e.deltaMode=0,s.unshift(e,u,f,p),i&&clearTimeout(i),i=setTimeout(n,200),(t.event.dispatch||t.event.handle).apply(this,s)}}function n(){a=null}function r(t,e){return c.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}var i,a,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(t.event.fixHooks)for(var u=o.length;u;)t.event.fixHooks[o[--u]]=t.event.mouseHooks;var c=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=s.length;n;)this.addEventListener(s[--n],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",c.getLineHeight(this)),t.data(this,"mousewheel-page-height",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=s.length;n;)this.removeEventListener(s[--n],e,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var n=t(e),r=n["offsetParent"in t.fn?"offsetParent":"parent"]();return r.length||(r=t("body")),parseInt(r.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),/*! VelocityJS.org (1.1.0). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ -/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */ -!function(t){function e(t){var e=t.length,n=$.type(t);return"function"===n||$.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}if(!t.jQuery){var $=function(t,e){return new $.fn.init(t,e)};$.isWindow=function(t){return null!=t&&t==t.window},$.type=function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?r[a.call(t)]||"object":typeof t},$.isArray=Array.isArray||function(t){return"array"===$.type(t)},$.isPlainObject=function(t){var e;if(!t||"object"!==$.type(t)||t.nodeType||$.isWindow(t))return!1;try{if(t.constructor&&!i.call(t,"constructor")&&!i.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}for(e in t);return void 0===e||i.call(t,e)},$.each=function(t,n,r){var i,a=0,o=t.length,s=e(t);if(r){if(s)for(;o>a&&(i=n.apply(t[a],r),i!==!1);a++);else for(a in t)if(i=n.apply(t[a],r),i===!1)break}else if(s)for(;o>a&&(i=n.call(t[a],a,t[a]),i!==!1);a++);else for(a in t)if(i=n.call(t[a],a,t[a]),i===!1)break;return t},$.data=function(t,e,r){if(void 0===r){var i=t[$.expando],a=i&&n[i];if(void 0===e)return a;if(a&&e in a)return a[e]}else if(void 0!==e){var i=t[$.expando]||(t[$.expando]=++$.uuid);return n[i]=n[i]||{},n[i][e]=r,r}},$.removeData=function(t,e){var r=t[$.expando],i=r&&n[r];i&&$.each(e,function(t,e){delete i[e]})},$.extend=function(){var t,e,n,r,i,a,o=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof o&&(u=o,o=arguments[s]||{},s++),"object"!=typeof o&&"function"!==$.type(o)&&(o={}),s===l&&(o=this,s--);l>s;s++)if(null!=(i=arguments[s]))for(r in i)t=o[r],n=i[r],o!==n&&(u&&n&&($.isPlainObject(n)||(e=$.isArray(n)))?(e?(e=!1,a=t&&$.isArray(t)?t:[]):a=t&&$.isPlainObject(t)?t:{},o[r]=$.extend(u,a,n)):void 0!==n&&(o[r]=n));return o},$.queue=function(t,n,r){function i(t,n){var r=n||[];return null!=t&&(e(Object(t))?!function(t,e){for(var n=+e.length,r=0,i=t.length;n>r;)t[i++]=e[r++];if(n!==n)for(;void 0!==e[r];)t[i++]=e[r++];return t.length=i,t}(r,"string"==typeof t?[t]:t):[].push.call(r,t)),r}if(t){n=(n||"fx")+"queue";var a=$.data(t,n);return r?(!a||$.isArray(r)?a=$.data(t,n,i(r)):a.push(r),a):a||[]}},$.dequeue=function(t,e){$.each(t.nodeType?[t]:t,function(t,n){e=e||"fx";var r=$.queue(n,e),i=r.shift();"inprogress"===i&&(i=r.shift()),i&&("fx"===e&&r.unshift("inprogress"),i.call(n,function(){$.dequeue(n,e)}))})},$.fn=$.prototype={init:function(t){if(t.nodeType)return this[0]=t,this;throw new Error("Not a DOM node.")},offset:function(){var e=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:e.top+(t.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:e.left+(t.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function t(){for(var t=this.offsetParent||document;t&&"html"===!t.nodeType.toLowerCase&&"static"===t.style.position;)t=t.offsetParent;return t||document}var e=this[0],t=t.apply(e),n=this.offset(),r=/^(?:body|html)$/i.test(t.nodeName)?{top:0,left:0}:$(t).offset();return n.top-=parseFloat(e.style.marginTop)||0,n.left-=parseFloat(e.style.marginLeft)||0,t.style&&(r.top+=parseFloat(t.style.borderTopWidth)||0,r.left+=parseFloat(t.style.borderLeftWidth)||0),{top:n.top-r.top,left:n.left-r.left}}};var n={};$.expando="velocity"+(new Date).getTime(),$.uuid=0;for(var r={},i=r.hasOwnProperty,a=r.toString,o="Boolean Number String Function Array Date RegExp Object Error".split(" "),s=0;si;++i){var a=u(n,t,r);if(0===a)return n;var o=l(n,t,r)-e;n-=o/a}return n}function f(){for(var e=0;x>e;++e)C[e]=l(e*b,t,r)}function p(e,n,i){var a,o,s=0;do o=n+(i-n)/2,a=l(o,t,r)-e,a>0?i=o:n=o;while(Math.abs(a)>y&&++s=m?c(e,s):0==l?s:p(e,n,n+b)}function h(){k=!0,(t!=n||r!=i)&&f()}var g=4,m=.001,y=1e-7,v=10,x=11,b=1/(x-1),w="Float32Array"in e;if(4!==arguments.length)return!1;for(var S=0;4>S;++S)if("number"!=typeof arguments[S]||isNaN(arguments[S])||!isFinite(arguments[S]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var C=w?new Float32Array(x):new Array(x),k=!1,P=function(e){return k||h(),t===n&&r===i?e:0===e?0:1===e?1:l(d(e),n,i)};P.getControlPoints=function(){return[{x:t,y:n},{x:r,y:i}]};var T="generateBezier("+[t,n,r,i]+")";return P.toString=function(){return T},P}function u(t,e){var n=t;return h.isString(t)?v.Easings[t]||(n=!1):n=h.isArray(t)&&1===t.length?s.apply(null,t):h.isArray(t)&&2===t.length?x.apply(null,t.concat([e])):h.isArray(t)&&4===t.length?l.apply(null,t):!1,n===!1&&(n=v.Easings[v.defaults.easing]?v.defaults.easing:y),n}function c(t){if(t){var e=(new Date).getTime(),n=v.State.calls.length;n>1e4&&(v.State.calls=i(v.State.calls));for(var a=0;n>a;a++)if(v.State.calls[a]){var s=v.State.calls[a],l=s[0],u=s[2],p=s[3],d=!!p,g=null;p||(p=v.State.calls[a][3]=e-16);for(var m=Math.min((e-p)/u.duration,1),y=0,x=l.length;x>y;y++){var w=l[y],C=w.element;if(o(C)){var k=!1;if(u.display!==r&&null!==u.display&&"none"!==u.display){if("flex"===u.display){var P=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];$.each(P,function(t,e){b.setPropertyValue(C,"display",e)})}b.setPropertyValue(C,"display",u.display)}u.visibility!==r&&"hidden"!==u.visibility&&b.setPropertyValue(C,"visibility",u.visibility);for(var T in w)if("element"!==T){var V=w[T],A,F=h.isString(V.easing)?v.Easings[V.easing]:V.easing;if(1===m)A=V.endValue;else{var M=V.endValue-V.startValue;if(A=V.startValue+M*F(m,u,M),!d&&A===V.currentValue)continue}if(V.currentValue=A,"tween"===T)g=A;else{if(b.Hooks.registered[T]){var E=b.Hooks.getRoot(T),N=o(C).rootPropertyValueCache[E];N&&(V.rootPropertyValue=N)}var j=b.setPropertyValue(C,T,V.currentValue+(0===parseFloat(A)?"":V.unitType),V.rootPropertyValue,V.scrollData);b.Hooks.registered[T]&&(o(C).rootPropertyValueCache[E]=b.Normalizations.registered[E]?b.Normalizations.registered[E]("extract",null,j[1]):j[1]),"transform"===j[0]&&(k=!0)}}u.mobileHA&&o(C).transformCache.translate3d===r&&(o(C).transformCache.translate3d="(0px, 0px, 0px)",k=!0),k&&b.flushTransformCache(C)}}u.display!==r&&"none"!==u.display&&(v.State.calls[a][2].display=!1),u.visibility!==r&&"hidden"!==u.visibility&&(v.State.calls[a][2].visibility=!1),u.progress&&u.progress.call(s[1],s[1],m,Math.max(0,p+u.duration-e),p,g),1===m&&f(a)}}v.State.isTicking&&S(c)}function f(t,e){if(!v.State.calls[t])return!1;for(var n=v.State.calls[t][0],i=v.State.calls[t][1],a=v.State.calls[t][2],s=v.State.calls[t][4],l=!1,u=0,c=n.length;c>u;u++){var f=n[u].element;if(e||a.loop||("none"===a.display&&b.setPropertyValue(f,"display",a.display),"hidden"===a.visibility&&b.setPropertyValue(f,"visibility",a.visibility)),a.loop!==!0&&($.queue(f)[1]===r||!/\.velocityQueueEntryFlag/i.test($.queue(f)[1]))&&o(f)){o(f).isAnimating=!1,o(f).rootPropertyValueCache={};var p=!1;$.each(b.Lists.transforms3D,function(t,e){var n=/^scale/.test(e)?1:0,i=o(f).transformCache[e];o(f).transformCache[e]!==r&&new RegExp("^\\("+n+"[^.]").test(i)&&(p=!0,delete o(f).transformCache[e])}),a.mobileHA&&(p=!0,delete o(f).transformCache.translate3d),p&&b.flushTransformCache(f),b.Values.removeClass(f,"velocity-animating")}if(!e&&a.complete&&!a.loop&&u===c-1)try{a.complete.call(i,i)}catch(d){setTimeout(function(){throw d},1)}s&&a.loop!==!0&&s(i),o(f)&&a.loop===!0&&!e&&($.each(o(f).tweensContainer,function(t,e){/^rotate/.test(t)&&360===parseFloat(e.endValue)&&(e.endValue=0,e.startValue=360),/^backgroundPosition/.test(t)&&100===parseFloat(e.endValue)&&"%"===e.unitType&&(e.endValue=0,e.startValue=100)}),v(f,"reverse",{loop:!0,delay:a.delay})),a.queue!==!1&&$.dequeue(f,a.queue)}v.State.calls[t]=!1;for(var h=0,g=v.State.calls.length;g>h;h++)if(v.State.calls[h]!==!1){l=!0;break}l===!1&&(v.State.isTicking=!1,delete v.State.calls,v.State.calls=[])}var p=function(){if(n.documentMode)return n.documentMode;for(var t=7;t>4;t--){var e=n.createElement("div");if(e.innerHTML="",e.getElementsByTagName("span").length)return e=null,t}return r}(),d=function(){var t=0;return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||function(e){var n=(new Date).getTime(),r;return r=Math.max(0,16-(n-t)),t=n+r,setTimeout(function(){e(n+r)},r)}}(),h={isString:function(t){return"string"==typeof t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isFunction:function(t){return"[object Function]"===Object.prototype.toString.call(t)},isNode:function(t){return t&&t.nodeType},isNodeList:function(t){return"object"==typeof t&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&t.length!==r&&(0===t.length||"object"==typeof t[0]&&t[0].nodeType>0)},isWrapped:function(t){return t&&(t.jquery||e.Zepto&&e.Zepto.zepto.isZ(t))},isSVG:function(t){return e.SVGElement&&t instanceof e.SVGElement},isEmptyObject:function(t){for(var e in t)return!1;return!0}},$,g=!1;if(t.fn&&t.fn.jquery?($=t,g=!0):$=e.Velocity.Utilities,8>=p&&!g)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=p)return void(jQuery.fn.velocity=jQuery.fn.animate);var m=400,y="swing",v={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:e.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:n.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:$,Redirects:{},Easings:{},Promise:e.Promise,defaults:{queue:"",duration:m,easing:y,begin:r,complete:r,progress:r,display:r,visibility:r,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(t){$.data(t,"velocity",{isSVG:h.isSVG(t),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:2},debug:!1};e.pageYOffset!==r?(v.State.scrollAnchor=e,v.State.scrollPropertyLeft="pageXOffset",v.State.scrollPropertyTop="pageYOffset"):(v.State.scrollAnchor=n.documentElement||n.body.parentNode||n.body,v.State.scrollPropertyLeft="scrollLeft",v.State.scrollPropertyTop="scrollTop");var x=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,n,r){var i={x:e.x+r.dx*n,v:e.v+r.dv*n,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function n(n,r){var i={dx:n.v,dv:t(n)},a=e(n,.5*r,i),o=e(n,.5*r,a),s=e(n,r,o),l=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),u=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function r(t,e,i){var a={x:-1,v:0,tension:null,friction:null},o=[0],s=0,l=1e-4,u=.016,c,f,p;for(t=parseFloat(t)||500,e=parseFloat(e)||20,i=i||null,a.tension=t,a.friction=e,c=null!==i,c?(s=r(t,e),f=s/i*u):f=u;p=n(p||a,f),o.push(1+p.x),s+=16,Math.abs(p.x)>l&&Math.abs(p.v)>l;);return c?function(t){return o[t*(o.length-1)|0]}:s}}();v.Easings={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)}},$.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(t,e){v.Easings[e[0]]=l.apply(null,e[1])});var b=v.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var t=0;t=p)switch(t){case"name":return"filter";case"extract":var r=n.toString().match(/alpha\(opacity=(.*)\)/i);return n=r?r[1]/100:1;case"inject":return e.style.zoom=1,parseFloat(n)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(n),10)+")"}else switch(t){case"name":return"opacity";case"extract":return n;case"inject":return n}}},register:function(){9>=p||v.State.isGingerbread||(b.Lists.transformsBase=b.Lists.transformsBase.concat(b.Lists.transforms3D));for(var t=0;ti&&(i=1),a=!/(\d)$/i.test(i);break;case"skew":a=!/(deg|\d)$/i.test(i);break;case"rotate":a=!/(deg|\d)$/i.test(i)}return a||(o(n).transformCache[e]="("+i+")"),o(n).transformCache[e]}}}();for(var t=0;t=p||3!==a.split(" ").length||(a+=" 1"),a;case"inject":return 8>=p?4===i.split(" ").length&&(i=i.split(/\s+/).slice(0,3).join(" ")):3===i.split(" ").length&&(i+=" 1"),(8>=p?"rgb":"rgba")+"("+i.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})},SVGAttribute:function(t){var e="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(p||v.State.isAndroid&&!v.State.isChrome)&&(e+="|transform"),new RegExp("^("+e+")$","i").test(t)},prefixCheck:function(t){if(v.State.prefixMatches[t])return[v.State.prefixMatches[t],!0];for(var e=["","Webkit","Moz","ms","O"],n=0,r=e.length;r>n;n++){var i;if(i=0===n?t:e[n]+t.replace(/^\w/,function(t){return t.toUpperCase()}),h.isString(v.State.prefixElement.style[i]))return v.State.prefixMatches[t]=i,[i,!0]}return[t,!1]}},Values:{hexToRgb:function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r;return t=t.replace(e,function(t,e,n,r){return e+e+n+n+r+r}),r=n.exec(t),r?[parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16)]:[0,0,0]},isCSSNullValue:function(t){return 0==t||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(t)},getUnitType:function(t){return/^(rotate|skew)/i.test(t)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(t)?"":"px"},getDisplayType:function(t){var e=t&&t.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(e)?"inline":/^(li)$/i.test(e)?"list-item":/^(tr)$/i.test(e)?"table-row":/^(table)$/i.test(e)?"table":/^(tbody)$/i.test(e)?"table-row-group":"block"},addClass:function(t,e){t.classList?t.classList.add(e):t.className+=(t.className.length?" ":"")+e},removeClass:function(t,e){t.classList?t.classList.remove(e):t.className=t.className.toString().replace(new RegExp("(^|\\s)"+e.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(t,n,i,a){function s(t,n){function i(){u&&b.setPropertyValue(t,"display","none")}var l=0;if(8>=p)l=$.css(t,n);else{var u=!1;if(/^(width|height)$/.test(n)&&0===b.getPropertyValue(t,"display")&&(u=!0,b.setPropertyValue(t,"display",b.Values.getDisplayType(t))),!a){if("height"===n&&"border-box"!==b.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var c=t.offsetHeight-(parseFloat(b.getPropertyValue(t,"borderTopWidth"))||0)-(parseFloat(b.getPropertyValue(t,"borderBottomWidth"))||0)-(parseFloat(b.getPropertyValue(t,"paddingTop"))||0)-(parseFloat(b.getPropertyValue(t,"paddingBottom"))||0);return i(),c}if("width"===n&&"border-box"!==b.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var f=t.offsetWidth-(parseFloat(b.getPropertyValue(t,"borderLeftWidth"))||0)-(parseFloat(b.getPropertyValue(t,"borderRightWidth"))||0)-(parseFloat(b.getPropertyValue(t,"paddingLeft"))||0)-(parseFloat(b.getPropertyValue(t,"paddingRight"))||0);return i(),f}}var d;d=o(t)===r?e.getComputedStyle(t,null):o(t).computedStyle?o(t).computedStyle:o(t).computedStyle=e.getComputedStyle(t,null),"borderColor"===n&&(n="borderTopColor"),l=9===p&&"filter"===n?d.getPropertyValue(n):d[n],(""===l||null===l)&&(l=t.style[n]),i()}if("auto"===l&&/^(top|right|bottom|left)$/i.test(n)){var h=s(t,"position");("fixed"===h||"absolute"===h&&/top|left/i.test(n))&&(l=$(t).position()[n]+"px")}return l}var l;if(b.Hooks.registered[n]){var u=n,c=b.Hooks.getRoot(u);i===r&&(i=b.getPropertyValue(t,b.Names.prefixCheck(c)[0])),b.Normalizations.registered[c]&&(i=b.Normalizations.registered[c]("extract",t,i)),l=b.Hooks.extractValue(u,i)}else if(b.Normalizations.registered[n]){var f,d;f=b.Normalizations.registered[n]("name",t),"transform"!==f&&(d=s(t,b.Names.prefixCheck(f)[0]),b.Values.isCSSNullValue(d)&&b.Hooks.templates[n]&&(d=b.Hooks.templates[n][1])),l=b.Normalizations.registered[n]("extract",t,d)}if(!/^[\d-]/.test(l))if(o(t)&&o(t).isSVG&&b.Names.SVGAttribute(n))if(/^(height|width)$/i.test(n))try{l=t.getBBox()[n]}catch(h){l=0}else l=t.getAttribute(n);else l=s(t,b.Names.prefixCheck(n)[0]);return b.Values.isCSSNullValue(l)&&(l=0),v.debug>=2&&console.log("Get "+n+": "+l),l},setPropertyValue:function(t,n,r,i,a){var s=n;if("scroll"===n)a.container?a.container["scroll"+a.direction]=r:"Left"===a.direction?e.scrollTo(r,a.alternateValue):e.scrollTo(a.alternateValue,r);else if(b.Normalizations.registered[n]&&"transform"===b.Normalizations.registered[n]("name",t))b.Normalizations.registered[n]("inject",t,r),s="transform",r=o(t).transformCache[n];else{if(b.Hooks.registered[n]){var l=n,u=b.Hooks.getRoot(n);i=i||b.getPropertyValue(t,u),r=b.Hooks.injectValue(l,r,i),n=u}if(b.Normalizations.registered[n]&&(r=b.Normalizations.registered[n]("inject",t,r),n=b.Normalizations.registered[n]("name",t)),s=b.Names.prefixCheck(n)[0],8>=p)try{t.style[s]=r}catch(c){v.debug&&console.log("Browser does not support ["+r+"] for ["+s+"]")}else o(t)&&o(t).isSVG&&b.Names.SVGAttribute(n)?t.setAttribute(n,r):t.style[s]=r;v.debug>=2&&console.log("Set "+n+" ("+s+"): "+r)}return[s,r]},flushTransformCache:function(t){function e(e){return parseFloat(b.getPropertyValue(t,e))}var n="";if((p||v.State.isAndroid&&!v.State.isChrome)&&o(t).isSVG){var r={translate:[e("translateX"),e("translateY")],skewX:[e("skewX")],skewY:[e("skewY")],scale:1!==e("scale")?[e("scale"),e("scale")]:[e("scaleX"),e("scaleY")],rotate:[e("rotateZ"),0,0]};$.each(o(t).transformCache,function(t){/^translate/i.test(t)?t="translate":/^scale/i.test(t)?t="scale":/^rotate/i.test(t)&&(t="rotate"),r[t]&&(n+=t+"("+r[t].join(" ")+") ",delete r[t])})}else{var i,a;$.each(o(t).transformCache,function(e){return i=o(t).transformCache[e],"transformPerspective"===e?(a=i,!0):(9===p&&"rotateZ"===e&&(e="rotate"),void(n+=e+i+" "))}),a&&(n="perspective"+a+" "+n)}b.setPropertyValue(t,"transform",n)}};b.Hooks.register(),b.Normalizations.register(),v.hook=function(t,e,n){var i=r;return t=a(t),$.each(t,function(t,a){if(o(a)===r&&v.init(a),n===r)i===r&&(i=v.CSS.getPropertyValue(a,e));else{var s=v.CSS.setPropertyValue(a,e,n);"transform"===s[0]&&v.CSS.flushTransformCache(a),i=s}}),i};var w=function(){function t(){return l?T.promise||null:p}function i(){function t(t){function f(t,e){var n=r,o=r,s=r;return h.isArray(t)?(n=t[0],!h.isArray(t[1])&&/^[\d-]/.test(t[1])||h.isFunction(t[1])||b.RegEx.isHex.test(t[1])?s=t[1]:(h.isString(t[1])&&!b.RegEx.isHex.test(t[1])||h.isArray(t[1]))&&(o=e?t[1]:u(t[1],a.duration),t[2]!==r&&(s=t[2]))):n=t,e||(o=o||a.easing),h.isFunction(n)&&(n=n.call(i,C,S)),h.isFunction(s)&&(s=s.call(i,C,S)),[n||0,o,s]}function p(t,e){var n,r;return r=(e||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(t){return n=t,""}),n||(n=b.Values.getUnitType(t)),[r,n]}function d(){var t={myParent:i.parentNode||n.body,position:b.getPropertyValue(i,"position"),fontSize:b.getPropertyValue(i,"fontSize")},r=t.position===j.lastPosition&&t.myParent===j.lastParent,a=t.fontSize===j.lastFontSize;j.lastParent=t.myParent,j.lastPosition=t.position,j.lastFontSize=t.fontSize;var s=100,l={};if(a&&r)l.emToPx=j.lastEmToPx,l.percentToPxWidth=j.lastPercentToPxWidth,l.percentToPxHeight=j.lastPercentToPxHeight;else{var u=o(i).isSVG?n.createElementNS("http://www.w3.org/2000/svg","rect"):n.createElement("div");v.init(u),t.myParent.appendChild(u),$.each(["overflow","overflowX","overflowY"],function(t,e){v.CSS.setPropertyValue(u,e,"hidden")}),v.CSS.setPropertyValue(u,"position",t.position),v.CSS.setPropertyValue(u,"fontSize",t.fontSize),v.CSS.setPropertyValue(u,"boxSizing","content-box"),$.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,e){v.CSS.setPropertyValue(u,e,s+"%")}),v.CSS.setPropertyValue(u,"paddingLeft",s+"em"),l.percentToPxWidth=j.lastPercentToPxWidth=(parseFloat(b.getPropertyValue(u,"width",null,!0))||1)/s,l.percentToPxHeight=j.lastPercentToPxHeight=(parseFloat(b.getPropertyValue(u,"height",null,!0))||1)/s,l.emToPx=j.lastEmToPx=(parseFloat(b.getPropertyValue(u,"paddingLeft"))||1)/s,t.myParent.removeChild(u)}return null===j.remToPx&&(j.remToPx=parseFloat(b.getPropertyValue(n.body,"fontSize"))||16),null===j.vwToPx&&(j.vwToPx=parseFloat(e.innerWidth)/100,j.vhToPx=parseFloat(e.innerHeight)/100),l.remToPx=j.remToPx,l.vwToPx=j.vwToPx,l.vhToPx=j.vhToPx,v.debug>=1&&console.log("Unit ratios: "+JSON.stringify(l),i),l}if(a.begin&&0===C)try{a.begin.call(g,g)}catch(m){setTimeout(function(){throw m},1)}if("scroll"===V){var w=/^x$/i.test(a.axis)?"Left":"Top",k=parseFloat(a.offset)||0,P,A,F;a.container?h.isWrapped(a.container)||h.isNode(a.container)?(a.container=a.container[0]||a.container,P=a.container["scroll"+w],F=P+$(i).position()[w.toLowerCase()]+k):a.container=null:(P=v.State.scrollAnchor[v.State["scrollProperty"+w]],A=v.State.scrollAnchor[v.State["scrollProperty"+("Left"===w?"Top":"Left")]],F=$(i).offset()[w.toLowerCase()]+k),s={scroll:{rootPropertyValue:!1,startValue:P,currentValue:P,endValue:F,unitType:"",easing:a.easing,scrollData:{container:a.container,direction:w,alternateValue:A}},element:i},v.debug&&console.log("tweensContainer (scroll): ",s.scroll,i)}else if("reverse"===V){if(!o(i).tweensContainer)return void $.dequeue(i,a.queue);"none"===o(i).opts.display&&(o(i).opts.display="auto"),"hidden"===o(i).opts.visibility&&(o(i).opts.visibility="visible"),o(i).opts.loop=!1,o(i).opts.begin=null,o(i).opts.complete=null,x.easing||delete a.easing,x.duration||delete a.duration,a=$.extend({},o(i).opts,a);var M=$.extend(!0,{},o(i).tweensContainer);for(var E in M)if("element"!==E){var N=M[E].startValue;M[E].startValue=M[E].currentValue=M[E].endValue,M[E].endValue=N,h.isEmptyObject(x)||(M[E].easing=a.easing),v.debug&&console.log("reverse tweensContainer ("+E+"): "+JSON.stringify(M[E]),i)}s=M}else if("start"===V){var M;o(i).tweensContainer&&o(i).isAnimating===!0&&(M=o(i).tweensContainer),$.each(y,function(t,e){if(RegExp("^"+b.Lists.colors.join("$|^")+"$").test(t)){var n=f(e,!0),i=n[0],a=n[1],o=n[2];if(b.RegEx.isHex.test(i)){for(var s=["Red","Green","Blue"],l=b.Values.hexToRgb(i),u=o?b.Values.hexToRgb(o):r,c=0;cq;q++){var O={delay:F.delay,progress:F.progress};q===L-1&&(O.display=F.display,O.visibility=F.visibility,O.complete=F.complete),w(g,"reverse",O)}return t()}};v=$.extend(w,v),v.animate=w;var S=e.requestAnimationFrame||d;return v.State.isMobile||n.hidden===r||n.addEventListener("visibilitychange",function(){n.hidden?(S=function(t){return setTimeout(function(){t(!0)},16)},c()):S=e.requestAnimationFrame||d}),t.Velocity=v,t!==e&&(t.fn.velocity=w,t.fn.velocity.defaults=v.defaults),$.each(["Down","Up"],function(t,e){v.Redirects["slide"+e]=function(t,n,i,a,o,s){var l=$.extend({},n),u=l.begin,c=l.complete,f={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},p={};l.display===r&&(l.display="Down"===e?"inline"===v.CSS.Values.getDisplayType(t)?"inline-block":"block":"none"),l.begin=function(){u&&u.call(o,o);for(var n in f){p[n]=t.style[n];var r=v.CSS.getPropertyValue(t,n);f[n]="Down"===e?[r,0]:[0,r]}p.overflow=t.style.overflow,t.style.overflow="hidden"},l.complete=function(){for(var e in p)t.style[e]=p[e];c&&c.call(o,o),s&&s.resolver(o)},v(t,f,l)}}),$.each(["In","Out"],function(t,e){v.Redirects["fade"+e]=function(t,n,i,a,o,s){var l=$.extend({},n),u={opacity:"In"===e?1:0},c=l.complete;l.complete=i!==a-1?l.begin=null:function(){c&&c.call(o,o),s&&s.resolver(o)},l.display===r&&(l.display="In"===e?"auto":"none"),v(this,u,l)}}),v}(window.jQuery||window.Zepto||window,window,document)}),!function(t){var e,n,r="0.4.2",i="hasOwnProperty",a=/[\.\/]/,o=/\s*,\s*/,s="*",l=function(t,e){return t-e},u={n:{}},c=function(){for(var t=0,e=this.length;e>t;t++)if("undefined"!=typeof this[t])return this[t]},f=function(){for(var t=this.length;--t;)if("undefined"!=typeof this[t])return this[t]},p=function(t,r){t=String(t);var i,a=n,o=Array.prototype.slice.call(arguments,2),s=p.listeners(t),u=0,d=[],h={},g=[],m=e;g.firstDefined=c,g.lastDefined=f,e=t,n=0;for(var y=0,v=s.length;v>y;y++)"zIndex"in s[y]&&(d.push(s[y].zIndex),s[y].zIndex<0&&(h[s[y].zIndex]=s[y]));for(d.sort(l);d[u]<0;)if(i=h[d[u++]],g.push(i.apply(r,o)),n)return n=a,g;for(y=0;v>y;y++)if(i=s[y],"zIndex"in i)if(i.zIndex==d[u]){if(g.push(i.apply(r,o)),n)break;do if(u++,i=h[d[u]],i&&g.push(i.apply(r,o)),n)break;while(i)}else h[i.zIndex]=i;else if(g.push(i.apply(r,o)),n)break;return n=a,e=m,g};p._events=u,p.listeners=function(t){var e,n,r,i,o,l,c,f,p=t.split(a),d=u,h=[d],g=[];for(i=0,o=p.length;o>i;i++){for(f=[],l=0,c=h.length;c>l;l++)for(d=h[l].n,n=[d[p[i]],d[s]],r=2;r--;)e=n[r],e&&(f.push(e),g=g.concat(e.f||[]));h=f}return g},p.on=function(t,e){if(t=String(t),"function"!=typeof e)return function(){};for(var n=t.split(o),r=0,i=n.length;i>r;r++)!function(t){for(var n,r=t.split(a),i=u,o=0,s=r.length;s>o;o++)i=i.n,i=i.hasOwnProperty(r[o])&&i[r[o]]||(i[r[o]]={n:{}});for(i.f=i.f||[],o=0,s=i.f.length;s>o;o++)if(i.f[o]==e){n=!0;break}!n&&i.f.push(e)}(n[r]);return function(t){+t==+t&&(e.zIndex=+t)}},p.f=function(t){var e=[].slice.call(arguments,1);return function(){p.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},p.stop=function(){n=1},p.nt=function(t){return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},p.nts=function(){return e.split(a)},p.off=p.unbind=function(t,e){if(!t)return void(p._events=u={n:{}});var n=t.split(o);if(n.length>1)for(var r=0,l=n.length;l>r;r++)p.off(n[r],e);else{n=t.split(a);var c,f,d,r,l,h,g,m=[u];for(r=0,l=n.length;l>r;r++)for(h=0;hr;r++)for(c=m[r];c.n;){if(e){if(c.f){for(h=0,g=c.f.length;g>h;h++)if(c.f[h]==e){c.f.splice(h,1);break}!c.f.length&&delete c.f}for(f in c.n)if(c.n[i](f)&&c.n[f].f){var y=c.n[f].f;for(h=0,g=y.length;g>h;h++)if(y[h]==e){y.splice(h,1);break}!y.length&&delete c.n[f].f}}else{delete c.f;for(f in c.n)c.n[i](f)&&c.n[f].f&&delete c.n[f].f}c=c.n}}},p.once=function(t,e){var n=function(){return p.unbind(t,n),e.apply(this,arguments)};return p.on(t,n)},p.version=r,p.toString=function(){return"You are running Eve "+r},"undefined"!=typeof module&&module.exports?module.exports=p:"function"==typeof define&&define.amd?define("eve",[],function(){return p}):t.eve=p}(this),function(t,e){"function"==typeof define&&define.amd?define(["eve"],function(n){return e(t,n)}):e(t,t.eve)}(this,function(t,e){var n=function(e){var n={},r=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(t){setTimeout(t,16)},i=Array.isArray||function(t){return t instanceof Array||"[object Array]"==Object.prototype.toString.call(t)},a=0,o="M"+(+new Date).toString(36),s=function(){return o+(a++).toString(36)},l=Date.now||function(){return+new Date},u=function(t){var e=this;if(null==t)return e.s;var n=e.s-t;e.b+=e.dur*n,e.B+=e.dur*n,e.s=t},c=function(t){var e=this;return null==t?e.spd:void(e.spd=t)},f=function(t){var e=this;return null==t?e.dur:(e.s=e.s*t/e.dur,void(e.dur=t))},p=function(){var t=this;delete n[t.id],t.update(),e("mina.stop."+t.id,t)},d=function(){var t=this;t.pdif||(delete n[t.id],t.update(),t.pdif=t.get()-t.b)},h=function(){var t=this;t.pdif&&(t.b=t.get()-t.pdif,delete t.pdif,n[t.id]=t)},g=function(){var t,e=this;if(i(e.start)){t=[];for(var n=0,r=e.start.length;r>n;n++)t[n]=+e.start[n]+(e.end[n]-e.start[n])*e.easing(e.s)}else t=+e.start+(e.end-e.start)*e.easing(e.s);e.set(t)},m=function(){var t=0;for(var i in n)if(n.hasOwnProperty(i)){var a=n[i],o=a.get();t++,a.s=(o-a.b)/(a.dur/a.spd),a.s>=1&&(delete n[i],a.s=1,t--,function(t){setTimeout(function(){e("mina.finish."+t.id,t)})}(a)),a.update()}t&&r(m)},y=function(t,e,i,a,o,l,v){var x={id:s(),start:t,end:e,b:i,s:0,dur:a-i,spd:1,get:o,set:l,easing:v||y.linear,status:u,speed:c,duration:f,stop:p,pause:d,resume:h,update:g};n[x.id]=x;var b,w=0;for(b in n)if(n.hasOwnProperty(b)&&(w++,2==w))break;return 1==w&&r(m),x};return y.time=l,y.getById=function(t){return n[t]||null},y.linear=function(t){return t},y.easeout=function(t){return Math.pow(t,1.7)},y.easein=function(t){return Math.pow(t,.48)},y.easeinout=function(t){if(1==t)return 1;if(0==t)return 0;var e=.48-t/1.04,n=Math.sqrt(.1734+e*e),r=n-e,i=Math.pow(Math.abs(r),1/3)*(0>r?-1:1),a=-n-e,o=Math.pow(Math.abs(a),1/3)*(0>a?-1:1),s=i+o+.5;return 3*(1-s)*s*s+s*s*s},y.backin=function(t){if(1==t)return 1;var e=1.70158;return t*t*((e+1)*t-e)},y.backout=function(t){if(0==t)return 0;t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},y.elastic=function(t){return t==!!t?t:Math.pow(2,-10*t)*Math.sin(2*(t-.075)*Math.PI/.3)+1},y.bounce=function(t){var e,n=7.5625,r=2.75;return 1/r>t?e=n*t*t:2/r>t?(t-=1.5/r,e=n*t*t+.75):2.5/r>t?(t-=2.25/r,e=n*t*t+.9375):(t-=2.625/r,e=n*t*t+.984375),e},t.mina=y,y}("undefined"==typeof e?function(){}:e),r=function(){function r(t,e){if(t){if(t.tagName)return k(t);if(a(t,"array")&&r.set)return r.set.apply(r,t);if(t instanceof b)return t;if(null==e)return t=P.doc.querySelector(t),k(t)}return t=null==t?"100%":t,e=null==e?"100%":e,new C(t,e)}function i(t,e){if(e){if("#text"==t&&(t=P.doc.createTextNode(e.text||"")),"string"==typeof t&&(t=i(t)),"string"==typeof e)return"xlink:"==e.substring(0,6)?t.getAttributeNS(W,e.substring(6)):"xml:"==e.substring(0,4)?t.getAttributeNS(Q,e.substring(4)):t.getAttribute(e);for(var n in e)if(e[T](n)){var r=V(e[n]);r?"xlink:"==n.substring(0,6)?t.setAttributeNS(W,n.substring(6),r):"xml:"==n.substring(0,4)?t.setAttributeNS(Q,n.substring(4),r):t.setAttribute(n,r):t.removeAttribute(n)}}else t=P.doc.createElementNS(Q,t);return t}function a(t,e){return e=V.prototype.toLowerCase.call(e),"finite"==e?isFinite(t):"array"==e&&(t instanceof Array||Array.isArray&&Array.isArray(t))?!0:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||O.call(t).slice(8,-1).toLowerCase()==e}function o(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var n in t)t[T](n)&&(e[n]=o(t[n]));return e}function s(t,e){for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return t.push(t.splice(n,1)[0])}function l(t,e,n){function r(){var i=Array.prototype.slice.call(arguments,0),a=i.join("␀"),o=r.cache=r.cache||{},l=r.count=r.count||[];return o[T](a)?(s(l,a),n?n(o[a]):o[a]):(l.length>=1e3&&delete o[l.shift()],l.push(a),o[a]=t.apply(e,i),n?n(o[a]):o[a])}return r}function u(t,e,n,r,i,a){if(null==i){var o=t-n,s=e-r;return o||s?(180+180*M.atan2(-s,-o)/B+360)%360:0}return u(t,e,i,a)-u(n,r,i,a)}function c(t){return t%360*B/180}function f(t){return 180*t/B%360}function p(t){var e=[];return t=t.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,function(t,n,r){return r=r.split(/\s*,\s*|\s+/),"rotate"==n&&1==r.length&&r.push(0,0),"scale"==n&&(r.length>2?r=r.slice(0,2):2==r.length&&r.push(0,0),1==r.length&&r.push(r[0],0,0)),e.push("skewX"==n?["m",1,0,M.tan(c(r[0])),1,0,0]:"skewY"==n?["m",1,M.tan(c(r[0])),0,1,0,0]:[n.charAt(0)].concat(r)),t}),e}function d(t,e){var n=it(t),i=new r.Matrix;if(n)for(var a=0,o=n.length;o>a;a++){var s,l,u,c,f,p=n[a],d=p.length,h=V(p[0]).toLowerCase(),g=p[0]!=h,m=g?i.invert():0;"t"==h&&2==d?i.translate(p[1],0):"t"==h&&3==d?g?(s=m.x(0,0),l=m.y(0,0),u=m.x(p[1],p[2]),c=m.y(p[1],p[2]),i.translate(u-s,c-l)):i.translate(p[1],p[2]):"r"==h?2==d?(f=f||e,i.rotate(p[1],f.x+f.width/2,f.y+f.height/2)):4==d&&(g?(u=m.x(p[2],p[3]),c=m.y(p[2],p[3]),i.rotate(p[1],u,c)):i.rotate(p[1],p[2],p[3])):"s"==h?2==d||3==d?(f=f||e,i.scale(p[1],p[d-1],f.x+f.width/2,f.y+f.height/2)):4==d?g?(u=m.x(p[2],p[3]),c=m.y(p[2],p[3]),i.scale(p[1],p[1],u,c)):i.scale(p[1],p[1],p[2],p[3]):5==d&&(g?(u=m.x(p[3],p[4]),c=m.y(p[3],p[4]),i.scale(p[1],p[2],u,c)):i.scale(p[1],p[2],p[3],p[4])):"m"==h&&7==d&&i.add(p[1],p[2],p[3],p[4],p[5],p[6])}return i}function h(t,e){if(null==e){var n=!0;if(e=t.node.getAttribute("linearGradient"==t.type||"radialGradient"==t.type?"gradientTransform":"pattern"==t.type?"patternTransform":"transform"),!e)return new r.Matrix;e=p(e)}else e=r._.rgTransform.test(e)?V(e).replace(/\.{3}|\u2026/g,t._.transform||L):p(e),a(e,"array")&&(e=r.path?r.path.toString.call(e):V(e)),t._.transform=e;var i=d(e,t.getBBox(1));return n?i:void(t.matrix=i)}function m(t){var e=t.node.ownerSVGElement&&k(t.node.ownerSVGElement)||t.node.parentNode&&k(t.node.parentNode)||r.select("svg")||r(0,0),n=e.select("defs"),i=null==n?!1:n.node;return i||(i=S("defs",e.node).node),i}function y(t){return t.node.ownerSVGElement&&k(t.node.ownerSVGElement)||r.select("svg")}function v(t,e,n){function r(t){if(null==t)return L;if(t==+t)return t;i(u,{width:t});try{return u.getBBox().width}catch(e){return 0}}function a(t){if(null==t)return L;if(t==+t)return t;i(u,{height:t});try{return u.getBBox().height}catch(e){return 0}}function o(r,i){null==e?l[r]=i(t.attr(r)||0):r==e&&(l=i(null==n?t.attr(r)||0:n))}var s=y(t).node,l={},u=s.querySelector(".svg---mgr");switch(u||(u=i("rect"),i(u,{x:-9e9,y:-9e9,width:10,height:10,"class":"svg---mgr",fill:"none"}),s.appendChild(u)),t.type){case"rect":o("rx",r),o("ry",a);case"image":o("width",r),o("height",a);case"text":o("x",r),o("y",a);break;case"circle":o("cx",r),o("cy",a),o("r",r);break;case"ellipse":o("cx",r),o("cy",a),o("rx",r),o("ry",a);break;case"line":o("x1",r),o("x2",r),o("y1",a),o("y2",a);break;case"marker":o("refX",r),o("markerWidth",r),o("refY",a),o("markerHeight",a);break;case"radialGradient":o("fx",r),o("fy",a);break;case"tspan":o("dx",r),o("dy",a);break;default:o(e,r)}return s.removeChild(u),l}function x(t){a(t,"array")||(t=Array.prototype.slice.call(arguments,0));for(var e=0,n=0,r=this.node;this[e];)delete this[e++];for(e=0;ei)return e-i;if(i>t-n)return e-i+t}return e},r.getRGB=l(function(t){if(!t||(t=V(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:et};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:et};if(!(H[T](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=$(t)),!t)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:et};var e,n,i,o,s,l,u=t.match(R);return u?(u[2]&&(i=F(u[2].substring(5),16),n=F(u[2].substring(3,5),16),e=F(u[2].substring(1,3),16)),u[3]&&(i=F((s=u[3].charAt(3))+s,16),n=F((s=u[3].charAt(2))+s,16),e=F((s=u[3].charAt(1))+s,16)),u[4]&&(l=u[4].split(_),e=A(l[0]),"%"==l[0].slice(-1)&&(e*=2.55),n=A(l[1]),"%"==l[1].slice(-1)&&(n*=2.55),i=A(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),"rgba"==u[1].toLowerCase().slice(0,4)&&(o=A(l[3])),l[3]&&"%"==l[3].slice(-1)&&(o/=100)),u[5]?(l=u[5].split(_),e=A(l[0]),"%"==l[0].slice(-1)&&(e/=100),n=A(l[1]),"%"==l[1].slice(-1)&&(n/=100),i=A(l[2]),"%"==l[2].slice(-1)&&(i/=100),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(e/=360),"hsba"==u[1].toLowerCase().slice(0,4)&&(o=A(l[3])),l[3]&&"%"==l[3].slice(-1)&&(o/=100),r.hsb2rgb(e,n,i,o)):u[6]?(l=u[6].split(_),e=A(l[0]),"%"==l[0].slice(-1)&&(e/=100),n=A(l[1]),"%"==l[1].slice(-1)&&(n/=100),i=A(l[2]),"%"==l[2].slice(-1)&&(i/=100),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(e/=360),"hsla"==u[1].toLowerCase().slice(0,4)&&(o=A(l[3])),l[3]&&"%"==l[3].slice(-1)&&(o/=100),r.hsl2rgb(e,n,i,o)):(e=N(M.round(e),255),n=N(M.round(n),255),i=N(M.round(i),255),o=N(E(o,0),1),u={r:e,g:n,b:i,toString:et},u.hex="#"+(16777216|i|n<<8|e<<16).toString(16).slice(1),u.opacity=a(o,"finite")?o:1,u)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:et}},r),r.hsb=l(function(t,e,n){return r.hsb2rgb(t,e,n).hex}),r.hsl=l(function(t,e,n){return r.hsl2rgb(t,e,n).hex}),r.rgb=l(function(t,e,n,r){if(a(r,"finite")){var i=M.round;return"rgba("+[i(t),i(e),i(n),+r.toFixed(2)]+")"}return"#"+(16777216|n|e<<8|t<<16).toString(16).slice(1)});var $=function(t){var e=P.doc.getElementsByTagName("head")[0]||P.doc.getElementsByTagName("svg")[0],n="rgb(255, 0, 0)";return($=l(function(t){if("red"==t.toLowerCase())return n;e.style.color=n,e.style.color=t;var r=P.doc.defaultView.getComputedStyle(e,L).getPropertyValue("color");return r==n?null:r}))(t)},K=function(){return"hsb("+[this.h,this.s,this.b]+")"},tt=function(){return"hsl("+[this.h,this.s,this.l]+")"},et=function(){return 1==this.opacity||null==this.opacity?this.hex:"rgba("+[this.r,this.g,this.b,this.opacity]+")"},nt=function(t,e,n){if(null==e&&a(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,e=t.g,t=t.r),null==e&&a(t,string)){var i=r.getRGB(t);t=i.r,e=i.g,n=i.b}return(t>1||e>1||n>1)&&(t/=255,e/=255,n/=255),[t,e,n]},rt=function(t,e,n,i){t=M.round(255*t),e=M.round(255*e),n=M.round(255*n);var o={r:t,g:e,b:n,opacity:a(i,"finite")?i:1,hex:r.rgb(t,e,n),toString:et};return a(i,"finite")&&(o.opacity=i),o};r.color=function(t){var e;return a(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=r.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):a(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=r.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.opacity=1,t.hex=e.hex):(a(t,"string")&&(t=r.getRGB(t)),a(t,"object")&&"r"in t&&"g"in t&&"b"in t&&!("error"in t)?(e=r.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=r.rgb2hsb(t),t.v=e.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1,t.error=1)),t.toString=et,t},r.hsb2rgb=function(t,e,n,r){a(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,t=t.h,r=t.o),t*=360;var i,o,s,l,u;return t=t%360/60,u=n*e,l=u*(1-j(t%2-1)),i=o=s=n-u,t=~~t,i+=[u,l,0,0,l,u][t],o+=[l,u,u,l,0,0][t],s+=[0,0,l,u,u,l][t],rt(i,o,s,r)},r.hsl2rgb=function(t,e,n,r){a(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var i,o,s,l,u;return t=t%360/60,u=2*e*(.5>n?n:1-n),l=u*(1-j(t%2-1)),i=o=s=n-u/2,t=~~t,i+=[u,l,0,0,l,u][t],o+=[l,u,u,l,0,0][t],s+=[0,0,l,u,u,l][t],rt(i,o,s,r)},r.rgb2hsb=function(t,e,n){n=nt(t,e,n),t=n[0],e=n[1],n=n[2];var r,i,a,o;return a=E(t,e,n),o=a-N(t,e,n),r=0==o?null:a==t?(e-n)/o:a==e?(n-t)/o+2:(t-e)/o+4,r=(r+360)%6*60/360,i=0==o?0:o/a,{h:r,s:i,b:a,toString:K}},r.rgb2hsl=function(t,e,n){n=nt(t,e,n),t=n[0],e=n[1],n=n[2];var r,i,a,o,s,l;return o=E(t,e,n),s=N(t,e,n),l=o-s,r=0==l?null:o==t?(e-n)/l:o==e?(n-t)/l+2:(t-e)/l+4,r=(r+360)%6*60/360,a=(o+s)/2,i=0==l?0:.5>a?l/(2*a):l/(2-2*a),{h:r,s:i,l:a,toString:tt}},r.parsePathString=function(t){if(!t)return null;var e=r.path(t);if(e.arr)return r.path.clone(e.arr);var n={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},i=[];return a(t,"array")&&a(t[0],"array")&&(i=r.path.clone(t)),i.length||V(t).replace(D,function(t,e,r){var a=[],o=e.toLowerCase();if(r.replace(I,function(t,e){e&&a.push(+e)}),"m"==o&&a.length>2&&(i.push([e].concat(a.splice(0,2))),o="l",e="m"==e?"l":"L"),"o"==o&&1==a.length&&i.push([e,a[0]]),"r"==o)i.push([e].concat(a));else for(;a.length>=n[o]&&(i.push([e].concat(a.splice(0,n[o]))),n[o]););}),i.toString=r.path.toString,e.arr=r.path.clone(i),i};var it=r.parseTransformString=function(t){if(!t)return null;var e=[];return a(t,"array")&&a(t[0],"array")&&(e=r.path.clone(t)),e.length||V(t).replace(G,function(t,n,r){var i=[];n.toLowerCase(),r.replace(I,function(t,e){e&&i.push(+e)}),e.push([n].concat(i))}),e.toString=r.path.toString,e};r._.svgTransform2string=p,r._.rgTransform=new RegExp("^[a-z]["+z+"]*-?\\.?\\d","i"),r._.transform2matrix=d,r._unit2px=v,P.doc.contains||P.doc.compareDocumentPosition?function(t,e){var n=9==t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t==r||!(!r||1!=r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e;)if(e=e.parentNode,e==t)return!0;return!1},r._.getSomeDefs=m,r._.getSomeSVG=y,r.select=function(t){return k(P.doc.querySelector(t))},r.selectAll=function(t){for(var e=P.doc.querySelectorAll(t),n=(r.set||Array)(),i=0;iu;u++){r=a[u],e(r,"fill"),e(r,"stroke"),e(r,"filter"),e(r,"mask"),e(r,"clip-path"),n(r);var f=i(r.node,"id");f&&(i(r.node,{id:r.id}),s.push({old:f,id:r.id}))}for(u=0,c=s.length;c>u;u++){var p=l[s[u].old];if(p)for(var d=0,h=p.length;h>d;d++)p[d](s[u].id)}}function s(t,e,n){return function(r){var i=r.slice(t,e);return 1==i.length&&(i=i[0]),n?n(i):i}}function l(t){return function(){var e=t?"<"+this.type:"",n=this.node.attributes,r=this.node.childNodes;if(t)for(var i=0,a=n.length;a>i;i++)e+=" "+n[i].name+'="'+n[i].value.replace(/"/g,'\\"')+'"';if(r.length){for(t&&(e+=">"),i=0,a=r.length;a>i;i++)3==r[i].nodeType?e+=r[i].nodeValue:1==r[i].nodeType&&(e+=k(r[i]).toString());t&&(e+="")}else t&&(e+="/>");return e}}t.attr=function(t,n){var r=this;if(r.node,!t)return r;if(a(t,"string")){if(!(arguments.length>1))return e("snap.util.getattr."+t,r).firstDefined();var i={};i[t]=n,t=i}for(var o in t)t[T](o)&&e("snap.util.attr."+o,r,t[o]);return r},t.getBBox=function(t){if(!r.Matrix||!r.path)return this.node.getBBox();var e=this,n=new r.Matrix;if(e.removed)return r._.box();for(;"use"==e.type;)if(t||(n=n.add(e.transform().localMatrix.translate(e.attr("x")||0,e.attr("y")||0))),e.original)e=e.original;else{var i=e.attr("xlink:href");e=e.original=e.node.ownerDocument.getElementById(i.substring(i.indexOf("#")+1))}var a=e._,o=r.path.get[e.type]||r.path.get.deflt;try{return t?(a.bboxwt=o?r.path.getBBox(e.realPath=o(e)):r._.box(e.node.getBBox()),r._.box(a.bboxwt)):(e.realPath=o(e),e.matrix=e.transform().localMatrix,a.bbox=r.path.getBBox(r.path.map(e.realPath,n.add(e.matrix))),r._.box(a.bbox))}catch(s){return r._.box()}};var u=function(){return this.string};t.transform=function(t){var e=this._;if(null==t){for(var n,a=this,o=new r.Matrix(this.node.getCTM()),s=h(this),l=[s],c=new r.Matrix,f=s.toTransformString(),p=V(s)==V(this.matrix)?V(e.transform):f;"svg"!=a.type&&(a=a.parent());)l.push(h(a));for(n=l.length;n--;)c.add(l[n]);return{string:p,globalMatrix:o,totalMatrix:c,localMatrix:s,diffMatrix:o.clone().add(s.invert()),global:o.toTransformString(),total:c.toTransformString(),local:f,toString:u}}return t instanceof r.Matrix?this.matrix=t:h(this,t),this.node&&("linearGradient"==this.type||"radialGradient"==this.type?i(this.node,{gradientTransform:this.matrix}):"pattern"==this.type?i(this.node,{patternTransform:this.matrix}):i(this.node,{transform:this.matrix})),this},t.parent=function(){return k(this.node.parentNode)},t.append=t.add=function(t){if(t){if("set"==t.type){var e=this;return t.forEach(function(t){e.add(t)}),this}t=k(t),this.node.appendChild(t.node),t.paper=this.paper}return this},t.appendTo=function(t){return t&&(t=k(t),t.append(this)),this},t.prepend=function(t){if(t){if("set"==t.type){var e,n=this;return t.forEach(function(t){e?e.after(t):n.prepend(t),e=t}),this}t=k(t);var r=t.parent();this.node.insertBefore(t.node,this.node.firstChild),this.add&&this.add(),t.paper=this.paper,this.parent()&&this.parent().add(),r&&r.add()}return this},t.prependTo=function(t){return t=k(t),t.prepend(this),this},t.before=function(t){if("set"==t.type){var e=this;return t.forEach(function(t){var n=t.parent();e.node.parentNode.insertBefore(t.node,e.node),n&&n.add()}),this.parent().add(),this}t=k(t);var n=t.parent();return this.node.parentNode.insertBefore(t.node,this.node),this.parent()&&this.parent().add(),n&&n.add(),t.paper=this.paper,this},t.after=function(t){t=k(t);var e=t.parent();return this.node.nextSibling?this.node.parentNode.insertBefore(t.node,this.node.nextSibling):this.node.parentNode.appendChild(t.node),this.parent()&&this.parent().add(),e&&e.add(),t.paper=this.paper,this},t.insertBefore=function(t){t=k(t);var e=this.parent();return t.node.parentNode.insertBefore(this.node,t.node),this.paper=t.paper,e&&e.add(),t.parent()&&t.parent().add(),this},t.insertAfter=function(t){t=k(t);var e=this.parent();return t.node.parentNode.insertBefore(this.node,t.node.nextSibling),this.paper=t.paper,e&&e.add(),t.parent()&&t.parent().add(),this},t.remove=function(){var t=this.parent();return this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.paper,this.removed=!0,t&&t.add(),this},t.select=function(t){return k(this.node.querySelector(t))},t.selectAll=function(t){for(var e=this.node.querySelectorAll(t),n=(r.set||Array)(),i=0;ie;e++)t[e].stop();return this},t.animate=function(t,r,i,o){"function"!=typeof i||i.length||(o=i,i=n.linear),t instanceof f&&(o=t.callback,i=t.easing,r=i.dur,t=t.attr);var l,u,c,p,d=[],h=[],g={},m=this;for(var y in t)if(t[T](y)){m.equal?(p=m.equal(y,V(t[y])),l=p.from,u=p.to,c=p.f):(l=+m.attr(y),u=+t[y]);var v=a(l,"array")?l.length:1;g[y]=s(d.length,d.length+v,c),d=d.concat(l),h=h.concat(u)}var x=n.time(),b=n(d,h,x,x+r,n.time,function(t){var e={};for(var n in g)g[T](n)&&(e[n]=g[n](t));m.attr(e)},i);return m.anims[b.id]=b,b._attrs=t,b._callback=o,e("snap.animcreated."+m.id,b),e.once("mina.finish."+b.id,function(){delete m.anims[b.id],o&&o.call(m)}),e.once("mina.stop."+b.id,function(){delete m.anims[b.id]}),m};var p={};t.data=function(t,n){var i=p[this.id]=p[this.id]||{};if(0==arguments.length)return e("snap.data.get."+this.id,this,i,null),i;if(1==arguments.length){if(r.is(t,"object")){for(var a in t)t[T](a)&&this.data(a,t[a]);return this}return e("snap.data.get."+this.id,this,i[t],t),i[t]}return i[t]=n,e("snap.data.set."+this.id,this,n,t),this},t.removeData=function(t){return null==t?p[this.id]={}:p[this.id]&&delete p[this.id][t],this},t.outerSVG=t.toString=l(1),t.innerSVG=l()}(b.prototype),r.parse=function(t){var e=P.doc.createDocumentFragment(),n=!0,r=P.doc.createElement("div");if(t=V(t),t.match(/^\s*<\s*svg(?:\s|>)/)||(t=""+t+"",n=!1),r.innerHTML=t,t=r.getElementsByTagName("svg")[0])if(n)e=t;else for(;t.firstChild;)e.appendChild(t.firstChild);return r.innerHTML=L,new w(e)},w.prototype.select=b.prototype.select,w.prototype.selectAll=b.prototype.selectAll,r.fragment=function(){for(var t=Array.prototype.slice.call(arguments,0),e=P.doc.createDocumentFragment(),n=0,i=t.length;i>n;n++){var a=t[n];a.node&&a.node.nodeType&&e.appendChild(a.node),a.nodeType&&e.appendChild(a),"string"==typeof a&&e.appendChild(r.parse(a).node)}return new w(e)},r._.make=S,r._.wrap=k,C.prototype.el=function(t,e){var n=S(t,this.node);return e&&n.attr(e),n},e.on("snap.util.getattr",function(){var t=e.nt();t=t.substring(t.lastIndexOf(".")+1);var n=t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()});return at[T](n)?this.node.ownerDocument.defaultView.getComputedStyle(this.node,null).getPropertyValue(n):i(this.node,t)});var at={"alignment-baseline":0,"baseline-shift":0,clip:0,"clip-path":0,"clip-rule":0,color:0,"color-interpolation":0,"color-interpolation-filters":0,"color-profile":0,"color-rendering":0,cursor:0,direction:0,display:0,"dominant-baseline":0,"enable-background":0,fill:0,"fill-opacity":0,"fill-rule":0,filter:0,"flood-color":0,"flood-opacity":0,font:0,"font-family":0,"font-size":0,"font-size-adjust":0,"font-stretch":0,"font-style":0,"font-variant":0,"font-weight":0, -"glyph-orientation-horizontal":0,"glyph-orientation-vertical":0,"image-rendering":0,kerning:0,"letter-spacing":0,"lighting-color":0,marker:0,"marker-end":0,"marker-mid":0,"marker-start":0,mask:0,opacity:0,overflow:0,"pointer-events":0,"shape-rendering":0,"stop-color":0,"stop-opacity":0,stroke:0,"stroke-dasharray":0,"stroke-dashoffset":0,"stroke-linecap":0,"stroke-linejoin":0,"stroke-miterlimit":0,"stroke-opacity":0,"stroke-width":0,"text-anchor":0,"text-decoration":0,"text-rendering":0,"unicode-bidi":0,visibility:0,"word-spacing":0,"writing-mode":0};e.on("snap.util.attr",function(t){var n=e.nt(),r={};n=n.substring(n.lastIndexOf(".")+1),r[n]=t;var a=n.replace(/-(\w)/gi,function(t,e){return e.toUpperCase()}),o=n.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()});at[T](o)?this.node.style[a]=null==t?L:t:i(this.node,r)}),function(){}(C.prototype),r.ajax=function(t,n,r,i){var o=new XMLHttpRequest,s=Y();if(o){if(a(n,"function"))i=r,r=n,n=null;else if(a(n,"object")){var l=[];for(var u in n)n.hasOwnProperty(u)&&l.push(encodeURIComponent(u)+"="+encodeURIComponent(n[u]));n=l.join("&")}return o.open(n?"POST":"GET",t,!0),n&&(o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("Content-type","application/x-www-form-urlencoded")),r&&(e.once("snap.ajax."+s+".0",r),e.once("snap.ajax."+s+".200",r),e.once("snap.ajax."+s+".304",r)),o.onreadystatechange=function(){4==o.readyState&&e("snap.ajax."+s+"."+o.status,i,o)},4==o.readyState?o:(o.send(n),o)}},r.load=function(t,e,n){r.ajax(t,function(t){var i=r.parse(t.responseText);n?e.call(n,i):e(i)})};var ot=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,r=n.body,i=n.documentElement,a=i.clientTop||r.clientTop||0,o=i.clientLeft||r.clientLeft||0,s=e.top+(g.win.pageYOffset||i.scrollTop||r.scrollTop)-a,l=e.left+(g.win.pageXOffset||i.scrollLeft||r.scrollLeft)-o;return{y:s,x:l}};return r.getElementByPoint=function(t,e){var n=this,r=(n.canvas,P.doc.elementFromPoint(t,e));if(P.win.opera&&"svg"==r.tagName){var i=ot(r),a=r.createSVGRect();a.x=t-i.x,a.y=e-i.y,a.width=a.height=1;var o=r.getIntersectionList(a,null);o.length&&(r=o[o.length-1])}return r?k(r):null},r.plugin=function(t){t(r,b,C,P,w)},P.win.Snap=r,r}();return r.plugin(function(t){function e(t,e,r,i,a,o){return null==e&&"[object SVGMatrix]"==n.call(t)?(this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.e=t.e,void(this.f=t.f)):void(null!=t?(this.a=+t,this.b=+e,this.c=+r,this.d=+i,this.e=+a,this.f=+o):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0))}var n=Object.prototype.toString,r=String,i=Math,a="";!function(n){function o(t){return t[0]*t[0]+t[1]*t[1]}function s(t){var e=i.sqrt(o(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}n.add=function(t,n,r,i,a,o){var s,l,u,c,f=[[],[],[]],p=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],d=[[t,r,a],[n,i,o],[0,0,1]];for(t&&t instanceof e&&(d=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;3>s;s++)for(l=0;3>l;l++){for(c=0,u=0;3>u;u++)c+=p[s][u]*d[u][l];f[s][l]=c}return this.a=f[0][0],this.b=f[1][0],this.c=f[0][1],this.d=f[1][1],this.e=f[0][2],this.f=f[1][2],this},n.invert=function(){var t=this,n=t.a*t.d-t.b*t.c;return new e(t.d/n,-t.b/n,-t.c/n,t.a/n,(t.c*t.f-t.d*t.e)/n,(t.b*t.e-t.a*t.f)/n)},n.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},n.translate=function(t,e){return this.add(1,0,0,1,t,e)},n.scale=function(t,e,n,r){return null==e&&(e=t),(n||r)&&this.add(1,0,0,1,n,r),this.add(t,0,0,e,0,0),(n||r)&&this.add(1,0,0,1,-n,-r),this},n.rotate=function(e,n,r){e=t.rad(e),n=n||0,r=r||0;var a=+i.cos(e).toFixed(9),o=+i.sin(e).toFixed(9);return this.add(a,o,-o,a,n,r),this.add(1,0,0,1,-n,-r)},n.x=function(t,e){return t*this.a+e*this.c+this.e},n.y=function(t,e){return t*this.b+e*this.d+this.f},n.get=function(t){return+this[r.fromCharCode(97+t)].toFixed(4)},n.toString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"},n.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},n.determinant=function(){return this.a*this.d-this.b*this.c},n.split=function(){var e={};e.dx=this.e,e.dy=this.f;var n=[[this.a,this.c],[this.b,this.d]];e.scalex=i.sqrt(o(n[0])),s(n[0]),e.shear=n[0][0]*n[1][0]+n[0][1]*n[1][1],n[1]=[n[1][0]-n[0][0]*e.shear,n[1][1]-n[0][1]*e.shear],e.scaley=i.sqrt(o(n[1])),s(n[1]),e.shear/=e.scaley,this.determinant()<0&&(e.scalex=-e.scalex);var r=-n[0][1],a=n[1][1];return 0>a?(e.rotate=t.deg(i.acos(a)),0>r&&(e.rotate=360-e.rotate)):e.rotate=t.deg(i.asin(r)),e.isSimple=!(+e.shear.toFixed(9)||e.scalex.toFixed(9)!=e.scaley.toFixed(9)&&e.rotate),e.isSuperSimple=!+e.shear.toFixed(9)&&e.scalex.toFixed(9)==e.scaley.toFixed(9)&&!e.rotate,e.noRotation=!+e.shear.toFixed(9)&&!e.rotate,e},n.toTransformString=function(t){var e=t||this.split();return+e.shear.toFixed(9)?"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]:(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[+e.dx.toFixed(4),+e.dy.toFixed(4)]:a)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:a)+(e.rotate?"r"+[+e.rotate.toFixed(4),0,0]:a))}}(e.prototype),t.Matrix=e,t.matrix=function(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}}),r.plugin(function(t,n,r,i,a){function o(r){return function(i){if(e.stop(),i instanceof a&&1==i.node.childNodes.length&&("radialGradient"==i.node.firstChild.tagName||"linearGradient"==i.node.firstChild.tagName||"pattern"==i.node.firstChild.tagName)&&(i=i.node.firstChild,d(this).appendChild(i),i=f(i)),i instanceof n)if("radialGradient"==i.type||"linearGradient"==i.type||"pattern"==i.type){i.node.id||g(i.node,{id:i.id});var o=m(i.node.id)}else o=i.attr(r);else if(o=t.color(i),o.error){var s=t(d(this).ownerSVGElement).gradient(i);s?(s.node.id||g(s.node,{id:s.id}),o=m(s.node.id)):o=i}else o=y(o);var l={};l[r]=o,g(this.node,l),this.node.style[r]=x}}function s(t){e.stop(),t==+t&&(t+="px"),this.node.style.fontSize=t}function l(t){for(var e=[],n=t.childNodes,r=0,i=n.length;i>r;r++){var a=n[r];3==a.nodeType&&e.push(a.nodeValue),"tspan"==a.tagName&&e.push(1==a.childNodes.length&&3==a.firstChild.nodeType?a.firstChild.nodeValue:l(a))}return e}function u(){return e.stop(),this.node.style.fontSize}var c=t._.make,f=t._.wrap,p=t.is,d=t._.getSomeDefs,h=/^url\(#?([^)]+)\)$/,g=t._.$,m=t.url,y=String,v=t._.separator,x="";e.on("snap.util.attr.mask",function(t){if(t instanceof n||t instanceof a){if(e.stop(),t instanceof a&&1==t.node.childNodes.length&&(t=t.node.firstChild,d(this).appendChild(t),t=f(t)),"mask"==t.type)var r=t;else r=c("mask",d(this)),r.node.appendChild(t.node);!r.node.id&&g(r.node,{id:r.id}),g(this.node,{mask:m(r.id)})}}),function(t){e.on("snap.util.attr.clip",t),e.on("snap.util.attr.clip-path",t),e.on("snap.util.attr.clipPath",t)}(function(t){if(t instanceof n||t instanceof a){if(e.stop(),"clipPath"==t.type)var r=t;else r=c("clipPath",d(this)),r.node.appendChild(t.node),!r.node.id&&g(r.node,{id:r.id});g(this.node,{"clip-path":m(r.id)})}}),e.on("snap.util.attr.fill",o("fill")),e.on("snap.util.attr.stroke",o("stroke"));var b=/^([lr])(?:\(([^)]*)\))?(.*)$/i;e.on("snap.util.grad.parse",function(t){t=y(t);var e=t.match(b);if(!e)return null;var n=e[1],r=e[2],i=e[3];return r=r.split(/\s*,\s*/).map(function(t){return+t==t?+t:t}),1==r.length&&0==r[0]&&(r=[]),i=i.split("-"),i=i.map(function(t){t=t.split(":");var e={color:t[0]};return t[1]&&(e.offset=parseFloat(t[1])),e}),{type:n,params:r,stops:i}}),e.on("snap.util.attr.d",function(n){e.stop(),p(n,"array")&&p(n[0],"array")&&(n=t.path.toString.call(n)),n=y(n),n.match(/[ruo]/i)&&(n=t.path.toAbsolute(n)),g(this.node,{d:n})})(-1),e.on("snap.util.attr.#text",function(t){e.stop(),t=y(t);for(var n=i.doc.createTextNode(t);this.node.firstChild;)this.node.removeChild(this.node.firstChild);this.node.appendChild(n)})(-1),e.on("snap.util.attr.path",function(t){e.stop(),this.attr({d:t})})(-1),e.on("snap.util.attr.class",function(t){e.stop(),this.node.className.baseVal=t})(-1),e.on("snap.util.attr.viewBox",function(t){var n;n=p(t,"object")&&"x"in t?[t.x,t.y,t.width,t.height].join(" "):p(t,"array")?t.join(" "):t,g(this.node,{viewBox:n}),e.stop()})(-1),e.on("snap.util.attr.transform",function(t){this.transform(t),e.stop()})(-1),e.on("snap.util.attr.r",function(t){"rect"==this.type&&(e.stop(),g(this.node,{rx:t,ry:t}))})(-1),e.on("snap.util.attr.textpath",function(t){if(e.stop(),"text"==this.type){var r,i,a;if(!t&&this.textPath){for(i=this.textPath;i.node.firstChild;)this.node.appendChild(i.node.firstChild);return i.remove(),void delete this.textPath}if(p(t,"string")){var o=d(this),s=f(o.parentNode).path(t);o.appendChild(s.node),r=s.id,s.attr({id:r})}else t=f(t),t instanceof n&&(r=t.attr("id"),r||(r=t.id,t.attr({id:r})));if(r)if(i=this.textPath,a=this.node,i)i.attr({"xlink:href":"#"+r});else{for(i=g("textPath",{"xlink:href":"#"+r});a.firstChild;)i.appendChild(a.firstChild);a.appendChild(i),this.textPath=f(i)}}})(-1),e.on("snap.util.attr.text",function(t){if("text"==this.type){for(var n=this.node,r=function(t){var e=g("tspan");if(p(t,"array"))for(var n=0;n1&&(t=Array.prototype.slice.call(arguments,0));var e={};return o(t,"object")&&!o(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polyline",e)},a.polygon=function(t){arguments.length>1&&(t=Array.prototype.slice.call(arguments,0));var e={};return o(t,"object")&&!o(t,"array")?e=t:null!=t&&(e={points:t}),this.el("polygon",e)},function(){function n(){return this.selectAll("stop")}function r(e,n){var r=u("stop"),i={offset:+n+"%"};return e=t.color(e),i["stop-color"]=e.hex,e.opacity<1&&(i["stop-opacity"]=e.opacity),u(r,i),this.node.appendChild(r),this}function i(){if("linearGradient"==this.type){var e=u(this.node,"x1")||0,n=u(this.node,"x2")||1,r=u(this.node,"y1")||0,i=u(this.node,"y2")||0;return t._.box(e,r,math.abs(n-e),math.abs(i-r))}var a=this.node.cx||.5,o=this.node.cy||.5,s=this.node.r||0;return t._.box(a-s,o-s,2*s,2*s)}function o(t,n){function r(t,e){for(var n=(e-f)/(t-p),r=p;t>r;r++)o[r].offset=+(+f+n*(r-p)).toFixed(2);p=t,f=e}var i,a=e("snap.util.grad.parse",null,n).firstDefined();if(!a)return null;a.params.unshift(t),i="l"==a.type.toLowerCase()?s.apply(0,a.params):l.apply(0,a.params),a.type!=a.type.toLowerCase()&&u(i.node,{gradientUnits:"userSpaceOnUse"});var o=a.stops,c=o.length,f=0,p=0;c--;for(var d=0;c>d;d++)"offset"in o[d]&&r(d,o[d].offset);for(o[c].offset=o[c].offset||100,r(c,o[c].offset),d=0;c>=d;d++){var h=o[d];i.addStop(h.color,h.offset)}return i}function s(e,a,o,s,l){var c=t._.make("linearGradient",e);return c.stops=n,c.addStop=r,c.getBBox=i,null!=a&&u(c.node,{x1:a,y1:o,x2:s,y2:l}),c}function l(e,a,o,s,l,c){var f=t._.make("radialGradient",e);return f.stops=n,f.addStop=r,f.getBBox=i,null!=a&&u(f.node,{cx:a,cy:o,r:s}),null!=l&&null!=c&&u(f.node,{fx:l,fy:c}),f}var u=t._.$;a.gradient=function(t){return o(this.defs,t)},a.gradientLinear=function(t,e,n,r){return s(this.defs,t,e,n,r)},a.gradientRadial=function(t,e,n,r,i){return l(this.defs,t,e,n,r,i)},a.toString=function(){var e,n=this.node.ownerDocument,r=n.createDocumentFragment(),i=n.createElement("div"),a=this.node.cloneNode(!0);return r.appendChild(i),i.appendChild(a),t._.$(a,{xmlns:"http://www.w3.org/2000/svg"}),e=i.innerHTML,r.removeChild(r.firstChild),e},a.clear=function(){for(var t,e=this.node.firstChild;e;)t=e.nextSibling,"defs"!=e.tagName?e.parentNode.removeChild(e):a.clear.call({node:e}),e=t}}()}),r.plugin(function(t,e){function n(t){var e=n.ps=n.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[q](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]}function r(t,e,n,r){return null==t&&(t=e=n=r=0),null==e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:z.min(n,r)/2,r2:z.max(n,r)/2,r0:z.sqrt(n*n+r*r)/2,path:S(t,e,n,r),vb:[t,e,n,r].join(" ")}}function i(){return this.join(",").replace(O,"$1")}function a(t){var e=L(t);return e.toString=i,e}function o(t,e,n,r,i,a,o,s,u){return null==u?d(t,e,n,r,i,a,o,s):l(t,e,n,r,i,a,o,s,h(t,e,n,r,i,a,o,s,u))}function s(n,r){function i(t){return+(+t).toFixed(3)}return t._.cacher(function(t,a,s){t instanceof e&&(t=t.attr("d")),t=M(t);for(var u,c,f,p,d,h="",g={},m=0,y=0,v=t.length;v>y;y++){if(f=t[y],"M"==f[0])u=+f[1],c=+f[2];else{if(p=o(u,c,f[1],f[2],f[3],f[4],f[5],f[6]),m+p>a){if(r&&!g.start){if(d=o(u,c,f[1],f[2],f[3],f[4],f[5],f[6],a-m),h+=["C"+i(d.start.x),i(d.start.y),i(d.m.x),i(d.m.y),i(d.x),i(d.y)],s)return h;g.start=h,h=["M"+i(d.x),i(d.y)+"C"+i(d.n.x),i(d.n.y),i(d.end.x),i(d.end.y),i(f[5]),i(f[6])].join(),m+=p,u=+f[5],c=+f[6];continue}if(!n&&!r)return d=o(u,c,f[1],f[2],f[3],f[4],f[5],f[6],a-m)}m+=p,u=+f[5],c=+f[6]}h+=f.shift()+f}return g.end=h,d=n?m:r?g:l(u,c,f[0],f[1],f[2],f[3],f[4],f[5],1)},null,t._.clone)}function l(t,e,n,r,i,a,o,s,l){var u=1-l,c=G(u,3),f=G(u,2),p=l*l,d=p*l,h=c*t+3*f*l*n+3*u*l*l*i+d*o,g=c*e+3*f*l*r+3*u*l*l*a+d*s,m=t+2*l*(n-t)+p*(i-2*n+t),y=e+2*l*(r-e)+p*(a-2*r+e),v=n+2*l*(i-n)+p*(o-2*i+n),x=r+2*l*(a-r)+p*(s-2*a+r),b=u*t+l*n,w=u*e+l*r,S=u*i+l*o,C=u*a+l*s,k=90-180*z.atan2(m-v,y-x)/_;return{x:h,y:g,m:{x:m,y:y},n:{x:v,y:x},start:{x:b,y:w},end:{x:S,y:C},alpha:k}}function u(e,n,i,a,o,s,l,u){t.is(e,"array")||(e=[e,n,i,a,o,s,l,u]);var c=F.apply(null,e);return r(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)}function c(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height}function f(t,e){return t=r(t),e=r(e),c(e,t.x,t.y)||c(e,t.x2,t.y)||c(e,t.x,t.y2)||c(e,t.x2,t.y2)||c(t,e.x,e.y)||c(t,e.x2,e.y)||c(t,e.x,e.y2)||c(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}function p(t,e,n,r,i){var a=-3*e+9*n-9*r+3*i,o=t*a+6*e-12*n+6*r;return t*o-3*e+3*n}function d(t,e,n,r,i,a,o,s,l){null==l&&(l=1),l=l>1?1:0>l?0:l;for(var u=l/2,c=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0,g=0;c>g;g++){var m=u*f[g]+u,y=p(m,t,n,i,o),v=p(m,e,r,a,s),x=y*y+v*v;h+=d[g]*z.sqrt(x)}return u*h}function h(t,e,n,r,i,a,o,s,l){if(!(0>l||d(t,e,n,r,i,a,o,s)h;)f/=2,p+=(l>u?1:-1)*f,u=d(t,e,n,r,i,a,o,s,p);return p}}function g(t,e,n,r,i,a,o,s){if(!(D(t,n)D(i,o)||D(e,r)D(a,s))){var l=(t*r-e*n)*(i-o)-(t-n)*(i*s-a*o),u=(t*r-e*n)*(a-s)-(e-r)*(i*s-a*o),c=(t-n)*(a-s)-(e-r)*(i-o);if(c){var f=l/c,p=u/c,d=+f.toFixed(2),h=+p.toFixed(2);if(!(d<+H(t,n).toFixed(2)||d>+D(t,n).toFixed(2)||d<+H(i,o).toFixed(2)||d>+D(i,o).toFixed(2)||h<+H(e,r).toFixed(2)||h>+D(e,r).toFixed(2)||h<+H(a,s).toFixed(2)||h>+D(a,s).toFixed(2)))return{x:f,y:p}}}}function m(t,e,n){var r=u(t),i=u(e);if(!f(r,i))return n?0:[];for(var a=d.apply(0,t),o=d.apply(0,e),s=~~(a/8),c=~~(o/8),p=[],h=[],m={},y=n?0:[],v=0;s+1>v;v++){var x=l.apply(0,t.concat(v/s));p.push({x:x.x,y:x.y,t:v/s})}for(v=0;c+1>v;v++)x=l.apply(0,e.concat(v/c)),h.push({x:x.x,y:x.y,t:v/c});for(v=0;s>v;v++)for(var b=0;c>b;b++){var w=p[v],S=p[v+1],C=h[b],k=h[b+1],P=I(S.x-w.x)<.001?"y":"x",T=I(k.x-C.x)<.001?"y":"x",V=g(w.x,w.y,S.x,S.y,C.x,C.y,k.x,k.y);if(V){if(m[V.x.toFixed(4)]==V.y.toFixed(4))continue;m[V.x.toFixed(4)]=V.y.toFixed(4);var A=w.t+I((V[P]-w[P])/(S[P]-w[P]))*(S.t-w.t),F=C.t+I((V[T]-C[T])/(k[T]-C[T]))*(k.t-C.t);A>=0&&1>=A&&F>=0&&1>=F&&(n?y++:y.push({x:V.x,y:V.y,t1:A,t2:F}))}}return y}function y(t,e){return x(t,e)}function v(t,e){return x(t,e,1)}function x(t,e,n){t=M(t),e=M(e);for(var r,i,a,o,s,l,u,c,f,p,d=n?0:[],h=0,g=t.length;g>h;h++){var y=t[h];if("M"==y[0])r=s=y[1],i=l=y[2];else{"C"==y[0]?(f=[r,i].concat(y.slice(1)),r=f[6],i=f[7]):(f=[r,i,r,i,s,l,s,l],r=s,i=l);for(var v=0,x=e.length;x>v;v++){var b=e[v];if("M"==b[0])a=u=b[1],o=c=b[2];else{"C"==b[0]?(p=[a,o].concat(b.slice(1)),a=p[6],o=p[7]):(p=[a,o,a,o,u,c,u,c],a=u,o=c);var w=m(f,p,n);if(n)d+=w;else{for(var S=0,C=w.length;C>S;S++)w[S].segment1=h,w[S].segment2=v,w[S].bez1=f,w[S].bez2=p;d=d.concat(w)}}}}}return d}function b(t,e,n){var r=w(t);return c(r,e,n)&&x(t,[["M",e,n],["H",r.x2+10]],1)%2==1}function w(t){var e=n(t);if(e.bbox)return L(e.bbox);if(!t)return r();t=M(t);for(var i,a=0,o=0,s=[],l=[],u=0,c=t.length;c>u;u++)if(i=t[u],"M"==i[0])a=i[1],o=i[2],s.push(a),l.push(o);else{var f=F(a,o,i[1],i[2],i[3],i[4],i[5],i[6]);s=s.concat(f.min.x,f.max.x),l=l.concat(f.min.y,f.max.y),a=i[5],o=i[6]}var p=H.apply(0,s),d=H.apply(0,l),h=D.apply(0,s),g=D.apply(0,l),m=r(p,d,h-p,g-d);return e.bbox=L(m),m}function S(t,e,n,r,a){if(a)return[["M",+t+ +a,e],["l",n-2*a,0],["a",a,a,0,0,1,a,a],["l",0,r-2*a],["a",a,a,0,0,1,-a,a],["l",2*a-n,0],["a",a,a,0,0,1,-a,-a],["l",0,2*a-r],["a",a,a,0,0,1,a,-a],["z"]];var o=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return o.toString=i,o}function C(t,e,n,r,a){if(null==a&&null==r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!=a)var o=Math.PI/180,s=t+n*Math.cos(-r*o),l=t+n*Math.cos(-a*o),u=e+n*Math.sin(-r*o),c=e+n*Math.sin(-a*o),f=[["M",s,u],["A",n,n,0,+(a-r>180),0,l,c]];else f=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return f.toString=i,f}function k(e){var r=n(e),o=String.prototype.toLowerCase;if(r.rel)return a(r.rel);t.is(e,"array")&&t.is(e&&e[0],"array")||(e=t.parsePathString(e));var s=[],l=0,u=0,c=0,f=0,p=0;"M"==e[0][0]&&(l=e[0][1],u=e[0][2],c=l,f=u,p++,s.push(["M",l,u]));for(var d=p,h=e.length;h>d;d++){var g=s[d]=[],m=e[d];if(m[0]!=o.call(m[0]))switch(g[0]=o.call(m[0]),g[0]){case"a":g[1]=m[1],g[2]=m[2],g[3]=m[3],g[4]=m[4],g[5]=m[5],g[6]=+(m[6]-l).toFixed(3),g[7]=+(m[7]-u).toFixed(3);break;case"v":g[1]=+(m[1]-u).toFixed(3);break;case"m":c=m[1],f=m[2];default:for(var y=1,v=m.length;v>y;y++)g[y]=+(m[y]-(y%2?l:u)).toFixed(3)}else{g=s[d]=[],"m"==m[0]&&(c=m[1]+l,f=m[2]+u);for(var x=0,b=m.length;b>x;x++)s[d][x]=m[x]}var w=s[d].length;switch(s[d][0]){case"z":l=c,u=f;break;case"h":l+=+s[d][w-1];break;case"v":u+=+s[d][w-1];break;default:l+=+s[d][w-2],u+=+s[d][w-1]}}return s.toString=i,r.rel=a(s),s}function P(e){var r=n(e);if(r.abs)return a(r.abs);if(B(e,"array")&&B(e&&e[0],"array")||(e=t.parsePathString(e)),!e||!e.length)return[["M",0,0]];var o,s=[],l=0,u=0,c=0,f=0,p=0;"M"==e[0][0]&&(l=+e[0][1],u=+e[0][2],c=l,f=u,p++,s[0]=["M",l,u]);for(var d,h,g=3==e.length&&"M"==e[0][0]&&"R"==e[1][0].toUpperCase()&&"Z"==e[2][0].toUpperCase(),m=p,y=e.length;y>m;m++){if(s.push(d=[]),h=e[m],o=h[0],o!=o.toUpperCase())switch(d[0]=o.toUpperCase(),d[0]){case"A":d[1]=h[1],d[2]=h[2],d[3]=h[3],d[4]=h[4],d[5]=h[5],d[6]=+h[6]+l,d[7]=+h[7]+u;break;case"V":d[1]=+h[1]+u;break;case"H":d[1]=+h[1]+l;break;case"R":for(var v=[l,u].concat(h.slice(1)),x=2,b=v.length;b>x;x++)v[x]=+v[x]+l,v[++x]=+v[x]+u;s.pop(),s=s.concat(N(v,g));break;case"O":s.pop(),v=C(l,u,h[1],h[2]),v.push(v[0]),s=s.concat(v);break;case"U":s.pop(),s=s.concat(C(l,u,h[1],h[2],h[3])),d=["U"].concat(s[s.length-1].slice(-2));break;case"M":c=+h[1]+l,f=+h[2]+u;default:for(x=1,b=h.length;b>x;x++)d[x]=+h[x]+(x%2?l:u)}else if("R"==o)v=[l,u].concat(h.slice(1)),s.pop(),s=s.concat(N(v,g)),d=["R"].concat(h.slice(-2));else if("O"==o)s.pop(),v=C(l,u,h[1],h[2]),v.push(v[0]),s=s.concat(v);else if("U"==o)s.pop(),s=s.concat(C(l,u,h[1],h[2],h[3])),d=["U"].concat(s[s.length-1].slice(-2));else for(var w=0,S=h.length;S>w;w++)d[w]=h[w];if(o=o.toUpperCase(),"O"!=o)switch(d[0]){case"Z":l=+c,u=+f;break;case"H":l=d[1];break;case"V":u=d[1];break;case"M":c=d[d.length-2],f=d[d.length-1];default:l=d[d.length-2],u=d[d.length-1]}}return s.toString=i,r.abs=a(s),s}function T(t,e,n,r){return[t,e,n,r,n,r]}function V(t,e,n,r,i,a){var o=1/3,s=2/3;return[o*t+s*n,o*e+s*r,o*i+s*n,o*a+s*r,i,a]}function A(e,n,r,i,a,o,s,l,u,c){var f,p=120*_/180,d=_/180*(+a||0),h=[],g=t._.cacher(function(t,e,n){var r=t*z.cos(n)-e*z.sin(n),i=t*z.sin(n)+e*z.cos(n);return{x:r,y:i}});if(c)k=c[0],P=c[1],S=c[2],C=c[3];else{f=g(e,n,-d),e=f.x,n=f.y,f=g(l,u,-d),l=f.x,u=f.y;var m=(z.cos(_/180*a),z.sin(_/180*a),(e-l)/2),y=(n-u)/2,v=m*m/(r*r)+y*y/(i*i);v>1&&(v=z.sqrt(v),r=v*r,i=v*i);var x=r*r,b=i*i,w=(o==s?-1:1)*z.sqrt(I((x*b-x*y*y-b*m*m)/(x*y*y+b*m*m))),S=w*r*y/i+(e+l)/2,C=w*-i*m/r+(n+u)/2,k=z.asin(((n-C)/i).toFixed(9)),P=z.asin(((u-C)/i).toFixed(9));k=S>e?_-k:k,P=S>l?_-P:P,0>k&&(k=2*_+k),0>P&&(P=2*_+P),s&&k>P&&(k-=2*_),!s&&P>k&&(P-=2*_)}var T=P-k;if(I(T)>p){var V=P,F=l,M=u;P=k+p*(s&&P>k?1:-1),l=S+r*z.cos(P),u=C+i*z.sin(P),h=A(l,u,r,i,a,0,s,F,M,[P,V,S,C])}T=P-k;var E=z.cos(k),N=z.sin(k),j=z.cos(P),B=z.sin(P),L=z.tan(T/4),q=4/3*r*L,O=4/3*i*L,R=[e,n],H=[e+q*N,n-O*E],D=[l+q*B,u-O*j],G=[l,u];if(H[0]=2*R[0]-H[0],H[1]=2*R[1]-H[1],c)return[H,D,G].concat(h);h=[H,D,G].concat(h).join().split(",");for(var X=[],U=0,Y=h.length;Y>U;U++)X[U]=U%2?g(h[U-1],h[U],d).y:g(h[U],h[U+1],d).x;return X}function F(t,e,n,r,i,a,o,s){for(var l,u,c,f,p,d,h,g,m=[],y=[[],[]],v=0;2>v;++v)if(0==v?(u=6*t-12*n+6*i,l=-3*t+9*n-9*i+3*o,c=3*n-3*t):(u=6*e-12*r+6*a,l=-3*e+9*r-9*a+3*s,c=3*r-3*e),I(l)<1e-12){if(I(u)<1e-12)continue;f=-c/u,f>0&&1>f&&m.push(f)}else h=u*u-4*c*l,g=z.sqrt(h),0>h||(p=(-u+g)/(2*l),p>0&&1>p&&m.push(p),d=(-u-g)/(2*l),d>0&&1>d&&m.push(d));for(var x,b=m.length,w=b;b--;)f=m[b],x=1-f,y[0][b]=x*x*x*t+3*x*x*f*n+3*x*f*f*i+f*f*f*o,y[1][b]=x*x*x*e+3*x*x*f*r+3*x*f*f*a+f*f*f*s;return y[0][w]=t,y[1][w]=e,y[0][w+1]=o,y[1][w+1]=s,y[0].length=y[1].length=w+2,{min:{x:H.apply(0,y[0]),y:H.apply(0,y[1])},max:{x:D.apply(0,y[0]),y:D.apply(0,y[1])}}}function M(t,e){var r=!e&&n(t);if(!e&&r.curve)return a(r.curve);for(var i=P(t),o=e&&P(e),s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},l={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u=(function(t,e,n){var r,i;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"].concat(A.apply(0,[e.x,e.y].concat(t.slice(1))));break;case"S":"C"==n||"S"==n?(r=2*e.x-e.bx,i=2*e.y-e.by):(r=e.x,i=e.y),t=["C",r,i].concat(t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"].concat(V(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"].concat(V(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat(T(e.x,e.y,t[1],t[2]));break;case"H":t=["C"].concat(T(e.x,e.y,t[1],e.y));break;case"V":t=["C"].concat(T(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"].concat(T(e.x,e.y,e.X,e.Y))}return t}),c=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)p[e]="A",o&&(d[e]="A"),t.splice(e++,0,["C"].concat(n.splice(0,6)));t.splice(e,1),y=D(i.length,o&&o.length||0)}},f=function(t,e,n,r,a){t&&e&&"M"==t[a][0]&&"M"!=e[a][0]&&(e.splice(a,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=t[a][1],n.y=t[a][2],y=D(i.length,o&&o.length||0))},p=[],d=[],h="",g="",m=0,y=D(i.length,o&&o.length||0);y>m;m++){i[m]&&(h=i[m][0]),"C"!=h&&(p[m]=h,m&&(g=p[m-1])),i[m]=u(i[m],s,g),"A"!=p[m]&&"C"==h&&(p[m]="C"),c(i,m),o&&(o[m]&&(h=o[m][0]),"C"!=h&&(d[m]=h,m&&(g=d[m-1])),o[m]=u(o[m],l,g),"A"!=d[m]&&"C"==h&&(d[m]="C"),c(o,m)),f(i,o,s,l,m),f(o,i,l,s,m);var v=i[m],x=o&&o[m],b=v.length,w=o&&x.length;s.x=v[b-2],s.y=v[b-1],s.bx=R(v[b-4])||s.x,s.by=R(v[b-3])||s.y,l.bx=o&&(R(x[w-4])||l.x),l.by=o&&(R(x[w-3])||l.y),l.x=o&&x[w-2],l.y=o&&x[w-1]}return o||(r.curve=a(i)),o?[i,o]:i}function E(t,e){if(!e)return t;var n,r,i,a,o,s,l;for(t=M(t),i=0,o=t.length;o>i;i++)for(l=t[i],a=1,s=l.length;s>a;a+=2)n=e.x(l[a],l[a+1]),r=e.y(l[a],l[a+1]),l[a]=n,l[a+1]=r;return t}function N(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4==r?a[3]={x:+t[0],y:+t[1]}:i-2==r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4==r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n}var j=e.prototype,B=t.is,L=t._.clone,q="hasOwnProperty",O=/,?([a-z]),?/gi,R=parseFloat,z=Math,_=z.PI,H=z.min,D=z.max,G=z.pow,I=z.abs,X=s(1),U=s(),Y=s(0,1),W=t._unit2px,Q={path:function(t){return t.attr("path")},circle:function(t){var e=W(t);return C(e.cx,e.cy,e.r)},ellipse:function(t){var e=W(t);return C(e.cx||0,e.cy||0,e.rx,e.ry)},rect:function(t){var e=W(t);return S(e.x||0,e.y||0,e.width,e.height,e.rx,e.ry)},image:function(t){var e=W(t);return S(e.x||0,e.y||0,e.width,e.height)},line:function(t){return"M"+[t.attr("x1")||0,t.attr("y1")||0,t.attr("x2"),t.attr("y2")]},polyline:function(t){return"M"+t.attr("points")},polygon:function(t){return"M"+t.attr("points")+"z"},deflt:function(t){var e=t.node.getBBox();return S(e.x,e.y,e.width,e.height)}};t.path=n,t.path.getTotalLength=X,t.path.getPointAtLength=U,t.path.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return Y(t,e).end;var r=Y(t,n,1);return e?Y(r,e).end:r},j.getTotalLength=function(){return this.node.getTotalLength?this.node.getTotalLength():void 0},j.getPointAtLength=function(t){return U(this.attr("d"),t)},j.getSubpath=function(e,n){return t.path.getSubpath(this.attr("d"),e,n)},t._.box=r,t.path.findDotsAtSegment=l,t.path.bezierBBox=u,t.path.isPointInsideBBox=c,t.path.isBBoxIntersect=f,t.path.intersection=y,t.path.intersectionNumber=v,t.path.isPointInside=b,t.path.getBBox=w,t.path.get=Q,t.path.toRelative=k,t.path.toAbsolute=P,t.path.toCubic=M,t.path.map=E,t.path.toString=i,t.path.clone=a}),r.plugin(function(t){var r=Math.max,i=Math.min,a=function(t){if(this.items=[],this.bindings={},this.length=0,this.type="set",t)for(var e=0,n=t.length;n>e;e++)t[e]&&(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},o=a.prototype;o.push=function(){for(var t,e,n=0,r=arguments.length;r>n;n++)t=arguments[n],t&&(e=this.items.length,this[e]=this.items[e]=t,this.length++);return this},o.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},o.forEach=function(t,e){for(var n=0,r=this.items.length;r>n;n++)if(t.call(e,this.items[n],n)===!1)return this;return this},o.animate=function(r,i,a,o){"function"!=typeof a||a.length||(o=a,a=n.linear),r instanceof t._.Animation&&(o=r.callback,a=r.easing,i=a.dur,r=r.attr);var s=arguments;if(t.is(r,"array")&&t.is(s[s.length-1],"array"))var l=!0;var u,c=function(){u?this.b=u:u=this.b},f=0,p=o&&function(){f++==this.length&&o.call(this)};return this.forEach(function(t,n){e.once("snap.animcreated."+t.id,c),l?s[n]&&t.animate.apply(t,s[n]):t.animate(r,i,a,p)})},o.remove=function(){for(;this.length;)this.pop().remove();return this},o.bind=function(t,e,n){ -var r={};if("function"==typeof e)this.bindings[t]=e;else{var i=n||t;this.bindings[t]=function(t){r[i]=t,e.attr(r)}}return this},o.attr=function(t){var e={};for(var n in t)this.bindings[n]?this.bindings[n](t[n]):e[n]=t[n];for(var r=0,i=this.items.length;i>r;r++)this.items[r].attr(e);return this},o.clear=function(){for(;this.length;)this.pop()},o.splice=function(t,e){t=0>t?r(this.length+t,0):t,e=r(0,i(this.length-t,e));var n,o=[],s=[],l=[];for(n=2;nn;n++)s.push(this[t+n]);for(;nn?l[n]:o[n-u];for(n=this.items.length=this.length-=e-u;this[n];)delete this[n++];return new a(s)},o.exclude=function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]==t)return this.splice(e,1),!0;return!1},o.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},o.getBBox=function(){for(var t=[],e=[],n=[],a=[],o=this.items.length;o--;)if(!this.items[o].removed){var s=this.items[o].getBBox();t.push(s.x),e.push(s.y),n.push(s.x+s.width),a.push(s.y+s.height)}return t=i.apply(0,t),e=i.apply(0,e),n=r.apply(0,n),a=r.apply(0,a),{x:t,y:e,x2:n,y2:a,width:n-t,height:a-e,cx:t+(n-t)/2,cy:e+(a-e)/2}},o.clone=function(t){t=new a;for(var e=0,n=this.items.length;n>e;e++)t.push(this.items[e].clone());return t},o.toString=function(){return"Snap‘s set"},o.type="set",t.set=function(){var t=new a;return arguments.length&&t.push.apply(t,Array.prototype.slice.call(arguments,0)),t}}),r.plugin(function(t,n){function r(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}}function i(e,n,i){n=p(n).replace(/\.{3}|\u2026/g,e),e=t.parseTransformString(e)||[],n=t.parseTransformString(n)||[];for(var a,o,s,c,f=Math.max(e.length,n.length),d=[],h=[],g=0;f>g;g++){if(s=e[g]||r(n[g]),c=n[g]||r(s),s[0]!=c[0]||"r"==s[0].toLowerCase()&&(s[2]!=c[2]||s[3]!=c[3])||"s"==s[0].toLowerCase()&&(s[3]!=c[3]||s[4]!=c[4])){e=t._.transform2matrix(e,i()),n=t._.transform2matrix(n,i()),d=[["m",e.a,e.b,e.c,e.d,e.e,e.f]],h=[["m",n.a,n.b,n.c,n.d,n.e,n.f]];break}for(d[g]=[],h[g]=[],a=0,o=Math.max(s.length,c.length);o>a;a++)a in s&&(d[g][a]=s[a]),a in c&&(h[g][a]=c[a])}return{from:u(d),to:u(h),f:l(d)}}function a(t){return t}function o(t){return function(e){return+e.toFixed(3)+t}}function s(e){return t.rgb(e[0],e[1],e[2])}function l(t){var e,n,r,i,a,o,s=0,l=[];for(e=0,n=t.length;n>e;e++){for(a="[",o=['"'+t[e][0]+'"'],r=1,i=t[e].length;i>r;r++)o[r]="val["+s++ +"]";a+=o+"]",l[e]=a}return Function("val","return Snap.path.toString.call(["+l+"])")}function u(t){for(var e=[],n=0,r=t.length;r>n;n++)for(var i=1,a=t[n].length;a>i;i++)e.push(t[n][i]);return e}var c={},f=/[a-z]+$/i,p=String;c.stroke=c.fill="colour",n.prototype.equal=function(t,n){return e("snap.util.equal",this,t,n).firstDefined()},e.on("snap.util.equal",function(e,n){var r,d,h=p(this.attr(e)||""),g=this;if(h==+h&&n==+n)return{from:+h,to:+n,f:a};if("colour"==c[e])return r=t.color(h),d=t.color(n),{from:[r.r,r.g,r.b,r.opacity],to:[d.r,d.g,d.b,d.opacity],f:s};if("transform"==e||"gradientTransform"==e||"patternTransform"==e)return n instanceof t.Matrix&&(n=n.toTransformString()),t._.rgTransform.test(n)||(n=t._.svgTransform2string(n)),i(h,n,function(){return g.getBBox(1)});if("d"==e||"path"==e)return r=t.path.toCubic(h,n),{from:u(r[0]),to:u(r[1]),f:l(r[0])};if("points"==e)return r=p(h).split(t._.separator),d=p(n).split(t._.separator),{from:r,to:d,f:function(t){return t}};aUnit=h.match(f);var m=p(n).match(f);return aUnit&&aUnit==m?{from:parseFloat(h),to:parseFloat(n),f:o(aUnit)}:{from:this.asPX(e),to:this.asPX(e,n),f:a}})}),r.plugin(function(t,n,r,i){for(var a=n.prototype,o="hasOwnProperty",s=("createTouch"in i.doc),l=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","touchstart","touchmove","touchend","touchcancel"],u={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},c=(function(t,e){var n="y"==t?"scrollTop":"scrollLeft",r=e&&e.node?e.node.ownerDocument:i.doc;return r[n in r.documentElement?"documentElement":"body"][n]}),f=function(){this.returnValue=!1},p=function(){return this.originalEvent.preventDefault()},d=function(){this.cancelBubble=!0},h=function(){return this.originalEvent.stopPropagation()},g=function(){return i.doc.addEventListener?function(t,e,n,r){var i=s&&u[e]?u[e]:e,a=function(i){var a=c("y",r),l=c("x",r);if(s&&u[o](e))for(var f=0,d=i.targetTouches&&i.targetTouches.length;d>f;f++)if(i.targetTouches[f].target==t||t.contains(i.targetTouches[f].target)){var g=i;i=i.targetTouches[f],i.originalEvent=g,i.preventDefault=p,i.stopPropagation=h;break}var m=i.clientX+l,y=i.clientY+a;return n.call(r,i,m,y)};return e!==i&&t.addEventListener(e,a,!1),t.addEventListener(i,a,!1),function(){return e!==i&&t.removeEventListener(e,a,!1),t.removeEventListener(i,a,!1),!0}}:i.doc.attachEvent?function(t,e,n,r){var i=function(t){t=t||r.node.ownerDocument.window.event;var e=c("y",r),i=c("x",r),a=t.clientX+i,o=t.clientY+e;return t.preventDefault=t.preventDefault||f,t.stopPropagation=t.stopPropagation||d,n.call(r,t,a,o)};t.attachEvent("on"+e,i);var a=function(){return t.detachEvent("on"+e,i),!0};return a}:void 0}(),m=[],y=function(t){for(var n,r=t.clientX,i=t.clientY,a=c("y"),o=c("x"),l=m.length;l--;){if(n=m[l],s){for(var u,f=t.touches&&t.touches.length;f--;)if(u=t.touches[f],u.identifier==n.el._drag.id||n.el.node.contains(u.target)){r=u.clientX,i=u.clientY,(t.originalEvent?t.originalEvent:t).preventDefault();break}}else t.preventDefault();var p=n.el.node;p.nextSibling,p.parentNode,p.style.display,r+=o,i+=a,e("snap.drag.move."+n.el.id,n.move_scope||n.el,r-n.el._drag.x,i-n.el._drag.y,r,i,t)}},v=function(n){t.unmousemove(y).unmouseup(v);for(var r,i=m.length;i--;)r=m[i],r.el._drag={},e("snap.drag.end."+r.el.id,r.end_scope||r.start_scope||r.move_scope||r.el,n);m=[]},x=l.length;x--;)!function(e){t[e]=a[e]=function(n,r){return t.is(n,"function")&&(this.events=this.events||[],this.events.push({name:e,f:n,unbind:g(this.node||document,e,n,r||this)})),this},t["un"+e]=a["un"+e]=function(t){for(var n=this.events||[],r=n.length;r--;)if(n[r].name==e&&(n[r].f==t||!t))return n[r].unbind(),n.splice(r,1),!n.length&&delete this.events,this;return this}}(l[x]);a.hover=function(t,e,n,r){return this.mouseover(t,n).mouseout(e,r||n)},a.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var b=[];a.drag=function(n,r,i,a,o,s){function l(l,u,c){(l.originalEvent||l).preventDefault(),this._drag.x=u,this._drag.y=c,this._drag.id=l.identifier,!m.length&&t.mousemove(y).mouseup(v),m.push({el:this,move_scope:a,start_scope:o,end_scope:s}),r&&e.on("snap.drag.start."+this.id,r),n&&e.on("snap.drag.move."+this.id,n),i&&e.on("snap.drag.end."+this.id,i),e("snap.drag.start."+this.id,o||a||this,u,c,l)}if(!arguments.length){var u;return this.drag(function(t,e){this.attr({transform:u+(u?"T":"t")+[t,e]})},function(){u=this.transform().local})}return this._drag={},b.push({el:this,start:l}),this.mousedown(l),this},a.undrag=function(){for(var n=b.length;n--;)b[n].el==this&&(this.unmousedown(b[n].start),b.splice(n,1),e.unbind("snap.drag.*."+this.id));return!b.length&&t.unmousemove(y).unmouseup(v),this}}),r.plugin(function(t,n,r){var i=(n.prototype,r.prototype),a=/^\s*url\((.+)\)/,o=String,s=t._.$;t.filter={},i.filter=function(e){var r=this;"svg"!=r.type&&(r=r.paper);var i=t.parse(o(e)),a=t._.id(),l=(r.node.offsetWidth,r.node.offsetHeight,s("filter"));return s(l,{id:a,filterUnits:"userSpaceOnUse"}),l.appendChild(i.node),r.defs.appendChild(l),new n(l)},e.on("snap.util.getattr.filter",function(){e.stop();var n=s(this.node,"filter");if(n){var r=o(n).match(a);return r&&t.select(r[1])}}),e.on("snap.util.attr.filter",function(r){if(r instanceof n&&"filter"==r.type){e.stop();var i=r.node.id;i||(s(r.node,{id:r.id}),i=r.id),s(this.node,{filter:t.url(i)})}r&&"none"!=r||(e.stop(),this.node.removeAttribute("filter"))}),t.filter.blur=function(e,n){null==e&&(e=2);var r=null==n?e:[e,n];return t.format('',{def:r})},t.filter.blur.toString=function(){return this()},t.filter.shadow=function(e,n,r,i,a){return"string"==typeof r&&(i=r,a=i,r=4),"string"!=typeof i&&(a=i,i="#000"),i=i||"#000",null==r&&(r=4),null==a&&(a=1),null==e&&(e=0,n=2),null==n&&(n=e),i=t.color(i),t.format('',{color:i,dx:e,dy:n,blur:r,opacity:a})},t.filter.shadow.toString=function(){return this()},t.filter.grayscale=function(e){return null==e&&(e=1),t.format('',{a:.2126+.7874*(1-e),b:.7152-.7152*(1-e),c:.0722-.0722*(1-e),d:.2126-.2126*(1-e),e:.7152+.2848*(1-e),f:.0722-.0722*(1-e),g:.2126-.2126*(1-e),h:.0722+.9278*(1-e)})},t.filter.grayscale.toString=function(){return this()},t.filter.sepia=function(e){return null==e&&(e=1),t.format('',{a:.393+.607*(1-e),b:.769-.769*(1-e),c:.189-.189*(1-e),d:.349-.349*(1-e),e:.686+.314*(1-e),f:.168-.168*(1-e),g:.272-.272*(1-e),h:.534-.534*(1-e),i:.131+.869*(1-e)})},t.filter.sepia.toString=function(){return this()},t.filter.saturate=function(e){return null==e&&(e=1),t.format('',{amount:1-e})},t.filter.saturate.toString=function(){return this()},t.filter.hueRotate=function(e){return e=e||0,t.format('',{angle:e})},t.filter.hueRotate.toString=function(){return this()},t.filter.invert=function(e){return null==e&&(e=1),t.format('',{amount:e,amount2:1-e})},t.filter.invert.toString=function(){return this()},t.filter.brightness=function(e){return null==e&&(e=1),t.format('',{amount:e})},t.filter.brightness.toString=function(){return this()},t.filter.contrast=function(e){return null==e&&(e=1),t.format('',{amount:e,amount2:.5-e/2})},t.filter.contrast.toString=function(){return this()}}),r}); \ No newline at end of file diff --git a/migration/index.html b/migration/index.html deleted file mode 100644 index 53032d2..0000000 --- a/migration/index.html +++ /dev/null @@ -1,260 +0,0 @@ ---- -layout: page -slug: Parse + Migration Guide ---- -
- -
-

Migration Guide (Archive)

-

As we previously shared, the Parse service was shut down on January 30, 2017.

- -

You will not be able to export or access your data in any way after your app is disabled on January 30, 2017. This document will guide you through the steps needed to set up your own open-source Parse Server. At this point, it is no longer possible to migrate a Parse.com database.

- -

This migration guide assumes the use of Heroku and either mLab or ObjectRocket. These three services are easy to use, especially if you are new to deploying and managing your own backend stack. But, you can elect to use any infrastructure provider that supports Node.js environments.

- -

After completion, you will have the following:

- -
    -
  • Parse Server running on your computer, allowing you to develop locally.
  • -
  • Parse Server running on Heroku or another infrastructure provider.
  • -
  • Your app's data stored in MongoDB hosted on mLab or ObjectRocket.
  • -
  • Your app's static files stored in S3 or another hosting provider.
  • -
  • No dependency on *.parseapp.com.
  • -
  • Your app's client-side code updated to point to your Parse Server instance, ready to be released.
  • -
  • No dependency on api.parse.com for the new app client.
  • -
- -

We highly recommend that you first run through this guide with a development or test version of your app before working with a production app.

-
- - - - - - - -