!function(e){formintorjs.define(["admin/models/field-model"],function(e){return Backbone.Collection.extend({model:e,get_by_id:function(e){var t=!1;return this.each(function(n){n.cid===e&&(t=n)}),t},model_index:function(e){return this.indexOf(e)},update_cols:function(e){this.each(function(t,n){t.set("cols",e,{silent:!0})})},get_fields_related_to:function(e){var t=[];return this.each(function(n){var i=n.get_conditions_element_ids(),d=_.indexOf(i,e.get("element_id"));d>-1&&t.push(n);var s=[];"name"===e.get("type")&&"true"===e.get("multiple_name")?s.push(e.get("element_id")+"-prefix",e.get("element_id")+"-first-name",e.get("element_id")+"-middle-name",e.get("element_id")+"-last-name"):"address"===e.get("type")?("true"===e.get("street_address")&&s.push(e.get("element_id")+"-street_address"),"true"===e.get("address_line")&&s.push(e.get("element_id")+"-address_line"),"true"===e.get("city")&&s.push(e.get("element_id")+"-city"),"true"===e.get("state")&&s.push(e.get("element_id")+"-state"),"true"===e.get("zip")&&s.push(e.get("element_id")+"-zip")):"time"===e.get("type")&&(s.push(e.get("element_id")+"-hours",e.get("element_id")+"-minutes"),"twelve"===e.get("time_type")&&s.push(e.get("element_id")+"-ampm")),_.each(s,function(e){(d=_.indexOf(i,e))>-1&&t.push(n)})}),t}})})}(jQuery);