This repository has been archived by the owner on Aug 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
/
mobify-2.0.0alpha5.min.js
1 lines (1 loc) · 20.7 KB
/
mobify-2.0.0alpha5.min.js
1
!function(){var a,b,c;!function(d){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m=b&&b.split("/"),n=s.map,o=n&&n["*"]||{};if(a&&"."===a.charAt(0))if(b){for(m=m.slice(0,m.length-1),a=m.concat(a.split("/")),j=0;j<a.length;j+=1)if(l=a[j],"."===l)a.splice(j,1),j-=1;else if(".."===l){if(1===j&&(".."===a[2]||".."===a[0]))break;j>0&&(a.splice(j-1,2),j-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((m||o)&&n){for(c=a.split("/"),j=c.length;j>0;j-=1){if(d=c.slice(0,j).join("/"),m)for(k=m.length;k>0;k-=1)if(e=n[m.slice(0,k).join("/")],e&&(e=e[d])){f=e,g=j;break}if(f)break;!h&&o&&o[d]&&(h=o[d],i=j)}!f&&h&&(f=h,g=i),f&&(c.splice(0,g,f),a=c.join("/"))}return a}function g(a,b){return function(){return n.apply(d,v.call(arguments,0).concat([a,b]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var b=r[a];delete r[a],t[a]=!0,m.apply(d,b)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,b,c,f){var h,k,l,m,n,s,u=[];if(f=f||a,"function"==typeof c){for(b=!b.length&&c.length?["require","exports","module"]:b,n=0;n<b.length;n+=1)if(m=o(b[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=c.apply(q[a],u),a&&(h&&h.exports!==d&&h.exports!==q[a]?q[a]=h.exports:l===d&&s||(q[a]=l))}else a&&(q[a]=c)},a=b=n=function(a,b,c,e,f){return"string"==typeof a?p[a]?p[a](b):j(o(a,b).f):(a.splice||(s=a,b.splice?(a=b,b=c,c=null):a=d),b=b||function(){},"function"==typeof c&&(c=e,e=f),e?m(d,a,b,c):setTimeout(function(){m(d,a,b,c)},4),n)},n.config=function(a){return s=a,s.deps&&n(s.deps,s.callback),n},c=function(a,b,c){b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},c.amd={jQuery:!0}}(),c("almond",function(){}),c("utils",[],function(){var a={};a.extend=function(a){return[].slice.call(arguments,1).forEach(function(b){for(var c in b)void 0!==b[c]&&(a[c]=b[c])}),a},a.keys=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b},a.values=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(a[c]);return b},a.clone=function(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b};var b=document.createElement("a");a.absolutify=function(a){return b.href=a,b.href};var c=/^https?/;a.httpUrl=function(a){return c.test(a)},a.outerHTML=function(a){var b=document.createElement("div");b.appendChild(a.cloneNode(!0));var c=b.innerHTML;return b=null,c},a.removeBySelector=function(b,c){c=c||document;var d=c.querySelectorAll(b);return a.removeElements(d,c)},a.removeElements=function(a,b){b=b||document;for(var c=0,d=a.length;d>c;c++){var e=a[c];e.parentNode.removeChild(e)}return a};var d;return a.supportsLocalStorage=function(){if(void 0!==d)return d;var a="modernizr";try{localStorage.setItem(a,a),localStorage.removeItem(a),d=!0}catch(b){d=!1}return d},a.matchMedia=function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}},a}),c("capture",["utils"],function(a){function b(a){return a.nodeName.toLowerCase()}function c(a){return a.replace('"',""")}function d(c){return c?[].map.call(c.childNodes,function(c){var d=b(c);return"#comment"==d?"<!--"+c.textContent+"-->":"plaintext"==d?c.textContent:"script"==d&&(/mobify/.test(c.src)||/mobify/i.test(c.textContent))?"":c.outerHTML||c.nodeValue||a.outerHTML(c)}).join(""):""}window.Mobify&&!window.Mobify.capturing&&document.getElementsByTagName("plaintext").length&&(window.Mobify.capturing=!0);var e=/(<script[\s\S]*?>)/gi,f={style:' media="mobify-media"',script:' type="text/mobify-script"'},g=new RegExp(a.values(f).join("|"),"g"),h={img:["src"],source:["src"],iframe:["src"],script:["src","type"],link:["href"],style:["media"]},i=new RegExp("<("+a.keys(h).join("|")+")([\\s\\S]*?)>","gi"),j={},k={};for(var l in h)if(h.hasOwnProperty(l)){var m=h[l];m.forEach(function(a){k[a]=!0}),j[l]=new RegExp("\\s+((?:"+m.join("|")+")\\s*=\\s*(?:('|\")[\\s\\S]+?\\2))","gi")}var n=document.createElement("div"),o=function(b,c){this.doc=b,this.prefix=c||"x-",window.Mobify&&(window.Mobify.prefix=this.prefix);var d=this.createDocumentFragmentsStrings();a.extend(this,d);var e=this.createDocumentFragments();a.extend(this,e)};return o.init=function(a,b,c){var b=b||document,d=function(a,b,c){var d=new o(b,c);a(d)};if(document.attachEvent?"complete"===b.readyState:"loading"!==b.readyState)d(a,b,c);else{var e=!1;b.addEventListener("readystatechange",function(){e||(e=!0,d(a,b,c))},!1)}},o.cloneAttributes=function(a,b){var c=a.match(/^<(\w+)([\s\S]*)$/i);return n.innerHTML="<div"+c[2],[].forEach.call(n.firstChild.attributes,function(a){try{b.setAttribute(a.nodeName,a.nodeValue)}catch(c){console.error("Error copying attributes while capturing: ",c)}}),b},o.disable=function(a,b){var c=function(){return function(a,c,d){return lowercaseTagName=c.toLowerCase(),result="<"+lowercaseTagName+(f[lowercaseTagName]||"")+d.replace(j[lowercaseTagName]," "+b+"$1")+">"}}(),d=/(<!--[\s\S]*?-->)|(?=<\/script)/i,g=a.split(d),h=g.map(function(a){var b;return a?/^<!--/.test(a)?a:(b=a.split(e),b[0]=b[0].replace(i,c),b[1]&&(b[1]=b[1].replace(i,c)),b):""});return[].concat.apply([],h).join("")},o.enable=function(b,c){var d=new RegExp("\\s"+c+"("+a.keys(k).join("|")+")","gi");return b.replace(d," $1").replace(g,"")},o.openTag=function(a){if(!a)return"";a.length&&(a=a[0]);var d=[];return[].forEach.call(a.attributes,function(a){d.push(" ",a.name,'="',c(a.value),'"')}),"<"+b(a)+d.join("")+">"},o.prototype.getDoctype=function(){var a=this.doc.doctype||[].filter.call(this.doc.childNodes,function(a){return a.nodeType==Node.DOCUMENT_TYPE_NODE})[0];return a?"<!DOCTYPE HTML"+(a.publicId?' PUBLIC "'+a.publicId+'"':"")+(a.systemId?' "'+a.systemId+'"':"")+">":""},o.prototype.createDocumentFragmentsStrings=function(){var a=this.doc,b=a.getElementsByTagName("head")[0]||a.createElement("head"),c=a.getElementsByTagName("body")[0]||a.createElement("body"),e=a.getElementsByTagName("html")[0];captured={doctype:this.getDoctype(),htmlOpenTag:o.openTag(e),headOpenTag:o.openTag(b),bodyOpenTag:o.openTag(c),headContent:d(b),bodyContent:d(c)},captured.all=function(a){return this.doctype+this.htmlOpenTag+this.headOpenTag+(a||"")+this.headContent+this.bodyContent};var f=/<!--(?:[\s\S]*?)-->|(<\/head\s*>|<body[\s\S]*$)/gi,g=captured.bodyContent=captured.headContent+captured.bodyContent;captured.headContent="";for(var h;h=f.exec(g);h)if(h[1]){if("/"!=h[1][1]){captured.headContent=captured.head||g.slice(0,h.index),captured.bodyContent=h[0];var i=/^((?:[^>'"]*|'[^']*?'|"[^"]*?")*>)([\s\S]*)$/.exec(captured.bodyContent);i&&(captured.bodyOpenTag=i[1],captured.bodyContent=i[2]);break}captured.headContent=g.slice(0,h.index),captured.bodyContent=g.slice(h.index+h[1].length)}return captured},o.prototype.restore=function(){var a=this,b=a.doc,c=function(){b.removeEventListener("DOMContentLoaded",c,!1),setTimeout(function(){b.open(),b.write(a.all()),b.close()},15)};/complete|interactive|loaded/.test(b.readyState)?c():b.addEventListener("DOMContentLoaded",c,!1)},o.prototype.setElementContentFromString=function(a,b){for(this.doc,n.innerHTML=b;n.firstChild;a.appendChild(n.firstChild));},o.prototype.createDocumentFragments=function(){var a={},b=a.capturedDoc=document.implementation.createHTMLDocument(""),c=a.htmlEl=b.documentElement,d=a.headEl=c.firstChild,e=a.bodyEl=c.lastChild;o.cloneAttributes(this.htmlOpenTag,c),o.cloneAttributes(this.headOpenTag,d),o.cloneAttributes(this.bodyOpenTag,e),e.innerHTML=o.disable(this.bodyContent,this.prefix);var f=o.disable(this.headContent,this.prefix);try{d.innerHTML=f}catch(g){var h=d.getElementsByTagName("title")[0];h&&d.removeChild(h),this.setElementContentFromString(d,f)}return c.appendChild(d),c.appendChild(e),a},o.prototype.escapedHTMLString=function(){var b=this.capturedDoc,c=o.enable(b.documentElement.outerHTML||a.outerHTML(b.documentElement),this.prefix),d=this.doctype+c;return d},o.prototype.render=function(a){var b;b=a?o.enable(a):this.escapedHTMLString();var c=this.doc;window.Mobify&&(window.Mobify.capturing=!1),setTimeout(function(){c.open("text/html","replace"),c.write(b),c.close()})},o.prototype.getCapturedDoc=function(){return this.capturedDoc},o.prototype.insertMobifyScripts=function(){var a=this.capturedDoc,b=document.getElementById("mobify-js");b||(b=document.getElementsByTagName("script")[0],b.id="mobify-js",b.setAttribute("class","mobify"));var c=this.headEl,d=document.getElementById("main-executable");if(d){var e=a.importNode(d,!1);d.src||(e.innerHTML=d.innerHTML),c.insertBefore(e,c.firstChild)}var f=a.importNode(b,!1);c.insertBefore(f,c.firstChild)},o.prototype.renderCapturedDoc=function(){var a=this.capturedDoc;if(this.insertMobifyScripts(),window.Mobify&&window.Mobify.points){var b=this.bodyEl,c=a.createElement("div");c.id="mobify-point",c.setAttribute("style","display: none;"),c.innerHTML=window.Mobify.points[0],b.insertBefore(c,b.firstChild)}this.render()},o}),c("resizeImages",["utils"],function(a){function b(a){function b(b){var c=a||1;return b.width=Math.round(b.width*c),b.height=Math.round(b.height*c),b}var c=navigator.userAgent.match(/iphone|ipod|ipad/i),d=(navigator.userAgent.match(/android (\d)/i)||{})[1],e={width:window.outerWidth,height:window.outerHeight};if(!c)return d>3?b(e):e;var f=window.orientation%180;return f?(e.height=screen.width,e.width=screen.height):(e.width=screen.width,e.height=screen.height),b(e)}function c(b){if(a.supportsLocalStorage()){var c={supported:b,date:Date.now()};localStorage.setItem(e,JSON.stringify(c))}}var d=window.ResizeImages={},e="Mobify-Webp-Support-v2";d.userAgentWebpDetect=function(a){var b=/(Android\s|Chrome\/|Opera9.8*Version\/..\.|Opera..\.)/i,c=new RegExp("(Android\\s(0|1|2|3|(4(?!.*Chrome)))\\.)|(Chrome\\/[0-8]\\.)|(Chrome\\/9\\.0\\.)|(Chrome\\/1[4-6]\\.)|(Android\\sChrome\\/1.\\.)|(Android\\sChrome\\/20\\.)|(Chrome\\/(1.|20|21|22)\\.)|(Opera.*(Version/|Opera\\s)(10|11)\\.)","i");return b.test(a)?c.test(a)?!1:!0:!1},d.dataUriWebpDetect=function(a){var b=new Image;b.onload=function(){var d=1===b.width?!0:!1;c(d),a&&a(d)},b.src="data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQABgBwlpAADcAD+/gbQAA=="},d.supportsWebp=function(b){if(a.supportsLocalStorage()){var f,g=localStorage.getItem(e);if(g&&(f=JSON.parse(g)),f&&Date.now()-f.date<6048e5)return f.supported}d.dataUriWebpDetect(b);var h=d.userAgentWebpDetect(navigator.userAgent);return c(h),h},d.getImageURL=function(b,c){var d=a.clone(g);c&&a.extend(d,c);var e=[d.proto+d.host];if(d.projectName){var f="project-"+d.projectName;e.push(f)}return c.cacheHours&&e.push("c"+c.cacheHours),d.format&&e.push(c.format+(c.quality||"")),d.maxWidth&&(e.push(c.maxWidth),d.maxHeight&&e.push(c.maxHeight)),e.push(b),e.join("/")},d._rewriteSrcAttribute=function(b,c,e){if(e=b.getAttribute(c.sourceAttribute)||e){var f=a.absolutify(e);a.httpUrl(f)&&(b.setAttribute(c.targetAttribute,d.getImageURL(f,c)),b.setAttribute("data-orig-src",e),c.onerror&&b.setAttribute("onerror",c.onerror))}},d._resizeSourceElement=function(b,c,e){var f=b.getAttribute("data-width"),g=c;f&&(g=a.clone(c),g.maxWidth=f),d._rewriteSrcAttribute(b,g,e)},d._crawlPictureElement=function(a,b){var c=a.getElementsByTagName("source");if(0!==c.length)for(var e=a.getAttribute("data-src"),f=0,g=c.length;g>f;f++)d._resizeSourceElement(c[f],b,e)},d.resize=function(c,e){var f=a.clone(g);e&&a.extend(f,e);var h=f.devicePixelRatio||window.devicePixelRatio,i=b(h),j=f.maxWidth||i.width,k=f.maxHeight||i.height;h&&f.maxWidth&&(j*=h,f.maxHeight&&(k*=h)),f.maxWidth=Math.ceil(j),f.maxHeight=Math.ceil(k),!f.format&&f.webp&&(f.format="webp");for(var l=0;l<c.length;l++){var m=c[l];"IMG"===m.nodeName?d._rewriteSrcAttribute(m,f):"PICTURE"===m.nodeName&&d._crawlPictureElement(m,f)}return c};var f=window.Mobify&&window.Mobify.capturing||!1,g={proto:"//",host:"ir0.mobify.com",projectName:"oss-"+location.hostname.replace(/[^\w]/g,"-"),sourceAttribute:"x-src",targetAttribute:f?"x-src":"src",webp:d.supportsWebp(),onerror:"ResizeImages.restoreOriginalSrc(event);"};return d.restoreOriginalSrc=function(a){var b;a.target.removeAttribute("onerror"),(b=a.target.getAttribute("data-orig-src"))&&a.target.setAttribute("src",b)},d}),c("jazzcat",["utils","capture"],function(a){var b={cache:{},options:{},utils:{}},c="Mobify-Jazzcat-Cache-v1.0";b.reset=function(a){b.cache=a||{}},b.get=function(a,c){var d=b.cache[a.split("#")[0]];return d&&c&&(d.lastUsed=Date.now()),d},b.set=function(a,c){b.cache[a]=c},b.load=function(a){var d,e,f=localStorage.getItem(c);if(a&&void 0!==a.overrideTime&&(e={overrideTime:a.overrideTime}),f){try{f=JSON.parse(f)}catch(g){return}for(d in f)f.hasOwnProperty(d)&&!b.utils.isStale(f[d],e)&&b.set(d,f[d])}};var d=!0;b.save=function(e){var f,g,h=10;return d?(d=!1,function i(){var j=function(){var j,k,l,m=9007199254740991;f=f||a.clone(b.cache);try{k=JSON.stringify(f)}catch(n){return d=!0,e&&e(n)}try{localStorage.setItem(c,k)}catch(n){if(!--h)return d=!0,e&&e(n);for(g in f)if(f.hasOwnProperty(g)){if(j=f[g],!j.lastUsed){l=g,m=0;break}j.lastUsed<=m&&(l=g,m=j.lastUsed)}return delete f[l],i()}d=!0,e&&e()};(document.attachEvent?"complete"===document.readyState:"loading"!==document.readyState)?j():setTimeout(i,15)}(),void 0):e&&e("Save currently in progress")};var e=/^\s*(public|private|no-cache|no-store)\s*$/,f=/^\s*(max-age)\s*=\s*(\d+)\s*$/;b.utils.ccParse=function(a){var b,c={};return a.split(",").forEach(function(a){(b=e.exec(a))?c[b[1]]=!0:(b=f.exec(a))&&(c[b[1]]=parseInt(b[2]))}),c},b.utils.isStale=function(a,c){var d,e=a.headers||{},f=e["cache-control"],g=Date.now(),h=Date.parse(e.date);return h&&h+6e5>g?!1:c&&(d=c.overrideTime)&&h?g>h+1e3*60*d:f&&h&&(f=b.utils.ccParse(f),f["max-age"]&&!f["private"]&&!f["no-store"]&&!f["no-cache"])?g>h+1e3*f["max-age"]:(h=Date.parse(e.expires))?g>h:!0};var g=window.Jazzcat={httpCache:b,write:document.write};g.isIncompatibleBrowser=function(b){var c=/(firefox)[\/\s](\d+)|(opera[\s\S]*version[\/\s](11|12))/i.exec(b||navigator.userAgent);return c&&c[1]&&+c[2]<12||c&&c[3]||!a.supportsLocalStorage()||!window.JSON?!0:!1},g.optimizeScripts=function(c,d){if(d&&void 0!==d.cacheOverrideTime&&a.extend(b.options,{overrideTime:d.cacheOverrideTime}),!c.length||g.isIncompatibleBrowser())return c;d=a.extend({},g.defaults,d||{});var e="jsonp"===d.responseType,f=d.concat;b.load(b.options);var h,i=function(a,b){if(a){var c=g.getLoaderScript(b,d);a.parentNode.insertBefore(c,a)}},j={head:{firstScript:void 0,urls:[]},body:{firstScript:void 0,urls:[]}};if(e){var k=g.getHttpCacheLoaderScript();c[0].parentNode.insertBefore(k,c[0])}for(var l=0,m=c.length;m>l;l++){var n=c[l];if(h=n.getAttribute(d.attribute),h&&(h=a.absolutify(h),a.httpUrl(h))){var o="HEAD"===n.parentNode.nodeName?"head":"body";if(e)b.get(h)||(f?(void 0===j[o].firstScript&&(j[o].firstScript=n),j[o].urls.push(h)):i(n,[h])),n.innerHTML=d.execCallback+"('"+h+"');",n.removeAttribute(d.attribute);else if(f)void 0===j[o].firstScript&&(j[o].firstScript=n),j[o].urls.push(h);else{var p=g.getURL([h],d);n.setAttribute(d.attribute,p)}}}if(f&&(i(j.head.firstScript,j.head.urls),i(j.body.firstScript,j.body.urls)),!e&&f)for(var l=0,m=c.length;m>l;l++){var n=c[l];n.getAttribute(d.attribute)&&n.parentNode.removeChild(n)}return c},g.getHttpCacheLoaderScript=function(){var a=document.createElement("script");return a.innerHTML=b.options.overrideTime?"Jazzcat.httpCache.load("+JSON.stringify(b.options)+");":"Jazzcat.httpCache.load();",a},g.getLoaderScript=function(a,b){var c;return a&&a.length&&(c=document.createElement("script"),c.setAttribute(b.attribute,g.getURL(a,b))),c},g.getURL=function(b,c){var c=a.extend({},g.defaults,c||{});return c.base+(c.projectName?"/project-"+c.projectName:"")+"/"+c.responseType+("jsonp"===c.responseType?"/"+c.loadCallback:"")+"/"+encodeURIComponent(JSON.stringify(b.slice().sort()))};var h=/(<\/scr)(ipt\s*>)/gi;return g.exec=function(a){var c,d=b.get(a,!0);d?(c='data-orig-src="'+a+'"',c+=">"+d.body.replace(h,"$1\\$2")):c='src="'+a+'">',g.write.call(document,"<script "+c+"</script>")},g.load=function(a){var c,d=0,e=!1;if(a){for(;c=a[d++];)"ready"==c.status&&(e=!0,b.set(encodeURI(c.url),c));e&&b.save()}},g.defaults={selector:"script",attribute:"x-src",base:"//jazzcat.mobify.com",responseType:"jsonp",execCallback:"Jazzcat.exec",loadCallback:"Jazzcat.load",concat:!0,projectName:""},g}),c("unblockify",["utils","capture"],function(a,b){var c={};return c.moveScripts=function(b,c){a.removeElements(b,c);for(var d=0,e=b.length;e>d;d++){var f=b[d];c.body.appendChild(f)}},c.unblock=function(a){var d=b.prototype.insertMobifyScripts;b.prototype.insertMobifyScripts=function(){d.call(this);var b=this.capturedDoc;c.moveScripts(a,b)}},c}),c("cssOptimize",["utils"],function(a){var b=window.cssOptimize={};b.getCssUrl=function(b,d){var e=a.extend({},c,d),f=[e.protoAndHost];return e.projectName&&f.push("project-"+e.projectName),f.push(e.endpoint),f.push(b),f.join("/")},b._rewriteHref=function(c,d){var e,f=c.getAttribute(d.targetAttribute);f&&(e=a.absolutify(f),a.httpUrl(e)&&(c.setAttribute("data-orig-href",f),c.setAttribute(d.targetAttribute,b.getCssUrl(e,d)),d.onerror&&c.setAttribute("onerror",d.onerror)))},b.optimize=function(d,e){for(var f,g=a.extend({},c,e),h=0,i=d.length;i>h;h++)f=d[h],"LINK"===f.nodeName&&"stylesheet"===f.getAttribute("rel")&&f.getAttribute(g.targetAttribute)&&b._rewriteHref(f,g)},b.restoreOriginalHref=function(a){var b;a.target.removeAttribute("onerror"),(b=a.target.getAttribute("data-orig-href"))&&a.target.setAttribute("href",b)};var c=b._defaults={protoAndHost:"//jazzcat.mobify.com",endpoint:"cssoptimizer",projectName:"oss-"+location.hostname.replace(/[^\w]/g,"-"),targetAttribute:"x-href",onerror:"Mobify.CssOptimize.restoreOriginalHref(event);"};return b}),c("external/picturefill",["utils","capture"],function(a,b){var c=window.Mobify&&window.Mobify.capturing||!1;if(c){var d=b.prototype.renderCapturedDoc;return b.prototype.renderCapturedDoc=function(){for(var a=this.capturedDoc.querySelectorAll("picture img"),b=0,c=a.length;c>b;b++){var e=a[b],f=window.Mobify&&window.Mobify.prefix+"src";e.setAttribute("data-orig-src",e.getAttribute(f)),e.removeAttribute(f)}d.apply(this,arguments)},void 0}window.matchMedia=window.matchMedia||a.matchMedia(document),function(a){var b,c=!1||a.localStorage&&"true"===a.localStorage["picturefill-prefHD"];a.document.createElement("picture")&&a.document.createElement("source")&&a.HTMLPictureElement||(a.picturefill=function(){for(var d=a.document.getElementsByTagName("picture"),e=0,f=d.length;f>e;e++){var g=d[e].getElementsByTagName("source"),h=null,i=[];if(!g.length){var j=d[e].innerHTML,k=a.document.createElement("div"),l=j.replace(/(<)source([^>]+>)/gim,"$1div$2").match(/<div[^>]+>/gim);k.innerHTML=l.join(""),g=k.getElementsByTagName("div")}for(var m=0,n=g.length;n>m;m++){var o=g[m].getAttribute("media");(!o||a.matchMedia&&a.matchMedia(o).matches)&&i.push(g[m])}if(h=d[e].getElementsByTagName("img")[0],i.length){var p=i.pop(),q=p.getAttribute("srcset");if(h||(h=a.document.createElement("img"),h.alt=d[e].getAttribute("alt"),d[e].appendChild(h)),q){var r=c&&a.devicePixelRatio||1,g=q.split(",");b=a.devicePixelRatio>1;for(var s=g.length,t=s-1;t>=0;t--){var u=g[t].replace(/^\s*/,"").replace(/\s*$/,"").split(" "),v=parseFloat(u[1],10);if(r>=v){if(h.getAttribute("src")!==u[0]){var w=document.createElement("img");w.src=u[0],w.onload=function(){this.width=this.cloneNode(!0).width/v},h.parentNode.replaceChild(w,h)}break}}}else h.src=p.getAttribute("src")}}},a.addEventListener?(a.addEventListener("resize",a.picturefill,!1),a.addEventListener("DOMContentLoaded",function(){a.picturefill(),a.removeEventListener("load",a.picturefill,!1)},!1),a.addEventListener("load",a.picturefill,!1)):a.attachEvent&&a.attachEvent("onload",a.picturefill))}(this)}),b(["utils","capture","resizeImages","jazzcat","unblockify","cssOptimize","external/picturefill"],function(a,b,c,d,e,f){var g=window.Mobify=window.Mobify||{};return g.Utils=a,g.Capture=b,g.ResizeImages=c,g.Jazzcat=d,g.CssOptimize=f,g.Unblockify=e,g.api="2.0",g},void 0,!0),c("mobify-library",function(){})}();