window.matchMedia||(window.matchMedia=function(){"use strict";var t=window.styleMedia||window.media;if(!t){var n=document.createElement("style"),i=document.getElementsByTagName("script")[0],r=null;n.type="text/css",n.id="matchmediajs-test",i.parentNode.insertBefore(n,i),r="getComputedStyle"in window&&window.getComputedStyle(n,null)||n.currentStyle,t={matchMedium:function(t){var i="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return n.styleSheet?n.styleSheet.cssText=i:n.textContent=i,r.width==="1px"}}}return function(n){return{matches:t.matchMedium(n||"all"),media:n||"all"}}}()),function(n,t,i){"use strict";function f(t){typeof module=="object"&&typeof module.exports=="object"?module.exports=t:typeof define=="function"&&define.amd&&define("picturefill",function(){return t}),typeof n=="object"&&(n.picturefill=t)}function u(n){var s,t,i,u,f,h=n||{},o,c;for(s=h.elements||r.getAllElements(),o=0,c=s.length;o<c;o++)if((t=s[o],i=t.parentNode,u=undefined,f=undefined,t.nodeName.toUpperCase()==="IMG")&&(t[r.ns]||(t[r.ns]={}),h.reevaluate||!t[r.ns].evaluated)){if(i&&i.nodeName.toUpperCase()==="PICTURE"){if(r.removeVideoShim(i),u=r.getMatch(t,i),u===!1)continue}else u=undefined;(i&&i.nodeName.toUpperCase()==="PICTURE"||!r.sizesSupported&&t.srcset&&e.test(t.srcset))&&r.dodgeSrcset(t),u?(f=r.processSourceSet(u),r.applyBestCandidate(f,t)):(f=r.processSourceSet(t),(t.srcset===undefined||t[r.ns].srcset)&&r.applyBestCandidate(f,t)),t[r.ns].evaluated=!0}}function o(){function f(){clearTimeout(i),i=setTimeout(o,60)}r.initTypeDetects(),u();var e=setInterval(function(){if(u(),/^loaded|^i|^c/.test(t.readyState)){clearInterval(e);return}},250),i,o=function(){u({reevaluate:!0})};n.addEventListener?n.addEventListener("resize",f,!1):n.attachEvent&&n.attachEvent("onresize",f)}if(n.HTMLPictureElement){f(function(){});return}t.createElement("picture");var r=n.picturefill||{},e=/\s+\+?\d+(e\d+)?w/;r.ns="picturefill",function(){r.srcsetSupported="srcset"in i,r.sizesSupported="sizes"in i,r.curSrcSupported="currentSrc"in i}(),r.trim=function(n){return n.trim?n.trim():n.replace(/^\s+|\s+$/g,"")},r.makeUrl=function(){var n=t.createElement("a");return function(t){return n.href=t}}(),r.restrictsMixedContent=function(){return n.location.protocol==="https:"},r.matchesMedia=function(t){return n.matchMedia&&n.matchMedia(t).matches},r.getDpr=function(){return n.devicePixelRatio||1},r.getWidthFromLength=function(n){var i;if(!(n&&n.indexOf("%")>-1==!1&&(parseFloat(n)>0||n.indexOf("calc(")>-1)))return!1;n=n.replace("vw","%"),r.lengthEl||(r.lengthEl=t.createElement("div"),r.lengthEl.style.cssText="border:0;display:block;font-size:1em;left:0;margin:0;padding:0;position:absolute;visibility:hidden",r.lengthEl.className="helper-from-picturefill-js"),r.lengthEl.style.width="0px";try{r.lengthEl.style.width=n}catch(u){}return t.body.appendChild(r.lengthEl),i=r.lengthEl.offsetWidth,i<=0&&(i=!1),t.body.removeChild(r.lengthEl),i},r.detectTypeSupport=function(t,i){var f=new n.Image;return f.onerror=function(){r.types[t]=!1,u()},f.onload=function(){r.types[t]=f.width===1,u()},f.src=i,"pending"},r.types=r.types||{},r.initTypeDetects=function(){r.types["image/jpeg"]=!0,r.types["image/gif"]=!0,r.types["image/png"]=!0,r.types["image/svg+xml"]=t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),r.types["image/webp"]=r.detectTypeSupport("image/webp","data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=")},r.verifyTypeSupport=function(n){var i=n.getAttribute("type"),t;return i===null||i===""?!0:(t=r.types[i],typeof t=="string"&&t!=="pending"?(r.types[i]=r.detectTypeSupport(i,t),"pending"):typeof t=="function"?(t(),"pending"):t)},r.parseSize=function(n){var t=/(\([^)]+\))?\s*(.+)/g.exec(n);return{media:t&&t[1],length:t&&t[2]}},r.findWidthFromSourceSize=function(i){for(var f=r.trim(i).split(/\s*,\s*/),e,u=0,o=f.length;u<o;u++){var l=f[u],s=r.parseSize(l),h=s.length,c=s.media;if(h&&(!c||r.matchesMedia(c))&&(e=r.getWidthFromLength(h)))break}return e||Math.max(n.innerWidth||0,t.documentElement.clientWidth)},r.parseSrcset=function(n){for(var f=[],r,t,i,e,u;n!=="";)n=n.replace(/^\s+/g,""),r=n.search(/\s/g),i=null,r!==-1?(t=n.slice(0,r),e=t.slice(-1),(e===","||t==="")&&(t=t.replace(/,+$/,""),i=""),n=n.slice(r+1),i===null&&(u=n.indexOf(","),u!==-1?(i=n.slice(0,u),n=n.slice(u+1)):(i=n,n=""))):(t=n,n=""),(t||i)&&f.push({url:t,descriptor:i});return f},r.parseDescriptor=function(n,t){var c=t||"100vw",h=n&&n.replace(/(^\s+|\s+$)/g,""),l=r.findWidthFromSourceSize(c),o,s,u,i,f,e;if(h)for(s=h.split(" "),u=s.length-1;u>=0;u--)i=s[u],f=i&&i.slice(i.length-1),f!=="h"&&f!=="w"||r.sizesSupported?f==="x"&&(e=i&&parseFloat(i,10),o=e&&!isNaN(e)?e:1):o=parseFloat(parseInt(i,10)/l);return o||1},r.getCandidatesFromSourceSet=function(n,t){for(var f=r.parseSrcset(n),e=[],u,i=0,o=f.length;i<o;i++)u=f[i],e.push({url:u.url,resolution:r.parseDescriptor(u.descriptor,t)});return e},r.dodgeSrcset=function(n){n.srcset&&(n[r.ns].srcset=n.srcset,n.srcset="",n.setAttribute("data-pfsrcset",n[r.ns].srcset))},r.processSourceSet=function(n){var t=n.getAttribute("srcset"),u=n.getAttribute("sizes"),i=[];return n.nodeName.toUpperCase()==="IMG"&&n[r.ns]&&n[r.ns].srcset&&(t=n[r.ns].srcset),t&&(i=r.getCandidatesFromSourceSet(t,u)),i},r.backfaceVisibilityFix=function(n){var t=n.style||{},i="webkitBackfaceVisibility"in t,r=t.zoom;i&&(t.zoom=".999",i=n.offsetWidth,t.zoom=r)},r.setIntrinsicSize=function(){var i={},u=function(n,t,i){t&&n.setAttribute("width",parseInt(t/i,10))};return function(f,e){var o;f[r.ns]&&!n.pfStopIntrinsicSize&&((f[r.ns].dims===undefined&&(f[r.ns].dims=f.getAttribute("width")||f.getAttribute("height")),f[r.ns].dims)||(e.url in i?u(f,i[e.url],e.resolution):(o=t.createElement("img"),o.onload=function(){if(i[e.url]=o.width,!i[e.url])try{t.body.appendChild(o),i[e.url]=o.width||o.offsetWidth,t.body.removeChild(o)}catch(n){}f.src===e.url&&u(f,i[e.url],e.resolution),f=null,o.onload=null,o=null},o.src=e.url)))}}(),r.applyBestCandidate=function(n,t){var f,e,i,u;for(n.sort(r.ascendingSort),e=n.length,i=n[e-1],u=0;u<e;u++)if(f=n[u],f.resolution>=r.getDpr()){i=f;break}i&&(i.url=r.makeUrl(i.url),t.src!==i.url&&(r.restrictsMixedContent()&&i.url.substr(0,"http:".length).toLowerCase()==="http:"?window.console!==undefined&&console.warn("Blocked mixed content image "+i.url):(t.src=i.url,r.curSrcSupported||(t.currentSrc=t.src),r.backfaceVisibilityFix(t))),r.setIntrinsicSize(t,i))},r.ascendingSort=function(n,t){return n.resolution-t.resolution},r.removeVideoShim=function(n){var r=n.getElementsByTagName("video"),t,i;if(r.length){for(t=r[0],i=t.getElementsByTagName("source");i.length;)n.insertBefore(i[0],t);t.parentNode.removeChild(t)}},r.getAllElements=function(){for(var u=[],f=t.getElementsByTagName("img"),n,i=0,e=f.length;i<e;i++)n=f[i],(n.parentNode.nodeName.toUpperCase()==="PICTURE"||n.getAttribute("srcset")!==null||n[r.ns]&&n[r.ns].srcset!==null)&&u.push(n);return u},r.getMatch=function(n,t){for(var s=t.childNodes,f,i,e,o,u=0,h=s.length;u<h;u++)if(i=s[u],i.nodeType===1){if(i===n)return f;if(i.nodeName.toUpperCase()==="SOURCE"&&(i.getAttribute("src")!==null&&typeof console!==undefined&&console.warn("The `src` attribute is invalid on `picture` `source` element; instead, use `srcset`."),e=i.getAttribute("media"),i.getAttribute("srcset"))&&(!e||r.matchesMedia(e)))if(o=r.verifyTypeSupport(i),o===!0){f=i;break}else if(o==="pending")return!1}return f},o(),u._=r,f(u)}(window,window.document,new window.Image)