<?xml version='1.0' encoding='UTF-8'?><uidget><metadata><name>Image</name><description>Add a picture</description><help>Select the image either by uploading it from your computer or by searching on Flickr.</help><api_version>1.0</api_version><size height='150' width='150' /><blog en='35' fr='8' /></metadata><view><content>&lt;div&gt;&lt;a&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;</content><properties><image_selector default='{id:-1,name:&apos;default.png&apos;,width:128,height:128,url:&apos;/images/default.png&apos;,thumbnails:{normal:&apos;/images/default.png&apos;,small:&apos;/images/default.png&apos;}}' default_action='true' help='Select the image to insert' icon='folder' name='imageFile' value='Choose an image' /><image_selector default='null' facultative='true' help='Optional: a different image with the same size to be shown at mouseover' icon='ui_carousel' name='mouseoverImage' plans='1,2' value='Mouseover image' /><radio class='uic_prop_display_type' default='&apos;ratio&apos;' display='Keep ratio|Full width|Crop|Free Size' help='Allows to choose between different displays modes for the image. &lt;br&gt;Keep ratio: on resize, the image aspect ratio will be preserved. &lt;br&gt;Full width: the image width will be adjusted to fit the visitor&apos;s browser. &lt;br&gt;Crop: on resize, the image will be cropped to cover the block size. &lt;br&gt;Free size: on resize, the image aspect ratio of the image will be changed to fit the block size. ' name='ratio_type' title='Display mode' values='ratio|fullwidth|cover|free' /><checkbox class='uii_parallax_control' default='false' help='Enable a parallax effect: when the page is scrolled, the image displayed scrolls slightly slower to create a nice 3D effect.' name='parallax' value='Parallax' /><checkbox default='false' help='By clicking on the image, your visitors can see it fullscreen.' name='bigger' value='Fullscreen on click' /><images_selector default='[]' help='With this option, you can specify the image(s) displayed on fullscreen. If did not select any and ticked the &apos;Fullscreen on click&apos; option, the image showed in the Image block will be displayed on fullscreen.' icon='screen' name='tb_imgs' value='Images on fullscreen' /><link_selector default='null' help='Add a link to an external site, a document or a page, or remove the current link.' icon='t_link' name='link' /><textarea default='""' facultative='true' height='20' help='Enter here the name of a drop down menu that will be displayed on image mouseover.&lt;br&gt;The drop down menu name should also be specified in the properties of the menu you want to be displayed.' icon='menu' name='mouseoverMenu' plans='1,2' text='Mouseover menu' /><textarea default='""' facultative='true' height='160' help='This will set the ALT attribute used by search engine to index images, instead of using the file description or file name. We suggest you to insert here a short description of your image.' icon='google' name='alt' plans='1,2' text='SEO description' /><checkbox default='false' help='By activating this feature, &lt;b&gt;your visitors will not be able to download these images&lt;/b&gt; by right clicking on an image or by drag-dropping it or by browsing the source of the page.' name='protect' plans='1,2' value='Anti-download' /></properties><design_properties><radio class='filterRadio' default='&apos;none&apos;' display='None|Grayscale|Blur|Invert|Contrast|Color or Gradient' help='Select the filter for the image.&lt;br&gt; &lt;b&gt;None&lt;/b&gt; no filter&lt;br&gt; &lt;b&gt;Grayscale&lt;/b&gt; remove all the colors&lt;br&gt; &lt;b&gt;Blur&lt;/b&gt; blur the image&lt;br&gt; &lt;b&gt;Invert&lt;/b&gt; invert all the colors&lt;br&gt; &lt;b&gt;Contrast&lt;/b&gt; more lightness differences&lt;br&gt; &lt;b&gt;Color or gradient&lt;/b&gt; add a color transparent overlay' name='filter' title='Filter' values='none|grayscale|blur|invert|contrast|color' /><gradient default='vertical|50%!rgba(0,0,0,0.5)' /><trigger help='Set the block to the real size of the image.' icon='arrow_tb' text='Real Size' trigger='realsize' /><checkbox class='uii_active_mask' default='false' help='By checking this option, you will be able to crop the image to a shape (circle, triangle...).' name='activate_mask' value='Crop to a shape' /><icon_selector class='uii_chose_mask' default='{"id":594,"name":"brightness_1","service":"Google-material-icons","removable":false}' default_action='true' icon='folder' name='mask' search_options='{"search_by":"shapes"}' value='Choose the shape' /></design_properties></view><script>UI_List.UI_Image={initialize:function(a){this.component=a;
this.component.colorPickers=[];
a.setOptions([&quot;locked&quot;,&quot;container&quot;]);
this.protect_available=(v.mode==&quot;editor&quot;||v.planid&gt;=1);
this.mouseover_available=(v.mode==&quot;editor&quot;||v.planid&gt;=1)
},updateImage:function(){this.component.node.unbind();
var b=this;
var d={h:this.component.H(),w:this.component.W()};
var a=1;
var c=function(g,f){var e=$(&quot;&lt;span&gt;&quot;).css({position:&quot;absolute&quot;,top:&quot;-1000px&quot;}).appendTo(&quot;body&quot;);
e.setIcon(b.component.data.mask,false,function(){setTimeout(function(){$.fn.loadImage(cdn_url(bestImgSrc(f,b.component.W(),b.component.H()))).done(function(){e.children().css({&quot;font-size&quot;:&quot;100px&quot;});
var k={w:e.width(),h:e.height()};
a=k.h/k.w;
var j=document.createElementNS(&quot;http://www.w3.org/2000/svg&quot;,&quot;text&quot;);
g.empty().addClass(&quot;uii_mask_node&quot;);
var h=Math.min(d.h/k.h*100,d.w/k.w*100);
j.setAttributeNS(null,&quot;x&quot;,(d.w-h*k.w/100)/2);
var i=h*k.h/100;
j.setAttributeNS(null,&quot;y&quot;,((d.h-i)/2)+(i/(b.component.data.mask.service!=&quot;Symbola&quot;?1:1.3)));
j=$.fn.setIcon(b.component.data.mask,$(j))[0];
var l=&apos;&lt;pattern class=&quot;uii_pattern&quot; id=&quot;&apos;+(g==b.img2?&quot;hover_&quot;:&quot;&quot;)+&quot;pattern_mask_&quot;+b.component.uniqId()+&apos;&quot; patternUnits=&quot;userSpaceOnUse&quot; width=&quot;&apos;+d.w+&apos;&quot; height=&quot;&apos;+d.h+&apos;&quot; viewbox=&quot;0 0 &apos;+d.w+&quot; &quot;+d.h+&apos;&quot;&gt;&lt;image xlink:href=&quot;&apos;+cdn_url(bestImgSrc(f,b.component.W(),b.component.H()))+&apos;&quot; width=&quot;&apos;+d.w+&apos;&quot; height=&quot;&apos;+d.h+&apos;&quot; preserveAspectRatio=&quot;xMidYMid &apos;+(b.component.data.ratio_type==&quot;cover&quot;?&quot;slice&quot;:&quot;meet&quot;)+&apos;&quot; /&gt;&lt;/pattern&gt;&apos;;
$(&quot;.pattern_mask&quot;,b.component.node).remove();
g.html(&quot;&lt;svg class=&apos;svg_defs&apos;&gt;&lt;defs&gt;&quot;+l+&quot;&lt;/defs&gt;&lt;/svg&gt;&quot;).append($(&apos;&lt;svg class=&quot;content_svg&quot; width=&quot;&apos;+d.w+&apos;&quot; height=&quot;&apos;+d.h+&apos;&quot;&gt;&lt;/svg&gt;&apos;));
$(&quot;.content_svg&quot;,g)[0].appendChild(j);
$(j).css({fill:&quot;url(#&quot;+(g==b.img2?&quot;hover_&quot;:&quot;&quot;)+&quot;pattern_mask_&quot;+b.component.uniqId()+&quot;)&quot;,&quot;font-size&quot;:h+&quot;px&quot;});
setTimeout(function(){e.remove()
},2000)
})
},100)
})
};
if(this.component.data.activate_mask){$(&quot;.uii_pattern&quot;,this.component.node).remove();
c(this.img1,b.component.data.imageFile)
}else{this.img1.removeClass();
if(!this.component.preloaded||this._protected()||this.component.data.ratio_type==&quot;fullwidth&quot;){this.img1.empty().append(b._setImageDefault(this.component.data.imageFile,this.component));
if(this._protected()){this._antiDownload(this.img1)
}}if(this.mouseover_available&amp;&amp;this.component.data.mouseoverMenu&amp;&amp;this.component.data.mouseoverMenu!=&quot;&quot;){this.component.node.mouseover(function(){if(window.UI_Menu){UI_Menu.showDropDownMenu(b.component.data.mouseoverMenu)
}})
}this._setFullWidth();
this._setParallax()
}if(this.mouseover_available&amp;&amp;this.component.data.mouseoverImage){if(this.component.data.activate_mask){c(this.img2,this.component.data.mouseoverImage)
}else{this.img2.empty().append(b._setImageDefault(this.component.data.mouseoverImage,this.component))
}this.component.node.hover(function(){b.img2.show();
b.img1.hide()
},function(){b.img1.show();
b.img2.hide()
})
}this._setFilter()
},getDescriptions:function(){var b=this;
var a=function(e){var c={};
c[b.component.data.imageFile.id]=e;
b.captions.resolve(c);
if(c[b.component.data.imageFile.id]){b.link.tooltip(c[b.component.data.imageFile.id].replace(/\n/g,&quot;&lt;br&gt;&quot;),750)
}};
if(!this.component.preloaded||this.component.data.protect||v.page_bg.security.content_protection){if(this.component.description){a(this.component.description)
}}else{if(this.img1&amp;&amp;this.img1.find(&quot;img:first&quot;).attr(&quot;desc&quot;)==&quot;1&quot;){a(this.img1.find(&quot;img:first&quot;).attr(&quot;alt&quot;))
}}},updateLink:function(){var a=this;
this.link.attr({target:&quot;&quot;,onClick:&quot;&quot;,title:&quot;&quot;}).removeAttr(&quot;href&quot;).unbind();
if(this.component.data.link&amp;&amp;this.component.data.link.onClick&amp;&amp;this.component.data.link.onClick.match(/^tb_show\(/)){try{this.component.data.tb_imgs=JSON_.parse(this.component.data.link.onClick.match(/tb_show\(\{list:\[\]\},0,(.*)\);return/)[1]);
this.component.data.bigger=true;
this.component.data.link=null
}catch(b){dbg.error(&quot;Image.tb_imgs&quot;,b,this.component.data)
}}if(this.component.data.link){this.link.attr(this.component.data.link);
if(v.mode==&quot;editor&quot;&amp;&amp;this.link.attr(&quot;onClick&quot;)==&quot;&quot;){this.link.attr(&quot;target&quot;,&quot;test_link&quot;)
}}else{if(this.component.data.bigger){this.link.attr(&quot;href&quot;,&quot;#&quot;).click(function(){if(a.component.data.tb_imgs&amp;&amp;a.component.data.tb_imgs.length&gt;0){tb_show_viewer(FileDescription.get(a.component.data.tb_imgs),0,a.component.data.tb_imgs,a._protected())
}else{tb_show_viewer((v.mode==&quot;editor&quot;)?FileDescription.get([a.component.data.imageFile]):a.captions,0,[a.component.data.imageFile],a._protected());
sigCtl.emit(&quot;UI_Image.fullscreen&quot;,a.component.data.imageFile)
}this.blur();
return false
})
}}if(this.component.data.imageFile.removable){this.getDescriptions()
}},onDisplay:function(b){if(!this.component.data.ratio_type){this.component.data.ratio_type=this.component.data.aspectRatio?&quot;ratio&quot;:&quot;free&quot;;
this.component.data.aspectRatio=null
}b.HandleHelpTooltip();
this.link=b.find(&quot;a&quot;);
this.img1=b.find(&quot;span:first&quot;);
this.img2=b.find(&quot;span:last&quot;).hide();
this.captions=$.Deferred();
var a=this;
if(this.component.data.mouseoverMenu&amp;&amp;this.component.data.mouseoverMenu!=&quot;&quot;){sigCtl.getVariable(&quot;UI_Menu.loaded&quot;,function(){UI_Menu.setAsDropDownMenu(a.component.data.mouseoverMenu)
})
}this.updateImage();
this.updateLink();
if(v.mode!=&quot;editor&quot;&amp;&amp;this.component.data.mouseoverImage){this.preload=$(document).setImage(this.component.data.mouseoverImage,this.component.W(),this.component.H(),{protect:this._protected(),keep_ratio:false})
}this.aspectRatio_v=this.component.data.imageFile.height/this.component.data.imageFile.width;
if(this.component.data.ratio_type==&quot;ratio&quot;){this.component.setAspectRatio(this.aspectRatio_v)
}this._setFullWidth();
this._setParallax();
this._setFilter()
},_loadProperties:function(){var a=$(this.component.propertyNode).add(this.component.propertyDesignNode);
if(this.component.data.filter==&quot;color&quot;){$(&quot;.gradientProperty&quot;,a).css(&quot;display&quot;,&quot;table&quot;);
$(&quot;.selectGradientO.k-widget&quot;,a).show();
$(&quot;.roundSliderPropertyDiv&quot;,a).css(&quot;display&quot;,&quot;table&quot;);
if(this.component.data.select_Gradient==&quot;diagonal&quot;){$(&quot;.roundSliderPropertyDiv&quot;,a).show()
}else{$(&quot;.roundSliderPropertyDiv&quot;,a).hide()
}}else{$(&quot;.gradientProperty&quot;,a).css(&quot;display&quot;,&quot;none&quot;);
$(&quot;.selectGradientO.k-widget&quot;,a).hide();
$(&quot;.roundSliderPropertyDiv&quot;,a).css(&quot;display&quot;,&quot;none&quot;)
}if(this.component.data.activate_mask){$(&quot;.uii_chose_mask&quot;,a).show();
$(&quot;input[value=color]&quot;,a).parent().hide();
$(&quot;.uii_parallax_control&quot;,a).hide()
}else{$(&quot;.uii_chose_mask&quot;,a).hide();
$(&quot;input[value=color]&quot;,a).parent().show();
$(&quot;.uii_parallax_control&quot;,a).show()
}},onSelect:function(){this._loadProperties()
},onPropertyChanged:function(a){this._loadProperties();
if(a.include(&quot;imageFile&quot;)){this.updateImage();
if(this.component.data.ratio_type!=&quot;fullwidth&quot;){var f=this.component;
var b=this.component.data.imageFile.width;
var c=this.component.data.imageFile.height;
this.aspectRatio_v=c/b;
if(f.data.ratio_type==&quot;ratio&quot;){f.setAspectRatio(this.aspectRatio_v)
}for(var g in v.device_modes){if(g==v.device_modes[g]){var e=f.prop(g).w;
if(b&gt;e){b=e;
c=b*this.aspectRatio_v
}f.setXYZWH({w:b,h:c},{device:g})
}}}}if(a.include(&quot;mouseoverImage&quot;)||a.include(&quot;activate_mask&quot;)||a.include(&quot;mask&quot;)){this.updateImage()
}if(a.include(&quot;ratio_type&quot;)){if(this.component.data.ratio_type==&quot;ratio&quot;){this.component.setAspectRatio(this.aspectRatio_v)
}else{this.component.setAspectRatio(null)
}}if(a.include(&quot;link&quot;)){this.component.data.tb_imgs=null;
this.updateLink()
}if(a.include(&quot;bigger&quot;)){if(this.component.data.bigger){this.component.data.link=null;
this.component.data.tb_imgs=null
}this.updateLink()
}if(a.include(&quot;tb_imgs&quot;)){if(this.component.data.tb_imgs.length&gt;0){this.component.data.link=null;
this.component.data.bigger=true
}this.updateLink()
}if(a.include(&quot;realsize&quot;)){this.component.setXYZWH({w:this.component.data.imageFile.width,h:this.component.data.imageFile.height})
}if(window.UI_Menu&amp;&amp;a.include(&quot;mouseoverMenu&quot;)&amp;&amp;this.component.data.mouseoverMenu&amp;&amp;this.component.data.mouseoverMenu!=&quot;&quot;){UI_Menu.setAsDropDownMenu(this.component.data.mouseoverMenu);
this.updateImage()
}if(a.include(&quot;ratio_type&quot;)){this._setFullWidth();
this.updateImage()
}if(a.include(&quot;parallax&quot;)){this._setParallax()
}if(a.include(&quot;filter&quot;)){this._setFilter()
}else{if(a.includeOne([&quot;gradientColor&quot;,&quot;select_Gradient&quot;,&quot;gradientAngle&quot;])){this._setColorFilter()
}}},onResize:function(){this.img1.find(&quot;img&quot;).width(this.component.W()).height(this.component.H())
},onResizeStop:function(){this.onResize();
this.updateImage();
this._setFullWidth();
this._setParallax();
this._setFilter()
},onMoveStop:function(){this._setFullWidth();
this._setParallax();
this._setFilter()
},_setImageDefault:function(a,b){var c=bestImgSrc(a,this.component.data.ratio_type==&quot;fullwidth&quot;?screen.width:b.W(),b.H());
return $(&quot;&lt;div&gt;&quot;).addClass(&quot;uii_img &quot;+b.data.ratio_type).cdnSrc(c,b.W(),b.H())
},_protected:function(){return(this.component.data.protect||v.page_bg.security.content_protection)&amp;&amp;v.mode!=&quot;editor&quot;&amp;&amp;this.protect_available
},_antiDownload:function(c){c=c.parents(&quot;.componentBody:first&quot;);
c.on(&quot;contextmenu&quot;,function(d){if(d.target.nodeName==&quot;DIV&quot;){return false
}});
if(this.component.data.link||this.component.data.bigger){return
}var a=&quot;/images/spacer.gif&quot;;
var b=new Image();
b.src=a;
c.on(&quot;mouseenter touchstart&quot;,function(g){var d=$(this);
if($(&quot;protectOverlay&quot;,d).length&gt;0){return
}var f=$(&apos;&lt;img class=&quot;protectOverlay&quot; src=&quot;&apos;+a+&apos;&quot; width=&quot;&apos;+d.width()+&apos;&quot; height=&quot;&apos;+d.height()+&apos;&quot; /&gt;&apos;).css({position:&quot;absolute&quot;,zIndex:9999999}).prependTo(c).on(&quot;mouseleave&quot;,function(){setTimeout(function(){f.remove()
},0)
});
$(document).one(&quot;touchend&quot;,function(){setTimeout(function(){f.remove()
},0)
})
})
},_setFullWidth:function(){this.component.setFullWidth(this.component.data.ratio_type==&quot;fullwidth&quot;)
},_setParallax:function(){var h=v.mode==&quot;editor&quot;?$(&quot;#site&quot;):$(window);
var c=this.component.componentBody.find(&quot;.uii_img:first&quot;);
if(this.component.data.parallax){var b=this;
var a=b.component.node.position().top-h.height();
var e=b.component.node.position().top+b.component.node.height();
var d=window.navigator.userAgent.match(/MSIE|Trident|Edge/);
if(d&amp;&amp;v.mode==&quot;viewer&quot;){jQuery.fn.overrideWindowScroll(true)
}if(this.component.data.ratio_type==&quot;free&quot;||this.component.data.ratio_type==&quot;ratio&quot;){c.css(&quot;background-size&quot;,&quot;150% 150%&quot;)
}var g=function(){var j=e-a;
if(h.scrollTop()&gt;a&amp;&amp;h.scrollTop()&lt;e){var i=(((h.scrollTop()-a)*100)/j);
var k=&quot;50% &quot;+(100-i)+&quot;%&quot;;
c.css({backgroundPosition:k})
}};
g();
h.off(&quot;scroll.parallaxImg&quot;+this.uniqId()).on(&quot;scroll.parallaxImg&quot;+this.uniqId(),g);
h.off(&quot;resize.parallaxImg&quot;+this.uniqId()).on(&quot;resize.parallaxImg&quot;+this.uniqId(),function(){clearTimeout(b._to_window_resize);
b._to_window_resize=setTimeout(function(){b._setParallax()
},150)
})
}else{h.off(&quot;scroll.parallaxImg&quot;+this.uniqId());
h.off(&quot;resize.parallaxImg&quot;+this.uniqId());
if(this.component.data.ratio_type==&quot;free&quot;){c.css(&quot;background-size&quot;,&quot;100% 100%&quot;)
}if(this.component.data.ratio_type==&quot;ratio&quot;){c.css(&quot;background-size&quot;,&quot;contain&quot;)
}var f=&quot;50% 50%&quot;;
c.css({backgroundPosition:f})
}},_setFilter:function(){var a=this.component.node.find(&quot;.uii_img&quot;);
if(this.component.data.activate_mask){a=this.component.node.find(&quot;.content_svg &gt; text&quot;)
}else{if(a.length==0){a=this.component.node.find(&quot;img&quot;)
}}a.css(&quot;transform&quot;,&quot;translate3d(0,0,0)&quot;);
this.component.data.gradientAngle=this.component.data.gradientAngle||45;
jQuery.fn.setImgFilter(a,&quot;image&quot;,this.component.data.filter,&quot;filterColorImg&quot;+this.uniqId(),{color:this.component.data.gradientColor,or:this.component.data.select_Gradient,angle:this.component.data.gradientAngle})
},_setColorFilter:function(){if(this.component.data.filter==&quot;color&quot;){$(&quot;#filterColorImg&quot;+this.uniqId()).setBackgroundGradient(this.component.data.gradientColor,this.component.data.select_Gradient,this.component.data.gradientAngle)
}},uniqId:function(){this._uid_=this._uid_||this.component.uniqId();
return this._uid_
}};</script><style>.uii_img{position:relative;height:100%;position:absolute;width:100%;background-position:center center;background-repeat:no-repeat}
.uii_img.cover,.uii_img.fullwidth{background-size:cover}
.uii_img.ratio{background-size:contain}
.uii_img.free{background-size:100% 100%}
.svg_defs{height:0;position:absolute;width:0}
.uii_mask_node{user-select:none;-moz-user-select:none;-webkit-user-select:none}</style></uidget>