"use strict";Object.defineProperty(exports,"__esModule",{value:true});var _createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var i=r[t];i.enumerable=i.enumerable||false;i.configurable=true;if("value"in i)i.writable=true;Object.defineProperty(e,i.key,i)}}return function(r,t,i){if(t)e(r.prototype,t);if(i)e(r,i);return r}}();var _utils=require("$:/plugins/felixhayashi/tiddlymap/js/utils");var _utils2=_interopRequireDefault(_utils);var _Edge=require("$:/plugins/felixhayashi/tiddlymap/js/Edge");var _Edge2=_interopRequireDefault(_Edge);var _exception=require("$:/plugins/felixhayashi/tiddlymap/js/exception");var _AbstractRefEdgeTypeSubscriber=require("$:/plugins/felixhayashi/tiddlymap/js/AbstractRefEdgeTypeSubscriber");var _AbstractRefEdgeTypeSubscriber2=_interopRequireDefault(_AbstractRefEdgeTypeSubscriber);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(e,r){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return r&&(typeof r==="object"||typeof r==="function")?r:e}function _inherits(e,r){if(typeof r!=="function"&&r!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof r)}e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(r)Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r}/* @preserve TW-Guard */
/*\

title: $:/plugins/felixhayashi/tiddlymap/js/AbstractMagicEdgeTypeSubscriber
type: application/javascript
module-type: library

@preserve

\*/
/* @preserve TW-Guard */var AbstractMagicEdgeTypeSubscriber=function(e){_inherits(r,e);function r(e,t){_classCallCheck(this,r);var i=_possibleConstructorReturn(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));i.edgeTypesByFieldName=_utils2.default.makeHashMap();for(var a in e){var n=e[a];if(i.canHandle(n)){i.edgeTypesByFieldName[n.name]=n}}return i}_createClass(r,[{key:"getReferencesFromField",value:function e(r,t,i){throw new _exception.MissingOverrideError(this,"getReferencesFromField")}},{key:"getReferences",value:function e(r,t,i){var a=_utils2.default.makeHashMap();var n=r.fields;for(var s in n){var u=this.edgeTypesByFieldName[s];if(!u||i&&!i[u.id])continue;var o=this.getReferencesFromField(r,s,t);if(o&&o.length){a[u.id]=o}}return a}}]);return r}(_AbstractRefEdgeTypeSubscriber2.default);exports.default=AbstractMagicEdgeTypeSubscriber;
//# sourceMappingURL=./maps/felixhayashi/tiddlymap/js/edgeTypeSubscriber/AbstractMagicEdgeTypeSubscriber.js.map
