/* Links and images are resolved from supplied `options`.
166218
function(text, link) {
    var href = link.url
      , external = link.external || this.options.externalLinks;
    if (!href)
      href = link.toString();
    this.out.push("<a href=\"" + href + "\"");
    if (link.title)
      this.out.push(" title=\"" + escapeHtml(link.title) + "\"");
    if (external)
      this.out.push(" target=\"_blank\"");
    // Link text is rendered separately with the same options
    var html = new InlineCompiler(this.options).toHtml(text);
    this.out.push(">" + html + "</a>");
  }
56186
function GraphBuilder(options){

  options = options || {};

  // Precedence for resolvers.
  this.resolvers = options.resolvers || [
    require('./resolvers/absolute'),
    require('./resolvers/relative'),
    require('./resolvers/environment')
  ];

  this.handlers = options.directives || [];
}
890753
function resolvePathFor(options, src) {
  if (Array.isArray(src)) {
    src.forEach(dir => resolvePathFor(options, dir));
  } else {
    const relativePath = get(options, src);
    if (Array.isArray(relativePath)) {
      set(options, src, relativePath.map(n => getAbsPath(n)));
    } else {
      const _absPath = getAbsPath(relativePath);
      relativePath !== _absPath && set(options, src, _absPath);
    }
  }
}
629451
function resolve() {
            resolvePath(path, function (err, _resolvedPath) {
                if (err) {
                    if (err.code !== "ENOENT") {
                        return error(err);
                    }
                    // If checkSymlinks is on we'll get an ENOENT when creating a new file.
                    // In that case, just resolve the parent path and go from there.
                    resolvePath(dirname(path), function (err, dir) {
                        if (err) return error(err);
                        resolvedPath = join(dir, basename(path));
                        createTempFile();
                    });
                    return;
                }
                
                resolvedPath = _resolvedPath;
                createTempFile();
            });
        }
317772
function LocalfsStorageAttachments(options) {
  if(options.removePrefix) {
    this.prefix = options.removePrefix;
  }
  attachments.StorageProvider.call(this, options);
}
868220
function resolve( opts, clbk ) {
	var ratelimit;
	var options;
	var count;
	var total;
	var data;
	var last;
	var err;

	options = getOptions( opts ); // request options

	count = 0;
	total = 1;
	last = 1;

	debug( 'Beginning request.' );
	getPage( opts.page );

	/**
	* FUNCTION: getPage( i )
	*	Gets a single resource page.
	*
	* @private
	* @param {Number} i - page number
	* @returns {Void}
	*/
	function getPage( i ) {
		options.path = urlpath({
			'pathname': opts.pathname,
			'page': i,
			'per_page': opts.per_page,
			'query': opts.query
		});
		debug( 'Request path: %s', options.path );

		debug( 'Attempting to resolve page %d.', i );
		request( options, onPage );
	} // end FUNCTION getPage()

	/**
	* FUNCTION: getPages( i, j )
	*	Gets multiple resource pages.
	*
	* @private
	* @param {Number} i - start page
	* @param {Number} j - end page
	* @returns {Void}
	*/
	function getPages( i, j ) {
		for ( ; i <= j; i++ ) {
			getPage( i );
		}
	} // end FUNCTION getPages()

	/**
	* FUNCTION: onPage( error, response, body )
	*	Callback invoked upon receiving an HTTP response.
	*
	* @private
	* @param {Error|Null} error - error or null
	* @param {Object} response - HTTP response object
	* @param {Object[]|Object} body - response body
	* @returns {Void}
	*/
	function onPage( error, response, body ) {
		var link;
		var curr;

		count += 1;
		debug( '%d of %d pages resolved.', count, total );

		if ( arguments.length === 1 ) {
			debug( 'No available rate limit information.' );
			return done( error );
		}
		// If this is the first response, get initial rate limit info; otherwise, update rate limit info...
		if ( count === 1 ) {
			ratelimit = getRateLimit( response.headers );
		} else {
			ratelimit = checkRateLimit( ratelimit, response.headers );
		}
		if ( error ) {
			return done( error );
		}
		// If a user wants multiple pages, we need to parse the link header...
		if (
			opts.last_page > opts.page ||
			opts.last_page === 'last'
		) {
			debug( 'Attempting to parse link header: %s', response.headers.link );
			link = parseHeader( response.headers.link );
		}
		// Handle two cases: 1) user does not want multiple pages; 2) only one page exists (no link header => link=null)...
		if (
			link === void 0 || // single page
			link === null      // no link header
		) {
			debug( 'Single page request.' );			
			data = body;
			return done();
		}
		// If we have a link header, we have a paginated response...
		debug( 'Parsed link header: %s', JSON.stringify( link ) );

		if ( data === void 0 ) {
			last = lastPage( opts.last_page, +link.last.page );
			debug( 'Last page to resolve: %d.', last );

			total = getTotal( opts.page, last );
			debug( 'Total number of pages to resolve: %d.', total );

			data = createCache( total );
			debug( 'Initialized response cache of size: %d.', total );
		}
		if ( link.hasOwnProperty( 'next' ) ) {
			curr = +link.next.page - 1;
		} else {
			curr = +link.prev.page + 1;
		}
		debug( 'Current page: %d.', curr );

		debug( 'Caching page results.' );
		data[ curr-1 ] = body;

		if ( curr === opts.page ) {
			debug( 'First paginated result. Resolving %d remaining page(s).', total-count );
			setTimeout( next( curr+1, last ), 0 ); // dezalgo'd
		}
		done();
	} // end FUNCTION onPage()

	/**
	* FUNCTION: next( i, j )
	*	Returns a function to resolve the next pages.
	*
	* @private
	* @param {Number} i - start page
	* @param {Number} j - end page
	* @returns {Function} function to resolve next pages
	*/
	function next( i, j ) {
		/**
		* FUNCTION: next()
		*	Resolves the next set of pages.
		*
		* @private
		* @returns {Void}
		*/
		return function next() {
			getPages( i, j );
		};
	} // end FUNCTION next()

	/**
	* FUNCTION: done( [error] )
	*	Callback invoked upon resolving resources.
	*
	* @private
	* @param {Error} [error] - error object
	* @returns {Void}
	*/
	function done( error ) {
		if ( error && !err ) {
			err = error;
		}
		if ( count === total ) {
			debug( 'Request completed.' );
			if ( err ) {
				if ( ratelimit ) {
					return clbk( err, null, ratelimit );
				}
				return clbk( err );
			}
			if ( total > 1 ) {
				debug( 'Flattening paginated results.' );
				data = flatten( data );
				debug( 'Total number of results: %d', data.length );
			}
			return clbk( null, data, ratelimit );
		}
	} // end FUNCTION done()
}
75558
function resolve(wizBasePath, mdBasePath, options) {
  if (!wizBasePath) {
    console.error('Unkown wizBasePath: ', wizBasePath);
    return;
  }
  if (!mdBasePath) {
    console.error('Unkown mdBasePath: ', mdBasePath);
    return;
  }

  if (!options) {
    options = {};
  }

  var wizObj = new Wiz(wizBasePath, mdBasePath, options);
  queue.push(wizObj);

  deal();
}
1032219
private static List<ImageConfiguration> resolveConfiguration(Resolver imageResolver,
                                                                 List<ImageConfiguration> unresolvedImages) {
        List<ImageConfiguration> ret = new ArrayList<>();
        if (unresolvedImages != null) {
            for (ImageConfiguration image : unresolvedImages) {
                ret.addAll(imageResolver.resolve(image));
            }
            verifyImageNames(ret);
        }
        return ret;
    }
888582
function(options) {
        options = options || {};
        L.Util.setOptions(this, options);
        this._layers = {};
        this._columns = this.options.columns || [];
        this.options.imageOptions = this.options.imageOptions || {};
        this.options.sheetNum = this.options.sheetNum || 0;
        this._parsedToOrig = {};
        this._lat = this._cleanColumnName(this.options.lat);
        this._lon = this._cleanColumnName(this.options.lon);
        this._columns = this._cleanColumns(this._columns);
    }
1133403
function(options) {
      inputEx.InPlaceEdit.superclass.setOptions.call(this, options);
      
      this.options.visu = options.visu;
      
      this.options.editorField = options.editorField;
      
      this.options.buttonTypes = options.buttonTypes || {ok:"submit",cancel:"link"};
      
      this.options.animColors = options.animColors || null;
   }
403806
function prepareOptions(options) {
    if (typeof options === "string") {
        options = { path: options };
    }

    Ul.merge(options, {
        flags: "a"
    });

    this.options = options;
}
526351
function handleImageLoad (imageUrl) {
  _backingStores.forEach(function (backingStore) {
    if (layerContainsImage(backingStore.layer, imageUrl)) {
      invalidateBackingStore(backingStore.id);
    }
  });
}
1301084
function () {
    // Create request options from parsed source URL
    var options = url.parse(this.source, false);

    // Add on some defaults
    extend(options, {
      method: 'get',
      headers: {
        host: options.host,
        accept: 'image/*'
      }
    });

    // Determine https/http from source URL
    var library = options.protocol === 'https:' ? https : http;

    // Setup the request and its event binds
    this.request = library.request(options);
    this.request.on('response', this.onResponse.bind(this));
    this.request.on('error', this.onError.bind(this));
    this.request.setTimeout(5000, this.onTimeout.bind(this));

    // Start the download
    this.startTime = new Date().getTime();
    this.request.end();
  }
267091
function trustImages(from) {
    let trusted = prefStore.getState() || {};
    
    if (!trusted.images)
        trusted.images = [];
    
    trusted.images.push(from);
    prefStore.setState(trusted);
}
1268179
function() {
        var promises = [];

        this.images = this.element.find('img').each(function(index, image) {
            if (image.complete) {
                return; // Already loaded
            }

            var src = image.src,
                def = $.Deferred();

            image.onload = def.resolve;
            image.onerror = image.onabort = def.reject;
            image.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
            image.src = src;

            promises.push(def.promise());
        });

        $.when.apply($, promises).always(this.render.bind(this));
    }
957203
function rewriteLink(href, renderOpts) {
    var imgRoute = renderOpts.fqImages && (renderOpts.fqImages.route || '/images/');
    var imgPrefix = renderOpts.fqImages && renderOpts.fqImages.url;
    var linkPrefix = renderOpts.fqLinks || renderOpts.relPath;

    if (imgPrefix && u.startsWith(href, imgRoute)) { href = imgPrefix + href; }
    else if (linkPrefix && /^\/([^/]|$)/.test(href)) { href = linkPrefix + href; }

    return href;
  }
283269
function getResolvedPath(options, type = 'html') {
  const explicitPathKey = `${ type }Path`

  if (options[explicitPathKey]) {
    return path.resolve(options[explicitPathKey])
  }

  return path.resolve(options.outputDir, `${ options.fontName }.${ type }`)
}