/*
Tracks changes to dependent arrays, as well as to properties of items in
dependent arrays.

@class DependentArraysObserver
10218
function DependentArraysObserver(callbacks, cp, instanceMeta, context, propertyName, sugarMeta) {
      // user specified callbacks for `addedItem` and `removedItem`
      this.callbacks = callbacks;

      // the computed property: remember these are shared across instances
      this.cp = cp;

      // the ReduceComputedPropertyInstanceMeta this DependentArraysObserver is
      // associated with
      this.instanceMeta = instanceMeta;

      // A map of array guids to dependentKeys, for the given context.  We track
      // this because we want to set up the computed property potentially before the
      // dependent array even exists, but when the array observer fires, we lack
      // enough context to know what to update: we can recover that context by
      // getting the dependentKey.
      this.dependentKeysByGuid = {};

      // a map of dependent array guids -> TrackedArray instances.  We use
      // this to lazily recompute indexes for item property observers.
      this.trackedArraysByGuid = {};

      // We suspend observers to ignore replacements from `reset` when totally
      // recomputing.  Unfortunately we cannot properly suspend the observers
      // because we only have the key; instead we make the observers no-ops
      this.suspended = false;

      // This is used to coalesce item changes from property observers within a
      // single item.
      this.changedItems = {};
      // This is used to coalesce item changes for multiple items that depend on
      // some shared state.
      this.changedItemCount = 0;
    }
823563
@Override
  public final synchronized void handleSeSellerChanged(
    final Map<String, Object> pReqVars,
      final String pName) throws Exception {
    this.sesellers = null;
  }
1294023
@Override
	public void updateArray(final int columnIndex, final Array x) throws SQLException {
		wrapped.updateArray(columnIndex, x);
	}
588266
function (modelName, typesUpdated) {
      var _this3 = this;

      var klass = this._nameToClass(modelName);
      var records = this.getRecords(klass, modelName);

      var onChange = function () {
        typesUpdated([_this3.wrapModelType(klass, modelName)]);
      };
      var observer = {
        didChange: function () {
          _emberMetalRun_loop.default.scheduleOnce('actions', this, onChange);
        },
        willChange: function () {
          return this;
        }
      };

      _emberRuntimeMixinsArray.addArrayObserver(records, this, observer);

      var release = function () {
        _emberRuntimeMixinsArray.removeArrayObserver(records, _this3, observer);
      };

      return release;
    }
1327178
function(object, data, changeRecord, except) {
            data.handlers.forEach(function(hdata) {
                var acceptList = hdata.observed.get(object).acceptList;
                // If except is defined, Notifier.performChange has been
                // called, with except as the type.
                // All the handlers that accepts that type are skipped.
                if ((typeof except !== "string"
                        || inArray(acceptList, except) === -1)
                        && inArray(acceptList, changeRecord.type) > -1)
                    hdata.changeRecords.push(changeRecord);
            });
        }
542142
function() {
		gui.Plugin.prototype.ondestruct.call(this);
		gui.Object.each(this._trackedtypes, function(type, list) {
			list.slice().forEach(function(checks) {
				this._cleanup(type, checks);
			}, this);
		}, this);
	}
188849
def on_change(modified, added, deleted)
      # Modifications and additions are treated the same.
      (modified + added).uniq.each do |path|
        if file = Ichiban::ProjectFile.from_abs(path)
          begin
            @loader.change(file) # Tell the Loader that this file has changed
            file.update
          rescue Exception => exc
            Ichiban.logger.exception(exc)
          end
        end
      end
      
      # Deletions are handled specially.
      deleted.each do |path|
        Ichiban::Deleter.new.delete_dest(path)
      end
      
      # Finally, propagate this change to any dependent files.
      (modified + added + deleted).uniq.each do |path|
        begin
          Ichiban::Dependencies.propagate(path)
        rescue => exc
          Ichiban.logger.exception(exc)
        end
      end
    end
159643
function observableChanged(change) {
  const store = this;
  action(() => {
    store.dataChanges.set(change.name, change.newValue);

    if (store.isSame(store.dataChanges.get(change.name), store.dataServer[change.name])) {
      store.dataChanges.delete(change.name);
    }
  })();
}
690291
function track(property, thisArg){
    if(!(property in trackedProperties)){
      trackedProperties[property] = true;
      values[property] = model[property];
      Object.defineProperty(model, property, {
        get: function () { return values[property]; },
        set: function(newValue) {
          var oldValue = values[property];
          values[property] = newValue;
          getListeners(property).forEach(function(callback){
            callback.call(thisArg, newValue, oldValue);
          });
        }
      });
    }
  }
1158990
function(items) {
            var hasRelativePositioning = hasNumberProperty(items, 'relativePosition');

            for(var i = 0; i < items.length; i++) {
                if(i == items.length - 1)
                    items[i].diffWithNextRelativePos = undefined;
                else
                    items[i].diffWithNextRelativePos = items[i + 1].relativePosition - items[i].relativePosition;
            }
        }
278581
function(serverData, hasData) {
        // Clear out any changes the user might have made previously.
        this._opSetQueue = [{}];

        // Bring in all the new server data.
        this._mergeMagicFields(serverData);
        var self = this;
        AV._objectEach(serverData, function(value, key) {
          self._serverData[key] = AV._decode(value, key);
        });

        // Refresh the attributes.
        this._rebuildAllEstimatedData();

        // Clear out the cache of mutable containers.
        this._refreshCache();
        this._opSetQueue = [{}];

        this._hasData = hasData;
      }
1336537
function (items, options) {


            options = options || {};
            _.defaults(options, {silent: false, index: this.$items.length});

            var index = options.index;

            if (!_.isArray(items)) {
                items = [items];
            }
            var item, itemIndex;
            for (var i = 0; i < items.length; i++) {
                item = items[i];
                if (item instanceof Bindable) {
                    item.bind('change', this._onItemChange, this);
                    item.bind('*', this._onItemEvent, this);
                }
                itemIndex = index + i;
                if (_.isUndefined(this.$items[itemIndex]) || itemIndex >= this.$items.length) {
                    this.$items[itemIndex] = item;
                } else {
                    this.$items.splice(itemIndex, 0, item);
                }
                if (options.silent !== true) {
                    this.trigger('add', {item: item, index: itemIndex});
                }
            }
        }
802879
function mapNodeAndRefreshWhenChanged(containerNode, mapping, valueToMap, callbackAfterAddingNodes, index) {
        // Map this array value inside a dependentObservable so we re-map when any dependency changes
        var mappedNodes = [];
        var dependentObservable = ko.dependentObservable(function() {
            var newMappedNodes = mapping(valueToMap, index, ko.utils.fixUpContinuousNodeArray(mappedNodes, containerNode)) || [];

            // On subsequent evaluations, just replace the previously-inserted DOM nodes
            if (mappedNodes.length > 0) {
                ko.utils.replaceDomNodes(mappedNodes, newMappedNodes);
                if (callbackAfterAddingNodes)
                    ko.dependencyDetection.ignore(callbackAfterAddingNodes, null, [valueToMap, newMappedNodes, index]);
            }

            // Replace the contents of the mappedNodes array, thereby updating the record
            // of which nodes would be deleted if valueToMap was itself later removed
            mappedNodes.length = 0;
            ko.utils.arrayPushAll(mappedNodes, newMappedNodes);
        }, null, { disposeWhenNodeIsRemoved: containerNode, disposeWhen: function() { return !ko.utils.anyDomNodeIsAttachedToDocument(mappedNodes); } });
        return { mappedNodes : mappedNodes, dependentObservable : (dependentObservable.isActive() ? dependentObservable : undefined) };
    }
596587
function() {

		if (this._property_changed_listener && (this._value_container.getValue() != this._property_container)) {

			// currently listening to the parent's old data source
			this._property_changed_listener && this._property_container.removePropertyListener(this._property_changed_listener);
			this._enumerable_changed_listener && this._property_container.removeListener(this._enumerable_changed_listener);
			this._property_changed_listener = null;
			this._enumerable_changed_listener = null;
			this._property_container = null;

		}

		this._queueForRefresh();

	}
650602
void onItemsChanged(boolean structureChanged) {
        if (!mPreventDispatchingItemsChanged) {
            if (structureChanged) {
                mIsVisibleItemsStale = true;
                mIsActionItemsStale = true;
            }

            dispatchPresenterUpdate(structureChanged);
        } else {
            mItemsChangedWhileDispatchPrevented = true;
        }
    }
471701
public void initListeners() {
        schemaChangedListener.watch(ChangedType.UPDATED, ChangedType.DELETED);
        propertiesChangedListener.watch(ChangedType.UPDATED);
        authenticationChangedListener.watch(ChangedType.UPDATED);
    }
917535
function detectObjectObserve() {
    if (typeof Object.observe !== 'function' ||
        typeof Array.observe !== 'function') {
      return false;
    }

    var records = [];

    function callback(recs) {
      records = recs;
    }

    var test = {};
    var arr = [];
    Object.observe(test, callback);
    Array.observe(arr, callback);
    test.id = 1;
    test.id = 2;
    delete test.id;
    arr.push(1, 2);
    arr.length = 0;

    Object.deliverChangeRecords(callback);
    if (records.length !== 5)
      return false;

    if (records[0].type != 'add' ||
        records[1].type != 'update' ||
        records[2].type != 'delete' ||
        records[3].type != 'splice' ||
        records[4].type != 'splice') {
      return false;
    }

    Object.unobserve(test, callback);
    Array.unobserve(arr, callback);

    return true;
  }