Sync map constructor
@constructor
174123
function Generator (fn, opts) {
	if (fn instanceof Function) {
		if (typeof opts === 'number') {
			opts = {duration: opts};
		}
		else {
			opts = opts || {};
		}
		opts.generate = fn;
	}
	else {
		opts = fn || {};
	}

	//sort out arguments
	opts = extend({
		//total duration of a stream
		duration: Infinity,

		//time repeat period, in seconds, or 1/frequency
		period: Infinity,

		//inferred from period
		//frequency: 0,

		/**
		 * Generate sample value for a time.
		 * Returns [L, R, ...] or a number for each channel
		 *
		 * @param {number} time current time
		 */
		generate: Math.random
	}, pcm.defaults, opts);

	//align frequency/period
	if (opts.frequency != null) {
		opts.period = 1 / opts.frequency;
	} else {
		opts.frequency = 1 / opts.period;
	}

	let time = 0, count = 0;

	return generate;

	//return sync source/map
	function generate (buffer) {
		if (!buffer) buffer = util.create(opts.samplesPerFrame, opts.channels, opts.sampleRate);

		//get audio buffer channels data in array
		var data = util.data(buffer);

		//enough?
		if (time + buffer.length / opts.sampleRate > opts.duration) return null;

		//generate [channeled] samples
		for (var i = 0; i < buffer.length; i++) {
			var moment = time + i / opts.sampleRate;

			//rotate by period
			if (opts.period !== Infinity) {
				moment %= opts.period;
			}

			var gen = opts.generate(moment);

			//treat null as end
			if (gen === null) {
				return gen;
			}

			//wrap number value
			if (!Array.isArray(gen)) {
				gen = [gen || 0];
			}

			//distribute generated data by channels
			for (var channel = 0; channel < buffer.numberOfChannels; channel++) {
				data[channel][i] = (gen[channel] == null ? gen[0] : gen[channel]);
			}
		}

		//update counters
		count += buffer.length;
		time = count / opts.sampleRate;

		return buffer;
	}
}
803394
function( map ) {
					var code;
					if ( map ) {
						if ( completed ) {

							// Execute the appropriate callbacks
							jqXHR.always( map[ jqXHR.status ] );
						} else {

							// Lazy-add the new callbacks in a way that preserves old ones
							for ( code in map ) {
								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
							}
						}
					}
					return this;
				}
613785
function Mapping() {
    this.generatedLine = 0;
    this.generatedColumn = 0;
    this.source = null;
    this.originalLine = null;
    this.originalColumn = null;
    this.name = null;
  }
859048
function Sync(path) {
  if (typeof path !== 'string' || arguments.length > 1) { throw new Error('Property decorators can be used for single property access') }
  return createDecorator((options, key) => {
    if (!options.computed) options.computed = {}
    options.computed[key] = sync(path)
  })
}
365853
function sync(method, collection, options, query) {
      //
      // Method and or collection was not provided, set default arguments.
      // Additionally default to CREATE if the method is not a string.
      //
      if (!(collection instanceof backbone.Collection)) {
        if ('string' !== typeof method) {
          options = method;
          method = 'create';
        } else {
          options = collection;
        }

        collection = this;
      }

      options = options || {};

      if ('create' === method) {
        if (collection.any(function anyStored(model) { return model.stored; })) method = 'update';
        if (collection.any(function anyNew(model) { return !model.stored; })) options.upsert = true;
      }

      return backbone.sync(method, collection, options, query);
    }
1284933
private void syncProperties(boolean fromReal) {
        PluginDefinition def = getDefinition();
        
        for (PropertyInfo propInfo : def.getProperties()) {
            if (fromReal) {
                syncProperty(propInfo, real, this);
            } else {
                syncProperty(propInfo, this, real);
            }
        }
    }
408338
function uploadMap(map, e) {
    let reader = new window.FileReader();

    reader.readAsText(e.target.files[0]);

    reader.onload = function () {
        let data = JSON.parse(event.target.result);
        map.new(data);
    };
}
1164284
function Mapper(mapper, flusher) {
  Transform.call(this, {
    objectMode: true,
    // Patch from 0.11.7
    // https://github.com/joyent/node/commit/ba72570eae938957d10494be28eac28ed75d256f
    highWaterMark: 16
  })

  this.mapper = mapper
  this.flusher = flusher
}
910672
function map(obj, iterator, context) {
		var results = [], i, j;

		if (!obj) return results;

		// Use native .map method if it exists:
		if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);

		// Fallback for native .map:
		for (i = 0, j = obj.length; i < j; i++ ) {
			results[i] = iterator.call(context, obj[i], i, obj);
		}
		return results;
	}
1175648
public void sync(Map<String, Map<String, MappingConfig>> mappingConfig, List<Dml> dmls, Properties envProperties) {
        sync(dmls, dml -> {
            if (dml.getIsDdl() != null && dml.getIsDdl() && StringUtils.isNotEmpty(dml.getSql())) {
                // DDL
            columnsTypeCache.remove(dml.getDestination() + "." + dml.getDatabase() + "." + dml.getTable());
            return false;
        } else {
            // DML
            String destination = StringUtils.trimToEmpty(dml.getDestination());
            String groupId = StringUtils.trimToEmpty(dml.getGroupId());
            String database = dml.getDatabase();
            String table = dml.getTable();
            Map<String, MappingConfig> configMap;
            if (envProperties != null && !"tcp".equalsIgnoreCase(envProperties.getProperty("canal.conf.mode"))) {
                configMap = mappingConfig.get(destination + "-" + groupId + "_" + database + "-" + table);
            } else {
                configMap = mappingConfig.get(destination + "_" + database + "-" + table);
            }

            if (configMap == null) {
                return false;
            }

            if (configMap.values().isEmpty()) {
                return false;
            }

            for (MappingConfig config : configMap.values()) {
                if (config.getConcurrent()) {
                    List<SingleDml> singleDmls = SingleDml.dml2SingleDmls(dml);
                    singleDmls.forEach(singleDml -> {
                        int hash = pkHash(config.getDbMapping(), singleDml.getData());
                        SyncItem syncItem = new SyncItem(config, singleDml);
                        dmlsPartition[hash].add(syncItem);
                    });
                } else {
                    int hash = 0;
                    List<SingleDml> singleDmls = SingleDml.dml2SingleDmls(dml);
                    singleDmls.forEach(singleDml -> {
                        SyncItem syncItem = new SyncItem(config, singleDml);
                        dmlsPartition[hash].add(syncItem);
                    });
                }
            }
            return true;
        }
    }   );
    }
1362032
function(map, key, value) {

    var list = [];

    if (map.has(key)) {

      list = map.get(key);

      if (!list) {
        list = [];
      }


    }
    list.push(value);
    map.set(key, list);

}
446305
function sync(collection, newCollection, index) {
        if (index === void 0) { index = 'id'; }
        var answer = removeElements(collection, newCollection, index);
        if (newCollection) {
            newCollection.forEach(function (item) {
                var oldItem = _.find(collection, function (c) { return c[index] === item[index]; });
                if (!oldItem) {
                    answer = true;
                    collection.push(item);
                }
                else {
                    if (item !== oldItem) {
                        angular.copy(item, oldItem);
                        answer = true;
                    }
                }
            });
        }
        return answer;
    }
1006393
function init() {
      var _this = this;

      this._shouldSyncFromOpts = true;
      this.on('update', function () {
        if (_this._shouldSyncFromOpts) _this.trigger('sync');
        _this._shouldSyncFromOpts = true;
      });
    }
1009154
function mapCacheSet$1(key, value) {
  var data = getMapData$4(this, key),
      size = data.size;

  data.set(key, value);
  this.size += data.size == size ? 0 : 1;
  return this;
}
348280
function map(arr, iter) {
    if (Immutable.Map.isMap(arr)) {
        var type = 'Map';
        if (Immutable.OrderedMap.isOrderedMap(arr)) {
            type = 'OrderedMap';
        }

        return mapAsList(arr, function(value, key) {
            return Q(iter(value, key))
            .then(function(result) {
                return [key, result];
            });
        })
        .then(function(result) {
            return Immutable[type](result);
        });
    } else {
        return mapAsList(arr, iter)
        .then(function(result) {
            return Immutable.List(result);
        });
    }
}
892365
function sync(method, instance, options) {
	if ( method === 'delete' ) {
		return deleteItem( instance, options );
	} else if ( method === 'create' || method === 'update' ) {
		return putItem( instance, options );
	} // `method` equals 'read' below this point

	if ( instance instanceof Backbone.DynamoDB.Collection ) {
		return fetchCollection( instance, options );
	}

	return getItem( instance, options );
}
119942
function beforeCreate(Vue) {
	return function () {
		this._syncers = {}

		const SyncCreator = Vue.$syncer.driver
		const synced = this.$options.sync
		if (synced) {
			// Set up each syncer
			each(synced, (settings, key) => {
				this._syncers[key] = new SyncCreator(Vue, this, key, settings)

				Object.defineProperty(this, key, {
					get: () => {
						return this._syncers[key] ? this._syncers[key].state : null
					},
					set: noop,
					enumerable: true,
					configurable: true
				})
			})
		}
	}
}