(function(){"use strict";function t(n){var f={lg:"(min-width: 1200px)",md:"(min-width: 992px) and (max-width: 1199px)",sm:"(min-width: 768px) and (max-width: 991px)",xs:"(max-width: 767px)"};this.isRetina=window.devicePixelRatio>1||window.matchMedia&&window.matchMedia("(-webkit-min-device-pixel-ratio: 1.5),(-moz-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5),(min-resolution: 192dpi),(min-resolution: 2dppx)").matches;var t=this,r=function(t,i){i=i||n;var r=i.$root.$$phase;r==="$apply"||r==="$digest"?t&&typeof t=="function"&&t():i.$apply(t)},u=function(n){if(typeof n!="string"&&Object.prototype.toString.call(n)!=="[object Array]")throw new Error("screenSize requires array or comma-separated list");return typeof n=="string"?n.split(/\s*,\s*/):n},i=function(){var n=t.rules||f;for(var i in n)if(n.hasOwnProperty(i)&&window.matchMedia(n[i]).matches)return i};this.get=i;this.is=function(n){return n=u(n),n.indexOf(i())!==-1};this.on=function(n,i,u){function f(){r(i(t.is(n)),u)}return window.addEventListener("resize",f),u&&u.$on("$destroy",function(){window.removeEventListener("resize",f)}),t.is(n)};this.onChange=function(n,f,e){function s(){var s=o,u,t;o=i();u=f.indexOf(s)!==-1;t=f.indexOf(o)!==-1;u!==t&&r(e(t),n)}var o=i();if(f=u(f),!n)throw"scope has to be applied for cleanup reasons. (destroy)";return window.addEventListener("resize",s),n.$on("$destroy",function(){window.removeEventListener("resize",s)}),t.is(f)};this.when=function(n,i,u){function f(){t.is(n)===!0&&r(i(t.is(n)),u)}return window.addEventListener("resize",f),u&&u.$on("$destroy",function(){window.removeEventListener("resize",f)}),t.is(n)}}var n=angular.module("matchMedia",[]);n.run(function(){window.matchMedia||(window.matchMedia=function(){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"}}}())});n.service("screenSize",t);t.$inject=["$rootScope"];n.filter("media",["screenSize",function(n){var t=function(t,i){var f=n.get(),r="",u,e;if(!i)return f;if(i.groups){for(u in i.groups)i.groups.hasOwnProperty(u)&&(e=i.groups[u].indexOf(f),e>=0&&(r=u));r===""&&(r=f)}return i.replace&&typeof i.replace=="string"&&i.replace.length>0?t.replace(i.replace,r):r};return t.$stateful=!0,t}])})()