This function generate mediaQueries from breakPoints
975596
function generateMediaQueries(breakPoints, unit) {
    // Sort breakpoints by size
    var breakpointNames = Object.keys(breakPoints).sort(function (breakpointNameA, breakpointNameB) {
        if (breakPoints[breakpointNameA] > breakPoints[breakpointNameB]) {
            return 1;
        }
        if (breakPoints[breakpointNameA] < breakPoints[breakpointNameB]) {
            return -1;
        }
        return 0;
    });
    // Convert breakpoints from 980 into (min-width: 700) and (max-width: 980)
    // by using the previous breakpoint
    return breakpointNames.map(function (breakpointName, i) {
        // If this is the first breakpoint we don't need a min value
        var min = breakpointNames[i - 1] === undefined ? undefined : breakPoints[breakpointNames[i - 1]] + 1;
        // If this is the last breakpoint we don't need a max value
        var max = breakPoints[breakpointName] === Infinity ? undefined : breakPoints[breakpointName];
        var queryString;
        if (min && max) {
            queryString = "(min-width: " + min + unit + ") and (max-width: " + max + unit + ")";
        }
        else if (min) {
            queryString = "(min-width: " + min + unit + ")";
        }
        else if (max) {
            queryString = "(max-width: " + max + unit + ")";
        }
        else {
            // This should only happen if the user did a miss configuration
            // with only a single breakpoint which is set to infinity
            throw new Error("The smallest provided viewport must not be set to Infinity");
        }
        return { name: breakpointName, query: queryString, min: min, max: max };
    });
}
959709
public static void exports(Media media, Map<Transition, Collection<TileRef>> transitions)
    {
        Check.notNull(media);
        Check.notNull(transitions);

        final Xml nodeTransitions = new Xml(NODE_TRANSITIONS);

        for (final Map.Entry<Transition, Collection<TileRef>> entry : transitions.entrySet())
        {
            final Transition transition = entry.getKey();

            final Xml nodeTransition = nodeTransitions.createChild(NODE_TRANSITION);
            nodeTransition.writeString(ATTRIBUTE_TRANSITION_TYPE, transition.getType().name());
            nodeTransition.writeString(ATTRIBUTE_GROUP_IN, transition.getIn());
            nodeTransition.writeString(ATTRIBUTE_GROUP_OUT, transition.getOut());

            exportTiles(nodeTransition, entry.getValue());
        }

        nodeTransitions.save(media);
    }
1092017
function(){
                /*
                 * expression
                 *  : '(' S* media_feature S* [ ':' S* expr ]? ')' S*
                 *  ;
                 */
                var tokenStream = this._tokenStream,
                    feature     = null,
                    token,
                    expression  = null;

                tokenStream.mustMatch(Tokens.LPAREN);
                feature = this._media_feature();
                this._readWhitespace();

                if (tokenStream.match(Tokens.COLON)){
                    this._readWhitespace();
                    token = tokenStream.LT(1);
                    expression = this._expression();
                }

                tokenStream.mustMatch(Tokens.RPAREN);
                this._readWhitespace();
                return new MediaFeature(feature, (expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null));
            }
1273518
function stringify(name, props, query) {
  return query ? makeMediaQuery(name, props, query) : makeClass(name, props);
}
923040
async function buildMarkdown() {
  const docs = await documentation.build([filename], { shallow: true })
  const functions = docs[0].members.instance.filter(x => x.kind === 'function')

  for (const fn of functions) {
    if (typeof calls[fn.name] === 'function') {
      const res = await calls[fn.name]()
      const tables = buildReturnTables(res, `${fn.name}()`)

      fn.description.children.push({
        type: 'paragraph',
        children: [
          {
            type: 'strong',
            children: [
              {
                type: 'text',
                value: 'Returns'
              }
            ]
          }
        ]
      })

      for (const table of tables) {
        // Add table title
        fn.description.children.push({
          type: 'paragraph',
          children: [
            {
              type: 'inlineCode',
              value: table.name
            }
          ]
        })

        // Add table
        fn.description.children.push({
          type: 'table',
          align: ['left', 'left'],
          children: [{
            type: 'tableRow',
            children: [
              {
                type: 'tableCell',
                children: [{
                  type: 'text',
                  value: 'Property'
                }]
              },
              {
                type: 'tableCell',
                children: [{
                  type: 'text',
                  value: 'Type'
                }]
              },
              {
                type: 'tableCell',
                children: [{
                  type: 'text',
                  value: 'Note'
                }]
              }
            ]
          }, ...table.keys.map(key => ({
            type: 'tableRow',
            children: [
              {
                type: 'tableCell',
                children: [{
                  type: 'inlineCode',
                  value: key.name
                }]
              },
              {
                type: 'tableCell',
                children: [{
                  type: 'text',
                  value: key.type
                }]
              },
              {
                type: 'tableCell',
                children: [{
                  type: 'text',
                  value: notes[key.name] || ''
                }]
              }
            ]
          }))]
        })
      }
    }
  }

  const markdown = await documentation.formats.md(docs, { markdownToc: true })
  fs.writeFileSync(path.join(process.cwd(), 'API.md'), markdown)
  process.exit()
}
464726
function MyComponent() {
  const theme = useTheme();
  const width =
    [...theme.breakpoints.keys].reverse().reduce((output, key) => {
      // eslint-disable-next-line react-hooks/rules-of-hooks
      const matches = useMediaQuery(theme.breakpoints.only(key));

      return !output && matches ? key : output;
    }, null) || 'xs';

  return <span>{`width: ${width}`}</span>;
}
504211
function Molecule(classes) {
	var molecule = {
		className: '',
		atoms: [],
		pseudoTypes: [],
		mediaQueries: []
	};

	function stripMoleculeName() {
		molecule.className = _.remove(classes, function (name){
			return name[0] === '_';
		})[0];
	}

	function getAtoms() {
		molecule.atoms = classes.map(function (atom) { return Atom(atom); });
	}

	function getPseudoClassNames() {
		molecule.atoms.map(function (atom){ 
			if(atom.pseudo !== '' && !_.contains(molecule.pseudoTypes, atom.pseudo)){
				molecule.pseudoTypes.push(atom.pseudo);
			}
		});
	}

	function getMediaQueries() {
		molecule.atoms.map(function (atom){ 
			if(atom.mediaQuery !== '' && !_.contains(molecule.mediaQueries, atom.mediaQuery)){
				molecule.mediaQueries.push(atom.mediaQuery);
			}
		});
	}

	stripMoleculeName()
	getAtoms();
	getPseudoClassNames();
	getMediaQueries();

	return molecule;
}
1235595
function setupCurrentViewportHelper(mediaQueries) {
    var _loop_2 = function (viewport) {
        var viewportMediaQueryList = matchMedia(viewport.query);
        // Set initial viewport
        if (viewportMediaQueryList.matches) {
            currentViewport = viewport.name;
        }
        // Watch for media query changes
        viewportMediaQueryList.addListener(function (mediaQueryList) {
            if (mediaQueryList.matches) {
                currentViewport = viewport.name;
            }
        });
    };
    for (var _i = 0, mediaQueries_2 = mediaQueries; _i < mediaQueries_2.length; _i++) {
        var viewport = mediaQueries_2[_i];
        _loop_2(viewport);
    }
}
627101
def medias(self, timeframe=None):
        
        info = self.info
        if timeframe is not None:
            start, end = TimedMediasIterator.get_times(timeframe)
            timestamp = info.get("taken_at_timestamp") or info["media"]
            if not (start >= timestamp >= end):
                raise StopIteration
        yield info
475963
function findExistingBreakpoint(state, generatedLocation) {
  const breakpoints = getBreakpointsList(state);

  return breakpoints.find(bp => {
    return (
      bp.generatedLocation.sourceUrl == generatedLocation.sourceUrl &&
      bp.generatedLocation.line == generatedLocation.line &&
      bp.generatedLocation.column == generatedLocation.column
    );
  });
}
1129525
function getMLinePayloadTypes (mediaLine, mediaType) {
      var mLineSelector = new RegExp('^m=' + mediaType +
                            ' \\d+(/\\d+)? [a-zA-Z0-9/]+(( [a-zA-Z0-9/]+)+)$', 'i');

      // Get all payload types that the line supports
      var payloadTypes = mediaLine.match(mLineSelector);
      if (!payloadTypes || payloadTypes.length < 2) {
        // Error, invalid M line?
        return [];
      }

      return OT.$.trim(payloadTypes[2]).split(' ');
    }
266401
public List<MediaQuery> parseMediaQuery(String query) {
        try {
            // input from string
            CSSInputStream input = CSSInputStream.stringStream(query);
            input.setBase(new URL("file://media/query/url")); //this URL should not be used, just for safety
            // create parser
            CSSParser parser = createParserForInput(input);
            // visitor
            CSSParserVisitorImpl visitor = new CSSParserVisitorImpl();
            return visitor.visitMedia(parser.media());
        } catch (IOException e) {
            log.error("I/O error during media query parsing: {}", e.getMessage());
            return null;
        }/* catch (CSSException e) {
            log.warn("Malformed media query {}", query);
            return null;
        } */ catch (RecognitionException e) {
            log.warn("Malformed media query {}", query);
            return null;
        }
    }
805365
function generateIjmap(ijmapPath) {
  return through2.obj((codepointsFile, encoding, callback) => {
    const ijmap = {
      icons: codepointsToIjmap(codepointsFile.contents.toString())
    };

    callback(null, new File({
      path: ijmapPath,
      contents: new Buffer(JSON.stringify(ijmap), 'utf8')
    }));

    function codepointsToIjmap(codepoints) {
      return _(codepoints)
        .split('\n')       // split into lines
        .reject(_.isEmpty) // remove empty lines
        .reduce((codepointMap, line) => {   // build up the codepoint map
          let [ name, codepoint ] = line.split(' ');
          codepointMap[codepoint] = { name: titleize(humanize(name)) };
          return codepointMap;
        }, {});
    }
  });
}
76695
function() {
			var self = this;

			$.extend( self.options, self.element.data() );

			// Use the 'type' query attribute in favor of 'post_mime_type'.
			if ( self.options.query && self.options.query.post_mime_type ) {
				self.options.query.type = self.options.query.post_mime_type;
				delete self.options.query.post_mime_type;
			}

			self._content_id = 'wp-mediapicker-content-' + self.element.attr( 'id' );

			self.element.hide().wrap( '<div class="wp-mediapicker-container" />' );

			self._wrap          = self.element.parent();
			self._open_button   = $( '<button type="button" class="wp-mediapicker-open-button button" />' ).insertAfter( self.element );
			self._remove_button = $( '<button type="button" class="wp-mediapicker-remove-button button-link button-link-delete" />' ).hide().insertAfter( self._open_button ).text( self.options.label_remove );
			self._content_wrap  = $( '<div class="wp-mediapicker-content-wrap" />' ).insertAfter( self._remove_button );
			self._content       = $( '<div class="wp-mediapicker-content" />' ).appendTo( self._content_wrap ).attr( 'id', self._content_id );

			self._frame = new MediaPickerFrame({
				title: self.options.label_modal,
				buttonText: self.options.label_button,
				frame: 'select',
				state: 'insert',
				selection: new wp.media.model.Selection( [], {
					multiple: self.options.multiple
				}),
				query: self.options.query,
				multiple: self.options.multiple,
				filterable: self.options.filterable,
				searchable: self.options.searchable,
				editable: self.options.editable
			});

			self._setValue( self.element.val() );

			self._addListeners();
		}
1224040
function (media_id, copy_options, cb) {

            if (copy_options) {
                copy_options._method = 'POST';
            }

            _util.buildQuery('medias/' + media_id + '/copy', copy_options, function (error, data) {

                return cb(error, data);

            });

        }
931066
function createTables() {
  // setup config
  var config = require('../config/config.js')

  var db = wc_db.getConnection(config.db)
  var sql = fs.readFileSync('model/Media.sql').toString()
  debug(sql)
  db.query(sql).then(function(ret){
    debug(ret)
  }).catch(function(err) {
    debug(err)
  })

  var sql = fs.readFileSync('model/Rating.sql').toString()
  debug(sql)
  db.query(sql).then(function(ret){
    debug(ret)
  }).catch(function(err) {
    debug(err)
  })

  var sql = fs.readFileSync('model/Tag.sql').toString()
  debug(sql)
  db.query(sql).then(function(ret){
    debug(ret)
  }).catch(function(err) {
    debug(err)
  })

  var sql = fs.readFileSync('model/MediaTag.sql').toString()
  debug(sql)
  db.query(sql).then(function(ret){
    debug(ret)
  }).catch(function(err) {
    debug(err)
  })

  var sql = fs.readFileSync('model/Fragment.sql').toString()
  debug(sql)
  db.query(sql).then(function(ret){
    debug(ret)
  }).catch(function(err) {
    debug(err)
  })

  var sql = fs.readFileSync('model/Meta.sql').toString()
  debug(sql)
  db.query(sql).then(function(ret){
    debug(ret)
  }).catch(function(err) {
    debug(err)
  })

  var sql = fs.readFileSync('model/User.sql').toString()
  debug(sql)
  db.query(sql).then(function(ret){
    debug(ret)
  }).catch(function(err) {
    debug(err)
  })

}
508938
public String getMediaQuery(Scope scope, Generator gen) {
        StringBuilder sb = new StringBuilder();
        for (Expression expr : mediaQueries) {
            if (sb.length() > 0) {
                sb.append(" and ");
            }
            sb.append(expr.eval(scope, gen));
        }
        return sb.toString();
    }