(function(n){n.registerView("Threshold:ResultItem",new Sparkle.View(React.createClass({displayName:"Threshold:ResultItem",componentWillMount:function(){Sparkle.inst&&Sparkle.inst.start("render","Threshold:ResultItem")},componentDidMount:function(){Sparkle.inst&&Sparkle.inst.stop("render","Threshold:ResultItem")},componentWillUpdate:function(){Sparkle.inst&&Sparkle.inst.start("update","Threshold:ResultItem")},componentDidUpdate:function(){Sparkle.inst&&Sparkle.inst.stop("update","Threshold:ResultItem")},getInitialState:function(){var i=this.props||{},f=i.viewData||{},n=i.properties||{},r={},e=LocStringManager.getLocString({uiCulture:i.uiCulture,name:"LocStrings",namespace:"Threshold"}),t=n.Item,s=n.ImageCssRMSKey,o=n.ImageCssClassName,u=f.ThemeColor;return r.BackgroundColor=t.UseThemeColor?u:string.IsNullOrEmpty(t.ThumbnailBackground)?"#ddd":t.ThumbnailBackground,r},render:function(){var it=this,t=this.props||{},g=t.viewData||{},c=t.properties||{},s=[],n=t.encoder||Sparkle.defaultEncoder,ut=LocStringManager.getLocString({uiCulture:t.uiCulture,name:"LocStrings",namespace:"Threshold"}),i=c.Item,d=c.ImageCssRMSKey,nt=c.ImageCssClassName,rt=g.ThemeColor,tt=this.state.BackgroundColor,u,k,r,f,w,p,o,y,v,e,l,a,h,b;n=new HtmlHitHighlightingEncoder,u={},u.IsLeft=n.writeAttribute("false"),u.ImageCssRMSKey=n.writeAttribute(d),u.ImageCssClassName=n.writeAttribute(nt),u.PartnerTestHook=n.writeAttribute("DeviceContent.Item"),u.ImageBackgroundColor=n.writeAttribute(tt),k=Sparkle.resolveView("Shared:CenteredImagePair"),r=Sparkle.copyContext(t,u),r.segments.image=[],string.IsNullOrEmpty(i.Thumbnail)?(o={},o.Item=n.writeAttribute(i),y=Sparkle.resolveView("Threshold:PlaceHolderImage"),v=Sparkle.copyContext(t,o),r.segments.image.push(y.renderView(v))):(f={},f.src=n.writeAttribute(i.Thumbnail),f.role=n.writeAttribute("presentation"),f.style=n.writeAttribute({maxHeight:(i.ThumbnailDimensions?i.ThumbnailDimensions.height:96)+"px"}),w=Sparkle.resolveView("img"),p=Sparkle.copyContext(t,f),r.segments.image.push(w.renderView(p))),r.segments.caption=[],e={},e.className=n.writeAttribute("metadata"),TestHooksEnabled&&(e["data-tag"]=n.writeAttribute("ResultItem.Metadata")),l=Sparkle.copyContext(t,e);for(a in i.Positions)h=i.Positions[a],typeof h!="function"&&function(r){var u={},e,f;u.Item=n.writeAttribute(i),u.Position=n.writeAttribute(r),e=Sparkle.resolveView("Threshold:ResultItemPosition"),f=Sparkle.copyContext(t,u),l.defaultSegment.push(e.renderView(f))}(h);return b=Sparkle.resolveView("div").renderView(l),r.segments.caption.push(b),s.push(k.renderView(r)),s[s.length-1]}})))})(Sparkle.viewFolder)