diff --git a/build/build.js b/build/build.js index f8f6c680..28452971 100644 --- a/build/build.js +++ b/build/build.js @@ -1,26 +1,64 @@ import gulp from 'gulp'; import postcss from 'gulp-postcss'; +import rename from 'gulp-rename'; import cssnano from 'cssnano'; +import merge from 'merge-stream'; import uglify from 'gulp-uglify'; import htmlmin from 'gulp-htmlmin'; import paths from '../mconfig.json'; function buildStyles() { + const stylesfiles = [ + { + dest: paths.styles.dest + }, + { + dest: paths.styles.docs.dest + } + ]; + const plugins = [ cssnano() ]; - return gulp - .src(paths.styles.dest + '*.css') - .pipe(postcss(plugins)) - .pipe(gulp.dest(paths.styles.dest)); + const stylesStreams = stylesfiles.map((file) => { + return gulp + .src([file.dest+'*.css', '!'+file.dest+'*.min.css']) + .pipe(rename(function(file) { + if (file.basename == paths.styles.main) { + file.basename += '.min'; + } + })) + .pipe(postcss(plugins)) + .pipe(gulp.dest(file.dest)); + }); + + return merge(stylesStreams); } function buildScripts() { - return gulp - .src(paths.scripts.dest + '*.js') - .pipe(uglify()) - .pipe(gulp.dest(paths.scripts.dest)); + const scriptsfiles = [ + { + dest: paths.scripts.dest + }, + { + dest: paths.scripts.docs.dest + } + ]; + + const scriptsStreams = scriptsfiles.map((file) => { + return gulp + .src([file.dest+'*.js', '!'+file.dest+'*.esm.js', '!'+file.dest+'*.min.js']) + .pipe(rename(function(file) { + if (file.basename == paths.scripts.main) { + file.basename += '.min'; + } + })) + .pipe(uglify()) + .pipe(gulp.dest(file.dest)); + }); + + return merge(scriptsStreams); } function buildViews() { diff --git a/build/scripts.js b/build/scripts.js index bba0d27d..9163eb9e 100644 --- a/build/scripts.js +++ b/build/scripts.js @@ -3,8 +3,8 @@ import { rollup } from 'rollup'; import resolve from 'rollup-plugin-node-resolve'; import babel from 'rollup-plugin-babel'; import common from 'rollup-plugin-commonjs'; -import merge from 'merge-stream'; import paths from '../mconfig.json'; +import pkg from '../package.json'; function scripts() { const files = [ @@ -41,7 +41,8 @@ function scripts() { return bundle.write({ file: file.dest + '.js', name: 'locomotiveScroll', - format: file.format + format: file.format, + banner: '/* locomotive-scroll v' + pkg.version + ' | MIT License | https://github.com/locomotivemtl/locomotive-scroll */' }); }) }); diff --git a/build/styles.js b/build/styles.js index d6a936b5..9f6e8896 100644 --- a/build/styles.js +++ b/build/styles.js @@ -1,8 +1,10 @@ import gulp from 'gulp'; import sass from 'gulp-sass'; import autoprefixer from 'gulp-autoprefixer'; +import header from 'gulp-header'; import merge from 'merge-stream'; import paths from '../mconfig.json'; +import pkg from '../package.json'; import error from './error.js'; import { server } from './serve.js'; @@ -28,6 +30,7 @@ function styles() { .pipe(autoprefixer({ cascade: false })) + .pipe(header('/*! locomotive-scroll v' + pkg.version + ' | MIT License | https://github.com/locomotivemtl/locomotive-scroll */\n')) .pipe(gulp.dest(file.dest)) .pipe(server.stream()); }); diff --git a/dist/locomotive-scroll.css b/dist/locomotive-scroll.css index f6c9ddd2..9e25a868 100644 --- a/dist/locomotive-scroll.css +++ b/dist/locomotive-scroll.css @@ -1,3 +1,4 @@ +/*! locomotive-scroll v3.0.0 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */ html.has-scroll-smooth { overflow: hidden; } diff --git a/dist/locomotive-scroll.esm.js b/dist/locomotive-scroll.esm.js index de054932..7730cfc5 100644 --- a/dist/locomotive-scroll.esm.js +++ b/dist/locomotive-scroll.esm.js @@ -1,3 +1,4 @@ +/* locomotive-scroll v3.0.0 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); diff --git a/dist/locomotive-scroll.js b/dist/locomotive-scroll.js index 2576769f..c9a43cfb 100644 --- a/dist/locomotive-scroll.js +++ b/dist/locomotive-scroll.js @@ -1,3 +1,4 @@ +/* locomotive-scroll v3.0.0 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : diff --git a/dist/locomotive-scroll.min.css b/dist/locomotive-scroll.min.css new file mode 100644 index 00000000..81fba16d --- /dev/null +++ b/dist/locomotive-scroll.min.css @@ -0,0 +1 @@ +/*! locomotive-scroll v3.0.0 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */html.has-scroll-smooth{overflow:hidden}html.has-scroll-dragging{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.has-scroll-smooth body{overflow:hidden}.c-scrollbar{position:absolute;right:0;top:0;width:11px;height:100vh;transform-origin:center right;transition:transform .3s,opacity .3s;opacity:0}.c-scrollbar:hover{transform:scaleX(1.45)}.c-scrollbar:hover,.has-scroll-dragging .c-scrollbar,.has-scroll-scrolling .c-scrollbar{opacity:1}.c-scrollbar_thumb{position:absolute;top:0;right:0;background-color:#000;opacity:.5;width:7px;border-radius:10px;margin:2px;cursor:-webkit-grab;cursor:grab}.has-scroll-dragging .c-scrollbar_thumb{cursor:-webkit-grabbing;cursor:grabbing} \ No newline at end of file diff --git a/dist/locomotive-scroll.min.js b/dist/locomotive-scroll.min.js new file mode 100644 index 00000000..43355e1c --- /dev/null +++ b/dist/locomotive-scroll.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).locomotiveScroll={})}(this,function(t){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var i=0;i=t.top&&nt.bottom)&&i.setOutOfView(t,e)}),this.hasScrollTicking=!1}},{key:"setInView",value:function(t,e){this.els[e].inView=!0,t.el.classList.add(t.class),t.call&&this.dispatchCall(t,"enter"),t.repeat||!1!==t.speed||t.sticky||this.els.splice(e,1)}},{key:"setOutOfView",value:function(t,e){(t.repeat||void 0!==t.speed)&&(this.els[e].inView=!1),t.call&&this.dispatchCall(t,"exit"),t.repeat&&t.el.classList.remove(t.class)}},{key:"dispatchCall",value:function(t,e){this.callWay=e,this.callValue=t.call.split(",").map(function(t){return t.trim()}),this.callObj=t,1==this.callValue.length&&(this.callValue=this.callValue[0]);var i=new Event(this.namespace+"call");window.dispatchEvent(i)}},{key:"dispatchScroll",value:function(){var t=new Event(this.namespace+"scroll");window.dispatchEvent(t)}},{key:"setEvents",value:function(t,e){var i=this;window.addEventListener(this.namespace+t,function(){switch(t){case"scroll":return e(i.instance);case"call":return e(i.callValue,i.callWay,i.callObj);default:return e()}},!1)}},{key:"startScroll",value:function(){}},{key:"stopScroll",value:function(){}},{key:"setScroll",value:function(t,e){this.instance.scroll={x:0,y:0}}},{key:"destroy",value:function(){var e=this;window.removeEventListener("resize",this.checkResize,!1),this.scrollToEls.forEach(function(t){t.removeEventListener("click",e.setScrollTo,!1)})}}]),e}(),u=function(t){function i(){var t,e=0Date.now()&&e[0]===e[2*this.stability-1])&&(n=e.slice(0,this.stability),i=e.slice(this.stability,2*this.stability),a=n.reduce(function(t,e){return t+e}),o=i.reduce(function(t,e){return t+e}),l=a/n.length,s=o/i.length,Math.abs(l)this.sections[i].offset&&this.instance.scroll.ythis.instance.limit&&(this.instance.delta.y=this.instance.limit)}},{key:"updateScroll",value:function(){this.isScrolling?this.instance.scroll.y=P(this.instance.scroll.y,this.instance.delta.y,this.inertia*this.inertiaRatio):this.isDraggingScrollBar?this.instance.scroll.y=P(this.instance.scroll.y,this.instance.delta.y,2*this.inertia):this.instance.scroll.y=this.instance.delta.y}},{key:"addDirection",value:function(){this.instance.delta.y>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):this.instance.delta.y=i&&a.instance.scroll.y<=n&&(o=!0);var l={el:t,offset:i,limit:n,inView:o,persistent:s};a.sections[e]=l})}},{key:"transform",value:function(t,e,i,n){var s;if(n){var o=Y(t),l=P(o.x,e,n),a=P(o.y,i,n);s="matrix(1,0,0,1,".concat(l,",").concat(a,")")}else s="matrix(1,0,0,1,".concat(e,",").concat(i,")");t.style.webkitTransform=s,t.style.msTransform=s,t.style.transform=s}},{key:"transformElements",value:function(n){var s=this,o=this.instance.scroll.y+this.windowHeight,l=this.instance.scroll.y+this.windowMiddle;this.parallaxElements.forEach(function(t,e){var i=!1;if(n&&(i=0),t.inView)switch(t.position){case"top":i=s.instance.scroll.y*-t.speed;break;case"bottom":i=(s.instance.limit-o+s.windowHeight)*t.speed;break;default:i=(l-t.middle)*-t.speed}t.sticky&&(i=t.inView?s.instance.scroll.y-t.top+window.innerHeight:s.instance.scroll.yt.bottom&&s.instance.scroll.y>t.bottom+100&&t.bottom-t.top+window.innerHeight),!1!==i&&("horizontal"===t.direction?s.transform(t.el,i,0,!n&&t.delay):s.transform(t.el,0,i,!n&&t.delay))})}},{key:"scrollTo",value:function(t,e){var i,n=this,s=e?parseInt(e):0;if("string"==typeof t?"top"===t?s=0:"bottom"===t?s=this.instance.limit:i=document.querySelectorAll(t)[0]:t.target||(i=t),i){var o=i.getBoundingClientRect().top+this.instance.scroll.y,l=function(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}(i).find(function(e){return n.sections.find(function(t){return t.element==e})}),a=0;l&&(a=Y(l).y),s=o+s-a}s-=this.instance.scroll.y,this.instance.delta.y=Math.min(s,this.instance.limit),this.inertiaRatio=Math.min(4e3/Math.abs(this.instance.delta.y-this.instance.scroll.y),.8),console.log(s,this.instance.limit),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}},{key:"update",value:function(){this.setScrollLimit(),this.addSections(),this.addElements(),this.detectElements(),this.updateScroll(),this.transformElements(!0)}},{key:"startScroll",value:function(){this.stop=!1}},{key:"stopScroll",value:function(){this.stop=!0}},{key:"setScroll",value:function(t,e){this.instance={scroll:{x:t,y:e},delta:{x:t,y:e}}}},{key:"destroy",value:function(){r(l(s.prototype),"destroy",this).call(this)}}]),s}(),R=function(){function e(){var t=0+~]|"+P+")"+P+"*"),z=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),X=new RegExp(I),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+I),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){T()},ie=ye(function(e){return!0===e.disabled},{dir:"parentNode",next:"legend"});try{L.apply(t=H.call(y.childNodes),y.childNodes),t[y.childNodes.length].nodeType}catch(e){L={apply:t.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,n,r){var i,o,a,s,u,l,c,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!r&&((t?t.ownerDocument||t:y)!==C&&T(t),t=t||C,k)){if(11!==p&&(u=J.exec(e)))if(i=u[1]){if(9===p){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&m(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return L.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&d.getElementsByClassName&&t.getElementsByClassName)return L.apply(n,t.getElementsByClassName(i)),n}if(d.qsa&&!N[e+" "]&&(!v||!v.test(e))){if(1!==p)f=t,c=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(te,ne):t.setAttribute("id",s=E),o=(l=h(e)).length;o--;)l[o]="#"+s+" "+me(l[o]);c=l.join(","),f=K.test(e)&&ge(t.parentNode)||t}if(c)try{return L.apply(n,f.querySelectorAll(c)),n}catch(e){}finally{s===E&&t.removeAttribute("id")}}}return g(e.replace($,"$1"),t,n,r)}function ae(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function se(e){return e[E]=!0,e}function ue(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pe(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function de(t){return function(e){return"label"in e&&e.disabled===t||"form"in e&&e.disabled===t||"form"in e&&!1===e.disabled&&(e.isDisabled===t||e.isDisabled!==!t&&("label"in e||!ie(e))!==t)}}function he(a){return se(function(o){return o=+o,se(function(e,t){for(var n,r=a([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in d=oe.support={},i=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=oe.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:y;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,k=!i(C),y!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",re,!1):n.attachEvent&&n.attachEvent("onunload",re)),d.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ue(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=Q.test(C.getElementsByClassName),d.getById=ue(function(e){return a.appendChild(e).id=E,!C.getElementsByName||!C.getElementsByName(E).length}),d.getById?(b.find.ID=function(e,t){if(void 0!==t.getElementById&&k){var n=t.getElementById(e);return n?[n]:[]}},b.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var n=e.replace(Z,ee);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}}),b.find.TAG=d.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=d.getElementsByClassName&&function(e,t){return void 0!==t.getElementsByClassName&&k?t.getElementsByClassName(e):void 0},s=[],v=[],(d.qsa=Q.test(C.querySelectorAll))&&(ue(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+P+"*(?:value|"+O+")"),e.querySelectorAll("[id~="+E+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||v.push(".#.+[+~]")}),ue(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+P+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=Q.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ue(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",I)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=Q.test(a.compareDocumentPosition),m=t||Q.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===y&&m(y,e)?-1:t===C||t.ownerDocument===y&&m(y,t)?1:u?F(u,e)-F(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?F(u,e)-F(u,t):0;if(i===o)return ce(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ce(a[r],s[r]):a[r]===y?-1:s[r]===y?1:0}),C},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),t=t.replace(z,"='$1']"),d.matchesSelector&&k&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=oe.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function j(e,n,r){if(E.isFunction(n))return E.grep(e,function(e,t){return!!n.call(e,t,e)!==r});if(n.nodeType)return E.grep(e,function(e){return e===n!==r});if("string"==typeof n){if(D.test(n))return E.filter(n,e,r);n=E.filter(n,e)}return E.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||A,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):E.isFunction(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:k,!0)),N.test(r[1])&&E.isPlainObject(t))for(r in t)E.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=k.getElementById(r[2]))&&(this[0]=i,this.length=1),this}).prototype=E.fn,A=E(k);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function F(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,ae=/^$|\/(?:java|ecma)script/i,se={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ue(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&E.nodeName(e,t)?E.merge([e],n):n}function le(e,t){for(var n=0,r=e.length;nx",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue;var he=k.documentElement,ge=/^key/,ve=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,me=/^([^.]*)(?:\.(.+)|)/;function ye(){return!0}function xe(){return!1}function be(){try{return k.activeElement}catch(e){}}function we(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)we(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=xe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each(function(){E.event.add(this,t,i,r,n)})}E.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=X.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(he,i),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return void 0!==E&&E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(O)||[""]).length;l--;)d=g=(s=me.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=E.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=E.event.special[d]||{},c=E.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),E.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=X.hasData(e)&&X.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(O)||[""]).length;l--;)if(d=g=(s=me.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=E.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||E.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)E.event.remove(e,d+t[l],n,r,!0);E.isEmptyObject(u)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=E.event.fix(e),u=new Array(arguments.length),l=(X.get(this,"events")||{})[s.type]||[],c=E.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Ce=/\s*$/g;function Ne(e,t){return E.nodeName(e,"table")&&E.nodeName(11!==t.nodeType?t:t.firstChild,"tr")&&e.getElementsByTagName("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function je(e){var t=Ee.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Ae(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(X.hasData(e)&&(o=X.access(e),a=X.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=E.contains(e.ownerDocument,e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||E.isXMLDoc(e)))for(a=ue(c),r=0,i=(o=ue(e)).length;r").prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),k.head.appendChild(r[0])},abort:function(){i&&i()}}});var Rt,Mt=[],It=/(=)\?(?=&|$)|\?\?/;function Wt(e){return E.isWindow(e)?e:9===e.nodeType&&e.defaultView}E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mt.pop()||E.expando+"_"+gt++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(It.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&It.test(e.data)&&"data");return a||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=E.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(It,"$1"+r):!1!==e.jsonp&&(e.url+=(vt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||E.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?E(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Mt.push(r)),o&&E.isFunction(i)&&i(o[0]),o=i=void 0}),"script"):void 0}),v.createHTMLDocument=((Rt=k.implementation.createHTMLDocument("").body).innerHTML="
",2===Rt.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=k.implementation.createHTMLDocument("")).createElement("base")).href=k.location.href,t.head.appendChild(r)):t=k),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=de([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(E.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E.expr.pseudos.animated=function(t){return E.grep(E.timers,function(e){return t===e.elem}).length},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,r.left):(a=parseFloat(o)||0,parseFloat(u)||0),E.isFunction(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r,i,o=this[0];return o?o.getClientRects().length?(r=o.getBoundingClientRect()).width||r.height?(n=Wt(i=o.ownerDocument),e=i.documentElement,{top:r.top+n.pageYOffset-e.clientTop,left:r.left+n.pageXOffset-e.clientLeft}):r:{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===E.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),E.nodeName(e[0],"html")||(r=e.offset()),r={top:r.top+E.css(e[0],"borderTopWidth",!0),left:r.left+E.css(e[0],"borderLeftWidth",!0)}),{top:t.top-r.top-E.css(n,"marginTop",!0),left:t.left-r.left-E.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===E.css(e,"position");)e=e.offsetParent;return e||he})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return B(this,function(e,t,n){var r=Wt(e);return void 0===n?r?r[i]:e[t]:void(r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n)},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=Re(v.pixelPosition,function(e,t){return t?(t=Pe(e,n),Fe.test(t)?E(e).position()[n]+"px":t):void 0})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return E.isWindow(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),E.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return E});var $t=C.jQuery,Bt=C.$;return E.noConflict=function(e){return C.$===E&&(C.$=Bt),e&&C.jQuery===E&&(C.jQuery=$t),E},e||(C.jQuery=C.$=E),E}); \ No newline at end of file diff --git a/docs/dist/scripts/main.js b/docs/dist/scripts/main.js index 09e04da7..a304aa6a 100644 --- a/docs/dist/scripts/main.js +++ b/docs/dist/scripts/main.js @@ -1,1779 +1 @@ -(function () { - 'use strict'; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; - } - - function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - var ownKeys = Object.keys(source); - - if (typeof Object.getOwnPropertySymbols === 'function') { - ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { - return Object.getOwnPropertyDescriptor(source, sym).enumerable; - })); - } - - ownKeys.forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } - - return target; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } - - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; - } - - function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } - - return _assertThisInitialized(self); - } - - function _superPropBase(object, property) { - while (!Object.prototype.hasOwnProperty.call(object, property)) { - object = _getPrototypeOf(object); - if (object === null) break; - } - - return object; - } - - function _get(target, property, receiver) { - if (typeof Reflect !== "undefined" && Reflect.get) { - _get = Reflect.get; - } else { - _get = function _get(target, property, receiver) { - var base = _superPropBase(target, property); - - if (!base) return; - var desc = Object.getOwnPropertyDescriptor(base, property); - - if (desc.get) { - return desc.get.call(receiver); - } - - return desc.value; - }; - } - - return _get(target, property, receiver || target); - } - - var defaults = { - el: document, - elMobile: document, - name: 'scroll', - offset: 0, - repeat: false, - smooth: false, - smoothMobile: false, - direction: 'vertical', - inertia: 1, - "class": 'is-inview', - scrollbarClass: 'c-scrollbar', - scrollingClass: 'has-scroll-scrolling', - draggingClass: 'has-scroll-dragging', - smoothClass: 'has-scroll-smooth', - initClass: 'has-scroll-init', - getSpeed: false, - getDirection: false - }; - - var _default = - /*#__PURE__*/ - function () { - function _default() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, _default); - - window.scrollTo(0, 0); - Object.assign(this, defaults, options); - this.namespace = 'locomotive'; - this.html = document.documentElement; - this.windowHeight = window.innerHeight; - this.windowMiddle = this.windowHeight / 2; - this.els = []; - this.hasScrollTicking = false; - this.checkScroll = this.checkScroll.bind(this); - this.checkResize = this.checkResize.bind(this); - this.instance = { - scroll: { - x: 0, - y: 0 - }, - limit: this.html.offsetHeight - }; - - if (this.getDirection) { - this.instance.direction = null; - } - - if (this.getDirection) { - this.instance.speed = 0; - } - - this.html.classList.add(this.initClass); - window.addEventListener('resize', this.checkResize, false); - } - - _createClass(_default, [{ - key: "init", - value: function init() { - this.initEvents(); - } - }, { - key: "checkScroll", - value: function checkScroll() { - this.dispatchScroll(); - } - }, { - key: "checkResize", - value: function checkResize() {} - }, { - key: "initEvents", - value: function initEvents() { - var _this = this; - - this.scrollToEls = this.el.querySelectorAll("[data-".concat(this.name, "-to]")); - this.setScrollTo = this.setScrollTo.bind(this); - this.scrollToEls.forEach(function (el) { - el.addEventListener('click', _this.setScrollTo, false); - }); - } - }, { - key: "setScrollTo", - value: function setScrollTo(event) { - event.preventDefault(); - this.scrollTo(event.currentTarget.getAttribute("data-".concat(this.name, "-href")) || event.currentTarget.getAttribute('href'), event.currentTarget.getAttribute("data-".concat(this.name, "-offset"))); - } - }, { - key: "addElements", - value: function addElements() {} - }, { - key: "detectElements", - value: function detectElements() { - var _this2 = this; - - var scrollTop = this.instance.scroll.y; - var scrollBottom = scrollTop + this.windowHeight; - this.els.forEach(function (el, i) { - if (!el.inView) { - if (scrollBottom >= el.top && scrollTop < el.bottom) { - _this2.setInView(el, i); - } - } - - if (el.inView) { - if (scrollBottom < el.top || scrollTop > el.bottom) { - _this2.setOutOfView(el, i); - } - } - }); - this.hasScrollTicking = false; - } - }, { - key: "setInView", - value: function setInView(current, i) { - this.els[i].inView = true; - current.el.classList.add(current["class"]); - - if (current.call) { - this.dispatchCall(current, 'enter'); - } - - if (!current.repeat && current.speed === false && !current.sticky) { - this.els.splice(i, 1); - } - } - }, { - key: "setOutOfView", - value: function setOutOfView(current, i) { - if (current.repeat || current.speed !== undefined) { - this.els[i].inView = false; - } - - if (current.call) { - this.dispatchCall(current, 'exit'); - } - - if (current.repeat) { - current.el.classList.remove(current["class"]); - } - } - }, { - key: "dispatchCall", - value: function dispatchCall(current, way) { - this.callWay = way; - this.callValue = current.call.split(',').map(function (item) { - return item.trim(); - }); - this.callObj = current; - if (this.callValue.length == 1) this.callValue = this.callValue[0]; - var callEvent = new Event(this.namespace + 'call'); - window.dispatchEvent(callEvent); - } - }, { - key: "dispatchScroll", - value: function dispatchScroll() { - var scrollEvent = new Event(this.namespace + 'scroll'); - window.dispatchEvent(scrollEvent); - } - }, { - key: "setEvents", - value: function setEvents(event, func) { - var _this3 = this; - - window.addEventListener(this.namespace + event, function () { - switch (event) { - case 'scroll': - return func(_this3.instance); - - case 'call': - return func(_this3.callValue, _this3.callWay, _this3.callObj); - - default: - return func(); - } - }, false); - } - }, { - key: "startScroll", - value: function startScroll() {} - }, { - key: "stopScroll", - value: function stopScroll() {} - }, { - key: "setScroll", - value: function setScroll(x, y) { - this.instance.scroll = { - x: 0, - y: 0 - }; - } - }, { - key: "destroy", - value: function destroy() { - var _this4 = this; - - window.removeEventListener('resize', this.checkResize, false); - this.scrollToEls.forEach(function (el) { - el.removeEventListener('click', _this4.setScrollTo, false); - }); - } - }]); - - return _default; - }(); - - var _default$1 = - /*#__PURE__*/ - function (_Core) { - _inherits(_default, _Core); - - function _default() { - var _this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, _default); - - _this = _possibleConstructorReturn(this, _getPrototypeOf(_default).call(this, options)); - window.addEventListener('scroll', _this.checkScroll, false); - return _this; - } - - _createClass(_default, [{ - key: "init", - value: function init() { - this.instance.scroll.y = window.scrollY; - this.addElements(); - this.detectElements(); - - _get(_getPrototypeOf(_default.prototype), "init", this).call(this); - } - }, { - key: "checkScroll", - value: function checkScroll() { - var _this2 = this; - - _get(_getPrototypeOf(_default.prototype), "checkScroll", this).call(this); - - if (this.els.length) { - this.instance.scroll.y = window.scrollY; - - if (!this.hasScrollTicking) { - requestAnimationFrame(function () { - _this2.detectElements(); - }); - this.hasScrollTicking = true; - } - } - } - }, { - key: "checkResize", - value: function checkResize() { - var _this3 = this; - - if (this.els.length) { - this.windowHeight = window.innerHeight; - - if (!this.hasScrollTicking) { - requestAnimationFrame(function () { - _this3.updateElements(); - }); - this.hasScrollTicking = true; - } - } - } - }, { - key: "addElements", - value: function addElements() { - var _this4 = this; - - var els = this.el.querySelectorAll('[data-' + this.name + ']'); - els.forEach(function (el, i) { - var cl = el.dataset[_this4.name + 'Class'] || _this4["class"]; - - var top = el.getBoundingClientRect().top + _this4.instance.scroll.y; - - var bottom = top + el.offsetHeight; - var offset = parseInt(el.dataset[_this4.name + 'Offset']) || parseInt(_this4.offset); - var repeat = el.dataset[_this4.name + 'Repeat']; - var call = el.dataset[_this4.name + 'Call']; - - if (repeat == 'false') { - repeat = false; - } else if (repeat != undefined) { - repeat = true; - } else { - repeat = _this4.repeat; - } - - _this4.els[i] = { - el: el, - "class": cl, - top: top + offset, - bottom: bottom, - offset: offset, - repeat: repeat, - inView: false, - call: call - }; - }); - } - }, { - key: "updateElements", - value: function updateElements() { - var _this5 = this; - - this.els.forEach(function (el, i) { - var top = el.el.getBoundingClientRect().top + _this5.instance.scroll.y; - - var bottom = top + el.el.offsetHeight; - _this5.els[i].top = top + el.offset; - _this5.els[i].bottom = bottom; - }); - this.hasScrollTicking = false; - } - /** - * Scroll to a desired target. - * - * @param {object} options - * @return {void} - */ - - }, { - key: "scrollTo", - value: function scrollTo(targetOption, offsetOption) { - var target; - var offset = offsetOption ? parseInt(offsetOption) : 0; - - if (typeof targetOption === 'string') { - if (targetOption === 'top') { - target = this.html; - } else if (targetOption === 'bottom') { - offset = document.offsetHeight; - this.html.scrollIntoView({ - behavior: 'smooth', - block: "end", - inline: "nearest" - }); - return; - } else { - target = document.querySelectorAll(targetOption)[0]; - } - } else if (!targetOption.target) { - target = targetOption; - } - - if (target) { - offset = target.getBoundingClientRect().top + offset; - } - - target.scrollIntoView({ - behavior: 'smooth' - }); - } - }, { - key: "update", - value: function update() { - this.updateElements(); - } - }, { - key: "destroy", - value: function destroy() { - _get(_getPrototypeOf(_default.prototype), "destroy", this).call(this); - - window.removeEventListener('scroll', this.checkScroll, false); - } - }]); - - return _default; - }(_default); - - /* - object-assign - (c) Sindre Sorhus - @license MIT - */ - /* eslint-disable no-unused-vars */ - var getOwnPropertySymbols = Object.getOwnPropertySymbols; - var hasOwnProperty = Object.prototype.hasOwnProperty; - var propIsEnumerable = Object.prototype.propertyIsEnumerable; - - function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); - } - - function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } - } - - var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; - }; - - function E () { - // Keep this empty so it's easier to inherit from - // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3) - } - - E.prototype = { - on: function (name, callback, ctx) { - var e = this.e || (this.e = {}); - - (e[name] || (e[name] = [])).push({ - fn: callback, - ctx: ctx - }); - - return this; - }, - - once: function (name, callback, ctx) { - var self = this; - function listener () { - self.off(name, listener); - callback.apply(ctx, arguments); - } - listener._ = callback; - return this.on(name, listener, ctx); - }, - - emit: function (name) { - var data = [].slice.call(arguments, 1); - var evtArr = ((this.e || (this.e = {}))[name] || []).slice(); - var i = 0; - var len = evtArr.length; - - for (i; i < len; i++) { - evtArr[i].fn.apply(evtArr[i].ctx, data); - } - - return this; - }, - - off: function (name, callback) { - var e = this.e || (this.e = {}); - var evts = e[name]; - var liveEvents = []; - - if (evts && callback) { - for (var i = 0, len = evts.length; i < len; i++) { - if (evts[i].fn !== callback && evts[i].fn._ !== callback) - liveEvents.push(evts[i]); - } - } - - // Remove event from queue to prevent memory leak - // Suggested by https://github.com/lazd - // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910 - - (liveEvents.length) - ? e[name] = liveEvents - : delete e[name]; - - return this; - } - }; - - var tinyEmitter = E; - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var lethargy = createCommonjsModule(function (module, exports) { - // Generated by CoffeeScript 1.9.2 - (function() { - var root; - - root = exports !== null ? exports : this; - - root.Lethargy = (function() { - function Lethargy(stability, sensitivity, tolerance, delay) { - this.stability = stability != null ? Math.abs(stability) : 8; - this.sensitivity = sensitivity != null ? 1 + Math.abs(sensitivity) : 100; - this.tolerance = tolerance != null ? 1 + Math.abs(tolerance) : 1.1; - this.delay = delay != null ? delay : 150; - this.lastUpDeltas = (function() { - var i, ref, results; - results = []; - for (i = 1, ref = this.stability * 2; 1 <= ref ? i <= ref : i >= ref; 1 <= ref ? i++ : i--) { - results.push(null); - } - return results; - }).call(this); - this.lastDownDeltas = (function() { - var i, ref, results; - results = []; - for (i = 1, ref = this.stability * 2; 1 <= ref ? i <= ref : i >= ref; 1 <= ref ? i++ : i--) { - results.push(null); - } - return results; - }).call(this); - this.deltasTimestamp = (function() { - var i, ref, results; - results = []; - for (i = 1, ref = this.stability * 2; 1 <= ref ? i <= ref : i >= ref; 1 <= ref ? i++ : i--) { - results.push(null); - } - return results; - }).call(this); - } - - Lethargy.prototype.check = function(e) { - var lastDelta; - e = e.originalEvent || e; - if (e.wheelDelta != null) { - lastDelta = e.wheelDelta; - } else if (e.deltaY != null) { - lastDelta = e.deltaY * -40; - } else if ((e.detail != null) || e.detail === 0) { - lastDelta = e.detail * -40; - } - this.deltasTimestamp.push(Date.now()); - this.deltasTimestamp.shift(); - if (lastDelta > 0) { - this.lastUpDeltas.push(lastDelta); - this.lastUpDeltas.shift(); - return this.isInertia(1); - } else { - this.lastDownDeltas.push(lastDelta); - this.lastDownDeltas.shift(); - return this.isInertia(-1); - } - return false; - }; - - Lethargy.prototype.isInertia = function(direction) { - var lastDeltas, lastDeltasNew, lastDeltasOld, newAverage, newSum, oldAverage, oldSum; - lastDeltas = direction === -1 ? this.lastDownDeltas : this.lastUpDeltas; - if (lastDeltas[0] === null) { - return direction; - } - if (this.deltasTimestamp[(this.stability * 2) - 2] + this.delay > Date.now() && lastDeltas[0] === lastDeltas[(this.stability * 2) - 1]) { - return false; - } - lastDeltasOld = lastDeltas.slice(0, this.stability); - lastDeltasNew = lastDeltas.slice(this.stability, this.stability * 2); - oldSum = lastDeltasOld.reduce(function(t, s) { - return t + s; - }); - newSum = lastDeltasNew.reduce(function(t, s) { - return t + s; - }); - oldAverage = oldSum / lastDeltasOld.length; - newAverage = newSum / lastDeltasNew.length; - if (Math.abs(oldAverage) < Math.abs(newAverage * this.tolerance) && (this.sensitivity < Math.abs(newAverage))) { - return direction; - } else { - return false; - } - }; - - Lethargy.prototype.showLastUpDeltas = function() { - return this.lastUpDeltas; - }; - - Lethargy.prototype.showLastDownDeltas = function() { - return this.lastDownDeltas; - }; - - return Lethargy; - - })(); - - }).call(commonjsGlobal); - }); - - var support = (function getSupport() { - return { - hasWheelEvent: 'onwheel' in document, - hasMouseWheelEvent: 'onmousewheel' in document, - hasTouch: 'ontouchstart' in document, - hasTouchWin: navigator.msMaxTouchPoints && navigator.msMaxTouchPoints > 1, - hasPointer: !!window.navigator.msPointerEnabled, - hasKeyDown: 'onkeydown' in document, - isFirefox: navigator.userAgent.indexOf('Firefox') > -1 - }; - })(); - - var toString = Object.prototype.toString, - hasOwnProperty$1 = Object.prototype.hasOwnProperty; - - var bindallStandalone = function(object) { - if(!object) return console.warn('bindAll requires at least one argument.'); - - var functions = Array.prototype.slice.call(arguments, 1); - - if (functions.length === 0) { - - for (var method in object) { - if(hasOwnProperty$1.call(object, method)) { - if(typeof object[method] == 'function' && toString.call(object[method]) == "[object Function]") { - functions.push(method); - } - } - } - } - - for(var i = 0; i < functions.length; i++) { - var f = functions[i]; - object[f] = bind(object[f], object); - } - }; - - /* - Faster bind without specific-case checking. (see https://coderwall.com/p/oi3j3w). - bindAll is only needed for events binding so no need to make slow fixes for constructor - or partial application. - */ - function bind(func, context) { - return function() { - return func.apply(context, arguments); - }; - } - - var Lethargy = lethargy.Lethargy; - - - - var EVT_ID = 'virtualscroll'; - - var src = VirtualScroll; - - var keyCodes = { - LEFT: 37, - UP: 38, - RIGHT: 39, - DOWN: 40, - SPACE: 32 - }; - - function VirtualScroll(options) { - bindallStandalone(this, '_onWheel', '_onMouseWheel', '_onTouchStart', '_onTouchMove', '_onKeyDown'); - - this.el = window; - if (options && options.el) { - this.el = options.el; - delete options.el; - } - this.options = objectAssign({ - mouseMultiplier: 1, - touchMultiplier: 2, - firefoxMultiplier: 15, - keyStep: 120, - preventTouch: false, - unpreventTouchClass: 'vs-touchmove-allowed', - limitInertia: false, - useKeyboard: true - }, options); - - if (this.options.limitInertia) this._lethargy = new Lethargy(); - - this._emitter = new tinyEmitter(); - this._event = { - y: 0, - x: 0, - deltaX: 0, - deltaY: 0 - }; - this.touchStartX = null; - this.touchStartY = null; - this.bodyTouchAction = null; - - if (this.options.passive !== undefined) { - this.listenerOptions = {passive: this.options.passive}; - } - } - - VirtualScroll.prototype._notify = function(e) { - var evt = this._event; - evt.x += evt.deltaX; - evt.y += evt.deltaY; - - this._emitter.emit(EVT_ID, { - x: evt.x, - y: evt.y, - deltaX: evt.deltaX, - deltaY: evt.deltaY, - originalEvent: e - }); - }; - - VirtualScroll.prototype._onWheel = function(e) { - var options = this.options; - if (this._lethargy && this._lethargy.check(e) === false) return; - var evt = this._event; - - // In Chrome and in Firefox (at least the new one) - evt.deltaX = e.wheelDeltaX || e.deltaX * -1; - evt.deltaY = e.wheelDeltaY || e.deltaY * -1; - - // for our purpose deltamode = 1 means user is on a wheel mouse, not touch pad - // real meaning: https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent#Delta_modes - if(support.isFirefox && e.deltaMode == 1) { - evt.deltaX *= options.firefoxMultiplier; - evt.deltaY *= options.firefoxMultiplier; - } - - evt.deltaX *= options.mouseMultiplier; - evt.deltaY *= options.mouseMultiplier; - - this._notify(e); - }; - - VirtualScroll.prototype._onMouseWheel = function(e) { - if (this.options.limitInertia && this._lethargy.check(e) === false) return; - - var evt = this._event; - - // In Safari, IE and in Chrome if 'wheel' isn't defined - evt.deltaX = (e.wheelDeltaX) ? e.wheelDeltaX : 0; - evt.deltaY = (e.wheelDeltaY) ? e.wheelDeltaY : e.wheelDelta; - - this._notify(e); - }; - - VirtualScroll.prototype._onTouchStart = function(e) { - var t = (e.targetTouches) ? e.targetTouches[0] : e; - this.touchStartX = t.pageX; - this.touchStartY = t.pageY; - }; - - VirtualScroll.prototype._onTouchMove = function(e) { - var options = this.options; - if(options.preventTouch - && !e.target.classList.contains(options.unpreventTouchClass)) { - e.preventDefault(); - } - - var evt = this._event; - - var t = (e.targetTouches) ? e.targetTouches[0] : e; - - evt.deltaX = (t.pageX - this.touchStartX) * options.touchMultiplier; - evt.deltaY = (t.pageY - this.touchStartY) * options.touchMultiplier; - - this.touchStartX = t.pageX; - this.touchStartY = t.pageY; - - this._notify(e); - }; - - VirtualScroll.prototype._onKeyDown = function(e) { - var evt = this._event; - evt.deltaX = evt.deltaY = 0; - var windowHeight = window.innerHeight - 40; - - switch(e.keyCode) { - case keyCodes.LEFT: - case keyCodes.UP: - evt.deltaY = this.options.keyStep; - break; - - case keyCodes.RIGHT: - case keyCodes.DOWN: - evt.deltaY = - this.options.keyStep; - break; - case e.shiftKey: - evt.deltaY = windowHeight; - break; - case keyCodes.SPACE: - evt.deltaY = - windowHeight; - break; - default: - return; - } - - this._notify(e); - }; - - VirtualScroll.prototype._bind = function() { - if(support.hasWheelEvent) this.el.addEventListener('wheel', this._onWheel, this.listenerOptions); - if(support.hasMouseWheelEvent) this.el.addEventListener('mousewheel', this._onMouseWheel, this.listenerOptions); - - if(support.hasTouch) { - this.el.addEventListener('touchstart', this._onTouchStart, this.listenerOptions); - this.el.addEventListener('touchmove', this._onTouchMove, this.listenerOptions); - } - - if(support.hasPointer && support.hasTouchWin) { - this.bodyTouchAction = document.body.style.msTouchAction; - document.body.style.msTouchAction = 'none'; - this.el.addEventListener('MSPointerDown', this._onTouchStart, true); - this.el.addEventListener('MSPointerMove', this._onTouchMove, true); - } - - if(support.hasKeyDown && this.options.useKeyboard) document.addEventListener('keydown', this._onKeyDown); - }; - - VirtualScroll.prototype._unbind = function() { - if(support.hasWheelEvent) this.el.removeEventListener('wheel', this._onWheel); - if(support.hasMouseWheelEvent) this.el.removeEventListener('mousewheel', this._onMouseWheel); - - if(support.hasTouch) { - this.el.removeEventListener('touchstart', this._onTouchStart); - this.el.removeEventListener('touchmove', this._onTouchMove); - } - - if(support.hasPointer && support.hasTouchWin) { - document.body.style.msTouchAction = this.bodyTouchAction; - this.el.removeEventListener('MSPointerDown', this._onTouchStart, true); - this.el.removeEventListener('MSPointerMove', this._onTouchMove, true); - } - - if(support.hasKeyDown && this.options.useKeyboard) document.removeEventListener('keydown', this._onKeyDown); - }; - - VirtualScroll.prototype.on = function(cb, ctx) { - this._emitter.on(EVT_ID, cb, ctx); - - var events = this._emitter.e; - if (events && events[EVT_ID] && events[EVT_ID].length === 1) this._bind(); - }; - - VirtualScroll.prototype.off = function(cb, ctx) { - this._emitter.off(EVT_ID, cb, ctx); - - var events = this._emitter.e; - if (!events[EVT_ID] || events[EVT_ID].length <= 0) this._unbind(); - }; - - VirtualScroll.prototype.reset = function() { - var evt = this._event; - evt.x = 0; - evt.y = 0; - }; - - VirtualScroll.prototype.destroy = function() { - this._emitter.off(); - this._unbind(); - }; - - function lerp(start, end, amt) { - return (1 - amt) * start + amt * end; - } - - function getTranslate(el) { - var translate = {}; - if (!window.getComputedStyle) return; - var style = getComputedStyle(el); - var transform = style.transform || style.webkitTransform || style.mozTransform; - var mat = transform.match(/^matrix3d\((.+)\)$/); - if (mat) return parseFloat(mat[1].split(', ')[13]); - mat = transform.match(/^matrix\((.+)\)$/); - translate.x = mat ? parseFloat(mat[1].split(', ')[4]) : 0; - translate.y = mat ? parseFloat(mat[1].split(', ')[5]) : 0; - return translate; - } - - /** - * Returns an array containing all the parent nodes of the given node - * @param {object} node - * @return {array} parent nodes - */ - function getParents(elem) { - // Set up a parent array - var parents = []; // Push each parent element to the array - - for (; elem && elem !== document; elem = elem.parentNode) { - parents.push(elem); - } // Return our parent array - - - return parents; - } // https://gomakethings.com/how-to-get-the-closest-parent-element-with-a-matching-selector-using-vanilla-javascript/ - - var _default$2 = - /*#__PURE__*/ - function (_Core) { - _inherits(_default, _Core); - - function _default() { - var _this; - - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, _default); - - _this = _possibleConstructorReturn(this, _getPrototypeOf(_default).call(this, options)); - _this.inertia = _this.inertia * 0.1; - _this.isScrolling = false; - _this.isDraggingScrollbar = false; - _this.isTicking = false; - _this.hasScrollTicking = false; - _this.parallaxElements = []; - _this.inertiaRatio = 1; - _this.stop = false; - return _this; - } - - _createClass(_default, [{ - key: "init", - value: function init() { - var _this2 = this; - - this.html.classList.add(this.smoothClass); - this.instance = _objectSpread({ - delta: { - x: 0, - y: 0 - } - }, this.instance); - var vs = new src({ - mouseMultiplier: navigator.platform.indexOf('Win') > -1 ? 1 : 0.4, - touchMultiplier: 4, - firefoxMultiplier: 30 - }); - vs.on(function (e) { - if (_this2.stop) { - return; - } - - if (!_this2.isTicking && !_this2.isDraggingScrollbar) { - requestAnimationFrame(function () { - if (!_this2.isScrolling) _this2.startScrolling(); - - _this2.updateDelta(e); - }); - _this2.isTicking = true; - } - - _this2.isTicking = false; - }); - this.setScrollLimit(); - this.initScrollBar(); - this.addSections(); - this.addElements(); - this.detectElements(); - this.transformElements(true); - - _get(_getPrototypeOf(_default.prototype), "init", this).call(this); - } - }, { - key: "setScrollLimit", - value: function setScrollLimit() { - this.instance.limit = this.el.offsetHeight - this.windowHeight; - } - }, { - key: "startScrolling", - value: function startScrolling() { - this.isScrolling = true; - this.checkScroll(); - this.html.classList.add(this.scrollingClass); - } - }, { - key: "stopScrolling", - value: function stopScrolling() { - this.isScrolling = false; - this.inertiaRatio = 1; - this.instance.scroll.y = Math.round(this.instance.scroll.y); - this.html.classList.remove(this.scrollingClass); - } - }, { - key: "checkScroll", - value: function checkScroll() { - var _this3 = this; - - if (this.isScrolling || this.isDraggingScrollbar) { - if (!this.hasScrollTicking) { - requestAnimationFrame(function () { - return _this3.checkScroll(); - }); - this.hasScrollTicking = true; - } - - var distance = Math.abs(this.instance.delta.y - this.instance.scroll.y); - - if (distance < 0.5 && this.instance.delta.y != 0 || distance < 0.5 && this.instance.delta.y == 0) { - this.stopScrolling(); - } - - this.updateScroll(); - - for (var i = this.sections.length - 1; i >= 0; i--) { - if (this.sections[i].persistent || this.instance.scroll.y > this.sections[i].offset && this.instance.scroll.y < this.sections[i].limit) { - this.transform(this.sections[i].el, 0, -this.instance.scroll.y); - this.sections[i].el.style.visibility = 'visible'; - this.sections[i].inView = true; - } else { - this.sections[i].el.style.visibility = 'hidden'; - this.sections[i].inView = false; - this.transform(this.sections[i].el, 0, 0); - } - } - - if (this.getDirection) { - this.addDirection(); - } - - if (this.getSpeed) { - this.addSpeed(); - this.timestamp = Date.now(); - } - - this.detectElements(); - this.transformElements(); - var scrollBarTranslation = this.instance.scroll.y / this.instance.limit * this.scrollBarLimit; - this.transform(this.scrollbarThumb, 0, scrollBarTranslation); - - _get(_getPrototypeOf(_default.prototype), "checkScroll", this).call(this); - - this.hasScrollTicking = false; - } - } - }, { - key: "checkResize", - value: function checkResize() { - this.windowHeight = window.innerHeight; - this.windowMiddle = this.windowHeight / 2; - this.update(); - } - }, { - key: "updateDelta", - value: function updateDelta(e) { - this.instance.delta.y -= e.deltaY; - if (this.instance.delta.y < 0) this.instance.delta.y = 0; - if (this.instance.delta.y > this.instance.limit) this.instance.delta.y = this.instance.limit; - } - }, { - key: "updateScroll", - value: function updateScroll() { - if (this.isScrolling) { - this.instance.scroll.y = lerp(this.instance.scroll.y, this.instance.delta.y, this.inertia * this.inertiaRatio); - } else if (this.isDraggingScrollBar) { - this.instance.scroll.y = lerp(this.instance.scroll.y, this.instance.delta.y, this.inertia * 2); - } else { - this.instance.scroll.y = this.instance.delta.y; - } - } - }, { - key: "addDirection", - value: function addDirection() { - if (this.instance.delta.y > this.instance.scroll.y) { - if (this.instance.direction !== 'down') { - this.instance.direction = 'down'; - } - } else if (this.instance.delta.y < this.instance.scroll.y) { - if (this.instance.direction !== 'up') { - this.instance.direction = 'up'; - } - } - } - }, { - key: "addSpeed", - value: function addSpeed() { - if (this.instance.delta.y != this.instance.scroll.y) { - this.instance.speed = (this.instance.delta.y - this.instance.scroll.y) / (Date.now() - this.timestamp); - } else { - this.instance.speed = 0; - } - } - }, { - key: "initScrollBar", - value: function initScrollBar() { - var _this4 = this; - - this.scrollbar = document.createElement('span'); - this.scrollbarThumb = document.createElement('span'); - this.scrollbar.classList.add("".concat(this.scrollbarClass)); - this.scrollbarThumb.classList.add("".concat(this.scrollbarClass, "_thumb")); - this.scrollbar.append(this.scrollbarThumb); - document.body.append(this.scrollbar); - this.scrollbarThumb.style.height = "".concat(window.innerHeight * window.innerHeight / (this.instance.limit + window.innerHeight), "px"); - this.scrollBarLimit = window.innerHeight - this.scrollbarThumb.getBoundingClientRect().height; - this.scrollbarThumb.addEventListener('mousedown', function (e) { - return _this4.getScrollBar(e); - }); - window.addEventListener('mouseup', function (e) { - return _this4.releaseScrollBar(e); - }); - window.addEventListener('mousemove', function (e) { - return _this4.moveScrollBar(e); - }); - } - }, { - key: "reinitScrollBar", - value: function reinitScrollBar() { - this.scrollbarThumb.style.height = "".concat(window.innerHeight * window.innerHeight / this.instance.limit, "px"); - this.scrollBarLimit = window.innerHeight - this.scrollbarThumb.getBoundingClientRect().height; - } - }, { - key: "destroyScrollBar", - value: function destroyScrollBar() { - var _this5 = this; - - this.scrollbarThumb.removeEventListener('mousedown', function (e) { - return _this5.getScrollBar(e); - }); - window.removeEventListener('mouseup', function (e) { - return _this5.releaseScrollBar(e); - }); - window.removeEventListener('mousemove', function (e) { - return _this5.moveScrollBar(e); - }); - } - }, { - key: "getScrollBar", - value: function getScrollBar(e) { - this.isDraggingScrollbar = true; - this.checkScroll(); - this.html.classList.remove(this.scrollingClass); - this.html.classList.add(this.draggingClass); - } - }, { - key: "releaseScrollBar", - value: function releaseScrollBar(e) { - this.isDraggingScrollbar = false; - this.html.classList.add(this.scrollingClass); - this.html.classList.remove(this.draggingClass); - } - }, { - key: "moveScrollBar", - value: function moveScrollBar(e) { - var _this6 = this; - - if (!this.isTicking && this.isDraggingScrollbar) { - requestAnimationFrame(function () { - var y = e.clientY * 100 / window.innerHeight * _this6.instance.limit / 100; - - if (y > 0 && y < _this6.instance.limit) { - _this6.instance.delta.y = y; - } - }); - this.isTicking = true; - } - - this.isTicking = false; - } - }, { - key: "addElements", - value: function addElements() { - var _this7 = this; - - this.els = []; - this.parallaxElements = []; - var count = 0; - this.sections.forEach(function (section, y) { - var els = _this7.sections[y].el.querySelectorAll("[data-".concat(_this7.name, "]")); - - els.forEach(function (el, i) { - var cl = el.dataset[_this7.name + 'Class'] || _this7["class"]; - var top; - var repeat = el.dataset[_this7.name + 'Repeat']; - var call = el.dataset[_this7.name + 'Call']; - var position = el.dataset[_this7.name + 'Position']; - var delay = el.dataset[_this7.name + 'Delay']; - var direction = el.dataset[_this7.name + 'Direction']; - var sticky = typeof el.dataset[_this7.name + 'Sticky'] === 'string'; - var speed = el.dataset[_this7.name + 'Speed'] ? parseFloat(el.dataset[_this7.name + 'Speed']) / 10 : false; - var offset = typeof el.dataset[_this7.name + 'Offset'] === 'string' ? el.dataset[_this7.name + 'Offset'].split(',') : false; - var target = el.dataset[_this7.name + 'Target']; - var targetEl; - - if (target !== undefined) { - targetEl = document.querySelector("".concat(target)); - } else { - targetEl = el; - } - - if (!_this7.sections[y].inView) { - top = targetEl.getBoundingClientRect().top - getTranslate(_this7.sections[y].el).y - getTranslate(targetEl).y; - } else { - top = targetEl.getBoundingClientRect().top + _this7.instance.scroll.y - getTranslate(targetEl).y; - } - - var bottom = top + targetEl.offsetHeight; - var middle = (bottom - top) / 2 + top; - - if (sticky) { - top += window.innerHeight; - bottom = top + targetEl.offsetHeight - window.innerHeight - el.offsetHeight; - middle = (bottom - top) / 2 + top; - } - - if (repeat == 'false') { - repeat = false; - } else if (repeat != undefined) { - repeat = true; - } else { - repeat = _this7.repeat; - } - - var relativeOffset = [0, 0]; - - if (offset) { - for (var i = 0; i < offset.length; i++) { - if (offset[i].includes('%')) { - relativeOffset[i] = parseInt(offset[i].replace('%', '') * _this7.windowHeight / 100); - } else { - relativeOffset[i] = parseInt(offset[i]); - } - } - } - - var mappedEl = { - el: el, - id: count, - "class": cl, - top: top + relativeOffset[0], - middle: middle, - bottom: bottom - relativeOffset[1], - offset: offset, - repeat: repeat, - inView: false, - call: call, - speed: speed, - delay: delay, - position: position, - target: targetEl, - direction: direction, - sticky: sticky - }; - count++; - - _this7.els.push(mappedEl); - - if (speed !== false || sticky) { - _this7.parallaxElements.push(mappedEl); - } - }); - }); - } - }, { - key: "addSections", - value: function addSections() { - var _this8 = this; - - this.sections = []; - var sections = this.el.querySelectorAll("[data-".concat(this.name, "-section]")); - sections.forEach(function (section, i) { - var offset = section.getBoundingClientRect().top - window.innerHeight * 1.5 - getTranslate(section).y; - var limit = offset + section.getBoundingClientRect().height + window.innerHeight * 2; - var persistent = typeof section.dataset[_this8.name + 'Persistent'] === 'string'; - var inView = false; - - if (_this8.instance.scroll.y >= offset && _this8.instance.scroll.y <= limit) { - inView = true; - } - - var mappedSection = { - el: section, - offset: offset, - limit: limit, - inView: inView, - persistent: persistent - }; - _this8.sections[i] = mappedSection; - }); - } - }, { - key: "transform", - value: function transform(element, x, y, delay) { - var transform; - - if (!delay) { - transform = "matrix(1,0,0,1,".concat(x, ",").concat(y, ")"); - } else { - var start = getTranslate(element); - var lerpX = lerp(start.x, x, delay); - var lerpY = lerp(start.y, y, delay); - transform = "matrix(1,0,0,1,".concat(lerpX, ",").concat(lerpY, ")"); - } - - element.style.webkitTransform = transform; - element.style.msTransform = transform; - element.style.transform = transform; - } - }, { - key: "transformElements", - value: function transformElements(isForced) { - var _this9 = this; - - var scrollBottom = this.instance.scroll.y + this.windowHeight; - var scrollMiddle = this.instance.scroll.y + this.windowMiddle; - this.parallaxElements.forEach(function (current, i) { - var transformDistance = false; - - if (isForced) { - transformDistance = 0; - } - - if (current.inView) { - switch (current.position) { - case 'top': - transformDistance = _this9.instance.scroll.y * -current.speed; - break; - - case 'bottom': - transformDistance = (_this9.instance.limit - scrollBottom + _this9.windowHeight) * current.speed; - break; - - default: - transformDistance = (scrollMiddle - current.middle) * -current.speed; - break; - } - } - - if (current.sticky) { - if (current.inView) { - transformDistance = _this9.instance.scroll.y - current.top + window.innerHeight; - } else { - if (_this9.instance.scroll.y < current.top - window.innerHeight && _this9.instance.scroll.y < current.top - window.innerHeight / 2) { - transformDistance = 0; - } else if (_this9.instance.scroll.y > current.bottom && _this9.instance.scroll.y > current.bottom + 100) { - transformDistance = current.bottom - current.top + window.innerHeight; - } else { - transformDistance = false; - } - } - } - - if (transformDistance !== false) { - if (current.direction === 'horizontal') { - _this9.transform(current.el, transformDistance, 0, isForced ? false : current.delay); - } else { - _this9.transform(current.el, 0, transformDistance, isForced ? false : current.delay); - } - } - }); - } - /** - * Scroll to a desired target. - * - * @param {object} options - * Available options : - * {node, string, "top", "bottom"} targetOption - The DOM element we want to scroll to - * {int} offsetOption - An absolute vertical scroll value to reach, or an offset to apply on top of given `target` or `sourceElem`'s target - * {boolean} toBottom - Set to true to scroll all the way to the bottom - * @return {void} - */ - - }, { - key: "scrollTo", - value: function scrollTo(targetOption, offsetOption) { - var _this10 = this; - - var target; - var offset = offsetOption ? parseInt(offsetOption) : 0; - - if (typeof targetOption === 'string') { - if (targetOption === 'top') { - offset = 0; - } else if (targetOption === 'bottom') { - offset = this.instance.limit; - } else { - target = document.querySelectorAll(targetOption)[0]; - } - } else if (!targetOption.target) { - target = targetOption; - } // We have a target, get it's coordinates - - - if (target) { - // Get target offset from top - var targetBCR = target.getBoundingClientRect(); - var offsetTop = targetBCR.top + this.instance.scroll.y; // Try and find the target's parent section - - var targetParents = getParents(target); - var parentSection = targetParents.find(function (candidate) { - return _this10.sections.find(function (section) { - return section.element == candidate; - }); - }); - var parentSectionOffset = 0; - - if (parentSection) { - parentSectionOffset = getTranslate(parentSection).y; // We got a parent section, store it's current offset to remove it later - } // Final value of scroll destination : offsetTop + (optional offset given in options) - (parent's section translate) - - - offset = offsetTop + offset - parentSectionOffset; - } - - offset -= this.instance.scroll.y; - this.instance.delta.y = Math.min(offset, this.instance.limit); // Actual scrollTo (the lerp will do the animation itself) - - this.inertiaRatio = Math.min(4000 / Math.abs(this.instance.delta.y - this.instance.scroll.y), 0.8); - console.log(offset, this.instance.limit); // Update the scroll. If we were in idle state: we're not anymore - - this.isScrolling = true; - this.checkScroll(); - this.html.classList.add(this.scrollingClass); - } - }, { - key: "update", - value: function update() { - this.setScrollLimit(); - this.addSections(); - this.addElements(); - this.detectElements(); - this.updateScroll(); - this.transformElements(true); - } - }, { - key: "startScroll", - value: function startScroll() { - this.stop = false; - } - }, { - key: "stopScroll", - value: function stopScroll() { - this.stop = true; - } - }, { - key: "setScroll", - value: function setScroll(x, y) { - this.instance = { - scroll: { - x: x, - y: y - }, - delta: { - x: x, - y: y - } - }; - } - }, { - key: "destroy", - value: function destroy() { - _get(_getPrototypeOf(_default.prototype), "destroy", this).call(this); - } - }]); - - return _default; - }(_default); - - var _default$3 = - /*#__PURE__*/ - function () { - function _default() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - _classCallCheck(this, _default); - - this.options = options; - Object.assign(this, defaults, options); - this.init(); - } - - _createClass(_default, [{ - key: "init", - value: function init() { - if (!this.smoothMobile) { - this.isMobile = /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); - } - - if (this.smooth === true && !this.isMobile) { - this.scroll = new _default$2(this.options); - } else { - this.scroll = new _default$1(this.options); - } - - this.scroll.init(); - - if (window.location.hash) { - this.scroll.scrollTo(window.location.hash); - } - } - }, { - key: "update", - value: function update() { - this.scroll.update(); - } - }, { - key: "start", - value: function start() { - this.scroll.startScroll(); - } - }, { - key: "stop", - value: function stop() { - this.scroll.stopScroll(); - } - }, { - key: "scrollTo", - value: function scrollTo(target, offset) { - this.scroll.scrollTo(target, offset); - } - }, { - key: "setScroll", - value: function setScroll(x, y) { - this.scroll.setScroll(x, y); - } - }, { - key: "on", - value: function on(event, func) { - this.scroll.setEvents(event, func); - } - }, { - key: "destroy", - value: function destroy() { - this.scroll.destroy(); - } - }]); - - return _default; - }(); - - (function () { - document.documentElement.classList.add('is-loaded'); - document.documentElement.classList.remove('is-loading'); - setTimeout(function () { - document.documentElement.classList.add('is-ready'); - }, 300); - setTimeout(function () { - var scroll = new _default$3({ - el: document.querySelector('#js-scroll'), - smooth: true, - getSpeed: true, - getDirection: true - }); - var dynamicBackgrounds = []; - var dynamicColorElements = []; - scroll.on('scroll', function (instance) { - var progress = 360 * instance.scroll.y / instance.limit; - scroll.el.style.backgroundColor = "hsl(".concat(progress, ", 11%, 81%)"); - dynamicBackgrounds.forEach(function (obj) { - obj.el.style.backgroundColor = "hsl(".concat(progress, ", 11%, 81%)"); - }); - dynamicColorElements.forEach(function (obj) { - obj.el.style.color = "hsl(".concat(progress, ", 11%, 81%)"); - }); - document.documentElement.setAttribute('data-direction', instance.direction); // if(instance.scroll.y >= instance.limit - 10) { - // document.documentElement.classList.remove('is-ready'); - // scroll.stop(); - // scroll.setScroll(0,0); - // setTimeout(() => { - // scroll.update(); - // document.documentElement.classList.add('is-ready'); - // },100) - // setTimeout(() => { - // scroll.start(); - // },1000); - // } - }); - scroll.on('call', function (value, way, obj) { - if (value === 'dynamicBackground') { - if (way === 'enter') { - dynamicBackgrounds.push({ - id: obj.id, - el: obj.el - }); - } else { - for (var i = 0; i < dynamicBackgrounds.length; i++) { - if (obj.id === dynamicBackgrounds[i].id) { - dynamicBackgrounds.splice(i, 1); - } - } - } - } - }); - scroll.on('call', function (value, way, obj) { - if (value === 'dynamicColor') { - if (way === 'enter') { - dynamicColorElements.push({ - id: obj.id, - el: obj.el - }); - } else { - for (var i = 0; i < dynamicColorElements.length; i++) { - if (obj.id === dynamicColorElements[i].id) { - dynamicColorElements.splice(i, 1); - } - } - } - } - }); - }, 1000); - })(); - -}()); +!function(){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var i=0;i=t.top&&nt.bottom)&&i.setOutOfView(t,e)}),this.hasScrollTicking=!1}},{key:"setInView",value:function(t,e){this.els[e].inView=!0,t.el.classList.add(t.class),t.call&&this.dispatchCall(t,"enter"),t.repeat||!1!==t.speed||t.sticky||this.els.splice(e,1)}},{key:"setOutOfView",value:function(t,e){(t.repeat||void 0!==t.speed)&&(this.els[e].inView=!1),t.call&&this.dispatchCall(t,"exit"),t.repeat&&t.el.classList.remove(t.class)}},{key:"dispatchCall",value:function(t,e){this.callWay=e,this.callValue=t.call.split(",").map(function(t){return t.trim()}),this.callObj=t,1==this.callValue.length&&(this.callValue=this.callValue[0]);var i=new Event(this.namespace+"call");window.dispatchEvent(i)}},{key:"dispatchScroll",value:function(){var t=new Event(this.namespace+"scroll");window.dispatchEvent(t)}},{key:"setEvents",value:function(t,e){var i=this;window.addEventListener(this.namespace+t,function(){switch(t){case"scroll":return e(i.instance);case"call":return e(i.callValue,i.callWay,i.callObj);default:return e()}},!1)}},{key:"startScroll",value:function(){}},{key:"stopScroll",value:function(){}},{key:"setScroll",value:function(t,e){this.instance.scroll={x:0,y:0}}},{key:"destroy",value:function(){var e=this;window.removeEventListener("resize",this.checkResize,!1),this.scrollToEls.forEach(function(t){t.removeEventListener("click",e.setScrollTo,!1)})}}]),e}(),t=function(t){function i(){var t,e=0Date.now()&&e[0]===e[2*this.stability-1])&&(n=e.slice(0,this.stability),i=e.slice(this.stability,2*this.stability),a=n.reduce(function(t,e){return t+e}),o=i.reduce(function(t,e){return t+e}),l=a/n.length,s=o/i.length,Math.abs(l)this.sections[i].offset&&this.instance.scroll.ythis.instance.limit&&(this.instance.delta.y=this.instance.limit)}},{key:"updateScroll",value:function(){this.isScrolling?this.instance.scroll.y=H(this.instance.scroll.y,this.instance.delta.y,this.inertia*this.inertiaRatio):this.isDraggingScrollBar?this.instance.scroll.y=H(this.instance.scroll.y,this.instance.delta.y,2*this.inertia):this.instance.scroll.y=this.instance.delta.y}},{key:"addDirection",value:function(){this.instance.delta.y>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):this.instance.delta.y=i&&a.instance.scroll.y<=n&&(o=!0);var l={el:t,offset:i,limit:n,inView:o,persistent:s};a.sections[e]=l})}},{key:"transform",value:function(t,e,i,n){var s;if(n){var o=P(t),l=H(o.x,e,n),a=H(o.y,i,n);s="matrix(1,0,0,1,".concat(l,",").concat(a,")")}else s="matrix(1,0,0,1,".concat(e,",").concat(i,")");t.style.webkitTransform=s,t.style.msTransform=s,t.style.transform=s}},{key:"transformElements",value:function(n){var s=this,o=this.instance.scroll.y+this.windowHeight,l=this.instance.scroll.y+this.windowMiddle;this.parallaxElements.forEach(function(t,e){var i=!1;if(n&&(i=0),t.inView)switch(t.position){case"top":i=s.instance.scroll.y*-t.speed;break;case"bottom":i=(s.instance.limit-o+s.windowHeight)*t.speed;break;default:i=(l-t.middle)*-t.speed}t.sticky&&(i=t.inView?s.instance.scroll.y-t.top+window.innerHeight:s.instance.scroll.yt.bottom&&s.instance.scroll.y>t.bottom+100&&t.bottom-t.top+window.innerHeight),!1!==i&&("horizontal"===t.direction?s.transform(t.el,i,0,!n&&t.delay):s.transform(t.el,0,i,!n&&t.delay))})}},{key:"scrollTo",value:function(t,e){var i,n=this,s=e?parseInt(e):0;if("string"==typeof t?"top"===t?s=0:"bottom"===t?s=this.instance.limit:i=document.querySelectorAll(t)[0]:t.target||(i=t),i){var o=i.getBoundingClientRect().top+this.instance.scroll.y,l=function(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}(i).find(function(e){return n.sections.find(function(t){return t.element==e})}),a=0;l&&(a=P(l).y),s=o+s-a}s-=this.instance.scroll.y,this.instance.delta.y=Math.min(s,this.instance.limit),this.inertiaRatio=Math.min(4e3/Math.abs(this.instance.delta.y-this.instance.scroll.y),.8),console.log(s,this.instance.limit),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}},{key:"update",value:function(){this.setScrollLimit(),this.addSections(),this.addElements(),this.detectElements(),this.updateScroll(),this.transformElements(!0)}},{key:"startScroll",value:function(){this.stop=!1}},{key:"stopScroll",value:function(){this.stop=!0}},{key:"setScroll",value:function(t,e){this.instance={scroll:{x:t,y:e},delta:{x:t,y:e}}}},{key:"destroy",value:function(){r(l(s.prototype),"destroy",this).call(this)}}]),s}(),B=function(){function e(){var t=0 abbr[title] { - text-decoration: none; } - -table { - border-spacing: 0; - border-collapse: collapse; } - -hr { - display: block; - margin: 1em 0; - padding: 0; - height: 1px; - border: 0; - border-top: 1px solid #272727; } - -audio, -canvas, -iframe, -img, -svg, -video { - vertical-align: middle; - /* [1] */ } - -audio:not([controls]) { - display: none; - height: 0; } - -img, -svg { - max-width: 100%; - /* [2] */ - height: auto; } - img[width], img[height], - svg[width], - svg[height] { - /* [4] */ - max-width: none; } - -img { - font-style: italic; - /* [4] */ } - -svg { - fill: currentColor; - /* [5] */ } - -input, -select, -textarea { - display: block; - margin: 0; - padding: 0; - width: 100%; - outline: 0; - border: 0; - border-radius: 0; - background: none transparent; - color: inherit; - font: inherit; - line-height: normal; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; } - -select { - text-transform: none; } - select::-ms-expand { - display: none; } - select::-ms-value { - background: none; - color: inherit; } - -textarea { - overflow: auto; - resize: vertical; } - -button, -.o-button { - display: inline-block; - /* [1] */ - overflow: visible; - /* [2] */ - margin: 0; - /* [3] */ - padding: 0; - outline: 0; - border: 0; - background: none transparent; - color: inherit; - vertical-align: middle; - /* [4] */ - text-align: center; - /* [3] */ - text-decoration: none; - text-transform: none; - font: inherit; - /* [5] */ - line-height: normal; - cursor: pointer; - /* [6] */ - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; } - button:focus, button:hover, - .o-button:focus, - .o-button:hover { - text-decoration: none; } - -@font-face { - font-family: 'Neue Montreal'; - src: url("../fonts/NeueMontreal-Medium.woff2") format("woff2"), url("../fonts/NeueMontreal-Medium.woff") format("woff"); - font-weight: 500; - font-style: normal; } - -html { - color: #222222; - font-family: "Neue Montreal"; - line-height: 1.5; - /* [1] */ } - @media (max-width: 699px) { - html { - font-size: 12px; } } - @media (min-width: 700px) and (max-width: 999px) { - html { - font-size: 13px; } } - @media (min-width: 1000px) and (max-width: 1199px) { - html { - font-size: 14px; } } - @media (min-width: 1200px) and (max-width: 1599px) { - html { - font-size: 16px; - /* [1] */ } } - @media (min-width: 1600px) and (max-width: 1999px) { - html { - font-size: 18px; } } - @media (min-width: 2000px) and (max-width: 2399px) { - html { - font-size: 21px; } } - @media (min-width: 2400px) { - html { - font-size: 24px; } } - html:not(.has-scroll-init) { - cursor: wait; - overflow: hidden; } - html.has-scroll-smooth { - overflow: hidden; } - html.has-scroll-dragging { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; } - -.has-scroll-smooth body { - overflow: hidden; } - -::-moz-selection { - background-color: #FFFFFF; - color: #3297FD; - text-shadow: none; } - -::selection { - background-color: #FFFFFF; - color: #3297FD; - text-shadow: none; } - -a { - transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1); - color: #272727; } - @media (min-width: 1200px) { - a:focus, a:hover { - color: #FFFFFF; } } - -.o-h, h1, .o-h1, h2, .o-h2, h3, .o-h3, h4, .o-h4, h5, .o-h5, h6, .o-h6 { - margin-top: 0; - line-height: 1.5; - margin-bottom: 0; - line-height: 1; - font-weight: 400; } - -h1, .o-h1 { - font-size: 9vw; - text-transform: uppercase; - letter-spacing: -0.05em; } - -h2, .o-h2 { - font-size: 1.375rem; } - -h3, .o-h3 { - font-size: 1.25rem; } - -h4, .o-h4 { - font-size: 1.125rem; } - -h5, .o-h5 { - font-size: 1rem; } - -h6, .o-h6 { - font-size: 0.9375rem; } - -/* stylelint-disable */ -/* stylelint-enable */ -.o-container { - margin-right: auto; - margin-left: auto; - max-width: 1400px; } - @media (min-width: 1000px) { - .o-container { - padding-right: 60px; - padding-left: 60px; } } - @media (max-width: 999px) { - .o-container { - padding-right: 30px; - padding-left: 30px; } } - -/** - * Create ratio-bound content blocks, to keep media (e.g. images, videos) in - * their correct aspect ratios. - * - * http://alistapart.com/article/creating-intrinsic-ratios-for-video - * - * 1. Default cropping is a 1:1 ratio (i.e. a perfect square). - */ -.o-ratio { - position: relative; - display: block; - overflow: hidden; } - .o-ratio:before { - display: block; - padding-bottom: 100%; - /* [1] */ - width: 100%; - content: ""; } - -.o-ratio_content, -.o-ratio > img, -.o-ratio > iframe, -.o-ratio > embed, -.o-ratio > object { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 100%; } - -.o-layout { - margin: 0; - padding: 0; - list-style: none; - font-size: 0; - margin-left: 0; } - .o-layout.-gutter { - margin-left: -3.75rem; } - .o-layout.-gutter-small { - margin-left: -1.875rem; } - .o-layout.-center { - text-align: center; } - .o-layout.-right { - text-align: right; } - .o-layout.-reverse { - direction: rtl; } - .o-layout.-reverse.-flex { - flex-direction: row-reverse; } - .o-layout.-flex { - display: flex; } - .o-layout.-flex.-top { - align-items: flex-start; } - .o-layout.-flex.-middle { - align-items: center; } - .o-layout.-flex.-bottom { - align-items: flex-end; } - .o-layout.-stretch { - align-items: stretch; } - -.o-layout_item { - display: inline-block; - width: 100%; - vertical-align: top; - font-size: 1rem; - padding-left: 0; } - .o-layout.-gutter > .o-layout_item { - padding-left: 3.75rem; } - .o-layout.-gutter-small > .o-layout_item { - padding-left: 1.875rem; } - .o-layout.-middle > .o-layout_item { - vertical-align: middle; } - .o-layout.-bottom > .o-layout_item { - vertical-align: bottom; } - .o-layout.-center > .o-layout_item, - .o-layout.-right > .o-layout_item, - .o-layout.-reverse > .o-layout_item { - text-align: left; } - .o-layout.-reverse > .o-layout_item { - direction: ltr; } - -.o-label, .o-checkbox-label, .o-radio-label { - display: block; - margin-bottom: 0.9375rem; } - -.o-input, .o-select, .o-textarea { - padding: 0.625rem; - border-width: 1px; - border-style: solid; - border-color: lightgray; - background-color: white; } - .o-input:focus, .o-select:focus, .o-textarea:focus { - border-color: gray; } - .o-input::-webkit-input-placeholder, .o-select::-webkit-input-placeholder, .o-textarea::-webkit-input-placeholder { - color: gray; } - .o-input::-moz-placeholder, .o-select::-moz-placeholder, .o-textarea::-moz-placeholder { - color: gray; } - .o-input:-ms-input-placeholder, .o-select:-ms-input-placeholder, .o-textarea:-ms-input-placeholder { - color: gray; } - .o-input::-ms-input-placeholder, .o-select::-ms-input-placeholder, .o-textarea::-ms-input-placeholder { - color: gray; } - .o-input::placeholder, .o-select::placeholder, .o-textarea::placeholder { - color: gray; } - -.o-checkbox, .o-radio { - position: absolute; - width: 0; - opacity: 0; } - .o-checkbox:focus + .o-checkbox-label::before, .o-radio:focus + .o-checkbox-label::before, .o-checkbox:focus + .o-radio-label::before, .o-radio:focus + .o-radio-label::before { - border-color: gray; } - .o-checkbox:checked + .o-checkbox-label::after, .o-radio:checked + .o-checkbox-label::after, .o-checkbox:checked + .o-radio-label::after, .o-radio:checked + .o-radio-label::after { - opacity: 1; } - -.o-checkbox-label, .o-radio-label { - position: relative; - display: inline-block; - margin-right: 0.5em; - padding-left: 1.75rem; } - .o-checkbox-label::before, .o-radio-label::before, .o-checkbox-label::after, .o-radio-label::after { - position: absolute; - top: 50%; - left: 0; - display: inline-block; - margin-top: -0.5625rem; - padding: 0; - width: 1.125rem; - height: 1.125rem; - content: ""; } - .o-checkbox-label::before, .o-radio-label::before { - background-color: #FFFFFF; } - .o-checkbox-label::after, .o-radio-label::after { - border-color: transparent; - background-color: transparent; - background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2213%22%20height%3D%2210.5%22%20viewBox%3D%220%200%2013%2010.5%22%20enable-background%3D%22new%200%200%2013%2010.5%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23424242%22%20d%3D%22M4.8%205.8L2.4%203.3%200%205.7l4.8%204.8L13%202.4c0%200-2.4-2.4-2.4-2.4L4.8%205.8z%22%2F%3E%3C%2Fsvg%3E"); - background-position: center; - background-size: 0.8125rem; - background-repeat: no-repeat; - opacity: 0; } - -.o-radio-label::before, .o-radio-label::after { - border-radius: 50%; } - -.o-radio-label::after { - background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2213%22%20height%3D%2213%22%20viewBox%3D%220%200%2013%2013%22%20enable-background%3D%22new%200%200%2013%2013%22%20xml%3Aspace%3D%22preserve%22%3E%3Ccircle%20fill%3D%22%23424242%22%20cx%3D%226.5%22%20cy%3D%226.5%22%20r%3D%226.5%22%2F%3E%3C%2Fsvg%3E"); - background-size: 0.5rem; } - -.o-select { - position: relative; - z-index: 1; - padding-right: 2.5rem; } - -.o-select-wrap { - position: relative; } - .o-select-wrap::after { - position: absolute; - top: 0; - right: 0; - bottom: 0; - z-index: 2; - width: 2.5rem; - background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20x%3D%220%22%20y%3D%220%22%20width%3D%2213%22%20height%3D%2211.3%22%20viewBox%3D%220%200%2013%2011.3%22%20enable-background%3D%22new%200%200%2013%2011.3%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20fill%3D%22%23424242%22%20points%3D%226.5%2011.3%203.3%205.6%200%200%206.5%200%2013%200%209.8%205.6%20%22%2F%3E%3C%2Fsvg%3E"); - background-position: center; - background-size: 0.625rem; - background-repeat: no-repeat; - content: ""; - pointer-events: none; } - -.o-textarea { - min-height: 6.25rem; } - -.o-button { - position: relative; - z-index: 1; - color: white; - padding: 1.25rem 2.1875rem; - font-size: 0.75rem; - text-transform: uppercase; - letter-spacing: 0.1em; - background-color: #272727; - transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1); - width: 100%; - margin: 1.875rem 0; - text-align: left; } - .o-button::before { - content: ""; - position: absolute; - top: 0; - bottom: 0; - right: 0; - left: 0; - z-index: -1; - transform: scaleY(0); - transform-origin: center top; - background-color: #FFFFFF; - transition: transform 0.3s cubic-bezier(0.215, 0.61, 0.355, 1); } - .o-button:focus, .o-button:hover { - color: #272727; } - .o-button:focus::before, .o-button:hover::before { - transform: scaleY(1); - transform-origin: center bottom; } - -.o-button_icon { - display: inline-block; - vertical-align: middle; - width: 1.875rem; - height: 1.875rem; - margin-right: 0.9375rem; } - .o-button_icon svg { - display: block; - width: 100%; - height: 100%; } - -.o-button_arrow { - position: absolute; - top: 50%; - right: 2.1875rem; - transform: translateY(-50%); } - -.o-scroll { - box-sizing: border-box; - overflow: hidden; - width: 100vw; - background-color: #d4c9c9; } - .has-scroll-smooth .o-scroll { - position: relative; } - -.c-scrollbar { - width: 10px; - position: absolute; - right: 0; - top: 0; - height: 100vh; - transform-origin: center right; - transform: scaleX(1); - transition: transform 0.2s linear; } - .c-scrollbar:hover { - transform: scaleX(1.3); - cursor: -webkit-grab; - cursor: grab; } - -.c-scrollbar_thumb { - background-color: black; - position: absolute; - top: 0; - left: 0; - right: 0; } - .c-scrollbar_thumb:hover { - cursor: pointer; } - -/* Default styles */ -.o-title { - margin: 0; - padding: 2.5rem 0; - perspective: 600px; - -webkit-perspective: 600px; } - -.o-title_line { - display: block; - opacity: 0; - transform-origin: center top; - transform-style: preserve-3d; - transform: translateY(100%) rotateX(-80deg); - transition: opacity 0.8s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1); - font-size: 0; } - .o-title.is-inview .o-title_line { - transform: none; - opacity: 1; } - .o-title.is-inview .o-title_line:nth-child(1) { - transition-delay: 0.4s; } - .o-title.is-inview .o-title_line:nth-child(2) { - transition-delay: 0.5s; } - .o-title.is-inview .o-title_line:nth-child(3) { - transition-delay: 0.6s; } - .o-title.is-inview .o-title_line:nth-child(4) { - transition-delay: 0.7s; } - .o-title_line span { - display: inline-block; - min-width: 0.05em; - font-size: 9vw; } - -.o-image_wrapper { - position: relative; - overflow: hidden; - background-color: #d4c9c9; } - -.o-image { - opacity: 0.75; - mix-blend-mode: multiply; } - .o-image img { - width: 100%; - opacity: 0; - transform: scale(1.4); - transition: opacity 1.2s cubic-bezier(0.215, 0.61, 0.355, 1), transform 1.2s cubic-bezier(0.215, 0.61, 0.355, 1); } - .o-image.is-inview img { - opacity: 1; - transform: scale(1); - transition-delay: 0.6s; } - -.c-header { - position: relative; } - @media (min-width: 1000px) { - .c-header { - height: 100vh; } } - @media (min-width: 1000px) and (max-width: 999px) { - .c-header { - height: 80vh; } } - @media (max-width: 699px) { - .c-header { - height: 50vh; } } - -.c-header_title { - position: absolute; - bottom: 0; - left: 0; - margin: 0; - padding: 2.5rem 0; - perspective: 600px; - -webkit-perspective: 600px; } - -.c-header_line { - position: absolute; - bottom: 0; - right: 0; - left: 0; - margin: 0; - transform: scaleX(0); - transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-header_line.is-inview { - transform: scaleX(1); } - -.c-header_title_line { - display: block; - opacity: 0; - transform-origin: center top; - transform-style: preserve-3d; - transform: translateY(100%) rotateX(-80deg); - transition: opacity 0s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0s cubic-bezier(0.215, 0.61, 0.355, 1); - font-size: 0; } - html.is-ready .c-header_title_line { - transform: none; - opacity: 1; - transition-duration: 0.8s; } - html.is-ready .c-header_title_line:nth-child(1) { - transition-delay: 0.1s; } - html.is-ready .c-header_title_line:nth-child(2) { - transition-delay: 0.2s; } - html.is-ready .c-header_title_line:nth-child(3) { - transition-delay: 0.3s; } - html.is-ready .c-header_title_line:nth-child(4) { - transition-delay: 0.4s; } - .c-header_title_line span { - display: inline-block; - min-width: 0.05em; - font-size: 9vw; } - -.c-header_heading { - margin: 1.875rem 0; } - -.c-header_heading_label { - display: block; - transition: transform 0s cubic-bezier(0.215, 0.61, 0.355, 1); - transform: translateY(-60px); } - html.is-ready .c-header_heading_label { - transform: none; - transition-duration: 0.6s; } - html.is-ready .o-layout_item:nth-child(2) .c-header_heading_label { - transition-delay: 0.1s; } - -.c-header_logo { - position: absolute; - bottom: 3.75rem; - right: 0; - width: 4.375rem; - height: 9.375rem; - opacity: 0; - transform: translateY(120px); - transition: opacity 0s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-header_logo svg { - display: block; - width: 100%; - height: 100%; } - html.is-ready .c-header_logo { - transform: none; - opacity: 1; - transition-delay: 0.6s; - transition-duration: 0.6s; } - -.c-fixed_wrapper { - position: relative; - overflow: hidden; - background-color: #D4C9C9; } - @media (min-width: 1000px) { - .c-fixed_wrapper { - height: 100vh; } } - @media (max-width: 999px) { - .c-fixed_wrapper { - height: 50vh; } } - -.c-fixed_target { - position: absolute; - top: -100vh; - bottom: -100vh; - right: 0; - left: 0; } - -.c-fixed { - position: absolute; - top: -100vh; - right: 0; - left: 0; - height: 100%; - background-size: cover; - background-position: center center; - opacity: 0.75; - mix-blend-mode: multiply; } - html:not(.has-scroll-smooth) .c-fixed { - top: 0; } - -.c-intro { - margin: 7.5rem 0; - font-size: 2.1875rem; - line-height: 1.2; - opacity: 0; - transform: translateY(60px); - transition: opacity 0.6s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-intro.is-inview { - opacity: 1; - transform: none; - transition-delay: 0.3s; } - -.c-features { - padding: 7.5rem 0; } - -.c-features_item { - background-color: rgba(0, 0, 0, 0.1); - border-radius: 20px; - padding: 3.75rem; - margin-bottom: 3.75rem; } - -.c-summary { - margin: 3.75rem 0 7.5rem 0; } - -.c-summary_text { - font-size: 1.125rem; - font-weight: 600; - opacity: 0; - transform: translateY(60px); - transition: transform 1s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-summary.is-inview .c-summary_text { - opacity: 1; - transform: none; } - @media (min-width: 1000px) { - .c-summary_text { - max-width: 320px; } } - -@media (max-width: 999px) { - .c-summary_list { - margin-top: 1.875rem; } } - -.c-summary_list_item { - position: relative; - opacity: 0; - transform: translateY(60px); - transition: opacity 0.6s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-summary_list_item::after { - content: ""; - position: absolute; - bottom: 0; - right: 0; - left: 0; - height: 1px; - background-color: #272727; - transform: scaleX(0); - transform-origin: center left; - transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-summary_list_item.is-inview { - transform: none; - opacity: 1; } - .c-summary_list_item.is-inview::after { - transform: scaleX(1); } - .c-summary_list_item.is-inview:nth-child(1) { - transition-delay: 0.1s; } - .c-summary_list_item.is-inview:nth-child(1)::after { - transition-delay: 0.5s; } - .c-summary_list_item.is-inview:nth-child(2) { - transition-delay: 0.2s; } - .c-summary_list_item.is-inview:nth-child(2)::after { - transition-delay: 0.6s; } - .c-summary_list_item.is-inview:nth-child(3) { - transition-delay: 0.3s; } - .c-summary_list_item.is-inview:nth-child(3)::after { - transition-delay: 0.7s; } - .c-summary_list_item.is-inview:nth-child(4) { - transition-delay: 0.4s; } - .c-summary_list_item.is-inview:nth-child(4)::after { - transition-delay: 0.8s; } - .c-summary_list_item.is-inview:nth-child(5) { - transition-delay: 0.5s; } - .c-summary_list_item.is-inview:nth-child(5)::after { - transition-delay: 0.9s; } - .c-summary_list_item.is-inview:nth-child(6) { - transition-delay: 0.6s; } - .c-summary_list_item.is-inview:nth-child(6)::after { - transition-delay: 1s; } - .c-summary_list_item a { - display: block; - padding: 8px 0; } - -.c-summary_list_icon { - position: absolute; - top: 50%; - right: 0; - transform: translateY(-50%) translateX(30px) rotate(90deg); - opacity: 0; - transition: opacity 0.4s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-summary_list_item.is-inview .c-summary_list_icon { - transform: translateY(-50%) rotate(0deg); - opacity: 1; } - .c-summary_list_item.is-inview:nth-child(1) .c-summary_list_icon { - transition-delay: 0.6s; } - .c-summary_list_item.is-inview:nth-child(2) .c-summary_list_icon { - transition-delay: 0.7s; } - .c-summary_list_item.is-inview:nth-child(3) .c-summary_list_icon { - transition-delay: 0.8s; } - .c-summary_list_item.is-inview:nth-child(4) .c-summary_list_icon { - transition-delay: 0.9s; } - .c-summary_list_item.is-inview:nth-child(5) .c-summary_list_icon { - transition-delay: 1s; } - .c-summary_list_item.is-inview:nth-child(6) .c-summary_list_icon { - transition-delay: 1.1s; } - -.c-section { - position: relative; } - @media (min-width: 1200px) { - .c-section { - padding-bottom: 25vh; - margin-bottom: 35vh; } } - @media (max-width: 1199px) { - .c-section { - padding-bottom: 10vh; - margin-bottom: 10vh; } } - -.c-section_infos { - position: relative; - max-width: 320px; - z-index: 0; } - @media (min-width: 1000px) { - .c-section_infos { - padding-top: 7.5rem; } - .c-section_infos.-padding { - padding-top: 35vh; } } - @media (max-width: 999px) { - .c-section_infos { - margin-bottom: 1.875rem; } } - -.c-section_infos_inner > * { - opacity: 0; - transform: translateY(60px); - transition: opacity 0.6s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); } - -.c-section_infos_inner.is-inview > * { - opacity: 1; - transform: none; } - .c-section_infos_inner.is-inview > *:nth-child(1) { - transition-delay: 0.06s; } - .c-section_infos_inner.is-inview > *:nth-child(2) { - transition-delay: 0.12s; } - .c-section_infos_inner.is-inview > *:nth-child(3) { - transition-delay: 0.18s; } - -.c-sections_infos_text { - margin-top: 0.9375rem; } - -.c-speed-block { - position: relative; } - @media (min-width: 1000px) { - .c-speed-block.-margin { - margin-top: 7.5rem; } } - @media (max-width: 999px) { - .c-speed-block { - margin: 1.875rem 0; } } - @media (max-width: 699px) { - .c-speed-block { - margin: 15px 0; } } - -.c-speed-block_image { - margin-top: -30px; - margin-bottom: -30px; } - -.c-speed-block_title { - font-size: 1.125rem; - text-transform: uppercase; - font-weight: 600; - color: #FFFFFF; - text-align: center; - position: absolute; - bottom: 3.75rem; - right: 0; - left: 0; - opacity: 0; - transform: translateY(60px); - transition: opacity 0.6s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-speed-block_title.is-inview { - opacity: 1; - transform: none; - transition-delay: 0.3s; } - @media (max-width: 1199px) { - .c-speed-block_title { - display: none; } } - -.c-speed-block_bubble { - position: absolute; - right: 20px; - top: 45%; - z-index: 1; - color: #D4C9C9; - padding: 1.5rem 2.5rem; - font-size: 1.25rem; } - .c-speed-block_bubble.-right { - right: -30px; } - .c-speed-block_bubble.-left { - right: auto; - left: -30px; } - .c-speed-block_bubble.-top { - top: -10%; } - .c-speed-block_bubble.-bottom { - top: 70%; } - .c-speed-block_bubble::before { - content: ""; - position: absolute; - top: 0; - bottom: 0; - right: 0; - left: 0; - z-index: -1; - background-color: #272727; - border-radius: 50%; - transform: scale(0); - transition: transform 0.6s cubic-bezier(0.17, 0.67, 0.3, 1.33); } - .c-speed-block_bubble.is-inview::before { - transform: scale(1); - transition-delay: 0.3s; } - @media (max-width: 1199px) { - .c-speed-block_bubble { - display: none; } } - -@media (min-width: 1200px) { - .c-direction-block_wrapper { - min-height: 180vh; } } - -@media (min-width: 1000px) and (max-width: 1199px) { - .c-direction-block_wrapper { - min-height: 130vh; } } - -@media (min-width: 700px) and (max-width: 999px) { - .c-direction-block_wrapper { - min-height: 100vh; } } - -@media (max-width: 699px) { - .c-direction-block_wrapper { - min-height: 70vh; } } - -.c-direction-block { - position: absolute; - right: 0; - left: 0; - z-index: 1; } - @media (min-width: 1200px) { - .c-direction-block { - top: -50vh; - bottom: -50vh; } } - @media (min-width: 700px) and (max-width: 1199px) { - .c-direction-block { - top: -30vh; - bottom: -50vh; } } - @media (max-width: 699px) { - .c-direction-block { - top: -15vh; - bottom: 0; } } - -.c-direction-block_item { - position: absolute; - font-size: 10vw; - white-space: nowrap; - font-weight: 600; - text-transform: uppercase; - line-height: 1; } - .c-direction-block_item span { - display: block; - background-color: #FFFFFF; - white-space: nowrap; - padding: 0 20px; } - .c-direction-block_item.-one { - top: 33%; - transform: translateX(-50vw) rotate(26deg); } - .c-direction-block_item.-two { - top: 45%; } - .c-direction-block_item.-three { - top: 55%; - transform: rotate(9deg); } - .c-direction-block_item.-four { - top: 68%; - transform: translateX(-50vw) rotate(-19deg); } - .c-direction-block_item.-five { - top: 63%; - transform: translateX(-10vw) rotate(3deg); } - -.c-lerp-block { - font-weight: 700; - text-transform: uppercase; } - @media (min-width: 1000px) { - .c-lerp-block:not(:first-child) { - margin-top: 3.75rem; } } - @media (max-width: 999px) { - .c-lerp-block { - margin-top: 1.875rem; } } - -.c-lerp-block_index { - display: inline-block; - vertical-align: middle; - color: #D4C9C9; - padding: 1.5rem 2.5rem; - font-size: 1.25rem; - position: relative; - z-index: 1; } - .c-lerp-block_index::before { - content: ""; - position: absolute; - top: 0; - bottom: 0; - right: 0; - left: 0; - z-index: -1; - background-color: #272727; - border-radius: 50%; - transform: scale(0); - transition: transform 0.6s cubic-bezier(0.17, 0.67, 0.3, 1.33); } - .c-lerp-block_index.is-inview::before { - transform: scale(1); - transition-delay: 0.3s; } - -.c-lerp-block_title { - display: inline-block; - vertical-align: middle; - font-size: 0; - margin-left: 1.25rem; } - .c-lerp-block_title.is-inview > span:not([data-scroll]) { - opacity: 1; - transform: none; - transition-delay: 0.4s; } - .c-lerp-block_title > span:not([data-scroll]) { - opacity: 0; - transform: translateY(60px); - transition: opacity 0.6s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-lerp-block_title span { - display: inline-block; - min-width: 0.3em; } - @media (min-width: 700px) { - .c-lerp-block_title span { - font-size: 2.8125rem; } } - @media (max-width: 699px) { - .c-lerp-block_title span { - font-size: 1.5625rem; } } - -.c-cta_line { - margin: 0; - transform: scaleX(0); - transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-cta_line.is-inview { - transform: scaleX(1); } - -.c-cta_content { - margin: 3.75rem 0; } - -.c-cta_content_text { - max-width: 520px; } - .c-cta_content_text > * { - opacity: 0; - transform: translateY(60px); - transition: opacity 0.6s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-cta_content_text > *:not(:first-child) { - margin-top: 15px; } - .c-cta_content_text.is-inview > * { - opacity: 1; - transform: none; } - .c-cta_content_text.is-inview > *:nth-child(1) { - transition-delay: 0.06s; } - .c-cta_content_text.is-inview > *:nth-child(2) { - transition-delay: 0.12s; } - .c-cta_content_text.is-inview > *:nth-child(3) { - transition-delay: 0.18s; } - -.c-cta_button { - opacity: 0; - transform: translateY(60px); - transition: opacity 0.6s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); } - .c-cta_button.is-inview { - opacity: 1; - transform: none; } - -.c-choochoo_item { - padding: 50vh 0; - font-size: 12.5rem; } - .c-choochoo_item span { - display: block; } - .c-choochoo_item.-reverse span { - transform: rotateY(180deg); } - html[data-direction="up"] .c-choochoo_item span { - transform: rotateY(180deg); } - html[data-direction="up"] .c-choochoo_item.-reverse span { - transform: rotateY(0deg); } - @media (max-width: 1199px) { - .c-choochoo_item { - display: none; } } - -@media (min-width: 1000px) { - .c-damn { - padding: 50vh 0 0 0; } } - -@media (max-width: 999px) { - .c-damn { - padding: 150vh 0 0 0; } } - -/* stylelint-disable */ -.u-2\:1::before { - padding-bottom: 50%; } - -.u-4\:3::before { - padding-bottom: 75%; } - -.u-16\:9::before { - padding-bottom: 56.25%; } - -/* stylelint-enable */ -.u-1\/1 { - width: 100% !important; } - -.u-1\/2 { - width: 50% !important; } - -.u-2\/2 { - width: 100% !important; } - -.u-1\/3 { - width: 33.33333% !important; } - -.u-2\/3 { - width: 66.66667% !important; } - -.u-3\/3 { - width: 100% !important; } - -.u-1\/4 { - width: 25% !important; } - -.u-2\/4 { - width: 50% !important; } - -.u-3\/4 { - width: 75% !important; } - -.u-4\/4 { - width: 100% !important; } - -.u-1\/5 { - width: 20% !important; } - -.u-2\/5 { - width: 40% !important; } - -.u-3\/5 { - width: 60% !important; } - -.u-4\/5 { - width: 80% !important; } - -.u-5\/5 { - width: 100% !important; } - -@media (min-width: 700px) { - .u-1\/2\@from-small { - width: 50%; } } - -@media (min-width: 1000px) { - .u-1\/3\@from-medium { - width: 33.33333%; } } - -@media (min-width: 1000px) { - .u-1\/2\@from-medium { - width: 50%; } } - -@media (min-width: 1000px) { - .u-2\/5\@from-medium { - width: 40%; } } - -@media (min-width: 1000px) { - .u-3\/5\@from-medium { - width: 60%; } } - -.u-float-left { - float: left !important; } - -.u-float-right { - float: right !important; } - -.u-text-center { - text-align: center !important; } - -.u-text-left { - text-align: left !important; } - -.u-text-right { - text-align: right !important; } - -.u-align-baseline { - vertical-align: baseline !important; } - -.u-align-bottom { - vertical-align: bottom !important; } - -.u-align-middle { - vertical-align: middle !important; } - -.u-align-top { - vertical-align: top !important; } - -.u-vertical-center { - font-size: 0; } - .u-vertical-center::before { - display: inline-block; - height: 100%; - content: ""; - vertical-align: middle; } - .u-vertical-center > * { - display: inline-block; - vertical-align: middle; - font-size: 1rem; } - -.u-white { - color: #FFFFFF; } - -.u-label { - font-size: 1.125rem; - text-transform: uppercase; - font-weight: 600; } - -.u-icon { - font-family: "Lucida Grande"; - font-size: 1.125rem; } - -.u-text { - font-size: 0.875rem; } - -.u-clearfix::after { - display: block; - clear: both; - content: ""; } - -.u-truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - word-wrap: normal; - max-width: 100%; } - -[hidden][aria-hidden="false"] { - position: absolute; - display: inherit; - clip: rect(0, 0, 0, 0); } - -[hidden][aria-hidden="false"]:focus { - clip: auto; } - -/** - * Completely remove from the flow but leave available to screen readers. - */ -.u-screen-reader-text { - position: absolute !important; - overflow: hidden; - clip: rect(0 0 0 0); - margin: 0; - padding: 0; - width: 1px; - height: 1px; - border: 0; } - -@media not print { - .u-screen-reader-text\@screen { - position: absolute !important; - overflow: hidden; - clip: rect(0 0 0 0); - margin: 0; - padding: 0; - width: 1px; - height: 1px; - border: 0; } } - -/* - * Extends the `.screen-reader-text` class to allow the element - * to be focusable when navigated to via the keyboard. - * - * @link https://www.drupal.org/node/897638 - * @todo Define styles when focused. - */ -.u-screen-reader-text.-focusable:focus, .u-screen-reader-text.-focusable:active { - clip: auto; - width: auto; - height: auto; } +/*! locomotive-scroll v3.0.0 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}html{box-sizing:border-box}[hidden],template{display:none}*,:after,:before{box-sizing:inherit}address{font-style:inherit}cite,dfn,em,i{font-style:italic}b,strong{font-weight:700}a{text-decoration:none}a svg{pointer-events:none}ol,ul{list-style:none}figure,ol,p,ul{margin:0;padding:0}[tabindex],a,area,button,input,label,select,textarea{touch-action:manipulation}[hreflang]>abbr[title]{text-decoration:none}table{border-spacing:0;border-collapse:collapse}hr{display:block;margin:1em 0;padding:0;height:1px;border:0;border-top:1px solid #272727}audio,canvas,iframe,img,svg,video{vertical-align:middle}audio:not([controls]){display:none;height:0}img,svg{max-width:100%;height:auto}img[height],img[width],svg[height],svg[width]{max-width:none}img{font-style:italic}svg{fill:currentColor}input,select,textarea{display:block;margin:0;padding:0;width:100%;outline:0;border:0;border-radius:0;background:none transparent;color:inherit;font:inherit;line-height:normal;-webkit-appearance:none;-moz-appearance:none;appearance:none}select{text-transform:none}select::-ms-expand{display:none}select::-ms-value{background:none;color:inherit}textarea{overflow:auto;resize:vertical}.o-button,button{display:inline-block;overflow:visible;margin:0;padding:0;outline:0;border:0;background:none transparent;color:inherit;vertical-align:middle;text-align:center;text-transform:none;font:inherit;line-height:normal;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.o-button,.o-button:focus,.o-button:hover,button,button:focus,button:hover{text-decoration:none}@font-face{font-family:Neue Montreal;src:url(../fonts/NeueMontreal-Medium.woff2) format("woff2"),url(../fonts/NeueMontreal-Medium.woff) format("woff");font-weight:500;font-style:normal}html{color:#222;font-family:Neue Montreal;line-height:1.5}@media (max-width:699px){html{font-size:12px}}@media (min-width:700px) and (max-width:999px){html{font-size:13px}}@media (min-width:1000px) and (max-width:1199px){html{font-size:14px}}@media (min-width:1200px) and (max-width:1599px){html{font-size:16px}}@media (min-width:1600px) and (max-width:1999px){html{font-size:18px}}@media (min-width:2000px) and (max-width:2399px){html{font-size:21px}}@media (min-width:2400px){html{font-size:24px}}html:not(.has-scroll-init){cursor:wait;overflow:hidden}html.has-scroll-smooth{overflow:hidden}html.has-scroll-dragging{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.has-scroll-smooth body{overflow:hidden}::-moz-selection{background-color:#fff;color:#3297fd;text-shadow:none}::selection{background-color:#fff;color:#3297fd;text-shadow:none}a{transition:color .3s cubic-bezier(.215,.61,.355,1);color:#272727}@media (min-width:1200px){a:focus,a:hover{color:#fff}}.o-h,.o-h1,.o-h2,.o-h3,.o-h4,.o-h5,.o-h6,h1,h2,h3,h4,h5,h6{margin-top:0;line-height:1.5;margin-bottom:0;line-height:1;font-weight:400}.o-h1,h1{font-size:9vw;text-transform:uppercase;letter-spacing:-.05em}.o-h2,h2{font-size:1.375rem}.o-h3,h3{font-size:1.25rem}.o-h4,h4{font-size:1.125rem}.o-h5,h5{font-size:1rem}.o-h6,h6{font-size:.9375rem}.o-container{margin-right:auto;margin-left:auto;max-width:1400px}@media (min-width:1000px){.o-container{padding-right:60px;padding-left:60px}}@media (max-width:999px){.o-container{padding-right:30px;padding-left:30px}}.o-ratio{position:relative;display:block;overflow:hidden}.o-ratio:before{display:block;padding-bottom:100%;width:100%;content:""}.o-ratio>embed,.o-ratio>iframe,.o-ratio>img,.o-ratio>object,.o-ratio_content{position:absolute;top:0;bottom:0;left:0;width:100%}.o-layout{padding:0;list-style:none;font-size:0;margin:0}.o-layout.-gutter{margin-left:-3.75rem}.o-layout.-gutter-small{margin-left:-1.875rem}.o-layout.-center{text-align:center}.o-layout.-right{text-align:right}.o-layout.-reverse{direction:rtl}.o-layout.-reverse.-flex{flex-direction:row-reverse}.o-layout.-flex{display:flex}.o-layout.-flex.-top{align-items:flex-start}.o-layout.-flex.-middle{align-items:center}.o-layout.-flex.-bottom{align-items:flex-end}.o-layout.-stretch{align-items:stretch}.o-layout_item{display:inline-block;width:100%;vertical-align:top;font-size:1rem;padding-left:0}.o-layout.-gutter>.o-layout_item{padding-left:3.75rem}.o-layout.-gutter-small>.o-layout_item{padding-left:1.875rem}.o-layout.-middle>.o-layout_item{vertical-align:middle}.o-layout.-bottom>.o-layout_item{vertical-align:bottom}.o-layout.-center>.o-layout_item,.o-layout.-reverse>.o-layout_item,.o-layout.-right>.o-layout_item{text-align:left}.o-layout.-reverse>.o-layout_item{direction:ltr}.o-checkbox-label,.o-label,.o-radio-label{display:block;margin-bottom:.9375rem}.o-input,.o-select,.o-textarea{padding:.625rem;border:1px solid #d3d3d3;background-color:#fff}.o-input:focus,.o-select:focus,.o-textarea:focus{border-color:grey}.o-input::-webkit-input-placeholder,.o-select::-webkit-input-placeholder,.o-textarea::-webkit-input-placeholder{color:grey}.o-input::-moz-placeholder,.o-select::-moz-placeholder,.o-textarea::-moz-placeholder{color:grey}.o-input:-ms-input-placeholder,.o-select:-ms-input-placeholder,.o-textarea:-ms-input-placeholder{color:grey}.o-input::-ms-input-placeholder,.o-select::-ms-input-placeholder,.o-textarea::-ms-input-placeholder{color:grey}.o-input::placeholder,.o-select::placeholder,.o-textarea::placeholder{color:grey}.o-checkbox,.o-radio{position:absolute;width:0;opacity:0}.o-checkbox:focus+.o-checkbox-label:before,.o-checkbox:focus+.o-radio-label:before,.o-radio:focus+.o-checkbox-label:before,.o-radio:focus+.o-radio-label:before{border-color:grey}.o-checkbox:checked+.o-checkbox-label:after,.o-checkbox:checked+.o-radio-label:after,.o-radio:checked+.o-checkbox-label:after,.o-radio:checked+.o-radio-label:after{opacity:1}.o-checkbox-label,.o-radio-label{position:relative;display:inline-block;margin-right:.5em;padding-left:1.75rem}.o-checkbox-label:after,.o-checkbox-label:before,.o-radio-label:after,.o-radio-label:before{position:absolute;top:50%;left:0;display:inline-block;margin-top:-.5625rem;padding:0;width:1.125rem;height:1.125rem;content:""}.o-checkbox-label:before,.o-radio-label:before{background-color:#fff}.o-checkbox-label:after,.o-radio-label:after{border-color:transparent;background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='10.5'%3E%3Cpath fill='%23424242' d='M4.8 5.8L2.4 3.3 0 5.7l4.8 4.8L13 2.4 10.6 0 4.8 5.8z'/%3E%3C/svg%3E");background-position:50%;background-size:.8125rem;background-repeat:no-repeat;opacity:0}.o-radio-label:after,.o-radio-label:before{border-radius:50%}.o-radio-label:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13'%3E%3Ccircle fill='%23424242' cx='6.5' cy='6.5' r='6.5'/%3E%3C/svg%3E");background-size:.5rem}.o-select{z-index:1;padding-right:2.5rem}.o-select,.o-select-wrap{position:relative}.o-select-wrap:after{position:absolute;top:0;right:0;bottom:0;z-index:2;width:2.5rem;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='11.3'%3E%3Cpath fill='%23424242' d='M6.5 11.3L3.3 5.6 0 0h13L9.8 5.6z'/%3E%3C/svg%3E");background-position:50%;background-size:.625rem;background-repeat:no-repeat;content:"";pointer-events:none}.o-textarea{min-height:6.25rem}.o-button{position:relative;z-index:1;color:#fff;padding:1.25rem 2.1875rem;font-size:.75rem;text-transform:uppercase;letter-spacing:.1em;background-color:#272727;transition:color .3s cubic-bezier(.215,.61,.355,1);width:100%;margin:1.875rem 0;text-align:left}.o-button:before{content:"";position:absolute;top:0;bottom:0;right:0;left:0;z-index:-1;transform:scaleY(0);transform-origin:center top;background-color:#fff;transition:transform .3s cubic-bezier(.215,.61,.355,1)}.o-button:focus,.o-button:hover{color:#272727}.o-button:focus:before,.o-button:hover:before{transform:scaleY(1);transform-origin:center bottom}.o-button_icon{display:inline-block;vertical-align:middle;width:1.875rem;height:1.875rem;margin-right:.9375rem}.o-button_icon svg{display:block;width:100%;height:100%}.o-button_arrow{position:absolute;top:50%;right:2.1875rem;transform:translateY(-50%)}.o-scroll{box-sizing:border-box;overflow:hidden;width:100vw;background-color:#d4c9c9}.has-scroll-smooth .o-scroll{position:relative}.c-scrollbar{width:10px;position:absolute;right:0;top:0;height:100vh;transform-origin:center right;transform:scaleX(1);transition:transform .2s linear}.c-scrollbar:hover{transform:scaleX(1.3);cursor:-webkit-grab;cursor:grab}.c-scrollbar_thumb{background-color:#000;position:absolute;top:0;left:0;right:0}.c-scrollbar_thumb:hover{cursor:pointer}.o-title{margin:0;padding:2.5rem 0;perspective:600px;-webkit-perspective:600px}.o-title_line{display:block;opacity:0;transform-origin:center top;transform-style:preserve-3d;transform:translateY(100%) rotateX(-80deg);transition:opacity .8s cubic-bezier(.215,.61,.355,1),transform .8s cubic-bezier(.215,.61,.355,1);font-size:0}.o-title.is-inview .o-title_line{transform:none;opacity:1}.o-title.is-inview .o-title_line:first-child{transition-delay:.4s}.o-title.is-inview .o-title_line:nth-child(2){transition-delay:.5s}.o-title.is-inview .o-title_line:nth-child(3){transition-delay:.6s}.o-title.is-inview .o-title_line:nth-child(4){transition-delay:.7s}.o-title_line span{display:inline-block;min-width:.05em;font-size:9vw}.o-image_wrapper{position:relative;overflow:hidden;background-color:#d4c9c9}.o-image{opacity:.75;mix-blend-mode:multiply}.o-image img{width:100%;opacity:0;transform:scale(1.4);transition:opacity 1.2s cubic-bezier(.215,.61,.355,1),transform 1.2s cubic-bezier(.215,.61,.355,1)}.o-image.is-inview img{opacity:1;transform:scale(1);transition-delay:.6s}.c-header{position:relative}@media (min-width:1000px){.c-header{height:100vh}}@media (min-width:1000px) and (max-width:999px){.c-header{height:80vh}}@media (max-width:699px){.c-header{height:50vh}}.c-header_title{padding:2.5rem 0;perspective:600px;-webkit-perspective:600px}.c-header_line,.c-header_title{position:absolute;bottom:0;left:0;margin:0}.c-header_line{right:0;transform:scaleX(0);transition:transform .6s cubic-bezier(.215,.61,.355,1)}.c-header_line.is-inview{transform:scaleX(1)}.c-header_title_line{display:block;opacity:0;transform-origin:center top;transform-style:preserve-3d;transform:translateY(100%) rotateX(-80deg);transition:opacity 0s cubic-bezier(.215,.61,.355,1),transform 0s cubic-bezier(.215,.61,.355,1);font-size:0}html.is-ready .c-header_title_line{transform:none;opacity:1;transition-duration:.8s}html.is-ready .c-header_title_line:first-child{transition-delay:.1s}html.is-ready .c-header_title_line:nth-child(2){transition-delay:.2s}html.is-ready .c-header_title_line:nth-child(3){transition-delay:.3s}html.is-ready .c-header_title_line:nth-child(4){transition-delay:.4s}.c-header_title_line span{display:inline-block;min-width:.05em;font-size:9vw}.c-header_heading{margin:1.875rem 0}.c-header_heading_label{display:block;transition:transform 0s cubic-bezier(.215,.61,.355,1);transform:translateY(-60px)}html.is-ready .c-header_heading_label{transform:none;transition-duration:.6s}html.is-ready .o-layout_item:nth-child(2) .c-header_heading_label{transition-delay:.1s}.c-header_logo{position:absolute;bottom:3.75rem;right:0;width:4.375rem;height:9.375rem;opacity:0;transform:translateY(120px);transition:opacity 0s cubic-bezier(.215,.61,.355,1),transform 0s cubic-bezier(.215,.61,.355,1)}.c-header_logo svg{display:block;width:100%;height:100%}html.is-ready .c-header_logo{transform:none;opacity:1;transition-delay:.6s;transition-duration:.6s}.c-fixed_wrapper{position:relative;overflow:hidden;background-color:#d4c9c9}@media (min-width:1000px){.c-fixed_wrapper{height:100vh}}@media (max-width:999px){.c-fixed_wrapper{height:50vh}}.c-fixed_target{bottom:-100vh}.c-fixed,.c-fixed_target{position:absolute;top:-100vh;right:0;left:0}.c-fixed{height:100%;background-size:cover;background-position:50%;opacity:.75;mix-blend-mode:multiply}html:not(.has-scroll-smooth) .c-fixed{top:0}.c-intro{margin:7.5rem 0;font-size:2.1875rem;line-height:1.2;opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-intro.is-inview{opacity:1;transform:none;transition-delay:.3s}.c-features{padding:7.5rem 0}.c-features_item{background-color:rgba(0,0,0,.1);border-radius:20px;padding:3.75rem;margin-bottom:3.75rem}.c-summary{margin:3.75rem 0 7.5rem}.c-summary_text{font-size:1.125rem;font-weight:600;opacity:0;transform:translateY(60px);transition:transform 1s cubic-bezier(.215,.61,.355,1)}.c-summary.is-inview .c-summary_text{opacity:1;transform:none}@media (min-width:1000px){.c-summary_text{max-width:320px}}@media (max-width:999px){.c-summary_list{margin-top:1.875rem}}.c-summary_list_item{position:relative;opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-summary_list_item:after{content:"";position:absolute;bottom:0;right:0;left:0;height:1px;background-color:#272727;transform:scaleX(0);transform-origin:center left;transition:transform .6s cubic-bezier(.215,.61,.355,1)}.c-summary_list_item.is-inview{transform:none;opacity:1}.c-summary_list_item.is-inview:after{transform:scaleX(1)}.c-summary_list_item.is-inview:first-child{transition-delay:.1s}.c-summary_list_item.is-inview:first-child:after{transition-delay:.5s}.c-summary_list_item.is-inview:nth-child(2){transition-delay:.2s}.c-summary_list_item.is-inview:nth-child(2):after{transition-delay:.6s}.c-summary_list_item.is-inview:nth-child(3){transition-delay:.3s}.c-summary_list_item.is-inview:nth-child(3):after{transition-delay:.7s}.c-summary_list_item.is-inview:nth-child(4){transition-delay:.4s}.c-summary_list_item.is-inview:nth-child(4):after{transition-delay:.8s}.c-summary_list_item.is-inview:nth-child(5){transition-delay:.5s}.c-summary_list_item.is-inview:nth-child(5):after{transition-delay:.9s}.c-summary_list_item.is-inview:nth-child(6){transition-delay:.6s}.c-summary_list_item.is-inview:nth-child(6):after{transition-delay:1s}.c-summary_list_item a{display:block;padding:8px 0}.c-summary_list_icon{position:absolute;top:50%;right:0;transform:translateY(-50%) translateX(30px) rotate(90deg);opacity:0;transition:opacity .4s cubic-bezier(.215,.61,.355,1),transform .4s cubic-bezier(.215,.61,.355,1)}.c-summary_list_item.is-inview .c-summary_list_icon{transform:translateY(-50%) rotate(0deg);opacity:1}.c-summary_list_item.is-inview:first-child .c-summary_list_icon{transition-delay:.6s}.c-summary_list_item.is-inview:nth-child(2) .c-summary_list_icon{transition-delay:.7s}.c-summary_list_item.is-inview:nth-child(3) .c-summary_list_icon{transition-delay:.8s}.c-summary_list_item.is-inview:nth-child(4) .c-summary_list_icon{transition-delay:.9s}.c-summary_list_item.is-inview:nth-child(5) .c-summary_list_icon{transition-delay:1s}.c-summary_list_item.is-inview:nth-child(6) .c-summary_list_icon{transition-delay:1.1s}.c-section{position:relative}@media (min-width:1200px){.c-section{padding-bottom:25vh;margin-bottom:35vh}}@media (max-width:1199px){.c-section{padding-bottom:10vh;margin-bottom:10vh}}.c-section_infos{position:relative;max-width:320px;z-index:0}@media (min-width:1000px){.c-section_infos{padding-top:7.5rem}.c-section_infos.-padding{padding-top:35vh}}@media (max-width:999px){.c-section_infos{margin-bottom:1.875rem}}.c-section_infos_inner>*{opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-section_infos_inner.is-inview>*{opacity:1;transform:none}.c-section_infos_inner.is-inview>:first-child{transition-delay:.06s}.c-section_infos_inner.is-inview>:nth-child(2){transition-delay:.12s}.c-section_infos_inner.is-inview>:nth-child(3){transition-delay:.18s}.c-sections_infos_text{margin-top:.9375rem}.c-speed-block{position:relative}@media (min-width:1000px){.c-speed-block.-margin{margin-top:7.5rem}}@media (max-width:999px){.c-speed-block{margin:1.875rem 0}}@media (max-width:699px){.c-speed-block{margin:15px 0}}.c-speed-block_image{margin-top:-30px;margin-bottom:-30px}.c-speed-block_title{font-size:1.125rem;text-transform:uppercase;font-weight:600;color:#fff;text-align:center;position:absolute;bottom:3.75rem;right:0;left:0;opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-speed-block_title.is-inview{opacity:1;transform:none;transition-delay:.3s}@media (max-width:1199px){.c-speed-block_title{display:none}}.c-speed-block_bubble{position:absolute;right:20px;top:45%;z-index:1;color:#d4c9c9;padding:1.5rem 2.5rem;font-size:1.25rem}.c-speed-block_bubble.-right{right:-30px}.c-speed-block_bubble.-left{right:auto;left:-30px}.c-speed-block_bubble.-top{top:-10%}.c-speed-block_bubble.-bottom{top:70%}.c-speed-block_bubble:before{content:"";position:absolute;top:0;bottom:0;right:0;left:0;z-index:-1;background-color:#272727;border-radius:50%;transform:scale(0);transition:transform .6s cubic-bezier(.17,.67,.3,1.33)}.c-speed-block_bubble.is-inview:before{transform:scale(1);transition-delay:.3s}@media (max-width:1199px){.c-speed-block_bubble{display:none}}@media (min-width:1200px){.c-direction-block_wrapper{min-height:180vh}}@media (min-width:1000px) and (max-width:1199px){.c-direction-block_wrapper{min-height:130vh}}@media (min-width:700px) and (max-width:999px){.c-direction-block_wrapper{min-height:100vh}}@media (max-width:699px){.c-direction-block_wrapper{min-height:70vh}}.c-direction-block{position:absolute;right:0;left:0;z-index:1}@media (min-width:1200px){.c-direction-block{top:-50vh;bottom:-50vh}}@media (min-width:700px) and (max-width:1199px){.c-direction-block{top:-30vh;bottom:-50vh}}@media (max-width:699px){.c-direction-block{top:-15vh;bottom:0}}.c-direction-block_item{position:absolute;font-size:10vw;white-space:nowrap;font-weight:600;text-transform:uppercase;line-height:1}.c-direction-block_item span{display:block;background-color:#fff;white-space:nowrap;padding:0 20px}.c-direction-block_item.-one{top:33%;transform:translateX(-50vw) rotate(26deg)}.c-direction-block_item.-two{top:45%}.c-direction-block_item.-three{top:55%;transform:rotate(9deg)}.c-direction-block_item.-four{top:68%;transform:translateX(-50vw) rotate(-19deg)}.c-direction-block_item.-five{top:63%;transform:translateX(-10vw) rotate(3deg)}.c-lerp-block{font-weight:700;text-transform:uppercase}@media (min-width:1000px){.c-lerp-block:not(:first-child){margin-top:3.75rem}}@media (max-width:999px){.c-lerp-block{margin-top:1.875rem}}.c-lerp-block_index{display:inline-block;vertical-align:middle;color:#d4c9c9;padding:1.5rem 2.5rem;font-size:1.25rem;position:relative;z-index:1}.c-lerp-block_index:before{content:"";position:absolute;top:0;bottom:0;right:0;left:0;z-index:-1;background-color:#272727;border-radius:50%;transform:scale(0);transition:transform .6s cubic-bezier(.17,.67,.3,1.33)}.c-lerp-block_index.is-inview:before{transform:scale(1);transition-delay:.3s}.c-lerp-block_title{display:inline-block;vertical-align:middle;font-size:0;margin-left:1.25rem}.c-lerp-block_title.is-inview>span:not([data-scroll]){opacity:1;transform:none;transition-delay:.4s}.c-lerp-block_title>span:not([data-scroll]){opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-lerp-block_title span{display:inline-block;min-width:.3em}@media (min-width:700px){.c-lerp-block_title span{font-size:2.8125rem}}@media (max-width:699px){.c-lerp-block_title span{font-size:1.5625rem}}.c-cta_line{margin:0;transform:scaleX(0);transition:transform .6s cubic-bezier(.215,.61,.355,1)}.c-cta_line.is-inview{transform:scaleX(1)}.c-cta_content{margin:3.75rem 0}.c-cta_content_text{max-width:520px}.c-cta_content_text>*{opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-cta_content_text>:not(:first-child){margin-top:15px}.c-cta_content_text.is-inview>*{opacity:1;transform:none}.c-cta_content_text.is-inview>:first-child{transition-delay:.06s}.c-cta_content_text.is-inview>:nth-child(2){transition-delay:.12s}.c-cta_content_text.is-inview>:nth-child(3){transition-delay:.18s}.c-cta_button{opacity:0;transform:translateY(60px);transition:opacity .6s cubic-bezier(.215,.61,.355,1),transform .6s cubic-bezier(.215,.61,.355,1)}.c-cta_button.is-inview{opacity:1;transform:none}.c-choochoo_item{padding:50vh 0;font-size:12.5rem}.c-choochoo_item span{display:block}.c-choochoo_item.-reverse span,html[data-direction=up] .c-choochoo_item span{transform:rotateY(180deg)}html[data-direction=up] .c-choochoo_item.-reverse span{transform:rotateY(0deg)}@media (max-width:1199px){.c-choochoo_item{display:none}}@media (min-width:1000px){.c-damn{padding:50vh 0 0}}@media (max-width:999px){.c-damn{padding:150vh 0 0}}.u-2\:1:before{padding-bottom:50%}.u-4\:3:before{padding-bottom:75%}.u-16\:9:before{padding-bottom:56.25%}.u-1\/1{width:100%!important}.u-1\/2{width:50%!important}.u-2\/2{width:100%!important}.u-1\/3{width:33.33333%!important}.u-2\/3{width:66.66667%!important}.u-3\/3{width:100%!important}.u-1\/4{width:25%!important}.u-2\/4{width:50%!important}.u-3\/4{width:75%!important}.u-4\/4{width:100%!important}.u-1\/5{width:20%!important}.u-2\/5{width:40%!important}.u-3\/5{width:60%!important}.u-4\/5{width:80%!important}.u-5\/5{width:100%!important}@media (min-width:700px){.u-1\/2\@from-small{width:50%}}@media (min-width:1000px){.u-1\/3\@from-medium{width:33.33333%}}@media (min-width:1000px){.u-1\/2\@from-medium{width:50%}}@media (min-width:1000px){.u-2\/5\@from-medium{width:40%}}@media (min-width:1000px){.u-3\/5\@from-medium{width:60%}}.u-float-left{float:left!important}.u-float-right{float:right!important}.u-text-center{text-align:center!important}.u-text-left{text-align:left!important}.u-text-right{text-align:right!important}.u-align-baseline{vertical-align:baseline!important}.u-align-bottom{vertical-align:bottom!important}.u-align-middle{vertical-align:middle!important}.u-align-top{vertical-align:top!important}.u-vertical-center{font-size:0}.u-vertical-center:before{display:inline-block;height:100%;content:"";vertical-align:middle}.u-vertical-center>*{display:inline-block;vertical-align:middle;font-size:1rem}.u-white{color:#fff}.u-label{text-transform:uppercase;font-weight:600}.u-icon,.u-label{font-size:1.125rem}.u-icon{font-family:Lucida Grande}.u-text{font-size:.875rem}.u-clearfix:after{display:block;clear:both;content:""}.u-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;max-width:100%}[hidden][aria-hidden=false]{position:absolute;display:inherit;clip:rect(0,0,0,0)}[hidden][aria-hidden=false]:focus{clip:auto}.u-screen-reader-text{position:absolute!important;overflow:hidden;clip:rect(0 0 0 0);margin:0;padding:0;width:1px;height:1px;border:0}@media not print{.u-screen-reader-text\@screen{position:absolute!important;overflow:hidden;clip:rect(0 0 0 0);margin:0;padding:0;width:1px;height:1px;border:0}}.u-screen-reader-text.-focusable:active,.u-screen-reader-text.-focusable:focus{clip:auto;width:auto;height:auto} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6723c024..bf1136e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3572,7 +3572,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3593,12 +3594,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3613,17 +3616,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3740,7 +3746,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3752,6 +3759,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3766,6 +3774,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3773,12 +3782,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3797,6 +3808,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3877,7 +3889,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3889,6 +3902,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3974,7 +3988,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -4010,6 +4025,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4029,6 +4045,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4072,12 +4089,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -4409,6 +4428,18 @@ "vinyl": "^2.0.0" } }, + "gulp-header": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-2.0.9.tgz", + "integrity": "sha512-LMGiBx+qH8giwrOuuZXSGvswcIUh0OiioNkUpLhNyvaC6/Ga8X6cfAeme2L5PqsbXMhL8o8b/OmVqIQdxprhcQ==", + "dev": true, + "requires": { + "concat-with-sourcemaps": "^1.1.0", + "lodash.template": "^4.5.0", + "map-stream": "0.0.7", + "through2": "^2.0.0" + } + }, "gulp-htmlmin": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/gulp-htmlmin/-/gulp-htmlmin-5.0.1.tgz", @@ -5654,6 +5685,12 @@ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, "lodash.assignin": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", @@ -5744,6 +5781,25 @@ "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=", "dev": true }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -5840,6 +5896,12 @@ "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", "dev": true }, + "map-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=", + "dev": true + }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", diff --git a/package.json b/package.json index c03adec9..295edb3e 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@modularbp/gulp-serve": "^1.0.5", "@modularbp/gulp-svg": "^1.0.5", "@modularbp/gulp-watch": "^1.0.5", - "gulp-concat": "*", + "gulp-header": "^2.0.9", "mbp": "^1.1.3", "merge-stream": "^2.0.0", "normalize.css": "*" diff --git a/src/locomotive-scroll.js b/src/locomotive-scroll.js index b16dabba..238abf99 100644 --- a/src/locomotive-scroll.js +++ b/src/locomotive-scroll.js @@ -1,3 +1 @@ export { default as locomotiveScroll } from './scripts/Main'; - -