diff --git a/dist/app/app.js b/dist/app/app.js index 6a78d451269..0a4e38fd981 100644 --- a/dist/app/app.js +++ b/dist/app/app.js @@ -12,7 +12,8 @@ Dc.$inject=["$locale"];var Id=p(Rc),Jd=p(Sc);Gc.$inject=["$parse"];var Kd=p({res },boostTerms:function(b){return null==b?c.mlt_field[a].boost_terms:(c.mlt_field[a].boost_terms=b,this)},boost:function(b){return null==b?c.mlt_field[a].boost:(c.mlt_field[a].boost=b,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.MoreLikeThisQuery=function(a,b){var c={mlt:{like_text:b,fields:[]}};if(f(a))c.mlt.fields.push(a);else{if(!d(a))throw new TypeError("Argument must be string or array");c.mlt.fields=a}return{fields:function(a){if(null==a)return c.mlt.fields;if(f(a))c.mlt.fields.push(a);else{if(!d(a))throw new TypeError("Argument must be a string or array");c.mlt.fields=a}return this},likeText:function(a){return null==a?c.mlt.like_text:(c.mlt.like_text=a,this)},percentTermsToMatch:function(a){return null==a?c.mlt.percent_terms_to_match:(c.mlt.percent_terms_to_match=a,this)},minTermFreq:function(a){return null==a?c.mlt.min_term_freq:(c.mlt.min_term_freq=a,this)},maxQueryTerms:function(a){return null==a?c.mlt.max_query_terms:(c.mlt.max_query_terms=a,this)},stopWords:function(a){return null==a?c.mlt.stop_words:(c.mlt.stop_words=a,this)},minDocFreq:function(a){return null==a?c.mlt.min_doc_freq:(c.mlt.min_doc_freq=a,this)},maxDocFreq:function(a){return null==a?c.mlt.max_doc_freq:(c.mlt.max_doc_freq=a,this)},minWordLen:function(a){return null==a?c.mlt.min_word_len:(c.mlt.min_word_len=a,this)},maxWordLen:function(a){return null==a?c.mlt.max_word_len:(c.mlt.max_word_len=a,this)},analyzer:function(a){return null==a?c.mlt.analyzer:(c.mlt.analyzer=a,this)},boostTerms:function(a){return null==a?c.mlt.boost_terms:(c.mlt.boost_terms=a,this)},boost:function(a){return null==a?c.mlt.boost:(c.mlt.boost=a,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.MultiMatchQuery=function(a,b){var c={multi_match:{query:b,fields:[]}};if(f(a))c.multi_match.fields.push(a);else{if(!d(a))throw new TypeError("Argument must be string or array");c.multi_match.fields=a}return{fields:function(a){if(null==a)return c.multi_match.fields;if(f(a))c.multi_match.fields.push(a);else{if(!d(a))throw new TypeError("Argument must be string or array");c.multi_match.fields=a}return this},useDisMax:function(a){return null==a?c.multi_match.use_dis_max:(c.multi_match.use_dis_max=a,this)},tieBreaker:function(a){return null==a?c.multi_match.tie_breaker:(c.multi_match.tie_breaker=a,this)},cutoffFrequency:function(a){return null==a?c.multi_match.cutoff_frequency:(c.multi_match.cutoff_frequency=a,this)},minimumShouldMatch:function(a){return null==a?c.multi_match.minimum_should_match:(c.multi_match.minimum_should_match=a,this)},rewrite:function(a){return null==a?c.multi_match.rewrite:(a=a.toLowerCase(),("constant_score_auto"===a||"scoring_boolean"===a||"constant_score_boolean"===a||"constant_score_filter"===a||0===a.indexOf("top_terms_boost_")||0===a.indexOf("top_terms_"))&&(c.multi_match.rewrite=a),this)},fuzzyRewrite:function(a){return null==a?c.multi_match.fuzzy_rewrite:(a=a.toLowerCase(),("constant_score_auto"===a||"scoring_boolean"===a||"constant_score_boolean"===a||"constant_score_filter"===a||0===a.indexOf("top_terms_boost_")||0===a.indexOf("top_terms_"))&&(c.multi_match.fuzzy_rewrite=a),this)},lenient:function(a){return null==a?c.multi_match.lenient:(c.multi_match.lenient=a,this)},boost:function(a){return null==a?c.multi_match.boost:(c.multi_match.boost=a,this)},query:function(a){return null==a?c.multi_match.query:(c.multi_match.query=a,this)},type:function(a){return null==a?c.multi_match.type:(a=a.toLowerCase(),("boolean"===a||"phrase"===a||"phrase_prefix"===a)&&(c.multi_match.type=a),this)},fuzziness:function(a){return null==a?c.multi_match.fuzziness:(c.multi_match.fuzziness=a,this)},prefixLength:function(a){return null==a?c.multi_match.prefix_length:(c.multi_match.prefix_length=a,this)},maxExpansions:function(a){return null==a?c.multi_match.max_expansions:(c.multi_match.max_expansions=a,this)},operator:function(a){return null==a?c.multi_match.operator:(a=a.toLowerCase(),("and"===a||"or"===a)&&(c.multi_match.operator=a),this)},slop:function(a){return null==a?c.multi_match.slop:(c.multi_match.slop=a,this)},analyzer:function(a){return null==a?c.multi_match.analyzer:(c.multi_match.analyzer=a,this)},zeroTermsQuery:function(a){return null==a?c.multi_match.zero_terms_query:(a=a.toLowerCase(),("all"===a||"none"===a)&&(c.multi_match.zero_terms_query=a),this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.NestedQuery=function(a){var b={nested:{path:a}};return{path:function(a){return null==a?b.nested.path:(b.nested.path=a,this)},query:function(a){if(null==a)return b.nested.query;if(!j(a))throw new TypeError("Argument must be a Query");return b.nested.query=a._self(),this},filter:function(a){if(null==a)return b.nested.filter;if(!k(a))throw new TypeError("Argument must be a Filter");return b.nested.filter=a._self(),this},scoreMode:function(a){return null==a?b.nested.score_mode:(a=a.toLowerCase(),("avg"===a||"total"===a||"max"===a||"none"===a)&&(b.nested.score_mode=a),this)},scope:function(){return this},boost:function(a){return null==a?b.nested.boost:(b.nested.boost=a,this)},toString:function(){return JSON.stringify(b)},_type:function(){return"query"},_self:function(){return b}}},u.PrefixQuery=function(a,b){var c={prefix:{}};return c.prefix[a]={value:b},{field:function(b){var d=c.prefix[a];return null==b?a:(delete c.prefix[a],a=b,c.prefix[b]=d,this)},value:function(b){return null==b?c.prefix[a].value:(c.prefix[a].value=b,this)},rewrite:function(b){return null==b?c.prefix[a].rewrite:(b=b.toLowerCase(),("constant_score_auto"===b||"scoring_boolean"===b||"constant_score_boolean"===b||"constant_score_filter"===b||0===b.indexOf("top_terms_boost_")||0===b.indexOf("top_terms_"))&&(c.prefix[a].rewrite=b),this)},boost:function(b){return null==b?c.prefix[a].boost:(c.prefix[a].boost=b,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.QueryStringQuery=function(a){var b={query_string:{}};return b.query_string.query=a,{query:function(a){return null==a?b.query_string.query:(b.query_string.query=a,this)},defaultField:function(a){return null==a?b.query_string.default_field:(b.query_string.default_field=a,this)},fields:function(a){if(null==b.query_string.fields&&(b.query_string.fields=[]),null==a)return b.query_string.fields;if(f(a))b.query_string.fields.push(a);else{if(!d(a))throw new TypeError("Argument must be a string or array");b.query_string.fields=a}return this},useDisMax:function(a){return null==a?b.query_string.use_dis_max:(b.query_string.use_dis_max=a,this)},defaultOperator:function(a){return null==a?b.query_string.default_operator:(a=a.toUpperCase(),("AND"===a||"OR"===a)&&(b.query_string.default_operator=a),this)},analyzer:function(a){return null==a?b.query_string.analyzer:(b.query_string.analyzer=a,this)},quoteAnalyzer:function(a){return null==a?b.query_string.quote_analyzer:(b.query_string.quote_analyzer=a,this)},allowLeadingWildcard:function(a){return null==a?b.query_string.allow_leading_wildcard:(b.query_string.allow_leading_wildcard=a,this)},lowercaseExpandedTerms:function(a){return null==a?b.query_string.lowercase_expanded_terms:(b.query_string.lowercase_expanded_terms=a,this)},enablePositionIncrements:function(a){return null==a?b.query_string.enable_position_increments:(b.query_string.enable_position_increments=a,this)},fuzzyPrefixLength:function(a){return null==a?b.query_string.fuzzy_prefix_length:(b.query_string.fuzzy_prefix_length=a,this)},fuzzyMinSim:function(a){return null==a?b.query_string.fuzzy_min_sim:(b.query_string.fuzzy_min_sim=a,this)},phraseSlop:function(a){return null==a?b.query_string.phrase_slop:(b.query_string.phrase_slop=a,this)},boost:function(a){return null==a?b.query_string.boost:(b.query_string.boost=a,this)},analyzeWildcard:function(a){return null==a?b.query_string.analyze_wildcard:(b.query_string.analyze_wildcard=a,this)},autoGeneratePhraseQueries:function(a){return null==a?b.query_string.auto_generate_phrase_queries:(b.query_string.auto_generate_phrase_queries=a,this)},minimumShouldMatch:function(a){return null==a?b.query_string.minimum_should_match:(b.query_string.minimum_should_match=a,this)},tieBreaker:function(a){return null==a?b.query_string.tie_breaker:(b.query_string.tie_breaker=a,this)},escape:function(a){return null==a?b.query_string.escape:(b.query_string.escape=a,this)},fuzzyMaxExpansions:function(a){return null==a?b.query_string.fuzzy_max_expansions:(b.query_string.fuzzy_max_expansions=a,this)},fuzzyRewrite:function(a){return null==a?b.query_string.fuzzy_rewrite:(a=a.toLowerCase(),("constant_score_auto"===a||"scoring_boolean"===a||"constant_score_boolean"===a||"constant_score_filter"===a||0===a.indexOf("top_terms_boost_")||0===a.indexOf("top_terms_"))&&(b.query_string.fuzzy_rewrite=a),this)},rewrite:function(a){return null==a?b.query_string.rewrite:(a=a.toLowerCase(),("constant_score_auto"===a||"scoring_boolean"===a||"constant_score_boolean"===a||"constant_score_filter"===a||0===a.indexOf("top_terms_boost_")||0===a.indexOf("top_terms_"))&&(b.query_string.rewrite=a),this)},quoteFieldSuffix:function(a){return null==a?b.query_string.quote_field_suffix:(b.query_string.quote_field_suffix=a,this)},lenient:function(a){return null==a?b.query_string.lenient:(b.query_string.lenient=a,this)},toString:function(){return JSON.stringify(b)},_type:function(){return"query"},_self:function(){return b}}},u.RangeQuery=function(a){var b={range:{}};return b.range[a]={},{field:function(c){var d=b.range[a];return null==c?a:(delete b.range[a],a=c,b.range[c]=d,this)},from:function(c){return null==c?b.range[a].from:(b.range[a].from=c,this)},to:function(c){return null==c?b.range[a].to:(b.range[a].to=c,this)},includeLower:function(c){return null==c?b.range[a].include_lower:(b.range[a].include_lower=c,this)},includeUpper:function(c){return null==c?b.range[a].include_upper:(b.range[a].include_upper=c,this)},gt:function(c){return null==c?b.range[a].gt:(b.range[a].gt=c,this)},gte:function(c){return null==c?b.range[a].gte:(b.range[a].gte=c,this)},lt:function(c){return null==c?b.range[a].lt:(b.range[a].lt=c,this)},lte:function(c){return null==c?b.range[a].lte:(b.range[a].lte=c,this)},boost:function(c){return null==c?b.range[a].boost:(b.range[a].boost=c,this)},toString:function(){return JSON.stringify(b)},_type:function(){return"query"},_self:function(){return b}}},u.RegexpQuery=function(a,b){var c={regexp:{}};return c.regexp[a]={value:b},{field:function(b){var d=c.regexp[a];return null==b?a:(delete c.regexp[a],a=b,c.regexp[b]=d,this)},value:function(b){return null==b?c.regexp[a].value:(c.regexp[a].value=b,this)},flags:function(b){return null==b?c.regexp[a].flags:(c.regexp[a].flags=b,this)},flagsValue:function(b){return null==b?c.regexp[a].flags_value:(c.regexp[a].flags_value=b,this)},rewrite:function(b){return null==b?c.regexp[a].rewrite:(b=b.toLowerCase(),("constant_score_auto"===b||"scoring_boolean"===b||"constant_score_boolean"===b||"constant_score_filter"===b||0===b.indexOf("top_terms_boost_")||0===b.indexOf("top_terms_"))&&(c.regexp[a].rewrite=b),this)},boost:function(b){return null==b?c.regexp[a].boost:(c.regexp[a].boost=b,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.SpanFirstQuery=function(a,b){if(!j(a))throw new TypeError("Argument must be a SpanQuery");var c={span_first:{match:a._self(),end:b}};return{match:function(a){if(null==a)return c.span_first.match;if(!j(a))throw new TypeError("Argument must be a SpanQuery");return c.span_first.match=a._self(),this},end:function(a){return null==a?c.span_first.end:(c.span_first.end=a,this)},boost:function(a){return null==a?c.span_first.boost:(c.span_first.boost=a,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.SpanNearQuery=function(a,b){var c,e,f={span_near:{clauses:[],slop:b}};if(j(a))f.span_near.clauses.push(a._self());else{if(!d(a))throw new TypeError("Argument must be SpanQuery or array of SpanQueries");for(c=0,e=a.length;e>c;c++){if(!j(a[c]))throw new TypeError("Argument must be array of SpanQueries");f.span_near.clauses.push(a[c]._self())}}return{clauses:function(a){var b,c;if(null==a)return f.span_near.clauses;if(j(a))f.span_near.clauses.push(a._self());else{if(!d(a))throw new TypeError("Argument must be SpanQuery or array of SpanQueries");for(f.span_near.clauses=[],b=0,c=a.length;c>b;b++){if(!j(a[b]))throw new TypeError("Argument must be array of SpanQueries");f.span_near.clauses.push(a[b]._self())}}return this},slop:function(a){return null==a?f.span_near.slop:(f.span_near.slop=a,this)},inOrder:function(a){return null==a?f.span_near.in_order:(f.span_near.in_order=a,this)},collectPayloads:function(a){return null==a?f.span_near.collect_payloads:(f.span_near.collect_payloads=a,this)},boost:function(a){return null==a?f.span_near.boost:(f.span_near.boost=a,this)},toString:function(){return JSON.stringify(f)},_type:function(){return"query"},_self:function(){return f}}},u.SpanNotQuery=function(a,b){if(!j(a)||!j(b))throw new TypeError("Argument must be a SpanQuery");var c={span_not:{include:a._self(),exclude:b._self()}};return{include:function(a){if(null==a)return c.span_not.include;if(!j(a))throw new TypeError("Argument must be a SpanQuery");return c.span_not.include=a._self(),this},exclude:function(a){if(null==a)return c.span_not.exclude;if(!j(a))throw new TypeError("Argument must be a SpanQuery");return c.span_not.exclude=a._self(),this},boost:function(a){return null==a?c.span_not.boost:(c.span_not.boost=a,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.SpanOrQuery=function(a){var b,c,e={span_or:{clauses:[]}};if(j(a))e.span_or.clauses.push(a._self());else{if(!d(a))throw new TypeError("Argument must be SpanQuery or array of SpanQueries");for(b=0,c=a.length;c>b;b++){if(!j(a[b]))throw new TypeError("Argument must be array of SpanQueries");e.span_or.clauses.push(a[b]._self())}}return{clauses:function(a){var b,c;if(null==a)return e.span_or.clauses;if(j(a))e.span_or.clauses.push(a._self());else{if(!d(a))throw new TypeError("Argument must be SpanQuery or array of SpanQueries");for(e.span_or.clauses=[],b=0,c=a.length;c>b;b++){if(!j(a[b]))throw new TypeError("Argument must be array of SpanQueries");e.span_or.clauses.push(a[b]._self())}}return this},boost:function(a){return null==a?e.span_or.boost:(e.span_or.boost=a,this)},toString:function(){return JSON.stringify(e)},_type:function(){return"query"},_self:function(){return e}}},u.SpanTermQuery=function(a,b){var c={span_term:{}};return c.span_term[a]={term:b},{field:function(b){var d=c.span_term[a];return null==b?a:(delete c.span_term[a],a=b,c.span_term[b]=d,this)},term:function(b){return null==b?c.span_term[a].term:(c.span_term[a].term=b,this)},boost:function(b){return null==b?c.span_term[a].boost:(c.span_term[a].boost=b,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.TermQuery=function(a,b){var c={term:{}};return c.term[a]={term:b},{field:function(b){var d=c.term[a];return null==b?a:(delete c.term[a],a=b,c.term[b]=d,this)},term:function(b){return null==b?c.term[a].term:(c.term[a].term=b,this)},boost:function(b){return null==b?c.term[a].boost:(c.term[a].boost=b,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.TermsQuery=function(a,b){var c={terms:{}};if(f(b))c.terms[a]=[b];else{if(!d(b))throw new TypeError("Argument must be string or array");c.terms[a]=b}return{field:function(b){var d=c.terms[a];return null==b?a:(delete c.terms[a],a=b,c.terms[b]=d,this)},terms:function(b){if(null==b)return c.terms[a];if(f(b))c.terms[a].push(b);else{if(!d(b))throw new TypeError("Argument must be string or array");c.terms[a]=b}return this},minimumShouldMatch:function(a){return null==a?c.terms.minimum_should_match:(c.terms.minimum_should_match=a,this)},disableCoord:function(a){return null==a?c.terms.disable_coord:(c.terms.disable_coord=a,this)},boost:function(a){return null==a?c.terms.boost:(c.terms.boost=a,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.TopChildrenQuery=function(a,b){if(!j(a))throw new TypeError("Argument must be a Query");var c={top_children:{query:a._self(),type:b}};return{query:function(a){if(null==a)return c.top_children.query;if(!j(a))throw new TypeError("Argument must be a Query");return c.top_children.query=a._self(),this},type:function(a){return null==a?c.top_children.type:(c.top_children.type=a,this)},scope:function(){return this},score:function(a){return null==a?c.top_children.score:(a=a.toLowerCase(),("max"===a||"sum"===a||"avg"===a)&&(c.top_children.score=a),this)},factor:function(a){return null==a?c.top_children.factor:(c.top_children.factor=a,this)},incrementalFactor:function(a){return null==a?c.top_children.incremental_factor:(c.top_children.incremental_factor=a,this)},boost:function(a){return null==a?c.top_children.boost:(c.top_children.boost=a,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.WildcardQuery=function(a,b){var c={wildcard:{}};return c.wildcard[a]={value:b},{field:function(b){var d=c.wildcard[a];return null==b?a:(delete c.wildcard[a],a=b,c.wildcard[b]=d,this)},value:function(b){return null==b?c.wildcard[a].value:(c.wildcard[a].value=b,this)},rewrite:function(b){return null==b?c.wildcard[a].rewrite:(b=b.toLowerCase(),("constant_score_auto"===b||"scoring_boolean"===b||"constant_score_boolean"===b||"constant_score_filter"===b||0===b.indexOf("top_terms_boost_")||0===b.indexOf("top_terms_"))&&(c.wildcard[a].rewrite=b),this)},boost:function(b){return null==b?c.wildcard[a].boost:(c.wildcard[a].boost=b,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"query"},_self:function(){return c}}},u.GeoPoint=function(b){var c=[0,0];return null!=b&&d(b)&&2===b.length&&(c=[b[1],b[0]]),{properties:function(b){return null==b?c:(e(b)&&a(b,"lat")&&a(b,"lon")&&(c={lat:b.lat,lon:b.lon}),this)},string:function(a){return null==a?c:(f(a)&&-1!==a.indexOf(",")&&(c=a),this)},geohash:function(a,b){return b=null!=b&&g(b)?b:12,null==a?c:(f(a)&&a.length===b&&(c=a),this)},array:function(a){return null==a?c:(d(a)&&2===a.length&&(c=[a[1],a[0]]),this)},toString:function(){return JSON.stringify(c)},_type:function(){return"geo point"},_self:function(){return c}}},u.Highlight=function(c){var e={fields:{}},g=function(b,c,d){null==b?e[c]=d:(a(e.fields,b)||(e.fields[b]={}),e.fields[b][c]=d)};return null!=c&&(f(c)?e.fields[c]={}:d(c)&&b(c,function(a){e.fields[a]={}})),{fields:function(c){return null==c?e.fields:(f(c)?a(e.fields,c)||(e.fields[c]={}):d(c)&&b(c,function(b){a(e.fields,b)||(e.fields[b]={})}),void 0)},preTags:function(a,b){return null===a&&null!=b?e.fields[b].pre_tags:null==a?e.pre_tags:(f(a)?g(b,"pre_tags",[a]):d(a)&&g(b,"pre_tags",a),this)},postTags:function(a,b){return null===a&&null!=b?e.fields[b].post_tags:null==a?e.post_tags:(f(a)?g(b,"post_tags",[a]):d(a)&&g(b,"post_tags",a),this)},order:function(a,b){return null===a&&null!=b?e.fields[b].order:null==a?e.order:(a=a.toLowerCase(),"score"===a&&g(b,"order",a),this)},tagsSchema:function(a){return null==a?e.tags_schema:(a=a.toLowerCase(),"styled"===a&&(e.tags_schema=a),this)},highlightFilter:function(a,b){return null===a&&null!=b?e.fields[b].highlight_filter:null==a?e.highlight_filter:(g(b,"highlight_filter",a),this)},fragmentSize:function(a,b){return null===a&&null!=b?e.fields[b].fragment_size:null==a?e.fragment_size:(g(b,"fragment_size",a),this)},numberOfFragments:function(a,b){return null===a&&null!=b?e.fields[b].number_of_fragments:null==a?e.number_of_fragments:(g(b,"number_of_fragments",a),this)},encoder:function(a){return null==a?e.encoder:(a=a.toLowerCase(),("default"===a||"html"===a)&&(e.encoder=a),this)},requireFieldMatch:function(a,b){return null===a&&null!=b?e.fields[b].require_field_match:null==a?e.require_field_match:(g(b,"require_field_match",a),this)},boundaryMaxScan:function(a,b){return null===a&&null!=b?e.fields[b].boundary_max_scan:null==a?e.boundary_max_scan:(g(b,"boundary_max_scan",a),this)},boundaryChars:function(a,b){return null===a&&null!=b?e.fields[b].boundary_chars:null==a?e.boundary_chars:(g(b,"boundary_chars",a),this)},type:function(a,b){return null===a&&null!=b?e.fields[b].type:null==a?e.type:(a=a.toLowerCase(),("fast-vector-highlighter"===a||"highlighter"===a)&&g(b,"type",a),this)},fragmenter:function(a,b){return null===a&&null!=b?e.fields[b].fragmenter:null==a?e.fragmenter:(a=a.toLowerCase(),("simple"===a||"span"===a)&&g(b,"fragmenter",a),this)},toString:function(){return JSON.stringify(e)},_type:function(){return"highlight"},_self:function(){return e}}},u.IndexedShape=function(a,b){var c={type:a,id:b};return{type:function(a){return null==a?c.type:(c.type=a,this)},id:function(a){return null==a?c.id:(c.id=a,this)},index:function(a){return null==a?c.index:(c.index=a,this)},shapeFieldName:function(a){return null==a?c.shape_field_name:(c.shape_field_name=a,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"indexed shape"},_self:function(){return c}}},u.Request=function(b){var e,g,h,i={},n=function(b){var c="",d=[];g.length>0&&(c=c+"/"+g.join()),h.length>0&&(c=c+"/"+h.join()),b.length>0&&"/"!==b[0]&&(c+="/"),c+=b;for(var e in i)a(i,e)&&""!==i[e]&&d.push(e+"="+encodeURIComponent(i[e]));return d.length>0&&(c=c+"?"+d.join("&")),c};return e={},b=b||{},g=null==b.indices?[]:f(b.indices)?[b.indices]:b.indices,h=null==b.types?[]:f(b.types)?[b.types]:b.types,0===g.length&&h.length>0&&(g=["_all"]),null!=b.routing&&(i.routing=b.routing),{sort:function(){var b,c;if(a(e,"sort")||(e.sort=[]),0===arguments.length)return e.sort;if(1===arguments.length){var g=arguments[0];if(f(g))e.sort.push(g);else if(q(g))e.sort.push(g._self());else{if(!d(g))throw new TypeError("Argument must be string, Sort, or array");for(e.sort=[],b=0,c=g.length;c>b;b++)if(f(g[b]))e.sort.push(g[b]);else{if(!q(g[b]))throw new TypeError("Invalid object in array");e.sort.push(g[b]._self())}}}else if(2===arguments.length){var h=arguments[0],i=arguments[1];if(f(h)&&f(i)&&(i=i.toLowerCase(),"asc"===i||"desc"===i)){var j={};j[h]={order:i},e.sort.push(j)}}return this},trackScores:function(a){return null==a?e.track_scores:(e.track_scores=a,this)},size:function(a){return null==a?e.size:(e.size=a,this)},timeout:function(a){return null==a?i.timeout:(i.timeout=a,this)},routing:function(a){return null==a?i.routing:(i.routing=a,this)},replication:function(a){return null==a?i.replication:(a=a.toLowerCase(),("async"===a||"sync"===a||"default"===a)&&(i.replication=a),this)},consistency:function(a){return null==a?i.consistency:(a=a.toLowerCase(),("default"===a||"one"===a||"quorum"===a||"all"===a)&&(i.consistency=a),this)},searchType:function(a){return null==a?i.search_type:(a=a.toLowerCase(),("dfs_query_then_fetch"===a||"dfs_query_and_fetch"===a||"query_then_fetch"===a||"query_and_fetch"===a||"scan"===a||"count"===a)&&(i.search_type=a),this)},fields:function(a){if(null==a)return e.fields;if(null==e.fields&&(e.fields=[]),f(a))e.fields.push(a);else{if(!d(a))throw new TypeError("Argument must be string or array");e.fields=a}return this},from:function(a){return null==a?e.from:(e.from=a,this)},query:function(a){if(null==a)return e.query;if(!j(a))throw new TypeError("Argument must be a Query");return e.query=a._self(),this},indices:function(a){if(null==a)return g;if(f(a))g=[a];else{if(!d(a))throw new TypeError("Argument must be a string or array");g=a}return 0===g.length&&h.length>0&&(g=["_all"]),this},types:function(a){if(null==a)return h;if(f(a))h=[a];else{if(!d(a))throw new TypeError("Argument must be a string or array");h=a}return 0===g.length&&h.length>0&&(g=["_all"]),this},facet:function(a){if(null==a)return e.facets;if(null==e.facets&&(e.facets={}),!l(a))throw new TypeError("Argument must be a Facet");return c(e.facets,a._self()),this},filter:function(a){if(null==a)return e.filter;if(!k(a))throw new TypeError("Argument must be a Filter");return e.filter=a._self(),this},highlight:function(a){if(null==a)return e.highlight;if(!r(a))throw new TypeError("Argument must be a Highlight object");return e.highlight=a._self(),this},suggest:function(a){if(null==a)return e.suggest;if(null==e.suggest&&(e.suggest={}),f(a))e.suggest.text=a;else{if(!s(a))throw new TypeError("Argument must be a string or Suggest object");c(e.suggest,a._self())}return this},scriptField:function(a){if(null==a)return e.script_fields;if(null==e.script_fields&&(e.script_fields={}),!m(a))throw new TypeError("Argument must be a ScriptField");return c(e.script_fields,a._self()),this},preference:function(a){return null==a?i.preference:(i.preference=a,this)},ignoreIndices:function(a){return null==a?i.ignore_indices:(a=a.toLowerCase(),("none"===a||"missing"===a)&&(i.ignore_indices=a),this)},indexBoost:function(a,b){return null==e.indices_boost&&(e.indices_boost={}),0===arguments.length?e.indices_boost:(e.indices_boost[a]=b,this)},explain:function(a){return null==a?e.explain:(e.explain=a,this)},version:function(a){return null==a?e.version:(e.version=a,this)},minScore:function(a){return null==a?e.min_score:(e.min_score=a,this)},toString:function(){return JSON.stringify(e)},_type:function(){return"request"},_self:function(){return e},doDeleteByQuery:function(a,b){var c=JSON.stringify(e.query);if(null==u.client)throw new Error("No Client Set");return u.client.del(n("_query"),c,a,b)},doCount:function(a,b){var c=JSON.stringify(e.query);if(null==u.client)throw new Error("No Client Set");return u.client.post(n("_count"),c,a,b)},doSearch:function(a,b){var c=JSON.stringify(e);if(null==u.client)throw new Error("No Client Set");return u.client.post(n("_search"),c,a,b)}}},u.ScriptField=function(a){var b={};return b[a]={},{lang:function(c){return null==c?b[a].lang:(b[a].lang=c,this)},script:function(c){return null==c?b[a].script:(b[a].script=c,this)},params:function(c){return null==c?b[a].params:(b[a].params=c,this)},ignoreFailure:function(c){return null==c?b[a].ignore_failure:(b[a].ignore_failure=c,this)},toString:function(){return JSON.stringify(b)},_type:function(){return"script field"},_self:function(){return b}}},u.Shape=function(a,b){var c={},d=function(a){var b=!1;return("point"===a||"linestring"===a||"polygon"===a||"multipoint"===a||"envelope"===a||"multipolygon"===a)&&(b=!0),b};return a=a.toLowerCase(),d(a)&&(c.type=a,c.coordinates=b),{type:function(a){return null==a?c.type:(a=a.toLowerCase(),d(a)&&(c.type=a),this)},coordinates:function(a){return null==a?c.coordinates:(c.coordinates=a,this)},toString:function(){return JSON.stringify(c)},_type:function(){return"shape"},_self:function(){return c}}},u.Sort=function(a){null==a&&(a="_score");var b={},c=a,d="_geo_distance",e="_script";return b[c]={},{field:function(d){var e=b[c];return null==d?a:(delete b[c],a=d,c=d,b[c]=e,this)},geoDistance:function(e){var f=b[c];if(null==e)return b[c][a];if(!n(e))throw new TypeError("Argument must be a GeoPoint");return delete b[c],c=d,b[c]=f,b[c][a]=e._self(),this},script:function(a){var d=b[c];return null==a?b[c].script:(delete b[c],c=e,b[c]=d,b[c].script=a,this)},order:function(a){return null==a?b[c].order:(a=a.toLowerCase(),("asc"===a||"desc"===a)&&(b[c].order=a),this)},asc:function(){return b[c].order="asc",this},desc:function(){return b[c].order="desc",this},reverse:function(a){return null==a?b[c].reverse:(b[c].reverse=a,this)},missing:function(a){return null==a?b[c].missing:(b[c].missing=a,this)},ignoreUnmapped:function(a){return null==a?b[c].ignore_unmapped:(b[c].ignore_unmapped=a,this)},unit:function(a){return null==a?b[c].unit:(a=a.toLowerCase(),("mi"===a||"km"===a)&&(b[c].unit=a),this)},normalize:function(a){return null==a?b[c].normalize:(b[c].normalize=a,this)},distanceType:function(a){return null==a?b[c].distance_type:(a=a.toLowerCase(),("arc"===a||"plane"===a)&&(b[c].distance_type=a),this)},params:function(a){return null==a?b[c].params:(b[c].params=a,this)},lang:function(a){return null==a?b[c].lang:(b[c].lang=a,this)},type:function(a){return null==a?b[c].type:(a=a.toLowerCase(),("string"===a||"number"===a)&&(b[c].type=a),this)},mode:function(a){return null==a?b[c].mode:(a=a.toLowerCase(),("min"===a||"max"===a||"sum"===a||"avg"===a)&&(b[c].mode=a),this)},nestedPath:function(a){return null==a?b[c].nested_path:(b[c].nested_path=a,this)},nestedFilter:function(a){if(null==a)return b[c].nested_filter;if(!k(a))throw new TypeError("Argument must be a Filter");return b[c].nested_filter=a._self(),this},toString:function(){return JSON.stringify(b)},_type:function(){return"sort"},_self:function(){return b}}},u.DirectGenerator=function(){var a=u.DirectSettingsMixin(),b=a._self();return c(a,{preFilter:function(a){return null==a?b.pre_filter:(b.pre_filter=a,this)},postFilter:function(a){return null==a?b.post_filter:(b.post_filter=a,this)},field:function(a){return null==a?b.field:(b.field=a,this)},size:function(a){return null==a?b.size:(b.size=a,this)},toString:function(){return JSON.stringify(b)},_type:function(){return"generator"},_self:function(){return b}})},u.DirectSettingsMixin=function(){var a={};return{accuracy:function(b){return null==b?a.accuracy:(a.accuracy=b,this)},suggestMode:function(b){return null==b?a.suggest_mode:(b=b.toLowerCase(),("missing"===b||"popular"===b||"always"===b)&&(a.suggest_mode=b),this)},sort:function(b){return null==b?a.sort:(b=b.toLowerCase(),("score"===b||"frequency"===b)&&(a.sort=b),this)},stringDistance:function(b){return null==b?a.string_distance:(b=b.toLowerCase(),("internal"===b||"damerau_levenshtein"===b||"levenstein"===b||"jarowinkler"===b||"ngram"===b)&&(a.string_distance=b),this)},maxEdits:function(b){return null==b?a.max_edits:(a.max_edits=b,this)},maxInspections:function(b){return null==b?a.max_inspections:(a.max_inspections=b,this)},maxTermFreq:function(b){return null==b?a.max_term_freq:(a.max_term_freq=b,this)},prefixLength:function(b){return null==b?a.prefix_length:(a.prefix_length=b,this)},minWordLen:function(b){return null==b?a.min_word_len:(a.min_word_len=b,this)},minDocFreq:function(b){return null==b?a.min_doc_freq:(a.min_doc_freq=b,this)},_self:function(){return a}}},u.PhraseSuggester=function(a){var b={};return b[a]={phrase:{}},{text:function(c){return null==c?b[a].text:(b[a].text=c,this)},analyzer:function(c){return null==c?b[a].phrase.analyzer:(b[a].phrase.analyzer=c,this)},field:function(c){return null==c?b[a].phrase.field:(b[a].phrase.field=c,this)},size:function(c){return null==c?b[a].phrase.size:(b[a].phrase.size=c,this)},shardSize:function(c){return null==c?b[a].phrase.shard_size:(b[a].phrase.shard_size=c,this)},realWorldErrorLikelihood:function(c){return null==c?b[a].phrase.real_world_error_likelihood:(b[a].phrase.real_world_error_likelihood=c,this)},confidence:function(c){return null==c?b[a].phrase.confidence:(b[a].phrase.confidence=c,this)},separator:function(c){return null==c?b[a].phrase.separator:(b[a].phrase.separator=c,this)},maxErrors:function(c){return null==c?b[a].phrase.max_errors:(b[a].phrase.max_errors=c,this)},gramSize:function(c){return null==c?b[a].phrase.gram_size:(b[a].phrase.gram_size=c,this)},forceUnigrams:function(c){return null==c?b[a].phrase.force_unigrams:(b[a].phrase.force_unigrams=c,this)},linearSmoothing:function(c,d,e){return 0===arguments.length?b[a].phrase.smoothing:(b[a].phrase.smoothing={linear:{trigram_lambda:c,bigram_lambda:d,unigram_lambda:e}},this)},laplaceSmoothing:function(c){return null==c?b[a].phrase.smoothing:(b[a].phrase.smoothing={laplace:{alpha:c}},this)},stupidBackoffSmoothing:function(c){return null==c?b[a].phrase.smoothing:(b[a].phrase.smoothing={stupid_backoff:{discount:c}},this)},directGenerator:function(c){var e,f;if(null==b[a].phrase.direct_generator&&(b[a].phrase.direct_generator=[]),null==c)return b[a].phrase.direct_generator; if(t(c))b[a].phrase.direct_generator.push(c._self());else{if(!d(c))throw new TypeError("Argument must be a Generator or array of Generators");for(b[a].phrase.direct_generator=[],e=0,f=c.length;f>e;e++){if(!t(c[e]))throw new TypeError("Argument must be an array of Generators");b[a].phrase.direct_generator.push(c[e]._self())}}return this},toString:function(){return JSON.stringify(b)},_type:function(){return"suggest"},_self:function(){return b}}},u.TermSuggester=function(a){var b={},d=u.DirectSettingsMixin();return b[a]={term:d._self()},c(d,{text:function(c){return null==c?b[a].text:(b[a].text=c,this)},analyzer:function(c){return null==c?b[a].term.analyzer:(b[a].term.analyzer=c,this)},field:function(c){return null==c?b[a].term.field:(b[a].term.field=c,this)},size:function(c){return null==c?b[a].term.size:(b[a].term.size=c,this)},shardSize:function(c){return null==c?b[a].term.shard_size:(b[a].term.shard_size=c,this)},toString:function(){return JSON.stringify(b)},_type:function(){return"suggest"},_self:function(){return b}})},u.noConflict=function(){return v.ejs=w,this}}.call(this),define("../vendor/elasticjs/elastic",function(){}),angular.module("elasticjs.service",[]).factory("ejsResource",["$http",function(a){return function(b){var c=window.ejs||{},d=function(a,b,c){return a.then(function(a){return(b||angular.noop)(a.data),a.data},function(a){return(c||angular.noop)(a.data),a.data})};return null==b&&(b=""),c.client={server:function(a){return null==a?b:(b=a,this)},post:function(c,e,f,g){return c=b+c,d(a.post(c,e),f,g)},get:function(c,e,f,g){return c=b+c,d(a.get(c,e),f,g)},put:function(c,e,f,g){return c=b+c,d(a.put(c,e),f,g)},del:function(c,e,f,g){return c=b+c,d(a.delete(c,e),f,g)},head:function(c,d,e,f){return c=b+c,a.head(c,d).then(function(a){return(e||angular.noop)(a.headers()),a.headers()},function(){return(f||angular.noop)(void 0),void 0})}},c}}]),define("elasticjs",function(){}),!function(a){a(function(){a.support.transition=function(){var a=function(){var a,b=document.createElement("bootstrap"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(a in c)if(void 0!==b.style[a])return c[a]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){d.trigger("closed").remove()}var d,e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),d=a(f),b&&b.preventDefault(),d.length||(d=e.hasClass("alert")?e:e.parent()),d.trigger(b=a.Event("close")),b.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,c):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.alert.data-api",b,c.prototype.close)}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f="object"==typeof c&&c;e||d.data("button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(!(b>this.$items.length-1||0>b))return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(b,c){var d,e=this.$element.find(".item.active"),f=c||e[b](),g=this.interval,h="next"==b?"left":"right",i="next"==b?"first":"last",j=this;if(this.sliding=!0,g&&this.pause(),f=f.length?f:this.$element.find(".item")[i](),d=a.Event("slide",{relatedTarget:f[0],direction:h}),!f.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(j.$indicators.children()[j.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),this.$element.one(a.support.transition.end,function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger("slid")},0)})}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return g&&this.cycle(),this}}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d,e=a(this),f=a(e.attr("data-target")||(c=e.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),g=a.extend({},f.data(),e.data());f.carousel(g),(d=e.attr("data-slide-to"))&&f.data("carousel").pause().to(d).cycle(),b.preventDefault()})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(!this.transitioning&&!this.$element.hasClass("in")){if(b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in"),d&&d.length){if(e=d.data("collapse"),e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])}},hide:function(){var b;!this.transitioning&&this.$element.hasClass("in")&&(b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0))},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[null!==a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){"show"==c.type&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c),c.isDefaultPrevented()||(this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=a.extend({},a.fn.collapse.defaults,d.data(),"object"==typeof c&&c);e||d.data("collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":d.data();d[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)})}(window.jQuery),!function(a){function b(){a(".dropdown-backdrop").remove(),a(d).each(function(){c(a(this)).removeClass("open")})}function c(b){var c,d=b.attr("data-target");return d||(d=b.attr("href"),d=d&&/#/.test(d)&&d.replace(/.*(?=#[^\s]*$)/,"")),c=d&&a(d),c&&c.length||(c=b.parent()),c}var d="[data-toggle=dropdown]",e=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};e.prototype={constructor:e,toggle:function(){var d,e,f=a(this);if(!f.is(".disabled, :disabled"))return d=c(f),e=d.hasClass("open"),b(),e||("ontouchstart"in document.documentElement&&a('