From d0316ce8b49a96ab90bb63c77fe4de8860c1b2b5 Mon Sep 17 00:00:00 2001 From: Anthony Du Pont Date: Sat, 17 Mar 2018 22:11:35 +0100 Subject: [PATCH] :sparkles: Release v1.1.0 --- README.md | 27 ++++++ dist/highway.js | 83 ++++++++++++++++-- dist/highway.min.js | 2 +- dist/highway.min.js.gz | Bin 2621 -> 2757 bytes examples/basic-css-transition/dist/index.js | 2 +- examples/basic-css-transition/package.json | 4 +- examples/basic-css-transition/yarn.lock | 6 +- examples/basic-google-analytics/dist/index.js | 2 +- examples/basic-google-analytics/package.json | 4 +- examples/basic-google-analytics/yarn.lock | 6 +- examples/basic-menu-active/dist/index.js | 2 +- examples/basic-menu-active/package.json | 4 +- examples/basic-menu-active/yarn.lock | 6 +- examples/basic-setup/dist/index.js | 2 +- examples/basic-setup/package.json | 4 +- examples/basic-setup/yarn.lock | 6 +- examples/basic-transition/dist/index.js | 4 +- examples/basic-transition/package.json | 4 +- examples/basic-transition/yarn.lock | 6 +- package.json | 2 +- src/core.js | 54 ++++++++++-- src/helpers.js | 16 +++- test/index.js | 18 ++++ 23 files changed, 219 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index b630472..7553bba 100644 --- a/README.md +++ b/README.md @@ -253,6 +253,29 @@ H.on('NAVIGATE_ERROR', () => { Check out the [**Basic Menu Active**](https://github.com/Dogstudio/highway/tree/master/examples/basic-menu-active) example for more details about events handling in **Highway**. +## Modes + +**Highway** gives you the opportunity to choose between three transitions modes. These modes are available to let you run your transitions the way you need to create beautiful and creative navigations. + +- `out-in`: Will run the `out` transition **then** the `in` transition (*default*). +- `in-out`: Will run the `in` transition **then** the `out` transition. +- `both`: Will run the `in` and `out` transition at **the same time**. + +In order to tell **Highway** which mode you want to use, just tell it in its options. + +```javascript +// [...] +const H = new Highway.Core({ + mode: 'both', + renderers: { + home: Home + }, + transitions: { + default: Transition + } +}); +``` + ## Examples - [**Basic Setup**](https://github.com/Dogstudio/highway/tree/master/examples/basic-setup) @@ -268,6 +291,10 @@ Check out the [**Basic Menu Active**](https://github.com/Dogstudio/highway/tree/ - [ ] More Examples ## History +#### 1.1.0 (2018-03-17) + +- Introduce [**modes**](https://github.com/Dogstudio/highway/tree/master/examples/modes) + #### 1.0.1 (2018-03-17) - Create `Highway.Transition` to use Promises instead of callbacks for transitions diff --git a/dist/highway.js b/dist/highway.js index fd8c89b..d23e294 100644 --- a/dist/highway.js +++ b/dist/highway.js @@ -95,6 +95,7 @@ var PARAM_REGEX = /\?([\w_\-.=&]+)/; var ANCHOR_REGEX = /(#.*)$/; var ORIGIN_REGEX = /(https?:\/\/[\w\-.]+)/; var PATHNAME_REGEX = /https?:\/\/.*?(\/[\w_\-./]+)/; +var CAMELCASE_REGEX = /[-_](\w)/g; /** * Get origin of an URL @@ -262,6 +263,18 @@ function getTransition(page, transitions) { return transitions[slug]; } +/** + * Converts string to camelCase + * + * @arg {String} string - String to parse + * @return {String} Parsed string + */ +function camelize(string) { + return string.replace(CAMELCASE_REGEX, function (_, c) { + return c ? c.toUpperCase() : ''; + }); +} + /** * Export all helpers */ @@ -276,7 +289,8 @@ module.exports = { getAnchor: getAnchor, getPathname: getPathname, getRenderer: getRenderer, - getTransition: getTransition + getTransition: getTransition, + camelize: camelize }; /***/ }), @@ -639,6 +653,7 @@ var HighwayCore = function (_Emitter) { _this.transitions = opts.transitions; // Some usefull stuffs for later + _this.mode = opts.mode || 'out-in'; _this.state = {}; _this.cache = {}; _this.navigating = false; @@ -857,11 +872,13 @@ var HighwayCore = function (_Emitter) { this.emit('NAVIGATE_START', from, to, title, this.state); - // We hide the page we come `from` and since the `hide` method returns a - // Promise because come transition might occur we need to wait for the - // Promise resolution before calling the `show` method of the page we go `to`. - this.from.hide().then(function () { - _this5.to.show().then(function () { + // We select the right method based on the mode provided in the options. + // If no mode is provided then the `out-in` method is chosen. + var method = _helpers2.default.camelize(this.mode); + + if (typeof this[method] === 'function') { + // Now we call the pipeline! + this[method]().then(function () { _this5.navigating = false; // We prepare the next navigation by replacing the `from` renderer by @@ -879,7 +896,61 @@ var HighwayCore = function (_Emitter) { // Same as the `NAVIGATE_START` event _this5.emit('NAVIGATE_END', from, to, title, _this5.state); }); + } + } + + /** + * Run `out` transition then `in` transition + * + * @return {Promise} `out-in` Promise + */ + + }, { + key: 'outIn', + value: function outIn() { + var _this6 = this; + // Call `out` transition + return this.from.hide().then(function () { + // Reset scroll position + window.scrollTo(0, 0); + }).then(function () { + // Call `in` transition + _this6.to.show(); + }); + } + + /** + * Run `in` transition then `out` transition + * + * @return {Promise} `in-out` Promise + */ + + }, { + key: 'inOut', + value: function inOut() { + var _this7 = this; + + // Call the `in` transition + return this.to.show().then(function () { + // Reset scroll position + window.scrollTo(0, 0); + }).then(function () { + // Call the `out` transition + _this7.from.hide(); + }); + } + + /** + * Run both `in` and `out` transition at the same time. + * + * @return {Promise} `both` Promise + */ + + }, { + key: 'both', + value: function both() { + return Promise.all([this.to.show(), this.from.hide()]).then(function () { // Reset scroll position window.scrollTo(0, 0); }); diff --git a/dist/highway.min.js b/dist/highway.min.js index cb60cb9..5ec9c5f 100644 --- a/dist/highway.min.js +++ b/dist/highway.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Highway",[],e):"object"==typeof exports?exports.Highway=e():t.Highway=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(t,e,n){"use strict";var r=/(.+)<\/title>/,o=/\?([\w_\-.=&]+)/,i=/(#.*)$/,a=/(https?:\/\/[\w\-.]+)/,u=/https?:\/\/.*?(\/[\w_\-./]+)/;function f(t){var e=t.match(a);return e?e[1]:null}function s(t){var e=t.match(u);return e?e[1]:null}function c(t){var e=t.match(i);return e?e[1]:null}function l(t){var e=t.match(o);if(!e)return null;for(var n=e[1].split("&"),r={},i=0;i<n.length;i++){var a=n[i].split("="),u=a[0],f=a[1];r[u]=f}return r}function h(t){var e=document.createElement("div");return e.innerHTML=t,e.querySelector("[router-view]")}function p(t){return h(t).getAttribute("router-view")}t.exports={getSlug:p,getView:h,getInfos:function(t){return{url:t,anchor:c(t),origin:f(t),params:l(t),pathname:s(t)}},getTitle:function(t){var e=t.match(r);return e?e[1]:""},getParam:function(t,e){var n=l(t);return n.hasOwnProperty(e)?n[e]:null},getParams:l,getOrigin:f,getAnchor:c,getPathname:s,getRenderer:function(t,e){var n=p(t);return e.hasOwnProperty(n)?e[n]:null},getTransition:function(t,e){if(void 0===e)return null;var n=p(t);return e.hasOwnProperty(n)&&e[n]?e[n]:e.hasOwnProperty("default")?e.default:null}}},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.view=e}return r(t,[{key:"show",value:function(){var t=this;return new Promise(function(e){t.in&&"function"==typeof t.in&&t.in(t.view,e)})}},{key:"hide",value:function(){var t=this;return new Promise(function(e){t.out&&"function"==typeof t.out&&t.out(t.view,e)})}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.view=e,this.title=n,this.transition=new r(e),n&&document.title!==n&&(document.title=n),this.wrapper=null}return r(t,[{key:"show",value:function(){var t=this;return new Promise(function(e){t.wrapper=document.querySelector("[router-wrapper]"),t.wrapper.appendChild(t.view),t.onEnter&&t.onEnter();var n=function(){t.onEnterCompleted&&t.onEnterCompleted(),e()};t.transition?t.transition.show().then(n):n()})}},{key:"hide",value:function(){var t=this;return new Promise(function(e){t.wrapper=t.view.parentNode,t.onLeave&&t.onLeave();var n=function(){t.wrapper.removeChild(t.view),t.onLeaveCompleted&&t.onLeaveCompleted(),e()};t.transition?t.transition.hide().then(n):n()})}}]),t}();t.exports=o},function(t,e){function n(){}n.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function o(){r.off(t,o),e.apply(n,arguments)}return o._=e,this.on(t,o,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;i<a;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},t.exports=n},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=a(n(3)),i=a(n(0));function a(t){return t&&t.__esModule?t:{default:t}}var u={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));n.renderers=t.renderers,n.transitions=t.transitions,n.state={},n.cache={},n.navigating=!1,n.page=document.documentElement.outerHTML,n.pathname=i.default.getPathname(window.location.href),n.cache[n.pathname]=n.page;var r=document.querySelector("[router-view]"),o=i.default.getTransition(n.page,n.transitions);return n.from=new(i.default.getRenderer(n.page,n.renderers))(r,null,o),n.from.onEnter(),n.from.onEnterCompleted(),window.addEventListener("popstate",n.popState.bind(n)),n.bubble(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),r(e,[{key:"bubble",value:function(){var t=this;document.addEventListener("click",function(e){if("A"===e.target.tagName){var n=i.default.getAnchor(e.target.href),r=i.default.getPathname(e.target.href);e.target.target||(e.preventDefault(),t.navigating||r===t.pathname?n&&(window.location.href=e.target.href):t.pushState(e))}})}},{key:"popState",value:function(){i.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(t){this.beforeFetch(t.target.href,!0)}},{key:"beforeFetch",value:function(t,e){var n=this;if(this.navigating=!0,this.state=i.default.getInfos(t),this.pathname=i.default.getPathname(t),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(e&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(t){e&&window.history.pushState(n.state,"",n.state.url),n.push(t)})}},{key:"fetch",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){var t=this;return fetch(this.state.url,u).then(function(e){if(e.status>=200&&e.status<300)return e.text();throw t.emit("NAVIGATE_ERROR"),new Error(e.statusText)})})},{key:"push",value:function(t){var e=this;this.cache[this.pathname]=t;var n=i.default.getView(t),r=i.default.getTitle(t),o=i.default.getTransition(t,this.transitions);this.to=new(i.default.getRenderer(t,this.renderers))(n,r,o);var a=this.from.view,u=this.to.view;this.emit("NAVIGATE_START",a,u,r,this.state),this.from.hide().then(function(){e.to.show().then(function(){e.navigating=!1,e.from=e.to,i.default.getAnchor(e.state.url)&&e.scrollTo(i.default.getAnchor(e.state.url)),e.emit("NAVIGATE_END",a,u,r,e.state)}),window.scrollTo(0,0)})}},{key:"scrollTo",value:function(t){var e=document.querySelector(t);e&&window.scrollTo(e.offsetLeft,e.offsetTop)}}]),e}();t.exports=f},function(t,e,n){"use strict";var r=u(n(4)),o=u(n(0)),i=u(n(2)),a=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var f={Core:r.default,Helpers:o.default,Renderer:i.default,Transition:a.default};t.exports=f}])}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Highway",[],e):"object"==typeof exports?exports.Highway=e():t.Highway=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(t,e,n){"use strict";var r=/<title>(.+)<\/title>/,o=/\?([\w_\-.=&]+)/,i=/(#.*)$/,a=/(https?:\/\/[\w\-.]+)/,u=/https?:\/\/.*?(\/[\w_\-./]+)/,f=/[-_](\w)/g;function s(t){var e=t.match(a);return e?e[1]:null}function c(t){var e=t.match(u);return e?e[1]:null}function l(t){var e=t.match(i);return e?e[1]:null}function h(t){var e=t.match(o);if(!e)return null;for(var n=e[1].split("&"),r={},i=0;i<n.length;i++){var a=n[i].split("="),u=a[0],f=a[1];r[u]=f}return r}function p(t){var e=document.createElement("div");return e.innerHTML=t,e.querySelector("[router-view]")}function d(t){return p(t).getAttribute("router-view")}t.exports={getSlug:d,getView:p,getInfos:function(t){return{url:t,anchor:l(t),origin:s(t),params:h(t),pathname:c(t)}},getTitle:function(t){var e=t.match(r);return e?e[1]:""},getParam:function(t,e){var n=h(t);return n.hasOwnProperty(e)?n[e]:null},getParams:h,getOrigin:s,getAnchor:l,getPathname:c,getRenderer:function(t,e){var n=d(t);return e.hasOwnProperty(n)?e[n]:null},getTransition:function(t,e){if(void 0===e)return null;var n=d(t);return e.hasOwnProperty(n)&&e[n]?e[n]:e.hasOwnProperty("default")?e.default:null},camelize:function(t){return t.replace(f,function(t,e){return e?e.toUpperCase():""})}}},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.view=e}return r(t,[{key:"show",value:function(){var t=this;return new Promise(function(e){t.in&&"function"==typeof t.in&&t.in(t.view,e)})}},{key:"hide",value:function(){var t=this;return new Promise(function(e){t.out&&"function"==typeof t.out&&t.out(t.view,e)})}}]),t}();t.exports=o},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.view=e,this.title=n,this.transition=new r(e),n&&document.title!==n&&(document.title=n),this.wrapper=null}return r(t,[{key:"show",value:function(){var t=this;return new Promise(function(e){t.wrapper=document.querySelector("[router-wrapper]"),t.wrapper.appendChild(t.view),t.onEnter&&t.onEnter();var n=function(){t.onEnterCompleted&&t.onEnterCompleted(),e()};t.transition?t.transition.show().then(n):n()})}},{key:"hide",value:function(){var t=this;return new Promise(function(e){t.wrapper=t.view.parentNode,t.onLeave&&t.onLeave();var n=function(){t.wrapper.removeChild(t.view),t.onLeaveCompleted&&t.onLeaveCompleted(),e()};t.transition?t.transition.hide().then(n):n()})}}]),t}();t.exports=o},function(t,e){function n(){}n.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function o(){r.off(t,o),e.apply(n,arguments)}return o._=e,this.on(t,o,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;i<a;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},t.exports=n},function(t,e,n){"use strict";var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=a(n(3)),i=a(n(0));function a(t){return t&&t.__esModule?t:{default:t}}var u={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));n.renderers=t.renderers,n.transitions=t.transitions,n.mode=t.mode||"out-in",n.state={},n.cache={},n.navigating=!1,n.page=document.documentElement.outerHTML,n.pathname=i.default.getPathname(window.location.href),n.cache[n.pathname]=n.page;var r=document.querySelector("[router-view]"),o=i.default.getTransition(n.page,n.transitions);return n.from=new(i.default.getRenderer(n.page,n.renderers))(r,null,o),n.from.onEnter(),n.from.onEnterCompleted(),window.addEventListener("popstate",n.popState.bind(n)),n.bubble(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),r(e,[{key:"bubble",value:function(){var t=this;document.addEventListener("click",function(e){if("A"===e.target.tagName){var n=i.default.getAnchor(e.target.href),r=i.default.getPathname(e.target.href);e.target.target||(e.preventDefault(),t.navigating||r===t.pathname?n&&(window.location.href=e.target.href):t.pushState(e))}})}},{key:"popState",value:function(){i.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(t){this.beforeFetch(t.target.href,!0)}},{key:"beforeFetch",value:function(t,e){var n=this;if(this.navigating=!0,this.state=i.default.getInfos(t),this.pathname=i.default.getPathname(t),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(e&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(t){e&&window.history.pushState(n.state,"",n.state.url),n.push(t)})}},{key:"fetch",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){var t=this;return fetch(this.state.url,u).then(function(e){if(e.status>=200&&e.status<300)return e.text();throw t.emit("NAVIGATE_ERROR"),new Error(e.statusText)})})},{key:"push",value:function(t){var e=this;this.cache[this.pathname]=t;var n=i.default.getView(t),r=i.default.getTitle(t),o=i.default.getTransition(t,this.transitions);this.to=new(i.default.getRenderer(t,this.renderers))(n,r,o);var a=this.from.view,u=this.to.view;this.emit("NAVIGATE_START",a,u,r,this.state);var f=i.default.camelize(this.mode);"function"==typeof this[f]&&this[f]().then(function(){e.navigating=!1,e.from=e.to,i.default.getAnchor(e.state.url)&&e.scrollTo(i.default.getAnchor(e.state.url)),e.emit("NAVIGATE_END",a,u,r,e.state)})}},{key:"outIn",value:function(){var t=this;return this.from.hide().then(function(){window.scrollTo(0,0)}).then(function(){t.to.show()})}},{key:"inOut",value:function(){var t=this;return this.to.show().then(function(){window.scrollTo(0,0)}).then(function(){t.from.hide()})}},{key:"both",value:function(){return Promise.all([this.to.show(),this.from.hide()]).then(function(){window.scrollTo(0,0)})}},{key:"scrollTo",value:function(t){var e=document.querySelector(t);e&&window.scrollTo(e.offsetLeft,e.offsetTop)}}]),e}();t.exports=f},function(t,e,n){"use strict";var r=u(n(4)),o=u(n(0)),i=u(n(2)),a=u(n(1));function u(t){return t&&t.__esModule?t:{default:t}}var f={Core:r.default,Helpers:o.default,Renderer:i.default,Transition:a.default};t.exports=f}])}); \ No newline at end of file diff --git a/dist/highway.min.js.gz b/dist/highway.min.js.gz index db2bbc60edff526b20cf4eaa9fd728a8e8875767..b42b0b6942d55fcda67f3458ed0ccd187d83f839 100644 GIT binary patch literal 2757 zcmV;$3Oe;4iwFP!000026YUxOZ{xQ0Uvad-qk4?&wA(LoSR=Tmy#wwpMUr&|93xOH zD%L8K9!15MIr`uC9!W`*?c~yK>rVxOh+pr6kMG+@StS-amx5@@!)+k%{>c|QU`#)* zxy%Oq^I9rh4u^X?E16aWpW094&M{8HIB0Nohf|*Af)9uG8zrlBYKJ6vm)|cp$zwog zbKoF;j)STDM((_!r2Sb<Hn~XUhPGD<w~FgZi9vVCaQl#`0cYEK(ku=HQQ<bv2%o8W z=pb<1Txx<KlHn5D=CPthd~`zHX1uNIi38FIv`C7A$Oe{5+KojBlY$+MyS3VZifF|& z714rm_@6TWStzh4B57Xe>FL7AC$i%EQOPw|`q3QQE~Lov`${Eu1ve~;YQ^1bOz*jl zRUOuVUol@I&tVL1Z+ZFAyl+53ZbgN7EC#{$WvYim9d$6%{dX`#lB&>kd|<PcBM5+S z8YBT+m~td1Szk}xLC5)8Ni9)bqGeKEY(#Sh`xXd*IMyr(s30OL+224}W<3!L(EY09 zgHo#;w9h=bVxv=?>w<qvqBr5`&B#thRI<^{l+126w>QTT8_wT^Bbu`j`BU^&_~#K# zV7SzJT~6bh(ai|X!7+2FVk2)O`f5tdHli7s0~s65j&JAWW)qI?I}I&8AxEo3FP0<; z8)@+=pPkHOQ58kqLM-+ns+S>(eTe*Jh~++n3@2bnN4zm31ejz}5j-XsB8kd%k!unR zgODn)Ly+8flAnsG;No5{C;6K<7Hh)9EN_o9I9{=2HlBl!62LQ2vue(=#(-4E*Sg~? zl?yNdp`(T3iRR}8#~BII{2}Nr7v(~5_3rxP2e3gN{j1{Y@roCqTEKZQQ?k-r9Y5rJ zGY`U!PKtCK4x|}@g`H_opgTBE0uKzJbn7CwaO|q6?&B0q@+a7i*Eo7FGFisHSy|lM zN)@rDiC8S9it(AKRQY`_VpI#dPE@ig<E0(zrASsh#^<kV#CnZ78y_%M_hM@Ijf23z z{fKDezSY@BL`t2d_AQR^a4KfpX-bO+*u(LKV;je3?mG5N!#2(?xk$O<>LBsdBfe|y zM1*h!;Ss-9i70c#v4aeh^g-t7V9XfnE9<Ms42MX^65HDjoR15Do5tTcmKJcyBL6o( z@XFvD6<-(0f|HCMbawDQk(Pg71C_T)X##Bk&KREg6`ss<x2^tai@r0@@kE^R#tube zhl=4nCo1Z~3G*jUPY`NU<Od%Nae)aKK@O%l91<06RIc4#NS_NiD*A;#LcFW%-N+3W z!#LPH6@(hXJI9ZqRhcz71R<j)p^MswFAmo}+S7<5q6fJsHCUQSJi<^fmD~&j-wdvS z$hlJJ58ft1NIk&VGDrrCA}Py30)H*9VC_UN^OAx^;x|GUz<BGafZ%Kk_l$#bDK`PN zk=0`qIoAw9TRQ_5KuoI~-n|n^xYgjgAUE4jxa<c0C)&`*Ac!u(5?<yh|1SxHcYB7i z*)g9!?Ky}8AEtAK@(<np4Z3Tw{qFi}$0i42!cAKL%8-Zx&7g3-HtL$gM~uN5=`S+j zaBozC9*r3X`G2vHhC<80Gx6P>gAh+!pa}nq^zAY)Qm4$gE5*405ToUG=-y2DZ`N+U zm8*5ZHBUW&c8$QBL-7Ju(MfaaPa>272_wDakiCX6p#I-law8ynzX%cvkkTiaa&yxU zJbB=jaWg!8(?(v3ujB*YmzM$Ekwbs&%W}Z0?#tneUd1yW<h2%^>9OrjW`G{Z`VFI; z;2($`K%&|t1VqjB95(R7X7ezN)>XMA+f2lqF7)SE)K<4^D!~$8z~3eK63d`SW*Hok zAPCgE0x}JnsC%QdW!M;pjBXoSG&m*TtSMjRx|dZno{<BKQCZ{*ZmXddAw2<GWrQ5K zXlO17SF?Zw6LqLrS(~G)Q#n!KV+9txnP|8*<*)t>B5x~VD~2pPn9Lm@4U_~>2V%21 zmJ(oNJZ$a)l>!u3s;v}G6H_fHEE6&Teg^c^O`=;nmG*IPwPi{=1XHBMWSnwTz=5G_ z7_MojOyZ9abudK13nfI5Z^94?I2?_`u+!(nPi%ME0y^F{S+TBb6hXzdD{wd9?IAxt zw#7|AS6nY;8V5g|Uk7x_6DSJGcpLnDe96Ism*6sv|B>ru5C=bh{O}ISYPSyc3sie4 z=y;wKWgjU#X0LJ4GR$%IJA_oe=RI3e+QWUxGbn+8s3U-|1E@2^U-aOPa{)}{cs+3D z>EL)!R%;AFy%Wd`PunW@2o$O5tsS+!H9v#vR^f@b;}^8x_SWdZ?QPq8!ji2~jf)I| zNa#8(00CMcAPU$Lu4K9!Q{g#t-0^0xhZ=xYDSVLAN*|*VK=jj4xMQC{0FlMg4Mp;h z-zPd3_YBMfTzYcvRr}4r)%%eN@L1oQleXAoc~hK4UJ2@Yh*2RIi48i6XJJEo)`8EN zCF&f&my!$DJOHcdk?jgpV$t=5<ki_3gl<f-NDscLl{@HG++j!*#jFYgiiPizm7N7Y z2s;5JX?p$u7y6Kcr3ruu)^cs$0v`p&S2&LD;4}ndM0i)-f&W3=d)}qd@k7cs93qqG ztq<GQ73wy2ffX-HG}TpA>H!DKhvhqNs`i0Yp0UvZ8e{OLp@6wT7xJAB+lCMU^1h$L z7Ako53Lh_aEl=I+qn^;l(_&Ax-*Fw+5WoN<aWu-FolFm|8rj6UvoerF4SrTO&kUXy zrY;?}GJZMVYgKXo2^SE~e+j6c{^6^f1=t3OG~@;x%rd$E1Pa~+>7KsXt_^9=TI*2H z*i!%4#G`;8i2Epdjx2s>p$R67ooPQkDPT;uHaEpO;*f!|J|z$*Mt!59=$&dWUv4z_ zfDC_yLjZL(IZMMCggBhuaftT(dyb8@LvZxy#N(u4agP-UMSJM9e?tmEzQyC6+Q-yS zwlJeIn0@y-w#lURvppG@jwETSz%Mw?=9qDmyFIZUf-v;5Lz|y<kh9)VNba#uhi2;J z3A<pMkKO}!+|wZN?h;k1fM{eEG9yD*JNR;b39;y~3J)c^Kf|+MhGmDv-^(z(R-a9n zO@!Ug@UhKz1?eR`&Y_=BnoWXfe@$L2`s}^?GNIM39IPAQ=15h3%f23u(Jk8P={MtX z*m1@`Yb>^mr-m$fg}wPtXFt9F;q3bS_Wbhl;u4}9x^U~h8!XoVhw=)2?LQ<h*PX^Y zJgXE;PY(Dd?4+X>?sy~905?tZXG5>v?PiotZM1wL<T@xn;6e@!(RN~gy|9XhQP%Xp zD&|m{sl~q|zN_oAOUQK-S^=K!(JaEuW54Mm+n2?ZDV!W?#lh|@n_K4ugFOQP{ol!? zxJ@)r1?geW-x-3@k%f{)aV^Q04r5Wft1X|tYcA_f`W6Lw(|hr%&PFF_zeC`GI16ui z9aC_h`^V6<T(iaFBNrEyemx&8ir>zKcNLG1JE@lk*l@I6XD7lmeAZ`#?#gHWTHadP z&HD2O`%M0;A?mjtw#Ck|(*bGF2cF^YZFX`k*S4F(``w)ERRwqj73g0>H1f*UqEMCM z=xZ1yW_04$r`4~jPcycC3n4aEjgHfIyjWv7+Gc6A{ne^91nT|zl(av5_ii=^Ay57T L%8t=PgCPI_rf)vI literal 2621 zcmV-D3c~dtiwFP!000026YUvkZ{s%huQ=L;m+CNz)9!we!y3Uf+bJ+dkp$fWju9v} zWos*wUW$q*aP;5zJsuKeJDGNmeku?|yxzfgKl&uE#atIs5KVc!i{!&U`CLbg>8A~s z`G9}kNTsXc@L*>x7j?-e_LI1CjFUKxJkIX$g6D<c!=e2q*?KXtLlV6!maA>{6w&Dn zI7naOVB)@sJ8vlIaMqA*Ar^8=+bhL8#dWR3pu1$ed(6~;vt2XxivvMayeo3Tr)m~E z2ps!MjS)mLTw=Q-RkTb`&Z*l>cTF>PKpKJOSy>Y4VX36uSi~?X*~zF|YaFOZ)=X28 z%o&IO3l^${0(&BnMnlifpNxDGE509<+;F9z%(2~Eio96XDtjooVNuj;?q(yp<T_PN z+yH*XLW#VDF}lC!)d!>Bh=Sb88u3^Rf*s0K4~IJGU?zupFhsJt)J=M1vy~$VfN&aR z5nPyZBqv$lPTfJr`9?`C(Oi;MR(;wEe+R1z1V9`c7DZGLkyPw&U@X&~hy~bwUGYJs zRRPv#RIb?Bg)Vf-za`0=_~P!&PR^)gXLl1az1!a3ohEEJdlR40f}N2+C11sVKBE~7 zS6XkXNqTp7cLwL+m^oClvtT3nYC_C5qB+9@olWL}Sd(?8=PQ!MUOs%nr{}X&)MeSU z5Y-_>{W`?_5TbY;qCA9<@fcj^gnP$9fN?Gr!DE6UlBC*{g(lH3im3w616hs6#f3;p zE|z*VF5bMcSTiQ3MSGmV@tS4R(TwKsIiHQyw4SltyNv4iT6KIa<Q$A%=wz;VrukLL zaYmv=@fdZNO9~;ldUyNbJ$M~Y{#A4Jbi+$9Cg41pDp_l;P9F=tokej+XM=Pc4y2iY zPhDy-nFlyeq5uq_bQ=_RaO|e6m+1zb@F&<#S2+4X<g!XbN3ytgwJK9hGcjLDm7<!c zRK>CoDVhb{WGY)%X=%rLC9*Y7QT<JWSZ~ov(<AQbG^X}-97P81M?{<U{md#6DRsWt z_c6lbiI{R{DJ>pg567Pz+c>^-*Rf|j+c>-CV!;(xM~QC&;`<IxL=0CD0r6XviK;*x zd&s~@A7!x^j2L5mWBpZRhC`%di5+Z5E~-VqjgN4aCD6#P2s1$}Y)wsDwmVN6jl~7` zE+f3lD26PJRno<J7EYd@ArGh|%nX=+A`{J{0=#HABr4geLc6_~zLXDC@(X{0WYjeK zX%#MpNy<wV@&MsoRK~og%o-emc;1lMrPSjWhiji4DDQ;mK_My)PGPEoIMypAw*$eq zgIgeSr4+jE+e`?l2N?JV*<fB~RW-=qujLgSljv1ZQE(poCg`n<w?PF6PIqw6G^$o| z8&R9~0!EQ@%@DM8319)lv@R-6I+4UX4N(RPr^9N<Zs32S4Smc|=)IQks#x&<k}w3K z7bu$@^Xb!`fjCexUDT3)*zSK|yB6E;ZohVH3KS;Xqz#1(i72oP3fF5Bq&a-T7_5>0 zA`=exR%IKIATzP-|KcH@Ld(Dlso0%^Y)o6A1pkZ0+f`96oH66B6juU3jFsD=)0qf$ z)^5I)>rKfuUjzW{8UdX{X8~T(NpliT5|jan6TRY4TE;1${@;4C7m&SQ0=XZg^ieLj zx#@eJJ#x#q86Ll>mzUye`N$9DWkC1j&|mwq9Pp}#a`<9Y37iLcZA9mKY`2%hF#_4R zVT=>v1F-|BDShrHYN}_jfgd)V#c{H!s}<ShBIR_hKc}Lxw%t$(p7;v>t`?Wrqa-qi z;)_ZU1lnB*MFGv!(im+Od*_hJz4t|fQv%M0@^ztm1(}bG99T@MvY2z*s<a5{Iru6g z<j6&1b3wS81teHgLqo~ha#~%;v4R*Yup7;V=hpP5`ZI{UZC9-r^89Gsb%Zof5<ne@ zO=np3gOBmp-vx?#=zLUL)L&$#uvb{o=K|sk*r}T&_jW3+a&Wa}N;(7+q{L*p;AnsY zL)S3e(9W2|A1Uf+iUJK~M38Ud7<w%njpDeo=Pc-A_Iq}n?tB5On+8Qtv)vlP4McmW z*H3L9645o+E4fIc@2_qny5bqs?^U{sem=eC5Wy=58K?g!^eRfDpFg~R2R*M_hgJg` zvjy0Ak(E^+DJZk|s?ajbarQf;RDKXWTT(i}ea&;|R)DA@fUpB-3B+IY;DK`iOci)N z2<D5y>7c4Nn1XsIkQu&c8`2XnB>(Vr(ms5J6<oIpD&me`u!8%0V+Z&5?ZXguSKc%} z<&Z>T_Y49MU<CrQfbF&_$SLiZiXfQdPB4Q#5VFP)fG<?peC38Bdn}fjF2s_78$jsJ zmO%sV2d)KAOd`jY+nluhA1i#nlmuO&d&o;lInQizQ9O@5?P&)-W0t6M^e+_=uAc|* z=#lMuMq<(Rg%PyAIizSTrbrLox33*^E7mwBiemMIiNnHoMakYmm~5Q@vc=-+5iaz; z0FM#?6K&+i=psTP%FPXqlLt5rNf!}5)DIA65cfe8@wR--sD?vi5~K2QAG$#s#-~`t zs|sCmT~~U*!NXzsftyBpAXVU0bbwA5z3~*V2Ix||vsL>>Lx6l3&+r`+B6y9;OWnJp z?mcFnQy)?BVYC12IcgwL0Y>6zR6T!~99=cCNp<H<AcqFxsq|`w2n$nJ_F5UgUe~pz zc&NfTr0riK8kTvemCFcUCK3%b00;NWmLI{ueKPLZn|(+j?OE#`>IGlw9~%c0@B{fB zMbDAN?<_RIqOf!A=Vt|s>DK2a*e@J&P}Zje;>7H3EEJ<q6V%1ta*xRHHv|MQS5upK z&LEZH^npWG=YQw;)^!Yyo}34qcoq*>fs}KAPKP(7kjz^=!Kp(`{h|shCxbZ*pCel| z+Bn;jfq5h(zT5jk;Pl5#pxl3^>LG~ZpbE5gSO+=n9fcwupU%)tojhR|eDf(#aK}B3 zqTnt`txCu`W+68+bUi{S=hqO64yy=IV)!#WhwWB=T>QOCBKR%B7RDx%9#-;T%<=}x zNKnqP-!c3q!ScQ#uQqq~-hG+SdS4DU3~+O#uD)eok46|4?eyZC(J1aX<DWG)RVGqH zHN3{>@{gB4{qX(e?bZF&_4TJ~$Z{CMZTR+BZUGME6^GV;OkVE681L|+Q7}C|5}WXG z8?A6J8ksj~^N#&u>ec(N7L_v_Eni8w4k}EzP%A^W9oruitl?pnHE&%tb12Q!;@=bB z&F$qi)U+9`0Z*qi=U4_+*y{$GN0aHj2lV#(#S*u*1cK1x!M(F}V+M02%kox|FCE7I zbl)I8e&_GwPJ#*e5~D>tqNC84{QAr0@j|twA;+}-++ye0KSR=e&vX32#ZGSJ#=a5o z{u@F5tJ=C6`kKGSXi~N9aG=-0(bq7_%;-Gqdg|ZQ_2g{#76N*zytwH*UT(0-X=?)7 f{%q0ega$u9WbJRAy_?NI$m4$l)n`F@b{_x$?X~|Z diff --git a/examples/basic-css-transition/dist/index.js b/examples/basic-css-transition/dist/index.js index 39e8622..2c7e0e0 100644 --- a/examples/basic-css-transition/dist/index.js +++ b/examples/basic-css-transition/dist/index.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";var r=/<title>(.+)<\/title>/,o=/\?([\w_\-.=&]+)/,i=/(#.*)$/,u=/(https?:\/\/[\w\-.]+)/,a=/https?:\/\/.*?(\/[\w_\-./]+)/;function f(e){var t=e.match(u);return t?t[1]:null}function c(e){var t=e.match(a);return t?t[1]:null}function s(e){var t=e.match(i);return t?t[1]:null}function l(e){var t=e.match(o);if(!t)return null;for(var n=t[1].split("&"),r={},i=0;i<n.length;i++){var u=n[i].split("="),a=u[0],f=u[1];r[a]=f}return r}function p(e){var t=document.createElement("div");return t.innerHTML=e,t.querySelector("[router-view]")}function h(e){return p(e).getAttribute("router-view")}e.exports={getSlug:h,getView:p,getInfos:function(e){return{url:e,anchor:s(e),origin:f(e),params:l(e),pathname:c(e)}},getTitle:function(e){var t=e.match(r);return t?t[1]:""},getParam:function(e,t){var n=l(e);return n.hasOwnProperty(t)?n[t]:null},getParams:l,getOrigin:f,getAnchor:s,getPathname:c,getRenderer:function(e,t){var n=h(e);return t.hasOwnProperty(n)?t[n]:null},getTransition:function(e,t){if(void 0===t)return null;var n=h(e);return t.hasOwnProperty(n)&&t[n]?t[n]:t.hasOwnProperty("default")?t.default:null}}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.in&&"function"==typeof e.in&&e.in(e.view,t)})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.out&&"function"==typeof e.out&&e.out(e.view,t)})}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t,this.title=n,this.transition=new r(t),n&&document.title!==n&&(document.title=n),this.wrapper=null}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.wrapper=document.querySelector("[router-wrapper]"),e.wrapper.appendChild(e.view),e.onEnter&&e.onEnter();var n=function(){e.onEnterCompleted&&e.onEnterCompleted(),t()};e.transition?e.transition.show().then(n):n()})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.wrapper=e.view.parentNode,e.onLeave&&e.onLeave();var n=function(){e.wrapper.removeChild(e.view),e.onLeaveCompleted&&e.onLeaveCompleted(),t()};e.transition?e.transition.hide().then(n):n()})}}]),e}();e.exports=o},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,u=r.length;i<u;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(3)),i=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var a={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.renderers=e.renderers,n.transitions=e.transitions,n.state={},n.cache={},n.navigating=!1,n.page=document.documentElement.outerHTML,n.pathname=i.default.getPathname(window.location.href),n.cache[n.pathname]=n.page;var r=document.querySelector("[router-view]"),o=i.default.getTransition(n.page,n.transitions);return n.from=new(i.default.getRenderer(n.page,n.renderers))(r,null,o),n.from.onEnter(),n.from.onEnterCompleted(),window.addEventListener("popstate",n.popState.bind(n)),n.bubble(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),r(t,[{key:"bubble",value:function(){var e=this;document.addEventListener("click",function(t){if("A"===t.target.tagName){var n=i.default.getAnchor(t.target.href),r=i.default.getPathname(t.target.href);t.target.target||(t.preventDefault(),e.navigating||r===e.pathname?n&&(window.location.href=t.target.href):e.pushState(t))}})}},{key:"popState",value:function(){i.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(e){this.beforeFetch(e.target.href,!0)}},{key:"beforeFetch",value:function(e,t){var n=this;if(this.navigating=!0,this.state=i.default.getInfos(e),this.pathname=i.default.getPathname(e),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(t&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(e){t&&window.history.pushState(n.state,"",n.state.url),n.push(e)})}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=this;return fetch(this.state.url,a).then(function(t){if(t.status>=200&&t.status<300)return t.text();throw e.emit("NAVIGATE_ERROR"),new Error(t.statusText)})})},{key:"push",value:function(e){var t=this;this.cache[this.pathname]=e;var n=i.default.getView(e),r=i.default.getTitle(e),o=i.default.getTransition(e,this.transitions);this.to=new(i.default.getRenderer(e,this.renderers))(n,r,o);var u=this.from.view,a=this.to.view;this.emit("NAVIGATE_START",u,a,r,this.state),this.from.hide().then(function(){t.to.show().then(function(){t.navigating=!1,t.from=t.to,i.default.getAnchor(t.state.url)&&t.scrollTo(i.default.getAnchor(t.state.url)),t.emit("NAVIGATE_END",u,a,r,t.state)}),window.scrollTo(0,0)})}},{key:"scrollTo",value:function(e){var t=document.querySelector(e);t&&window.scrollTo(t.offsetLeft,t.offsetTop)}}]),t}();e.exports=f},function(e,t,n){"use strict";var r=a(n(4)),o=a(n(0)),i=a(n(2)),u=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}var f={Core:r.default,Helpers:o.default,Renderer:i.default,Transition:u.default};e.exports=f}])},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Transition),o(t,[{key:"in",value:function(e,t){e.classList.add("fade-in"),e.addEventListener("animationend",t)}},{key:"out",value:function(e,t){e.classList.add("fade-out"),e.addEventListener("animationend",t)}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(3)),i=a(n(2)),u=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}new r.default.Core({renderers:{home:o.default,page:i.default},transitions:{home:u.default,page:u.default}})}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";var r=/<title>(.+)<\/title>/,o=/\?([\w_\-.=&]+)/,i=/(#.*)$/,u=/(https?:\/\/[\w\-.]+)/,a=/https?:\/\/.*?(\/[\w_\-./]+)/,f=/[-_](\w)/g;function c(e){var t=e.match(u);return t?t[1]:null}function s(e){var t=e.match(a);return t?t[1]:null}function l(e){var t=e.match(i);return t?t[1]:null}function p(e){var t=e.match(o);if(!t)return null;for(var n=t[1].split("&"),r={},i=0;i<n.length;i++){var u=n[i].split("="),a=u[0],f=u[1];r[a]=f}return r}function h(e){var t=document.createElement("div");return t.innerHTML=e,t.querySelector("[router-view]")}function d(e){return h(e).getAttribute("router-view")}e.exports={getSlug:d,getView:h,getInfos:function(e){return{url:e,anchor:l(e),origin:c(e),params:p(e),pathname:s(e)}},getTitle:function(e){var t=e.match(r);return t?t[1]:""},getParam:function(e,t){var n=p(e);return n.hasOwnProperty(t)?n[t]:null},getParams:p,getOrigin:c,getAnchor:l,getPathname:s,getRenderer:function(e,t){var n=d(e);return t.hasOwnProperty(n)?t[n]:null},getTransition:function(e,t){if(void 0===t)return null;var n=d(e);return t.hasOwnProperty(n)&&t[n]?t[n]:t.hasOwnProperty("default")?t.default:null},camelize:function(e){return e.replace(f,function(e,t){return t?t.toUpperCase():""})}}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.in&&"function"==typeof e.in&&e.in(e.view,t)})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.out&&"function"==typeof e.out&&e.out(e.view,t)})}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t,this.title=n,this.transition=new r(t),n&&document.title!==n&&(document.title=n),this.wrapper=null}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.wrapper=document.querySelector("[router-wrapper]"),e.wrapper.appendChild(e.view),e.onEnter&&e.onEnter();var n=function(){e.onEnterCompleted&&e.onEnterCompleted(),t()};e.transition?e.transition.show().then(n):n()})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.wrapper=e.view.parentNode,e.onLeave&&e.onLeave();var n=function(){e.wrapper.removeChild(e.view),e.onLeaveCompleted&&e.onLeaveCompleted(),t()};e.transition?e.transition.hide().then(n):n()})}}]),e}();e.exports=o},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,u=r.length;i<u;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(3)),i=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var a={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.renderers=e.renderers,n.transitions=e.transitions,n.mode=e.mode||"out-in",n.state={},n.cache={},n.navigating=!1,n.page=document.documentElement.outerHTML,n.pathname=i.default.getPathname(window.location.href),n.cache[n.pathname]=n.page;var r=document.querySelector("[router-view]"),o=i.default.getTransition(n.page,n.transitions);return n.from=new(i.default.getRenderer(n.page,n.renderers))(r,null,o),n.from.onEnter(),n.from.onEnterCompleted(),window.addEventListener("popstate",n.popState.bind(n)),n.bubble(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),r(t,[{key:"bubble",value:function(){var e=this;document.addEventListener("click",function(t){if("A"===t.target.tagName){var n=i.default.getAnchor(t.target.href),r=i.default.getPathname(t.target.href);t.target.target||(t.preventDefault(),e.navigating||r===e.pathname?n&&(window.location.href=t.target.href):e.pushState(t))}})}},{key:"popState",value:function(){i.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(e){this.beforeFetch(e.target.href,!0)}},{key:"beforeFetch",value:function(e,t){var n=this;if(this.navigating=!0,this.state=i.default.getInfos(e),this.pathname=i.default.getPathname(e),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(t&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(e){t&&window.history.pushState(n.state,"",n.state.url),n.push(e)})}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=this;return fetch(this.state.url,a).then(function(t){if(t.status>=200&&t.status<300)return t.text();throw e.emit("NAVIGATE_ERROR"),new Error(t.statusText)})})},{key:"push",value:function(e){var t=this;this.cache[this.pathname]=e;var n=i.default.getView(e),r=i.default.getTitle(e),o=i.default.getTransition(e,this.transitions);this.to=new(i.default.getRenderer(e,this.renderers))(n,r,o);var u=this.from.view,a=this.to.view;this.emit("NAVIGATE_START",u,a,r,this.state);var f=i.default.camelize(this.mode);"function"==typeof this[f]&&this[f]().then(function(){t.navigating=!1,t.from=t.to,i.default.getAnchor(t.state.url)&&t.scrollTo(i.default.getAnchor(t.state.url)),t.emit("NAVIGATE_END",u,a,r,t.state)})}},{key:"outIn",value:function(){var e=this;return this.from.hide().then(function(){window.scrollTo(0,0)}).then(function(){e.to.show()})}},{key:"inOut",value:function(){var e=this;return this.to.show().then(function(){window.scrollTo(0,0)}).then(function(){e.from.hide()})}},{key:"both",value:function(){return Promise.all([this.to.show(),this.from.hide()]).then(function(){window.scrollTo(0,0)})}},{key:"scrollTo",value:function(e){var t=document.querySelector(e);t&&window.scrollTo(t.offsetLeft,t.offsetTop)}}]),t}();e.exports=f},function(e,t,n){"use strict";var r=a(n(4)),o=a(n(0)),i=a(n(2)),u=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}var f={Core:r.default,Helpers:o.default,Renderer:i.default,Transition:u.default};e.exports=f}])},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Transition),o(t,[{key:"in",value:function(e,t){e.classList.add("fade-in"),e.addEventListener("animationend",t)}},{key:"out",value:function(e,t){e.classList.add("fade-out"),e.addEventListener("animationend",t)}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";var r=a(n(0)),o=a(n(3)),i=a(n(2)),u=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}new r.default.Core({renderers:{home:o.default,page:i.default},transitions:{home:u.default,page:u.default}})}]); \ No newline at end of file diff --git a/examples/basic-css-transition/package.json b/examples/basic-css-transition/package.json index 99248cb..e663156 100644 --- a/examples/basic-css-transition/package.json +++ b/examples/basic-css-transition/package.json @@ -1,7 +1,7 @@ { "name": "@dogstudio/highway", "license": "MIT", - "version": "1.0.1", + "version": "1.1.0", "main": "dist/index.js", "scripts": { "build": "webpack", @@ -16,6 +16,6 @@ "webpack-cli": "^2.0.12" }, "dependencies": { - "@dogstudio/highway": "^1.0.1" + "@dogstudio/highway": "^1.1.0" } } diff --git a/examples/basic-css-transition/yarn.lock b/examples/basic-css-transition/yarn.lock index e6f349c..d83cb75 100644 --- a/examples/basic-css-transition/yarn.lock +++ b/examples/basic-css-transition/yarn.lock @@ -2,9 +2,9 @@ # yarn lockfile v1 -"@dogstudio/highway@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@dogstudio/highway/-/highway-1.0.1.tgz#1d38da001396363b2502b3c38a61ba2c13921131" +"@dogstudio/highway@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@dogstudio/highway/-/highway-1.1.0.tgz#f6282309ec9e9a8529b03b72e2a8d308e8dce44d" "@sindresorhus/is@^0.7.0": version "0.7.0" diff --git a/examples/basic-google-analytics/dist/index.js b/examples/basic-google-analytics/dist/index.js index 24dbd9e..5f39b83 100644 --- a/examples/basic-google-analytics/dist/index.js +++ b/examples/basic-google-analytics/dist/index.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";var r=/<title>(.+)<\/title>/,o=/\?([\w_\-.=&]+)/,i=/(#.*)$/,u=/(https?:\/\/[\w\-.]+)/,a=/https?:\/\/.*?(\/[\w_\-./]+)/;function f(e){var t=e.match(u);return t?t[1]:null}function c(e){var t=e.match(a);return t?t[1]:null}function l(e){var t=e.match(i);return t?t[1]:null}function s(e){var t=e.match(o);if(!t)return null;for(var n=t[1].split("&"),r={},i=0;i<n.length;i++){var u=n[i].split("="),a=u[0],f=u[1];r[a]=f}return r}function p(e){var t=document.createElement("div");return t.innerHTML=e,t.querySelector("[router-view]")}function h(e){return p(e).getAttribute("router-view")}e.exports={getSlug:h,getView:p,getInfos:function(e){return{url:e,anchor:l(e),origin:f(e),params:s(e),pathname:c(e)}},getTitle:function(e){var t=e.match(r);return t?t[1]:""},getParam:function(e,t){var n=s(e);return n.hasOwnProperty(t)?n[t]:null},getParams:s,getOrigin:f,getAnchor:l,getPathname:c,getRenderer:function(e,t){var n=h(e);return t.hasOwnProperty(n)?t[n]:null},getTransition:function(e,t){if(void 0===t)return null;var n=h(e);return t.hasOwnProperty(n)&&t[n]?t[n]:t.hasOwnProperty("default")?t.default:null}}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.in&&"function"==typeof e.in&&e.in(e.view,t)})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.out&&"function"==typeof e.out&&e.out(e.view,t)})}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t,this.title=n,this.transition=new r(t),n&&document.title!==n&&(document.title=n),this.wrapper=null}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.wrapper=document.querySelector("[router-wrapper]"),e.wrapper.appendChild(e.view),e.onEnter&&e.onEnter();var n=function(){e.onEnterCompleted&&e.onEnterCompleted(),t()};e.transition?e.transition.show().then(n):n()})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.wrapper=e.view.parentNode,e.onLeave&&e.onLeave();var n=function(){e.wrapper.removeChild(e.view),e.onLeaveCompleted&&e.onLeaveCompleted(),t()};e.transition?e.transition.hide().then(n):n()})}}]),e}();e.exports=o},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,u=r.length;i<u;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(3)),i=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var a={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.renderers=e.renderers,n.transitions=e.transitions,n.state={},n.cache={},n.navigating=!1,n.page=document.documentElement.outerHTML,n.pathname=i.default.getPathname(window.location.href),n.cache[n.pathname]=n.page;var r=document.querySelector("[router-view]"),o=i.default.getTransition(n.page,n.transitions);return n.from=new(i.default.getRenderer(n.page,n.renderers))(r,null,o),n.from.onEnter(),n.from.onEnterCompleted(),window.addEventListener("popstate",n.popState.bind(n)),n.bubble(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),r(t,[{key:"bubble",value:function(){var e=this;document.addEventListener("click",function(t){if("A"===t.target.tagName){var n=i.default.getAnchor(t.target.href),r=i.default.getPathname(t.target.href);t.target.target||(t.preventDefault(),e.navigating||r===e.pathname?n&&(window.location.href=t.target.href):e.pushState(t))}})}},{key:"popState",value:function(){i.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(e){this.beforeFetch(e.target.href,!0)}},{key:"beforeFetch",value:function(e,t){var n=this;if(this.navigating=!0,this.state=i.default.getInfos(e),this.pathname=i.default.getPathname(e),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(t&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(e){t&&window.history.pushState(n.state,"",n.state.url),n.push(e)})}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=this;return fetch(this.state.url,a).then(function(t){if(t.status>=200&&t.status<300)return t.text();throw e.emit("NAVIGATE_ERROR"),new Error(t.statusText)})})},{key:"push",value:function(e){var t=this;this.cache[this.pathname]=e;var n=i.default.getView(e),r=i.default.getTitle(e),o=i.default.getTransition(e,this.transitions);this.to=new(i.default.getRenderer(e,this.renderers))(n,r,o);var u=this.from.view,a=this.to.view;this.emit("NAVIGATE_START",u,a,r,this.state),this.from.hide().then(function(){t.to.show().then(function(){t.navigating=!1,t.from=t.to,i.default.getAnchor(t.state.url)&&t.scrollTo(i.default.getAnchor(t.state.url)),t.emit("NAVIGATE_END",u,a,r,t.state)}),window.scrollTo(0,0)})}},{key:"scrollTo",value:function(e){var t=document.querySelector(e);t&&window.scrollTo(t.offsetLeft,t.offsetTop)}}]),t}();e.exports=f},function(e,t,n){"use strict";var r=a(n(4)),o=a(n(0)),i=a(n(2)),u=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}var f={Core:r.default,Helpers:o.default,Renderer:i.default,Transition:u.default};e.exports=f}])},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";var r=u(n(0)),o=u(n(2)),i=u(n(1));function u(e){return e&&e.__esModule?e:{default:e}}new r.default.Core({renderers:{home:o.default,page:i.default}}).on("NAVIGATE_START",function(e,t,n,r){"undefined"!=typeof gtag&>ag("config","GA_TRACKING_ID",{page_path:r.pathname,page_title:n,page_location:r.url})})}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";var r=/<title>(.+)<\/title>/,o=/\?([\w_\-.=&]+)/,i=/(#.*)$/,u=/(https?:\/\/[\w\-.]+)/,a=/https?:\/\/.*?(\/[\w_\-./]+)/,f=/[-_](\w)/g;function c(e){var t=e.match(u);return t?t[1]:null}function l(e){var t=e.match(a);return t?t[1]:null}function s(e){var t=e.match(i);return t?t[1]:null}function h(e){var t=e.match(o);if(!t)return null;for(var n=t[1].split("&"),r={},i=0;i<n.length;i++){var u=n[i].split("="),a=u[0],f=u[1];r[a]=f}return r}function p(e){var t=document.createElement("div");return t.innerHTML=e,t.querySelector("[router-view]")}function d(e){return p(e).getAttribute("router-view")}e.exports={getSlug:d,getView:p,getInfos:function(e){return{url:e,anchor:s(e),origin:c(e),params:h(e),pathname:l(e)}},getTitle:function(e){var t=e.match(r);return t?t[1]:""},getParam:function(e,t){var n=h(e);return n.hasOwnProperty(t)?n[t]:null},getParams:h,getOrigin:c,getAnchor:s,getPathname:l,getRenderer:function(e,t){var n=d(e);return t.hasOwnProperty(n)?t[n]:null},getTransition:function(e,t){if(void 0===t)return null;var n=d(e);return t.hasOwnProperty(n)&&t[n]?t[n]:t.hasOwnProperty("default")?t.default:null},camelize:function(e){return e.replace(f,function(e,t){return t?t.toUpperCase():""})}}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.in&&"function"==typeof e.in&&e.in(e.view,t)})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.out&&"function"==typeof e.out&&e.out(e.view,t)})}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t,this.title=n,this.transition=new r(t),n&&document.title!==n&&(document.title=n),this.wrapper=null}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.wrapper=document.querySelector("[router-wrapper]"),e.wrapper.appendChild(e.view),e.onEnter&&e.onEnter();var n=function(){e.onEnterCompleted&&e.onEnterCompleted(),t()};e.transition?e.transition.show().then(n):n()})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.wrapper=e.view.parentNode,e.onLeave&&e.onLeave();var n=function(){e.wrapper.removeChild(e.view),e.onLeaveCompleted&&e.onLeaveCompleted(),t()};e.transition?e.transition.hide().then(n):n()})}}]),e}();e.exports=o},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,u=r.length;i<u;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(3)),i=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var a={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.renderers=e.renderers,n.transitions=e.transitions,n.mode=e.mode||"out-in",n.state={},n.cache={},n.navigating=!1,n.page=document.documentElement.outerHTML,n.pathname=i.default.getPathname(window.location.href),n.cache[n.pathname]=n.page;var r=document.querySelector("[router-view]"),o=i.default.getTransition(n.page,n.transitions);return n.from=new(i.default.getRenderer(n.page,n.renderers))(r,null,o),n.from.onEnter(),n.from.onEnterCompleted(),window.addEventListener("popstate",n.popState.bind(n)),n.bubble(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),r(t,[{key:"bubble",value:function(){var e=this;document.addEventListener("click",function(t){if("A"===t.target.tagName){var n=i.default.getAnchor(t.target.href),r=i.default.getPathname(t.target.href);t.target.target||(t.preventDefault(),e.navigating||r===e.pathname?n&&(window.location.href=t.target.href):e.pushState(t))}})}},{key:"popState",value:function(){i.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(e){this.beforeFetch(e.target.href,!0)}},{key:"beforeFetch",value:function(e,t){var n=this;if(this.navigating=!0,this.state=i.default.getInfos(e),this.pathname=i.default.getPathname(e),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(t&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(e){t&&window.history.pushState(n.state,"",n.state.url),n.push(e)})}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=this;return fetch(this.state.url,a).then(function(t){if(t.status>=200&&t.status<300)return t.text();throw e.emit("NAVIGATE_ERROR"),new Error(t.statusText)})})},{key:"push",value:function(e){var t=this;this.cache[this.pathname]=e;var n=i.default.getView(e),r=i.default.getTitle(e),o=i.default.getTransition(e,this.transitions);this.to=new(i.default.getRenderer(e,this.renderers))(n,r,o);var u=this.from.view,a=this.to.view;this.emit("NAVIGATE_START",u,a,r,this.state);var f=i.default.camelize(this.mode);"function"==typeof this[f]&&this[f]().then(function(){t.navigating=!1,t.from=t.to,i.default.getAnchor(t.state.url)&&t.scrollTo(i.default.getAnchor(t.state.url)),t.emit("NAVIGATE_END",u,a,r,t.state)})}},{key:"outIn",value:function(){var e=this;return this.from.hide().then(function(){window.scrollTo(0,0)}).then(function(){e.to.show()})}},{key:"inOut",value:function(){var e=this;return this.to.show().then(function(){window.scrollTo(0,0)}).then(function(){e.from.hide()})}},{key:"both",value:function(){return Promise.all([this.to.show(),this.from.hide()]).then(function(){window.scrollTo(0,0)})}},{key:"scrollTo",value:function(e){var t=document.querySelector(e);t&&window.scrollTo(t.offsetLeft,t.offsetTop)}}]),t}();e.exports=f},function(e,t,n){"use strict";var r=a(n(4)),o=a(n(0)),i=a(n(2)),u=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}var f={Core:r.default,Helpers:o.default,Renderer:i.default,Transition:u.default};e.exports=f}])},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";var r=u(n(0)),o=u(n(2)),i=u(n(1));function u(e){return e&&e.__esModule?e:{default:e}}new r.default.Core({renderers:{home:o.default,page:i.default}}).on("NAVIGATE_START",function(e,t,n,r){"undefined"!=typeof gtag&>ag("config","GA_TRACKING_ID",{page_path:r.pathname,page_title:n,page_location:r.url})})}]); \ No newline at end of file diff --git a/examples/basic-google-analytics/package.json b/examples/basic-google-analytics/package.json index 99248cb..e663156 100644 --- a/examples/basic-google-analytics/package.json +++ b/examples/basic-google-analytics/package.json @@ -1,7 +1,7 @@ { "name": "@dogstudio/highway", "license": "MIT", - "version": "1.0.1", + "version": "1.1.0", "main": "dist/index.js", "scripts": { "build": "webpack", @@ -16,6 +16,6 @@ "webpack-cli": "^2.0.12" }, "dependencies": { - "@dogstudio/highway": "^1.0.1" + "@dogstudio/highway": "^1.1.0" } } diff --git a/examples/basic-google-analytics/yarn.lock b/examples/basic-google-analytics/yarn.lock index e6f349c..d83cb75 100644 --- a/examples/basic-google-analytics/yarn.lock +++ b/examples/basic-google-analytics/yarn.lock @@ -2,9 +2,9 @@ # yarn lockfile v1 -"@dogstudio/highway@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@dogstudio/highway/-/highway-1.0.1.tgz#1d38da001396363b2502b3c38a61ba2c13921131" +"@dogstudio/highway@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@dogstudio/highway/-/highway-1.1.0.tgz#f6282309ec9e9a8529b03b72e2a8d308e8dce44d" "@sindresorhus/is@^0.7.0": version "0.7.0" diff --git a/examples/basic-menu-active/dist/index.js b/examples/basic-menu-active/dist/index.js index a71b69e..2a924d5 100644 --- a/examples/basic-menu-active/dist/index.js +++ b/examples/basic-menu-active/dist/index.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";var r=/<title>(.+)<\/title>/,o=/\?([\w_\-.=&]+)/,i=/(#.*)$/,u=/(https?:\/\/[\w\-.]+)/,a=/https?:\/\/.*?(\/[\w_\-./]+)/;function f(e){var t=e.match(u);return t?t[1]:null}function c(e){var t=e.match(a);return t?t[1]:null}function l(e){var t=e.match(i);return t?t[1]:null}function s(e){var t=e.match(o);if(!t)return null;for(var n=t[1].split("&"),r={},i=0;i<n.length;i++){var u=n[i].split("="),a=u[0],f=u[1];r[a]=f}return r}function p(e){var t=document.createElement("div");return t.innerHTML=e,t.querySelector("[router-view]")}function h(e){return p(e).getAttribute("router-view")}e.exports={getSlug:h,getView:p,getInfos:function(e){return{url:e,anchor:l(e),origin:f(e),params:s(e),pathname:c(e)}},getTitle:function(e){var t=e.match(r);return t?t[1]:""},getParam:function(e,t){var n=s(e);return n.hasOwnProperty(t)?n[t]:null},getParams:s,getOrigin:f,getAnchor:l,getPathname:c,getRenderer:function(e,t){var n=h(e);return t.hasOwnProperty(n)?t[n]:null},getTransition:function(e,t){if(void 0===t)return null;var n=h(e);return t.hasOwnProperty(n)&&t[n]?t[n]:t.hasOwnProperty("default")?t.default:null}}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.in&&"function"==typeof e.in&&e.in(e.view,t)})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.out&&"function"==typeof e.out&&e.out(e.view,t)})}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t,this.title=n,this.transition=new r(t),n&&document.title!==n&&(document.title=n),this.wrapper=null}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.wrapper=document.querySelector("[router-wrapper]"),e.wrapper.appendChild(e.view),e.onEnter&&e.onEnter();var n=function(){e.onEnterCompleted&&e.onEnterCompleted(),t()};e.transition?e.transition.show().then(n):n()})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.wrapper=e.view.parentNode,e.onLeave&&e.onLeave();var n=function(){e.wrapper.removeChild(e.view),e.onLeaveCompleted&&e.onLeaveCompleted(),t()};e.transition?e.transition.hide().then(n):n()})}}]),e}();e.exports=o},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,u=r.length;i<u;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(3)),i=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var a={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.renderers=e.renderers,n.transitions=e.transitions,n.state={},n.cache={},n.navigating=!1,n.page=document.documentElement.outerHTML,n.pathname=i.default.getPathname(window.location.href),n.cache[n.pathname]=n.page;var r=document.querySelector("[router-view]"),o=i.default.getTransition(n.page,n.transitions);return n.from=new(i.default.getRenderer(n.page,n.renderers))(r,null,o),n.from.onEnter(),n.from.onEnterCompleted(),window.addEventListener("popstate",n.popState.bind(n)),n.bubble(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),r(t,[{key:"bubble",value:function(){var e=this;document.addEventListener("click",function(t){if("A"===t.target.tagName){var n=i.default.getAnchor(t.target.href),r=i.default.getPathname(t.target.href);t.target.target||(t.preventDefault(),e.navigating||r===e.pathname?n&&(window.location.href=t.target.href):e.pushState(t))}})}},{key:"popState",value:function(){i.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(e){this.beforeFetch(e.target.href,!0)}},{key:"beforeFetch",value:function(e,t){var n=this;if(this.navigating=!0,this.state=i.default.getInfos(e),this.pathname=i.default.getPathname(e),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(t&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(e){t&&window.history.pushState(n.state,"",n.state.url),n.push(e)})}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=this;return fetch(this.state.url,a).then(function(t){if(t.status>=200&&t.status<300)return t.text();throw e.emit("NAVIGATE_ERROR"),new Error(t.statusText)})})},{key:"push",value:function(e){var t=this;this.cache[this.pathname]=e;var n=i.default.getView(e),r=i.default.getTitle(e),o=i.default.getTransition(e,this.transitions);this.to=new(i.default.getRenderer(e,this.renderers))(n,r,o);var u=this.from.view,a=this.to.view;this.emit("NAVIGATE_START",u,a,r,this.state),this.from.hide().then(function(){t.to.show().then(function(){t.navigating=!1,t.from=t.to,i.default.getAnchor(t.state.url)&&t.scrollTo(i.default.getAnchor(t.state.url)),t.emit("NAVIGATE_END",u,a,r,t.state)}),window.scrollTo(0,0)})}},{key:"scrollTo",value:function(e){var t=document.querySelector(e);t&&window.scrollTo(t.offsetLeft,t.offsetTop)}}]),t}();e.exports=f},function(e,t,n){"use strict";var r=a(n(4)),o=a(n(0)),i=a(n(2)),u=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}var f={Core:r.default,Helpers:o.default,Renderer:i.default,Transition:u.default};e.exports=f}])},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";var r,o,i=f(n(0)),u=f(n(2)),a=f(n(1));function f(e){return e&&e.__esModule?e:{default:e}}r=new i.default.Core({renderers:{home:u.default,page:a.default}}),o=document.querySelectorAll("nav a"),r.on("NAVIGATE_START",function(e,t,n,r){var i=!0,u=!1,a=void 0;try{for(var f,c=o[Symbol.iterator]();!(i=(f=c.next()).done);i=!0){var l=f.value;l.classList.remove("is-active"),l.href===r.url&&l.classList.add("is-active")}}catch(e){u=!0,a=e}finally{try{!i&&c.return&&c.return()}finally{if(u)throw a}}})}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";var r=/<title>(.+)<\/title>/,o=/\?([\w_\-.=&]+)/,i=/(#.*)$/,u=/(https?:\/\/[\w\-.]+)/,a=/https?:\/\/.*?(\/[\w_\-./]+)/,f=/[-_](\w)/g;function c(e){var t=e.match(u);return t?t[1]:null}function l(e){var t=e.match(a);return t?t[1]:null}function s(e){var t=e.match(i);return t?t[1]:null}function h(e){var t=e.match(o);if(!t)return null;for(var n=t[1].split("&"),r={},i=0;i<n.length;i++){var u=n[i].split("="),a=u[0],f=u[1];r[a]=f}return r}function p(e){var t=document.createElement("div");return t.innerHTML=e,t.querySelector("[router-view]")}function d(e){return p(e).getAttribute("router-view")}e.exports={getSlug:d,getView:p,getInfos:function(e){return{url:e,anchor:s(e),origin:c(e),params:h(e),pathname:l(e)}},getTitle:function(e){var t=e.match(r);return t?t[1]:""},getParam:function(e,t){var n=h(e);return n.hasOwnProperty(t)?n[t]:null},getParams:h,getOrigin:c,getAnchor:s,getPathname:l,getRenderer:function(e,t){var n=d(e);return t.hasOwnProperty(n)?t[n]:null},getTransition:function(e,t){if(void 0===t)return null;var n=d(e);return t.hasOwnProperty(n)&&t[n]?t[n]:t.hasOwnProperty("default")?t.default:null},camelize:function(e){return e.replace(f,function(e,t){return t?t.toUpperCase():""})}}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.in&&"function"==typeof e.in&&e.in(e.view,t)})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.out&&"function"==typeof e.out&&e.out(e.view,t)})}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t,this.title=n,this.transition=new r(t),n&&document.title!==n&&(document.title=n),this.wrapper=null}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.wrapper=document.querySelector("[router-wrapper]"),e.wrapper.appendChild(e.view),e.onEnter&&e.onEnter();var n=function(){e.onEnterCompleted&&e.onEnterCompleted(),t()};e.transition?e.transition.show().then(n):n()})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.wrapper=e.view.parentNode,e.onLeave&&e.onLeave();var n=function(){e.wrapper.removeChild(e.view),e.onLeaveCompleted&&e.onLeaveCompleted(),t()};e.transition?e.transition.hide().then(n):n()})}}]),e}();e.exports=o},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,u=r.length;i<u;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(3)),i=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var a={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.renderers=e.renderers,n.transitions=e.transitions,n.mode=e.mode||"out-in",n.state={},n.cache={},n.navigating=!1,n.page=document.documentElement.outerHTML,n.pathname=i.default.getPathname(window.location.href),n.cache[n.pathname]=n.page;var r=document.querySelector("[router-view]"),o=i.default.getTransition(n.page,n.transitions);return n.from=new(i.default.getRenderer(n.page,n.renderers))(r,null,o),n.from.onEnter(),n.from.onEnterCompleted(),window.addEventListener("popstate",n.popState.bind(n)),n.bubble(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),r(t,[{key:"bubble",value:function(){var e=this;document.addEventListener("click",function(t){if("A"===t.target.tagName){var n=i.default.getAnchor(t.target.href),r=i.default.getPathname(t.target.href);t.target.target||(t.preventDefault(),e.navigating||r===e.pathname?n&&(window.location.href=t.target.href):e.pushState(t))}})}},{key:"popState",value:function(){i.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(e){this.beforeFetch(e.target.href,!0)}},{key:"beforeFetch",value:function(e,t){var n=this;if(this.navigating=!0,this.state=i.default.getInfos(e),this.pathname=i.default.getPathname(e),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(t&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(e){t&&window.history.pushState(n.state,"",n.state.url),n.push(e)})}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=this;return fetch(this.state.url,a).then(function(t){if(t.status>=200&&t.status<300)return t.text();throw e.emit("NAVIGATE_ERROR"),new Error(t.statusText)})})},{key:"push",value:function(e){var t=this;this.cache[this.pathname]=e;var n=i.default.getView(e),r=i.default.getTitle(e),o=i.default.getTransition(e,this.transitions);this.to=new(i.default.getRenderer(e,this.renderers))(n,r,o);var u=this.from.view,a=this.to.view;this.emit("NAVIGATE_START",u,a,r,this.state);var f=i.default.camelize(this.mode);"function"==typeof this[f]&&this[f]().then(function(){t.navigating=!1,t.from=t.to,i.default.getAnchor(t.state.url)&&t.scrollTo(i.default.getAnchor(t.state.url)),t.emit("NAVIGATE_END",u,a,r,t.state)})}},{key:"outIn",value:function(){var e=this;return this.from.hide().then(function(){window.scrollTo(0,0)}).then(function(){e.to.show()})}},{key:"inOut",value:function(){var e=this;return this.to.show().then(function(){window.scrollTo(0,0)}).then(function(){e.from.hide()})}},{key:"both",value:function(){return Promise.all([this.to.show(),this.from.hide()]).then(function(){window.scrollTo(0,0)})}},{key:"scrollTo",value:function(e){var t=document.querySelector(e);t&&window.scrollTo(t.offsetLeft,t.offsetTop)}}]),t}();e.exports=f},function(e,t,n){"use strict";var r=a(n(4)),o=a(n(0)),i=a(n(2)),u=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}var f={Core:r.default,Helpers:o.default,Renderer:i.default,Transition:u.default};e.exports=f}])},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";var r,o,i=f(n(0)),u=f(n(2)),a=f(n(1));function f(e){return e&&e.__esModule?e:{default:e}}r=new i.default.Core({renderers:{home:u.default,page:a.default}}),o=document.querySelectorAll("nav a"),r.on("NAVIGATE_START",function(e,t,n,r){var i=!0,u=!1,a=void 0;try{for(var f,c=o[Symbol.iterator]();!(i=(f=c.next()).done);i=!0){var l=f.value;l.classList.remove("is-active"),l.href===r.url&&l.classList.add("is-active")}}catch(e){u=!0,a=e}finally{try{!i&&c.return&&c.return()}finally{if(u)throw a}}})}]); \ No newline at end of file diff --git a/examples/basic-menu-active/package.json b/examples/basic-menu-active/package.json index 99248cb..e663156 100644 --- a/examples/basic-menu-active/package.json +++ b/examples/basic-menu-active/package.json @@ -1,7 +1,7 @@ { "name": "@dogstudio/highway", "license": "MIT", - "version": "1.0.1", + "version": "1.1.0", "main": "dist/index.js", "scripts": { "build": "webpack", @@ -16,6 +16,6 @@ "webpack-cli": "^2.0.12" }, "dependencies": { - "@dogstudio/highway": "^1.0.1" + "@dogstudio/highway": "^1.1.0" } } diff --git a/examples/basic-menu-active/yarn.lock b/examples/basic-menu-active/yarn.lock index e6f349c..d83cb75 100644 --- a/examples/basic-menu-active/yarn.lock +++ b/examples/basic-menu-active/yarn.lock @@ -2,9 +2,9 @@ # yarn lockfile v1 -"@dogstudio/highway@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@dogstudio/highway/-/highway-1.0.1.tgz#1d38da001396363b2502b3c38a61ba2c13921131" +"@dogstudio/highway@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@dogstudio/highway/-/highway-1.1.0.tgz#f6282309ec9e9a8529b03b72e2a8d308e8dce44d" "@sindresorhus/is@^0.7.0": version "0.7.0" diff --git a/examples/basic-setup/dist/index.js b/examples/basic-setup/dist/index.js index d28b7be..2896d74 100644 --- a/examples/basic-setup/dist/index.js +++ b/examples/basic-setup/dist/index.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";var r=/<title>(.+)<\/title>/,o=/\?([\w_\-.=&]+)/,i=/(#.*)$/,u=/(https?:\/\/[\w\-.]+)/,a=/https?:\/\/.*?(\/[\w_\-./]+)/;function f(e){var t=e.match(u);return t?t[1]:null}function c(e){var t=e.match(a);return t?t[1]:null}function s(e){var t=e.match(i);return t?t[1]:null}function l(e){var t=e.match(o);if(!t)return null;for(var n=t[1].split("&"),r={},i=0;i<n.length;i++){var u=n[i].split("="),a=u[0],f=u[1];r[a]=f}return r}function p(e){var t=document.createElement("div");return t.innerHTML=e,t.querySelector("[router-view]")}function h(e){return p(e).getAttribute("router-view")}e.exports={getSlug:h,getView:p,getInfos:function(e){return{url:e,anchor:s(e),origin:f(e),params:l(e),pathname:c(e)}},getTitle:function(e){var t=e.match(r);return t?t[1]:""},getParam:function(e,t){var n=l(e);return n.hasOwnProperty(t)?n[t]:null},getParams:l,getOrigin:f,getAnchor:s,getPathname:c,getRenderer:function(e,t){var n=h(e);return t.hasOwnProperty(n)?t[n]:null},getTransition:function(e,t){if(void 0===t)return null;var n=h(e);return t.hasOwnProperty(n)&&t[n]?t[n]:t.hasOwnProperty("default")?t.default:null}}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.in&&"function"==typeof e.in&&e.in(e.view,t)})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.out&&"function"==typeof e.out&&e.out(e.view,t)})}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t,this.title=n,this.transition=new r(t),n&&document.title!==n&&(document.title=n),this.wrapper=null}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.wrapper=document.querySelector("[router-wrapper]"),e.wrapper.appendChild(e.view),e.onEnter&&e.onEnter();var n=function(){e.onEnterCompleted&&e.onEnterCompleted(),t()};e.transition?e.transition.show().then(n):n()})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.wrapper=e.view.parentNode,e.onLeave&&e.onLeave();var n=function(){e.wrapper.removeChild(e.view),e.onLeaveCompleted&&e.onLeaveCompleted(),t()};e.transition?e.transition.hide().then(n):n()})}}]),e}();e.exports=o},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,u=r.length;i<u;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(3)),i=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var a={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.renderers=e.renderers,n.transitions=e.transitions,n.state={},n.cache={},n.navigating=!1,n.page=document.documentElement.outerHTML,n.pathname=i.default.getPathname(window.location.href),n.cache[n.pathname]=n.page;var r=document.querySelector("[router-view]"),o=i.default.getTransition(n.page,n.transitions);return n.from=new(i.default.getRenderer(n.page,n.renderers))(r,null,o),n.from.onEnter(),n.from.onEnterCompleted(),window.addEventListener("popstate",n.popState.bind(n)),n.bubble(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),r(t,[{key:"bubble",value:function(){var e=this;document.addEventListener("click",function(t){if("A"===t.target.tagName){var n=i.default.getAnchor(t.target.href),r=i.default.getPathname(t.target.href);t.target.target||(t.preventDefault(),e.navigating||r===e.pathname?n&&(window.location.href=t.target.href):e.pushState(t))}})}},{key:"popState",value:function(){i.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(e){this.beforeFetch(e.target.href,!0)}},{key:"beforeFetch",value:function(e,t){var n=this;if(this.navigating=!0,this.state=i.default.getInfos(e),this.pathname=i.default.getPathname(e),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(t&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(e){t&&window.history.pushState(n.state,"",n.state.url),n.push(e)})}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=this;return fetch(this.state.url,a).then(function(t){if(t.status>=200&&t.status<300)return t.text();throw e.emit("NAVIGATE_ERROR"),new Error(t.statusText)})})},{key:"push",value:function(e){var t=this;this.cache[this.pathname]=e;var n=i.default.getView(e),r=i.default.getTitle(e),o=i.default.getTransition(e,this.transitions);this.to=new(i.default.getRenderer(e,this.renderers))(n,r,o);var u=this.from.view,a=this.to.view;this.emit("NAVIGATE_START",u,a,r,this.state),this.from.hide().then(function(){t.to.show().then(function(){t.navigating=!1,t.from=t.to,i.default.getAnchor(t.state.url)&&t.scrollTo(i.default.getAnchor(t.state.url)),t.emit("NAVIGATE_END",u,a,r,t.state)}),window.scrollTo(0,0)})}},{key:"scrollTo",value:function(e){var t=document.querySelector(e);t&&window.scrollTo(t.offsetLeft,t.offsetTop)}}]),t}();e.exports=f},function(e,t,n){"use strict";var r=a(n(4)),o=a(n(0)),i=a(n(2)),u=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}var f={Core:r.default,Helpers:o.default,Renderer:i.default,Transition:u.default};e.exports=f}])},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";var r=u(n(0)),o=u(n(2)),i=u(n(1));function u(e){return e&&e.__esModule?e:{default:e}}new r.default.Core({renderers:{home:o.default,page:i.default}})}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";var r=/<title>(.+)<\/title>/,o=/\?([\w_\-.=&]+)/,i=/(#.*)$/,u=/(https?:\/\/[\w\-.]+)/,a=/https?:\/\/.*?(\/[\w_\-./]+)/,f=/[-_](\w)/g;function c(e){var t=e.match(u);return t?t[1]:null}function s(e){var t=e.match(a);return t?t[1]:null}function l(e){var t=e.match(i);return t?t[1]:null}function h(e){var t=e.match(o);if(!t)return null;for(var n=t[1].split("&"),r={},i=0;i<n.length;i++){var u=n[i].split("="),a=u[0],f=u[1];r[a]=f}return r}function p(e){var t=document.createElement("div");return t.innerHTML=e,t.querySelector("[router-view]")}function d(e){return p(e).getAttribute("router-view")}e.exports={getSlug:d,getView:p,getInfos:function(e){return{url:e,anchor:l(e),origin:c(e),params:h(e),pathname:s(e)}},getTitle:function(e){var t=e.match(r);return t?t[1]:""},getParam:function(e,t){var n=h(e);return n.hasOwnProperty(t)?n[t]:null},getParams:h,getOrigin:c,getAnchor:l,getPathname:s,getRenderer:function(e,t){var n=d(e);return t.hasOwnProperty(n)?t[n]:null},getTransition:function(e,t){if(void 0===t)return null;var n=d(e);return t.hasOwnProperty(n)&&t[n]?t[n]:t.hasOwnProperty("default")?t.default:null},camelize:function(e){return e.replace(f,function(e,t){return t?t.toUpperCase():""})}}},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.in&&"function"==typeof e.in&&e.in(e.view,t)})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.out&&"function"==typeof e.out&&e.out(e.view,t)})}}]),e}();e.exports=o},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.view=t,this.title=n,this.transition=new r(t),n&&document.title!==n&&(document.title=n),this.wrapper=null}return r(e,[{key:"show",value:function(){var e=this;return new Promise(function(t){e.wrapper=document.querySelector("[router-wrapper]"),e.wrapper.appendChild(e.view),e.onEnter&&e.onEnter();var n=function(){e.onEnterCompleted&&e.onEnterCompleted(),t()};e.transition?e.transition.show().then(n):n()})}},{key:"hide",value:function(){var e=this;return new Promise(function(t){e.wrapper=e.view.parentNode,e.onLeave&&e.onLeave();var n=function(){e.wrapper.removeChild(e.view),e.onLeaveCompleted&&e.onLeaveCompleted(),t()};e.transition?e.transition.hide().then(n):n()})}}]),e}();e.exports=o},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,u=r.length;i<u;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(n(3)),i=u(n(0));function u(e){return e&&e.__esModule?e:{default:e}}var a={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.renderers=e.renderers,n.transitions=e.transitions,n.mode=e.mode||"out-in",n.state={},n.cache={},n.navigating=!1,n.page=document.documentElement.outerHTML,n.pathname=i.default.getPathname(window.location.href),n.cache[n.pathname]=n.page;var r=document.querySelector("[router-view]"),o=i.default.getTransition(n.page,n.transitions);return n.from=new(i.default.getRenderer(n.page,n.renderers))(r,null,o),n.from.onEnter(),n.from.onEnterCompleted(),window.addEventListener("popstate",n.popState.bind(n)),n.bubble(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.default),r(t,[{key:"bubble",value:function(){var e=this;document.addEventListener("click",function(t){if("A"===t.target.tagName){var n=i.default.getAnchor(t.target.href),r=i.default.getPathname(t.target.href);t.target.target||(t.preventDefault(),e.navigating||r===e.pathname?n&&(window.location.href=t.target.href):e.pushState(t))}})}},{key:"popState",value:function(){i.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(e){this.beforeFetch(e.target.href,!0)}},{key:"beforeFetch",value:function(e,t){var n=this;if(this.navigating=!0,this.state=i.default.getInfos(e),this.pathname=i.default.getPathname(e),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(t&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(e){t&&window.history.pushState(n.state,"",n.state.url),n.push(e)})}},{key:"fetch",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=this;return fetch(this.state.url,a).then(function(t){if(t.status>=200&&t.status<300)return t.text();throw e.emit("NAVIGATE_ERROR"),new Error(t.statusText)})})},{key:"push",value:function(e){var t=this;this.cache[this.pathname]=e;var n=i.default.getView(e),r=i.default.getTitle(e),o=i.default.getTransition(e,this.transitions);this.to=new(i.default.getRenderer(e,this.renderers))(n,r,o);var u=this.from.view,a=this.to.view;this.emit("NAVIGATE_START",u,a,r,this.state);var f=i.default.camelize(this.mode);"function"==typeof this[f]&&this[f]().then(function(){t.navigating=!1,t.from=t.to,i.default.getAnchor(t.state.url)&&t.scrollTo(i.default.getAnchor(t.state.url)),t.emit("NAVIGATE_END",u,a,r,t.state)})}},{key:"outIn",value:function(){var e=this;return this.from.hide().then(function(){window.scrollTo(0,0)}).then(function(){e.to.show()})}},{key:"inOut",value:function(){var e=this;return this.to.show().then(function(){window.scrollTo(0,0)}).then(function(){e.from.hide()})}},{key:"both",value:function(){return Promise.all([this.to.show(),this.from.hide()]).then(function(){window.scrollTo(0,0)})}},{key:"scrollTo",value:function(e){var t=document.querySelector(e);t&&window.scrollTo(t.offsetLeft,t.offsetTop)}}]),t}();e.exports=f},function(e,t,n){"use strict";var r=a(n(4)),o=a(n(0)),i=a(n(2)),u=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}var f={Core:r.default,Helpers:o.default,Renderer:i.default,Transition:u.default};e.exports=f}])},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),u=(r=i)&&r.__esModule?r:{default:r};var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u.default.Renderer),o(t,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),t}();t.default=a},function(e,t,n){"use strict";var r=u(n(0)),o=u(n(2)),i=u(n(1));function u(e){return e&&e.__esModule?e:{default:e}}new r.default.Core({renderers:{home:o.default,page:i.default}})}]); \ No newline at end of file diff --git a/examples/basic-setup/package.json b/examples/basic-setup/package.json index 99248cb..e663156 100644 --- a/examples/basic-setup/package.json +++ b/examples/basic-setup/package.json @@ -1,7 +1,7 @@ { "name": "@dogstudio/highway", "license": "MIT", - "version": "1.0.1", + "version": "1.1.0", "main": "dist/index.js", "scripts": { "build": "webpack", @@ -16,6 +16,6 @@ "webpack-cli": "^2.0.12" }, "dependencies": { - "@dogstudio/highway": "^1.0.1" + "@dogstudio/highway": "^1.1.0" } } diff --git a/examples/basic-setup/yarn.lock b/examples/basic-setup/yarn.lock index e6f349c..d83cb75 100644 --- a/examples/basic-setup/yarn.lock +++ b/examples/basic-setup/yarn.lock @@ -2,9 +2,9 @@ # yarn lockfile v1 -"@dogstudio/highway@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@dogstudio/highway/-/highway-1.0.1.tgz#1d38da001396363b2502b3c38a61ba2c13921131" +"@dogstudio/highway@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@dogstudio/highway/-/highway-1.1.0.tgz#f6282309ec9e9a8529b03b72e2a8d308e8dce44d" "@sindresorhus/is@^0.7.0": version "0.7.0" diff --git a/examples/basic-transition/dist/index.js b/examples/basic-transition/dist/index.js index 84648d0..01fa1ec 100644 --- a/examples/basic-transition/dist/index.js +++ b/examples/basic-transition/dist/index.js @@ -1,4 +1,4 @@ -!function(t){var e={};function i(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=6)}([function(t,e,i){var r;window,r=function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=5)}([function(t,e,i){"use strict";var r=/<title>(.+)<\/title>/,s=/\?([\w_\-.=&]+)/,n=/(#.*)$/,a=/(https?:\/\/[\w\-.]+)/,o=/https?:\/\/.*?(\/[\w_\-./]+)/;function l(t){var e=t.match(a);return e?e[1]:null}function h(t){var e=t.match(o);return e?e[1]:null}function u(t){var e=t.match(n);return e?e[1]:null}function f(t){var e=t.match(s);if(!e)return null;for(var i=e[1].split("&"),r={},n=0;n<i.length;n++){var a=i[n].split("="),o=a[0],l=a[1];r[o]=l}return r}function _(t){var e=document.createElement("div");return e.innerHTML=t,e.querySelector("[router-view]")}function c(t){return _(t).getAttribute("router-view")}t.exports={getSlug:c,getView:_,getInfos:function(t){return{url:t,anchor:u(t),origin:l(t),params:f(t),pathname:h(t)}},getTitle:function(t){var e=t.match(r);return e?e[1]:""},getParam:function(t,e){var i=f(t);return i.hasOwnProperty(e)?i[e]:null},getParams:f,getOrigin:l,getAnchor:u,getPathname:h,getRenderer:function(t,e){var i=c(t);return e.hasOwnProperty(i)?e[i]:null},getTransition:function(t,e){if(void 0===e)return null;var i=c(t);return e.hasOwnProperty(i)&&e[i]?e[i]:e.hasOwnProperty("default")?e.default:null}}},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}();var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.view=e}return r(t,[{key:"show",value:function(){var t=this;return new Promise(function(e){t.in&&"function"==typeof t.in&&t.in(t.view,e)})}},{key:"hide",value:function(){var t=this;return new Promise(function(e){t.out&&"function"==typeof t.out&&t.out(t.view,e)})}}]),t}();t.exports=s},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}();var s=function(){function t(e,i,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.view=e,this.title=i,this.transition=new r(e),i&&document.title!==i&&(document.title=i),this.wrapper=null}return r(t,[{key:"show",value:function(){var t=this;return new Promise(function(e){t.wrapper=document.querySelector("[router-wrapper]"),t.wrapper.appendChild(t.view),t.onEnter&&t.onEnter();var i=function(){t.onEnterCompleted&&t.onEnterCompleted(),e()};t.transition?t.transition.show().then(i):i()})}},{key:"hide",value:function(){var t=this;return new Promise(function(e){t.wrapper=t.view.parentNode,t.onLeave&&t.onLeave();var i=function(){t.wrapper.removeChild(t.view),t.onLeaveCompleted&&t.onLeaveCompleted(),e()};t.transition?t.transition.hide().then(i):i()})}}]),t}();t.exports=s},function(t,e){function i(){}i.prototype={on:function(t,e,i){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){var r=this;function s(){r.off(t,s),e.apply(i,arguments)}return s._=e,this.on(t,s,i)},emit:function(t){for(var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),r=0,s=i.length;r<s;r++)i[r].fn.apply(i[r].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),r=i[t],s=[];if(r&&e)for(var n=0,a=r.length;n<a;n++)r[n].fn!==e&&r[n].fn._!==e&&s.push(r[n]);return s.length?i[t]=s:delete i[t],this}},t.exports=i},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),s=a(i(3)),n=a(i(0));function a(t){return t&&t.__esModule?t:{default:t}}var o={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));i.renderers=t.renderers,i.transitions=t.transitions,i.state={},i.cache={},i.navigating=!1,i.page=document.documentElement.outerHTML,i.pathname=n.default.getPathname(window.location.href),i.cache[i.pathname]=i.page;var r=document.querySelector("[router-view]"),s=n.default.getTransition(i.page,i.transitions);return i.from=new(n.default.getRenderer(i.page,i.renderers))(r,null,s),i.from.onEnter(),i.from.onEnterCompleted(),window.addEventListener("popstate",i.popState.bind(i)),i.bubble(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default),r(e,[{key:"bubble",value:function(){var t=this;document.addEventListener("click",function(e){if("A"===e.target.tagName){var i=n.default.getAnchor(e.target.href),r=n.default.getPathname(e.target.href);e.target.target||(e.preventDefault(),t.navigating||r===t.pathname?i&&(window.location.href=e.target.href):t.pushState(e))}})}},{key:"popState",value:function(){n.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(t){this.beforeFetch(t.target.href,!0)}},{key:"beforeFetch",value:function(t,e){var i=this;if(this.navigating=!0,this.state=n.default.getInfos(t),this.pathname=n.default.getPathname(t),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(e&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(t){e&&window.history.pushState(i.state,"",i.state.url),i.push(t)})}},{key:"fetch",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){var t=this;return fetch(this.state.url,o).then(function(e){if(e.status>=200&&e.status<300)return e.text();throw t.emit("NAVIGATE_ERROR"),new Error(e.statusText)})})},{key:"push",value:function(t){var e=this;this.cache[this.pathname]=t;var i=n.default.getView(t),r=n.default.getTitle(t),s=n.default.getTransition(t,this.transitions);this.to=new(n.default.getRenderer(t,this.renderers))(i,r,s);var a=this.from.view,o=this.to.view;this.emit("NAVIGATE_START",a,o,r,this.state),this.from.hide().then(function(){e.to.show().then(function(){e.navigating=!1,e.from=e.to,n.default.getAnchor(e.state.url)&&e.scrollTo(n.default.getAnchor(e.state.url)),e.emit("NAVIGATE_END",a,o,r,e.state)}),window.scrollTo(0,0)})}},{key:"scrollTo",value:function(t){var e=document.querySelector(t);e&&window.scrollTo(e.offsetLeft,e.offsetTop)}}]),e}();t.exports=l},function(t,e,i){"use strict";var r=o(i(4)),s=o(i(0)),n=o(i(2)),a=o(i(1));function o(t){return t&&t.__esModule?t:{default:t}}var l={Core:r.default,Helpers:s.default,Renderer:n.default,Transition:a.default};t.exports=l}])},t.exports=r()},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){(function(i){var r,s=void 0!==t&&t.exports&&void 0!==i?i:this||window; +!function(t){var e={};function i(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=6)}([function(t,e,i){var r;window,r=function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var s=e[r]={i:r,l:!1,exports:{}};return t[r].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=5)}([function(t,e,i){"use strict";var r=/<title>(.+)<\/title>/,s=/\?([\w_\-.=&]+)/,n=/(#.*)$/,a=/(https?:\/\/[\w\-.]+)/,o=/https?:\/\/.*?(\/[\w_\-./]+)/,l=/[-_](\w)/g;function h(t){var e=t.match(a);return e?e[1]:null}function u(t){var e=t.match(o);return e?e[1]:null}function f(t){var e=t.match(n);return e?e[1]:null}function _(t){var e=t.match(s);if(!e)return null;for(var i=e[1].split("&"),r={},n=0;n<i.length;n++){var a=i[n].split("="),o=a[0],l=a[1];r[o]=l}return r}function c(t){var e=document.createElement("div");return e.innerHTML=t,e.querySelector("[router-view]")}function p(t){return c(t).getAttribute("router-view")}t.exports={getSlug:p,getView:c,getInfos:function(t){return{url:t,anchor:f(t),origin:h(t),params:_(t),pathname:u(t)}},getTitle:function(t){var e=t.match(r);return e?e[1]:""},getParam:function(t,e){var i=_(t);return i.hasOwnProperty(e)?i[e]:null},getParams:_,getOrigin:h,getAnchor:f,getPathname:u,getRenderer:function(t,e){var i=p(t);return e.hasOwnProperty(i)?e[i]:null},getTransition:function(t,e){if(void 0===e)return null;var i=p(t);return e.hasOwnProperty(i)&&e[i]?e[i]:e.hasOwnProperty("default")?e.default:null},camelize:function(t){return t.replace(l,function(t,e){return e?e.toUpperCase():""})}}},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}();var s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.view=e}return r(t,[{key:"show",value:function(){var t=this;return new Promise(function(e){t.in&&"function"==typeof t.in&&t.in(t.view,e)})}},{key:"hide",value:function(){var t=this;return new Promise(function(e){t.out&&"function"==typeof t.out&&t.out(t.view,e)})}}]),t}();t.exports=s},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}();var s=function(){function t(e,i,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.view=e,this.title=i,this.transition=new r(e),i&&document.title!==i&&(document.title=i),this.wrapper=null}return r(t,[{key:"show",value:function(){var t=this;return new Promise(function(e){t.wrapper=document.querySelector("[router-wrapper]"),t.wrapper.appendChild(t.view),t.onEnter&&t.onEnter();var i=function(){t.onEnterCompleted&&t.onEnterCompleted(),e()};t.transition?t.transition.show().then(i):i()})}},{key:"hide",value:function(){var t=this;return new Promise(function(e){t.wrapper=t.view.parentNode,t.onLeave&&t.onLeave();var i=function(){t.wrapper.removeChild(t.view),t.onLeaveCompleted&&t.onLeaveCompleted(),e()};t.transition?t.transition.hide().then(i):i()})}}]),t}();t.exports=s},function(t,e){function i(){}i.prototype={on:function(t,e,i){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){var r=this;function s(){r.off(t,s),e.apply(i,arguments)}return s._=e,this.on(t,s,i)},emit:function(t){for(var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),r=0,s=i.length;r<s;r++)i[r].fn.apply(i[r].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),r=i[t],s=[];if(r&&e)for(var n=0,a=r.length;n<a;n++)r[n].fn!==e&&r[n].fn._!==e&&s.push(r[n]);return s.length?i[t]=s:delete i[t],this}},t.exports=i},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),s=a(i(3)),n=a(i(0));function a(t){return t&&t.__esModule?t:{default:t}}var o={mode:"same-origin",method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"},credentials:"same-origin"},l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));i.renderers=t.renderers,i.transitions=t.transitions,i.mode=t.mode||"out-in",i.state={},i.cache={},i.navigating=!1,i.page=document.documentElement.outerHTML,i.pathname=n.default.getPathname(window.location.href),i.cache[i.pathname]=i.page;var r=document.querySelector("[router-view]"),s=n.default.getTransition(i.page,i.transitions);return i.from=new(n.default.getRenderer(i.page,i.renderers))(r,null,s),i.from.onEnter(),i.from.onEnterCompleted(),window.addEventListener("popstate",i.popState.bind(i)),i.bubble(),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,s.default),r(e,[{key:"bubble",value:function(){var t=this;document.addEventListener("click",function(e){if("A"===e.target.tagName){var i=n.default.getAnchor(e.target.href),r=n.default.getPathname(e.target.href);e.target.target||(e.preventDefault(),t.navigating||r===t.pathname?i&&(window.location.href=e.target.href):t.pushState(e))}})}},{key:"popState",value:function(){n.default.getPathname(window.location.href)!==this.pathname&&this.beforeFetch(window.location.href,!1)}},{key:"pushState",value:function(t){this.beforeFetch(t.target.href,!0)}},{key:"beforeFetch",value:function(t,e){var i=this;if(this.navigating=!0,this.state=n.default.getInfos(t),this.pathname=n.default.getPathname(t),this.cache.hasOwnProperty(this.pathname))return this.push(this.cache[this.pathname]),void(e&&window.history.pushState(this.state,"",this.state.url));this.fetch().then(function(t){e&&window.history.pushState(i.state,"",i.state.url),i.push(t)})}},{key:"fetch",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){var t=this;return fetch(this.state.url,o).then(function(e){if(e.status>=200&&e.status<300)return e.text();throw t.emit("NAVIGATE_ERROR"),new Error(e.statusText)})})},{key:"push",value:function(t){var e=this;this.cache[this.pathname]=t;var i=n.default.getView(t),r=n.default.getTitle(t),s=n.default.getTransition(t,this.transitions);this.to=new(n.default.getRenderer(t,this.renderers))(i,r,s);var a=this.from.view,o=this.to.view;this.emit("NAVIGATE_START",a,o,r,this.state);var l=n.default.camelize(this.mode);"function"==typeof this[l]&&this[l]().then(function(){e.navigating=!1,e.from=e.to,n.default.getAnchor(e.state.url)&&e.scrollTo(n.default.getAnchor(e.state.url)),e.emit("NAVIGATE_END",a,o,r,e.state)})}},{key:"outIn",value:function(){var t=this;return this.from.hide().then(function(){window.scrollTo(0,0)}).then(function(){t.to.show()})}},{key:"inOut",value:function(){var t=this;return this.to.show().then(function(){window.scrollTo(0,0)}).then(function(){t.from.hide()})}},{key:"both",value:function(){return Promise.all([this.to.show(),this.from.hide()]).then(function(){window.scrollTo(0,0)})}},{key:"scrollTo",value:function(t){var e=document.querySelector(t);e&&window.scrollTo(e.offsetLeft,e.offsetTop)}}]),e}();t.exports=l},function(t,e,i){"use strict";var r=o(i(4)),s=o(i(0)),n=o(i(2)),a=o(i(1));function o(t){return t&&t.__esModule?t:{default:t}}var l={Core:r.default,Helpers:s.default,Renderer:n.default,Transition:a.default};t.exports=l}])},t.exports=r()},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){(function(i){var r,s=void 0!==t&&t.exports&&void 0!==i?i:this||window; /*! * VERSION: 1.20.4 * DATE: 2018-02-15 @@ -11,4 +11,4 @@ * Club GreenSock members, the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com - **/(s._gsQueue||(s._gsQueue=[])).push(function(){"use strict";var t,e,i,r,n,a,o,l,h,u,f,_,c,p;s._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var r=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},s=function(t,e,i){var r,s,n=t.cycle;for(r in n)s=n[r],t[r]="function"==typeof s?s(i,e[i]):s[i%s.length];delete t.cycle},n=function(t,e,r){i.call(this,t,e,r),this._cycle=0,this._yoyo=!0===this.vars.yoyo||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=n.prototype.render},a=i._internals,o=a.isSelector,l=a.isArray,h=n.prototype=i.to({},.1,{}),u=[];n.version="1.20.4",h.constructor=n,h.kill()._gc=!1,n.killTweensOf=n.killDelayedCallsTo=i.killTweensOf,n.getTweensOf=i.getTweensOf,n.lagSmoothing=i.lagSmoothing,n.ticker=i.ticker,n.render=i.render,h.invalidate=function(){return this._yoyo=!0===this.vars.yoyo||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),i.prototype.invalidate.call(this)},h.updateTo=function(t,e){var r,s=this.ratio,n=this.vars.immediateRender||t.immediateRender;for(r in e&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay)),t)this.vars[r]=t[r];if(this._initted||n)if(e)this._initted=!1,n&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&i._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var a=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(a,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||n)for(var o,l=1/(1-s),h=this._firstPT;h;)o=h.s+h.c,h.c*=l,h.s=o-h.c,h=h._next;return this},h.render=function(t,e,r){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var s,n,o,l,h,u,f,_,c,p=this._dirty?this.totalDuration():this._totalDuration,d=this._time,m=this._totalTime,g=this._cycle,v=this._duration,y=this._rawPrevTime;if(t>=p-1e-7&&t>=0?(this._totalTime=p,this._cycle=this._repeat,this._yoyo&&0!=(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=v,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(s=!0,n="onComplete",r=r||this._timeline.autoRemoveChildren),0===v&&(this._initted||!this.vars.lazy||r)&&(this._startTime===this._timeline._duration&&(t=0),(y<0||t<=0&&t>=-1e-7||1e-10===y&&"isPause"!==this.data)&&y!==t&&(r=!0,y>1e-10&&(n="onReverseComplete")),this._rawPrevTime=_=!e||t||y===t?t:1e-10)):t<1e-7?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==m||0===v&&y>0)&&(n="onReverseComplete",s=this._reversed),t<0&&(this._active=!1,0===v&&(this._initted||!this.vars.lazy||r)&&(y>=0&&(r=!0),this._rawPrevTime=_=!e||t||y===t?t:1e-10)),this._initted||(r=!0)):(this._totalTime=this._time=t,0!==this._repeat&&(l=v+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&m<=t&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!=(1&this._cycle)&&(this._time=v-this._time,(c=this._yoyoEase||this.vars.yoyoEase)&&(this._yoyoEase||(!0!==c||this._initted?this._yoyoEase=c=!0===c?this._ease:c instanceof Ease?c:Ease.map[c]:(c=this.vars.ease,this._yoyoEase=c=c?c instanceof Ease?c:"function"==typeof c?new Ease(c,this.vars.easeParams):Ease.map[c]||i.defaultEase:i.defaultEase)),this.ratio=c?1-c.getRatio((v-this._time)/v):0)),this._time>v?this._time=v:this._time<0&&(this._time=0)),this._easeType&&!c?(h=this._time/v,(1===(u=this._easeType)||3===u&&h>=.5)&&(h=1-h),3===u&&(h*=2),1===(f=this._easePower)?h*=h:2===f?h*=h*h:3===f?h*=h*h*h:4===f&&(h*=h*h*h*h),1===u?this.ratio=1-h:2===u?this.ratio=h:this._time/v<.5?this.ratio=h/2:this.ratio=1-h/2):c||(this.ratio=this._ease.getRatio(this._time/v))),d!==this._time||r||g!==this._cycle){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!r&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=d,this._totalTime=m,this._rawPrevTime=y,this._cycle=g,a.lazyTweens.push(this),void(this._lazy=[t,e]);!this._time||s||c?s&&this._ease._calcEnd&&!c&&(this.ratio=this._ease.getRatio(0===this._time?0:1)):this.ratio=this._ease.getRatio(this._time/v)}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==d&&t>=0&&(this._active=!0),0===m&&(2===this._initted&&t>0&&this._init(),this._startAt&&(t>=0?this._startAt.render(t,!0,r):n||(n="_dummyGS")),this.vars.onStart&&(0===this._totalTime&&0!==v||e||this._callback("onStart"))),o=this._firstPT;o;)o.f?o.t[o.p](o.c*this.ratio+o.s):o.t[o.p]=o.c*this.ratio+o.s,o=o._next;this._onUpdate&&(t<0&&this._startAt&&this._startTime&&this._startAt.render(t,!0,r),e||(this._totalTime!==m||n)&&this._callback("onUpdate")),this._cycle!==g&&(e||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),n&&(this._gc&&!r||(t<0&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,!0,r),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[n]&&this._callback(n),0===v&&1e-10===this._rawPrevTime&&1e-10!==_&&(this._rawPrevTime=0)))}else m!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},n.to=function(t,e,i){return new n(t,e,i)},n.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new n(t,e,i)},n.fromTo=function(t,e,i,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new n(t,e,r)},n.staggerTo=n.allTo=function(t,e,a,h,f,_,c){h=h||0;var p,d,m,g,v=0,y=[],T=function(){a.onComplete&&a.onComplete.apply(a.onCompleteScope||this,arguments),f.apply(c||a.callbackScope||this,_||u)},x=a.cycle,b=a.startAt&&a.startAt.cycle;for(l(t)||("string"==typeof t&&(t=i.selector(t)||t),o(t)&&(t=r(t))),t=t||[],h<0&&((t=r(t)).reverse(),h*=-1),p=t.length-1,m=0;m<=p;m++){for(g in d={},a)d[g]=a[g];if(x&&(s(d,t,m),null!=d.duration&&(e=d.duration,delete d.duration)),b){for(g in b=d.startAt={},a.startAt)b[g]=a.startAt[g];s(d.startAt,t,m)}d.delay=v+(d.delay||0),m===p&&f&&(d.onComplete=T),y[m]=new n(t[m],e,d),v+=h}return y},n.staggerFrom=n.allFrom=function(t,e,i,r,s,a,o){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,n.staggerTo(t,e,i,r,s,a,o)},n.staggerFromTo=n.allFromTo=function(t,e,i,r,s,a,o,l){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,n.staggerTo(t,e,r,s,a,o,l)},n.delayedCall=function(t,e,i,r,s){return new n(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,useFrames:s,overwrite:0})},n.set=function(t,e){return new n(t,0,e)},n.isTweening=function(t){return i.getTweensOf(t,!0).length>0};var f=function(t,e){for(var r=[],s=0,n=t._first;n;)n instanceof i?r[s++]=n:(e&&(r[s++]=n),s=(r=r.concat(f(n,e))).length),n=n._next;return r},_=n.getAllTweens=function(e){return f(t._rootTimeline,e).concat(f(t._rootFramesTimeline,e))};n.killAll=function(t,i,r,s){null==i&&(i=!0),null==r&&(r=!0);var n,a,o,l=_(0!=s),h=l.length,u=i&&r&&s;for(o=0;o<h;o++)a=l[o],(u||a instanceof e||(n=a.target===a.vars.onComplete)&&r||i&&!n)&&(t?a.totalTime(a._reversed?0:a.totalDuration()):a._enabled(!1,!1))},n.killChildTweensOf=function(t,e){if(null!=t){var s,h,u,f,_,c=a.tweenLookup;if("string"==typeof t&&(t=i.selector(t)||t),o(t)&&(t=r(t)),l(t))for(f=t.length;--f>-1;)n.killChildTweensOf(t[f],e);else{for(u in s=[],c)for(h=c[u].target.parentNode;h;)h===t&&(s=s.concat(c[u].tweens)),h=h.parentNode;for(_=s.length,f=0;f<_;f++)e&&s[f].totalTime(s[f].totalDuration()),s[f]._enabled(!1,!1)}}};var c=function(t,i,r,s){i=!1!==i,r=!1!==r;for(var n,a,o=_(s=!1!==s),l=i&&r&&s,h=o.length;--h>-1;)a=o[h],(l||a instanceof e||(n=a.target===a.vars.onComplete)&&r||i&&!n)&&a.paused(t)};return n.pauseAll=function(t,e,i){c(!0,t,e,i)},n.resumeAll=function(t,e,i){c(!1,t,e,i)},n.globalTimeScale=function(e){var r=t._rootTimeline,s=i.ticker.time;return arguments.length?(e=e||1e-10,r._startTime=s-(s-r._startTime)*r._timeScale/e,r=t._rootFramesTimeline,s=i.ticker.frame,r._startTime=s-(s-r._startTime)*r._timeScale/e,r._timeScale=t._rootTimeline._timeScale=e,e):r._timeScale},h.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()},h.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()},h.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},h.duration=function(e){return arguments.length?t.prototype.duration.call(this,e):this._duration},h.totalDuration=function(t){return arguments.length?-1===this._repeat?this:this.duration((t-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},h.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},h.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},h.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},n},!0),s._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var r=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=!0===this.vars.autoRemoveChildren,this.smoothChildTiming=!0===this.vars.smoothChildTiming,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var i,r,s=this.vars;for(r in s)i=s[r],l(i)&&-1!==i.join("").indexOf("{self}")&&(s[r]=this._swapSelfInParams(i));l(s.tweens)&&this.add(s.tweens,0,s.align,s.stagger)},n=i._internals,a=r._internals={},o=n.isSelector,l=n.isArray,h=n.lazyTweens,u=n.lazyRender,f=s._gsDefine.globals,_=function(t){var e,i={};for(e in t)i[e]=t[e];return i},c=function(t,e,i){var r,s,n=t.cycle;for(r in n)s=n[r],t[r]="function"==typeof s?s(i,e[i]):s[i%s.length];delete t.cycle},p=a.pauseCallback=function(){},d=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},m=r.prototype=new e;return r.version="1.20.4",m.constructor=r,m.kill()._gc=m._forcingPlayhead=m._hasPause=!1,m.to=function(t,e,r,s){var n=r.repeat&&f.TweenMax||i;return e?this.add(new n(t,e,r),s):this.set(t,r,s)},m.from=function(t,e,r,s){return this.add((r.repeat&&f.TweenMax||i).from(t,e,r),s)},m.fromTo=function(t,e,r,s,n){var a=s.repeat&&f.TweenMax||i;return e?this.add(a.fromTo(t,e,r,s),n):this.set(t,s,n)},m.staggerTo=function(t,e,s,n,a,l,h,u){var f,p,m=new r({onComplete:l,onCompleteParams:h,callbackScope:u,smoothChildTiming:this.smoothChildTiming}),g=s.cycle;for("string"==typeof t&&(t=i.selector(t)||t),o(t=t||[])&&(t=d(t)),(n=n||0)<0&&((t=d(t)).reverse(),n*=-1),p=0;p<t.length;p++)(f=_(s)).startAt&&(f.startAt=_(f.startAt),f.startAt.cycle&&c(f.startAt,t,p)),g&&(c(f,t,p),null!=f.duration&&(e=f.duration,delete f.duration)),m.to(t[p],e,f,p*n);return this.add(m,a)},m.staggerFrom=function(t,e,i,r,s,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,r,s,n,a,o)},m.staggerFromTo=function(t,e,i,r,s,n,a,o,l){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,r,s,n,a,o,l)},m.call=function(t,e,r,s){return this.add(i.delayedCall(0,t,e,r),s)},m.set=function(t,e,r){return r=this._parseTimeOrLabel(r,0,!0),null==e.immediateRender&&(e.immediateRender=r===this._time&&!this._paused),this.add(new i(t,0,e),r)},r.exportRoot=function(t,e){null==(t=t||{}).smoothChildTiming&&(t.smoothChildTiming=!0);var s,n,a,o,l=new r(t),h=l._timeline;for(null==e&&(e=!0),h._remove(l,!0),l._startTime=0,l._rawPrevTime=l._time=l._totalTime=h._time,a=h._first;a;)o=a._next,e&&a instanceof i&&a.target===a.vars.onComplete||((n=a._startTime-a._delay)<0&&(s=1),l.add(a,n)),a=o;return h.add(l,0),s&&l.totalDuration(),l},m.add=function(s,n,a,o){var h,u,f,_,c,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,s)),!(s instanceof t)){if(s instanceof Array||s&&s.push&&l(s)){for(a=a||"normal",o=o||0,h=n,u=s.length,f=0;f<u;f++)l(_=s[f])&&(_=new r({tweens:_})),this.add(_,h),"string"!=typeof _&&"function"!=typeof _&&("sequence"===a?h=_._startTime+_.totalDuration()/_._timeScale:"start"===a&&(_._startTime-=_.delay())),h+=o;return this._uncache(!0)}if("string"==typeof s)return this.addLabel(s,n);if("function"!=typeof s)throw"Cannot add "+s+" into the timeline; it is not a tween, timeline, function, or string.";s=i.delayedCall(0,s)}if(e.prototype.add.call(this,s,n),s._time&&s.render((this.rawTime()-s._startTime)*s._timeScale,!1,!1),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(p=(c=this).rawTime()>s._startTime;c._timeline;)p&&c._timeline.smoothChildTiming?c.totalTime(c._totalTime,!0):c._gc&&c._enabled(!0,!1),c=c._timeline;return this},m.remove=function(e){if(e instanceof t){this._remove(e,!1);var i=e._timeline=e.vars.useFrames?t._rootFramesTimeline:t._rootTimeline;return e._startTime=(e._paused?e._pauseTime:i._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this}if(e instanceof Array||e&&e.push&&l(e)){for(var r=e.length;--r>-1;)this.remove(e[r]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},m._remove=function(t,i){return e.prototype._remove.call(this,t,i),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},m.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},m.insert=m.insertMultiple=function(t,e,i,r){return this.add(t,e||0,i,r)},m.appendMultiple=function(t,e,i,r){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,r)},m.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},m.addPause=function(t,e,r,s){var n=i.delayedCall(0,p,r,s||this);return n.vars.onComplete=n.vars.onReverseComplete=e,n.data="isPause",this._hasPause=!0,this.add(n,t)},m.removeLabel=function(t){return delete this._labels[t],this},m.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},m._parseTimeOrLabel=function(e,i,r,s){var n,a;if(s instanceof t&&s.timeline===this)this.remove(s);else if(s&&(s instanceof Array||s.push&&l(s)))for(a=s.length;--a>-1;)s[a]instanceof t&&s[a].timeline===this&&this.remove(s[a]);if(n="number"!=typeof e||i?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof i)return this._parseTimeOrLabel(i,r&&"number"==typeof e&&null==this._labels[i]?e-n:0,r);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=n);else{if(-1===(a=e.indexOf("=")))return null==this._labels[e]?r?this._labels[e]=n+i:i:this._labels[e]+i;i=parseInt(e.charAt(a-1)+"1",10)*Number(e.substr(a+1)),e=a>1?this._parseTimeOrLabel(e.substr(0,a-1),0,r):n}return Number(e)+i},m.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),!1!==e)},m.stop=function(){return this.paused(!0)},m.gotoAndPlay=function(t,e){return this.play(t,e)},m.gotoAndStop=function(t,e){return this.pause(t,e)},m.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var r,s,n,a,o,l,f,_=this._time,c=this._dirty?this.totalDuration():this._totalDuration,p=this._startTime,d=this._timeScale,m=this._paused;if(_!==this._time&&(t+=this._time-_),t>=c-1e-7&&t>=0)this._totalTime=this._time=c,this._reversed||this._hasPausedChild()||(s=!0,a="onComplete",o=!!this._timeline.autoRemoveChildren,0===this._duration&&(t<=0&&t>=-1e-7||this._rawPrevTime<0||1e-10===this._rawPrevTime)&&this._rawPrevTime!==t&&this._first&&(o=!0,this._rawPrevTime>1e-10&&(a="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:1e-10,t=c+1e-4;else if(t<1e-7)if(this._totalTime=this._time=0,(0!==_||0===this._duration&&1e-10!==this._rawPrevTime&&(this._rawPrevTime>0||t<0&&this._rawPrevTime>=0))&&(a="onReverseComplete",s=this._reversed),t<0)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(o=s=!0,a="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(o=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:1e-10,0===t&&s)for(r=this._first;r&&0===r._startTime;)r._duration||(s=!1),r=r._next;t=0,this._initted||(o=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!e){if(t>=_)for(r=this._first;r&&r._startTime<=t&&!l;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(l=r),r=r._next;else for(r=this._last;r&&r._startTime>=t&&!l;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(l=r),r=r._prev;l&&(this._time=t=l._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=t}if(this._time!==_&&this._first||i||o||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==_&&t>0&&(this._active=!0),0===_&&this.vars.onStart&&(0===this._time&&this._duration||e||this._callback("onStart")),(f=this._time)>=_)for(r=this._first;r&&(n=r._next,f===this._time&&(!this._paused||m));)(r._active||r._startTime<=f&&!r._paused&&!r._gc)&&(l===r&&this.pause(),r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=n;else for(r=this._last;r&&(n=r._prev,f===this._time&&(!this._paused||m));){if(r._active||r._startTime<=_&&!r._paused&&!r._gc){if(l===r){for(l=r._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(t-l._startTime)*l._timeScale:(t-l._startTime)*l._timeScale,e,i),l=l._prev;l=null,this.pause()}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)}r=n}this._onUpdate&&(e||(h.length&&u(),this._callback("onUpdate"))),a&&(this._gc||p!==this._startTime&&d===this._timeScale||(0===this._time||c>=this.totalDuration())&&(s&&(h.length&&u(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[a]&&this._callback(a)))}},m._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof r&&t._hasPausedChild())return!0;t=t._next}return!1},m.getChildren=function(t,e,r,s){s=s||-9999999999;for(var n=[],a=this._first,o=0;a;)a._startTime<s||(a instanceof i?!1!==e&&(n[o++]=a):(!1!==r&&(n[o++]=a),!1!==t&&(o=(n=n.concat(a.getChildren(!0,e,r))).length))),a=a._next;return n},m.getTweensOf=function(t,e){var r,s,n=this._gc,a=[],o=0;for(n&&this._enabled(!0,!0),s=(r=i.getTweensOf(t)).length;--s>-1;)(r[s].timeline===this||e&&this._contains(r[s]))&&(a[o++]=r[s]);return n&&this._enabled(!1,!0),a},m.recent=function(){return this._recent},m._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},m.shiftChildren=function(t,e,i){i=i||0;for(var r,s=this._first,n=this._labels;s;)s._startTime>=i&&(s._startTime+=t),s=s._next;if(e)for(r in n)n[r]>=i&&(n[r]+=t);return this._uncache(!0)},m._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),r=i.length,s=!1;--r>-1;)i[r]._kill(t,e)&&(s=!0);return s},m.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return!1!==t&&(this._labels={}),this._uncache(!0)},m.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},m._enabled=function(t,i){if(t===this._gc)for(var r=this._first;r;)r._enabled(t,!0),r=r._next;return e.prototype._enabled.call(this,t,i)},m.totalTime=function(e,i,r){this._forcingPlayhead=!0;var s=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,s},m.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},m.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,r=0,s=this._last,n=999999999999;s;)e=s._prev,s._dirty&&s.totalDuration(),s._startTime>n&&this._sortChildren&&!s._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(s,s._startTime-s._delay),this._calculatingDuration=0):n=s._startTime,s._startTime<0&&!s._paused&&(r-=s._startTime,this._timeline.smoothChildTiming&&(this._startTime+=s._startTime/this._timeScale,this._time-=s._startTime,this._totalTime-=s._startTime,this._rawPrevTime-=s._startTime),this.shiftChildren(-s._startTime,!1,-9999999999),n=0),(i=s._startTime+s._totalDuration/s._timeScale)>r&&(r=i),s=e;this._duration=this._totalDuration=r,this._dirty=!1}return this._totalDuration}return t&&this.totalDuration()?this.timeScale(this._totalDuration/t):this},m.paused=function(e){if(!e)for(var i=this._first,r=this._time;i;)i._startTime===r&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return t.prototype.paused.apply(this,arguments)},m.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},m.rawTime=function(t){return t&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(t)-this._startTime)*this._timeScale},r},!0),s._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,e,i){var r=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=!0===this.vars.yoyo,this._dirty=!0},n=e._internals,a=n.lazyTweens,o=n.lazyRender,l=s._gsDefine.globals,h=new i(null,null,1,0),u=r.prototype=new t;return u.constructor=r,u.kill()._gc=!1,r.version="1.20.4",u.invalidate=function(){return this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},u.addCallback=function(t,i,r,s){return this.add(e.delayedCall(0,t,r,s),i)},u.removeCallback=function(t,e){if(t)if(null==e)this._kill(null,t);else for(var i=this.getTweensOf(t,!1),r=i.length,s=this._parseTimeOrLabel(e);--r>-1;)i[r]._startTime===s&&i[r]._enabled(!1,!1);return this},u.removePause=function(e){return this.removeCallback(t._internals.pauseCallback,e)},u.tweenTo=function(t,i){i=i||{};var r,s,n,a={ease:h,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},o=i.repeat&&l.TweenMax||e;for(s in i)a[s]=i[s];return a.time=this._parseTimeOrLabel(t),r=Math.abs(Number(a.time)-this._time)/this._timeScale||.001,n=new o(this,r,a),a.onStart=function(){n.target.paused(!0),n.vars.time===n.target.time()||r!==n.duration()||n.isFromTo||n.duration(Math.abs(n.vars.time-n.target.time())/n.target._timeScale).render(n.time(),!0,!0),i.onStart&&i.onStart.apply(i.onStartScope||i.callbackScope||n,i.onStartParams||[])},n},u.tweenFromTo=function(t,e,i){i=i||{},t=this._parseTimeOrLabel(t),i.startAt={onComplete:this.seek,onCompleteParams:[t],callbackScope:this},i.immediateRender=!1!==i.immediateRender;var r=this.tweenTo(e,i);return r.isFromTo=1,r.duration(Math.abs(r.vars.time-t)/this._timeScale||.001)},u.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var r,s,n,l,h,u,f,_,c=this._time,p=this._dirty?this.totalDuration():this._totalDuration,d=this._duration,m=this._totalTime,g=this._startTime,v=this._timeScale,y=this._rawPrevTime,T=this._paused,x=this._cycle;if(c!==this._time&&(t+=this._time-c),t>=p-1e-7&&t>=0)this._locked||(this._totalTime=p,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(s=!0,l="onComplete",h=!!this._timeline.autoRemoveChildren,0===this._duration&&(t<=0&&t>=-1e-7||y<0||1e-10===y)&&y!==t&&this._first&&(h=!0,y>1e-10&&(l="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:1e-10,this._yoyo&&0!=(1&this._cycle)?this._time=t=0:(this._time=d,t=d+1e-4);else if(t<1e-7)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==c||0===d&&1e-10!==y&&(y>0||t<0&&y>=0)&&!this._locked)&&(l="onReverseComplete",s=this._reversed),t<0)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(h=s=!0,l="onReverseComplete"):y>=0&&this._first&&(h=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=d||!e||t||this._rawPrevTime===t?t:1e-10,0===t&&s)for(r=this._first;r&&0===r._startTime;)r._duration||(s=!1),r=r._next;t=0,this._initted||(h=!0)}else if(0===d&&y<0&&(h=!0),this._time=this._rawPrevTime=t,this._locked||(this._totalTime=t,0!==this._repeat&&(u=d+this._repeatDelay,this._cycle=this._totalTime/u>>0,0!==this._cycle&&this._cycle===this._totalTime/u&&m<=t&&this._cycle--,this._time=this._totalTime-this._cycle*u,this._yoyo&&0!=(1&this._cycle)&&(this._time=d-this._time),this._time>d?(this._time=d,t=d+1e-4):this._time<0?this._time=t=0:t=this._time)),this._hasPause&&!this._forcingPlayhead&&!e){if((t=this._time)>=c||this._repeat&&x!==this._cycle)for(r=this._first;r&&r._startTime<=t&&!f;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(f=r),r=r._next;else for(r=this._last;r&&r._startTime>=t&&!f;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(f=r),r=r._prev;f&&f._startTime<d&&(this._time=t=f._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==x&&!this._locked){var b=this._yoyo&&0!=(1&x),w=b===(this._yoyo&&0!=(1&this._cycle)),P=this._totalTime,O=this._cycle,k=this._rawPrevTime,S=this._time;if(this._totalTime=x*d,this._cycle<x?b=!b:this._totalTime+=d,this._time=c,this._rawPrevTime=0===d?y-1e-4:y,this._cycle=x,this._locked=!0,c=b?0:d,this.render(c,e,0===d),e||this._gc||this.vars.onRepeat&&(this._cycle=O,this._locked=!1,this._callback("onRepeat")),c!==this._time)return;if(w&&(this._cycle=x,this._locked=!0,c=b?d+1e-4:-1e-4,this.render(c,!0,!1)),this._locked=!1,this._paused&&!T)return;this._time=S,this._totalTime=P,this._cycle=O,this._rawPrevTime=k}if(this._time!==c&&this._first||i||h||f){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==m&&t>0&&(this._active=!0),0===m&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||e||this._callback("onStart")),(_=this._time)>=c)for(r=this._first;r&&(n=r._next,_===this._time&&(!this._paused||T));)(r._active||r._startTime<=this._time&&!r._paused&&!r._gc)&&(f===r&&this.pause(),r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=n;else for(r=this._last;r&&(n=r._prev,_===this._time&&(!this._paused||T));){if(r._active||r._startTime<=c&&!r._paused&&!r._gc){if(f===r){for(f=r._prev;f&&f.endTime()>this._time;)f.render(f._reversed?f.totalDuration()-(t-f._startTime)*f._timeScale:(t-f._startTime)*f._timeScale,e,i),f=f._prev;f=null,this.pause()}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)}r=n}this._onUpdate&&(e||(a.length&&o(),this._callback("onUpdate"))),l&&(this._locked||this._gc||g!==this._startTime&&v===this._timeScale||(0===this._time||p>=this.totalDuration())&&(s&&(a.length&&o(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[l]&&this._callback(l)))}else m!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},u.getActive=function(t,e,i){null==t&&(t=!0),null==e&&(e=!0),null==i&&(i=!1);var r,s,n=[],a=this.getChildren(t,e,i),o=0,l=a.length;for(r=0;r<l;r++)(s=a[r]).isActive()&&(n[o++]=s);return n},u.getLabelAfter=function(t){t||0!==t&&(t=this._time);var e,i=this.getLabelsArray(),r=i.length;for(e=0;e<r;e++)if(i[e].time>t)return i[e].name;return null},u.getLabelBefore=function(t){null==t&&(t=this._time);for(var e=this.getLabelsArray(),i=e.length;--i>-1;)if(e[i].time<t)return e[i].name;return null},u.getLabelsArray=function(){var t,e=[],i=0;for(t in this._labels)e[i++]={time:this._labels[t],name:t};return e.sort(function(t,e){return t.time-e.time}),e},u.invalidate=function(){return this._locked=!1,t.prototype.invalidate.call(this)},u.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()||0},u.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()||0},u.totalDuration=function(e){return arguments.length?-1!==this._repeat&&e?this.timeScale(this.totalDuration()/e):this:(this._dirty&&(t.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},u.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},u.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},u.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},u.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},u.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.getLabelBefore(this._time+1e-8)},r},!0),t=180/Math.PI,e=[],i=[],r=[],n={},a=s._gsDefine.globals,o=function(t,e,i,r){i===r&&(i=r-(r-e)/1e6),t===e&&(e=t+(i-t)/1e6),this.a=t,this.b=e,this.c=i,this.d=r,this.da=r-t,this.ca=i-t,this.ba=e-t},l=function(t,e,i,r){var s={a:t},n={},a={},o={c:r},l=(t+e)/2,h=(e+i)/2,u=(i+r)/2,f=(l+h)/2,_=(h+u)/2,c=(_-f)/8;return s.b=l+(t-l)/4,n.b=f+c,s.c=n.a=(s.b+n.b)/2,n.c=a.a=(f+_)/2,a.b=_-c,o.b=u+(r-u)/4,a.c=o.a=(a.b+o.b)/2,[s,n,a,o]},h=function(t,s,n,a,o){var h,u,f,_,c,p,d,m,g,v,y,T,x,b=t.length-1,w=0,P=t[0].a;for(h=0;h<b;h++)u=(c=t[w]).a,f=c.d,_=t[w+1].d,o?(y=e[h],x=((T=i[h])+y)*s*.25/(a?.5:r[h]||.5),m=f-((p=f-(f-u)*(a?.5*s:0!==y?x/y:0))+(((d=f+(_-f)*(a?.5*s:0!==T?x/T:0))-p)*(3*y/(y+T)+.5)/4||0))):m=f-((p=f-(f-u)*s*.5)+(d=f+(_-f)*s*.5))/2,p+=m,d+=m,c.c=g=p,c.b=0!==h?P:P=c.a+.6*(c.c-c.a),c.da=f-u,c.ca=g-u,c.ba=P-u,n?(v=l(u,P,g,f),t.splice(w,1,v[0],v[1],v[2],v[3]),w+=4):w++,P=d;(c=t[w]).b=P,c.c=P+.4*(c.d-P),c.da=c.d-c.a,c.ca=c.c-c.a,c.ba=P-c.a,n&&(v=l(c.a,P,c.c,c.d),t.splice(w,1,v[0],v[1],v[2],v[3]))},u=function(t,r,s,n){var a,l,h,u,f,_,c=[];if(n)for(l=(t=[n].concat(t)).length;--l>-1;)"string"==typeof(_=t[l][r])&&"="===_.charAt(1)&&(t[l][r]=n[r]+Number(_.charAt(0)+_.substr(2)));if((a=t.length-2)<0)return c[0]=new o(t[0][r],0,0,t[0][r]),c;for(l=0;l<a;l++)h=t[l][r],u=t[l+1][r],c[l]=new o(h,0,0,u),s&&(f=t[l+2][r],e[l]=(e[l]||0)+(u-h)*(u-h),i[l]=(i[l]||0)+(f-u)*(f-u));return c[l]=new o(t[l][r],0,0,t[l+1][r]),c},f=function(t,s,a,o,l,f){var _,c,p,d,m,g,v,y,T={},x=[],b=f||t[0];for(c in l="string"==typeof l?","+l+",":",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",null==s&&(s=1),t[0])x.push(c);if(t.length>1){for(y=t[t.length-1],v=!0,_=x.length;--_>-1;)if(c=x[_],Math.abs(b[c]-y[c])>.05){v=!1;break}v&&(t=t.concat(),f&&t.unshift(f),t.push(t[1]),f=t[t.length-3])}for(e.length=i.length=r.length=0,_=x.length;--_>-1;)c=x[_],n[c]=-1!==l.indexOf(","+c+","),T[c]=u(t,c,n[c],f);for(_=e.length;--_>-1;)e[_]=Math.sqrt(e[_]),i[_]=Math.sqrt(i[_]);if(!o){for(_=x.length;--_>-1;)if(n[c])for(g=(p=T[x[_]]).length-1,d=0;d<g;d++)m=p[d+1].da/i[d]+p[d].da/e[d]||0,r[d]=(r[d]||0)+m*m;for(_=r.length;--_>-1;)r[_]=Math.sqrt(r[_])}for(_=x.length,d=a?4:1;--_>-1;)p=T[c=x[_]],h(p,s,a,o,n[c]),v&&(p.splice(0,d),p.splice(p.length-d,d));return T},_=function(t,e,i){for(var r,s,n,a,o,l,h,u,f,_,c,p=1/i,d=t.length;--d>-1;)for(n=(_=t[d]).a,a=_.d-n,o=_.c-n,l=_.b-n,r=s=0,u=1;u<=i;u++)r=s-(s=((h=p*u)*h*a+3*(f=1-h)*(h*o+f*l))*h),e[c=d*i+u-1]=(e[c]||0)+r*r},c=s._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(t,e,i){this._target=t,e instanceof Array&&(e={values:e}),this._func={},this._mod={},this._props=[],this._timeRes=null==e.timeResolution?6:parseInt(e.timeResolution,10);var r,s,n,a,l,h=e.values||[],u={},c=h[0],p=e.autoRotate||i.vars.orientToBezier;for(r in this._autoRotate=p?p instanceof Array?p:[["x","y","rotation",!0===p?0:Number(p)||0]]:null,c)this._props.push(r);for(n=this._props.length;--n>-1;)r=this._props[n],this._overwriteProps.push(r),s=this._func[r]="function"==typeof t[r],u[r]=s?t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)]():parseFloat(t[r]),l||u[r]!==h[0][r]&&(l=u);if(this._beziers="cubic"!==e.type&&"quadratic"!==e.type&&"soft"!==e.type?f(h,isNaN(e.curviness)?1:e.curviness,!1,"thruBasic"===e.type,e.correlate,l):function(t,e,i){var r,s,n,a,l,h,u,f,_,c,p,d={},m="cubic"===(e=e||"soft")?3:2,g="soft"===e,v=[];if(g&&i&&(t=[i].concat(t)),null==t||t.length<m+1)throw"invalid Bezier data";for(_ in t[0])v.push(_);for(h=v.length;--h>-1;){for(d[_=v[h]]=l=[],c=0,f=t.length,u=0;u<f;u++)r=null==i?t[u][_]:"string"==typeof(p=t[u][_])&&"="===p.charAt(1)?i[_]+Number(p.charAt(0)+p.substr(2)):Number(p),g&&u>1&&u<f-1&&(l[c++]=(r+l[c-2])/2),l[c++]=r;for(f=c-m+1,c=0,u=0;u<f;u+=m)r=l[u],s=l[u+1],n=l[u+2],a=2===m?0:l[u+3],l[c++]=p=3===m?new o(r,s,n,a):new o(r,(2*s+r)/3,(2*s+n)/3,n);l.length=c}return d}(h,e.type,u),this._segCount=this._beziers[r].length,this._timeRes){var d=function(t,e){var i,r,s,n,a=[],o=[],l=0,h=0,u=(e=e>>0||6)-1,f=[],c=[];for(i in t)_(t[i],a,e);for(s=a.length,r=0;r<s;r++)l+=Math.sqrt(a[r]),c[n=r%e]=l,n===u&&(h+=l,f[n=r/e>>0]=c,o[n]=h,l=0,c=[]);return{length:h,lengths:o,segments:f}}(this._beziers,this._timeRes);this._length=d.length,this._lengths=d.lengths,this._segments=d.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(p=this._autoRotate)for(this._initialRotations=[],p[0]instanceof Array||(this._autoRotate=p=[p]),n=p.length;--n>-1;){for(a=0;a<3;a++)r=p[n][a],this._func[r]="function"==typeof t[r]&&t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)];r=p[n][2],this._initialRotations[n]=(this._func[r]?this._func[r].call(this._target):this._target[r])||0,this._overwriteProps.push(r)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var i,r,s,n,a,o,l,h,u,f,_=this._segCount,c=this._func,p=this._target,d=e!==this._startRatio;if(this._timeRes){if(u=this._lengths,f=this._curSeg,e*=this._length,s=this._li,e>this._l2&&s<_-1){for(h=_-1;s<h&&(this._l2=u[++s])<=e;);this._l1=u[s-1],this._li=s,this._curSeg=f=this._segments[s],this._s2=f[this._s1=this._si=0]}else if(e<this._l1&&s>0){for(;s>0&&(this._l1=u[--s])>=e;);0===s&&e<this._l1?this._l1=0:s++,this._l2=u[s],this._li=s,this._curSeg=f=this._segments[s],this._s1=f[(this._si=f.length-1)-1]||0,this._s2=f[this._si]}if(i=s,e-=this._l1,s=this._si,e>this._s2&&s<f.length-1){for(h=f.length-1;s<h&&(this._s2=f[++s])<=e;);this._s1=f[s-1],this._si=s}else if(e<this._s1&&s>0){for(;s>0&&(this._s1=f[--s])>=e;);0===s&&e<this._s1?this._s1=0:s++,this._s2=f[s],this._si=s}o=(s+(e-this._s1)/(this._s2-this._s1))*this._prec||0}else o=(e-(i=e<0?0:e>=1?_-1:_*e>>0)*(1/_))*_;for(r=1-o,s=this._props.length;--s>-1;)n=this._props[s],l=(o*o*(a=this._beziers[n][i]).da+3*r*(o*a.ca+r*a.ba))*o+a.a,this._mod[n]&&(l=this._mod[n](l,p)),c[n]?p[n](l):p[n]=l;if(this._autoRotate){var m,g,v,y,T,x,b,w=this._autoRotate;for(s=w.length;--s>-1;)n=w[s][2],x=w[s][3]||0,b=!0===w[s][4]?1:t,a=this._beziers[w[s][0]],m=this._beziers[w[s][1]],a&&m&&(a=a[i],m=m[i],g=a.a+(a.b-a.a)*o,g+=((y=a.b+(a.c-a.b)*o)-g)*o,y+=(a.c+(a.d-a.c)*o-y)*o,v=m.a+(m.b-m.a)*o,v+=((T=m.b+(m.c-m.b)*o)-v)*o,T+=(m.c+(m.d-m.c)*o-T)*o,l=d?Math.atan2(T-v,y-g)*b+x:this._initialRotations[s],this._mod[n]&&(l=this._mod[n](l,p)),c[n]?p[n](l):p[n]=l)}}}),p=c.prototype,c.bezierThrough=f,c.cubicToQuadratic=l,c._autoCSS=!0,c.quadraticToCubic=function(t,e,i){return new o(t,(2*e+t)/3,(2*e+i)/3,i)},c._cssRegister=function(){var t=a.CSSPlugin;if(t){var e=t._internals,i=e._parseToProxy,r=e._setPluginRatio,s=e.CSSPropTween;e._registerComplexSpecialProp("bezier",{parser:function(t,e,n,a,o,l){e instanceof Array&&(e={values:e}),l=new c;var h,u,f,_=e.values,p=_.length-1,d=[],m={};if(p<0)return o;for(h=0;h<=p;h++)f=i(t,_[h],a,o,l,p!==h),d[h]=f.end;for(u in e)m[u]=e[u];return m.values=d,(o=new s(t,"bezier",0,0,f.pt,2)).data=f,o.plugin=l,o.setRatio=r,0===m.autoRotate&&(m.autoRotate=!0),!m.autoRotate||m.autoRotate instanceof Array||(h=!0===m.autoRotate?0:Number(m.autoRotate),m.autoRotate=null!=f.end.left?[["left","top","rotation",h,!1]]:null!=f.end.x&&[["x","y","rotation",h,!1]]),m.autoRotate&&(a._transform||a._enableTransforms(!1),f.autoRotate=a._target._gsTransform,f.proxy.rotation=f.autoRotate.rotation||0,a._overwriteProps.push("rotation")),l._onInitTween(f.proxy,m,a._tween),o}})}},p._mod=function(t){for(var e,i=this._overwriteProps,r=i.length;--r>-1;)(e=t[i[r]])&&"function"==typeof e&&(this._mod[i[r]]=e)},p._kill=function(t){var e,i,r=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=r.length;--i>-1;)r[i]===e&&r.splice(i,1);if(r=this._autoRotate)for(i=r.length;--i>-1;)t[r[i][2]]&&r.splice(i,1);return this._super._kill.call(this,t)},s._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(t,e){var i,r,n,a,o=function(){t.call(this,"css"),this._overwriteProps.length=0,this.setRatio=o.prototype.setRatio},l=s._gsDefine.globals,h={},u=o.prototype=new t("css");u.constructor=o,o.version="1.20.4",o.API=2,o.defaultTransformPerspective=0,o.defaultSkewType="compensated",o.defaultSmoothOrigin=!0,u="px",o.suffixMap={top:u,right:u,bottom:u,left:u,width:u,height:u,fontSize:u,padding:u,margin:u,perspective:u,lineHeight:""};var f,_,c,p,d,m,g,v,y=/(?:\-|\.|\b)(\d|\.|e\-)+/g,T=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,x=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,b=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,P=/opacity *= *([^)]*)/i,O=/opacity:([^;]*)/i,k=/alpha\(opacity *=.+?\)/i,S=/^(rgb|hsl)/,R=/([A-Z])/g,A=/-([a-z])/gi,C=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,M=function(t,e){return e.toUpperCase()},D=/(?:Left|Right|Width)/i,E=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,F=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,z=/,(?=[^\)]*(?:\(|$))/gi,L=/[\s,\(]/i,I=Math.PI/180,j=180/Math.PI,N={},X={style:{}},B=s.document||{createElement:function(){return X}},Y=function(t,e){return B.createElementNS?B.createElementNS(e||"http://www.w3.org/1999/xhtml",t):B.createElement(t)},V=Y("div"),U=Y("img"),q=o._internals={_specialProps:h},G=(s.navigator||{}).userAgent||"",W=function(){var t=G.indexOf("Android"),e=Y("a");return c=-1!==G.indexOf("Safari")&&-1===G.indexOf("Chrome")&&(-1===t||parseFloat(G.substr(t+8,2))>3),d=c&&parseFloat(G.substr(G.indexOf("Version/")+8,2))<6,p=-1!==G.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(G)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(G))&&(m=parseFloat(RegExp.$1)),!!e&&(e.style.cssText="top:1px;opacity:.55;",/^0.55/.test(e.style.opacity))}(),Z=function(t){return P.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1},H=function(t){s.console&&console.log(t)},$="",Q="",K=function(t,e){var i,r,s=(e=e||V).style;if(void 0!==s[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],r=5;--r>-1&&void 0===s[i[r]+t];);return r>=0?($="-"+(Q=3===r?"ms":i[r]).toLowerCase()+"-",Q+t):null},J=B.defaultView?B.defaultView.getComputedStyle:function(){},tt=o.getStyle=function(t,e,i,r,s){var n;return W||"opacity"!==e?(!r&&t.style[e]?n=t.style[e]:(i=i||J(t))?n=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(R,"-$1").toLowerCase()):t.currentStyle&&(n=t.currentStyle[e]),null==s||n&&"none"!==n&&"auto"!==n&&"auto auto"!==n?n:s):Z(t)},et=q.convertToPixels=function(t,i,r,s,n){if("px"===s||!s&&"lineHeight"!==i)return r;if("auto"===s||!r)return 0;var a,l,h,u=D.test(i),f=t,_=V.style,c=r<0,p=1===r;if(c&&(r=-r),p&&(r*=100),"lineHeight"!==i||s)if("%"===s&&-1!==i.indexOf("border"))a=r/100*(u?t.clientWidth:t.clientHeight);else{if(_.cssText="border:0 solid red;position:"+tt(t,"position")+";line-height:0;","%"!==s&&f.appendChild&&"v"!==s.charAt(0)&&"rem"!==s)_[u?"borderLeftWidth":"borderTopWidth"]=r+s;else{if(f=t.parentNode||B.body,-1!==tt(f,"display").indexOf("flex")&&(_.position="absolute"),l=f._gsCache,h=e.ticker.frame,l&&u&&l.time===h)return l.width*r/100;_[u?"width":"height"]=r+s}f.appendChild(V),a=parseFloat(V[u?"offsetWidth":"offsetHeight"]),f.removeChild(V),u&&"%"===s&&!1!==o.cacheWidths&&((l=f._gsCache=f._gsCache||{}).time=h,l.width=a/r*100),0!==a||n||(a=et(t,i,r,s,!0))}else l=J(t).lineHeight,t.style.lineHeight=r,a=parseFloat(J(t).lineHeight),t.style.lineHeight=l;return p&&(a/=100),c?-a:a},it=q.calculateOffset=function(t,e,i){if("absolute"!==tt(t,"position",i))return 0;var r="left"===e?"Left":"Top",s=tt(t,"margin"+r,i);return t["offset"+r]-(et(t,e,parseFloat(s),s.replace(w,""))||0)},rt=function(t,e){var i,r,s,n={};if(e=e||J(t,null))if(i=e.length)for(;--i>-1;)-1!==(s=e[i]).indexOf("-transform")&&Ft!==s||(n[s.replace(A,M)]=e.getPropertyValue(s));else for(i in e)-1!==i.indexOf("Transform")&&Et!==i||(n[i]=e[i]);else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===n[i]&&(n[i.replace(A,M)]=e[i]);return W||(n.opacity=Z(t)),r=Wt(t,e,!1),n.rotation=r.rotation,n.skewX=r.skewX,n.scaleX=r.scaleX,n.scaleY=r.scaleY,n.x=r.x,n.y=r.y,Lt&&(n.z=r.z,n.rotationX=r.rotationX,n.rotationY=r.rotationY,n.scaleZ=r.scaleZ),n.filters&&delete n.filters,n},st=function(t,e,i,r,s){var n,a,o,l={},h=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(n=i[a])||s&&s[a])&&-1===a.indexOf("Origin")&&("number"!=typeof n&&"string"!=typeof n||(l[a]="auto"!==n||"left"!==a&&"top"!==a?""!==n&&"auto"!==n&&"none"!==n||"string"!=typeof e[a]||""===e[a].replace(b,"")?n:0:it(t,a),void 0!==h[a]&&(o=new yt(h,a,h[a],o))));if(r)for(a in r)"className"!==a&&(l[a]=r[a]);return{difs:l,firstMPT:o}},nt={width:["Left","Right"],height:["Top","Bottom"]},at=["marginLeft","marginRight","marginTop","marginBottom"],ot=function(t,e,i){if("svg"===(t.nodeName+"").toLowerCase())return(i||J(t))[e]||0;if(t.getCTM&&Ut(t))return t.getBBox()[e]||0;var r=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),s=nt[e],n=s.length;for(i=i||J(t,null);--n>-1;)r-=parseFloat(tt(t,"padding"+s[n],i,!0))||0,r-=parseFloat(tt(t,"border"+s[n]+"Width",i,!0))||0;return r},lt=function(t,e){if("contain"===t||"auto"===t||"auto auto"===t)return t+" ";null!=t&&""!==t||(t="0 0");var i,r=t.split(" "),s=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":r[0],n=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":r[1];if(r.length>3&&!e){for(r=t.split(", ").join(",").split(","),t=[],i=0;i<r.length;i++)t.push(lt(r[i]));return t.join(",")}return null==n?n="center"===s?"50%":"0":"center"===n&&(n="50%"),("center"===s||isNaN(parseFloat(s))&&-1===(s+"").indexOf("="))&&(s="50%"),t=s+" "+n+(r.length>2?" "+r[2]:""),e&&(e.oxp=-1!==s.indexOf("%"),e.oyp=-1!==n.indexOf("%"),e.oxr="="===s.charAt(1),e.oyr="="===n.charAt(1),e.ox=parseFloat(s.replace(b,"")),e.oy=parseFloat(n.replace(b,"")),e.v=t),e||t},ht=function(t,e){return"function"==typeof t&&(t=t(v,g)),"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2)):parseFloat(t)-parseFloat(e)||0},ut=function(t,e){return"function"==typeof t&&(t=t(v,g)),null==t?e:"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2))+e:parseFloat(t)||0},ft=function(t,e,i,r){var s,n,a,o;return"function"==typeof t&&(t=t(v,g)),null==t?a=e:"number"==typeof t?a=t:(360,s=t.split("_"),n=((o="="===t.charAt(1))?parseInt(t.charAt(0)+"1",10)*parseFloat(s[0].substr(2)):parseFloat(s[0]))*(-1===t.indexOf("rad")?1:j)-(o?0:e),s.length&&(r&&(r[i]=e+n),-1!==t.indexOf("short")&&(n%=360)!==n%180&&(n=n<0?n+360:n-360),-1!==t.indexOf("_cw")&&n<0?n=(n+3599999999640)%360-360*(n/360|0):-1!==t.indexOf("ccw")&&n>0&&(n=(n-3599999999640)%360-360*(n/360|0))),a=e+n),a<1e-6&&a>-1e-6&&(a=0),a},_t={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ct=function(t,e,i){return 255*(6*(t=t<0?t+1:t>1?t-1:t)<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)+.5|0},pt=o.parseColor=function(t,e){var i,r,s,n,a,o,l,h,u,f,_;if(t)if("number"==typeof t)i=[t>>16,t>>8&255,255&t];else{if(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),_t[t])i=_t[t];else if("#"===t.charAt(0))4===t.length&&(t="#"+(r=t.charAt(1))+r+(s=t.charAt(2))+s+(n=t.charAt(3))+n),i=[(t=parseInt(t.substr(1),16))>>16,t>>8&255,255&t];else if("hsl"===t.substr(0,3))if(i=_=t.match(y),e){if(-1!==t.indexOf("="))return t.match(T)}else a=Number(i[0])%360/360,o=Number(i[1])/100,r=2*(l=Number(i[2])/100)-(s=l<=.5?l*(o+1):l+o-l*o),i.length>3&&(i[3]=Number(i[3])),i[0]=ct(a+1/3,r,s),i[1]=ct(a,r,s),i[2]=ct(a-1/3,r,s);else i=t.match(y)||_t.transparent;i[0]=Number(i[0]),i[1]=Number(i[1]),i[2]=Number(i[2]),i.length>3&&(i[3]=Number(i[3]))}else i=_t.black;return e&&!_&&(r=i[0]/255,s=i[1]/255,n=i[2]/255,l=((h=Math.max(r,s,n))+(u=Math.min(r,s,n)))/2,h===u?a=o=0:(f=h-u,o=l>.5?f/(2-h-u):f/(h+u),a=h===r?(s-n)/f+(s<n?6:0):h===s?(n-r)/f+2:(r-s)/f+4,a*=60),i[0]=a+.5|0,i[1]=100*o+.5|0,i[2]=100*l+.5|0),i},dt=function(t,e){var i,r,s,n=t.match(mt)||[],a=0,o="";if(!n.length)return t;for(i=0;i<n.length;i++)r=n[i],a+=(s=t.substr(a,t.indexOf(r,a)-a)).length+r.length,3===(r=pt(r,e)).length&&r.push(1),o+=s+(e?"hsla("+r[0]+","+r[1]+"%,"+r[2]+"%,"+r[3]:"rgba("+r.join(","))+")";return o+t.substr(a)},mt="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(u in _t)mt+="|"+u+"\\b";mt=new RegExp(mt+")","gi"),o.colorStringFilter=function(t){var e,i=t[0]+" "+t[1];mt.test(i)&&(e=-1!==i.indexOf("hsl(")||-1!==i.indexOf("hsla("),t[0]=dt(t[0],e),t[1]=dt(t[1],e)),mt.lastIndex=0},e.defaultStringFilter||(e.defaultStringFilter=o.colorStringFilter);var gt=function(t,e,i,r){if(null==t)return function(t){return t};var s,n=e?(t.match(mt)||[""])[0]:"",a=t.split(n).join("").match(x)||[],o=t.substr(0,t.indexOf(a[0])),l=")"===t.charAt(t.length-1)?")":"",h=-1!==t.indexOf(" ")?" ":",",u=a.length,f=u>0?a[0].replace(y,""):"";return u?s=e?function(t){var e,_,c,p;if("number"==typeof t)t+=f;else if(r&&z.test(t)){for(p=t.replace(z,"|").split("|"),c=0;c<p.length;c++)p[c]=s(p[c]);return p.join(",")}if(e=(t.match(mt)||[n])[0],c=(_=t.split(e).join("").match(x)||[]).length,u>c--)for(;++c<u;)_[c]=i?_[(c-1)/2|0]:a[c];return o+_.join(h)+h+e+l+(-1!==t.indexOf("inset")?" inset":"")}:function(t){var e,n,_;if("number"==typeof t)t+=f;else if(r&&z.test(t)){for(n=t.replace(z,"|").split("|"),_=0;_<n.length;_++)n[_]=s(n[_]);return n.join(",")}if(_=(e=t.match(x)||[]).length,u>_--)for(;++_<u;)e[_]=i?e[(_-1)/2|0]:a[_];return o+e.join(h)+l}:function(t){return t}},vt=function(t){return t=t.split(","),function(e,i,r,s,n,a,o){var l,h=(i+"").split(" ");for(o={},l=0;l<4;l++)o[t[l]]=h[l]=h[l]||h[(l-1)/2>>0];return s.parse(e,o,n,a)}},yt=(q._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,r,s,n,a=this.data,o=a.proxy,l=a.firstMPT;l;)e=o[l.v],l.r?e=Math.round(e):e<1e-6&&e>-1e-6&&(e=0),l.t[l.p]=e,l=l._next;if(a.autoRotate&&(a.autoRotate.rotation=a.mod?a.mod(o.rotation,this.t):o.rotation),1===t||0===t)for(l=a.firstMPT,n=1===t?"e":"b";l;){if((i=l.t).type){if(1===i.type){for(s=i.xs0+i.s+i.xs1,r=1;r<i.l;r++)s+=i["xn"+r]+i["xs"+(r+1)];i[n]=s}}else i[n]=i.s+i.xs0;l=l._next}},function(t,e,i,r,s){this.t=t,this.p=e,this.v=i,this.r=s,r&&(r._prev=this,this._next=r)}),Tt=(q._parseToProxy=function(t,e,i,r,s,n){var a,o,l,h,u,f=r,_={},c={},p=i._transform,d=N;for(i._transform=null,N=e,r=u=i.parse(t,e,r,s),N=d,n&&(i._transform=p,f&&(f._prev=null,f._prev&&(f._prev._next=null)));r&&r!==f;){if(r.type<=1&&(c[o=r.p]=r.s+r.c,_[o]=r.s,n||(h=new yt(r,"s",o,h,r.r),r.c=0),1===r.type))for(a=r.l;--a>0;)l="xn"+a,c[o=r.p+"_"+l]=r.data[l],_[o]=r[l],n||(h=new yt(r,l,o,h,r.rxp[l]));r=r._next}return{proxy:_,end:c,firstMPT:h,pt:u}},q.CSSPropTween=function(t,e,r,s,n,o,l,h,u,f,_){this.t=t,this.p=e,this.s=r,this.c=s,this.n=l||e,t instanceof Tt||a.push(this.n),this.r=h,this.type=o||0,u&&(this.pr=u,i=!0),this.b=void 0===f?r:f,this.e=void 0===_?r+s:_,n&&(this._next=n,n._prev=this)}),xt=function(t,e,i,r,s,n){var a=new Tt(t,e,i,r-i,s,-1,n);return a.b=i,a.e=a.xs0=r,a},bt=o.parseComplex=function(t,e,i,r,s,n,a,l,h,u){i=i||n||"","function"==typeof r&&(r=r(v,g)),a=new Tt(t,e,0,0,a,u?2:1,null,!1,l,i,r),r+="",s&&mt.test(r+i)&&(r=[i,r],o.colorStringFilter(r),i=r[0],r=r[1]);var _,c,p,d,m,x,b,w,P,O,k,S,R,A=i.split(", ").join(",").split(" "),C=r.split(", ").join(",").split(" "),M=A.length,D=!1!==f;for(-1===r.indexOf(",")&&-1===i.indexOf(",")||(-1!==(r+i).indexOf("rgb")||-1!==(r+i).indexOf("hsl")?(A=A.join(" ").replace(z,", ").split(" "),C=C.join(" ").replace(z,", ").split(" ")):(A=A.join(" ").split(",").join(", ").split(" "),C=C.join(" ").split(",").join(", ").split(" ")),M=A.length),M!==C.length&&(M=(A=(n||"").split(" ")).length),a.plugin=h,a.setRatio=u,mt.lastIndex=0,_=0;_<M;_++)if(d=A[_],m=C[_],(w=parseFloat(d))||0===w)a.appendXtra("",w,ht(m,w),m.replace(T,""),D&&-1!==m.indexOf("px"),!0);else if(s&&mt.test(d))S=")"+((S=m.indexOf(")")+1)?m.substr(S):""),R=-1!==m.indexOf("hsl")&&W,O=m,d=pt(d,R),m=pt(m,R),(P=d.length+m.length>6)&&!W&&0===m[3]?(a["xs"+a.l]+=a.l?" transparent":"transparent",a.e=a.e.split(C[_]).join("transparent")):(W||(P=!1),R?a.appendXtra(O.substr(0,O.indexOf("hsl"))+(P?"hsla(":"hsl("),d[0],ht(m[0],d[0]),",",!1,!0).appendXtra("",d[1],ht(m[1],d[1]),"%,",!1).appendXtra("",d[2],ht(m[2],d[2]),P?"%,":"%"+S,!1):a.appendXtra(O.substr(0,O.indexOf("rgb"))+(P?"rgba(":"rgb("),d[0],m[0]-d[0],",",!0,!0).appendXtra("",d[1],m[1]-d[1],",",!0).appendXtra("",d[2],m[2]-d[2],P?",":S,!0),P&&(d=d.length<4?1:d[3],a.appendXtra("",d,(m.length<4?1:m[3])-d,S,!1))),mt.lastIndex=0;else if(x=d.match(y)){if(!(b=m.match(T))||b.length!==x.length)return a;for(p=0,c=0;c<x.length;c++)k=x[c],O=d.indexOf(k,p),a.appendXtra(d.substr(p,O-p),Number(k),ht(b[c],k),"",D&&"px"===d.substr(O+k.length,2),0===c),p=O+k.length;a["xs"+a.l]+=d.substr(p)}else a["xs"+a.l]+=a.l||a["xs"+a.l]?" "+m:m;if(-1!==r.indexOf("=")&&a.data){for(S=a.xs0+a.data.s,_=1;_<a.l;_++)S+=a["xs"+_]+a.data["xn"+_];a.e=S+a["xs"+_]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},wt=9;for((u=Tt.prototype).l=u.pr=0;--wt>0;)u["xn"+wt]=0,u["xs"+wt]="";u.xs0="",u._next=u._prev=u.xfirst=u.data=u.plugin=u.setRatio=u.rxp=null,u.appendXtra=function(t,e,i,r,s,n){var a=this,o=a.l;return a["xs"+o]+=n&&(o||a["xs"+o])?" "+t:t||"",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=r||"",o>0?(a.data["xn"+o]=e+i,a.rxp["xn"+o]=s,a["xn"+o]=e,a.plugin||(a.xfirst=new Tt(a,"xn"+o,e,i,a.xfirst||a,0,a.n,s,a.pr),a.xfirst.xs0=0),a):(a.data={s:e+i},a.rxp={},a.s=e,a.c=i,a.r=s,a)):(a["xs"+o]+=e+(r||""),a)};var Pt=function(t,e){e=e||{},this.p=e.prefix&&K(t)||t,h[t]=h[this.p]=this,this.format=e.formatter||gt(e.defaultValue,e.color,e.collapsible,e.multi),e.parser&&(this.parse=e.parser),this.clrs=e.color,this.multi=e.multi,this.keyword=e.keyword,this.dflt=e.defaultValue,this.pr=e.priority||0},Ot=q._registerComplexSpecialProp=function(t,e,i){"object"!=typeof e&&(e={parser:i});var r,s=t.split(","),n=e.defaultValue;for(i=i||[n],r=0;r<s.length;r++)e.prefix=0===r&&e.prefix,e.defaultValue=i[r]||n,new Pt(s[r],e)},kt=q._registerPluginProp=function(t){if(!h[t]){var e=t.charAt(0).toUpperCase()+t.substr(1)+"Plugin";Ot(t,{parser:function(t,i,r,s,n,a,o){var u=l.com.greensock.plugins[e];return u?(u._cssRegister(),h[r].parse(t,i,r,s,n,a,o)):(H("Error: "+e+" js file not loaded."),n)}})}};(u=Pt.prototype).parseComplex=function(t,e,i,r,s,n){var a,o,l,h,u,f,_=this.keyword;if(this.multi&&(z.test(i)||z.test(e)?(o=e.replace(z,"|").split("|"),l=i.replace(z,"|").split("|")):_&&(o=[e],l=[i])),l){for(h=l.length>o.length?l.length:o.length,a=0;a<h;a++)e=o[a]=o[a]||this.dflt,i=l[a]=l[a]||this.dflt,_&&(u=e.indexOf(_))!==(f=i.indexOf(_))&&(-1===f?o[a]=o[a].split(_).join(""):-1===u&&(o[a]+=" "+_));e=o.join(", "),i=l.join(", ")}return bt(t,this.p,e,i,this.clrs,this.dflt,r,this.pr,s,n)},u.parse=function(t,e,i,r,s,a,o){return this.parseComplex(t.style,this.format(tt(t,this.p,n,!1,this.dflt)),this.format(e),s,a)},o.registerSpecialProp=function(t,e,i){Ot(t,{parser:function(t,r,s,n,a,o,l){var h=new Tt(t,s,0,0,a,2,s,!1,i);return h.plugin=o,h.setRatio=e(t,r,n._tween,s),h},priority:i})},o.useSVGTransformAttr=!0;var St,Rt,At,Ct,Mt,Dt="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Et=K("transform"),Ft=$+"transform",zt=K("transformOrigin"),Lt=null!==K("perspective"),It=q.Transform=function(){this.perspective=parseFloat(o.defaultTransformPerspective)||0,this.force3D=!(!1===o.defaultForce3D||!Lt)&&(o.defaultForce3D||"auto")},jt=s.SVGElement,Nt=function(t,e,i){var r,s=B.createElementNS("http://www.w3.org/2000/svg",t),n=/([a-z])([A-Z])/g;for(r in i)s.setAttributeNS(null,r.replace(n,"$1-$2").toLowerCase(),i[r]);return e.appendChild(s),s},Xt=B.documentElement||{},Bt=(Mt=m||/Android/i.test(G)&&!s.chrome,B.createElementNS&&!Mt&&(Rt=Nt("svg",Xt),Ct=(At=Nt("rect",Rt,{width:100,height:50,x:100})).getBoundingClientRect().width,At.style[zt]="50% 50%",At.style[Et]="scaleX(0.5)",Mt=Ct===At.getBoundingClientRect().width&&!(p&&Lt),Xt.removeChild(Rt)),Mt),Yt=function(t,e,i,r,s,n){var a,l,h,u,f,_,c,p,d,m,g,v,y,T,x=t._gsTransform,b=Gt(t,!0);x&&(y=x.xOrigin,T=x.yOrigin),(!r||(a=r.split(" ")).length<2)&&(0===(c=t.getBBox()).x&&0===c.y&&c.width+c.height===0&&(c={x:parseFloat(t.hasAttribute("x")?t.getAttribute("x"):t.hasAttribute("cx")?t.getAttribute("cx"):0)||0,y:parseFloat(t.hasAttribute("y")?t.getAttribute("y"):t.hasAttribute("cy")?t.getAttribute("cy"):0)||0,width:0,height:0}),a=[(-1!==(e=lt(e).split(" "))[0].indexOf("%")?parseFloat(e[0])/100*c.width:parseFloat(e[0]))+c.x,(-1!==e[1].indexOf("%")?parseFloat(e[1])/100*c.height:parseFloat(e[1]))+c.y]),i.xOrigin=u=parseFloat(a[0]),i.yOrigin=f=parseFloat(a[1]),r&&b!==qt&&(_=b[0],c=b[1],p=b[2],d=b[3],m=b[4],g=b[5],(v=_*d-c*p)&&(l=u*(d/v)+f*(-p/v)+(p*g-d*m)/v,h=u*(-c/v)+f*(_/v)-(_*g-c*m)/v,u=i.xOrigin=a[0]=l,f=i.yOrigin=a[1]=h)),x&&(n&&(i.xOffset=x.xOffset,i.yOffset=x.yOffset,x=i),s||!1!==s&&!1!==o.defaultSmoothOrigin?(l=u-y,h=f-T,x.xOffset+=l*b[0]+h*b[2]-l,x.yOffset+=l*b[1]+h*b[3]-h):x.xOffset=x.yOffset=0),n||t.setAttribute("data-svg-origin",a.join(" "))},Vt=function(t){var e,i=Y("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,s=this.nextSibling,n=this.style.cssText;if(Xt.appendChild(i),i.appendChild(this),this.style.display="block",t)try{e=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Vt}catch(t){}else this._originalGetBBox&&(e=this._originalGetBBox());return s?r.insertBefore(this,s):r.appendChild(this),Xt.removeChild(i),this.style.cssText=n,e},Ut=function(t){return!(!jt||!t.getCTM||t.parentNode&&!t.ownerSVGElement||!function(t){try{return t.getBBox()}catch(e){return Vt.call(t,!0)}}(t))},qt=[1,0,0,1,0,0],Gt=function(t,e){var i,r,s,n,a,o,l=t._gsTransform||new It,h=t.style;if(Et?r=tt(t,Ft,null,!0):t.currentStyle&&(r=(r=t.currentStyle.filter.match(E))&&4===r.length?[r[0].substr(4),Number(r[2].substr(4)),Number(r[1].substr(4)),r[3].substr(4),l.x||0,l.y||0].join(","):""),i=!r||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,!Et||!(o=!J(t)||"none"===J(t).display)&&t.parentNode||(o&&(n=h.display,h.display="block"),t.parentNode||(a=1,Xt.appendChild(t)),i=!(r=tt(t,Ft,null,!0))||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,n?h.display=n:o&&Qt(h,"display"),a&&Xt.removeChild(t)),(l.svg||t.getCTM&&Ut(t))&&(i&&-1!==(h[Et]+"").indexOf("matrix")&&(r=h[Et],i=0),s=t.getAttribute("transform"),i&&s&&(r="matrix("+(s=t.transform.baseVal.consolidate().matrix).a+","+s.b+","+s.c+","+s.d+","+s.e+","+s.f+")",i=0)),i)return qt;for(s=(r||"").match(y)||[],wt=s.length;--wt>-1;)n=Number(s[wt]),s[wt]=(a=n-(n|=0))?(1e5*a+(a<0?-.5:.5)|0)/1e5+n:n;return e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s},Wt=q.getTransform=function(t,i,r,s){if(t._gsTransform&&r&&!s)return t._gsTransform;var n,a,l,h,u,f,_=r&&t._gsTransform||new It,c=_.scaleX<0,p=Lt&&(parseFloat(tt(t,zt,i,!1,"0 0 0").split(" ")[2])||_.zOrigin)||0,d=parseFloat(o.defaultTransformPerspective)||0;if(_.svg=!(!t.getCTM||!Ut(t)),_.svg&&(Yt(t,tt(t,zt,i,!1,"50% 50%")+"",_,t.getAttribute("data-svg-origin")),St=o.useSVGTransformAttr||Bt),(n=Gt(t))!==qt){if(16===n.length){var m,g,v,y,T,x=n[0],b=n[1],w=n[2],P=n[3],O=n[4],k=n[5],S=n[6],R=n[7],A=n[8],C=n[9],M=n[10],D=n[12],E=n[13],F=n[14],z=n[11],L=Math.atan2(S,M);_.zOrigin&&(D=A*(F=-_.zOrigin)-n[12],E=C*F-n[13],F=M*F+_.zOrigin-n[14]),_.rotationX=L*j,L&&(m=O*(y=Math.cos(-L))+A*(T=Math.sin(-L)),g=k*y+C*T,v=S*y+M*T,A=O*-T+A*y,C=k*-T+C*y,M=S*-T+M*y,z=R*-T+z*y,O=m,k=g,S=v),L=Math.atan2(-w,M),_.rotationY=L*j,L&&(g=b*(y=Math.cos(-L))-C*(T=Math.sin(-L)),v=w*y-M*T,C=b*T+C*y,M=w*T+M*y,z=P*T+z*y,x=m=x*y-A*T,b=g,w=v),L=Math.atan2(b,x),_.rotation=L*j,L&&(m=x*(y=Math.cos(L))+b*(T=Math.sin(L)),g=O*y+k*T,v=A*y+C*T,b=b*y-x*T,k=k*y-O*T,C=C*y-A*T,x=m,O=g,A=v),_.rotationX&&Math.abs(_.rotationX)+Math.abs(_.rotation)>359.9&&(_.rotationX=_.rotation=0,_.rotationY=180-_.rotationY),L=Math.atan2(O,k),_.scaleX=(1e5*Math.sqrt(x*x+b*b+w*w)+.5|0)/1e5,_.scaleY=(1e5*Math.sqrt(k*k+S*S)+.5|0)/1e5,_.scaleZ=(1e5*Math.sqrt(A*A+C*C+M*M)+.5|0)/1e5,x/=_.scaleX,O/=_.scaleY,b/=_.scaleX,k/=_.scaleY,Math.abs(L)>2e-5?(_.skewX=L*j,O=0,"simple"!==_.skewType&&(_.scaleY*=1/Math.cos(L))):_.skewX=0,_.perspective=z?1/(z<0?-z:z):0,_.x=D,_.y=E,_.z=F,_.svg&&(_.x-=_.xOrigin-(_.xOrigin*x-_.yOrigin*O),_.y-=_.yOrigin-(_.yOrigin*b-_.xOrigin*k))}else if(!Lt||s||!n.length||_.x!==n[4]||_.y!==n[5]||!_.rotationX&&!_.rotationY){var I=n.length>=6,N=I?n[0]:1,X=n[1]||0,B=n[2]||0,Y=I?n[3]:1;_.x=n[4]||0,_.y=n[5]||0,l=Math.sqrt(N*N+X*X),h=Math.sqrt(Y*Y+B*B),u=N||X?Math.atan2(X,N)*j:_.rotation||0,f=B||Y?Math.atan2(B,Y)*j+u:_.skewX||0,_.scaleX=l,_.scaleY=h,_.rotation=u,_.skewX=f,Lt&&(_.rotationX=_.rotationY=_.z=0,_.perspective=d,_.scaleZ=1),_.svg&&(_.x-=_.xOrigin-(_.xOrigin*N+_.yOrigin*B),_.y-=_.yOrigin-(_.xOrigin*X+_.yOrigin*Y))}for(a in Math.abs(_.skewX)>90&&Math.abs(_.skewX)<270&&(c?(_.scaleX*=-1,_.skewX+=_.rotation<=0?180:-180,_.rotation+=_.rotation<=0?180:-180):(_.scaleY*=-1,_.skewX+=_.skewX<=0?180:-180)),_.zOrigin=p,_)_[a]<2e-5&&_[a]>-2e-5&&(_[a]=0)}return r&&(t._gsTransform=_,_.svg&&(St&&t.style[Et]?e.delayedCall(.001,function(){Qt(t.style,Et)}):!St&&t.getAttribute("transform")&&e.delayedCall(.001,function(){t.removeAttribute("transform")}))),_},Zt=function(t){var e,i,r=this.data,s=-r.rotation*I,n=s+r.skewX*I,a=(Math.cos(s)*r.scaleX*1e5|0)/1e5,o=(Math.sin(s)*r.scaleX*1e5|0)/1e5,l=(Math.sin(n)*-r.scaleY*1e5|0)/1e5,h=(Math.cos(n)*r.scaleY*1e5|0)/1e5,u=this.t.style,f=this.t.currentStyle;if(f){i=o,o=-l,l=-i,e=f.filter,u.filter="";var _,c,p=this.t.offsetWidth,d=this.t.offsetHeight,g="absolute"!==f.position,v="progid:DXImageTransform.Microsoft.Matrix(M11="+a+", M12="+o+", M21="+l+", M22="+h,y=r.x+p*r.xPercent/100,T=r.y+d*r.yPercent/100;if(null!=r.ox&&(y+=(_=(r.oxp?p*r.ox*.01:r.ox)-p/2)-(_*a+(c=(r.oyp?d*r.oy*.01:r.oy)-d/2)*o),T+=c-(_*l+c*h)),v+=g?", Dx="+((_=p/2)-(_*a+(c=d/2)*o)+y)+", Dy="+(c-(_*l+c*h)+T)+")":", sizingMethod='auto expand')",-1!==e.indexOf("DXImageTransform.Microsoft.Matrix(")?u.filter=e.replace(F,v):u.filter=v+" "+e,0!==t&&1!==t||1===a&&0===o&&0===l&&1===h&&(g&&-1===v.indexOf("Dx=0, Dy=0")||P.test(e)&&100!==parseFloat(RegExp.$1)||-1===e.indexOf(e.indexOf("Alpha"))&&u.removeAttribute("filter")),!g){var x,b,O,k=m<8?1:-1;for(_=r.ieOffsetX||0,c=r.ieOffsetY||0,r.ieOffsetX=Math.round((p-((a<0?-a:a)*p+(o<0?-o:o)*d))/2+y),r.ieOffsetY=Math.round((d-((h<0?-h:h)*d+(l<0?-l:l)*p))/2+T),wt=0;wt<4;wt++)O=(i=-1!==(x=f[b=at[wt]]).indexOf("px")?parseFloat(x):et(this.t,b,parseFloat(x),x.replace(w,""))||0)!==r[b]?wt<2?-r.ieOffsetX:-r.ieOffsetY:wt<2?_-r.ieOffsetX:c-r.ieOffsetY,u[b]=(r[b]=Math.round(i-O*(0===wt||2===wt?1:k)))+"px"}}},Ht=q.set3DTransformRatio=q.setTransformRatio=function(t){var e,i,r,s,n,a,o,l,h,u,f,_,c,d,m,g,v,y,T,x,b=this.data,w=this.t.style,P=b.rotation,O=b.rotationX,k=b.rotationY,S=b.scaleX,R=b.scaleY,A=b.scaleZ,C=b.x,M=b.y,D=b.z,E=b.svg,F=b.perspective,z=b.force3D,L=b.skewY,j=b.skewX;if(L&&(j+=L,P+=L),!((1!==t&&0!==t||"auto"!==z||this.tween._totalTime!==this.tween._totalDuration&&this.tween._totalTime)&&z||D||F||k||O||1!==A)||St&&E||!Lt)P||j||E?(P*=I,x=j*I,1e5,i=Math.cos(P)*S,n=Math.sin(P)*S,r=Math.sin(P-x)*-R,a=Math.cos(P-x)*R,x&&"simple"===b.skewType&&(e=Math.tan(x-L*I),r*=e=Math.sqrt(1+e*e),a*=e,L&&(e=Math.tan(L*I),i*=e=Math.sqrt(1+e*e),n*=e)),E&&(C+=b.xOrigin-(b.xOrigin*i+b.yOrigin*r)+b.xOffset,M+=b.yOrigin-(b.xOrigin*n+b.yOrigin*a)+b.yOffset,St&&(b.xPercent||b.yPercent)&&(m=this.t.getBBox(),C+=.01*b.xPercent*m.width,M+=.01*b.yPercent*m.height),C<(m=1e-6)&&C>-m&&(C=0),M<m&&M>-m&&(M=0)),T=(1e5*i|0)/1e5+","+(1e5*n|0)/1e5+","+(1e5*r|0)/1e5+","+(1e5*a|0)/1e5+","+C+","+M+")",E&&St?this.t.setAttribute("transform","matrix("+T):w[Et]=(b.xPercent||b.yPercent?"translate("+b.xPercent+"%,"+b.yPercent+"%) matrix(":"matrix(")+T):w[Et]=(b.xPercent||b.yPercent?"translate("+b.xPercent+"%,"+b.yPercent+"%) matrix(":"matrix(")+S+",0,0,"+R+","+C+","+M+")";else{if(p&&(S<(m=1e-4)&&S>-m&&(S=A=2e-5),R<m&&R>-m&&(R=A=2e-5),!F||b.z||b.rotationX||b.rotationY||(F=0)),P||j)P*=I,g=i=Math.cos(P),v=n=Math.sin(P),j&&(P-=j*I,g=Math.cos(P),v=Math.sin(P),"simple"===b.skewType&&(e=Math.tan((j-L)*I),g*=e=Math.sqrt(1+e*e),v*=e,b.skewY&&(e=Math.tan(L*I),i*=e=Math.sqrt(1+e*e),n*=e))),r=-v,a=g;else{if(!(k||O||1!==A||F||E))return void(w[Et]=(b.xPercent||b.yPercent?"translate("+b.xPercent+"%,"+b.yPercent+"%) translate3d(":"translate3d(")+C+"px,"+M+"px,"+D+"px)"+(1!==S||1!==R?" scale("+S+","+R+")":""));i=a=1,r=n=0}u=1,s=o=l=h=f=_=0,c=F?-1/F:0,d=b.zOrigin,m=1e-6,",","0",(P=k*I)&&(g=Math.cos(P),l=-(v=Math.sin(P)),f=c*-v,s=i*v,o=n*v,u=g,c*=g,i*=g,n*=g),(P=O*I)&&(e=r*(g=Math.cos(P))+s*(v=Math.sin(P)),y=a*g+o*v,h=u*v,_=c*v,s=r*-v+s*g,o=a*-v+o*g,u*=g,c*=g,r=e,a=y),1!==A&&(s*=A,o*=A,u*=A,c*=A),1!==R&&(r*=R,a*=R,h*=R,_*=R),1!==S&&(i*=S,n*=S,l*=S,f*=S),(d||E)&&(d&&(C+=s*-d,M+=o*-d,D+=u*-d+d),E&&(C+=b.xOrigin-(b.xOrigin*i+b.yOrigin*r)+b.xOffset,M+=b.yOrigin-(b.xOrigin*n+b.yOrigin*a)+b.yOffset),C<m&&C>-m&&(C="0"),M<m&&M>-m&&(M="0"),D<m&&D>-m&&(D=0)),T=b.xPercent||b.yPercent?"translate("+b.xPercent+"%,"+b.yPercent+"%) matrix3d(":"matrix3d(",T+=(i<m&&i>-m?"0":i)+","+(n<m&&n>-m?"0":n)+","+(l<m&&l>-m?"0":l),T+=","+(f<m&&f>-m?"0":f)+","+(r<m&&r>-m?"0":r)+","+(a<m&&a>-m?"0":a),O||k||1!==A?(T+=","+(h<m&&h>-m?"0":h)+","+(_<m&&_>-m?"0":_)+","+(s<m&&s>-m?"0":s),T+=","+(o<m&&o>-m?"0":o)+","+(u<m&&u>-m?"0":u)+","+(c<m&&c>-m?"0":c)+","):T+=",0,0,0,0,1,0,",T+=C+","+M+","+D+","+(F?1+-D/F:1)+")",w[Et]=T}};(u=It.prototype).x=u.y=u.z=u.skewX=u.skewY=u.rotation=u.rotationX=u.rotationY=u.zOrigin=u.xPercent=u.yPercent=u.xOffset=u.yOffset=0,u.scaleX=u.scaleY=u.scaleZ=1,Ot("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(t,e,i,r,s,a,l){if(r._lastParsedTransform===l)return s;r._lastParsedTransform=l;var h,u=l.scale&&"function"==typeof l.scale?l.scale:0;"function"==typeof l[i]&&(h=l[i],l[i]=e),u&&(l.scale=u(v,t));var f,_,c,p,d,m,y,T,x,b=t._gsTransform,w=t.style,P=Dt.length,O=l,k={},S=Wt(t,n,!0,O.parseTransform),R=O.transform&&("function"==typeof O.transform?O.transform(v,g):O.transform);if(S.skewType=O.skewType||S.skewType||o.defaultSkewType,r._transform=S,R&&"string"==typeof R&&Et)(_=V.style)[Et]=R,_.display="block",_.position="absolute",B.body.appendChild(V),f=Wt(V,null,!1),"simple"===S.skewType&&(f.scaleY*=Math.cos(f.skewX*I)),S.svg&&(m=S.xOrigin,y=S.yOrigin,f.x-=S.xOffset,f.y-=S.yOffset,(O.transformOrigin||O.svgOrigin)&&(R={},Yt(t,lt(O.transformOrigin),R,O.svgOrigin,O.smoothOrigin,!0),m=R.xOrigin,y=R.yOrigin,f.x-=R.xOffset-S.xOffset,f.y-=R.yOffset-S.yOffset),(m||y)&&(T=Gt(V,!0),f.x-=m-(m*T[0]+y*T[2]),f.y-=y-(m*T[1]+y*T[3]))),B.body.removeChild(V),f.perspective||(f.perspective=S.perspective),null!=O.xPercent&&(f.xPercent=ut(O.xPercent,S.xPercent)),null!=O.yPercent&&(f.yPercent=ut(O.yPercent,S.yPercent));else if("object"==typeof O){if(f={scaleX:ut(null!=O.scaleX?O.scaleX:O.scale,S.scaleX),scaleY:ut(null!=O.scaleY?O.scaleY:O.scale,S.scaleY),scaleZ:ut(O.scaleZ,S.scaleZ),x:ut(O.x,S.x),y:ut(O.y,S.y),z:ut(O.z,S.z),xPercent:ut(O.xPercent,S.xPercent),yPercent:ut(O.yPercent,S.yPercent),perspective:ut(O.transformPerspective,S.perspective)},null!=(d=O.directionalRotation))if("object"==typeof d)for(_ in d)O[_]=d[_];else O.rotation=d;"string"==typeof O.x&&-1!==O.x.indexOf("%")&&(f.x=0,f.xPercent=ut(O.x,S.xPercent)),"string"==typeof O.y&&-1!==O.y.indexOf("%")&&(f.y=0,f.yPercent=ut(O.y,S.yPercent)),f.rotation=ft("rotation"in O?O.rotation:"shortRotation"in O?O.shortRotation+"_short":"rotationZ"in O?O.rotationZ:S.rotation,S.rotation,"rotation",k),Lt&&(f.rotationX=ft("rotationX"in O?O.rotationX:"shortRotationX"in O?O.shortRotationX+"_short":S.rotationX||0,S.rotationX,"rotationX",k),f.rotationY=ft("rotationY"in O?O.rotationY:"shortRotationY"in O?O.shortRotationY+"_short":S.rotationY||0,S.rotationY,"rotationY",k)),f.skewX=ft(O.skewX,S.skewX),f.skewY=ft(O.skewY,S.skewY)}for(Lt&&null!=O.force3D&&(S.force3D=O.force3D,p=!0),(c=S.force3D||S.z||S.rotationX||S.rotationY||f.z||f.rotationX||f.rotationY||f.perspective)||null==O.scale||(f.scaleZ=1);--P>-1;)((R=f[x=Dt[P]]-S[x])>1e-6||R<-1e-6||null!=O[x]||null!=N[x])&&(p=!0,s=new Tt(S,x,S[x],R,s),x in k&&(s.e=k[x]),s.xs0=0,s.plugin=a,r._overwriteProps.push(s.n));return R=O.transformOrigin,S.svg&&(R||O.svgOrigin)&&(m=S.xOffset,y=S.yOffset,Yt(t,lt(R),f,O.svgOrigin,O.smoothOrigin),s=xt(S,"xOrigin",(b?S:f).xOrigin,f.xOrigin,s,"transformOrigin"),s=xt(S,"yOrigin",(b?S:f).yOrigin,f.yOrigin,s,"transformOrigin"),m===S.xOffset&&y===S.yOffset||(s=xt(S,"xOffset",b?m:S.xOffset,S.xOffset,s,"transformOrigin"),s=xt(S,"yOffset",b?y:S.yOffset,S.yOffset,s,"transformOrigin")),R="0px 0px"),(R||Lt&&c&&S.zOrigin)&&(Et?(p=!0,x=zt,R=(R||tt(t,x,n,!1,"50% 50%"))+"",(s=new Tt(w,x,0,0,s,-1,"transformOrigin")).b=w[x],s.plugin=a,Lt?(_=S.zOrigin,R=R.split(" "),S.zOrigin=(R.length>2&&(0===_||"0px"!==R[2])?parseFloat(R[2]):_)||0,s.xs0=s.e=R[0]+" "+(R[1]||"50%")+" 0px",(s=new Tt(S,"zOrigin",0,0,s,-1,s.n)).b=_,s.xs0=s.e=S.zOrigin):s.xs0=s.e=R):lt(R+"",S)),p&&(r._transformType=S.svg&&St||!c&&3!==this._transformType?2:3),h&&(l[i]=h),u&&(l.scale=u),s},prefix:!0}),Ot("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Ot("borderRadius",{defaultValue:"0px",parser:function(t,e,i,s,a,o){e=this.format(e);var l,h,u,f,_,c,p,d,m,g,v,y,T,x,b,w,P=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],O=t.style;for(m=parseFloat(t.offsetWidth),g=parseFloat(t.offsetHeight),l=e.split(" "),h=0;h<P.length;h++)this.p.indexOf("border")&&(P[h]=K(P[h])),-1!==(_=f=tt(t,P[h],n,!1,"0px")).indexOf(" ")&&(_=(f=_.split(" "))[0],f=f[1]),c=u=l[h],p=parseFloat(_),y=_.substr((p+"").length),(T="="===c.charAt(1))?(d=parseInt(c.charAt(0)+"1",10),c=c.substr(2),d*=parseFloat(c),v=c.substr((d+"").length-(d<0?1:0))||""):(d=parseFloat(c),v=c.substr((d+"").length)),""===v&&(v=r[i]||y),v!==y&&(x=et(t,"borderLeft",p,y),b=et(t,"borderTop",p,y),"%"===v?(_=x/m*100+"%",f=b/g*100+"%"):"em"===v?(_=x/(w=et(t,"borderLeft",1,"em"))+"em",f=b/w+"em"):(_=x+"px",f=b+"px"),T&&(c=parseFloat(_)+d+v,u=parseFloat(f)+d+v)),a=bt(O,P[h],_+" "+f,c+" "+u,!1,"0px",a);return a},prefix:!0,formatter:gt("0px 0px 0px 0px",!1,!0)}),Ot("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(t,e,i,r,s,a){return bt(t.style,i,this.format(tt(t,i,n,!1,"0px 0px")),this.format(e),!1,"0px",s)},prefix:!0,formatter:gt("0px 0px",!1,!0)}),Ot("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,r,s,a){var o,l,h,u,f,_,c="background-position",p=n||J(t,null),d=this.format((p?m?p.getPropertyValue(c+"-x")+" "+p.getPropertyValue(c+"-y"):p.getPropertyValue(c):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),g=this.format(e);if(-1!==d.indexOf("%")!=(-1!==g.indexOf("%"))&&g.split(",").length<2&&(_=tt(t,"backgroundImage").replace(C,""))&&"none"!==_){for(o=d.split(" "),l=g.split(" "),U.setAttribute("src",_),h=2;--h>-1;)(u=-1!==(d=o[h]).indexOf("%"))!==(-1!==l[h].indexOf("%"))&&(f=0===h?t.offsetWidth-U.width:t.offsetHeight-U.height,o[h]=u?parseFloat(d)/100*f+"px":parseFloat(d)/f*100+"%");d=o.join(" ")}return this.parseComplex(t.style,d,g,s,a)},formatter:lt}),Ot("backgroundSize",{defaultValue:"0 0",formatter:function(t){return lt(-1===(t+="").indexOf(" ")?t+" "+t:t)}}),Ot("perspective",{defaultValue:"0px",prefix:!0}),Ot("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Ot("transformStyle",{prefix:!0}),Ot("backfaceVisibility",{prefix:!0}),Ot("userSelect",{prefix:!0}),Ot("margin",{parser:vt("marginTop,marginRight,marginBottom,marginLeft")}),Ot("padding",{parser:vt("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Ot("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,r,s,a){var o,l,h;return m<9?(l=t.currentStyle,h=m<8?" ":",",o="rect("+l.clipTop+h+l.clipRight+h+l.clipBottom+h+l.clipLeft+")",e=this.format(e).split(",").join(h)):(o=this.format(tt(t,this.p,n,!1,this.dflt)),e=this.format(e)),this.parseComplex(t.style,o,e,s,a)}}),Ot("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Ot("autoRound,strictUnits",{parser:function(t,e,i,r,s){return s}}),Ot("border",{defaultValue:"0px solid #000",parser:function(t,e,i,r,s,a){var o=tt(t,"borderTopWidth",n,!1,"0px"),l=this.format(e).split(" "),h=l[0].replace(w,"");return"px"!==h&&(o=parseFloat(o)/et(t,"borderTopWidth",1,h)+h),this.parseComplex(t.style,this.format(o+" "+tt(t,"borderTopStyle",n,!1,"solid")+" "+tt(t,"borderTopColor",n,!1,"#000")),l.join(" "),s,a)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(mt)||["#000"])[0]}}),Ot("borderWidth",{parser:vt("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Ot("float,cssFloat,styleFloat",{parser:function(t,e,i,r,s,n){var a=t.style,o="cssFloat"in a?"cssFloat":"styleFloat";return new Tt(a,o,0,0,s,-1,i,!1,0,a[o],e)}});var $t=function(t){var e,i=this.t,r=i.filter||tt(this.data,"filter")||"",s=this.s+this.c*t|0;100===s&&(-1===r.indexOf("atrix(")&&-1===r.indexOf("radient(")&&-1===r.indexOf("oader(")?(i.removeAttribute("filter"),e=!tt(this.data,"filter")):(i.filter=r.replace(k,""),e=!0)),e||(this.xn1&&(i.filter=r=r||"alpha(opacity="+s+")"),-1===r.indexOf("pacity")?0===s&&this.xn1||(i.filter=r+" alpha(opacity="+s+")"):i.filter=r.replace(P,"opacity="+s))};Ot("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,r,s,a){var o=parseFloat(tt(t,"opacity",n,!1,"1")),l=t.style,h="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+o),h&&1===o&&"hidden"===tt(t,"visibility",n)&&0!==e&&(o=0),W?s=new Tt(l,"opacity",o,e-o,s):((s=new Tt(l,"opacity",100*o,100*(e-o),s)).xn1=h?1:0,l.zoom=1,s.type=2,s.b="alpha(opacity="+s.s+")",s.e="alpha(opacity="+(s.s+s.c)+")",s.data=t,s.plugin=a,s.setRatio=$t),h&&((s=new Tt(l,"visibility",0,0,s,-1,null,!1,0,0!==o?"inherit":"hidden",0===e?"hidden":"inherit")).xs0="inherit",r._overwriteProps.push(s.n),r._overwriteProps.push(i)),s}});var Qt=function(t,e){e&&(t.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),t.removeProperty(e.replace(R,"-$1").toLowerCase())):t.removeAttribute(e))},Kt=function(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute("class",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:Qt(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Ot("className",{parser:function(t,e,r,s,a,o,l){var h,u,f,_,c,p=t.getAttribute("class")||"",d=t.style.cssText;if((a=s._classNamePT=new Tt(t,r,0,0,a,2)).setRatio=Kt,a.pr=-11,i=!0,a.b=p,u=rt(t,n),f=t._gsClassPT){for(_={},c=f.data;c;)_[c.p]=1,c=c._next;f.setRatio(1)}return t._gsClassPT=a,a.e="="!==e.charAt(1)?e:p.replace(new RegExp("(?:\\s|^)"+e.substr(2)+"(?![\\w-])"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),t.setAttribute("class",a.e),h=st(t,u,rt(t),l,_),t.setAttribute("class",p),a.data=h.firstMPT,t.style.cssText=d,a=a.xfirst=s.parse(t,h.difs,a,o)}});var Jt=function(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,r,s,n,a=this.t.style,o=h.transform.parse;if("all"===this.e)a.cssText="",s=!0;else for(r=(e=this.e.split(" ").join("").split(",")).length;--r>-1;)i=e[r],h[i]&&(h[i].parse===o?s=!0:i="transformOrigin"===i?zt:h[i].p),Qt(a,i);s&&(Qt(a,Et),(n=this.t._gsTransform)&&(n.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Ot("clearProps",{parser:function(t,e,r,s,n){return(n=new Tt(t,r,0,0,n,2)).setRatio=Jt,n.e=e,n.pr=-10,n.data=s._tween,i=!0,n}}),u="bezier,throwProps,physicsProps,physics2D".split(","),wt=u.length;wt--;)kt(u[wt]);(u=o.prototype)._firstPT=u._lastParsedTransform=u._transform=null,u._onInitTween=function(t,e,s,l){if(!t.nodeType)return!1;this._target=g=t,this._tween=s,this._vars=e,v=l,f=e.autoRound,i=!1,r=e.suffixMap||o.suffixMap,n=J(t,""),a=this._overwriteProps;var u,p,m,y,T,x,b,w,P,k=t.style;if(_&&""===k.zIndex&&("auto"!==(u=tt(t,"zIndex",n))&&""!==u||this._addLazySet(k,"zIndex",0)),"string"==typeof e&&(y=k.cssText,u=rt(t,n),k.cssText=y+";"+e,u=st(t,u,rt(t)).difs,!W&&O.test(e)&&(u.opacity=parseFloat(RegExp.$1)),e=u,k.cssText=y),e.className?this._firstPT=p=h.className.parse(t,e.className,"className",this,null,null,e):this._firstPT=p=this.parse(t,e,null),this._transformType){for(P=3===this._transformType,Et?c&&(_=!0,""===k.zIndex&&("auto"!==(b=tt(t,"zIndex",n))&&""!==b||this._addLazySet(k,"zIndex",0)),d&&this._addLazySet(k,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(P?"visible":"hidden"))):k.zoom=1,m=p;m&&m._next;)m=m._next;w=new Tt(t,"transform",0,0,null,2),this._linkCSSP(w,null,m),w.setRatio=Et?Ht:Zt,w.data=this._transform||Wt(t,n,!0),w.tween=s,w.pr=-1,a.pop()}if(i){for(;p;){for(x=p._next,m=y;m&&m.pr>p.pr;)m=m._next;(p._prev=m?m._prev:T)?p._prev._next=p:y=p,(p._next=m)?m._prev=p:T=p,p=x}this._firstPT=y}return!0},u.parse=function(t,e,i,s){var a,o,l,u,_,c,p,d,m,y,T=t.style;for(a in e){if("function"==typeof(c=e[a])&&(c=c(v,g)),o=h[a])i=o.parse(t,c,a,this,i,s,e);else{if("--"===a.substr(0,2)){this._tween._propLookup[a]=this._addTween.call(this._tween,t.style,"setProperty",J(t).getPropertyValue(a)+"",c+"",a,!1,a);continue}_=tt(t,a,n)+"",m="string"==typeof c,"color"===a||"fill"===a||"stroke"===a||-1!==a.indexOf("Color")||m&&S.test(c)?(m||(c=((c=pt(c)).length>3?"rgba(":"rgb(")+c.join(",")+")"),i=bt(T,a,_,c,!0,"transparent",i,0,s)):m&&L.test(c)?i=bt(T,a,_,c,!0,null,i,0,s):(p=(l=parseFloat(_))||0===l?_.substr((l+"").length):"",""!==_&&"auto"!==_||("width"===a||"height"===a?(l=ot(t,a,n),p="px"):"left"===a||"top"===a?(l=it(t,a,n),p="px"):(l="opacity"!==a?0:1,p="")),(y=m&&"="===c.charAt(1))?(u=parseInt(c.charAt(0)+"1",10),c=c.substr(2),u*=parseFloat(c),d=c.replace(w,"")):(u=parseFloat(c),d=m?c.replace(w,""):""),""===d&&(d=a in r?r[a]:p),c=u||0===u?(y?u+l:u)+d:e[a],p!==d&&(""===d&&"lineHeight"!==a||(u||0===u)&&l&&(l=et(t,a,l,p),"%"===d?(l/=et(t,a,100,"%")/100,!0!==e.strictUnits&&(_=l+"%")):"em"===d||"rem"===d||"vw"===d||"vh"===d?l/=et(t,a,1,d):"px"!==d&&(u=et(t,a,u,d),d="px"),y&&(u||0===u)&&(c=u+l+d))),y&&(u+=l),!l&&0!==l||!u&&0!==u?void 0!==T[a]&&(c||c+""!="NaN"&&null!=c)?(i=new Tt(T,a,u||l||0,0,i,-1,a,!1,0,_,c)).xs0="none"!==c||"display"!==a&&-1===a.indexOf("Style")?c:_:H("invalid "+a+" tween value: "+e[a]):(i=new Tt(T,a,l,u-l,i,0,a,!1!==f&&("px"===d||"zIndex"===a),0,_,c)).xs0=d)}s&&i&&!i.plugin&&(i.plugin=s)}return i},u.setRatio=function(t){var e,i,r,s=this._firstPT;if(1!==t||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(t||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;s;){if(e=s.c*t+s.s,s.r?e=Math.round(e):e<1e-6&&e>-1e-6&&(e=0),s.type)if(1===s.type)if(2===(r=s.l))s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2;else if(3===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3;else if(4===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3+s.xn3+s.xs4;else if(5===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3+s.xn3+s.xs4+s.xn4+s.xs5;else{for(i=s.xs0+e+s.xs1,r=1;r<s.l;r++)i+=s["xn"+r]+s["xs"+(r+1)];s.t[s.p]=i}else-1===s.type?s.t[s.p]=s.xs0:s.setRatio&&s.setRatio(t);else s.t[s.p]=e+s.xs0;s=s._next}else for(;s;)2!==s.type?s.t[s.p]=s.b:s.setRatio(t),s=s._next;else for(;s;){if(2!==s.type)if(s.r&&-1!==s.type)if(e=Math.round(s.s+s.c),s.type){if(1===s.type){for(r=s.l,i=s.xs0+e+s.xs1,r=1;r<s.l;r++)i+=s["xn"+r]+s["xs"+(r+1)];s.t[s.p]=i}}else s.t[s.p]=e+s.xs0;else s.t[s.p]=s.e;else s.setRatio(t);s=s._next}},u._enableTransforms=function(t){this._transform=this._transform||Wt(this._target,n,!0),this._transformType=this._transform.svg&&St||!t&&3!==this._transformType?2:3};var te=function(t){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};u._addLazySet=function(t,e,i){var r=this._firstPT=new Tt(t,e,0,0,this._firstPT,2);r.e=i,r.setRatio=te,r.data=this},u._linkCSSP=function(t,e,i,r){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next,r=!0),i?i._next=t:r||null!==this._firstPT||(this._firstPT=t),t._next=e,t._prev=i),t},u._mod=function(t){for(var e=this._firstPT;e;)"function"==typeof t[e.p]&&t[e.p]===Math.round&&(e.r=1),e=e._next},u._kill=function(e){var i,r,s,n=e;if(e.autoAlpha||e.alpha){for(r in n={},e)n[r]=e[r];n.opacity=1,n.autoAlpha&&(n.visibility=1)}for(e.className&&(i=this._classNamePT)&&((s=i.xfirst)&&s._prev?this._linkCSSP(s._prev,i._next,s._prev._prev):s===this._firstPT&&(this._firstPT=i._next),i._next&&this._linkCSSP(i._next,i._next._next,s._prev),this._classNamePT=null),i=this._firstPT;i;)i.plugin&&i.plugin!==r&&i.plugin._kill&&(i.plugin._kill(e),r=i.plugin),i=i._next;return t.prototype._kill.call(this,n)};var ee=function(t,e,i){var r,s,n,a;if(t.slice)for(s=t.length;--s>-1;)ee(t[s],e,i);else for(s=(r=t.childNodes).length;--s>-1;)a=(n=r[s]).type,n.style&&(e.push(rt(n)),i&&i.push(n)),1!==a&&9!==a&&11!==a||!n.childNodes.length||ee(n,e,i)};return o.cascadeTo=function(t,i,r){var s,n,a,o,l=e.to(t,i,r),h=[l],u=[],f=[],_=[],c=e._internals.reservedProps;for(t=l._targets||l.target,ee(t,u,_),l.render(i,!0,!0),ee(t,f),l.render(0,!0,!0),l._enabled(!0),s=_.length;--s>-1;)if((n=st(_[s],u[s],f[s])).firstMPT){for(a in n=n.difs,r)c[a]&&(n[a]=r[a]);for(a in o={},n)o[a]=u[s][a];h.push(e.fromTo(_[s],i,o,n))}return h},t.activate([o]),o},!0),function(){var t=s._gsDefine.plugin({propName:"roundProps",version:"1.6.0",priority:-1,API:2,init:function(t,e,i){return this._tween=i,!0}}),e=function(t){for(;t;)t.f||t.blob||(t.m=Math.round),t=t._next},i=t.prototype;i._onInitAllProps=function(){for(var t,i,r,s=this._tween,n=s.vars.roundProps.join?s.vars.roundProps:s.vars.roundProps.split(","),a=n.length,o={},l=s._propLookup.roundProps;--a>-1;)o[n[a]]=Math.round;for(a=n.length;--a>-1;)for(t=n[a],i=s._firstPT;i;)r=i._next,i.pg?i.t._mod(o):i.n===t&&(2===i.f&&i.t?e(i.t._firstPT):(this._add(i.t,t,i.s,i.c),r&&(r._prev=i._prev),i._prev?i._prev._next=r:s._firstPT===i&&(s._firstPT=r),i._next=i._prev=null,s._propLookup[t]=l)),i=r;return!1},i._add=function(t,e,i,r){this._addTween(t,e,i,i+r,e,Math.round),this._overwriteProps.push(e)}}(),s._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(t,e,i,r){var s,n;if("function"!=typeof t.setAttribute)return!1;for(s in e)"function"==typeof(n=e[s])&&(n=n(r,t)),this._addTween(t,"setAttribute",t.getAttribute(s)+"",n+"",s,!1,s),this._overwriteProps.push(s);return!0}}),s._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(t,e,i,r){"object"!=typeof e&&(e={rotation:e}),this.finals={};var s,n,a,o,l,h,u=!0===e.useRadians?2*Math.PI:360;for(s in e)"useRadians"!==s&&("function"==typeof(o=e[s])&&(o=o(r,t)),n=(h=(o+"").split("_"))[0],a=parseFloat("function"!=typeof t[s]?t[s]:t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)]()),l=(o=this.finals[s]="string"==typeof n&&"="===n.charAt(1)?a+parseInt(n.charAt(0)+"1",10)*Number(n.substr(2)):Number(n)||0)-a,h.length&&(-1!==(n=h.join("_")).indexOf("short")&&(l%=u)!==l%(u/2)&&(l=l<0?l+u:l-u),-1!==n.indexOf("_cw")&&l<0?l=(l+9999999999*u)%u-(l/u|0)*u:-1!==n.indexOf("ccw")&&l>0&&(l=(l-9999999999*u)%u-(l/u|0)*u)),(l>1e-6||l<-1e-6)&&(this._addTween(t,s,a,a+l,s),this._overwriteProps.push(s)));return!0},set:function(t){var e;if(1!==t)this._super.setRatio.call(this,t);else for(e=this._firstPT;e;)e.f?e.t[e.p](this.finals[e.p]):e.t[e.p]=this.finals[e.p],e=e._next}})._autoCSS=!0,s._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,r,n,a=s.GreenSockGlobals||s,o=a.com.greensock,l=2*Math.PI,h=Math.PI/2,u=o._class,f=function(e,i){var r=u("easing."+e,function(){},!0),s=r.prototype=new t;return s.constructor=r,s.getRatio=i,r},_=t.register||function(){},c=function(t,e,i,r,s){var n=u("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new r},!0);return _(n,t),n},p=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},d=function(e,i){var r=u("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),s=r.prototype=new t;return s.constructor=r,s.getRatio=i,s.config=function(t){return new r(t)},r},m=c("Back",d("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),d("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),d("BackInOut",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),g=u("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=!0===i},!0),v=g.prototype=new t;return v.constructor=g,v.getRatio=function(t){var e=t+(.5-t)*this._p;return t<this._p1?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1===t?0:1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},g.ease=new g(.7,.7),v.config=g.config=function(t,e,i){return new g(t,e,i)},(v=(e=u("easing.SteppedEase",function(t,e){t=t||1,this._p1=1/t,this._p2=t+(e?0:1),this._p3=e?1:0},!0)).prototype=new t).constructor=e,v.getRatio=function(t){return t<0?t=0:t>=1&&(t=.999999999),((this._p2*t|0)+this._p3)*this._p1},v.config=e.config=function(t,i){return new e(t,i)},(v=(i=u("easing.ExpoScaleEase",function(t,e,i){this._p1=Math.log(e/t),this._p2=e-t,this._p3=t,this._ease=i},!0)).prototype=new t).constructor=i,v.getRatio=function(t){return this._ease&&(t=this._ease.getRatio(t)),(this._p3*Math.exp(this._p1*t)-this._p3)/this._p2},v.config=i.config=function(t,e,r){return new i(t,e,r)},(v=(r=u("easing.RoughEase",function(e){for(var i,r,s,n,a,o,l=(e=e||{}).taper||"none",h=[],u=0,f=0|(e.points||20),_=f,c=!1!==e.randomize,d=!0===e.clamp,m=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--_>-1;)i=c?Math.random():1/f*_,r=m?m.getRatio(i):i,s="none"===l?g:"out"===l?(n=1-i)*n*g:"in"===l?i*i*g:i<.5?(n=2*i)*n*.5*g:(n=2*(1-i))*n*.5*g,c?r+=Math.random()*s-.5*s:_%2?r+=.5*s:r-=.5*s,d&&(r>1?r=1:r<0&&(r=0)),h[u++]={x:i,y:r};for(h.sort(function(t,e){return t.x-e.x}),o=new p(1,1,null),_=f;--_>-1;)a=h[_],o=new p(a.x,a.y,o);this._prev=new p(0,0,0!==o.t?o:o.next)},!0)).prototype=new t).constructor=r,v.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&t<=e.t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},v.config=function(t){return new r(t)},r.ease=new r,c("Bounce",f("BounceOut",function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),f("BounceIn",function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),f("BounceInOut",function(t){var e=t<.5;return(t=e?1-2*t:2*t-1)<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),c("Circ",f("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),f("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),f("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),c("Elastic",(n=function(e,i,r){var s=u("easing."+e,function(t,e){this._p1=t>=1?t:1,this._p2=(e||r)/(t<1?t:1),this._p3=this._p2/l*(Math.asin(1/this._p1)||0),this._p2=l/this._p2},!0),n=s.prototype=new t;return n.constructor=s,n.getRatio=i,n.config=function(t,e){return new s(t,e)},s})("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*this._p2)+1},.3),n("ElasticIn",function(t){return-this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)},.3),n("ElasticInOut",function(t){return(t*=2)<1?this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*this._p2)*.5+1},.45)),c("Expo",f("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),f("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),f("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),c("Sine",f("SineOut",function(t){return Math.sin(t*h)}),f("SineIn",function(t){return 1-Math.cos(t*h)}),f("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),u("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),_(a.SlowMo,"SlowMo","ease,"),_(r,"RoughEase","ease,"),_(e,"SteppedEase","ease,"),m},!0)}),s._gsDefine&&s._gsQueue.pop()(),function(i,s){"use strict";var n={},a=i.document,o=i.GreenSockGlobals=i.GreenSockGlobals||i;if(!o.TweenLite){var l,h,u,f,_,c,p,d=function(t){var e,i=t.split("."),r=o;for(e=0;e<i.length;e++)r[i[e]]=r=r[i[e]]||{};return r},m=d("com.greensock"),g=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},v=function(){},y=(c=Object.prototype.toString,p=c.call([]),function(t){return null!=t&&(t instanceof Array||"object"==typeof t&&!!t.push&&c.call(t)===p)}),T={},x=function(i,s,a,l){this.sc=T[i]?T[i].sc:[],T[i]=this,this.gsClass=null,this.func=a;var h=[];this.check=function(u){for(var f,_,c,p,m=s.length,g=m;--m>-1;)(f=T[s[m]]||new x(s[m],[])).gsClass?(h[m]=f.gsClass,g--):u&&f.sc.push(this);if(0===g&&a){if(c=(_=("com.greensock."+i).split(".")).pop(),p=d(_.join("."))[c]=this.gsClass=a.apply(a,h),l)if(o[c]=n[c]=p,void 0!==t&&t.exports)if("TweenMax"===i)for(m in t.exports=n.TweenMax=p,n)p[m]=n[m];else n.TweenMax&&(n.TweenMax[c]=p);else void 0===(r=function(){return p}.apply(e,[]))||(t.exports=r);for(m=0;m<this.sc.length;m++)this.sc[m].check()}},this.check(!0)},b=i._gsDefine=function(t,e,i,r){return new x(t,e,i,r)},w=m._class=function(t,e,i){return e=e||function(){},b(t,[],function(){return e},i),e};b.globals=o;var P=[0,0,1,1],O=w("easing.Ease",function(t,e,i,r){this._func=t,this._type=i||0,this._power=r||0,this._params=e?P.concat(e):P},!0),k=O.map={},S=O.register=function(t,e,i,r){for(var s,n,a,o,l=e.split(","),h=l.length,u=(i||"easeIn,easeOut,easeInOut").split(",");--h>-1;)for(n=l[h],s=r?w("easing."+n,null,!0):m.easing[n]||{},a=u.length;--a>-1;)o=u[a],k[n+"."+o]=k[o+n]=s[o]=t.getRatio?t:t[o]||new t};for((u=O.prototype)._calcEnd=!1,u.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,r=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?r*=r:2===i?r*=r*r:3===i?r*=r*r*r:4===i&&(r*=r*r*r*r),1===e?1-r:2===e?r:t<.5?r/2:1-r/2},h=(l=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;--h>-1;)u=l[h]+",Power"+h,S(new O(null,null,1,h),u,"easeOut",!0),S(new O(null,null,2,h),u,"easeIn"+(0===h?",easeNone":"")),S(new O(null,null,3,h),u,"easeInOut");k.linear=m.easing.Linear.easeIn,k.swing=m.easing.Quad.easeInOut;var R=w("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(u=R.prototype).addEventListener=function(t,e,i,r,s){s=s||0;var n,a,o=this._listeners[t],l=0;for(this!==f||_||f.wake(),null==o&&(this._listeners[t]=o=[]),a=o.length;--a>-1;)(n=o[a]).c===e&&n.s===i?o.splice(a,1):0===l&&n.pr<s&&(l=a+1);o.splice(l,0,{c:e,s:i,up:r,pr:s})},u.removeEventListener=function(t,e){var i,r=this._listeners[t];if(r)for(i=r.length;--i>-1;)if(r[i].c===e)return void r.splice(i,1)},u.dispatchEvent=function(t){var e,i,r,s=this._listeners[t];if(s)for((e=s.length)>1&&(s=s.slice(0)),i=this._eventTarget;--e>-1;)(r=s[e])&&(r.up?r.c.call(r.s||i,{type:t,target:i}):r.c.call(r.s||i))};var A=i.requestAnimationFrame,C=i.cancelAnimationFrame,M=Date.now||function(){return(new Date).getTime()},D=M();for(h=(l=["ms","moz","webkit","o"]).length;--h>-1&&!A;)A=i[l[h]+"RequestAnimationFrame"],C=i[l[h]+"CancelAnimationFrame"]||i[l[h]+"CancelRequestAnimationFrame"];w("Ticker",function(t,e){var i,r,s,n,o,l=this,h=M(),u=!(!1===e||!A)&&"auto",c=500,p=33,d=function(t){var e,a,u=M()-D;u>c&&(h+=u-p),D+=u,l.time=(D-h)/1e3,e=l.time-o,(!i||e>0||!0===t)&&(l.frame++,o+=e+(e>=n?.004:n-e),a=!0),!0!==t&&(s=r(d)),a&&l.dispatchEvent("tick")};R.call(l),l.time=l.frame=0,l.tick=function(){d(!0)},l.lagSmoothing=function(t,e){if(!arguments.length)return c<1e10;c=t||1e10,p=Math.min(e,c,0)},l.sleep=function(){null!=s&&(u&&C?C(s):clearTimeout(s),r=v,s=null,l===f&&(_=!1))},l.wake=function(t){null!==s?l.sleep():t?h+=-D+(D=M()):l.frame>10&&(D=M()-c+5),r=0===i?v:u&&A?A:function(t){return setTimeout(t,1e3*(o-l.time)+1|0)},l===f&&(_=!0),d(2)},l.fps=function(t){if(!arguments.length)return i;n=1/((i=t)||60),o=this.time+n,l.wake()},l.useRAF=function(t){if(!arguments.length)return u;l.sleep(),u=t,l.fps(i)},l.fps(t),setTimeout(function(){"auto"===u&&l.frame<5&&"hidden"!==(a||{}).visibilityState&&l.useRAF(!1)},1500)}),(u=m.Ticker.prototype=new m.events.EventDispatcher).constructor=m.Ticker;var E=w("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=!0===e.immediateRender,this.data=e.data,this._reversed=!0===e.reversed,K){_||f.wake();var i=this.vars.useFrames?Q:K;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});f=E.ticker=new m.Ticker,(u=E.prototype)._dirty=u._gc=u._initted=u._paused=!1,u._totalTime=u._time=0,u._rawPrevTime=-1,u._next=u._last=u._onUpdate=u._timeline=u.timeline=null,u._paused=!1;var F=function(){_&&M()-D>2e3&&("hidden"!==(a||{}).visibilityState||!f.lagSmoothing())&&f.wake();var t=setTimeout(F,2e3);t.unref&&t.unref()};F(),u.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},u.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},u.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},u.seek=function(t,e){return this.totalTime(Number(t),!1!==e)},u.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,!1!==e,!0)},u.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},u.render=function(t,e,i){},u.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},u.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<i+this.totalDuration()/this._timeScale-1e-7},u._enabled=function(t,e){return _||f.wake(),this._gc=!t,this._active=this.isActive(),!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},u._kill=function(t,e){return this._enabled(!1,!1)},u.kill=function(t,e){return this._kill(t,e),this},u._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},u._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();--e>-1;)"{self}"===t[e]&&(i[e]=this);return i},u._callback=function(t){var e=this.vars,i=e[t],r=e[t+"Params"],s=e[t+"Scope"]||e.callbackScope||this;switch(r?r.length:0){case 0:i.call(s);break;case 1:i.call(s,r[0]);break;case 2:i.call(s,r[0],r[1]);break;default:i.apply(s,r)}},u.eventCallback=function(t,e,i,r){if("on"===(t||"").substr(0,2)){var s=this.vars;if(1===arguments.length)return s[t];null==e?delete s[t]:(s[t]=e,s[t+"Params"]=y(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,s[t+"Scope"]=r),"onUpdate"===t&&(this._onUpdate=e)}return this},u.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},u.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==t&&this.totalTime(this._totalTime*(t/this._duration),!0),this):(this._dirty=!1,this._duration)},u.totalDuration=function(t){return this._dirty=!1,arguments.length?this.duration(t):this._totalDuration},u.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(t>this._duration?this._duration:t,e)):this._time},u.totalTime=function(t,e,i){if(_||f.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var r=this._totalDuration,s=this._timeline;if(t>r&&!i&&(t=r),this._startTime=(this._paused?this._pauseTime:s._time)-(this._reversed?r-t:t)/this._timeScale,s._dirty||this._uncache(!1),s._timeline)for(;s._timeline;)s._timeline._time!==(s._startTime+s._totalTime)/s._timeScale&&s.totalTime(s._totalTime,!0),s=s._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===t&&0!==this._duration||(j.length&&tt(),this.render(t,e,!1),j.length&&tt())}return this},u.progress=u.totalProgress=function(t,e){var i=this.duration();return arguments.length?this.totalTime(i*t,e):i?this._time/i:this.ratio},u.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},u.endTime=function(t){return this._startTime+(0!=t?this.totalDuration():this.duration())/this._timeScale},u.timeScale=function(t){if(!arguments.length)return this._timeScale;var e,i;for(t=t||1e-10,this._timeline&&this._timeline.smoothChildTiming&&(i=(e=this._pauseTime)||0===e?e:this._timeline.totalTime(),this._startTime=i-(i-this._startTime)*this._timeScale/t),this._timeScale=t,i=this.timeline;i&&i.timeline;)i._dirty=!0,i.totalDuration(),i=i.timeline;return this},u.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},u.paused=function(t){if(!arguments.length)return this._paused;var e,i,r=this._timeline;return t!=this._paused&&r&&(_||t||f.wake(),i=(e=r.rawTime())-this._pauseTime,!t&&r.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=this.isActive(),!t&&0!==i&&this._initted&&this.duration()&&(e=r.smoothChildTiming?this._totalTime:(e-this._startTime)/this._timeScale,this.render(e,e===this._totalTime,!0))),this._gc&&!t&&this._enabled(!0,!1),this};var z=w("core.SimpleTimeline",function(t){E.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});(u=z.prototype=new E).constructor=z,u.kill()._gc=!1,u._first=u._last=u._recent=null,u._sortChildren=!1,u.add=u.insert=function(t,e,i,r){var s,n;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=t._startTime+(this.rawTime()-t._startTime)/t._timeScale),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),s=this._last,this._sortChildren)for(n=t._startTime;s&&s._startTime>n;)s=s._prev;return s?(t._next=s._next,s._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=s,this._recent=t,this._timeline&&this._uncache(!0),this},u._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,t===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},u.render=function(t,e,i){var r,s=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;s;)r=s._next,(s._active||t>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=r},u.rawTime=function(){return _||f.wake(),this._totalTime};var L=w("TweenLite",function(t,e,r){if(E.call(this,e,r),this.render=L.prototype.render,null==t)throw"Cannot tween a null target.";this.target=t="string"!=typeof t?t:L.selector(t)||t;var s,n,a,o=t.jquery||t.length&&t!==i&&t[0]&&(t[0]===i||t[0].nodeType&&t[0].style&&!t.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?$[L.defaultOverwrite]:"number"==typeof l?l>>0:$[l],(o||t instanceof Array||t.push&&y(t))&&"number"!=typeof t[0])for(this._targets=a=g(t),this._propLookup=[],this._siblings=[],s=0;s<a.length;s++)(n=a[s])?"string"!=typeof n?n.length&&n!==i&&n[0]&&(n[0]===i||n[0].nodeType&&n[0].style&&!n.nodeType)?(a.splice(s--,1),this._targets=a=a.concat(g(n))):(this._siblings[s]=et(n,this,!1),1===l&&this._siblings[s].length>1&&rt(n,this,null,1,this._siblings[s])):"string"==typeof(n=a[s--]=L.selector(n))&&a.splice(s+1,1):a.splice(s--,1);else this._propLookup={},this._siblings=et(t,this,!1),1===l&&this._siblings.length>1&&rt(t,this,null,1,this._siblings);(this.vars.immediateRender||0===e&&0===this._delay&&!1!==this.vars.immediateRender)&&(this._time=-1e-10,this.render(Math.min(0,-this._delay)))},!0),I=function(t){return t&&t.length&&t!==i&&t[0]&&(t[0]===i||t[0].nodeType&&t[0].style&&!t.nodeType)};(u=L.prototype=new E).constructor=L,u.kill()._gc=!1,u.ratio=0,u._firstPT=u._targets=u._overwrittenProps=u._startAt=null,u._notifyPluginsOfEnabled=u._lazy=!1,L.version="1.20.4",L.defaultEase=u._ease=new O(null,null,1,1),L.defaultOverwrite="auto",L.ticker=f,L.autoSleep=120,L.lagSmoothing=function(t,e){f.lagSmoothing(t,e)},L.selector=i.$||i.jQuery||function(t){var e=i.$||i.jQuery;return e?(L.selector=e,e(t)):void 0===a?t:a.querySelectorAll?a.querySelectorAll(t):a.getElementById("#"===t.charAt(0)?t.substr(1):t)};var j=[],N={},X=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,B=/[\+-]=-?[\.\d]/,Y=function(t){for(var e,i=this._firstPT;i;)e=i.blob?1===t&&null!=this.end?this.end:t?this.join(""):this.start:i.c*t+i.s,i.m?e=i.m(e,this._target||i.t):e<1e-6&&e>-1e-6&&!i.blob&&(e=0),i.f?i.fp?i.t[i.p](i.fp,e):i.t[i.p](e):i.t[i.p]=e,i=i._next},V=function(t,e,i,r){var s,n,a,o,l,h,u,f=[],_=0,c="",p=0;for(f.start=t,f.end=e,t=f[0]=t+"",e=f[1]=e+"",i&&(i(f),t=f[0],e=f[1]),f.length=0,s=t.match(X)||[],n=e.match(X)||[],r&&(r._next=null,r.blob=1,f._firstPT=f._applyPT=r),l=n.length,o=0;o<l;o++)u=n[o],c+=(h=e.substr(_,e.indexOf(u,_)-_))||!o?h:",",_+=h.length,p?p=(p+1)%5:"rgba("===h.substr(-5)&&(p=1),u===s[o]||s.length<=o?c+=u:(c&&(f.push(c),c=""),a=parseFloat(s[o]),f.push(a),f._firstPT={_next:f._firstPT,t:f,p:f.length-1,s:a,c:("="===u.charAt(1)?parseInt(u.charAt(0)+"1",10)*parseFloat(u.substr(2)):parseFloat(u)-a)||0,f:0,m:p&&p<4?Math.round:0}),_+=u.length;return(c+=e.substr(_))&&f.push(c),f.setRatio=Y,B.test(e)&&(f.end=null),f},U=function(t,e,i,r,s,n,a,o,l){"function"==typeof r&&(r=r(l||0,t));var h=typeof t[e],u="function"!==h?"":e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3),f="get"!==i?i:u?a?t[u](a):t[u]():t[e],_="string"==typeof r&&"="===r.charAt(1),c={t:t,p:e,s:f,f:"function"===h,pg:0,n:s||e,m:n?"function"==typeof n?n:Math.round:0,pr:0,c:_?parseInt(r.charAt(0)+"1",10)*parseFloat(r.substr(2)):parseFloat(r)-f||0};if(("number"!=typeof f||"number"!=typeof r&&!_)&&(a||isNaN(f)||!_&&isNaN(r)||"boolean"==typeof f||"boolean"==typeof r?(c.fp=a,c={t:V(f,_?parseFloat(c.s)+c.c+(c.s+"").replace(/[0-9\-\.]/g,""):r,o||L.defaultStringFilter,c),p:"setRatio",s:0,c:1,f:2,pg:0,n:s||e,pr:0,m:0}):(c.s=parseFloat(f),_||(c.c=parseFloat(r)-c.s||0))),c.c)return(c._next=this._firstPT)&&(c._next._prev=c),this._firstPT=c,c},q=L._internals={isArray:y,isSelector:I,lazyTweens:j,blobDif:V},G=L._plugins={},W=q.tweenLookup={},Z=0,H=q.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},$={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},Q=E._rootFramesTimeline=new z,K=E._rootTimeline=new z,J=30,tt=q.lazyRender=function(){var t,e=j.length;for(N={};--e>-1;)(t=j[e])&&!1!==t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);j.length=0};K._startTime=f.time,Q._startTime=f.frame,K._active=Q._active=!0,setTimeout(tt,1),E._updateRoot=L.render=function(){var t,e,i;if(j.length&&tt(),K.render((f.time-K._startTime)*K._timeScale,!1,!1),Q.render((f.frame-Q._startTime)*Q._timeScale,!1,!1),j.length&&tt(),f.frame>=J){for(i in J=f.frame+(parseInt(L.autoSleep,10)||120),W){for(t=(e=W[i].tweens).length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete W[i]}if((!(i=K._first)||i._paused)&&L.autoSleep&&!Q._first&&1===f._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||f.sleep()}}},f.addEventListener("tick",E._updateRoot);var et=function(t,e,i){var r,s,n=t._gsTweenID;if(W[n||(t._gsTweenID=n="t"+Z++)]||(W[n]={target:t,tweens:[]}),e&&((r=W[n].tweens)[s=r.length]=e,i))for(;--s>-1;)r[s]===e&&r.splice(s,1);return W[n].tweens},it=function(t,e,i,r){var s,n,a=t.vars.onOverwrite;return a&&(s=a(t,e,i,r)),(a=L.onOverwrite)&&(n=a(t,e,i,r)),!1!==s&&!1!==n},rt=function(t,e,i,r,s){var n,a,o,l;if(1===r||r>=4){for(l=s.length,n=0;n<l;n++)if((o=s[n])!==e)o._gc||o._kill(null,t,e)&&(a=!0);else if(5===r)break;return a}var h,u=e._startTime+1e-10,f=[],_=0,c=0===e._duration;for(n=s.length;--n>-1;)(o=s[n])===e||o._gc||o._paused||(o._timeline!==e._timeline?(h=h||st(e,0,c),0===st(o,h,c)&&(f[_++]=o)):o._startTime<=u&&o._startTime+o.totalDuration()/o._timeScale>u&&((c||!o._initted)&&u-o._startTime<=2e-10||(f[_++]=o)));for(n=_;--n>-1;)if(o=f[n],2===r&&o._kill(i,t,e)&&(a=!0),2!==r||!o._firstPT&&o._initted){if(2!==r&&!it(o,e))continue;o._enabled(!1,!1)&&(a=!0)}return a},st=function(t,e,i){for(var r=t._timeline,s=r._timeScale,n=t._startTime;r._timeline;){if(n+=r._startTime,s*=r._timeScale,r._paused)return-100;r=r._timeline}return(n/=s)>e?n-e:i&&n===e||!t._initted&&n-e<2e-10?1e-10:(n+=t.totalDuration()/t._timeScale/s)>e+1e-10?0:n-e-1e-10};u._init=function(){var t,e,i,r,s,n,a=this.vars,o=this._overwrittenProps,l=this._duration,h=!!a.immediateRender,u=a.ease;if(a.startAt){for(r in this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),s={},a.startAt)s[r]=a.startAt[r];if(s.data="isStart",s.overwrite=!1,s.immediateRender=!0,s.lazy=h&&!1!==a.lazy,s.startAt=s.delay=null,s.onUpdate=a.onUpdate,s.onUpdateParams=a.onUpdateParams,s.onUpdateScope=a.onUpdateScope||a.callbackScope||this,this._startAt=L.to(this.target,0,s),h)if(this._time>0)this._startAt=null;else if(0!==l)return}else if(a.runBackwards&&0!==l)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{for(r in 0!==this._time&&(h=!1),i={},a)H[r]&&"autoCSS"!==r||(i[r]=a[r]);if(i.overwrite=0,i.data="isFromStart",i.lazy=h&&!1!==a.lazy,i.immediateRender=h,this._startAt=L.to(this.target,0,i),h){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=u=u?u instanceof O?u:"function"==typeof u?new O(u,a.easeParams):k[u]||L.defaultEase:L.defaultEase,a.easeParams instanceof Array&&u.config&&(this._ease=u.config.apply(u,a.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(n=this._targets.length,t=0;t<n;t++)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],o?o[t]:null,t)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,o,0);if(e&&L._onPluginEvent("_onInitAllProps",this),o&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),a.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=a.onUpdate,this._initted=!0},u._initProps=function(t,e,r,s,n){var a,o,l,h,u,f;if(null==t)return!1;for(a in N[t._gsTweenID]&&tt(),this.vars.css||t.style&&t!==i&&t.nodeType&&G.css&&!1!==this.vars.autoCSS&&function(t,e){var i,r={};for(i in t)H[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!G[i]||G[i]&&G[i]._autoCSS)||(r[i]=t[i],delete t[i]);t.css=r}(this.vars,t),this.vars)if(f=this.vars[a],H[a])f&&(f instanceof Array||f.push&&y(f))&&-1!==f.join("").indexOf("{self}")&&(this.vars[a]=f=this._swapSelfInParams(f,this));else if(G[a]&&(h=new G[a])._onInitTween(t,this.vars[a],this,n)){for(this._firstPT=u={_next:this._firstPT,t:h,p:"setRatio",s:0,c:1,f:1,n:a,pg:1,pr:h._priority,m:0},o=h._overwriteProps.length;--o>-1;)e[h._overwriteProps[o]]=this._firstPT;(h._priority||h._onInitAllProps)&&(l=!0),(h._onDisable||h._onEnable)&&(this._notifyPluginsOfEnabled=!0),u._next&&(u._next._prev=u)}else e[a]=U.call(this,t,a,"get",f,a,0,null,this.vars.stringFilter,n);return s&&this._kill(s,t)?this._initProps(t,e,r,s,n):this._overwrite>1&&this._firstPT&&r.length>1&&rt(t,this,e,this._overwrite,r)?(this._kill(e,t),this._initProps(t,e,r,s,n)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(N[t._gsTweenID]=!0),l)},u.render=function(t,e,i){var r,s,n,a,o=this._time,l=this._duration,h=this._rawPrevTime;if(t>=l-1e-7&&t>=0)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(r=!0,s="onComplete",i=i||this._timeline.autoRemoveChildren),0===l&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(h<0||t<=0&&t>=-1e-7||1e-10===h&&"isPause"!==this.data)&&h!==t&&(i=!0,h>1e-10&&(s="onReverseComplete")),this._rawPrevTime=a=!e||t||h===t?t:1e-10);else if(t<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===l&&h>0)&&(s="onReverseComplete",r=this._reversed),t<0&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||i)&&(h>=0&&(1e-10!==h||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=a=!e||t||h===t?t:1e-10)),(!this._initted||this._startAt&&this._startAt.progress())&&(i=!0);else if(this._totalTime=this._time=t,this._easeType){var u=t/l,f=this._easeType,_=this._easePower;(1===f||3===f&&u>=.5)&&(u=1-u),3===f&&(u*=2),1===_?u*=u:2===_?u*=u*u:3===_?u*=u*u*u:4===_&&(u*=u*u*u*u),this.ratio=1===f?1-u:2===f?u:t/l<.5?u/2:1-u/2}else this.ratio=this._ease.getRatio(t/l);if(this._time!==o||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=h,j.push(this),void(this._lazy=[t,e]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/l):r&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&t>=0&&(this._active=!0),0===o&&(this._startAt&&(t>=0?this._startAt.render(t,!0,i):s||(s="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==l||e||this._callback("onStart"))),n=this._firstPT;n;)n.f?n.t[n.p](n.c*this.ratio+n.s):n.t[n.p]=n.c*this.ratio+n.s,n=n._next;this._onUpdate&&(t<0&&this._startAt&&-1e-4!==t&&this._startAt.render(t,!0,i),e||(this._time!==o||r||i)&&this._callback("onUpdate")),s&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&-1e-4!==t&&this._startAt.render(t,!0,i),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[s]&&this._callback(s),0===l&&1e-10===this._rawPrevTime&&1e-10!==a&&(this._rawPrevTime=0)))}},u._kill=function(t,e,i){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:L.selector(e)||e;var r,s,n,a,o,l,h,u,f,_=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((y(e)||I(e))&&"number"!=typeof e[0])for(r=e.length;--r>-1;)this._kill(t,e[r],i)&&(l=!0);else{if(this._targets){for(r=this._targets.length;--r>-1;)if(e===this._targets[r]){o=this._propLookup[r]||{},this._overwrittenProps=this._overwrittenProps||[],s=this._overwrittenProps[r]=t?this._overwrittenProps[r]||{}:"all";break}}else{if(e!==this.target)return!1;o=this._propLookup,s=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(o){if(h=t||o,u=t!==s&&"all"!==s&&t!==o&&("object"!=typeof t||!t._tempKill),i&&(L.onOverwrite||this.vars.onOverwrite)){for(n in h)o[n]&&(f||(f=[]),f.push(n));if((f||!t)&&!it(this,i,e,f))return!1}for(n in h)(a=o[n])&&(_&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,l=!0),a.pg&&a.t._kill(h)&&(l=!0),a.pg&&0!==a.t._overwriteProps.length||(a._prev?a._prev._next=a._next:a===this._firstPT&&(this._firstPT=a._next),a._next&&(a._next._prev=a._prev),a._next=a._prev=null),delete o[n]),u&&(s[n]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},u.invalidate=function(){return this._notifyPluginsOfEnabled&&L._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],E.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-1e-10,this.render(Math.min(0,-this._delay))),this},u._enabled=function(t,e){if(_||f.wake(),t&&this._gc){var i,r=this._targets;if(r)for(i=r.length;--i>-1;)this._siblings[i]=et(r[i],this,!0);else this._siblings=et(this.target,this,!0)}return E.prototype._enabled.call(this,t,e),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&L._onPluginEvent(t?"_onEnable":"_onDisable",this)},L.to=function(t,e,i){return new L(t,e,i)},L.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new L(t,e,i)},L.fromTo=function(t,e,i,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new L(t,e,r)},L.delayedCall=function(t,e,i,r,s){return new L(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:s,overwrite:0})},L.set=function(t,e){return new L(t,0,e)},L.getTweensOf=function(t,e){if(null==t)return[];var i,r,s,n;if(t="string"!=typeof t?t:L.selector(t)||t,(y(t)||I(t))&&"number"!=typeof t[0]){for(i=t.length,r=[];--i>-1;)r=r.concat(L.getTweensOf(t[i],e));for(i=r.length;--i>-1;)for(n=r[i],s=i;--s>-1;)n===r[s]&&r.splice(i,1)}else if(t._gsTweenID)for(i=(r=et(t).concat()).length;--i>-1;)(r[i]._gc||e&&!r[i].isActive())&&r.splice(i,1);return r||[]},L.killTweensOf=L.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var r=L.getTweensOf(t,e),s=r.length;--s>-1;)r[s]._kill(i,t)};var nt=w("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=nt.prototype},!0);if(u=nt.prototype,nt.version="1.19.0",nt.API=2,u._firstPT=null,u._addTween=U,u.setRatio=Y,u._kill=function(t){var e,i=this._overwriteProps,r=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;--e>-1;)null!=t[i[e]]&&i.splice(e,1);for(;r;)null!=t[r.n]&&(r._next&&(r._next._prev=r._prev),r._prev?(r._prev._next=r._next,r._prev=null):this._firstPT===r&&(this._firstPT=r._next)),r=r._next;return!1},u._mod=u._roundProps=function(t){for(var e,i=this._firstPT;i;)(e=t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&"function"==typeof e&&(2===i.f?i.t._applyPT.m=e:i.m=e),i=i._next},L._onPluginEvent=function(t,e){var i,r,s,n,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,r=s;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:n)?o._prev._next=o:s=o,(o._next=r)?r._prev=o:n=o,o=a}o=e._firstPT=s}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},nt.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===nt.API&&(G[(new t[e])._propName]=t[e]);return!0},b.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,r=t.priority||0,s=t.overwriteProps,n={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},a=w("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){nt.call(this,i,r),this._overwriteProps=s||[]},!0===t.global),o=a.prototype=new nt(i);for(e in o.constructor=a,a.API=t.API,n)"function"==typeof t[e]&&(o[n[e]]=t[e]);return a.version=t.version,nt.activate([a]),a},l=i._gsQueue){for(h=0;h<l.length;h++)l[h]();for(u in T)T[u].func||i.console.log("GSAP encountered missing dependency: "+u)}_=!1}}(void 0!==t&&t.exports&&void 0!==i?i:this||window)}).call(this,i(1))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,s=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),a=(r=n)&&r.__esModule?r:{default:r},o=i(2);var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Transition),s(e,[{key:"in",value:function(t,e){o.TweenMax.fromTo(t,1,{alpha:0},{alpha:1,onComplete:e})}},{key:"out",value:function(t,e){o.TweenMax.fromTo(t,1,{alpha:1},{alpha:0,onComplete:e})}}]),e}();e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,s=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),a=(r=n)&&r.__esModule?r:{default:r};var o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Renderer),s(e,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),e}();e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,s=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),a=(r=n)&&r.__esModule?r:{default:r};var o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Renderer),s(e,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),e}();e.default=o},function(t,e,i){"use strict";var r=o(i(0)),s=o(i(5)),n=o(i(4)),a=o(i(3));function o(t){return t&&t.__esModule?t:{default:t}}new r.default.Core({renderers:{home:s.default,page:n.default},transitions:{home:a.default,page:a.default}})}]); \ No newline at end of file + **/(s._gsQueue||(s._gsQueue=[])).push(function(){"use strict";var t,e,i,r,n,a,o,l,h,u,f,_,c,p;s._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var r=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},s=function(t,e,i){var r,s,n=t.cycle;for(r in n)s=n[r],t[r]="function"==typeof s?s(i,e[i]):s[i%s.length];delete t.cycle},n=function(t,e,r){i.call(this,t,e,r),this._cycle=0,this._yoyo=!0===this.vars.yoyo||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=n.prototype.render},a=i._internals,o=a.isSelector,l=a.isArray,h=n.prototype=i.to({},.1,{}),u=[];n.version="1.20.4",h.constructor=n,h.kill()._gc=!1,n.killTweensOf=n.killDelayedCallsTo=i.killTweensOf,n.getTweensOf=i.getTweensOf,n.lagSmoothing=i.lagSmoothing,n.ticker=i.ticker,n.render=i.render,h.invalidate=function(){return this._yoyo=!0===this.vars.yoyo||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),i.prototype.invalidate.call(this)},h.updateTo=function(t,e){var r,s=this.ratio,n=this.vars.immediateRender||t.immediateRender;for(r in e&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay)),t)this.vars[r]=t[r];if(this._initted||n)if(e)this._initted=!1,n&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&i._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var a=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(a,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||n)for(var o,l=1/(1-s),h=this._firstPT;h;)o=h.s+h.c,h.c*=l,h.s=o-h.c,h=h._next;return this},h.render=function(t,e,r){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var s,n,o,l,h,u,f,_,c,p=this._dirty?this.totalDuration():this._totalDuration,d=this._time,m=this._totalTime,g=this._cycle,v=this._duration,y=this._rawPrevTime;if(t>=p-1e-7&&t>=0?(this._totalTime=p,this._cycle=this._repeat,this._yoyo&&0!=(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=v,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(s=!0,n="onComplete",r=r||this._timeline.autoRemoveChildren),0===v&&(this._initted||!this.vars.lazy||r)&&(this._startTime===this._timeline._duration&&(t=0),(y<0||t<=0&&t>=-1e-7||1e-10===y&&"isPause"!==this.data)&&y!==t&&(r=!0,y>1e-10&&(n="onReverseComplete")),this._rawPrevTime=_=!e||t||y===t?t:1e-10)):t<1e-7?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==m||0===v&&y>0)&&(n="onReverseComplete",s=this._reversed),t<0&&(this._active=!1,0===v&&(this._initted||!this.vars.lazy||r)&&(y>=0&&(r=!0),this._rawPrevTime=_=!e||t||y===t?t:1e-10)),this._initted||(r=!0)):(this._totalTime=this._time=t,0!==this._repeat&&(l=v+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&m<=t&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!=(1&this._cycle)&&(this._time=v-this._time,(c=this._yoyoEase||this.vars.yoyoEase)&&(this._yoyoEase||(!0!==c||this._initted?this._yoyoEase=c=!0===c?this._ease:c instanceof Ease?c:Ease.map[c]:(c=this.vars.ease,this._yoyoEase=c=c?c instanceof Ease?c:"function"==typeof c?new Ease(c,this.vars.easeParams):Ease.map[c]||i.defaultEase:i.defaultEase)),this.ratio=c?1-c.getRatio((v-this._time)/v):0)),this._time>v?this._time=v:this._time<0&&(this._time=0)),this._easeType&&!c?(h=this._time/v,(1===(u=this._easeType)||3===u&&h>=.5)&&(h=1-h),3===u&&(h*=2),1===(f=this._easePower)?h*=h:2===f?h*=h*h:3===f?h*=h*h*h:4===f&&(h*=h*h*h*h),1===u?this.ratio=1-h:2===u?this.ratio=h:this._time/v<.5?this.ratio=h/2:this.ratio=1-h/2):c||(this.ratio=this._ease.getRatio(this._time/v))),d!==this._time||r||g!==this._cycle){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!r&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=d,this._totalTime=m,this._rawPrevTime=y,this._cycle=g,a.lazyTweens.push(this),void(this._lazy=[t,e]);!this._time||s||c?s&&this._ease._calcEnd&&!c&&(this.ratio=this._ease.getRatio(0===this._time?0:1)):this.ratio=this._ease.getRatio(this._time/v)}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==d&&t>=0&&(this._active=!0),0===m&&(2===this._initted&&t>0&&this._init(),this._startAt&&(t>=0?this._startAt.render(t,!0,r):n||(n="_dummyGS")),this.vars.onStart&&(0===this._totalTime&&0!==v||e||this._callback("onStart"))),o=this._firstPT;o;)o.f?o.t[o.p](o.c*this.ratio+o.s):o.t[o.p]=o.c*this.ratio+o.s,o=o._next;this._onUpdate&&(t<0&&this._startAt&&this._startTime&&this._startAt.render(t,!0,r),e||(this._totalTime!==m||n)&&this._callback("onUpdate")),this._cycle!==g&&(e||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),n&&(this._gc&&!r||(t<0&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,!0,r),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[n]&&this._callback(n),0===v&&1e-10===this._rawPrevTime&&1e-10!==_&&(this._rawPrevTime=0)))}else m!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},n.to=function(t,e,i){return new n(t,e,i)},n.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new n(t,e,i)},n.fromTo=function(t,e,i,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new n(t,e,r)},n.staggerTo=n.allTo=function(t,e,a,h,f,_,c){h=h||0;var p,d,m,g,v=0,y=[],T=function(){a.onComplete&&a.onComplete.apply(a.onCompleteScope||this,arguments),f.apply(c||a.callbackScope||this,_||u)},x=a.cycle,w=a.startAt&&a.startAt.cycle;for(l(t)||("string"==typeof t&&(t=i.selector(t)||t),o(t)&&(t=r(t))),t=t||[],h<0&&((t=r(t)).reverse(),h*=-1),p=t.length-1,m=0;m<=p;m++){for(g in d={},a)d[g]=a[g];if(x&&(s(d,t,m),null!=d.duration&&(e=d.duration,delete d.duration)),w){for(g in w=d.startAt={},a.startAt)w[g]=a.startAt[g];s(d.startAt,t,m)}d.delay=v+(d.delay||0),m===p&&f&&(d.onComplete=T),y[m]=new n(t[m],e,d),v+=h}return y},n.staggerFrom=n.allFrom=function(t,e,i,r,s,a,o){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,n.staggerTo(t,e,i,r,s,a,o)},n.staggerFromTo=n.allFromTo=function(t,e,i,r,s,a,o,l){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,n.staggerTo(t,e,r,s,a,o,l)},n.delayedCall=function(t,e,i,r,s){return new n(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,useFrames:s,overwrite:0})},n.set=function(t,e){return new n(t,0,e)},n.isTweening=function(t){return i.getTweensOf(t,!0).length>0};var f=function(t,e){for(var r=[],s=0,n=t._first;n;)n instanceof i?r[s++]=n:(e&&(r[s++]=n),s=(r=r.concat(f(n,e))).length),n=n._next;return r},_=n.getAllTweens=function(e){return f(t._rootTimeline,e).concat(f(t._rootFramesTimeline,e))};n.killAll=function(t,i,r,s){null==i&&(i=!0),null==r&&(r=!0);var n,a,o,l=_(0!=s),h=l.length,u=i&&r&&s;for(o=0;o<h;o++)a=l[o],(u||a instanceof e||(n=a.target===a.vars.onComplete)&&r||i&&!n)&&(t?a.totalTime(a._reversed?0:a.totalDuration()):a._enabled(!1,!1))},n.killChildTweensOf=function(t,e){if(null!=t){var s,h,u,f,_,c=a.tweenLookup;if("string"==typeof t&&(t=i.selector(t)||t),o(t)&&(t=r(t)),l(t))for(f=t.length;--f>-1;)n.killChildTweensOf(t[f],e);else{for(u in s=[],c)for(h=c[u].target.parentNode;h;)h===t&&(s=s.concat(c[u].tweens)),h=h.parentNode;for(_=s.length,f=0;f<_;f++)e&&s[f].totalTime(s[f].totalDuration()),s[f]._enabled(!1,!1)}}};var c=function(t,i,r,s){i=!1!==i,r=!1!==r;for(var n,a,o=_(s=!1!==s),l=i&&r&&s,h=o.length;--h>-1;)a=o[h],(l||a instanceof e||(n=a.target===a.vars.onComplete)&&r||i&&!n)&&a.paused(t)};return n.pauseAll=function(t,e,i){c(!0,t,e,i)},n.resumeAll=function(t,e,i){c(!1,t,e,i)},n.globalTimeScale=function(e){var r=t._rootTimeline,s=i.ticker.time;return arguments.length?(e=e||1e-10,r._startTime=s-(s-r._startTime)*r._timeScale/e,r=t._rootFramesTimeline,s=i.ticker.frame,r._startTime=s-(s-r._startTime)*r._timeScale/e,r._timeScale=t._rootTimeline._timeScale=e,e):r._timeScale},h.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()},h.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()},h.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},h.duration=function(e){return arguments.length?t.prototype.duration.call(this,e):this._duration},h.totalDuration=function(t){return arguments.length?-1===this._repeat?this:this.duration((t-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},h.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},h.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},h.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},n},!0),s._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var r=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=!0===this.vars.autoRemoveChildren,this.smoothChildTiming=!0===this.vars.smoothChildTiming,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var i,r,s=this.vars;for(r in s)i=s[r],l(i)&&-1!==i.join("").indexOf("{self}")&&(s[r]=this._swapSelfInParams(i));l(s.tweens)&&this.add(s.tweens,0,s.align,s.stagger)},n=i._internals,a=r._internals={},o=n.isSelector,l=n.isArray,h=n.lazyTweens,u=n.lazyRender,f=s._gsDefine.globals,_=function(t){var e,i={};for(e in t)i[e]=t[e];return i},c=function(t,e,i){var r,s,n=t.cycle;for(r in n)s=n[r],t[r]="function"==typeof s?s(i,e[i]):s[i%s.length];delete t.cycle},p=a.pauseCallback=function(){},d=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},m=r.prototype=new e;return r.version="1.20.4",m.constructor=r,m.kill()._gc=m._forcingPlayhead=m._hasPause=!1,m.to=function(t,e,r,s){var n=r.repeat&&f.TweenMax||i;return e?this.add(new n(t,e,r),s):this.set(t,r,s)},m.from=function(t,e,r,s){return this.add((r.repeat&&f.TweenMax||i).from(t,e,r),s)},m.fromTo=function(t,e,r,s,n){var a=s.repeat&&f.TweenMax||i;return e?this.add(a.fromTo(t,e,r,s),n):this.set(t,s,n)},m.staggerTo=function(t,e,s,n,a,l,h,u){var f,p,m=new r({onComplete:l,onCompleteParams:h,callbackScope:u,smoothChildTiming:this.smoothChildTiming}),g=s.cycle;for("string"==typeof t&&(t=i.selector(t)||t),o(t=t||[])&&(t=d(t)),(n=n||0)<0&&((t=d(t)).reverse(),n*=-1),p=0;p<t.length;p++)(f=_(s)).startAt&&(f.startAt=_(f.startAt),f.startAt.cycle&&c(f.startAt,t,p)),g&&(c(f,t,p),null!=f.duration&&(e=f.duration,delete f.duration)),m.to(t[p],e,f,p*n);return this.add(m,a)},m.staggerFrom=function(t,e,i,r,s,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,r,s,n,a,o)},m.staggerFromTo=function(t,e,i,r,s,n,a,o,l){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,r,s,n,a,o,l)},m.call=function(t,e,r,s){return this.add(i.delayedCall(0,t,e,r),s)},m.set=function(t,e,r){return r=this._parseTimeOrLabel(r,0,!0),null==e.immediateRender&&(e.immediateRender=r===this._time&&!this._paused),this.add(new i(t,0,e),r)},r.exportRoot=function(t,e){null==(t=t||{}).smoothChildTiming&&(t.smoothChildTiming=!0);var s,n,a,o,l=new r(t),h=l._timeline;for(null==e&&(e=!0),h._remove(l,!0),l._startTime=0,l._rawPrevTime=l._time=l._totalTime=h._time,a=h._first;a;)o=a._next,e&&a instanceof i&&a.target===a.vars.onComplete||((n=a._startTime-a._delay)<0&&(s=1),l.add(a,n)),a=o;return h.add(l,0),s&&l.totalDuration(),l},m.add=function(s,n,a,o){var h,u,f,_,c,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,s)),!(s instanceof t)){if(s instanceof Array||s&&s.push&&l(s)){for(a=a||"normal",o=o||0,h=n,u=s.length,f=0;f<u;f++)l(_=s[f])&&(_=new r({tweens:_})),this.add(_,h),"string"!=typeof _&&"function"!=typeof _&&("sequence"===a?h=_._startTime+_.totalDuration()/_._timeScale:"start"===a&&(_._startTime-=_.delay())),h+=o;return this._uncache(!0)}if("string"==typeof s)return this.addLabel(s,n);if("function"!=typeof s)throw"Cannot add "+s+" into the timeline; it is not a tween, timeline, function, or string.";s=i.delayedCall(0,s)}if(e.prototype.add.call(this,s,n),s._time&&s.render((this.rawTime()-s._startTime)*s._timeScale,!1,!1),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(p=(c=this).rawTime()>s._startTime;c._timeline;)p&&c._timeline.smoothChildTiming?c.totalTime(c._totalTime,!0):c._gc&&c._enabled(!0,!1),c=c._timeline;return this},m.remove=function(e){if(e instanceof t){this._remove(e,!1);var i=e._timeline=e.vars.useFrames?t._rootFramesTimeline:t._rootTimeline;return e._startTime=(e._paused?e._pauseTime:i._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this}if(e instanceof Array||e&&e.push&&l(e)){for(var r=e.length;--r>-1;)this.remove(e[r]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},m._remove=function(t,i){return e.prototype._remove.call(this,t,i),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},m.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},m.insert=m.insertMultiple=function(t,e,i,r){return this.add(t,e||0,i,r)},m.appendMultiple=function(t,e,i,r){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,r)},m.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},m.addPause=function(t,e,r,s){var n=i.delayedCall(0,p,r,s||this);return n.vars.onComplete=n.vars.onReverseComplete=e,n.data="isPause",this._hasPause=!0,this.add(n,t)},m.removeLabel=function(t){return delete this._labels[t],this},m.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},m._parseTimeOrLabel=function(e,i,r,s){var n,a;if(s instanceof t&&s.timeline===this)this.remove(s);else if(s&&(s instanceof Array||s.push&&l(s)))for(a=s.length;--a>-1;)s[a]instanceof t&&s[a].timeline===this&&this.remove(s[a]);if(n="number"!=typeof e||i?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof i)return this._parseTimeOrLabel(i,r&&"number"==typeof e&&null==this._labels[i]?e-n:0,r);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=n);else{if(-1===(a=e.indexOf("=")))return null==this._labels[e]?r?this._labels[e]=n+i:i:this._labels[e]+i;i=parseInt(e.charAt(a-1)+"1",10)*Number(e.substr(a+1)),e=a>1?this._parseTimeOrLabel(e.substr(0,a-1),0,r):n}return Number(e)+i},m.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),!1!==e)},m.stop=function(){return this.paused(!0)},m.gotoAndPlay=function(t,e){return this.play(t,e)},m.gotoAndStop=function(t,e){return this.pause(t,e)},m.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var r,s,n,a,o,l,f,_=this._time,c=this._dirty?this.totalDuration():this._totalDuration,p=this._startTime,d=this._timeScale,m=this._paused;if(_!==this._time&&(t+=this._time-_),t>=c-1e-7&&t>=0)this._totalTime=this._time=c,this._reversed||this._hasPausedChild()||(s=!0,a="onComplete",o=!!this._timeline.autoRemoveChildren,0===this._duration&&(t<=0&&t>=-1e-7||this._rawPrevTime<0||1e-10===this._rawPrevTime)&&this._rawPrevTime!==t&&this._first&&(o=!0,this._rawPrevTime>1e-10&&(a="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:1e-10,t=c+1e-4;else if(t<1e-7)if(this._totalTime=this._time=0,(0!==_||0===this._duration&&1e-10!==this._rawPrevTime&&(this._rawPrevTime>0||t<0&&this._rawPrevTime>=0))&&(a="onReverseComplete",s=this._reversed),t<0)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(o=s=!0,a="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(o=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:1e-10,0===t&&s)for(r=this._first;r&&0===r._startTime;)r._duration||(s=!1),r=r._next;t=0,this._initted||(o=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!e){if(t>=_)for(r=this._first;r&&r._startTime<=t&&!l;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(l=r),r=r._next;else for(r=this._last;r&&r._startTime>=t&&!l;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(l=r),r=r._prev;l&&(this._time=t=l._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=t}if(this._time!==_&&this._first||i||o||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==_&&t>0&&(this._active=!0),0===_&&this.vars.onStart&&(0===this._time&&this._duration||e||this._callback("onStart")),(f=this._time)>=_)for(r=this._first;r&&(n=r._next,f===this._time&&(!this._paused||m));)(r._active||r._startTime<=f&&!r._paused&&!r._gc)&&(l===r&&this.pause(),r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=n;else for(r=this._last;r&&(n=r._prev,f===this._time&&(!this._paused||m));){if(r._active||r._startTime<=_&&!r._paused&&!r._gc){if(l===r){for(l=r._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(t-l._startTime)*l._timeScale:(t-l._startTime)*l._timeScale,e,i),l=l._prev;l=null,this.pause()}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)}r=n}this._onUpdate&&(e||(h.length&&u(),this._callback("onUpdate"))),a&&(this._gc||p!==this._startTime&&d===this._timeScale||(0===this._time||c>=this.totalDuration())&&(s&&(h.length&&u(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[a]&&this._callback(a)))}},m._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof r&&t._hasPausedChild())return!0;t=t._next}return!1},m.getChildren=function(t,e,r,s){s=s||-9999999999;for(var n=[],a=this._first,o=0;a;)a._startTime<s||(a instanceof i?!1!==e&&(n[o++]=a):(!1!==r&&(n[o++]=a),!1!==t&&(o=(n=n.concat(a.getChildren(!0,e,r))).length))),a=a._next;return n},m.getTweensOf=function(t,e){var r,s,n=this._gc,a=[],o=0;for(n&&this._enabled(!0,!0),s=(r=i.getTweensOf(t)).length;--s>-1;)(r[s].timeline===this||e&&this._contains(r[s]))&&(a[o++]=r[s]);return n&&this._enabled(!1,!0),a},m.recent=function(){return this._recent},m._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},m.shiftChildren=function(t,e,i){i=i||0;for(var r,s=this._first,n=this._labels;s;)s._startTime>=i&&(s._startTime+=t),s=s._next;if(e)for(r in n)n[r]>=i&&(n[r]+=t);return this._uncache(!0)},m._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),r=i.length,s=!1;--r>-1;)i[r]._kill(t,e)&&(s=!0);return s},m.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return!1!==t&&(this._labels={}),this._uncache(!0)},m.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return t.prototype.invalidate.call(this)},m._enabled=function(t,i){if(t===this._gc)for(var r=this._first;r;)r._enabled(t,!0),r=r._next;return e.prototype._enabled.call(this,t,i)},m.totalTime=function(e,i,r){this._forcingPlayhead=!0;var s=t.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,s},m.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},m.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,r=0,s=this._last,n=999999999999;s;)e=s._prev,s._dirty&&s.totalDuration(),s._startTime>n&&this._sortChildren&&!s._paused&&!this._calculatingDuration?(this._calculatingDuration=1,this.add(s,s._startTime-s._delay),this._calculatingDuration=0):n=s._startTime,s._startTime<0&&!s._paused&&(r-=s._startTime,this._timeline.smoothChildTiming&&(this._startTime+=s._startTime/this._timeScale,this._time-=s._startTime,this._totalTime-=s._startTime,this._rawPrevTime-=s._startTime),this.shiftChildren(-s._startTime,!1,-9999999999),n=0),(i=s._startTime+s._totalDuration/s._timeScale)>r&&(r=i),s=e;this._duration=this._totalDuration=r,this._dirty=!1}return this._totalDuration}return t&&this.totalDuration()?this.timeScale(this._totalDuration/t):this},m.paused=function(e){if(!e)for(var i=this._first,r=this._time;i;)i._startTime===r&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return t.prototype.paused.apply(this,arguments)},m.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},m.rawTime=function(t){return t&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(t)-this._startTime)*this._timeScale},r},!0),s._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,e,i){var r=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=!0===this.vars.yoyo,this._dirty=!0},n=e._internals,a=n.lazyTweens,o=n.lazyRender,l=s._gsDefine.globals,h=new i(null,null,1,0),u=r.prototype=new t;return u.constructor=r,u.kill()._gc=!1,r.version="1.20.4",u.invalidate=function(){return this._yoyo=!0===this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},u.addCallback=function(t,i,r,s){return this.add(e.delayedCall(0,t,r,s),i)},u.removeCallback=function(t,e){if(t)if(null==e)this._kill(null,t);else for(var i=this.getTweensOf(t,!1),r=i.length,s=this._parseTimeOrLabel(e);--r>-1;)i[r]._startTime===s&&i[r]._enabled(!1,!1);return this},u.removePause=function(e){return this.removeCallback(t._internals.pauseCallback,e)},u.tweenTo=function(t,i){i=i||{};var r,s,n,a={ease:h,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},o=i.repeat&&l.TweenMax||e;for(s in i)a[s]=i[s];return a.time=this._parseTimeOrLabel(t),r=Math.abs(Number(a.time)-this._time)/this._timeScale||.001,n=new o(this,r,a),a.onStart=function(){n.target.paused(!0),n.vars.time===n.target.time()||r!==n.duration()||n.isFromTo||n.duration(Math.abs(n.vars.time-n.target.time())/n.target._timeScale).render(n.time(),!0,!0),i.onStart&&i.onStart.apply(i.onStartScope||i.callbackScope||n,i.onStartParams||[])},n},u.tweenFromTo=function(t,e,i){i=i||{},t=this._parseTimeOrLabel(t),i.startAt={onComplete:this.seek,onCompleteParams:[t],callbackScope:this},i.immediateRender=!1!==i.immediateRender;var r=this.tweenTo(e,i);return r.isFromTo=1,r.duration(Math.abs(r.vars.time-t)/this._timeScale||.001)},u.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var r,s,n,l,h,u,f,_,c=this._time,p=this._dirty?this.totalDuration():this._totalDuration,d=this._duration,m=this._totalTime,g=this._startTime,v=this._timeScale,y=this._rawPrevTime,T=this._paused,x=this._cycle;if(c!==this._time&&(t+=this._time-c),t>=p-1e-7&&t>=0)this._locked||(this._totalTime=p,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(s=!0,l="onComplete",h=!!this._timeline.autoRemoveChildren,0===this._duration&&(t<=0&&t>=-1e-7||y<0||1e-10===y)&&y!==t&&this._first&&(h=!0,y>1e-10&&(l="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:1e-10,this._yoyo&&0!=(1&this._cycle)?this._time=t=0:(this._time=d,t=d+1e-4);else if(t<1e-7)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==c||0===d&&1e-10!==y&&(y>0||t<0&&y>=0)&&!this._locked)&&(l="onReverseComplete",s=this._reversed),t<0)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(h=s=!0,l="onReverseComplete"):y>=0&&this._first&&(h=!0),this._rawPrevTime=t;else{if(this._rawPrevTime=d||!e||t||this._rawPrevTime===t?t:1e-10,0===t&&s)for(r=this._first;r&&0===r._startTime;)r._duration||(s=!1),r=r._next;t=0,this._initted||(h=!0)}else if(0===d&&y<0&&(h=!0),this._time=this._rawPrevTime=t,this._locked||(this._totalTime=t,0!==this._repeat&&(u=d+this._repeatDelay,this._cycle=this._totalTime/u>>0,0!==this._cycle&&this._cycle===this._totalTime/u&&m<=t&&this._cycle--,this._time=this._totalTime-this._cycle*u,this._yoyo&&0!=(1&this._cycle)&&(this._time=d-this._time),this._time>d?(this._time=d,t=d+1e-4):this._time<0?this._time=t=0:t=this._time)),this._hasPause&&!this._forcingPlayhead&&!e){if((t=this._time)>=c||this._repeat&&x!==this._cycle)for(r=this._first;r&&r._startTime<=t&&!f;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(f=r),r=r._next;else for(r=this._last;r&&r._startTime>=t&&!f;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(f=r),r=r._prev;f&&f._startTime<d&&(this._time=t=f._startTime,this._totalTime=t+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==x&&!this._locked){var w=this._yoyo&&0!=(1&x),b=w===(this._yoyo&&0!=(1&this._cycle)),P=this._totalTime,O=this._cycle,k=this._rawPrevTime,S=this._time;if(this._totalTime=x*d,this._cycle<x?w=!w:this._totalTime+=d,this._time=c,this._rawPrevTime=0===d?y-1e-4:y,this._cycle=x,this._locked=!0,c=w?0:d,this.render(c,e,0===d),e||this._gc||this.vars.onRepeat&&(this._cycle=O,this._locked=!1,this._callback("onRepeat")),c!==this._time)return;if(b&&(this._cycle=x,this._locked=!0,c=w?d+1e-4:-1e-4,this.render(c,!0,!1)),this._locked=!1,this._paused&&!T)return;this._time=S,this._totalTime=P,this._cycle=O,this._rawPrevTime=k}if(this._time!==c&&this._first||i||h||f){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==m&&t>0&&(this._active=!0),0===m&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||e||this._callback("onStart")),(_=this._time)>=c)for(r=this._first;r&&(n=r._next,_===this._time&&(!this._paused||T));)(r._active||r._startTime<=this._time&&!r._paused&&!r._gc)&&(f===r&&this.pause(),r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=n;else for(r=this._last;r&&(n=r._prev,_===this._time&&(!this._paused||T));){if(r._active||r._startTime<=c&&!r._paused&&!r._gc){if(f===r){for(f=r._prev;f&&f.endTime()>this._time;)f.render(f._reversed?f.totalDuration()-(t-f._startTime)*f._timeScale:(t-f._startTime)*f._timeScale,e,i),f=f._prev;f=null,this.pause()}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)}r=n}this._onUpdate&&(e||(a.length&&o(),this._callback("onUpdate"))),l&&(this._locked||this._gc||g!==this._startTime&&v===this._timeScale||(0===this._time||p>=this.totalDuration())&&(s&&(a.length&&o(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[l]&&this._callback(l)))}else m!==this._totalTime&&this._onUpdate&&(e||this._callback("onUpdate"))},u.getActive=function(t,e,i){null==t&&(t=!0),null==e&&(e=!0),null==i&&(i=!1);var r,s,n=[],a=this.getChildren(t,e,i),o=0,l=a.length;for(r=0;r<l;r++)(s=a[r]).isActive()&&(n[o++]=s);return n},u.getLabelAfter=function(t){t||0!==t&&(t=this._time);var e,i=this.getLabelsArray(),r=i.length;for(e=0;e<r;e++)if(i[e].time>t)return i[e].name;return null},u.getLabelBefore=function(t){null==t&&(t=this._time);for(var e=this.getLabelsArray(),i=e.length;--i>-1;)if(e[i].time<t)return e[i].name;return null},u.getLabelsArray=function(){var t,e=[],i=0;for(t in this._labels)e[i++]={time:this._labels[t],name:t};return e.sort(function(t,e){return t.time-e.time}),e},u.invalidate=function(){return this._locked=!1,t.prototype.invalidate.call(this)},u.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),e):this._time/this.duration()||0},u.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this._totalTime/this.totalDuration()||0},u.totalDuration=function(e){return arguments.length?-1!==this._repeat&&e?this.timeScale(this.totalDuration()/e):this:(this._dirty&&(t.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},u.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!=(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},u.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},u.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},u.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},u.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.getLabelBefore(this._time+1e-8)},r},!0),t=180/Math.PI,e=[],i=[],r=[],n={},a=s._gsDefine.globals,o=function(t,e,i,r){i===r&&(i=r-(r-e)/1e6),t===e&&(e=t+(i-t)/1e6),this.a=t,this.b=e,this.c=i,this.d=r,this.da=r-t,this.ca=i-t,this.ba=e-t},l=function(t,e,i,r){var s={a:t},n={},a={},o={c:r},l=(t+e)/2,h=(e+i)/2,u=(i+r)/2,f=(l+h)/2,_=(h+u)/2,c=(_-f)/8;return s.b=l+(t-l)/4,n.b=f+c,s.c=n.a=(s.b+n.b)/2,n.c=a.a=(f+_)/2,a.b=_-c,o.b=u+(r-u)/4,a.c=o.a=(a.b+o.b)/2,[s,n,a,o]},h=function(t,s,n,a,o){var h,u,f,_,c,p,d,m,g,v,y,T,x,w=t.length-1,b=0,P=t[0].a;for(h=0;h<w;h++)u=(c=t[b]).a,f=c.d,_=t[b+1].d,o?(y=e[h],x=((T=i[h])+y)*s*.25/(a?.5:r[h]||.5),m=f-((p=f-(f-u)*(a?.5*s:0!==y?x/y:0))+(((d=f+(_-f)*(a?.5*s:0!==T?x/T:0))-p)*(3*y/(y+T)+.5)/4||0))):m=f-((p=f-(f-u)*s*.5)+(d=f+(_-f)*s*.5))/2,p+=m,d+=m,c.c=g=p,c.b=0!==h?P:P=c.a+.6*(c.c-c.a),c.da=f-u,c.ca=g-u,c.ba=P-u,n?(v=l(u,P,g,f),t.splice(b,1,v[0],v[1],v[2],v[3]),b+=4):b++,P=d;(c=t[b]).b=P,c.c=P+.4*(c.d-P),c.da=c.d-c.a,c.ca=c.c-c.a,c.ba=P-c.a,n&&(v=l(c.a,P,c.c,c.d),t.splice(b,1,v[0],v[1],v[2],v[3]))},u=function(t,r,s,n){var a,l,h,u,f,_,c=[];if(n)for(l=(t=[n].concat(t)).length;--l>-1;)"string"==typeof(_=t[l][r])&&"="===_.charAt(1)&&(t[l][r]=n[r]+Number(_.charAt(0)+_.substr(2)));if((a=t.length-2)<0)return c[0]=new o(t[0][r],0,0,t[0][r]),c;for(l=0;l<a;l++)h=t[l][r],u=t[l+1][r],c[l]=new o(h,0,0,u),s&&(f=t[l+2][r],e[l]=(e[l]||0)+(u-h)*(u-h),i[l]=(i[l]||0)+(f-u)*(f-u));return c[l]=new o(t[l][r],0,0,t[l+1][r]),c},f=function(t,s,a,o,l,f){var _,c,p,d,m,g,v,y,T={},x=[],w=f||t[0];for(c in l="string"==typeof l?","+l+",":",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",null==s&&(s=1),t[0])x.push(c);if(t.length>1){for(y=t[t.length-1],v=!0,_=x.length;--_>-1;)if(c=x[_],Math.abs(w[c]-y[c])>.05){v=!1;break}v&&(t=t.concat(),f&&t.unshift(f),t.push(t[1]),f=t[t.length-3])}for(e.length=i.length=r.length=0,_=x.length;--_>-1;)c=x[_],n[c]=-1!==l.indexOf(","+c+","),T[c]=u(t,c,n[c],f);for(_=e.length;--_>-1;)e[_]=Math.sqrt(e[_]),i[_]=Math.sqrt(i[_]);if(!o){for(_=x.length;--_>-1;)if(n[c])for(g=(p=T[x[_]]).length-1,d=0;d<g;d++)m=p[d+1].da/i[d]+p[d].da/e[d]||0,r[d]=(r[d]||0)+m*m;for(_=r.length;--_>-1;)r[_]=Math.sqrt(r[_])}for(_=x.length,d=a?4:1;--_>-1;)p=T[c=x[_]],h(p,s,a,o,n[c]),v&&(p.splice(0,d),p.splice(p.length-d,d));return T},_=function(t,e,i){for(var r,s,n,a,o,l,h,u,f,_,c,p=1/i,d=t.length;--d>-1;)for(n=(_=t[d]).a,a=_.d-n,o=_.c-n,l=_.b-n,r=s=0,u=1;u<=i;u++)r=s-(s=((h=p*u)*h*a+3*(f=1-h)*(h*o+f*l))*h),e[c=d*i+u-1]=(e[c]||0)+r*r},c=s._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.8",API:2,global:!0,init:function(t,e,i){this._target=t,e instanceof Array&&(e={values:e}),this._func={},this._mod={},this._props=[],this._timeRes=null==e.timeResolution?6:parseInt(e.timeResolution,10);var r,s,n,a,l,h=e.values||[],u={},c=h[0],p=e.autoRotate||i.vars.orientToBezier;for(r in this._autoRotate=p?p instanceof Array?p:[["x","y","rotation",!0===p?0:Number(p)||0]]:null,c)this._props.push(r);for(n=this._props.length;--n>-1;)r=this._props[n],this._overwriteProps.push(r),s=this._func[r]="function"==typeof t[r],u[r]=s?t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)]():parseFloat(t[r]),l||u[r]!==h[0][r]&&(l=u);if(this._beziers="cubic"!==e.type&&"quadratic"!==e.type&&"soft"!==e.type?f(h,isNaN(e.curviness)?1:e.curviness,!1,"thruBasic"===e.type,e.correlate,l):function(t,e,i){var r,s,n,a,l,h,u,f,_,c,p,d={},m="cubic"===(e=e||"soft")?3:2,g="soft"===e,v=[];if(g&&i&&(t=[i].concat(t)),null==t||t.length<m+1)throw"invalid Bezier data";for(_ in t[0])v.push(_);for(h=v.length;--h>-1;){for(d[_=v[h]]=l=[],c=0,f=t.length,u=0;u<f;u++)r=null==i?t[u][_]:"string"==typeof(p=t[u][_])&&"="===p.charAt(1)?i[_]+Number(p.charAt(0)+p.substr(2)):Number(p),g&&u>1&&u<f-1&&(l[c++]=(r+l[c-2])/2),l[c++]=r;for(f=c-m+1,c=0,u=0;u<f;u+=m)r=l[u],s=l[u+1],n=l[u+2],a=2===m?0:l[u+3],l[c++]=p=3===m?new o(r,s,n,a):new o(r,(2*s+r)/3,(2*s+n)/3,n);l.length=c}return d}(h,e.type,u),this._segCount=this._beziers[r].length,this._timeRes){var d=function(t,e){var i,r,s,n,a=[],o=[],l=0,h=0,u=(e=e>>0||6)-1,f=[],c=[];for(i in t)_(t[i],a,e);for(s=a.length,r=0;r<s;r++)l+=Math.sqrt(a[r]),c[n=r%e]=l,n===u&&(h+=l,f[n=r/e>>0]=c,o[n]=h,l=0,c=[]);return{length:h,lengths:o,segments:f}}(this._beziers,this._timeRes);this._length=d.length,this._lengths=d.lengths,this._segments=d.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(p=this._autoRotate)for(this._initialRotations=[],p[0]instanceof Array||(this._autoRotate=p=[p]),n=p.length;--n>-1;){for(a=0;a<3;a++)r=p[n][a],this._func[r]="function"==typeof t[r]&&t[r.indexOf("set")||"function"!=typeof t["get"+r.substr(3)]?r:"get"+r.substr(3)];r=p[n][2],this._initialRotations[n]=(this._func[r]?this._func[r].call(this._target):this._target[r])||0,this._overwriteProps.push(r)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var i,r,s,n,a,o,l,h,u,f,_=this._segCount,c=this._func,p=this._target,d=e!==this._startRatio;if(this._timeRes){if(u=this._lengths,f=this._curSeg,e*=this._length,s=this._li,e>this._l2&&s<_-1){for(h=_-1;s<h&&(this._l2=u[++s])<=e;);this._l1=u[s-1],this._li=s,this._curSeg=f=this._segments[s],this._s2=f[this._s1=this._si=0]}else if(e<this._l1&&s>0){for(;s>0&&(this._l1=u[--s])>=e;);0===s&&e<this._l1?this._l1=0:s++,this._l2=u[s],this._li=s,this._curSeg=f=this._segments[s],this._s1=f[(this._si=f.length-1)-1]||0,this._s2=f[this._si]}if(i=s,e-=this._l1,s=this._si,e>this._s2&&s<f.length-1){for(h=f.length-1;s<h&&(this._s2=f[++s])<=e;);this._s1=f[s-1],this._si=s}else if(e<this._s1&&s>0){for(;s>0&&(this._s1=f[--s])>=e;);0===s&&e<this._s1?this._s1=0:s++,this._s2=f[s],this._si=s}o=(s+(e-this._s1)/(this._s2-this._s1))*this._prec||0}else o=(e-(i=e<0?0:e>=1?_-1:_*e>>0)*(1/_))*_;for(r=1-o,s=this._props.length;--s>-1;)n=this._props[s],l=(o*o*(a=this._beziers[n][i]).da+3*r*(o*a.ca+r*a.ba))*o+a.a,this._mod[n]&&(l=this._mod[n](l,p)),c[n]?p[n](l):p[n]=l;if(this._autoRotate){var m,g,v,y,T,x,w,b=this._autoRotate;for(s=b.length;--s>-1;)n=b[s][2],x=b[s][3]||0,w=!0===b[s][4]?1:t,a=this._beziers[b[s][0]],m=this._beziers[b[s][1]],a&&m&&(a=a[i],m=m[i],g=a.a+(a.b-a.a)*o,g+=((y=a.b+(a.c-a.b)*o)-g)*o,y+=(a.c+(a.d-a.c)*o-y)*o,v=m.a+(m.b-m.a)*o,v+=((T=m.b+(m.c-m.b)*o)-v)*o,T+=(m.c+(m.d-m.c)*o-T)*o,l=d?Math.atan2(T-v,y-g)*w+x:this._initialRotations[s],this._mod[n]&&(l=this._mod[n](l,p)),c[n]?p[n](l):p[n]=l)}}}),p=c.prototype,c.bezierThrough=f,c.cubicToQuadratic=l,c._autoCSS=!0,c.quadraticToCubic=function(t,e,i){return new o(t,(2*e+t)/3,(2*e+i)/3,i)},c._cssRegister=function(){var t=a.CSSPlugin;if(t){var e=t._internals,i=e._parseToProxy,r=e._setPluginRatio,s=e.CSSPropTween;e._registerComplexSpecialProp("bezier",{parser:function(t,e,n,a,o,l){e instanceof Array&&(e={values:e}),l=new c;var h,u,f,_=e.values,p=_.length-1,d=[],m={};if(p<0)return o;for(h=0;h<=p;h++)f=i(t,_[h],a,o,l,p!==h),d[h]=f.end;for(u in e)m[u]=e[u];return m.values=d,(o=new s(t,"bezier",0,0,f.pt,2)).data=f,o.plugin=l,o.setRatio=r,0===m.autoRotate&&(m.autoRotate=!0),!m.autoRotate||m.autoRotate instanceof Array||(h=!0===m.autoRotate?0:Number(m.autoRotate),m.autoRotate=null!=f.end.left?[["left","top","rotation",h,!1]]:null!=f.end.x&&[["x","y","rotation",h,!1]]),m.autoRotate&&(a._transform||a._enableTransforms(!1),f.autoRotate=a._target._gsTransform,f.proxy.rotation=f.autoRotate.rotation||0,a._overwriteProps.push("rotation")),l._onInitTween(f.proxy,m,a._tween),o}})}},p._mod=function(t){for(var e,i=this._overwriteProps,r=i.length;--r>-1;)(e=t[i[r]])&&"function"==typeof e&&(this._mod[i[r]]=e)},p._kill=function(t){var e,i,r=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=r.length;--i>-1;)r[i]===e&&r.splice(i,1);if(r=this._autoRotate)for(i=r.length;--i>-1;)t[r[i][2]]&&r.splice(i,1);return this._super._kill.call(this,t)},s._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(t,e){var i,r,n,a,o=function(){t.call(this,"css"),this._overwriteProps.length=0,this.setRatio=o.prototype.setRatio},l=s._gsDefine.globals,h={},u=o.prototype=new t("css");u.constructor=o,o.version="1.20.4",o.API=2,o.defaultTransformPerspective=0,o.defaultSkewType="compensated",o.defaultSmoothOrigin=!0,u="px",o.suffixMap={top:u,right:u,bottom:u,left:u,width:u,height:u,fontSize:u,padding:u,margin:u,perspective:u,lineHeight:""};var f,_,c,p,d,m,g,v,y=/(?:\-|\.|\b)(\d|\.|e\-)+/g,T=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,x=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,w=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,b=/(?:\d|\-|\+|=|#|\.)*/g,P=/opacity *= *([^)]*)/i,O=/opacity:([^;]*)/i,k=/alpha\(opacity *=.+?\)/i,S=/^(rgb|hsl)/,R=/([A-Z])/g,A=/-([a-z])/gi,C=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,M=function(t,e){return e.toUpperCase()},D=/(?:Left|Right|Width)/i,E=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,F=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,z=/,(?=[^\)]*(?:\(|$))/gi,I=/[\s,\(]/i,L=Math.PI/180,j=180/Math.PI,N={},X={style:{}},B=s.document||{createElement:function(){return X}},Y=function(t,e){return B.createElementNS?B.createElementNS(e||"http://www.w3.org/1999/xhtml",t):B.createElement(t)},V=Y("div"),U=Y("img"),q=o._internals={_specialProps:h},G=(s.navigator||{}).userAgent||"",W=function(){var t=G.indexOf("Android"),e=Y("a");return c=-1!==G.indexOf("Safari")&&-1===G.indexOf("Chrome")&&(-1===t||parseFloat(G.substr(t+8,2))>3),d=c&&parseFloat(G.substr(G.indexOf("Version/")+8,2))<6,p=-1!==G.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(G)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(G))&&(m=parseFloat(RegExp.$1)),!!e&&(e.style.cssText="top:1px;opacity:.55;",/^0.55/.test(e.style.opacity))}(),Z=function(t){return P.test("string"==typeof t?t:(t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?parseFloat(RegExp.$1)/100:1},H=function(t){s.console&&console.log(t)},$="",Q="",K=function(t,e){var i,r,s=(e=e||V).style;if(void 0!==s[t])return t;for(t=t.charAt(0).toUpperCase()+t.substr(1),i=["O","Moz","ms","Ms","Webkit"],r=5;--r>-1&&void 0===s[i[r]+t];);return r>=0?($="-"+(Q=3===r?"ms":i[r]).toLowerCase()+"-",Q+t):null},J=B.defaultView?B.defaultView.getComputedStyle:function(){},tt=o.getStyle=function(t,e,i,r,s){var n;return W||"opacity"!==e?(!r&&t.style[e]?n=t.style[e]:(i=i||J(t))?n=i[e]||i.getPropertyValue(e)||i.getPropertyValue(e.replace(R,"-$1").toLowerCase()):t.currentStyle&&(n=t.currentStyle[e]),null==s||n&&"none"!==n&&"auto"!==n&&"auto auto"!==n?n:s):Z(t)},et=q.convertToPixels=function(t,i,r,s,n){if("px"===s||!s&&"lineHeight"!==i)return r;if("auto"===s||!r)return 0;var a,l,h,u=D.test(i),f=t,_=V.style,c=r<0,p=1===r;if(c&&(r=-r),p&&(r*=100),"lineHeight"!==i||s)if("%"===s&&-1!==i.indexOf("border"))a=r/100*(u?t.clientWidth:t.clientHeight);else{if(_.cssText="border:0 solid red;position:"+tt(t,"position")+";line-height:0;","%"!==s&&f.appendChild&&"v"!==s.charAt(0)&&"rem"!==s)_[u?"borderLeftWidth":"borderTopWidth"]=r+s;else{if(f=t.parentNode||B.body,-1!==tt(f,"display").indexOf("flex")&&(_.position="absolute"),l=f._gsCache,h=e.ticker.frame,l&&u&&l.time===h)return l.width*r/100;_[u?"width":"height"]=r+s}f.appendChild(V),a=parseFloat(V[u?"offsetWidth":"offsetHeight"]),f.removeChild(V),u&&"%"===s&&!1!==o.cacheWidths&&((l=f._gsCache=f._gsCache||{}).time=h,l.width=a/r*100),0!==a||n||(a=et(t,i,r,s,!0))}else l=J(t).lineHeight,t.style.lineHeight=r,a=parseFloat(J(t).lineHeight),t.style.lineHeight=l;return p&&(a/=100),c?-a:a},it=q.calculateOffset=function(t,e,i){if("absolute"!==tt(t,"position",i))return 0;var r="left"===e?"Left":"Top",s=tt(t,"margin"+r,i);return t["offset"+r]-(et(t,e,parseFloat(s),s.replace(b,""))||0)},rt=function(t,e){var i,r,s,n={};if(e=e||J(t,null))if(i=e.length)for(;--i>-1;)-1!==(s=e[i]).indexOf("-transform")&&Ft!==s||(n[s.replace(A,M)]=e.getPropertyValue(s));else for(i in e)-1!==i.indexOf("Transform")&&Et!==i||(n[i]=e[i]);else if(e=t.currentStyle||t.style)for(i in e)"string"==typeof i&&void 0===n[i]&&(n[i.replace(A,M)]=e[i]);return W||(n.opacity=Z(t)),r=Wt(t,e,!1),n.rotation=r.rotation,n.skewX=r.skewX,n.scaleX=r.scaleX,n.scaleY=r.scaleY,n.x=r.x,n.y=r.y,It&&(n.z=r.z,n.rotationX=r.rotationX,n.rotationY=r.rotationY,n.scaleZ=r.scaleZ),n.filters&&delete n.filters,n},st=function(t,e,i,r,s){var n,a,o,l={},h=t.style;for(a in i)"cssText"!==a&&"length"!==a&&isNaN(a)&&(e[a]!==(n=i[a])||s&&s[a])&&-1===a.indexOf("Origin")&&("number"!=typeof n&&"string"!=typeof n||(l[a]="auto"!==n||"left"!==a&&"top"!==a?""!==n&&"auto"!==n&&"none"!==n||"string"!=typeof e[a]||""===e[a].replace(w,"")?n:0:it(t,a),void 0!==h[a]&&(o=new yt(h,a,h[a],o))));if(r)for(a in r)"className"!==a&&(l[a]=r[a]);return{difs:l,firstMPT:o}},nt={width:["Left","Right"],height:["Top","Bottom"]},at=["marginLeft","marginRight","marginTop","marginBottom"],ot=function(t,e,i){if("svg"===(t.nodeName+"").toLowerCase())return(i||J(t))[e]||0;if(t.getCTM&&Ut(t))return t.getBBox()[e]||0;var r=parseFloat("width"===e?t.offsetWidth:t.offsetHeight),s=nt[e],n=s.length;for(i=i||J(t,null);--n>-1;)r-=parseFloat(tt(t,"padding"+s[n],i,!0))||0,r-=parseFloat(tt(t,"border"+s[n]+"Width",i,!0))||0;return r},lt=function(t,e){if("contain"===t||"auto"===t||"auto auto"===t)return t+" ";null!=t&&""!==t||(t="0 0");var i,r=t.split(" "),s=-1!==t.indexOf("left")?"0%":-1!==t.indexOf("right")?"100%":r[0],n=-1!==t.indexOf("top")?"0%":-1!==t.indexOf("bottom")?"100%":r[1];if(r.length>3&&!e){for(r=t.split(", ").join(",").split(","),t=[],i=0;i<r.length;i++)t.push(lt(r[i]));return t.join(",")}return null==n?n="center"===s?"50%":"0":"center"===n&&(n="50%"),("center"===s||isNaN(parseFloat(s))&&-1===(s+"").indexOf("="))&&(s="50%"),t=s+" "+n+(r.length>2?" "+r[2]:""),e&&(e.oxp=-1!==s.indexOf("%"),e.oyp=-1!==n.indexOf("%"),e.oxr="="===s.charAt(1),e.oyr="="===n.charAt(1),e.ox=parseFloat(s.replace(w,"")),e.oy=parseFloat(n.replace(w,"")),e.v=t),e||t},ht=function(t,e){return"function"==typeof t&&(t=t(v,g)),"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2)):parseFloat(t)-parseFloat(e)||0},ut=function(t,e){return"function"==typeof t&&(t=t(v,g)),null==t?e:"string"==typeof t&&"="===t.charAt(1)?parseInt(t.charAt(0)+"1",10)*parseFloat(t.substr(2))+e:parseFloat(t)||0},ft=function(t,e,i,r){var s,n,a,o;return"function"==typeof t&&(t=t(v,g)),null==t?a=e:"number"==typeof t?a=t:(360,s=t.split("_"),n=((o="="===t.charAt(1))?parseInt(t.charAt(0)+"1",10)*parseFloat(s[0].substr(2)):parseFloat(s[0]))*(-1===t.indexOf("rad")?1:j)-(o?0:e),s.length&&(r&&(r[i]=e+n),-1!==t.indexOf("short")&&(n%=360)!==n%180&&(n=n<0?n+360:n-360),-1!==t.indexOf("_cw")&&n<0?n=(n+3599999999640)%360-360*(n/360|0):-1!==t.indexOf("ccw")&&n>0&&(n=(n-3599999999640)%360-360*(n/360|0))),a=e+n),a<1e-6&&a>-1e-6&&(a=0),a},_t={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ct=function(t,e,i){return 255*(6*(t=t<0?t+1:t>1?t-1:t)<1?e+(i-e)*t*6:t<.5?i:3*t<2?e+(i-e)*(2/3-t)*6:e)+.5|0},pt=o.parseColor=function(t,e){var i,r,s,n,a,o,l,h,u,f,_;if(t)if("number"==typeof t)i=[t>>16,t>>8&255,255&t];else{if(","===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1)),_t[t])i=_t[t];else if("#"===t.charAt(0))4===t.length&&(t="#"+(r=t.charAt(1))+r+(s=t.charAt(2))+s+(n=t.charAt(3))+n),i=[(t=parseInt(t.substr(1),16))>>16,t>>8&255,255&t];else if("hsl"===t.substr(0,3))if(i=_=t.match(y),e){if(-1!==t.indexOf("="))return t.match(T)}else a=Number(i[0])%360/360,o=Number(i[1])/100,r=2*(l=Number(i[2])/100)-(s=l<=.5?l*(o+1):l+o-l*o),i.length>3&&(i[3]=Number(i[3])),i[0]=ct(a+1/3,r,s),i[1]=ct(a,r,s),i[2]=ct(a-1/3,r,s);else i=t.match(y)||_t.transparent;i[0]=Number(i[0]),i[1]=Number(i[1]),i[2]=Number(i[2]),i.length>3&&(i[3]=Number(i[3]))}else i=_t.black;return e&&!_&&(r=i[0]/255,s=i[1]/255,n=i[2]/255,l=((h=Math.max(r,s,n))+(u=Math.min(r,s,n)))/2,h===u?a=o=0:(f=h-u,o=l>.5?f/(2-h-u):f/(h+u),a=h===r?(s-n)/f+(s<n?6:0):h===s?(n-r)/f+2:(r-s)/f+4,a*=60),i[0]=a+.5|0,i[1]=100*o+.5|0,i[2]=100*l+.5|0),i},dt=function(t,e){var i,r,s,n=t.match(mt)||[],a=0,o="";if(!n.length)return t;for(i=0;i<n.length;i++)r=n[i],a+=(s=t.substr(a,t.indexOf(r,a)-a)).length+r.length,3===(r=pt(r,e)).length&&r.push(1),o+=s+(e?"hsla("+r[0]+","+r[1]+"%,"+r[2]+"%,"+r[3]:"rgba("+r.join(","))+")";return o+t.substr(a)},mt="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(u in _t)mt+="|"+u+"\\b";mt=new RegExp(mt+")","gi"),o.colorStringFilter=function(t){var e,i=t[0]+" "+t[1];mt.test(i)&&(e=-1!==i.indexOf("hsl(")||-1!==i.indexOf("hsla("),t[0]=dt(t[0],e),t[1]=dt(t[1],e)),mt.lastIndex=0},e.defaultStringFilter||(e.defaultStringFilter=o.colorStringFilter);var gt=function(t,e,i,r){if(null==t)return function(t){return t};var s,n=e?(t.match(mt)||[""])[0]:"",a=t.split(n).join("").match(x)||[],o=t.substr(0,t.indexOf(a[0])),l=")"===t.charAt(t.length-1)?")":"",h=-1!==t.indexOf(" ")?" ":",",u=a.length,f=u>0?a[0].replace(y,""):"";return u?s=e?function(t){var e,_,c,p;if("number"==typeof t)t+=f;else if(r&&z.test(t)){for(p=t.replace(z,"|").split("|"),c=0;c<p.length;c++)p[c]=s(p[c]);return p.join(",")}if(e=(t.match(mt)||[n])[0],c=(_=t.split(e).join("").match(x)||[]).length,u>c--)for(;++c<u;)_[c]=i?_[(c-1)/2|0]:a[c];return o+_.join(h)+h+e+l+(-1!==t.indexOf("inset")?" inset":"")}:function(t){var e,n,_;if("number"==typeof t)t+=f;else if(r&&z.test(t)){for(n=t.replace(z,"|").split("|"),_=0;_<n.length;_++)n[_]=s(n[_]);return n.join(",")}if(_=(e=t.match(x)||[]).length,u>_--)for(;++_<u;)e[_]=i?e[(_-1)/2|0]:a[_];return o+e.join(h)+l}:function(t){return t}},vt=function(t){return t=t.split(","),function(e,i,r,s,n,a,o){var l,h=(i+"").split(" ");for(o={},l=0;l<4;l++)o[t[l]]=h[l]=h[l]||h[(l-1)/2>>0];return s.parse(e,o,n,a)}},yt=(q._setPluginRatio=function(t){this.plugin.setRatio(t);for(var e,i,r,s,n,a=this.data,o=a.proxy,l=a.firstMPT;l;)e=o[l.v],l.r?e=Math.round(e):e<1e-6&&e>-1e-6&&(e=0),l.t[l.p]=e,l=l._next;if(a.autoRotate&&(a.autoRotate.rotation=a.mod?a.mod(o.rotation,this.t):o.rotation),1===t||0===t)for(l=a.firstMPT,n=1===t?"e":"b";l;){if((i=l.t).type){if(1===i.type){for(s=i.xs0+i.s+i.xs1,r=1;r<i.l;r++)s+=i["xn"+r]+i["xs"+(r+1)];i[n]=s}}else i[n]=i.s+i.xs0;l=l._next}},function(t,e,i,r,s){this.t=t,this.p=e,this.v=i,this.r=s,r&&(r._prev=this,this._next=r)}),Tt=(q._parseToProxy=function(t,e,i,r,s,n){var a,o,l,h,u,f=r,_={},c={},p=i._transform,d=N;for(i._transform=null,N=e,r=u=i.parse(t,e,r,s),N=d,n&&(i._transform=p,f&&(f._prev=null,f._prev&&(f._prev._next=null)));r&&r!==f;){if(r.type<=1&&(c[o=r.p]=r.s+r.c,_[o]=r.s,n||(h=new yt(r,"s",o,h,r.r),r.c=0),1===r.type))for(a=r.l;--a>0;)l="xn"+a,c[o=r.p+"_"+l]=r.data[l],_[o]=r[l],n||(h=new yt(r,l,o,h,r.rxp[l]));r=r._next}return{proxy:_,end:c,firstMPT:h,pt:u}},q.CSSPropTween=function(t,e,r,s,n,o,l,h,u,f,_){this.t=t,this.p=e,this.s=r,this.c=s,this.n=l||e,t instanceof Tt||a.push(this.n),this.r=h,this.type=o||0,u&&(this.pr=u,i=!0),this.b=void 0===f?r:f,this.e=void 0===_?r+s:_,n&&(this._next=n,n._prev=this)}),xt=function(t,e,i,r,s,n){var a=new Tt(t,e,i,r-i,s,-1,n);return a.b=i,a.e=a.xs0=r,a},wt=o.parseComplex=function(t,e,i,r,s,n,a,l,h,u){i=i||n||"","function"==typeof r&&(r=r(v,g)),a=new Tt(t,e,0,0,a,u?2:1,null,!1,l,i,r),r+="",s&&mt.test(r+i)&&(r=[i,r],o.colorStringFilter(r),i=r[0],r=r[1]);var _,c,p,d,m,x,w,b,P,O,k,S,R,A=i.split(", ").join(",").split(" "),C=r.split(", ").join(",").split(" "),M=A.length,D=!1!==f;for(-1===r.indexOf(",")&&-1===i.indexOf(",")||(-1!==(r+i).indexOf("rgb")||-1!==(r+i).indexOf("hsl")?(A=A.join(" ").replace(z,", ").split(" "),C=C.join(" ").replace(z,", ").split(" ")):(A=A.join(" ").split(",").join(", ").split(" "),C=C.join(" ").split(",").join(", ").split(" ")),M=A.length),M!==C.length&&(M=(A=(n||"").split(" ")).length),a.plugin=h,a.setRatio=u,mt.lastIndex=0,_=0;_<M;_++)if(d=A[_],m=C[_],(b=parseFloat(d))||0===b)a.appendXtra("",b,ht(m,b),m.replace(T,""),D&&-1!==m.indexOf("px"),!0);else if(s&&mt.test(d))S=")"+((S=m.indexOf(")")+1)?m.substr(S):""),R=-1!==m.indexOf("hsl")&&W,O=m,d=pt(d,R),m=pt(m,R),(P=d.length+m.length>6)&&!W&&0===m[3]?(a["xs"+a.l]+=a.l?" transparent":"transparent",a.e=a.e.split(C[_]).join("transparent")):(W||(P=!1),R?a.appendXtra(O.substr(0,O.indexOf("hsl"))+(P?"hsla(":"hsl("),d[0],ht(m[0],d[0]),",",!1,!0).appendXtra("",d[1],ht(m[1],d[1]),"%,",!1).appendXtra("",d[2],ht(m[2],d[2]),P?"%,":"%"+S,!1):a.appendXtra(O.substr(0,O.indexOf("rgb"))+(P?"rgba(":"rgb("),d[0],m[0]-d[0],",",!0,!0).appendXtra("",d[1],m[1]-d[1],",",!0).appendXtra("",d[2],m[2]-d[2],P?",":S,!0),P&&(d=d.length<4?1:d[3],a.appendXtra("",d,(m.length<4?1:m[3])-d,S,!1))),mt.lastIndex=0;else if(x=d.match(y)){if(!(w=m.match(T))||w.length!==x.length)return a;for(p=0,c=0;c<x.length;c++)k=x[c],O=d.indexOf(k,p),a.appendXtra(d.substr(p,O-p),Number(k),ht(w[c],k),"",D&&"px"===d.substr(O+k.length,2),0===c),p=O+k.length;a["xs"+a.l]+=d.substr(p)}else a["xs"+a.l]+=a.l||a["xs"+a.l]?" "+m:m;if(-1!==r.indexOf("=")&&a.data){for(S=a.xs0+a.data.s,_=1;_<a.l;_++)S+=a["xs"+_]+a.data["xn"+_];a.e=S+a["xs"+_]}return a.l||(a.type=-1,a.xs0=a.e),a.xfirst||a},bt=9;for((u=Tt.prototype).l=u.pr=0;--bt>0;)u["xn"+bt]=0,u["xs"+bt]="";u.xs0="",u._next=u._prev=u.xfirst=u.data=u.plugin=u.setRatio=u.rxp=null,u.appendXtra=function(t,e,i,r,s,n){var a=this,o=a.l;return a["xs"+o]+=n&&(o||a["xs"+o])?" "+t:t||"",i||0===o||a.plugin?(a.l++,a.type=a.setRatio?2:1,a["xs"+a.l]=r||"",o>0?(a.data["xn"+o]=e+i,a.rxp["xn"+o]=s,a["xn"+o]=e,a.plugin||(a.xfirst=new Tt(a,"xn"+o,e,i,a.xfirst||a,0,a.n,s,a.pr),a.xfirst.xs0=0),a):(a.data={s:e+i},a.rxp={},a.s=e,a.c=i,a.r=s,a)):(a["xs"+o]+=e+(r||""),a)};var Pt=function(t,e){e=e||{},this.p=e.prefix&&K(t)||t,h[t]=h[this.p]=this,this.format=e.formatter||gt(e.defaultValue,e.color,e.collapsible,e.multi),e.parser&&(this.parse=e.parser),this.clrs=e.color,this.multi=e.multi,this.keyword=e.keyword,this.dflt=e.defaultValue,this.pr=e.priority||0},Ot=q._registerComplexSpecialProp=function(t,e,i){"object"!=typeof e&&(e={parser:i});var r,s=t.split(","),n=e.defaultValue;for(i=i||[n],r=0;r<s.length;r++)e.prefix=0===r&&e.prefix,e.defaultValue=i[r]||n,new Pt(s[r],e)},kt=q._registerPluginProp=function(t){if(!h[t]){var e=t.charAt(0).toUpperCase()+t.substr(1)+"Plugin";Ot(t,{parser:function(t,i,r,s,n,a,o){var u=l.com.greensock.plugins[e];return u?(u._cssRegister(),h[r].parse(t,i,r,s,n,a,o)):(H("Error: "+e+" js file not loaded."),n)}})}};(u=Pt.prototype).parseComplex=function(t,e,i,r,s,n){var a,o,l,h,u,f,_=this.keyword;if(this.multi&&(z.test(i)||z.test(e)?(o=e.replace(z,"|").split("|"),l=i.replace(z,"|").split("|")):_&&(o=[e],l=[i])),l){for(h=l.length>o.length?l.length:o.length,a=0;a<h;a++)e=o[a]=o[a]||this.dflt,i=l[a]=l[a]||this.dflt,_&&(u=e.indexOf(_))!==(f=i.indexOf(_))&&(-1===f?o[a]=o[a].split(_).join(""):-1===u&&(o[a]+=" "+_));e=o.join(", "),i=l.join(", ")}return wt(t,this.p,e,i,this.clrs,this.dflt,r,this.pr,s,n)},u.parse=function(t,e,i,r,s,a,o){return this.parseComplex(t.style,this.format(tt(t,this.p,n,!1,this.dflt)),this.format(e),s,a)},o.registerSpecialProp=function(t,e,i){Ot(t,{parser:function(t,r,s,n,a,o,l){var h=new Tt(t,s,0,0,a,2,s,!1,i);return h.plugin=o,h.setRatio=e(t,r,n._tween,s),h},priority:i})},o.useSVGTransformAttr=!0;var St,Rt,At,Ct,Mt,Dt="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Et=K("transform"),Ft=$+"transform",zt=K("transformOrigin"),It=null!==K("perspective"),Lt=q.Transform=function(){this.perspective=parseFloat(o.defaultTransformPerspective)||0,this.force3D=!(!1===o.defaultForce3D||!It)&&(o.defaultForce3D||"auto")},jt=s.SVGElement,Nt=function(t,e,i){var r,s=B.createElementNS("http://www.w3.org/2000/svg",t),n=/([a-z])([A-Z])/g;for(r in i)s.setAttributeNS(null,r.replace(n,"$1-$2").toLowerCase(),i[r]);return e.appendChild(s),s},Xt=B.documentElement||{},Bt=(Mt=m||/Android/i.test(G)&&!s.chrome,B.createElementNS&&!Mt&&(Rt=Nt("svg",Xt),Ct=(At=Nt("rect",Rt,{width:100,height:50,x:100})).getBoundingClientRect().width,At.style[zt]="50% 50%",At.style[Et]="scaleX(0.5)",Mt=Ct===At.getBoundingClientRect().width&&!(p&&It),Xt.removeChild(Rt)),Mt),Yt=function(t,e,i,r,s,n){var a,l,h,u,f,_,c,p,d,m,g,v,y,T,x=t._gsTransform,w=Gt(t,!0);x&&(y=x.xOrigin,T=x.yOrigin),(!r||(a=r.split(" ")).length<2)&&(0===(c=t.getBBox()).x&&0===c.y&&c.width+c.height===0&&(c={x:parseFloat(t.hasAttribute("x")?t.getAttribute("x"):t.hasAttribute("cx")?t.getAttribute("cx"):0)||0,y:parseFloat(t.hasAttribute("y")?t.getAttribute("y"):t.hasAttribute("cy")?t.getAttribute("cy"):0)||0,width:0,height:0}),a=[(-1!==(e=lt(e).split(" "))[0].indexOf("%")?parseFloat(e[0])/100*c.width:parseFloat(e[0]))+c.x,(-1!==e[1].indexOf("%")?parseFloat(e[1])/100*c.height:parseFloat(e[1]))+c.y]),i.xOrigin=u=parseFloat(a[0]),i.yOrigin=f=parseFloat(a[1]),r&&w!==qt&&(_=w[0],c=w[1],p=w[2],d=w[3],m=w[4],g=w[5],(v=_*d-c*p)&&(l=u*(d/v)+f*(-p/v)+(p*g-d*m)/v,h=u*(-c/v)+f*(_/v)-(_*g-c*m)/v,u=i.xOrigin=a[0]=l,f=i.yOrigin=a[1]=h)),x&&(n&&(i.xOffset=x.xOffset,i.yOffset=x.yOffset,x=i),s||!1!==s&&!1!==o.defaultSmoothOrigin?(l=u-y,h=f-T,x.xOffset+=l*w[0]+h*w[2]-l,x.yOffset+=l*w[1]+h*w[3]-h):x.xOffset=x.yOffset=0),n||t.setAttribute("data-svg-origin",a.join(" "))},Vt=function(t){var e,i=Y("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,s=this.nextSibling,n=this.style.cssText;if(Xt.appendChild(i),i.appendChild(this),this.style.display="block",t)try{e=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Vt}catch(t){}else this._originalGetBBox&&(e=this._originalGetBBox());return s?r.insertBefore(this,s):r.appendChild(this),Xt.removeChild(i),this.style.cssText=n,e},Ut=function(t){return!(!jt||!t.getCTM||t.parentNode&&!t.ownerSVGElement||!function(t){try{return t.getBBox()}catch(e){return Vt.call(t,!0)}}(t))},qt=[1,0,0,1,0,0],Gt=function(t,e){var i,r,s,n,a,o,l=t._gsTransform||new Lt,h=t.style;if(Et?r=tt(t,Ft,null,!0):t.currentStyle&&(r=(r=t.currentStyle.filter.match(E))&&4===r.length?[r[0].substr(4),Number(r[2].substr(4)),Number(r[1].substr(4)),r[3].substr(4),l.x||0,l.y||0].join(","):""),i=!r||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,!Et||!(o=!J(t)||"none"===J(t).display)&&t.parentNode||(o&&(n=h.display,h.display="block"),t.parentNode||(a=1,Xt.appendChild(t)),i=!(r=tt(t,Ft,null,!0))||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,n?h.display=n:o&&Qt(h,"display"),a&&Xt.removeChild(t)),(l.svg||t.getCTM&&Ut(t))&&(i&&-1!==(h[Et]+"").indexOf("matrix")&&(r=h[Et],i=0),s=t.getAttribute("transform"),i&&s&&(r="matrix("+(s=t.transform.baseVal.consolidate().matrix).a+","+s.b+","+s.c+","+s.d+","+s.e+","+s.f+")",i=0)),i)return qt;for(s=(r||"").match(y)||[],bt=s.length;--bt>-1;)n=Number(s[bt]),s[bt]=(a=n-(n|=0))?(1e5*a+(a<0?-.5:.5)|0)/1e5+n:n;return e&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s},Wt=q.getTransform=function(t,i,r,s){if(t._gsTransform&&r&&!s)return t._gsTransform;var n,a,l,h,u,f,_=r&&t._gsTransform||new Lt,c=_.scaleX<0,p=It&&(parseFloat(tt(t,zt,i,!1,"0 0 0").split(" ")[2])||_.zOrigin)||0,d=parseFloat(o.defaultTransformPerspective)||0;if(_.svg=!(!t.getCTM||!Ut(t)),_.svg&&(Yt(t,tt(t,zt,i,!1,"50% 50%")+"",_,t.getAttribute("data-svg-origin")),St=o.useSVGTransformAttr||Bt),(n=Gt(t))!==qt){if(16===n.length){var m,g,v,y,T,x=n[0],w=n[1],b=n[2],P=n[3],O=n[4],k=n[5],S=n[6],R=n[7],A=n[8],C=n[9],M=n[10],D=n[12],E=n[13],F=n[14],z=n[11],I=Math.atan2(S,M);_.zOrigin&&(D=A*(F=-_.zOrigin)-n[12],E=C*F-n[13],F=M*F+_.zOrigin-n[14]),_.rotationX=I*j,I&&(m=O*(y=Math.cos(-I))+A*(T=Math.sin(-I)),g=k*y+C*T,v=S*y+M*T,A=O*-T+A*y,C=k*-T+C*y,M=S*-T+M*y,z=R*-T+z*y,O=m,k=g,S=v),I=Math.atan2(-b,M),_.rotationY=I*j,I&&(g=w*(y=Math.cos(-I))-C*(T=Math.sin(-I)),v=b*y-M*T,C=w*T+C*y,M=b*T+M*y,z=P*T+z*y,x=m=x*y-A*T,w=g,b=v),I=Math.atan2(w,x),_.rotation=I*j,I&&(m=x*(y=Math.cos(I))+w*(T=Math.sin(I)),g=O*y+k*T,v=A*y+C*T,w=w*y-x*T,k=k*y-O*T,C=C*y-A*T,x=m,O=g,A=v),_.rotationX&&Math.abs(_.rotationX)+Math.abs(_.rotation)>359.9&&(_.rotationX=_.rotation=0,_.rotationY=180-_.rotationY),I=Math.atan2(O,k),_.scaleX=(1e5*Math.sqrt(x*x+w*w+b*b)+.5|0)/1e5,_.scaleY=(1e5*Math.sqrt(k*k+S*S)+.5|0)/1e5,_.scaleZ=(1e5*Math.sqrt(A*A+C*C+M*M)+.5|0)/1e5,x/=_.scaleX,O/=_.scaleY,w/=_.scaleX,k/=_.scaleY,Math.abs(I)>2e-5?(_.skewX=I*j,O=0,"simple"!==_.skewType&&(_.scaleY*=1/Math.cos(I))):_.skewX=0,_.perspective=z?1/(z<0?-z:z):0,_.x=D,_.y=E,_.z=F,_.svg&&(_.x-=_.xOrigin-(_.xOrigin*x-_.yOrigin*O),_.y-=_.yOrigin-(_.yOrigin*w-_.xOrigin*k))}else if(!It||s||!n.length||_.x!==n[4]||_.y!==n[5]||!_.rotationX&&!_.rotationY){var L=n.length>=6,N=L?n[0]:1,X=n[1]||0,B=n[2]||0,Y=L?n[3]:1;_.x=n[4]||0,_.y=n[5]||0,l=Math.sqrt(N*N+X*X),h=Math.sqrt(Y*Y+B*B),u=N||X?Math.atan2(X,N)*j:_.rotation||0,f=B||Y?Math.atan2(B,Y)*j+u:_.skewX||0,_.scaleX=l,_.scaleY=h,_.rotation=u,_.skewX=f,It&&(_.rotationX=_.rotationY=_.z=0,_.perspective=d,_.scaleZ=1),_.svg&&(_.x-=_.xOrigin-(_.xOrigin*N+_.yOrigin*B),_.y-=_.yOrigin-(_.xOrigin*X+_.yOrigin*Y))}for(a in Math.abs(_.skewX)>90&&Math.abs(_.skewX)<270&&(c?(_.scaleX*=-1,_.skewX+=_.rotation<=0?180:-180,_.rotation+=_.rotation<=0?180:-180):(_.scaleY*=-1,_.skewX+=_.skewX<=0?180:-180)),_.zOrigin=p,_)_[a]<2e-5&&_[a]>-2e-5&&(_[a]=0)}return r&&(t._gsTransform=_,_.svg&&(St&&t.style[Et]?e.delayedCall(.001,function(){Qt(t.style,Et)}):!St&&t.getAttribute("transform")&&e.delayedCall(.001,function(){t.removeAttribute("transform")}))),_},Zt=function(t){var e,i,r=this.data,s=-r.rotation*L,n=s+r.skewX*L,a=(Math.cos(s)*r.scaleX*1e5|0)/1e5,o=(Math.sin(s)*r.scaleX*1e5|0)/1e5,l=(Math.sin(n)*-r.scaleY*1e5|0)/1e5,h=(Math.cos(n)*r.scaleY*1e5|0)/1e5,u=this.t.style,f=this.t.currentStyle;if(f){i=o,o=-l,l=-i,e=f.filter,u.filter="";var _,c,p=this.t.offsetWidth,d=this.t.offsetHeight,g="absolute"!==f.position,v="progid:DXImageTransform.Microsoft.Matrix(M11="+a+", M12="+o+", M21="+l+", M22="+h,y=r.x+p*r.xPercent/100,T=r.y+d*r.yPercent/100;if(null!=r.ox&&(y+=(_=(r.oxp?p*r.ox*.01:r.ox)-p/2)-(_*a+(c=(r.oyp?d*r.oy*.01:r.oy)-d/2)*o),T+=c-(_*l+c*h)),v+=g?", Dx="+((_=p/2)-(_*a+(c=d/2)*o)+y)+", Dy="+(c-(_*l+c*h)+T)+")":", sizingMethod='auto expand')",-1!==e.indexOf("DXImageTransform.Microsoft.Matrix(")?u.filter=e.replace(F,v):u.filter=v+" "+e,0!==t&&1!==t||1===a&&0===o&&0===l&&1===h&&(g&&-1===v.indexOf("Dx=0, Dy=0")||P.test(e)&&100!==parseFloat(RegExp.$1)||-1===e.indexOf(e.indexOf("Alpha"))&&u.removeAttribute("filter")),!g){var x,w,O,k=m<8?1:-1;for(_=r.ieOffsetX||0,c=r.ieOffsetY||0,r.ieOffsetX=Math.round((p-((a<0?-a:a)*p+(o<0?-o:o)*d))/2+y),r.ieOffsetY=Math.round((d-((h<0?-h:h)*d+(l<0?-l:l)*p))/2+T),bt=0;bt<4;bt++)O=(i=-1!==(x=f[w=at[bt]]).indexOf("px")?parseFloat(x):et(this.t,w,parseFloat(x),x.replace(b,""))||0)!==r[w]?bt<2?-r.ieOffsetX:-r.ieOffsetY:bt<2?_-r.ieOffsetX:c-r.ieOffsetY,u[w]=(r[w]=Math.round(i-O*(0===bt||2===bt?1:k)))+"px"}}},Ht=q.set3DTransformRatio=q.setTransformRatio=function(t){var e,i,r,s,n,a,o,l,h,u,f,_,c,d,m,g,v,y,T,x,w=this.data,b=this.t.style,P=w.rotation,O=w.rotationX,k=w.rotationY,S=w.scaleX,R=w.scaleY,A=w.scaleZ,C=w.x,M=w.y,D=w.z,E=w.svg,F=w.perspective,z=w.force3D,I=w.skewY,j=w.skewX;if(I&&(j+=I,P+=I),!((1!==t&&0!==t||"auto"!==z||this.tween._totalTime!==this.tween._totalDuration&&this.tween._totalTime)&&z||D||F||k||O||1!==A)||St&&E||!It)P||j||E?(P*=L,x=j*L,1e5,i=Math.cos(P)*S,n=Math.sin(P)*S,r=Math.sin(P-x)*-R,a=Math.cos(P-x)*R,x&&"simple"===w.skewType&&(e=Math.tan(x-I*L),r*=e=Math.sqrt(1+e*e),a*=e,I&&(e=Math.tan(I*L),i*=e=Math.sqrt(1+e*e),n*=e)),E&&(C+=w.xOrigin-(w.xOrigin*i+w.yOrigin*r)+w.xOffset,M+=w.yOrigin-(w.xOrigin*n+w.yOrigin*a)+w.yOffset,St&&(w.xPercent||w.yPercent)&&(m=this.t.getBBox(),C+=.01*w.xPercent*m.width,M+=.01*w.yPercent*m.height),C<(m=1e-6)&&C>-m&&(C=0),M<m&&M>-m&&(M=0)),T=(1e5*i|0)/1e5+","+(1e5*n|0)/1e5+","+(1e5*r|0)/1e5+","+(1e5*a|0)/1e5+","+C+","+M+")",E&&St?this.t.setAttribute("transform","matrix("+T):b[Et]=(w.xPercent||w.yPercent?"translate("+w.xPercent+"%,"+w.yPercent+"%) matrix(":"matrix(")+T):b[Et]=(w.xPercent||w.yPercent?"translate("+w.xPercent+"%,"+w.yPercent+"%) matrix(":"matrix(")+S+",0,0,"+R+","+C+","+M+")";else{if(p&&(S<(m=1e-4)&&S>-m&&(S=A=2e-5),R<m&&R>-m&&(R=A=2e-5),!F||w.z||w.rotationX||w.rotationY||(F=0)),P||j)P*=L,g=i=Math.cos(P),v=n=Math.sin(P),j&&(P-=j*L,g=Math.cos(P),v=Math.sin(P),"simple"===w.skewType&&(e=Math.tan((j-I)*L),g*=e=Math.sqrt(1+e*e),v*=e,w.skewY&&(e=Math.tan(I*L),i*=e=Math.sqrt(1+e*e),n*=e))),r=-v,a=g;else{if(!(k||O||1!==A||F||E))return void(b[Et]=(w.xPercent||w.yPercent?"translate("+w.xPercent+"%,"+w.yPercent+"%) translate3d(":"translate3d(")+C+"px,"+M+"px,"+D+"px)"+(1!==S||1!==R?" scale("+S+","+R+")":""));i=a=1,r=n=0}u=1,s=o=l=h=f=_=0,c=F?-1/F:0,d=w.zOrigin,m=1e-6,",","0",(P=k*L)&&(g=Math.cos(P),l=-(v=Math.sin(P)),f=c*-v,s=i*v,o=n*v,u=g,c*=g,i*=g,n*=g),(P=O*L)&&(e=r*(g=Math.cos(P))+s*(v=Math.sin(P)),y=a*g+o*v,h=u*v,_=c*v,s=r*-v+s*g,o=a*-v+o*g,u*=g,c*=g,r=e,a=y),1!==A&&(s*=A,o*=A,u*=A,c*=A),1!==R&&(r*=R,a*=R,h*=R,_*=R),1!==S&&(i*=S,n*=S,l*=S,f*=S),(d||E)&&(d&&(C+=s*-d,M+=o*-d,D+=u*-d+d),E&&(C+=w.xOrigin-(w.xOrigin*i+w.yOrigin*r)+w.xOffset,M+=w.yOrigin-(w.xOrigin*n+w.yOrigin*a)+w.yOffset),C<m&&C>-m&&(C="0"),M<m&&M>-m&&(M="0"),D<m&&D>-m&&(D=0)),T=w.xPercent||w.yPercent?"translate("+w.xPercent+"%,"+w.yPercent+"%) matrix3d(":"matrix3d(",T+=(i<m&&i>-m?"0":i)+","+(n<m&&n>-m?"0":n)+","+(l<m&&l>-m?"0":l),T+=","+(f<m&&f>-m?"0":f)+","+(r<m&&r>-m?"0":r)+","+(a<m&&a>-m?"0":a),O||k||1!==A?(T+=","+(h<m&&h>-m?"0":h)+","+(_<m&&_>-m?"0":_)+","+(s<m&&s>-m?"0":s),T+=","+(o<m&&o>-m?"0":o)+","+(u<m&&u>-m?"0":u)+","+(c<m&&c>-m?"0":c)+","):T+=",0,0,0,0,1,0,",T+=C+","+M+","+D+","+(F?1+-D/F:1)+")",b[Et]=T}};(u=Lt.prototype).x=u.y=u.z=u.skewX=u.skewY=u.rotation=u.rotationX=u.rotationY=u.zOrigin=u.xPercent=u.yPercent=u.xOffset=u.yOffset=0,u.scaleX=u.scaleY=u.scaleZ=1,Ot("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(t,e,i,r,s,a,l){if(r._lastParsedTransform===l)return s;r._lastParsedTransform=l;var h,u=l.scale&&"function"==typeof l.scale?l.scale:0;"function"==typeof l[i]&&(h=l[i],l[i]=e),u&&(l.scale=u(v,t));var f,_,c,p,d,m,y,T,x,w=t._gsTransform,b=t.style,P=Dt.length,O=l,k={},S=Wt(t,n,!0,O.parseTransform),R=O.transform&&("function"==typeof O.transform?O.transform(v,g):O.transform);if(S.skewType=O.skewType||S.skewType||o.defaultSkewType,r._transform=S,R&&"string"==typeof R&&Et)(_=V.style)[Et]=R,_.display="block",_.position="absolute",B.body.appendChild(V),f=Wt(V,null,!1),"simple"===S.skewType&&(f.scaleY*=Math.cos(f.skewX*L)),S.svg&&(m=S.xOrigin,y=S.yOrigin,f.x-=S.xOffset,f.y-=S.yOffset,(O.transformOrigin||O.svgOrigin)&&(R={},Yt(t,lt(O.transformOrigin),R,O.svgOrigin,O.smoothOrigin,!0),m=R.xOrigin,y=R.yOrigin,f.x-=R.xOffset-S.xOffset,f.y-=R.yOffset-S.yOffset),(m||y)&&(T=Gt(V,!0),f.x-=m-(m*T[0]+y*T[2]),f.y-=y-(m*T[1]+y*T[3]))),B.body.removeChild(V),f.perspective||(f.perspective=S.perspective),null!=O.xPercent&&(f.xPercent=ut(O.xPercent,S.xPercent)),null!=O.yPercent&&(f.yPercent=ut(O.yPercent,S.yPercent));else if("object"==typeof O){if(f={scaleX:ut(null!=O.scaleX?O.scaleX:O.scale,S.scaleX),scaleY:ut(null!=O.scaleY?O.scaleY:O.scale,S.scaleY),scaleZ:ut(O.scaleZ,S.scaleZ),x:ut(O.x,S.x),y:ut(O.y,S.y),z:ut(O.z,S.z),xPercent:ut(O.xPercent,S.xPercent),yPercent:ut(O.yPercent,S.yPercent),perspective:ut(O.transformPerspective,S.perspective)},null!=(d=O.directionalRotation))if("object"==typeof d)for(_ in d)O[_]=d[_];else O.rotation=d;"string"==typeof O.x&&-1!==O.x.indexOf("%")&&(f.x=0,f.xPercent=ut(O.x,S.xPercent)),"string"==typeof O.y&&-1!==O.y.indexOf("%")&&(f.y=0,f.yPercent=ut(O.y,S.yPercent)),f.rotation=ft("rotation"in O?O.rotation:"shortRotation"in O?O.shortRotation+"_short":"rotationZ"in O?O.rotationZ:S.rotation,S.rotation,"rotation",k),It&&(f.rotationX=ft("rotationX"in O?O.rotationX:"shortRotationX"in O?O.shortRotationX+"_short":S.rotationX||0,S.rotationX,"rotationX",k),f.rotationY=ft("rotationY"in O?O.rotationY:"shortRotationY"in O?O.shortRotationY+"_short":S.rotationY||0,S.rotationY,"rotationY",k)),f.skewX=ft(O.skewX,S.skewX),f.skewY=ft(O.skewY,S.skewY)}for(It&&null!=O.force3D&&(S.force3D=O.force3D,p=!0),(c=S.force3D||S.z||S.rotationX||S.rotationY||f.z||f.rotationX||f.rotationY||f.perspective)||null==O.scale||(f.scaleZ=1);--P>-1;)((R=f[x=Dt[P]]-S[x])>1e-6||R<-1e-6||null!=O[x]||null!=N[x])&&(p=!0,s=new Tt(S,x,S[x],R,s),x in k&&(s.e=k[x]),s.xs0=0,s.plugin=a,r._overwriteProps.push(s.n));return R=O.transformOrigin,S.svg&&(R||O.svgOrigin)&&(m=S.xOffset,y=S.yOffset,Yt(t,lt(R),f,O.svgOrigin,O.smoothOrigin),s=xt(S,"xOrigin",(w?S:f).xOrigin,f.xOrigin,s,"transformOrigin"),s=xt(S,"yOrigin",(w?S:f).yOrigin,f.yOrigin,s,"transformOrigin"),m===S.xOffset&&y===S.yOffset||(s=xt(S,"xOffset",w?m:S.xOffset,S.xOffset,s,"transformOrigin"),s=xt(S,"yOffset",w?y:S.yOffset,S.yOffset,s,"transformOrigin")),R="0px 0px"),(R||It&&c&&S.zOrigin)&&(Et?(p=!0,x=zt,R=(R||tt(t,x,n,!1,"50% 50%"))+"",(s=new Tt(b,x,0,0,s,-1,"transformOrigin")).b=b[x],s.plugin=a,It?(_=S.zOrigin,R=R.split(" "),S.zOrigin=(R.length>2&&(0===_||"0px"!==R[2])?parseFloat(R[2]):_)||0,s.xs0=s.e=R[0]+" "+(R[1]||"50%")+" 0px",(s=new Tt(S,"zOrigin",0,0,s,-1,s.n)).b=_,s.xs0=s.e=S.zOrigin):s.xs0=s.e=R):lt(R+"",S)),p&&(r._transformType=S.svg&&St||!c&&3!==this._transformType?2:3),h&&(l[i]=h),u&&(l.scale=u),s},prefix:!0}),Ot("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Ot("borderRadius",{defaultValue:"0px",parser:function(t,e,i,s,a,o){e=this.format(e);var l,h,u,f,_,c,p,d,m,g,v,y,T,x,w,b,P=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],O=t.style;for(m=parseFloat(t.offsetWidth),g=parseFloat(t.offsetHeight),l=e.split(" "),h=0;h<P.length;h++)this.p.indexOf("border")&&(P[h]=K(P[h])),-1!==(_=f=tt(t,P[h],n,!1,"0px")).indexOf(" ")&&(_=(f=_.split(" "))[0],f=f[1]),c=u=l[h],p=parseFloat(_),y=_.substr((p+"").length),(T="="===c.charAt(1))?(d=parseInt(c.charAt(0)+"1",10),c=c.substr(2),d*=parseFloat(c),v=c.substr((d+"").length-(d<0?1:0))||""):(d=parseFloat(c),v=c.substr((d+"").length)),""===v&&(v=r[i]||y),v!==y&&(x=et(t,"borderLeft",p,y),w=et(t,"borderTop",p,y),"%"===v?(_=x/m*100+"%",f=w/g*100+"%"):"em"===v?(_=x/(b=et(t,"borderLeft",1,"em"))+"em",f=w/b+"em"):(_=x+"px",f=w+"px"),T&&(c=parseFloat(_)+d+v,u=parseFloat(f)+d+v)),a=wt(O,P[h],_+" "+f,c+" "+u,!1,"0px",a);return a},prefix:!0,formatter:gt("0px 0px 0px 0px",!1,!0)}),Ot("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(t,e,i,r,s,a){return wt(t.style,i,this.format(tt(t,i,n,!1,"0px 0px")),this.format(e),!1,"0px",s)},prefix:!0,formatter:gt("0px 0px",!1,!0)}),Ot("backgroundPosition",{defaultValue:"0 0",parser:function(t,e,i,r,s,a){var o,l,h,u,f,_,c="background-position",p=n||J(t,null),d=this.format((p?m?p.getPropertyValue(c+"-x")+" "+p.getPropertyValue(c+"-y"):p.getPropertyValue(c):t.currentStyle.backgroundPositionX+" "+t.currentStyle.backgroundPositionY)||"0 0"),g=this.format(e);if(-1!==d.indexOf("%")!=(-1!==g.indexOf("%"))&&g.split(",").length<2&&(_=tt(t,"backgroundImage").replace(C,""))&&"none"!==_){for(o=d.split(" "),l=g.split(" "),U.setAttribute("src",_),h=2;--h>-1;)(u=-1!==(d=o[h]).indexOf("%"))!==(-1!==l[h].indexOf("%"))&&(f=0===h?t.offsetWidth-U.width:t.offsetHeight-U.height,o[h]=u?parseFloat(d)/100*f+"px":parseFloat(d)/f*100+"%");d=o.join(" ")}return this.parseComplex(t.style,d,g,s,a)},formatter:lt}),Ot("backgroundSize",{defaultValue:"0 0",formatter:function(t){return lt(-1===(t+="").indexOf(" ")?t+" "+t:t)}}),Ot("perspective",{defaultValue:"0px",prefix:!0}),Ot("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Ot("transformStyle",{prefix:!0}),Ot("backfaceVisibility",{prefix:!0}),Ot("userSelect",{prefix:!0}),Ot("margin",{parser:vt("marginTop,marginRight,marginBottom,marginLeft")}),Ot("padding",{parser:vt("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Ot("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(t,e,i,r,s,a){var o,l,h;return m<9?(l=t.currentStyle,h=m<8?" ":",",o="rect("+l.clipTop+h+l.clipRight+h+l.clipBottom+h+l.clipLeft+")",e=this.format(e).split(",").join(h)):(o=this.format(tt(t,this.p,n,!1,this.dflt)),e=this.format(e)),this.parseComplex(t.style,o,e,s,a)}}),Ot("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Ot("autoRound,strictUnits",{parser:function(t,e,i,r,s){return s}}),Ot("border",{defaultValue:"0px solid #000",parser:function(t,e,i,r,s,a){var o=tt(t,"borderTopWidth",n,!1,"0px"),l=this.format(e).split(" "),h=l[0].replace(b,"");return"px"!==h&&(o=parseFloat(o)/et(t,"borderTopWidth",1,h)+h),this.parseComplex(t.style,this.format(o+" "+tt(t,"borderTopStyle",n,!1,"solid")+" "+tt(t,"borderTopColor",n,!1,"#000")),l.join(" "),s,a)},color:!0,formatter:function(t){var e=t.split(" ");return e[0]+" "+(e[1]||"solid")+" "+(t.match(mt)||["#000"])[0]}}),Ot("borderWidth",{parser:vt("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Ot("float,cssFloat,styleFloat",{parser:function(t,e,i,r,s,n){var a=t.style,o="cssFloat"in a?"cssFloat":"styleFloat";return new Tt(a,o,0,0,s,-1,i,!1,0,a[o],e)}});var $t=function(t){var e,i=this.t,r=i.filter||tt(this.data,"filter")||"",s=this.s+this.c*t|0;100===s&&(-1===r.indexOf("atrix(")&&-1===r.indexOf("radient(")&&-1===r.indexOf("oader(")?(i.removeAttribute("filter"),e=!tt(this.data,"filter")):(i.filter=r.replace(k,""),e=!0)),e||(this.xn1&&(i.filter=r=r||"alpha(opacity="+s+")"),-1===r.indexOf("pacity")?0===s&&this.xn1||(i.filter=r+" alpha(opacity="+s+")"):i.filter=r.replace(P,"opacity="+s))};Ot("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(t,e,i,r,s,a){var o=parseFloat(tt(t,"opacity",n,!1,"1")),l=t.style,h="autoAlpha"===i;return"string"==typeof e&&"="===e.charAt(1)&&(e=("-"===e.charAt(0)?-1:1)*parseFloat(e.substr(2))+o),h&&1===o&&"hidden"===tt(t,"visibility",n)&&0!==e&&(o=0),W?s=new Tt(l,"opacity",o,e-o,s):((s=new Tt(l,"opacity",100*o,100*(e-o),s)).xn1=h?1:0,l.zoom=1,s.type=2,s.b="alpha(opacity="+s.s+")",s.e="alpha(opacity="+(s.s+s.c)+")",s.data=t,s.plugin=a,s.setRatio=$t),h&&((s=new Tt(l,"visibility",0,0,s,-1,null,!1,0,0!==o?"inherit":"hidden",0===e?"hidden":"inherit")).xs0="inherit",r._overwriteProps.push(s.n),r._overwriteProps.push(i)),s}});var Qt=function(t,e){e&&(t.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),t.removeProperty(e.replace(R,"-$1").toLowerCase())):t.removeAttribute(e))},Kt=function(t){if(this.t._gsClassPT=this,1===t||0===t){this.t.setAttribute("class",0===t?this.b:this.e);for(var e=this.data,i=this.t.style;e;)e.v?i[e.p]=e.v:Qt(i,e.p),e=e._next;1===t&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Ot("className",{parser:function(t,e,r,s,a,o,l){var h,u,f,_,c,p=t.getAttribute("class")||"",d=t.style.cssText;if((a=s._classNamePT=new Tt(t,r,0,0,a,2)).setRatio=Kt,a.pr=-11,i=!0,a.b=p,u=rt(t,n),f=t._gsClassPT){for(_={},c=f.data;c;)_[c.p]=1,c=c._next;f.setRatio(1)}return t._gsClassPT=a,a.e="="!==e.charAt(1)?e:p.replace(new RegExp("(?:\\s|^)"+e.substr(2)+"(?![\\w-])"),"")+("+"===e.charAt(0)?" "+e.substr(2):""),t.setAttribute("class",a.e),h=st(t,u,rt(t),l,_),t.setAttribute("class",p),a.data=h.firstMPT,t.style.cssText=d,a=a.xfirst=s.parse(t,h.difs,a,o)}});var Jt=function(t){if((1===t||0===t)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var e,i,r,s,n,a=this.t.style,o=h.transform.parse;if("all"===this.e)a.cssText="",s=!0;else for(r=(e=this.e.split(" ").join("").split(",")).length;--r>-1;)i=e[r],h[i]&&(h[i].parse===o?s=!0:i="transformOrigin"===i?zt:h[i].p),Qt(a,i);s&&(Qt(a,Et),(n=this.t._gsTransform)&&(n.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Ot("clearProps",{parser:function(t,e,r,s,n){return(n=new Tt(t,r,0,0,n,2)).setRatio=Jt,n.e=e,n.pr=-10,n.data=s._tween,i=!0,n}}),u="bezier,throwProps,physicsProps,physics2D".split(","),bt=u.length;bt--;)kt(u[bt]);(u=o.prototype)._firstPT=u._lastParsedTransform=u._transform=null,u._onInitTween=function(t,e,s,l){if(!t.nodeType)return!1;this._target=g=t,this._tween=s,this._vars=e,v=l,f=e.autoRound,i=!1,r=e.suffixMap||o.suffixMap,n=J(t,""),a=this._overwriteProps;var u,p,m,y,T,x,w,b,P,k=t.style;if(_&&""===k.zIndex&&("auto"!==(u=tt(t,"zIndex",n))&&""!==u||this._addLazySet(k,"zIndex",0)),"string"==typeof e&&(y=k.cssText,u=rt(t,n),k.cssText=y+";"+e,u=st(t,u,rt(t)).difs,!W&&O.test(e)&&(u.opacity=parseFloat(RegExp.$1)),e=u,k.cssText=y),e.className?this._firstPT=p=h.className.parse(t,e.className,"className",this,null,null,e):this._firstPT=p=this.parse(t,e,null),this._transformType){for(P=3===this._transformType,Et?c&&(_=!0,""===k.zIndex&&("auto"!==(w=tt(t,"zIndex",n))&&""!==w||this._addLazySet(k,"zIndex",0)),d&&this._addLazySet(k,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(P?"visible":"hidden"))):k.zoom=1,m=p;m&&m._next;)m=m._next;b=new Tt(t,"transform",0,0,null,2),this._linkCSSP(b,null,m),b.setRatio=Et?Ht:Zt,b.data=this._transform||Wt(t,n,!0),b.tween=s,b.pr=-1,a.pop()}if(i){for(;p;){for(x=p._next,m=y;m&&m.pr>p.pr;)m=m._next;(p._prev=m?m._prev:T)?p._prev._next=p:y=p,(p._next=m)?m._prev=p:T=p,p=x}this._firstPT=y}return!0},u.parse=function(t,e,i,s){var a,o,l,u,_,c,p,d,m,y,T=t.style;for(a in e){if("function"==typeof(c=e[a])&&(c=c(v,g)),o=h[a])i=o.parse(t,c,a,this,i,s,e);else{if("--"===a.substr(0,2)){this._tween._propLookup[a]=this._addTween.call(this._tween,t.style,"setProperty",J(t).getPropertyValue(a)+"",c+"",a,!1,a);continue}_=tt(t,a,n)+"",m="string"==typeof c,"color"===a||"fill"===a||"stroke"===a||-1!==a.indexOf("Color")||m&&S.test(c)?(m||(c=((c=pt(c)).length>3?"rgba(":"rgb(")+c.join(",")+")"),i=wt(T,a,_,c,!0,"transparent",i,0,s)):m&&I.test(c)?i=wt(T,a,_,c,!0,null,i,0,s):(p=(l=parseFloat(_))||0===l?_.substr((l+"").length):"",""!==_&&"auto"!==_||("width"===a||"height"===a?(l=ot(t,a,n),p="px"):"left"===a||"top"===a?(l=it(t,a,n),p="px"):(l="opacity"!==a?0:1,p="")),(y=m&&"="===c.charAt(1))?(u=parseInt(c.charAt(0)+"1",10),c=c.substr(2),u*=parseFloat(c),d=c.replace(b,"")):(u=parseFloat(c),d=m?c.replace(b,""):""),""===d&&(d=a in r?r[a]:p),c=u||0===u?(y?u+l:u)+d:e[a],p!==d&&(""===d&&"lineHeight"!==a||(u||0===u)&&l&&(l=et(t,a,l,p),"%"===d?(l/=et(t,a,100,"%")/100,!0!==e.strictUnits&&(_=l+"%")):"em"===d||"rem"===d||"vw"===d||"vh"===d?l/=et(t,a,1,d):"px"!==d&&(u=et(t,a,u,d),d="px"),y&&(u||0===u)&&(c=u+l+d))),y&&(u+=l),!l&&0!==l||!u&&0!==u?void 0!==T[a]&&(c||c+""!="NaN"&&null!=c)?(i=new Tt(T,a,u||l||0,0,i,-1,a,!1,0,_,c)).xs0="none"!==c||"display"!==a&&-1===a.indexOf("Style")?c:_:H("invalid "+a+" tween value: "+e[a]):(i=new Tt(T,a,l,u-l,i,0,a,!1!==f&&("px"===d||"zIndex"===a),0,_,c)).xs0=d)}s&&i&&!i.plugin&&(i.plugin=s)}return i},u.setRatio=function(t){var e,i,r,s=this._firstPT;if(1!==t||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(t||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;s;){if(e=s.c*t+s.s,s.r?e=Math.round(e):e<1e-6&&e>-1e-6&&(e=0),s.type)if(1===s.type)if(2===(r=s.l))s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2;else if(3===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3;else if(4===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3+s.xn3+s.xs4;else if(5===r)s.t[s.p]=s.xs0+e+s.xs1+s.xn1+s.xs2+s.xn2+s.xs3+s.xn3+s.xs4+s.xn4+s.xs5;else{for(i=s.xs0+e+s.xs1,r=1;r<s.l;r++)i+=s["xn"+r]+s["xs"+(r+1)];s.t[s.p]=i}else-1===s.type?s.t[s.p]=s.xs0:s.setRatio&&s.setRatio(t);else s.t[s.p]=e+s.xs0;s=s._next}else for(;s;)2!==s.type?s.t[s.p]=s.b:s.setRatio(t),s=s._next;else for(;s;){if(2!==s.type)if(s.r&&-1!==s.type)if(e=Math.round(s.s+s.c),s.type){if(1===s.type){for(r=s.l,i=s.xs0+e+s.xs1,r=1;r<s.l;r++)i+=s["xn"+r]+s["xs"+(r+1)];s.t[s.p]=i}}else s.t[s.p]=e+s.xs0;else s.t[s.p]=s.e;else s.setRatio(t);s=s._next}},u._enableTransforms=function(t){this._transform=this._transform||Wt(this._target,n,!0),this._transformType=this._transform.svg&&St||!t&&3!==this._transformType?2:3};var te=function(t){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};u._addLazySet=function(t,e,i){var r=this._firstPT=new Tt(t,e,0,0,this._firstPT,2);r.e=i,r.setRatio=te,r.data=this},u._linkCSSP=function(t,e,i,r){return t&&(e&&(e._prev=t),t._next&&(t._next._prev=t._prev),t._prev?t._prev._next=t._next:this._firstPT===t&&(this._firstPT=t._next,r=!0),i?i._next=t:r||null!==this._firstPT||(this._firstPT=t),t._next=e,t._prev=i),t},u._mod=function(t){for(var e=this._firstPT;e;)"function"==typeof t[e.p]&&t[e.p]===Math.round&&(e.r=1),e=e._next},u._kill=function(e){var i,r,s,n=e;if(e.autoAlpha||e.alpha){for(r in n={},e)n[r]=e[r];n.opacity=1,n.autoAlpha&&(n.visibility=1)}for(e.className&&(i=this._classNamePT)&&((s=i.xfirst)&&s._prev?this._linkCSSP(s._prev,i._next,s._prev._prev):s===this._firstPT&&(this._firstPT=i._next),i._next&&this._linkCSSP(i._next,i._next._next,s._prev),this._classNamePT=null),i=this._firstPT;i;)i.plugin&&i.plugin!==r&&i.plugin._kill&&(i.plugin._kill(e),r=i.plugin),i=i._next;return t.prototype._kill.call(this,n)};var ee=function(t,e,i){var r,s,n,a;if(t.slice)for(s=t.length;--s>-1;)ee(t[s],e,i);else for(s=(r=t.childNodes).length;--s>-1;)a=(n=r[s]).type,n.style&&(e.push(rt(n)),i&&i.push(n)),1!==a&&9!==a&&11!==a||!n.childNodes.length||ee(n,e,i)};return o.cascadeTo=function(t,i,r){var s,n,a,o,l=e.to(t,i,r),h=[l],u=[],f=[],_=[],c=e._internals.reservedProps;for(t=l._targets||l.target,ee(t,u,_),l.render(i,!0,!0),ee(t,f),l.render(0,!0,!0),l._enabled(!0),s=_.length;--s>-1;)if((n=st(_[s],u[s],f[s])).firstMPT){for(a in n=n.difs,r)c[a]&&(n[a]=r[a]);for(a in o={},n)o[a]=u[s][a];h.push(e.fromTo(_[s],i,o,n))}return h},t.activate([o]),o},!0),function(){var t=s._gsDefine.plugin({propName:"roundProps",version:"1.6.0",priority:-1,API:2,init:function(t,e,i){return this._tween=i,!0}}),e=function(t){for(;t;)t.f||t.blob||(t.m=Math.round),t=t._next},i=t.prototype;i._onInitAllProps=function(){for(var t,i,r,s=this._tween,n=s.vars.roundProps.join?s.vars.roundProps:s.vars.roundProps.split(","),a=n.length,o={},l=s._propLookup.roundProps;--a>-1;)o[n[a]]=Math.round;for(a=n.length;--a>-1;)for(t=n[a],i=s._firstPT;i;)r=i._next,i.pg?i.t._mod(o):i.n===t&&(2===i.f&&i.t?e(i.t._firstPT):(this._add(i.t,t,i.s,i.c),r&&(r._prev=i._prev),i._prev?i._prev._next=r:s._firstPT===i&&(s._firstPT=r),i._next=i._prev=null,s._propLookup[t]=l)),i=r;return!1},i._add=function(t,e,i,r){this._addTween(t,e,i,i+r,e,Math.round),this._overwriteProps.push(e)}}(),s._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(t,e,i,r){var s,n;if("function"!=typeof t.setAttribute)return!1;for(s in e)"function"==typeof(n=e[s])&&(n=n(r,t)),this._addTween(t,"setAttribute",t.getAttribute(s)+"",n+"",s,!1,s),this._overwriteProps.push(s);return!0}}),s._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(t,e,i,r){"object"!=typeof e&&(e={rotation:e}),this.finals={};var s,n,a,o,l,h,u=!0===e.useRadians?2*Math.PI:360;for(s in e)"useRadians"!==s&&("function"==typeof(o=e[s])&&(o=o(r,t)),n=(h=(o+"").split("_"))[0],a=parseFloat("function"!=typeof t[s]?t[s]:t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)]()),l=(o=this.finals[s]="string"==typeof n&&"="===n.charAt(1)?a+parseInt(n.charAt(0)+"1",10)*Number(n.substr(2)):Number(n)||0)-a,h.length&&(-1!==(n=h.join("_")).indexOf("short")&&(l%=u)!==l%(u/2)&&(l=l<0?l+u:l-u),-1!==n.indexOf("_cw")&&l<0?l=(l+9999999999*u)%u-(l/u|0)*u:-1!==n.indexOf("ccw")&&l>0&&(l=(l-9999999999*u)%u-(l/u|0)*u)),(l>1e-6||l<-1e-6)&&(this._addTween(t,s,a,a+l,s),this._overwriteProps.push(s)));return!0},set:function(t){var e;if(1!==t)this._super.setRatio.call(this,t);else for(e=this._firstPT;e;)e.f?e.t[e.p](this.finals[e.p]):e.t[e.p]=this.finals[e.p],e=e._next}})._autoCSS=!0,s._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,r,n,a=s.GreenSockGlobals||s,o=a.com.greensock,l=2*Math.PI,h=Math.PI/2,u=o._class,f=function(e,i){var r=u("easing."+e,function(){},!0),s=r.prototype=new t;return s.constructor=r,s.getRatio=i,r},_=t.register||function(){},c=function(t,e,i,r,s){var n=u("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new r},!0);return _(n,t),n},p=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},d=function(e,i){var r=u("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),s=r.prototype=new t;return s.constructor=r,s.getRatio=i,s.config=function(t){return new r(t)},r},m=c("Back",d("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),d("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),d("BackInOut",function(t){return(t*=2)<1?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),g=u("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=!0===i},!0),v=g.prototype=new t;return v.constructor=g,v.getRatio=function(t){var e=t+(.5-t)*this._p;return t<this._p1?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1===t?0:1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},g.ease=new g(.7,.7),v.config=g.config=function(t,e,i){return new g(t,e,i)},(v=(e=u("easing.SteppedEase",function(t,e){t=t||1,this._p1=1/t,this._p2=t+(e?0:1),this._p3=e?1:0},!0)).prototype=new t).constructor=e,v.getRatio=function(t){return t<0?t=0:t>=1&&(t=.999999999),((this._p2*t|0)+this._p3)*this._p1},v.config=e.config=function(t,i){return new e(t,i)},(v=(i=u("easing.ExpoScaleEase",function(t,e,i){this._p1=Math.log(e/t),this._p2=e-t,this._p3=t,this._ease=i},!0)).prototype=new t).constructor=i,v.getRatio=function(t){return this._ease&&(t=this._ease.getRatio(t)),(this._p3*Math.exp(this._p1*t)-this._p3)/this._p2},v.config=i.config=function(t,e,r){return new i(t,e,r)},(v=(r=u("easing.RoughEase",function(e){for(var i,r,s,n,a,o,l=(e=e||{}).taper||"none",h=[],u=0,f=0|(e.points||20),_=f,c=!1!==e.randomize,d=!0===e.clamp,m=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--_>-1;)i=c?Math.random():1/f*_,r=m?m.getRatio(i):i,s="none"===l?g:"out"===l?(n=1-i)*n*g:"in"===l?i*i*g:i<.5?(n=2*i)*n*.5*g:(n=2*(1-i))*n*.5*g,c?r+=Math.random()*s-.5*s:_%2?r+=.5*s:r-=.5*s,d&&(r>1?r=1:r<0&&(r=0)),h[u++]={x:i,y:r};for(h.sort(function(t,e){return t.x-e.x}),o=new p(1,1,null),_=f;--_>-1;)a=h[_],o=new p(a.x,a.y,o);this._prev=new p(0,0,0!==o.t?o:o.next)},!0)).prototype=new t).constructor=r,v.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&t<=e.t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},v.config=function(t){return new r(t)},r.ease=new r,c("Bounce",f("BounceOut",function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),f("BounceIn",function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),f("BounceInOut",function(t){var e=t<.5;return(t=e?1-2*t:2*t-1)<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),c("Circ",f("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),f("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),f("CircInOut",function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),c("Elastic",(n=function(e,i,r){var s=u("easing."+e,function(t,e){this._p1=t>=1?t:1,this._p2=(e||r)/(t<1?t:1),this._p3=this._p2/l*(Math.asin(1/this._p1)||0),this._p2=l/this._p2},!0),n=s.prototype=new t;return n.constructor=s,n.getRatio=i,n.config=function(t,e){return new s(t,e)},s})("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*this._p2)+1},.3),n("ElasticIn",function(t){return-this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)},.3),n("ElasticInOut",function(t){return(t*=2)<1?this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*this._p2)*.5+1},.45)),c("Expo",f("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),f("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),f("ExpoInOut",function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),c("Sine",f("SineOut",function(t){return Math.sin(t*h)}),f("SineIn",function(t){return 1-Math.cos(t*h)}),f("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),u("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),_(a.SlowMo,"SlowMo","ease,"),_(r,"RoughEase","ease,"),_(e,"SteppedEase","ease,"),m},!0)}),s._gsDefine&&s._gsQueue.pop()(),function(i,s){"use strict";var n={},a=i.document,o=i.GreenSockGlobals=i.GreenSockGlobals||i;if(!o.TweenLite){var l,h,u,f,_,c,p,d=function(t){var e,i=t.split("."),r=o;for(e=0;e<i.length;e++)r[i[e]]=r=r[i[e]]||{};return r},m=d("com.greensock"),g=function(t){var e,i=[],r=t.length;for(e=0;e!==r;i.push(t[e++]));return i},v=function(){},y=(c=Object.prototype.toString,p=c.call([]),function(t){return null!=t&&(t instanceof Array||"object"==typeof t&&!!t.push&&c.call(t)===p)}),T={},x=function(i,s,a,l){this.sc=T[i]?T[i].sc:[],T[i]=this,this.gsClass=null,this.func=a;var h=[];this.check=function(u){for(var f,_,c,p,m=s.length,g=m;--m>-1;)(f=T[s[m]]||new x(s[m],[])).gsClass?(h[m]=f.gsClass,g--):u&&f.sc.push(this);if(0===g&&a){if(c=(_=("com.greensock."+i).split(".")).pop(),p=d(_.join("."))[c]=this.gsClass=a.apply(a,h),l)if(o[c]=n[c]=p,void 0!==t&&t.exports)if("TweenMax"===i)for(m in t.exports=n.TweenMax=p,n)p[m]=n[m];else n.TweenMax&&(n.TweenMax[c]=p);else void 0===(r=function(){return p}.apply(e,[]))||(t.exports=r);for(m=0;m<this.sc.length;m++)this.sc[m].check()}},this.check(!0)},w=i._gsDefine=function(t,e,i,r){return new x(t,e,i,r)},b=m._class=function(t,e,i){return e=e||function(){},w(t,[],function(){return e},i),e};w.globals=o;var P=[0,0,1,1],O=b("easing.Ease",function(t,e,i,r){this._func=t,this._type=i||0,this._power=r||0,this._params=e?P.concat(e):P},!0),k=O.map={},S=O.register=function(t,e,i,r){for(var s,n,a,o,l=e.split(","),h=l.length,u=(i||"easeIn,easeOut,easeInOut").split(",");--h>-1;)for(n=l[h],s=r?b("easing."+n,null,!0):m.easing[n]||{},a=u.length;--a>-1;)o=u[a],k[n+"."+o]=k[o+n]=s[o]=t.getRatio?t:t[o]||new t};for((u=O.prototype)._calcEnd=!1,u.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,r=1===e?1-t:2===e?t:t<.5?2*t:2*(1-t);return 1===i?r*=r:2===i?r*=r*r:3===i?r*=r*r*r:4===i&&(r*=r*r*r*r),1===e?1-r:2===e?r:t<.5?r/2:1-r/2},h=(l=["Linear","Quad","Cubic","Quart","Quint,Strong"]).length;--h>-1;)u=l[h]+",Power"+h,S(new O(null,null,1,h),u,"easeOut",!0),S(new O(null,null,2,h),u,"easeIn"+(0===h?",easeNone":"")),S(new O(null,null,3,h),u,"easeInOut");k.linear=m.easing.Linear.easeIn,k.swing=m.easing.Quad.easeInOut;var R=b("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});(u=R.prototype).addEventListener=function(t,e,i,r,s){s=s||0;var n,a,o=this._listeners[t],l=0;for(this!==f||_||f.wake(),null==o&&(this._listeners[t]=o=[]),a=o.length;--a>-1;)(n=o[a]).c===e&&n.s===i?o.splice(a,1):0===l&&n.pr<s&&(l=a+1);o.splice(l,0,{c:e,s:i,up:r,pr:s})},u.removeEventListener=function(t,e){var i,r=this._listeners[t];if(r)for(i=r.length;--i>-1;)if(r[i].c===e)return void r.splice(i,1)},u.dispatchEvent=function(t){var e,i,r,s=this._listeners[t];if(s)for((e=s.length)>1&&(s=s.slice(0)),i=this._eventTarget;--e>-1;)(r=s[e])&&(r.up?r.c.call(r.s||i,{type:t,target:i}):r.c.call(r.s||i))};var A=i.requestAnimationFrame,C=i.cancelAnimationFrame,M=Date.now||function(){return(new Date).getTime()},D=M();for(h=(l=["ms","moz","webkit","o"]).length;--h>-1&&!A;)A=i[l[h]+"RequestAnimationFrame"],C=i[l[h]+"CancelAnimationFrame"]||i[l[h]+"CancelRequestAnimationFrame"];b("Ticker",function(t,e){var i,r,s,n,o,l=this,h=M(),u=!(!1===e||!A)&&"auto",c=500,p=33,d=function(t){var e,a,u=M()-D;u>c&&(h+=u-p),D+=u,l.time=(D-h)/1e3,e=l.time-o,(!i||e>0||!0===t)&&(l.frame++,o+=e+(e>=n?.004:n-e),a=!0),!0!==t&&(s=r(d)),a&&l.dispatchEvent("tick")};R.call(l),l.time=l.frame=0,l.tick=function(){d(!0)},l.lagSmoothing=function(t,e){if(!arguments.length)return c<1e10;c=t||1e10,p=Math.min(e,c,0)},l.sleep=function(){null!=s&&(u&&C?C(s):clearTimeout(s),r=v,s=null,l===f&&(_=!1))},l.wake=function(t){null!==s?l.sleep():t?h+=-D+(D=M()):l.frame>10&&(D=M()-c+5),r=0===i?v:u&&A?A:function(t){return setTimeout(t,1e3*(o-l.time)+1|0)},l===f&&(_=!0),d(2)},l.fps=function(t){if(!arguments.length)return i;n=1/((i=t)||60),o=this.time+n,l.wake()},l.useRAF=function(t){if(!arguments.length)return u;l.sleep(),u=t,l.fps(i)},l.fps(t),setTimeout(function(){"auto"===u&&l.frame<5&&"hidden"!==(a||{}).visibilityState&&l.useRAF(!1)},1500)}),(u=m.Ticker.prototype=new m.events.EventDispatcher).constructor=m.Ticker;var E=b("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=!0===e.immediateRender,this.data=e.data,this._reversed=!0===e.reversed,K){_||f.wake();var i=this.vars.useFrames?Q:K;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});f=E.ticker=new m.Ticker,(u=E.prototype)._dirty=u._gc=u._initted=u._paused=!1,u._totalTime=u._time=0,u._rawPrevTime=-1,u._next=u._last=u._onUpdate=u._timeline=u.timeline=null,u._paused=!1;var F=function(){_&&M()-D>2e3&&("hidden"!==(a||{}).visibilityState||!f.lagSmoothing())&&f.wake();var t=setTimeout(F,2e3);t.unref&&t.unref()};F(),u.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},u.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},u.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},u.seek=function(t,e){return this.totalTime(Number(t),!1!==e)},u.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,!1!==e,!0)},u.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},u.render=function(t,e,i){},u.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,!this._gc&&this.timeline||this._enabled(!0),this},u.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime(!0))>=i&&t<i+this.totalDuration()/this._timeScale-1e-7},u._enabled=function(t,e){return _||f.wake(),this._gc=!t,this._active=this.isActive(),!0!==e&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},u._kill=function(t,e){return this._enabled(!1,!1)},u.kill=function(t,e){return this._kill(t,e),this},u._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},u._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();--e>-1;)"{self}"===t[e]&&(i[e]=this);return i},u._callback=function(t){var e=this.vars,i=e[t],r=e[t+"Params"],s=e[t+"Scope"]||e.callbackScope||this;switch(r?r.length:0){case 0:i.call(s);break;case 1:i.call(s,r[0]);break;case 2:i.call(s,r[0],r[1]);break;default:i.apply(s,r)}},u.eventCallback=function(t,e,i,r){if("on"===(t||"").substr(0,2)){var s=this.vars;if(1===arguments.length)return s[t];null==e?delete s[t]:(s[t]=e,s[t+"Params"]=y(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,s[t+"Scope"]=r),"onUpdate"===t&&(this._onUpdate=e)}return this},u.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},u.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==t&&this.totalTime(this._totalTime*(t/this._duration),!0),this):(this._dirty=!1,this._duration)},u.totalDuration=function(t){return this._dirty=!1,arguments.length?this.duration(t):this._totalDuration},u.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(t>this._duration?this._duration:t,e)):this._time},u.totalTime=function(t,e,i){if(_||f.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(t<0&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var r=this._totalDuration,s=this._timeline;if(t>r&&!i&&(t=r),this._startTime=(this._paused?this._pauseTime:s._time)-(this._reversed?r-t:t)/this._timeScale,s._dirty||this._uncache(!1),s._timeline)for(;s._timeline;)s._timeline._time!==(s._startTime+s._totalTime)/s._timeScale&&s.totalTime(s._totalTime,!0),s=s._timeline}this._gc&&this._enabled(!0,!1),this._totalTime===t&&0!==this._duration||(j.length&&tt(),this.render(t,e,!1),j.length&&tt())}return this},u.progress=u.totalProgress=function(t,e){var i=this.duration();return arguments.length?this.totalTime(i*t,e):i?this._time/i:this.ratio},u.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},u.endTime=function(t){return this._startTime+(0!=t?this.totalDuration():this.duration())/this._timeScale},u.timeScale=function(t){if(!arguments.length)return this._timeScale;var e,i;for(t=t||1e-10,this._timeline&&this._timeline.smoothChildTiming&&(i=(e=this._pauseTime)||0===e?e:this._timeline.totalTime(),this._startTime=i-(i-this._startTime)*this._timeScale/t),this._timeScale=t,i=this.timeline;i&&i.timeline;)i._dirty=!0,i.totalDuration(),i=i.timeline;return this},u.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},u.paused=function(t){if(!arguments.length)return this._paused;var e,i,r=this._timeline;return t!=this._paused&&r&&(_||t||f.wake(),i=(e=r.rawTime())-this._pauseTime,!t&&r.smoothChildTiming&&(this._startTime+=i,this._uncache(!1)),this._pauseTime=t?e:null,this._paused=t,this._active=this.isActive(),!t&&0!==i&&this._initted&&this.duration()&&(e=r.smoothChildTiming?this._totalTime:(e-this._startTime)/this._timeScale,this.render(e,e===this._totalTime,!0))),this._gc&&!t&&this._enabled(!0,!1),this};var z=b("core.SimpleTimeline",function(t){E.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});(u=z.prototype=new E).constructor=z,u.kill()._gc=!1,u._first=u._last=u._recent=null,u._sortChildren=!1,u.add=u.insert=function(t,e,i,r){var s,n;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=t._startTime+(this.rawTime()-t._startTime)/t._timeScale),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),s=this._last,this._sortChildren)for(n=t._startTime;s&&s._startTime>n;)s=s._prev;return s?(t._next=s._next,s._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=s,this._recent=t,this._timeline&&this._uncache(!0),this},u._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,t===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},u.render=function(t,e,i){var r,s=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;s;)r=s._next,(s._active||t>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=r},u.rawTime=function(){return _||f.wake(),this._totalTime};var I=b("TweenLite",function(t,e,r){if(E.call(this,e,r),this.render=I.prototype.render,null==t)throw"Cannot tween a null target.";this.target=t="string"!=typeof t?t:I.selector(t)||t;var s,n,a,o=t.jquery||t.length&&t!==i&&t[0]&&(t[0]===i||t[0].nodeType&&t[0].style&&!t.nodeType),l=this.vars.overwrite;if(this._overwrite=l=null==l?$[I.defaultOverwrite]:"number"==typeof l?l>>0:$[l],(o||t instanceof Array||t.push&&y(t))&&"number"!=typeof t[0])for(this._targets=a=g(t),this._propLookup=[],this._siblings=[],s=0;s<a.length;s++)(n=a[s])?"string"!=typeof n?n.length&&n!==i&&n[0]&&(n[0]===i||n[0].nodeType&&n[0].style&&!n.nodeType)?(a.splice(s--,1),this._targets=a=a.concat(g(n))):(this._siblings[s]=et(n,this,!1),1===l&&this._siblings[s].length>1&&rt(n,this,null,1,this._siblings[s])):"string"==typeof(n=a[s--]=I.selector(n))&&a.splice(s+1,1):a.splice(s--,1);else this._propLookup={},this._siblings=et(t,this,!1),1===l&&this._siblings.length>1&&rt(t,this,null,1,this._siblings);(this.vars.immediateRender||0===e&&0===this._delay&&!1!==this.vars.immediateRender)&&(this._time=-1e-10,this.render(Math.min(0,-this._delay)))},!0),L=function(t){return t&&t.length&&t!==i&&t[0]&&(t[0]===i||t[0].nodeType&&t[0].style&&!t.nodeType)};(u=I.prototype=new E).constructor=I,u.kill()._gc=!1,u.ratio=0,u._firstPT=u._targets=u._overwrittenProps=u._startAt=null,u._notifyPluginsOfEnabled=u._lazy=!1,I.version="1.20.4",I.defaultEase=u._ease=new O(null,null,1,1),I.defaultOverwrite="auto",I.ticker=f,I.autoSleep=120,I.lagSmoothing=function(t,e){f.lagSmoothing(t,e)},I.selector=i.$||i.jQuery||function(t){var e=i.$||i.jQuery;return e?(I.selector=e,e(t)):void 0===a?t:a.querySelectorAll?a.querySelectorAll(t):a.getElementById("#"===t.charAt(0)?t.substr(1):t)};var j=[],N={},X=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,B=/[\+-]=-?[\.\d]/,Y=function(t){for(var e,i=this._firstPT;i;)e=i.blob?1===t&&null!=this.end?this.end:t?this.join(""):this.start:i.c*t+i.s,i.m?e=i.m(e,this._target||i.t):e<1e-6&&e>-1e-6&&!i.blob&&(e=0),i.f?i.fp?i.t[i.p](i.fp,e):i.t[i.p](e):i.t[i.p]=e,i=i._next},V=function(t,e,i,r){var s,n,a,o,l,h,u,f=[],_=0,c="",p=0;for(f.start=t,f.end=e,t=f[0]=t+"",e=f[1]=e+"",i&&(i(f),t=f[0],e=f[1]),f.length=0,s=t.match(X)||[],n=e.match(X)||[],r&&(r._next=null,r.blob=1,f._firstPT=f._applyPT=r),l=n.length,o=0;o<l;o++)u=n[o],c+=(h=e.substr(_,e.indexOf(u,_)-_))||!o?h:",",_+=h.length,p?p=(p+1)%5:"rgba("===h.substr(-5)&&(p=1),u===s[o]||s.length<=o?c+=u:(c&&(f.push(c),c=""),a=parseFloat(s[o]),f.push(a),f._firstPT={_next:f._firstPT,t:f,p:f.length-1,s:a,c:("="===u.charAt(1)?parseInt(u.charAt(0)+"1",10)*parseFloat(u.substr(2)):parseFloat(u)-a)||0,f:0,m:p&&p<4?Math.round:0}),_+=u.length;return(c+=e.substr(_))&&f.push(c),f.setRatio=Y,B.test(e)&&(f.end=null),f},U=function(t,e,i,r,s,n,a,o,l){"function"==typeof r&&(r=r(l||0,t));var h=typeof t[e],u="function"!==h?"":e.indexOf("set")||"function"!=typeof t["get"+e.substr(3)]?e:"get"+e.substr(3),f="get"!==i?i:u?a?t[u](a):t[u]():t[e],_="string"==typeof r&&"="===r.charAt(1),c={t:t,p:e,s:f,f:"function"===h,pg:0,n:s||e,m:n?"function"==typeof n?n:Math.round:0,pr:0,c:_?parseInt(r.charAt(0)+"1",10)*parseFloat(r.substr(2)):parseFloat(r)-f||0};if(("number"!=typeof f||"number"!=typeof r&&!_)&&(a||isNaN(f)||!_&&isNaN(r)||"boolean"==typeof f||"boolean"==typeof r?(c.fp=a,c={t:V(f,_?parseFloat(c.s)+c.c+(c.s+"").replace(/[0-9\-\.]/g,""):r,o||I.defaultStringFilter,c),p:"setRatio",s:0,c:1,f:2,pg:0,n:s||e,pr:0,m:0}):(c.s=parseFloat(f),_||(c.c=parseFloat(r)-c.s||0))),c.c)return(c._next=this._firstPT)&&(c._next._prev=c),this._firstPT=c,c},q=I._internals={isArray:y,isSelector:L,lazyTweens:j,blobDif:V},G=I._plugins={},W=q.tweenLookup={},Z=0,H=q.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1},$={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,true:1,false:0},Q=E._rootFramesTimeline=new z,K=E._rootTimeline=new z,J=30,tt=q.lazyRender=function(){var t,e=j.length;for(N={};--e>-1;)(t=j[e])&&!1!==t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0),t._lazy=!1);j.length=0};K._startTime=f.time,Q._startTime=f.frame,K._active=Q._active=!0,setTimeout(tt,1),E._updateRoot=I.render=function(){var t,e,i;if(j.length&&tt(),K.render((f.time-K._startTime)*K._timeScale,!1,!1),Q.render((f.frame-Q._startTime)*Q._timeScale,!1,!1),j.length&&tt(),f.frame>=J){for(i in J=f.frame+(parseInt(I.autoSleep,10)||120),W){for(t=(e=W[i].tweens).length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete W[i]}if((!(i=K._first)||i._paused)&&I.autoSleep&&!Q._first&&1===f._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||f.sleep()}}},f.addEventListener("tick",E._updateRoot);var et=function(t,e,i){var r,s,n=t._gsTweenID;if(W[n||(t._gsTweenID=n="t"+Z++)]||(W[n]={target:t,tweens:[]}),e&&((r=W[n].tweens)[s=r.length]=e,i))for(;--s>-1;)r[s]===e&&r.splice(s,1);return W[n].tweens},it=function(t,e,i,r){var s,n,a=t.vars.onOverwrite;return a&&(s=a(t,e,i,r)),(a=I.onOverwrite)&&(n=a(t,e,i,r)),!1!==s&&!1!==n},rt=function(t,e,i,r,s){var n,a,o,l;if(1===r||r>=4){for(l=s.length,n=0;n<l;n++)if((o=s[n])!==e)o._gc||o._kill(null,t,e)&&(a=!0);else if(5===r)break;return a}var h,u=e._startTime+1e-10,f=[],_=0,c=0===e._duration;for(n=s.length;--n>-1;)(o=s[n])===e||o._gc||o._paused||(o._timeline!==e._timeline?(h=h||st(e,0,c),0===st(o,h,c)&&(f[_++]=o)):o._startTime<=u&&o._startTime+o.totalDuration()/o._timeScale>u&&((c||!o._initted)&&u-o._startTime<=2e-10||(f[_++]=o)));for(n=_;--n>-1;)if(o=f[n],2===r&&o._kill(i,t,e)&&(a=!0),2!==r||!o._firstPT&&o._initted){if(2!==r&&!it(o,e))continue;o._enabled(!1,!1)&&(a=!0)}return a},st=function(t,e,i){for(var r=t._timeline,s=r._timeScale,n=t._startTime;r._timeline;){if(n+=r._startTime,s*=r._timeScale,r._paused)return-100;r=r._timeline}return(n/=s)>e?n-e:i&&n===e||!t._initted&&n-e<2e-10?1e-10:(n+=t.totalDuration()/t._timeScale/s)>e+1e-10?0:n-e-1e-10};u._init=function(){var t,e,i,r,s,n,a=this.vars,o=this._overwrittenProps,l=this._duration,h=!!a.immediateRender,u=a.ease;if(a.startAt){for(r in this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),s={},a.startAt)s[r]=a.startAt[r];if(s.data="isStart",s.overwrite=!1,s.immediateRender=!0,s.lazy=h&&!1!==a.lazy,s.startAt=s.delay=null,s.onUpdate=a.onUpdate,s.onUpdateParams=a.onUpdateParams,s.onUpdateScope=a.onUpdateScope||a.callbackScope||this,this._startAt=I.to(this.target,0,s),h)if(this._time>0)this._startAt=null;else if(0!==l)return}else if(a.runBackwards&&0!==l)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{for(r in 0!==this._time&&(h=!1),i={},a)H[r]&&"autoCSS"!==r||(i[r]=a[r]);if(i.overwrite=0,i.data="isFromStart",i.lazy=h&&!1!==a.lazy,i.immediateRender=h,this._startAt=I.to(this.target,0,i),h){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=u=u?u instanceof O?u:"function"==typeof u?new O(u,a.easeParams):k[u]||I.defaultEase:I.defaultEase,a.easeParams instanceof Array&&u.config&&(this._ease=u.config.apply(u,a.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(n=this._targets.length,t=0;t<n;t++)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],o?o[t]:null,t)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,o,0);if(e&&I._onPluginEvent("_onInitAllProps",this),o&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),a.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=a.onUpdate,this._initted=!0},u._initProps=function(t,e,r,s,n){var a,o,l,h,u,f;if(null==t)return!1;for(a in N[t._gsTweenID]&&tt(),this.vars.css||t.style&&t!==i&&t.nodeType&&G.css&&!1!==this.vars.autoCSS&&function(t,e){var i,r={};for(i in t)H[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!G[i]||G[i]&&G[i]._autoCSS)||(r[i]=t[i],delete t[i]);t.css=r}(this.vars,t),this.vars)if(f=this.vars[a],H[a])f&&(f instanceof Array||f.push&&y(f))&&-1!==f.join("").indexOf("{self}")&&(this.vars[a]=f=this._swapSelfInParams(f,this));else if(G[a]&&(h=new G[a])._onInitTween(t,this.vars[a],this,n)){for(this._firstPT=u={_next:this._firstPT,t:h,p:"setRatio",s:0,c:1,f:1,n:a,pg:1,pr:h._priority,m:0},o=h._overwriteProps.length;--o>-1;)e[h._overwriteProps[o]]=this._firstPT;(h._priority||h._onInitAllProps)&&(l=!0),(h._onDisable||h._onEnable)&&(this._notifyPluginsOfEnabled=!0),u._next&&(u._next._prev=u)}else e[a]=U.call(this,t,a,"get",f,a,0,null,this.vars.stringFilter,n);return s&&this._kill(s,t)?this._initProps(t,e,r,s,n):this._overwrite>1&&this._firstPT&&r.length>1&&rt(t,this,e,this._overwrite,r)?(this._kill(e,t),this._initProps(t,e,r,s,n)):(this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration)&&(N[t._gsTweenID]=!0),l)},u.render=function(t,e,i){var r,s,n,a,o=this._time,l=this._duration,h=this._rawPrevTime;if(t>=l-1e-7&&t>=0)this._totalTime=this._time=l,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(r=!0,s="onComplete",i=i||this._timeline.autoRemoveChildren),0===l&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(h<0||t<=0&&t>=-1e-7||1e-10===h&&"isPause"!==this.data)&&h!==t&&(i=!0,h>1e-10&&(s="onReverseComplete")),this._rawPrevTime=a=!e||t||h===t?t:1e-10);else if(t<1e-7)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===l&&h>0)&&(s="onReverseComplete",r=this._reversed),t<0&&(this._active=!1,0===l&&(this._initted||!this.vars.lazy||i)&&(h>=0&&(1e-10!==h||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=a=!e||t||h===t?t:1e-10)),(!this._initted||this._startAt&&this._startAt.progress())&&(i=!0);else if(this._totalTime=this._time=t,this._easeType){var u=t/l,f=this._easeType,_=this._easePower;(1===f||3===f&&u>=.5)&&(u=1-u),3===f&&(u*=2),1===_?u*=u:2===_?u*=u*u:3===_?u*=u*u*u:4===_&&(u*=u*u*u*u),this.ratio=1===f?1-u:2===f?u:t/l<.5?u/2:1-u/2}else this.ratio=this._ease.getRatio(t/l);if(this._time!==o||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(!1!==this.vars.lazy&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=h,j.push(this),void(this._lazy=[t,e]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/l):r&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(!1!==this._lazy&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&t>=0&&(this._active=!0),0===o&&(this._startAt&&(t>=0?this._startAt.render(t,!0,i):s||(s="_dummyGS")),this.vars.onStart&&(0===this._time&&0!==l||e||this._callback("onStart"))),n=this._firstPT;n;)n.f?n.t[n.p](n.c*this.ratio+n.s):n.t[n.p]=n.c*this.ratio+n.s,n=n._next;this._onUpdate&&(t<0&&this._startAt&&-1e-4!==t&&this._startAt.render(t,!0,i),e||(this._time!==o||r||i)&&this._callback("onUpdate")),s&&(this._gc&&!i||(t<0&&this._startAt&&!this._onUpdate&&-1e-4!==t&&this._startAt.render(t,!0,i),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[s]&&this._callback(s),0===l&&1e-10===this._rawPrevTime&&1e-10!==a&&(this._rawPrevTime=0)))}},u._kill=function(t,e,i){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:I.selector(e)||e;var r,s,n,a,o,l,h,u,f,_=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((y(e)||L(e))&&"number"!=typeof e[0])for(r=e.length;--r>-1;)this._kill(t,e[r],i)&&(l=!0);else{if(this._targets){for(r=this._targets.length;--r>-1;)if(e===this._targets[r]){o=this._propLookup[r]||{},this._overwrittenProps=this._overwrittenProps||[],s=this._overwrittenProps[r]=t?this._overwrittenProps[r]||{}:"all";break}}else{if(e!==this.target)return!1;o=this._propLookup,s=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(o){if(h=t||o,u=t!==s&&"all"!==s&&t!==o&&("object"!=typeof t||!t._tempKill),i&&(I.onOverwrite||this.vars.onOverwrite)){for(n in h)o[n]&&(f||(f=[]),f.push(n));if((f||!t)&&!it(this,i,e,f))return!1}for(n in h)(a=o[n])&&(_&&(a.f?a.t[a.p](a.s):a.t[a.p]=a.s,l=!0),a.pg&&a.t._kill(h)&&(l=!0),a.pg&&0!==a.t._overwriteProps.length||(a._prev?a._prev._next=a._next:a===this._firstPT&&(this._firstPT=a._next),a._next&&(a._next._prev=a._prev),a._next=a._prev=null),delete o[n]),u&&(s[n]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return l},u.invalidate=function(){return this._notifyPluginsOfEnabled&&I._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],E.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-1e-10,this.render(Math.min(0,-this._delay))),this},u._enabled=function(t,e){if(_||f.wake(),t&&this._gc){var i,r=this._targets;if(r)for(i=r.length;--i>-1;)this._siblings[i]=et(r[i],this,!0);else this._siblings=et(this.target,this,!0)}return E.prototype._enabled.call(this,t,e),!(!this._notifyPluginsOfEnabled||!this._firstPT)&&I._onPluginEvent(t?"_onEnable":"_onDisable",this)},I.to=function(t,e,i){return new I(t,e,i)},I.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new I(t,e,i)},I.fromTo=function(t,e,i,r){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,new I(t,e,r)},I.delayedCall=function(t,e,i,r,s){return new I(e,0,{delay:t,onComplete:e,onCompleteParams:i,callbackScope:r,onReverseComplete:e,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:s,overwrite:0})},I.set=function(t,e){return new I(t,0,e)},I.getTweensOf=function(t,e){if(null==t)return[];var i,r,s,n;if(t="string"!=typeof t?t:I.selector(t)||t,(y(t)||L(t))&&"number"!=typeof t[0]){for(i=t.length,r=[];--i>-1;)r=r.concat(I.getTweensOf(t[i],e));for(i=r.length;--i>-1;)for(n=r[i],s=i;--s>-1;)n===r[s]&&r.splice(i,1)}else if(t._gsTweenID)for(i=(r=et(t).concat()).length;--i>-1;)(r[i]._gc||e&&!r[i].isActive())&&r.splice(i,1);return r||[]},I.killTweensOf=I.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var r=I.getTweensOf(t,e),s=r.length;--s>-1;)r[s]._kill(i,t)};var nt=b("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=nt.prototype},!0);if(u=nt.prototype,nt.version="1.19.0",nt.API=2,u._firstPT=null,u._addTween=U,u.setRatio=Y,u._kill=function(t){var e,i=this._overwriteProps,r=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;--e>-1;)null!=t[i[e]]&&i.splice(e,1);for(;r;)null!=t[r.n]&&(r._next&&(r._next._prev=r._prev),r._prev?(r._prev._next=r._next,r._prev=null):this._firstPT===r&&(this._firstPT=r._next)),r=r._next;return!1},u._mod=u._roundProps=function(t){for(var e,i=this._firstPT;i;)(e=t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&"function"==typeof e&&(2===i.f?i.t._applyPT.m=e:i.m=e),i=i._next},I._onPluginEvent=function(t,e){var i,r,s,n,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,r=s;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:n)?o._prev._next=o:s=o,(o._next=r)?r._prev=o:n=o,o=a}o=e._firstPT=s}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},nt.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===nt.API&&(G[(new t[e])._propName]=t[e]);return!0},w.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,r=t.priority||0,s=t.overwriteProps,n={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},a=b("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){nt.call(this,i,r),this._overwriteProps=s||[]},!0===t.global),o=a.prototype=new nt(i);for(e in o.constructor=a,a.API=t.API,n)"function"==typeof t[e]&&(o[n[e]]=t[e]);return a.version=t.version,nt.activate([a]),a},l=i._gsQueue){for(h=0;h<l.length;h++)l[h]();for(u in T)T[u].func||i.console.log("GSAP encountered missing dependency: "+u)}_=!1}}(void 0!==t&&t.exports&&void 0!==i?i:this||window)}).call(this,i(1))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,s=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),a=(r=n)&&r.__esModule?r:{default:r},o=i(2);var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Transition),s(e,[{key:"in",value:function(t,e){o.TweenMax.fromTo(t,1,{alpha:0},{alpha:1,onComplete:e})}},{key:"out",value:function(t,e){o.TweenMax.fromTo(t,1,{alpha:1},{alpha:0,onComplete:e})}}]),e}();e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,s=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),a=(r=n)&&r.__esModule?r:{default:r};var o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Renderer),s(e,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),e}();e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,s=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(0),a=(r=n)&&r.__esModule?r:{default:r};var o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Renderer),s(e,[{key:"onEnter",value:function(){}},{key:"onLeave",value:function(){}},{key:"onEnterCompleted",value:function(){}},{key:"onLeaveCompleted",value:function(){}}]),e}();e.default=o},function(t,e,i){"use strict";var r=o(i(0)),s=o(i(5)),n=o(i(4)),a=o(i(3));function o(t){return t&&t.__esModule?t:{default:t}}new r.default.Core({renderers:{home:s.default,page:n.default},transitions:{home:a.default,page:a.default}})}]); \ No newline at end of file diff --git a/examples/basic-transition/package.json b/examples/basic-transition/package.json index 97a1d4b..36e3a90 100644 --- a/examples/basic-transition/package.json +++ b/examples/basic-transition/package.json @@ -1,7 +1,7 @@ { "name": "@dogstudio/highway", "license": "MIT", - "version": "1.0.1", + "version": "1.1.0", "main": "dist/index.js", "scripts": { "build": "webpack", @@ -16,7 +16,7 @@ "webpack-cli": "^2.0.12" }, "dependencies": { - "@dogstudio/highway": "^1.0.1", + "@dogstudio/highway": "^1.1.0", "gsap": "^1.20.4" } } diff --git a/examples/basic-transition/yarn.lock b/examples/basic-transition/yarn.lock index ae9b2cf..89d74d5 100644 --- a/examples/basic-transition/yarn.lock +++ b/examples/basic-transition/yarn.lock @@ -2,9 +2,9 @@ # yarn lockfile v1 -"@dogstudio/highway@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@dogstudio/highway/-/highway-1.0.1.tgz#1d38da001396363b2502b3c38a61ba2c13921131" +"@dogstudio/highway@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@dogstudio/highway/-/highway-1.1.0.tgz#f6282309ec9e9a8529b03b72e2a8d308e8dce44d" "@sindresorhus/is@^0.7.0": version "0.7.0" diff --git a/package.json b/package.json index 56e5ddd..8ea6d01 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@dogstudio/highway", "license": "MIT", - "version": "1.0.1", + "version": "1.1.0", "description": "Highway helps you manage your page transitions", "main": "dist/highway.js", "unpkg": "dist/highway.min.js", diff --git a/src/core.js b/src/core.js index 47ea202..cd5a77b 100644 --- a/src/core.js +++ b/src/core.js @@ -37,6 +37,7 @@ class HighwayCore extends Emitter { this.transitions = opts.transitions; // Some usefull stuffs for later + this.mode = opts.mode || 'out-in'; this.state = {}; this.cache = {}; this.navigating = false; @@ -217,11 +218,13 @@ class HighwayCore extends Emitter { this.emit('NAVIGATE_START', from, to, title, this.state); - // We hide the page we come `from` and since the `hide` method returns a - // Promise because come transition might occur we need to wait for the - // Promise resolution before calling the `show` method of the page we go `to`. - this.from.hide().then(() => { - this.to.show().then(() => { + // We select the right method based on the mode provided in the options. + // If no mode is provided then the `out-in` method is chosen. + const method = Helpers.camelize(this.mode); + + if (typeof this[method] === 'function') { + // Now we call the pipeline! + this[method]().then(() => { this.navigating = false; // We prepare the next navigation by replacing the `from` renderer by @@ -239,7 +242,48 @@ class HighwayCore extends Emitter { // Same as the `NAVIGATE_START` event this.emit('NAVIGATE_END', from, to, title, this.state); }); + } + } + + /** + * Run `out` transition then `in` transition + * + * @return {Promise} `out-in` Promise + */ + outIn() { + // Call `out` transition + return this.from.hide().then(() => { + // Reset scroll position + window.scrollTo(0, 0); + }).then(() => { + // Call `in` transition + this.to.show(); + }); + } + /** + * Run `in` transition then `out` transition + * + * @return {Promise} `in-out` Promise + */ + inOut() { + // Call the `in` transition + return this.to.show().then(() => { + // Reset scroll position + window.scrollTo(0, 0); + }).then(() => { + // Call the `out` transition + this.from.hide(); + }); + } + + /** + * Run both `in` and `out` transition at the same time. + * + * @return {Promise} `both` Promise + */ + both() { + return Promise.all([this.to.show(), this.from.hide()]).then(() => { // Reset scroll position window.scrollTo(0, 0); }); diff --git a/src/helpers.js b/src/helpers.js index 3c38a66..2a2f334 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -7,6 +7,7 @@ const PARAM_REGEX = /\?([\w_\-.=&]+)/; const ANCHOR_REGEX = /(#.*)$/; const ORIGIN_REGEX = /(https?:\/\/[\w\-.]+)/; const PATHNAME_REGEX = /https?:\/\/.*?(\/[\w_\-./]+)/; +const CAMELCASE_REGEX = /[-_](\w)/g; /** * Get origin of an URL @@ -173,6 +174,18 @@ function getTransition(page, transitions) { return transitions[slug]; } +/** + * Converts string to camelCase + * + * @arg {String} string - String to parse + * @return {String} Parsed string + */ +function camelize(string) { + return string.replace(CAMELCASE_REGEX, (_, c) => { + return c ? c.toUpperCase() : ''; + }); +} + /** * Export all helpers */ @@ -187,5 +200,6 @@ module.exports = { getAnchor, getPathname, getRenderer, - getTransition + getTransition, + camelize }; diff --git a/test/index.js b/test/index.js index 15836f2..0020c74 100644 --- a/test/index.js +++ b/test/index.js @@ -129,4 +129,22 @@ describe('Helpers', () => { expect(Helpers.getTitle(html)).to.be.empty; }); }); + + describe('Helpers.camelize', () => { + it('Should return the `outIn` from `out-int`', () => { + // String to camelize + const string = 'out-in'; + + // Assertion + expect(Helpers.camelize(string)).to.be.equal('outIn'); + }); + + it('Should return the `both` from `both`', () => { + // String to camelize + const string = 'both'; + + // Assertion + expect(Helpers.camelize(string)).to.be.equal('both'); + }); + }); });