futuro 1.0.9 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/html/assign/page.liquid +2 -1
  3. data/_includes/html/assign/site.liquid +30 -21
  4. data/_includes/html/layout/footer.liquid +5 -1
  5. data/_includes/html/overlay/browse/page.liquid +1 -1
  6. data/_includes/html/page/content/loop/screen/header.liquid +45 -2
  7. data/_includes/html/page/header.liquid +1 -2
  8. data/_includes/html/page/layout/home.liquid +17 -7
  9. data/_includes/html/page/topbar.liquid +28 -17
  10. data/_includes/html/page/topbar/navigation/link.liquid +22 -0
  11. data/_includes/svg/site/icon.liquid +39 -19
  12. data/_sass/area/topbar.scss +1 -1
  13. data/_sass/block/chart.scss +2 -1
  14. data/_sass/block/form/screen.scss +62 -29
  15. data/_sass/block/util.scss +3 -0
  16. data/_sass/futuro.core.scss +2 -0
  17. data/_sass/helpers/extends.scss +0 -17
  18. data/_sass/helpers/mixins/layout.scss +0 -1
  19. data/_sass/helpers/mixins/theme.scss +1 -3
  20. data/_sass/helpers/themes.scss +14 -13
  21. data/_sass/helpers/variables.scss +24 -244
  22. data/_sass/helpers/variables/colors.scss +290 -0
  23. data/_sass/link/book.scss +8 -6
  24. data/_sass/link/navigation.scss +11 -7
  25. data/_sass/title/book.scss +9 -0
  26. data/_sass/title/page.scss +2 -0
  27. data/_sass/title/type.scss +1 -0
  28. data/assets/js/footer/custom/1_Settings.js +5 -7
  29. data/assets/js/footer/custom/2_Check.width.js +5 -28
  30. data/assets/js/footer/custom/4_Setup.home.js +3 -1
  31. data/assets/js/footer/custom/4_Setup.overlays.js +35 -46
  32. data/assets/js/footer/custom/4_Start.browse.js +3 -67
  33. data/assets/js/footer/custom/5_Util.share.js +0 -75
  34. data/assets/js/footer/custom/5_WhatsOn.js +7 -7
  35. data/assets/js/footer/custom/5_respond.scroller.js +11 -0
  36. data/assets/js/footer/vendor/futuro/browsr.js +324 -0
  37. data/assets/js/footer/vendor/futuro/checkr.js +41 -0
  38. data/assets/js/footer/vendor/futuro/ovrly.js +102 -0
  39. data/assets/js/footer/vendor/{gsap-draw.js → gsap/draw.js} +0 -0
  40. data/assets/js/footer/vendor/{gsap-morph.js → gsap/morph.js} +0 -0
  41. data/assets/js/footer/vendor/{gsap-scramble.js → gsap/scramble.js} +0 -0
  42. data/assets/js/footer/vendor/gsap/scroll.js +11 -0
  43. data/assets/js/footer/vendor/{gsap-text.js → gsap/text.js} +0 -0
  44. data/assets/js/footer/vendor/{jquery.min.js → jquery.js} +0 -0
  45. data/assets/js/footer/vendor/{parsley.min.js → parsley.js} +0 -0
  46. data/assets/js/futuro.footer.custom.js +1 -1
  47. data/assets/js/futuro.footer.vendor.js +481 -314
  48. data/assets/js/futuro.header.legacy.js +4 -3
  49. data/assets/js/futuro.header.legacy.shopify.js +4 -3
  50. data/assets/js/futuro.header.vendor.js +4 -3
  51. data/assets/js/header/vendor/gsap.js +4 -3
  52. metadata +16 -15
  53. data/_includes/svg/site/book/orwell.svg +0 -1
  54. data/_includes/svg/site/book/woolf.svg +0 -1
  55. data/assets/js/footer/custom/3_Setup.browse.js +0 -298
  56. data/assets/js/footer/custom/5_Animate.scroller.js +0 -16
  57. data/assets/js/footer/custom/5_Respond.browse.js +0 -42
  58. data/assets/js/footer/vendor/scrollmagic-gsap.js +0 -310
  59. data/assets/js/footer/vendor/scrollmagic.js +0 -3
@@ -1,16 +0,0 @@
1
-
2
- $(Site.scroller).map((_index,value) => {
3
-
4
- let label = $(value)[0].classList[2],
5
- scene = new ScrollMagic
6
- .Scene({
7
- triggerElement : `.block.stop#${label}`
8
- })
9
- .setTween(value,0.1,{
10
- opacity : 1
11
- })
12
- .addTo(controller);
13
-
14
- return scene;
15
-
16
- });
@@ -1,42 +0,0 @@
1
-
2
- Respond.browse = () => {
3
-
4
- Browse.book.links.hover(function() {
5
-
6
- Browse.book.links.respond(this);
7
-
8
- Browse.chapter.books.map((index,value)=>{
9
-
10
- Browse.chapter.books.respond(value);
11
-
12
- });
13
-
14
- Browse.page.books.map((index,value)=>{
15
-
16
- Browse.page.books.respond(value);
17
-
18
- });
19
-
20
- });
21
-
22
- Browse.chapter.links.hover(function() {
23
-
24
- Browse.chapter.links.respond(this);
25
-
26
- Browse.page.chapters.map((index,value)=>{
27
-
28
- Browse.page.chapters.respond(value);
29
-
30
- });
31
-
32
- });
33
-
34
- Browse.page.links.hover(function() {
35
-
36
- Browse.page.links.respond(this);
37
-
38
- });
39
-
40
- }
41
-
42
- if (!Site.isTheme) { if (!Body.isHome) { if (Browse.able) { Respond.browse(); } } }
@@ -1,310 +0,0 @@
1
- /*!
2
- * ScrollMagic v2.0.5 (2015-04-29)
3
- * The javascript library for magical scroll interactions.
4
- * (c) 2015 Jan Paepke (@janpaepke)
5
- * Project Website: http://scrollmagic.io
6
- *
7
- * @version 2.0.5
8
- * @license Dual licensed under MIT license and GPL.
9
- * @author Jan Paepke - e-mail@janpaepke.de
10
- *
11
- * @file ScrollMagic GSAP Animation Plugin.
12
- *
13
- * requires: GSAP ~1.14
14
- * Powered by the Greensock Animation Platform (GSAP): http://www.greensock.com/js
15
- * Greensock License info at http://www.greensock.com/licensing/
16
- */
17
- /**
18
- * This plugin is meant to be used in conjunction with the Greensock Animation Plattform.
19
- * It offers an easy API to trigger Tweens or synchronize them to the scrollbar movement.
20
- *
21
- * Both the `lite` and the `max` versions of the GSAP library are supported.
22
- * The most basic requirement is `TweenLite`.
23
- *
24
- * To have access to this extension, please include `plugins/animation.gsap.js`.
25
- * @requires {@link http://greensock.com/gsap|GSAP ~1.14.x}
26
- * @mixin animation.GSAP
27
- */
28
- (function (root, factory) {
29
- if (typeof define === 'function' && define.amd) {
30
- // AMD. Register as an anonymous module.
31
- define(['ScrollMagic', 'TweenMax', 'TimelineMax'], factory);
32
- } else if (typeof exports === 'object') {
33
- // CommonJS
34
- // Loads whole gsap package onto global scope.
35
- require('gsap');
36
- factory(require('scrollmagic'), TweenMax, TimelineMax);
37
- } else {
38
- // Browser globals
39
- factory(root.ScrollMagic || (root.jQuery && root.jQuery.ScrollMagic), root.TweenMax || root.TweenLite, root.TimelineMax || root.TimelineLite);
40
- }
41
- }(this, function (ScrollMagic, Tween, Timeline) {
42
- "use strict";
43
- var NAMESPACE = "animation.gsap";
44
-
45
- var
46
- console = window.console || {},
47
- err = Function.prototype.bind.call(console.error || console.log ||
48
- function () {}, console);
49
- if (!ScrollMagic) {
50
- err("(" + NAMESPACE + ") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs.");
51
- }
52
- if (!Tween) {
53
- err("(" + NAMESPACE + ") -> ERROR: TweenLite or TweenMax could not be found. Please make sure GSAP is loaded before ScrollMagic or use an asynchronous loader like requirejs.");
54
- }
55
-
56
- /*
57
- * ----------------------------------------------------------------
58
- * Extensions for Scene
59
- * ----------------------------------------------------------------
60
- */
61
- /**
62
- * Every instance of ScrollMagic.Scene now accepts an additional option.
63
- * See {@link ScrollMagic.Scene} for a complete list of the standard options.
64
- * @memberof! animation.GSAP#
65
- * @method new ScrollMagic.Scene(options)
66
- * @example
67
- * var scene = new ScrollMagic.Scene({tweenChanges: true});
68
- *
69
- * @param {object} [options] - Options for the Scene. The options can be updated at any time.
70
- * @param {boolean} [options.tweenChanges=false] - Tweens Animation to the progress target instead of setting it.
71
- Does not affect animations where duration is `0`.
72
- */
73
- /**
74
- * **Get** or **Set** the tweenChanges option value.
75
- * This only affects scenes with a duration. If `tweenChanges` is `true`, the progress update when scrolling will not be immediate, but instead the animation will smoothly animate to the target state.
76
- * For a better understanding, try enabling and disabling this option in the [Scene Manipulation Example](../examples/basic/scene_manipulation.html).
77
- * @memberof! animation.GSAP#
78
- * @method Scene.tweenChanges
79
- *
80
- * @example
81
- * // get the current tweenChanges option
82
- * var tweenChanges = scene.tweenChanges();
83
- *
84
- * // set new tweenChanges option
85
- * scene.tweenChanges(true);
86
- *
87
- * @fires {@link Scene.change}, when used as setter
88
- * @param {boolean} [newTweenChanges] - The new tweenChanges setting of the scene.
89
- * @returns {boolean} `get` - Current tweenChanges option value.
90
- * @returns {Scene} `set` - Parent object for chaining.
91
- */
92
- // add option (TODO: DOC (private for dev))
93
- ScrollMagic.Scene.addOption("tweenChanges", // name
94
- false, // default
95
-
96
-
97
- function (val) { // validation callback
98
- return !!val;
99
- });
100
- // extend scene
101
- ScrollMagic.Scene.extend(function () {
102
- var Scene = this,
103
- _tween;
104
-
105
- var log = function () {
106
- if (Scene._log) { // not available, when main source minified
107
- Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->");
108
- Scene._log.apply(this, arguments);
109
- }
110
- };
111
-
112
- // set listeners
113
- Scene.on("progress.plugin_gsap", function () {
114
- updateTweenProgress();
115
- });
116
- Scene.on("destroy.plugin_gsap", function (e) {
117
- Scene.removeTween(e.reset);
118
- });
119
-
120
- /**
121
- * Update the tween progress to current position.
122
- * @private
123
- */
124
- var updateTweenProgress = function () {
125
- if (_tween) {
126
- var
127
- progress = Scene.progress(),
128
- state = Scene.state();
129
- if (_tween.repeat && _tween.repeat() === -1) {
130
- // infinite loop, so not in relation to progress
131
- if (state === 'DURING' && _tween.paused()) {
132
- _tween.play();
133
- } else if (state !== 'DURING' && !_tween.paused()) {
134
- _tween.pause();
135
- }
136
- } else if (progress != _tween.progress()) { // do we even need to update the progress?
137
- // no infinite loop - so should we just play or go to a specific point in time?
138
- if (Scene.duration() === 0) {
139
- // play the animation
140
- if (progress > 0) { // play from 0 to 1
141
- _tween.play();
142
- } else { // play from 1 to 0
143
- _tween.reverse();
144
- }
145
- } else {
146
- // go to a specific point in time
147
- if (Scene.tweenChanges() && _tween.tweenTo) {
148
- // go smooth
149
- _tween.tweenTo(progress * _tween.duration());
150
- } else {
151
- // just hard set it
152
- _tween.progress(progress).pause();
153
- }
154
- }
155
- }
156
- }
157
- };
158
-
159
- /**
160
- * Add a tween to the scene.
161
- * If you want to add multiple tweens, add them into a GSAP Timeline object and supply it instead (see example below).
162
- *
163
- * If the scene has a duration, the tween's duration will be projected to the scroll distance of the scene, meaning its progress will be synced to scrollbar movement.
164
- * For a scene with a duration of `0`, the tween will be triggered when scrolling forward past the scene's trigger position and reversed, when scrolling back.
165
- * To gain better understanding, check out the [Simple Tweening example](../examples/basic/simple_tweening.html).
166
- *
167
- * Instead of supplying a tween this method can also be used as a shorthand for `TweenMax.to()` (see example below).
168
- * @memberof! animation.GSAP#
169
- *
170
- * @example
171
- * // add a single tween directly
172
- * scene.setTween(TweenMax.to("obj"), 1, {x: 100});
173
- *
174
- * // add a single tween via variable
175
- * var tween = TweenMax.to("obj"), 1, {x: 100};
176
- * scene.setTween(tween);
177
- *
178
- * // add multiple tweens, wrapped in a timeline.
179
- * var timeline = new TimelineMax();
180
- * var tween1 = TweenMax.from("obj1", 1, {x: 100});
181
- * var tween2 = TweenMax.to("obj2", 1, {y: 100});
182
- * timeline
183
- * .add(tween1)
184
- * .add(tween2);
185
- * scene.addTween(timeline);
186
- *
187
- * // short hand to add a TweenMax.to() tween
188
- * scene.setTween("obj3", 0.5, {y: 100});
189
- *
190
- * // short hand to add a TweenMax.to() tween for 1 second
191
- * // this is useful, when the scene has a duration and the tween duration isn't important anyway
192
- * scene.setTween("obj3", {y: 100});
193
- *
194
- * @param {(object|string)} TweenObject - A TweenMax, TweenLite, TimelineMax or TimelineLite object that should be animated in the scene. Can also be a Dom Element or Selector, when using direct tween definition (see examples).
195
- * @param {(number|object)} duration - A duration for the tween, or tween parameters. If an object containing parameters are supplied, a default duration of 1 will be used.
196
- * @param {object} params - The parameters for the tween
197
- * @returns {Scene} Parent object for chaining.
198
- */
199
- Scene.setTween = function (TweenObject, duration, params) {
200
- var newTween;
201
- if (arguments.length > 1) {
202
- if (arguments.length < 3) {
203
- params = duration;
204
- duration = 1;
205
- }
206
- TweenObject = Tween.to(TweenObject, duration, params);
207
- }
208
- try {
209
- // wrap Tween into a Timeline Object if available to include delay and repeats in the duration and standardize methods.
210
- if (Timeline) {
211
- newTween = new Timeline({
212
- smoothChildTiming: true
213
- }).add(TweenObject);
214
- } else {
215
- newTween = TweenObject;
216
- }
217
- newTween.pause();
218
- } catch (e) {
219
- log(1, "ERROR calling method 'setTween()': Supplied argument is not a valid TweenObject");
220
- return Scene;
221
- }
222
- if (_tween) { // kill old tween?
223
- Scene.removeTween();
224
- }
225
- _tween = newTween;
226
-
227
- // some properties need to be transferred it to the wrapper, otherwise they would get lost.
228
- if (TweenObject.repeat && TweenObject.repeat() === -1) { // TweenMax or TimelineMax Object?
229
- _tween.repeat(-1);
230
- _tween.yoyo(TweenObject.yoyo());
231
- }
232
- // Some tween validations and debugging helpers
233
- if (Scene.tweenChanges() && !_tween.tweenTo) {
234
- log(2, "WARNING: tweenChanges will only work if the TimelineMax object is available for ScrollMagic.");
235
- }
236
-
237
- // check if there are position tweens defined for the trigger and warn about it :)
238
- if (_tween && Scene.controller() && Scene.triggerElement() && Scene.loglevel() >= 2) { // controller is needed to know scroll direction.
239
- var
240
- triggerTweens = Tween.getTweensOf(Scene.triggerElement()),
241
- vertical = Scene.controller().info("vertical");
242
- triggerTweens.forEach(function (value, index) {
243
- var
244
- tweenvars = value.vars.css || value.vars,
245
- condition = vertical ? (tweenvars.top !== undefined || tweenvars.bottom !== undefined) : (tweenvars.left !== undefined || tweenvars.right !== undefined);
246
- if (condition) {
247
- log(2, "WARNING: Tweening the position of the trigger element affects the scene timing and should be avoided!");
248
- return false;
249
- }
250
- });
251
- }
252
-
253
- // warn about tween overwrites, when an element is tweened multiple times
254
- if (parseFloat(TweenLite.version) >= 1.14) { // onOverwrite only present since GSAP v1.14.0
255
- var
256
- list = _tween.getChildren ? _tween.getChildren(true, true, false) : [_tween],
257
- // get all nested tween objects
258
- newCallback = function () {
259
- log(2, "WARNING: tween was overwritten by another. To learn how to avoid this issue see here: https://github.com/janpaepke/ScrollMagic/wiki/WARNING:-tween-was-overwritten-by-another");
260
- };
261
- for (var i = 0, thisTween, oldCallback; i < list.length; i++) { /*jshint loopfunc: true */
262
- thisTween = list[i];
263
- if (oldCallback !== newCallback) { // if tweens is added more than once
264
- oldCallback = thisTween.vars.onOverwrite;
265
- thisTween.vars.onOverwrite = function () {
266
- if (oldCallback) {
267
- oldCallback.apply(this, arguments);
268
- }
269
- newCallback.apply(this, arguments);
270
- };
271
- }
272
- }
273
- }
274
- log(3, "added tween");
275
-
276
- updateTweenProgress();
277
- return Scene;
278
- };
279
-
280
- /**
281
- * Remove the tween from the scene.
282
- * This will terminate the control of the Scene over the tween.
283
- *
284
- * Using the reset option you can decide if the tween should remain in the current state or be rewound to set the target elements back to the state they were in before the tween was added to the scene.
285
- * @memberof! animation.GSAP#
286
- *
287
- * @example
288
- * // remove the tween from the scene without resetting it
289
- * scene.removeTween();
290
- *
291
- * // remove the tween from the scene and reset it to initial position
292
- * scene.removeTween(true);
293
- *
294
- * @param {boolean} [reset=false] - If `true` the tween will be reset to its initial values.
295
- * @returns {Scene} Parent object for chaining.
296
- */
297
- Scene.removeTween = function (reset) {
298
- if (_tween) {
299
- if (reset) {
300
- _tween.progress(0).pause();
301
- }
302
- _tween.kill();
303
- _tween = undefined;
304
- log(3, "removed tween (reset: " + (reset ? "true" : "false") + ")");
305
- }
306
- return Scene;
307
- };
308
-
309
- });
310
- }));
@@ -1,3 +0,0 @@
1
- /*! ScrollMagic v2.0.5 | (c) 2015 Jan Paepke (@janpaepke) | license & info: http://scrollmagic.io */
2
-
3
- !function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.ScrollMagic=t()}(this,function(){"use strict";var e=function(){};e.version="2.0.5",window.addEventListener("mousewheel",function(){});var t="data-scrollmagic-pin-spacer";e.Controller=function(r){var o,s,a="ScrollMagic.Controller",l="FORWARD",c="REVERSE",u="PAUSED",f=n.defaults,d=this,h=i.extend({},f,r),g=[],p=!1,v=0,m=u,w=!0,y=0,S=!0,b=function(){for(var e in h)f.hasOwnProperty(e)||delete h[e];if(h.container=i.get.elements(h.container)[0],!h.container)throw a+" init failed.";w=h.container===window||h.container===document.body||!document.body.contains(h.container),w&&(h.container=window),y=z(),h.container.addEventListener("resize",T),h.container.addEventListener("scroll",T),h.refreshInterval=parseInt(h.refreshInterval)||f.refreshInterval,E()},E=function(){h.refreshInterval>0&&(s=window.setTimeout(A,h.refreshInterval))},x=function(){return h.vertical?i.get.scrollTop(h.container):i.get.scrollLeft(h.container)},z=function(){return h.vertical?i.get.height(h.container):i.get.width(h.container)},C=this._setScrollPos=function(e){h.vertical?w?window.scrollTo(i.get.scrollLeft(),e):h.container.scrollTop=e:w?window.scrollTo(e,i.get.scrollTop()):h.container.scrollLeft=e},F=function(){if(S&&p){var e=i.type.Array(p)?p:g.slice(0);p=!1;var t=v;v=d.scrollPos();var n=v-t;0!==n&&(m=n>0?l:c),m===c&&e.reverse(),e.forEach(function(e){e.update(!0)})}},L=function(){o=i.rAF(F)},T=function(e){"resize"==e.type&&(y=z(),m=u),p!==!0&&(p=!0,L())},A=function(){if(!w&&y!=z()){var e;try{e=new Event("resize",{bubbles:!1,cancelable:!1})}catch(t){e=document.createEvent("Event"),e.initEvent("resize",!1,!1)}h.container.dispatchEvent(e)}g.forEach(function(e){e.refresh()}),E()};this._options=h;var O=function(e){if(e.length<=1)return e;var t=e.slice(0);return t.sort(function(e,t){return e.scrollOffset()>t.scrollOffset()?1:-1}),t};return this.addScene=function(t){if(i.type.Array(t))t.forEach(function(e){d.addScene(e)});else if(t instanceof e.Scene)if(t.controller()!==d)t.addTo(d);else if(g.indexOf(t)<0){g.push(t),g=O(g),t.on("shift.controller_sort",function(){g=O(g)});for(var n in h.globalSceneOptions)t[n]&&t[n].call(t,h.globalSceneOptions[n])}return d},this.removeScene=function(e){if(i.type.Array(e))e.forEach(function(e){d.removeScene(e)});else{var t=g.indexOf(e);t>-1&&(e.off("shift.controller_sort"),g.splice(t,1),e.remove())}return d},this.updateScene=function(t,n){return i.type.Array(t)?t.forEach(function(e){d.updateScene(e,n)}):n?t.update(!0):p!==!0&&t instanceof e.Scene&&(p=p||[],-1==p.indexOf(t)&&p.push(t),p=O(p),L()),d},this.update=function(e){return T({type:"resize"}),e&&F(),d},this.scrollTo=function(n,r){if(i.type.Number(n))C.call(h.container,n,r);else if(n instanceof e.Scene)n.controller()===d&&d.scrollTo(n.scrollOffset(),r);else if(i.type.Function(n))C=n;else{var o=i.get.elements(n)[0];if(o){for(;o.parentNode.hasAttribute(t);)o=o.parentNode;var s=h.vertical?"top":"left",a=i.get.offset(h.container),l=i.get.offset(o);w||(a[s]-=d.scrollPos()),d.scrollTo(l[s]-a[s],r)}}return d},this.scrollPos=function(e){return arguments.length?(i.type.Function(e)&&(x=e),d):x.call(d)},this.info=function(e){var t={size:y,vertical:h.vertical,scrollPos:v,scrollDirection:m,container:h.container,isDocument:w};return arguments.length?void 0!==t[e]?t[e]:void 0:t},this.loglevel=function(){return d},this.enabled=function(e){return arguments.length?(S!=e&&(S=!!e,d.updateScene(g,!0)),d):S},this.destroy=function(e){window.clearTimeout(s);for(var t=g.length;t--;)g[t].destroy(e);return h.container.removeEventListener("resize",T),h.container.removeEventListener("scroll",T),i.cAF(o),null},b(),d};var n={defaults:{container:window,vertical:!0,globalSceneOptions:{},loglevel:2,refreshInterval:100}};e.Controller.addOption=function(e,t){n.defaults[e]=t},e.Controller.extend=function(t){var n=this;e.Controller=function(){return n.apply(this,arguments),this.$super=i.extend({},this),t.apply(this,arguments)||this},i.extend(e.Controller,n),e.Controller.prototype=n.prototype,e.Controller.prototype.constructor=e.Controller},e.Scene=function(n){var o,s,a="BEFORE",l="DURING",c="AFTER",u=r.defaults,f=this,d=i.extend({},u,n),h=a,g=0,p={start:0,end:0},v=0,m=!0,w=function(){for(var e in d)u.hasOwnProperty(e)||delete d[e];for(var t in u)L(t);C()},y={};this.on=function(e,t){return i.type.Function(t)&&(e=e.trim().split(" "),e.forEach(function(e){var n=e.split("."),r=n[0],i=n[1];"*"!=r&&(y[r]||(y[r]=[]),y[r].push({namespace:i||"",callback:t}))})),f},this.off=function(e,t){return e?(e=e.trim().split(" "),e.forEach(function(e){var n=e.split("."),r=n[0],i=n[1]||"",o="*"===r?Object.keys(y):[r];o.forEach(function(e){for(var n=y[e]||[],r=n.length;r--;){var o=n[r];!o||i!==o.namespace&&"*"!==i||t&&t!=o.callback||n.splice(r,1)}n.length||delete y[e]})}),f):f},this.trigger=function(t,n){if(t){var r=t.trim().split("."),i=r[0],o=r[1],s=y[i];s&&s.forEach(function(t){o&&o!==t.namespace||t.callback.call(f,new e.Event(i,t.namespace,f,n))})}return f},f.on("change.internal",function(e){"loglevel"!==e.what&&"tweenChanges"!==e.what&&("triggerElement"===e.what?E():"reverse"===e.what&&f.update())}).on("shift.internal",function(){S(),f.update()}),this.addTo=function(t){return t instanceof e.Controller&&s!=t&&(s&&s.removeScene(f),s=t,C(),b(!0),E(!0),S(),s.info("container").addEventListener("resize",x),t.addScene(f),f.trigger("add",{controller:s}),f.update()),f},this.enabled=function(e){return arguments.length?(m!=e&&(m=!!e,f.update(!0)),f):m},this.remove=function(){if(s){s.info("container").removeEventListener("resize",x);var e=s;s=void 0,e.removeScene(f),f.trigger("remove")}return f},this.destroy=function(e){return f.trigger("destroy",{reset:e}),f.remove(),f.off("*.*"),null},this.update=function(e){if(s)if(e)if(s.enabled()&&m){var t,n=s.info("scrollPos");t=d.duration>0?(n-p.start)/(p.end-p.start):n>=p.start?1:0,f.trigger("update",{startPos:p.start,endPos:p.end,scrollPos:n}),f.progress(t)}else T&&h===l&&O(!0);else s.updateScene(f,!1);return f},this.refresh=function(){return b(),E(),f},this.progress=function(e){if(arguments.length){var t=!1,n=h,r=s?s.info("scrollDirection"):"PAUSED",i=d.reverse||e>=g;if(0===d.duration?(t=g!=e,g=1>e&&i?0:1,h=0===g?a:l):0>e&&h!==a&&i?(g=0,h=a,t=!0):e>=0&&1>e&&i?(g=e,h=l,t=!0):e>=1&&h!==c?(g=1,h=c,t=!0):h!==l||i||O(),t){var o={progress:g,state:h,scrollDirection:r},u=h!=n,p=function(e){f.trigger(e,o)};u&&n!==l&&(p("enter"),p(n===a?"start":"end")),p("progress"),u&&h!==l&&(p(h===a?"start":"end"),p("leave"))}return f}return g};var S=function(){p={start:v+d.offset},s&&d.triggerElement&&(p.start-=s.info("size")*d.triggerHook),p.end=p.start+d.duration},b=function(e){if(o){var t="duration";F(t,o.call(f))&&!e&&(f.trigger("change",{what:t,newval:d[t]}),f.trigger("shift",{reason:t}))}},E=function(e){var n=0,r=d.triggerElement;if(s&&r){for(var o=s.info(),a=i.get.offset(o.container),l=o.vertical?"top":"left";r.parentNode.hasAttribute(t);)r=r.parentNode;var c=i.get.offset(r);o.isDocument||(a[l]-=s.scrollPos()),n=c[l]-a[l]}var u=n!=v;v=n,u&&!e&&f.trigger("shift",{reason:"triggerElementPosition"})},x=function(){d.triggerHook>0&&f.trigger("shift",{reason:"containerResize"})},z=i.extend(r.validate,{duration:function(e){if(i.type.String(e)&&e.match(/^(\.|\d)*\d+%$/)){var t=parseFloat(e)/100;e=function(){return s?s.info("size")*t:0}}if(i.type.Function(e)){o=e;try{e=parseFloat(o())}catch(t){e=-1}}if(e=parseFloat(e),!i.type.Number(e)||0>e)throw o?(o=void 0,0):0;return e}}),C=function(e){e=arguments.length?[e]:Object.keys(z),e.forEach(function(e){var t;if(z[e])try{t=z[e](d[e])}catch(n){t=u[e]}finally{d[e]=t}})},F=function(e,t){var n=!1,r=d[e];return d[e]!=t&&(d[e]=t,C(e),n=r!=d[e]),n},L=function(e){f[e]||(f[e]=function(t){return arguments.length?("duration"===e&&(o=void 0),F(e,t)&&(f.trigger("change",{what:e,newval:d[e]}),r.shifts.indexOf(e)>-1&&f.trigger("shift",{reason:e})),f):d[e]})};this.controller=function(){return s},this.state=function(){return h},this.scrollOffset=function(){return p.start},this.triggerPosition=function(){var e=d.offset;return s&&(e+=d.triggerElement?v:s.info("size")*f.triggerHook()),e};var T,A;f.on("shift.internal",function(e){var t="duration"===e.reason;(h===c&&t||h===l&&0===d.duration)&&O(),t&&_()}).on("progress.internal",function(){O()}).on("add.internal",function(){_()}).on("destroy.internal",function(e){f.removePin(e.reset)});var O=function(e){if(T&&s){var t=s.info(),n=A.spacer.firstChild;if(e||h!==l){var r={position:A.inFlow?"relative":"absolute",top:0,left:0},o=i.css(n,"position")!=r.position;A.pushFollowers?d.duration>0&&(h===c&&0===parseFloat(i.css(A.spacer,"padding-top"))?o=!0:h===a&&0===parseFloat(i.css(A.spacer,"padding-bottom"))&&(o=!0)):r[t.vertical?"top":"left"]=d.duration*g,i.css(n,r),o&&_()}else{"fixed"!=i.css(n,"position")&&(i.css(n,{position:"fixed"}),_());var u=i.get.offset(A.spacer,!0),f=d.reverse||0===d.duration?t.scrollPos-p.start:Math.round(g*d.duration*10)/10;u[t.vertical?"top":"left"]+=f,i.css(A.spacer.firstChild,{top:u.top,left:u.left})}}},_=function(){if(T&&s&&A.inFlow){var e=h===l,t=s.info("vertical"),n=A.spacer.firstChild,r=i.isMarginCollapseType(i.css(A.spacer,"display")),o={};A.relSize.width||A.relSize.autoFullWidth?e?i.css(T,{width:i.get.width(A.spacer)}):i.css(T,{width:"100%"}):(o["min-width"]=i.get.width(t?T:n,!0,!0),o.width=e?o["min-width"]:"auto"),A.relSize.height?e?i.css(T,{height:i.get.height(A.spacer)-(A.pushFollowers?d.duration:0)}):i.css(T,{height:"100%"}):(o["min-height"]=i.get.height(t?n:T,!0,!r),o.height=e?o["min-height"]:"auto"),A.pushFollowers&&(o["padding"+(t?"Top":"Left")]=d.duration*g,o["padding"+(t?"Bottom":"Right")]=d.duration*(1-g)),i.css(A.spacer,o)}},N=function(){s&&T&&h===l&&!s.info("isDocument")&&O()},P=function(){s&&T&&h===l&&((A.relSize.width||A.relSize.autoFullWidth)&&i.get.width(window)!=i.get.width(A.spacer.parentNode)||A.relSize.height&&i.get.height(window)!=i.get.height(A.spacer.parentNode))&&_()},D=function(e){s&&T&&h===l&&!s.info("isDocument")&&(e.preventDefault(),s._setScrollPos(s.info("scrollPos")-((e.wheelDelta||e[s.info("vertical")?"wheelDeltaY":"wheelDeltaX"])/3||30*-e.detail)))};this.setPin=function(e,n){var r={pushFollowers:!0,spacerClass:"scrollmagic-pin-spacer"};if(n=i.extend({},r,n),e=i.get.elements(e)[0],!e)return f;if("fixed"===i.css(e,"position"))return f;if(T){if(T===e)return f;f.removePin()}T=e;var o=T.parentNode.style.display,s=["top","left","bottom","right","margin","marginLeft","marginRight","marginTop","marginBottom"];T.parentNode.style.display="none";var a="absolute"!=i.css(T,"position"),l=i.css(T,s.concat(["display"])),c=i.css(T,["width","height"]);T.parentNode.style.display=o,!a&&n.pushFollowers&&(n.pushFollowers=!1);var u=T.parentNode.insertBefore(document.createElement("div"),T),d=i.extend(l,{position:a?"relative":"absolute",boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"});if(a||i.extend(d,i.css(T,["width","height"])),i.css(u,d),u.setAttribute(t,""),i.addClass(u,n.spacerClass),A={spacer:u,relSize:{width:"%"===c.width.slice(-1),height:"%"===c.height.slice(-1),autoFullWidth:"auto"===c.width&&a&&i.isMarginCollapseType(l.display)},pushFollowers:n.pushFollowers,inFlow:a},!T.___origStyle){T.___origStyle={};var h=T.style,g=s.concat(["width","height","position","boxSizing","mozBoxSizing","webkitBoxSizing"]);g.forEach(function(e){T.___origStyle[e]=h[e]||""})}return A.relSize.width&&i.css(u,{width:c.width}),A.relSize.height&&i.css(u,{height:c.height}),u.appendChild(T),i.css(T,{position:a?"relative":"absolute",margin:"auto",top:"auto",left:"auto",bottom:"auto",right:"auto"}),(A.relSize.width||A.relSize.autoFullWidth)&&i.css(T,{boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"}),window.addEventListener("scroll",N),window.addEventListener("resize",N),window.addEventListener("resize",P),T.addEventListener("mousewheel",D),T.addEventListener("DOMMouseScroll",D),O(),f},this.removePin=function(e){if(T){if(h===l&&O(!0),e||!s){var n=A.spacer.firstChild;if(n.hasAttribute(t)){var r=A.spacer.style,o=["margin","marginLeft","marginRight","marginTop","marginBottom"];margins={},o.forEach(function(e){margins[e]=r[e]||""}),i.css(n,margins)}A.spacer.parentNode.insertBefore(n,A.spacer),A.spacer.parentNode.removeChild(A.spacer),T.parentNode.hasAttribute(t)||(i.css(T,T.___origStyle),delete T.___origStyle)}window.removeEventListener("scroll",N),window.removeEventListener("resize",N),window.removeEventListener("resize",P),T.removeEventListener("mousewheel",D),T.removeEventListener("DOMMouseScroll",D),T=void 0}return f};var R,k=[];return f.on("destroy.internal",function(e){f.removeClassToggle(e.reset)}),this.setClassToggle=function(e,t){var n=i.get.elements(e);return 0!==n.length&&i.type.String(t)?(k.length>0&&f.removeClassToggle(),R=t,k=n,f.on("enter.internal_class leave.internal_class",function(e){var t="enter"===e.type?i.addClass:i.removeClass;k.forEach(function(e){t(e,R)})}),f):f},this.removeClassToggle=function(e){return e&&k.forEach(function(e){i.removeClass(e,R)}),f.off("start.internal_class end.internal_class"),R=void 0,k=[],f},w(),f};var r={defaults:{duration:0,offset:0,triggerElement:void 0,triggerHook:.5,reverse:!0,loglevel:2},validate:{offset:function(e){if(e=parseFloat(e),!i.type.Number(e))throw 0;return e},triggerElement:function(e){if(e=e||void 0){var t=i.get.elements(e)[0];if(!t)throw 0;e=t}return e},triggerHook:function(e){var t={onCenter:.5,onEnter:1,onLeave:0};if(i.type.Number(e))e=Math.max(0,Math.min(parseFloat(e),1));else{if(!(e in t))throw 0;e=t[e]}return e},reverse:function(e){return!!e}},shifts:["duration","offset","triggerHook"]};e.Scene.addOption=function(e,t,n,i){e in r.defaults||(r.defaults[e]=t,r.validate[e]=n,i&&r.shifts.push(e))},e.Scene.extend=function(t){var n=this;e.Scene=function(){return n.apply(this,arguments),this.$super=i.extend({},this),t.apply(this,arguments)||this},i.extend(e.Scene,n),e.Scene.prototype=n.prototype,e.Scene.prototype.constructor=e.Scene},e.Event=function(e,t,n,r){r=r||{};for(var i in r)this[i]=r[i];return this.type=e,this.target=this.currentTarget=n,this.namespace=t||"",this.timeStamp=this.timestamp=Date.now(),this};var i=e._util=function(e){var t,n={},r=function(e){return parseFloat(e)||0},i=function(t){return t.currentStyle?t.currentStyle:e.getComputedStyle(t)},o=function(t,n,o,s){if(n=n===document?e:n,n===e)s=!1;else if(!f.DomElement(n))return 0;t=t.charAt(0).toUpperCase()+t.substr(1).toLowerCase();var a=(o?n["offset"+t]||n["outer"+t]:n["client"+t]||n["inner"+t])||0;if(o&&s){var l=i(n);a+="Height"===t?r(l.marginTop)+r(l.marginBottom):r(l.marginLeft)+r(l.marginRight)}return a},s=function(e){return e.replace(/^[^a-z]+([a-z])/g,"$1").replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})};n.extend=function(e){for(e=e||{},t=1;t<arguments.length;t++)if(arguments[t])for(var n in arguments[t])arguments[t].hasOwnProperty(n)&&(e[n]=arguments[t][n]);return e},n.isMarginCollapseType=function(e){return["block","flex","list-item","table","-webkit-box"].indexOf(e)>-1};var a=0,l=["ms","moz","webkit","o"],c=e.requestAnimationFrame,u=e.cancelAnimationFrame;for(t=0;!c&&t<l.length;++t)c=e[l[t]+"RequestAnimationFrame"],u=e[l[t]+"CancelAnimationFrame"]||e[l[t]+"CancelRequestAnimationFrame"];c||(c=function(t){var n=(new Date).getTime(),r=Math.max(0,16-(n-a)),i=e.setTimeout(function(){t(n+r)},r);return a=n+r,i}),u||(u=function(t){e.clearTimeout(t)}),n.rAF=c.bind(e),n.cAF=u.bind(e);var f=n.type=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase()};f.String=function(e){return"string"===f(e)},f.Function=function(e){return"function"===f(e)},f.Array=function(e){return Array.isArray(e)},f.Number=function(e){return!f.Array(e)&&e-parseFloat(e)+1>=0},f.DomElement=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName};var d=n.get={};return d.elements=function(t){var n=[];if(f.String(t))try{t=document.querySelectorAll(t)}catch(e){return n}if("nodelist"===f(t)||f.Array(t))for(var r=0,i=n.length=t.length;i>r;r++){var o=t[r];n[r]=f.DomElement(o)?o:d.elements(o)}else(f.DomElement(t)||t===document||t===e)&&(n=[t]);return n},d.scrollTop=function(t){return t&&"number"==typeof t.scrollTop?t.scrollTop:e.pageYOffset||0},d.scrollLeft=function(t){return t&&"number"==typeof t.scrollLeft?t.scrollLeft:e.pageXOffset||0},d.width=function(e,t,n){return o("width",e,t,n)},d.height=function(e,t,n){return o("height",e,t,n)},d.offset=function(e,t){var n={top:0,left:0};if(e&&e.getBoundingClientRect){var r=e.getBoundingClientRect();n.top=r.top,n.left=r.left,t||(n.top+=d.scrollTop(),n.left+=d.scrollLeft())}return n},n.addClass=function(e,t){t&&(e.classList?e.classList.add(t):e.className+=" "+t)},n.removeClass=function(e,t){t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))},n.css=function(e,t){if(f.String(t))return i(e)[s(t)];if(f.Array(t)){var n={},r=i(e);return t.forEach(function(e){n[e]=r[s(e)]}),n}for(var o in t){var a=t[o];a==parseFloat(a)&&(a+="px"),e.style[s(o)]=a}},n}(window||{});return e});