{"version":3,"sources":["loadCSS.js","onloadCSS.js","page-loading.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"critical.js","sourcesContent":["(function(w){\n\t\"use strict\";\n\t/* exported loadCSS */\n\tvar loadCSS = function( href, link, before, media ){\n\t\t/* Arguments explained:\n\t\t// `href` [REQUIRED] is the URL for your CSS file.\n\t\t// `before` [OPTIONAL] is the element the script should use as a reference for injecting our stylesheet before\n\t\t\t// By default, loadCSS attempts to inject the link after the last stylesheet or script in the DOM. However, you might desire a more specific location in your document.\n\t\t// `media` [OPTIONAL] is the media type or query of the stylesheet. By default it will be 'all'\n\t\t*/\n\t\tvar doc = w.document;\n\t\tvar ss = link || doc.createElement( \"link\" );\n\t\tvar ref;\n\t\tif( before ){\n\t\t\tref = before;\n\t\t}\n\t\telse {\n\t\t\tvar refs = ( doc.body || doc.getElementsByTagName( \"head\" )[ 0 ] ).childNodes;\n\t\t\tref = refs[ refs.length - 1];\n\t\t}\n\n\t\tvar sheets = doc.styleSheets;\n\t\tss.rel = \"stylesheet\";\n\t\tss.href = href;\n\t\t/* temporarily set media to something inapplicable to ensure it'll fetch without blocking render*/\n\t\tss.media = \"only x\";\n\n\t\t/* wait until body is defined before injecting link. This ensures a non-blocking load in IE11.*/\n\t\tfunction ready( cb ){\n\t\t\tif( doc.body ){\n\t\t\t\treturn cb();\n\t\t\t}\n\t\t\tsetTimeout(function(){\n\t\t\t\tready( cb );\n\t\t\t});\n\t\t}\n\t\t/* Inject link\n\t\t\t// Note: the ternary preserves the existing behavior of \"before\" argument, but we could choose to change the argument to \"after\" in a later release and standardize on ref.nextSibling for all refs\n\t\t\t// Note: `insertBefore` is used instead of `appendChild`, for safety re: http://www.paulirish.com/2011/surefire-dom-element-insertion/ */\n\n\t\tif( !link ){\n\t\t\tready( function(){\n\t\t\t\tref.parentNode.insertBefore( ss, ( before ? ref : ref.nextSibling ) );\n\t\t\t});\n\t\t}\n\t\t/* A method (exposed on return object for external use) that mimics onload by polling until document.styleSheets until it includes the new sheet. */\n\t\tvar onloadcssdefined = function( cb ){\n\t\t\tvar resolvedHref = ss.href;\n\t\t\tvar i = sheets.length;\n\t\t\twhile( i-- ){\n\t\t\t\tif( sheets[ i ].href === resolvedHref ){\n\t\t\t\t\treturn cb();\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetTimeout(function() {\n\t\t\t\tonloadcssdefined( cb );\n\t\t\t});\n\t\t};\n\n\t\tfunction loadCB(){\n\t\t\tif( ss.addEventListener ){\n\t\t\t\tss.removeEventListener( \"load\", loadCB );\n\t\t\t}\n\t\t\tss.media = media || \"all\";\n\t\t}\n\n\t\t/* once loaded, set link's media back to `all` so that the stylesheet applies once it loads */\n\t\tif( ss.addEventListener ){\n\t\t\tss.addEventListener( \"load\", loadCB);\n\t\t}\n\t\tss.onloadcssdefined = onloadcssdefined;\n\t\tonloadcssdefined( loadCB );\n\t\treturn ss;\n\t};\n\t/* commonjs */\n\tif( typeof exports !== \"undefined\" ){\n\t\texports.loadCSS = loadCSS;\n\t}\n\telse {\n\t\tw.loadCSS = loadCSS;\n\t}\n}( typeof global !== \"undefined\" ? global : this ));\n","/*! onloadCSS: adds onload support for asynchronous stylesheets loaded with loadCSS. [c]2016 @zachleat, Filament Group, Inc. Licensed MIT */\n/* global navigator */\n/* exported onloadCSS */\nfunction onloadCSS( ss, callback ) {\n\tvar called;\n\tfunction newcb(){\n\t\t\tif( !called && callback ){\n\t\t\t\tcalled = true;\n\t\t\t\tcallback.call( ss );\n\t\t\t}\n\t}\n\tif( ss.addEventListener ){\n\t\tss.addEventListener( \"load\", newcb );\n\t}\n\tif( ss.attachEvent ){\n\t\tss.attachEvent( \"onload\", newcb );\n\t}\n\n\t// This code is for browsers that don’t support onload\n\t// No support for onload (it'll bind but never fire):\n\t//\t* Android 4.3 (Samsung Galaxy S4, Browserstack)\n\t//\t* Android 4.2 Browser (Samsung Galaxy SIII Mini GT-I8200L)\n\t//\t* Android 2.3 (Pantech Burst P9070)\n\n\t// Weak inference targets Android < 4.4\n \tif( \"isApplicationInstalled\" in navigator && \"onloadcssdefined\" in ss ) {\n\t\tss.onloadcssdefined( newcb );\n\t}\n}\n","// loop preload links and fetch using loadCSS\nvar e4 = e4 || {};\ne4.loading = {\n init: function ( w ) {\n e4.loading.timeout = 2500;\n e4.loading.stylesheets = [];\n e4.loading.unloadedStylesheets = [];\n e4.loading.loadStylesheets( w );\n setTimeout( e4.loading.done, e4.loading.timeout );\n },\n loadStylesheets: function ( w ) {\n e4.loading.getStylesheets( w );\n for ( var s = 0; s < e4.loading.stylesheets.length; s++ ) {\n var stylesheet = e4.loading.stylesheets[ s ];\n stylesheet.rel = null;\n e4.loading.unloadedStylesheets.push( w.loadCSS( stylesheet.href, stylesheet ) );\n w.onloadCSS( e4.loading.unloadedStylesheets[ e4.loading.unloadedStylesheets.length - 1 ], e4.loading.stylesheetOnLoad );\n }\n },\n getStylesheets: function ( w ) {\n var links = w.document.getElementsByTagName( 'link' );\n for ( var l = 0; l < links.length; l++ ) {\n var link = links[ l ];\n if ( link.rel === 'preload' && link.getAttribute( 'as' ) === 'style' ) {\n e4.loading.stylesheets.push( links[ l ] );\n }\n }\n },\n stylesheetOnLoad: function () {\n var intIoadedStylesheet = e4.loading.unloadedStylesheets.indexOf( this );\n e4.loading.unloadedStylesheets.splice( intIoadedStylesheet, 1 );\n if ( e4.loading.unloadedStylesheets.length === 0 ) {\n e4.loading.done();\n }\n },\n resolveWait: function ( strSelector ) {\n if ( document.querySelector( '.js-e-loading-wait' ) !== null ) {\n document.querySelector( strSelector ).classList.remove( 'js-e-loading-wait' );\n if ( document.querySelector( '.js-e-loading-wait' ) === null ) {\n e4.loading.done();\n }\n }\n },\n done: function () {\n var domElmCanvas = document.querySelector( '.js-e-canvas' ),\n domElmOverlay = document.querySelector( '.js-e-page-loading-overlay' ),\n domElmDelayElement = document.querySelector( '.js-e-loading-wait' );\n if ( domElmCanvas !== null && domElmOverlay !== null && domElmDelayElement === null ) {\n domElmCanvas.classList.remove( 'is-loading' );\n domElmOverlay.classList.remove( 'is-loading' );\n // domElmOverlay.style.display = 'none';\n }\n }\n};\n( function ( w ) {\n e4.loading.init( w );\n}( this ) );\n\n"],"sourceRoot":"/source/"}