!function(o,e,t,_){o.imageMapProShapeDefaults={id:"spot-0",title:"",type:"spot",x:-1,y:-1,width:44,height:44,x_image_background:-1,y_image_background:-1,width_image_background:44,height_image_background:44,connected_to:"",use_connected_shape_tooltip:0,layerID:0,static:0,text:{text:"Text",font_family:"sans-serif",font_size:16,font_weight:400,text_color:"#000000",text_opacity:1},actions:{click:"no-action",link:"#",open_link_in_new_window:1,script:""},default_style:{opacity:1,border_radius:50,background_type:"color",background_image_url:"",background_image_opacity:1,background_image_scale:1,background_image_offset_x:0,background_image_offset_y:0,background_color:"#000000",background_opacity:.4,border_width:0,border_style:"solid",border_color:"#ffffff",border_opacity:1,stroke_color:"#ffffff",stroke_opacity:.75,stroke_width:0,stroke_dasharray:"0",stroke_linecap:"round",use_icon:1,icon_type:"library",icon_svg_path:"M409.81,160.113C409.79,71.684,338.136,0,249.725,0C161.276,0,89.583,71.684,89.583,160.113 c0,76.325,119.274,280.238,151.955,334.638c1.72,2.882,4.826,4.641,8.178,4.641c3.351,0,6.468-1.759,8.168-4.631 C290.545,440.361,409.81,236.438,409.81,160.113z M249.716,283.999c-68.303,0-123.915-55.573-123.915-123.895 c0-68.313,55.592-123.895,123.915-123.895s123.876,55.582,123.876,123.895S318.029,283.999,249.716,283.999z",icon_svg_viewbox:"0 0 499.392 499.392",icon_fontawesome_id:"map-marker",icon_fill:"#000000",icon_url:"",icon_is_pin:1,icon_shadow:0},mouseover_style:{opacity:1,border_radius:50,background_image_url:"",background_image_opacity:1,background_image_scale:1,background_image_offset_x:0,background_image_offset_y:0,background_color:"#ffffff",background_opacity:.4,border_width:0,border_style:"solid",border_color:"#ffffff",border_opacity:1,stroke_color:"#ffffff",stroke_opacity:.75,stroke_width:0,stroke_dasharray:"0",stroke_linecap:"round",icon_fill:"#000000"},tooltip:{enable_tooltip:1},tooltip_style:{buffer:40,border_radius:10,padding:15,background_color:"#222222",background_opacity:1,position:"top",width:225,auto_width:1,offset_x:0,offset_y:0},tooltip_content:{squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Heading",iconClass:"fa fa-header"},options:{heading:{text:"My Shape"}}}]}}]}},points:[],vs:[],svgPathCommands:[],d:"",dEditor:""},o.imageMapProEditorDefaults={id:0,editor:{previewMode:0,selected_shape:-1,transform_tooltip_mode:0,tool:"spot",zoom:1,currentLayer:0,state:{dragging:!1},shapeCounter:{spots:0,rects:0,ovals:0,polys:0,texts:0,paths:0}},runtime:{is_fullscreen:0,layerID:0,menu_search_string:"",menu_scroll:0},general:{name:"",shortcode:"",width:800,height:450,naturalWidth:800,naturalHeight:450,responsive:1,preserve_quality:1,center_image_map:0},image:{url:""},fullscreen:{enable_fullscreen_mode:0,start_in_fullscreen_mode:0,fullscreen_background:"#000000",fullscreen_button_position:1,fullscreen_button_type:"icon_and_text",fullscreen_button_color:"#ffffff",fullscreen_button_text_color:"#222222"},shapes:{pageload_animation:"none",glowing_shapes:0,glowing_shapes_color:"#ffffff",glow_opacity:.5,stop_glowing_on_mouseover:1},tooltips:{enable_tooltips:1,show_tooltips:"mouseover",show_title_on_mouseover:0,sticky_tooltips:0,constrain_tooltips:1,tooltip_animation:"none",fullscreen_tooltips:"mobile-only"},zooming:{enable_zooming:0,max_zoom:16,limit_max_zoom_to_image_size:0,enable_zoom_buttons:1,enable_navigator:1,zoom_button_text_color:"#000000",zoom_button_background_color:"#ffffff",hold_ctrl_to_zoom:1},layers:{enable_layers:0,layers_list:[]},shapes_menu:{enable_shapes_menu:0,detached_menu:0,menu_position:"left",enable_search:1,group_by_floor:0,hide_children_of_connected_shapes:1},custom_code:{custom_css:"",custom_js:""},spots:[]}}(jQuery,window,document); !function(t,e,s,i){var o=new Array;function n(t){this.settings=t,this.containers=[],this.init()}function r(t){this.settings=t,this.elements=[],this.init()}t.squaresRendererRegisterElement=function(t){o[t.name]=t},t.squaresRendererRenderObject=function(t){if("object"!=typeof t)try{t=JSON.parse(t)}catch(e){return console.log(e),console.log("Squares renderer failed to parse JSON: "),console.log(t),""}return new n(t).render()},n.prototype.init=function(){for(var t=0;t',t+=o[this.settings.name].render(this.options),t+=""}},l.prototype.generateLayoutClass=function(){if(this.settings){var t=this.options.layout;if(1==parseInt(t.use_grid,10)){var e="",s=t.column_span;return 1==parseInt(s.xs.use,10)&&(e+=s.xs.class+" ",0==parseInt(s.xs.visible,10)&&(e+="sq-hidden-sm ")),1==parseInt(s.sm.use,10)&&(e+=s.sm.class+" ",0==parseInt(s.sm.visible,10)&&(e+="sq-hidden-md ")),1==parseInt(s.md.use,10)&&(e+=s.md.class+" ",0==parseInt(s.md.visible,10)&&(e+="sq-hidden-lg ")),1==parseInt(s.lg.use,10)&&(e+=s.lg.class+" ",0==parseInt(s.lg.visible,10)&&(e+="sq-hidden-xl ")),e}return""}},l.prototype.generateCSS=function(){if(this.settings){var t="";t+="margin-top: "+(s=this.options.layout).box_model.margin.top+"px; ",t+="margin-bottom: "+s.box_model.margin.bottom+"px; ",t+="margin-left: "+s.box_model.margin.left+"px; ",t+="margin-right: "+s.box_model.margin.right+"px; ",t+="padding-top: "+s.box_model.padding.top+"px; ",t+="padding-bottom: "+s.box_model.padding.bottom+"px; ",t+="padding-left: "+s.box_model.padding.left+"px; ",t+="padding-right: "+s.box_model.padding.right+"px; ",1==parseInt(s.use_grid,10)||(1==parseInt(s.auto_width,10)?t+="width: auto; ":""===s.width||isNaN(s.width)||(t+="width: "+s.width+"px; "),1==parseInt(s.auto_height,10)?t+="height: auto; ":""===s.height||isNaN(s.height)||(t+="height: "+s.height+"px; "));var e,s=this.options.font;if(this.options.fontStyles="",s&&(t+="font-family: "+s.font_family+"; ",this.options.fontStyles+="font-family: "+s.font_family+"; ",t+="font-size: "+s.font_size+"px; ",this.options.fontStyles+="font-size: "+s.font_size+"px; ",t+="font-weight: "+s.font_weight+"; ",this.options.fontStyles+="font-weight: "+s.font_weight+"; ",t+="font-style: "+s.font_style+"; ",this.options.fontStyles+="font-style: "+s.font_style+"; ",t+="line-height: "+s.line_height+"px; ",this.options.fontStyles+="line-height: "+s.line_height+"px; ",t+="color: "+s.text_color+"; ",this.options.fontStyles+="color: "+s.text_color+"; ",t+="text-align: "+s.text_align+"; ",this.options.fontStyles+="text-align: "+s.text_align+"; ",t+="text-decoration: "+s.text_decoration+"; ",this.options.fontStyles+="text-decoration: "+s.text_decoration+"; ",t+="text-transform: "+s.text_transform+"; ",this.options.fontStyles+="text-transform: "+s.text_transform+"; ",t+="text-shadow: "+s.text_shadow+"; ",this.options.fontStyles+="text-shadow: "+s.text_shadow+"; "),s=this.options.style)t+="background-color: rgba("+(e=d(s.background_color)).r+", "+e.g+", "+e.b+", "+s.background_opacity+"); ",t+="opacity: "+s.opacity+"; ",t+="box-shadow: "+s.box_shadow+"; ",t+="border-width: "+s.border_width+"px; ",t+="border-style: "+s.border_style+"; ",t+="border-color: rgba("+(e=d(s.border_color)).r+", "+e.g+", "+e.b+", "+s.border_opacity+"); ",t+="border-radius: "+s.border_radius+"px; ";return t}}}(jQuery,window,document); !function(e,t,a,l){var s={name:"Paragraph",iconClass:"fa fa-paragraph",controls:{text:{text:{name:"Text",type:"textarea",default:"Lorem ipsum dolor sit amet, consectetuer adipiscing elit."}}},controlGroupIcons:{text:"fa fa-ellipsis-h"},content:function(){var e=this.controls.text.text.getVal();return e=(e=e.replace(/\\(.)/gm,"$1")).replace(/\n/gm,"
"),'

'+e+"

"},render:function(e){var t=e.text.text;return t=(t=t.replace(/\\(.)/gm,"$1")).replace(/\n/gm,"
"),'

'+t+"

"}};e.squaresRegisterElement&&e.squaresRegisterElement(s),e.squaresRendererRegisterElement(s);var o={name:"Heading",iconClass:"fa fa-header",controls:{heading:{text:{name:"Text",type:"text",default:"Lorem Ipsum"},heading:{name:"Heading",type:"select",options:["h1","h2","h3"],default:"h3"}}},controlGroupIcons:{heading:"fa fa-header"},content:function(){return"<"+this.controls.heading.heading.getVal()+' id="'+this.controls.general.id.getVal()+'" style="'+this.controls.general.css.getVal()+this.fontStyles+' margin: 0; padding: 0;" class="'+this.controls.general.classes.getVal()+'">'+this.controls.heading.text.getVal()+""},render:function(e){return"<"+e.heading.heading+' id="'+e.general.id+'" style="'+e.general.css+e.fontStyles+' margin: 0; padding: 0;" class="'+e.general.classes+'">'+e.heading.text+""}};e.squaresRegisterElement&&e.squaresRegisterElement(o),e.squaresRendererRegisterElement(o);var n={name:"Image",iconClass:"fa fa-camera",controls:{image:{url:{name:"Image URL",type:"text",default:"https://webcraftplugins.com/uploads/placeholder_image.png"},image_is_a_link:{name:"Image is a Link",type:"switch",default:0},link_to:{name:"Link to",type:"text",default:"#"}}},controlGroupIcons:{image:"fa fa-camera"},useFontControls:!1,content:function(){var e="";1==parseInt(this.controls.image.image_is_a_link.getVal(),10)&&(e+=''),e+='',1==parseInt(this.controls.image.image_is_a_link.getVal(),10)&&(e+="");var t=new Image;function a(){}return t.src=this.controls.image.url.getVal(),t.complete||t.addEventListener("load",a),e},render:function(t){var l="";1==parseInt(t.image.image_is_a_link,10)&&(l+=''),l+='',1==parseInt(t.image.image_is_a_link,10)&&(l+="");var s=new Image;function o(){e(a).trigger("squares_image_loaded")}return s.src=t.image.url,s.complete?o():s.addEventListener("load",o),l}};e.squaresRegisterElement&&e.squaresRegisterElement(n),e.squaresRendererRegisterElement(n);var r={name:"Video",iconClass:"fa fa-video-camera",controls:{video:{mp4_url:{name:"MP4 URL",type:"text",default:"http://webcraftplugins.com/uploads/example_video.mp4"},webm_url:{name:"WEBM URL",type:"text",default:"http://webcraftplugins.com/uploads/example_video.webm"},ogv_url:{name:"OGV URL",type:"text",default:"http://webcraftplugins.com/uploads/example_video.ogv"},video_is_a_link:{name:"Video is a Link",type:"switch",default:0},link_to:{name:"Link to",type:"text",default:"#"},autoplay:{name:"Autoplay",type:"switch",default:0},loop:{name:"Loop",type:"switch",default:0},controls:{name:"Controls",type:"switch",default:0}}},useFontControls:!1,controlGroupIcons:{video:"fa fa-video-camera"},content:function(){var e="";1==parseInt(this.controls.video.video_is_a_link.getVal(),10)&&(e+='');var t="";return 1==parseInt(this.controls.video.autoplay.getVal(),10)&&(t+=" autoplay "),1==parseInt(this.controls.video.loop.getVal(),10)&&(t+=" loop "),1==parseInt(this.controls.video.controls.getVal(),10)&&(t+=" controls "),e+="',1==parseInt(this.controls.video.video_is_a_link.getVal(),10)&&(e+=""),e},render:function(e){var t="";1==parseInt(e.video.video_is_a_link,10)&&(t+='');var a="";return 1==parseInt(e.video.autoplay,10)&&(a+=" autoplay "),1==parseInt(e.video.loop,10)&&(a+=" loop "),1==parseInt(e.video.controls,10)&&(a+=" controls "),t+="',1==parseInt(e.video.video_is_a_link,10)&&(t+=""),t}};e.squaresRegisterElement&&e.squaresRegisterElement(r),e.squaresRendererRegisterElement(r);var i={name:"YouTube",iconClass:"fa fa-youtube",useStyleControls:!1,useFontControls:!1,controls:{youtube:{embed_code:{name:"Embed Code",type:"textarea",default:''},allow_fullscreen:{name:"Allow Fullscreen",type:"switch",default:1},iframe_width:{name:"iframe Width",type:"int",default:320},iframe_auto_width:{name:"iframe Auto Width",type:"switch",default:1},iframe_height:{name:"iframe Height",type:"int",default:320}}},controlGroupIcons:{youtube:"fa fa-youtube"},content:function(){var e=this.controls.youtube.embed_code.getVal(),t="";return t+='
',e=e.replace("allowfullscreen",""),1==parseInt(this.controls.youtube.allow_fullscreen.getVal(),10)&&-1==e.indexOf("allowfullscreen")&&(e=e.replace(">"," allowfullscreen>")),t+=e=(e=1==parseInt(this.controls.youtube.iframe_auto_width.getVal(),10)?e.replace(/width="\d+"/g,'width="100%"'):e.replace(/width="\d+"/g,'width="'+this.controls.youtube.iframe_width.getVal()+'px"')).replace(/height="\d+"/g,'height="'+this.controls.youtube.iframe_height.getVal()+'px"'),t+="
"},render:function(e){var t=e.youtube.embed_code,a="";return a+='
',t=t.replace("allowfullscreen",""),1==parseInt(e.youtube.allow_fullscreen,10)&&-1==t.indexOf("allowfullscreen")&&(t=t.replace(">"," allowfullscreen>")),a+=t=(t=1==parseInt(e.youtube.iframe_auto_width,10)?t.replace(/width="\d+"/g,'width="100%"'):t.replace(/width="\d+"/g,'width="'+e.youtube.iframe_width+'px"')).replace(/height="\d+"/g,'height="'+e.youtube.iframe_height+'px"'),a+="
"}};e.squaresRegisterElement&&e.squaresRegisterElement(i),e.squaresRendererRegisterElement(i);var c={name:"Button",iconClass:"fa fa-link",controls:{button:{text:{name:"Text",type:"text",default:"Button"},link_to:{name:"Link to",type:"text",default:"#"},new_tab:{name:"Open in New Tab",type:"switch",default:0},display:{name:"Display",type:"button group",options:["inline-block","block"],default:"inline-block"},height:{name:"Height",type:"int",default:44},bg_color:{name:"Background Color",type:"color",default:"#2196f3"},text_color:{name:"Text Color",type:"color",default:"#ffffff"},border_radius:{name:"Border Radius",type:"int",default:10},padding:{name:"Padding Left/Right",type:"int",default:20}}},controlGroupIcons:{button:"fa fa-link"},content:function(){var e="";e+="display: "+this.controls.button.display.getVal()+"; ",e+="height: "+this.controls.button.height.getVal()+"px; ",e+="line-height: "+this.controls.button.height.getVal()+"px; ",e+="background-color: "+this.controls.button.bg_color.getVal()+"; ",e+="color: "+this.controls.button.text_color.getVal()+"; ",e+="border-radius: "+this.controls.button.border_radius.getVal()+"px; ",e+="padding-left: "+this.controls.button.padding.getVal()+"px; ",e+="padding-right: "+this.controls.button.padding.getVal()+"px; ";var t="";return 1==parseInt(this.controls.button.new_tab.getVal(),10)&&(t='target="_blank"'),'
'+this.controls.button.text.getVal()+"
"},render:function(e){var t="";t+="display: "+e.button.display+"; ",t+="height: "+e.button.height+"px; ",t+="line-height: "+e.button.height+"px; ",t+="background-color: "+e.button.bg_color+"; ",t+="color: "+e.button.text_color+"; ",t+="border-radius: "+e.button.border_radius+"px; ",t+="padding-left: "+e.button.padding+"px; ",t+="padding-right: "+e.button.padding+"px; ";var a="";return 1==parseInt(e.button.new_tab,10)&&(a='target="_blank"'),'
'+e.button.text+"
"}};e.squaresRegisterElement&&e.squaresRegisterElement(c),e.squaresRendererRegisterElement(c)}(jQuery,window,document); !function($,window,document,undefined){"use strict";var fullscreenMap=undefined,fullscreenMapParent=undefined,touch=!1;$.imageMapProInitialized=function(t){},$.imageMapProEventHighlightedShape=function(t,i){},$.imageMapProEventUnhighlightedShape=function(t,i){},$.imageMapProEventClickedShape=function(t,i){},$.imageMapProEventOpenedTooltip=function(t,i){},$.imageMapProEventClosedTooltip=function(t,i){},$.imageMapProEventSwitchedFloor=function(t,i){},$.imageMapProHighlightShape=function(t,i){var e=findImageMapWithName(t);if(e){var s=findShapeWithTitle(e.settings.general.name,i);if(s){var n=s.shape,a=s.index;if(-1==e.apiHighlightedShapes.indexOf(a)&&e.apiHighlightedShapes.push(a),e.connectedShapes[n.id])for(var o=0;o0&&APIFunctionQueuePopAction()})}$(document).ready(function(){$(document).on("mouseover","[data-imp-highlight-shape-on-mouseover]",function(){var t=$(this).data("imp-highlight-shape-on-mouseover"),i=findImageMapWithName($(this).data("imp-image-map-name"));if(i){var e=findShapeWithTitle(i.settings.general.name,t);if(e){e.shape;var s=e.index;APIFunctionQueueAddAction(function(t){i.highlightShape(s,!0),t()})}}}),$(document).on("mouseout","[data-imp-highlight-shape-on-mouseover]",function(){var t=$(this).data("imp-highlight-shape-on-mouseover"),i=findImageMapWithName($(this).data("imp-image-map-name"));if(i){var e=findShapeWithTitle(i.settings.general.name,t);if(e){e.shape,e.index;APIFunctionQueueAddAction(function(t){i.unhighlightAllShapes(),t()})}}}),$(document).on("click","[data-imp-highlight-shape-on-click]",function(){var t=$(this).data("imp-highlight-shape-on-click"),i=findImageMapWithName($(this).data("imp-image-map-name"));if(i){var e=findShapeWithTitle(i.settings.general.name,t);if(e){var s=e.shape,n=e.index;if(s.layerID!=i.settings.runtime.layerID&&APIFunctionQueueAddAction(function(t){i.switchLayer(s.layerID,function(){t()})}),APIFunctionQueueAddAction(function(t){i.highlightShape(n,!0),t()}),-1==i.apiHighlightedShapes.indexOf(n)&&i.apiHighlightedShapes.push(n),i.connectedShapes[s.id])for(var a=0;a=e&&t<=e+n&&i>=s&&i<=s+a}function isPointInsidePolygon(t,i,e){for(var s=!1,n=0,a=e.length-1;ni!=l>i&&t<(r-o)*(i-h)/(l-h)+o&&(s=!s)}return s}function isPointInsideEllipse(t,i,e,s,n,a){return(t-e)*(t-e)/(n*n)+(i-s)*(i-s)/(a*a)<=1}function fitRectToScreen(t,i,e,s){return t<0&&(t=0),i<0&&(i=0),t>$(document).width()-e&&(t=$(document).width()-e),i>$(document).height()-s&&(i=$(document).height()-s),{x:t,y:i}}function shuffle(t){for(var i,e,s=t.length;0!==s;)e=Math.floor(Math.random()*s),i=t[s-=1],t[s]=t[e],t[e]=i;return t}function isMobile(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function lerp(t,i,e){return t*(1-e)+i*e}function easeOutBounce(t,i,e,s,n){return(i/=n)<1/2.75?s*(7.5625*i*i)+e:i<2/2.75?s*(7.5625*(i-=1.5/2.75)*i+.75)+e:i<2.5/2.75?s*(7.5625*(i-=2.25/2.75)*i+.9375)+e:s*(7.5625*(i-=2.625/2.75)*i+.984375)+e}$.extend(Plugin.prototype,{init:function(t){this.parseSettings(),instances[this.settings.general.name]=this,this.id=100*Math.random();for(var i=0;i=0;var a=this.root.width();if(this.settings.runtime.is_fullscreen&&(a=$(window).width()),(isMobile()||a/3<240)&&(this.responsiveShapesMenu=!0),""!=this.settings.image.url){(h=new Image).src=this.settings.image.url;var o=this;this.loadImage(h,function(){},function(){o.finishInit(t)})}else this.finishInit(t);for(i=0;i',i+='
',isTrue(this.settings.zooming.enable_zooming)&&isTrue(this.settings.zooming.enable_navigator)&&(i+='
',""!=this.settings.image.url&&(i+=' ',i+=' '),i+='
',""!=this.settings.image.url&&(i+=' '),i+="
"),isTrue(this.settings.zooming.enable_zooming)&&isTrue(this.settings.zooming.enable_zoom_buttons)&&(i+='
',i+='
'),isTrue(this.settings.layers.enable_layers)){i+='
',i+='
',i+='
',i+=' ",i+="
"}if(isTrue(this.settings.zooming.enable_zooming)&&isTrue(this.settings.zooming.hold_ctrl_to_zoom)){var n="CTRL";this.mac&&(n="⌘"),i+='
',i+='
',i+='
Hold
'+n+"
to Zoom
",i+="
",i+="
"}i+="
",i+='
',i+='
',i+='
',""!=this.settings.image.url&&(i+=' '),i+="
",i+="
",i+="
",i+="",this.root.html(i),this.wrap=this.root.find(".imp-wrap"),this.zoomWrap=this.root.find(".imp-zoom-wrap"),this.translateWrap=this.root.find(".imp-translate-wrap"),this.ui=this.wrap.find(".imp-ui"),this.scrollMessage=this.wrap.find(".imp-ui-scroll-message-wrap"),this.root.addClass("imp-initialized"),this.root.attr("data-image-map-pro-id",this.settings.id),$('[data-imp-tooltips-container="'+this.settings.id+'"]').remove(),$("body").prepend('
'),this.tooltipsContainer=$('[data-imp-tooltips-container="'+this.settings.id+'"]'),this.events(),this.centerImageMap(),this.drawShapes(),this.addTooltips(),this.initFullscreen(),this.initZoom(),this.drawShapesMenu(),this.adjustSize(),this.initNavigator(),this.initLayers(),this.animateShapesLoop(),$.imageMapProInitialized(this.settings.general.name),t&&t()},parseSettings:function(){this.settings.general.image_url&&(this.settings.image.url=this.settings.general.image_url);for(var t=0;t'),this.zoomWrap.prepend('
'),this.shapeContainer=this.wrap.find(".imp-shape-container"),this.imageBackgroundsContainer=this.wrap.find(".imp-image-backgrounds-container");var e="",s=this.settings.general.width,n=this.settings.general.height;isTrue(this.settings.general.responsive)&&(s=this.settings.general.naturalWidth,n=this.settings.general.naturalHeight);var a='';for(t=0;t',e+=' ',e+=" "}if("custom"==o.default_style.icon_type&&o.default_style.icon_url.length>0&&(e+=''),isTrue(o.default_style.icon_shadow)){var g="";g+="width: "+o.width+"px;",g+="height: "+o.height+"px;",e+='
'}if(isTrue(this.settings.shapes.glowing_shapes)){var d="";d+="width: "+o.width/3+"px;",d+="height: "+o.height/3+"px;",d+="margin-left: "+-o.width/6+"px;",d+="margin-top: "+-o.height/6+"px;",d+="border-radius: "+o.width/3+"px;",d+="background: rgba("+(c=hexToRgb(this.settings.shapes.glowing_shapes_color)||{r:0,b:0,g:0}).r+", "+c.g+", "+c.b+", "+this.settings.shapes.glow_opacity+");",e+='
'}e+=""}else{var u="";if(isTrue(this.settings.shapes.glowing_shapes)){d="";d+="box-shadow: 0 0 20px 15px rgba("+(c=hexToRgb(this.settings.shapes.glowing_shapes_color)||{r:0,b:0,g:0}).r+", "+c.g+", "+c.b+", "+this.settings.shapes.glow_opacity+");",u+='
'}e+='
'}e+='
'}e+='
'}}a+="";var w="";for(t=0;t
'}this.shapeContainer.html(e+a),this.imageBackgroundsContainer.html(w)},drawShapesMenu:function(){if(isTrue(this.settings.shapes_menu.enable_shapes_menu)){this.shapesMenuWrap&&this.shapesMenuWrap.remove(),this.shapesMenuResponsiveButton&&this.shapesMenuResponsiveButton.remove(),$(".imp-ui-layers-menu-wrap").length>0&&$(".imp-ui-layers-menu-wrap").css({right:20});var t="",i="imp-shapes-menu-wrap-left";"right"==this.settings.shapes_menu.menu_position&&(i="imp-shapes-menu-wrap-right");var e="";isTrue(this.settings.shapes_menu.enable_search)&&(e="imp-shapes-menu-wrap-with-search-box"),t+='
';var s="";if(this.responsiveShapesMenu&&(s='
'),isTrue(this.settings.shapes_menu.enable_search)&&(t+='"),t+='
',isTrue(this.settings.shapes_menu.group_by_floor)&&isTrue(this.settings.layers.enable_layers))for(var n=0;n'+a.title+"
";for(var o=0;o'+h.title+"
")}}else for(o=0;o'+h.title+"")}if(t+=" ",t+="",isTrue(this.settings.shapes_menu.detached_menu))$('[data-imp-detached-menu="'+this.settings.id+'"]').html(t),this.shapesMenuWrap=$('[data-imp-detached-menu="'+this.settings.id+'"]').find(".imp-shapes-menu-wrap");else if(this.responsiveShapesMenu){this.responsiveShapesMenuWrap||($("body").append('
'),this.responsiveShapesMenuWrap=$('.imp-responsive-menu[data-imp-id="'+this.settings.id+'"]')),this.responsiveShapesMenuWrap.append(t),this.shapesMenuWrap=this.responsiveShapesMenuWrap.find(".imp-shapes-menu-wrap");var r="";r+='
',r+='',r+="
",this.ui.append(r),this.shapesMenuResponsiveButton=this.ui.find(".imp-shapes-menu-button"),$(".imp-ui-layers-menu-wrap").length>0&&$(".imp-ui-layers-menu-wrap").css({right:70}),$("#imp-fullscreen-wrap").find(".imp-fullscreen-root-wrap").removeClass("imp-shapes-menu-left"),$("#imp-fullscreen-wrap").find(".imp-fullscreen-root-wrap").removeClass("imp-shapes-menu-right")}else isTrue(this.settings.runtime.is_fullscreen)?($("#imp-fullscreen-wrap").find(".imp-shapes-menu-wrap").remove(),$("#imp-fullscreen-wrap").append(t),0==$("#imp-fullscreen-wrap").find(".imp-fullscreen-root-wrap").length&&this.root.wrap('
'),this.shapesMenuWrap=$("#imp-fullscreen-wrap").find(".imp-shapes-menu-wrap"),"left"==this.settings.shapes_menu.menu_position?$("#imp-fullscreen-wrap").find(".imp-fullscreen-root-wrap").addClass("imp-shapes-menu-left"):$("#imp-fullscreen-wrap").find(".imp-fullscreen-root-wrap").addClass("imp-shapes-menu-right")):(0==this.root.find(".imp-shapes-menu-outer-wrap").length&&this.wrap.wrap('
'),"left"==this.settings.shapes_menu.menu_position?this.root.find(".imp-shapes-menu-outer-wrap").prepend(t):this.root.find(".imp-shapes-menu-outer-wrap").append(t),this.shapesMenuWrap=this.root.find(".imp-shapes-menu-wrap"),isTrue(this.settings.shapes_menu.enable_search)?this.shapesMenuWrap.height(this.wrap.height()-73):this.shapesMenuWrap.height(this.wrap.height()));this.shapesMenuWrap.find('input[data-image-map-pro-search-id="'+this.settings.id+'"]').val(this.settings.runtime.menu_search_string),this.updateMenuSearch(),this.shapesMenuWrap.find(".imp-shapes-menu-scroll-wrap").scrollTop(this.settings.runtime.menu_scroll)}},addTooltips:function(){if("always"==this.settings.tooltips.fullscreen_tooltips||"mobile-only"==this.settings.tooltips.fullscreen_tooltips&&isMobile()){this.fullscreenTooltipsContainer||($('.imp-fullscreen-tooltips-container[data-image-map-id="'+this.settings.id+'"]').remove(),$("body").prepend('
'),this.fullscreenTooltipsContainer=$('.imp-fullscreen-tooltips-container[data-image-map-id="'+this.settings.id+'"]'));for(var t="",i=0;i',t+='
',"plain-text"==n.tooltip_content.content_type){e="";t+='
'+n.tooltip_content.plain_text+"
"}else n.tooltip_content.squares_json?t+=$.squaresRendererRenderObject(n.tooltip_content.squares_json):t+=$.squaresRendererRenderObject(n.tooltip_content.squares_settings);t+=""}this.fullscreenTooltipsContainer.html(t)}else{for(t="",i=0;i',"top"==n.tooltip_style.position&&(t+='
'),"bottom"==n.tooltip_style.position&&(t+='
'),"left"==n.tooltip_style.position&&(t+='
'),"right"==n.tooltip_style.position&&(t+='
');e="";e+="color: "+n.tooltip_content.plain_text_color+";";var a={containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"},options:{text:{text:n.title}}}]}}]};t+='
'+$.squaresRendererRenderObject(a)+"
","plain-text"==n.tooltip_content.content_type?t+='
'+n.tooltip_content.plain_text+"
":n.tooltip_content.squares_json?t+=$.squaresRendererRenderObject(n.tooltip_content.squares_json):t+=$.squaresRendererRenderObject(n.tooltip_content.squares_settings),t+=""}this.tooltipsContainer.prepend(t),isTrue(this.settings.tooltips.sticky_tooltips)&&this.tooltipsContainer.addClass("imp-sticky-tooltips")}},initFullscreen:function(){if(isTrue(this.settings.fullscreen.enable_fullscreen_mode)){var t="";t+="background: "+this.settings.fullscreen.fullscreen_button_color+"; ",t+="color: "+this.settings.fullscreen.fullscreen_button_text_color+"; ";var i='';isTrue(this.settings.runtime.is_fullscreen)&&(i='');var e="Go Fullscreen";isTrue(this.settings.runtime.is_fullscreen)&&(e="Close Fullscreen");var s="";"icon"==this.settings.fullscreen.fullscreen_button_type&&(s+=i),"text"==this.settings.fullscreen.fullscreen_button_type&&(s+=e),"icon_and_text"==this.settings.fullscreen.fullscreen_button_type&&(s+=i+" "+e);var n="";"icon"==this.settings.fullscreen.fullscreen_button_type&&(n+="imp-fullscreen-button-icon-only");var a="";a+='
',a+=s,a+="
",this.ui.append(a),isTrue(this.settings.runtime.is_fullscreen)&&($(window).scrollTop(0),fullscreenMap=this);var o=this.ui.find(".imp-fullscreen-button");1!=parseInt(this.settings.fullscreen.fullscreen_button_position,10)&&4!=parseInt(this.settings.fullscreen.fullscreen_button_position,10)||o.css({"margin-left":-o.outerWidth()/2}),isTrue(this.settings.fullscreen.start_in_fullscreen_mode)&&0==this.settings.runtime.is_fullscreen&&(this.settings.fullscreen.start_in_fullscreen_mode=0,this.toggleFullscreen())}},initNavigator:function(){isTrue(this.settings.zooming.enable_zooming)&&isTrue(this.settings.zooming.enable_navigator)&&(this.uiNavigatorRoot=this.ui.find(".imp-ui-navigator-root"),this.uiNavigatorImage=this.ui.find(".imp-ui-navigator-window-image"),this.adjustNavigatorSize())},initLayers:function(){if(isTrue(this.settings.layers.enable_layers)){for(var t=!1,i=0;i1||i.deltaY>0&&t.targetZoom0)for(var i=0;i0&&$(t.target).closest(".imp-ui-navigator-root").data("imp-id")==this.settings.id)return this.ix=i.x,this.iy=i.y,void(this.panningOnNavigator=!0);if(t.originalEvent.touches&&t.originalEvent.touches.length>1)return this.pinchInitial[0]={x:t.originalEvent.touches[0].pageX,y:t.originalEvent.touches[0].pageY},this.pinchInitial[1]={x:t.originalEvent.touches[1].pageX,y:t.originalEvent.touches[1].pageY},this.initialPanX=this.actualPanX,this.initialPanY=this.actualPanY,this.ix=(t.originalEvent.touches[0].pageX+t.originalEvent.touches[1].pageX)/2,this.iy=(t.originalEvent.touches[0].pageY+t.originalEvent.touches[1].pageY)/2,this.lastX=this.ix,this.lastY=this.iy,this.pinchInitialDistance=Math.sqrt(Math.pow(this.pinchInitial[1].x-this.pinchInitial[0].x,2)+Math.pow(this.pinchInitial[1].y-this.pinchInitial[0].y,2)),this.pinchInitialZoom=this.zoom,void(this.pinching=!0);!this.panning&&0==$(t.target).closest(".imp-ui").length&&i.x>this.wrapOffsetLeft&&i.xthis.wrapOffsetTop&&i.y1e3&&(this.lastWrapRecalc=Date.now(),this.wrapWidth=this.wrap.width(),this.wrapHeight=this.wrap.height(),this.wrapOffsetLeft=this.wrap.offset().left,this.wrapOffsetTop=this.wrap.offset().top),!this.fullscreenTooltipVisible&&!this.isEventOnHTMLAPIElement(t)){var i=this.getEventRelativeCoordinates(t),e=this.matchShapeToCoords(i),s=this.getEventCoordinates(t);if(isTrue(this.settings.zooming.enable_zooming)){if(this.panningOnNavigator){var n=(s.x-this.uiNavigatorRoot.offset().left)/this.navigatorRatio*this.targetZoom,a=(s.y-this.uiNavigatorRoot.offset().top)/this.navigatorRatio*this.targetZoom;return void this.panTo(n,a)}if(this.pinching)return this.pinch(t),void(this.didPan=!0);if(this.panning){s=this.getEventCoordinates(t);return this.pan(s.x,s.y),void(this.didPan=!0)}}if((!this.isPointInsideVisibleTooltip(t)||isTrue(this.settings.tooltips.sticky_tooltips))&&!$(t.target).data("imp-highlight-shape-on-mouseover")&&0==$(t.target).closest("[data-imp-highlight-shape-on-mouseover]").length&&!$(t.target).data("imp-trigger-shape-on-mouseover")&&0==$(t.target).closest("[data-imp-trigger-shape-on-mouseover]").length){if(1==$(t.target).closest(".imp-ui").length)return this.unhighlightAllShapes(),void("mouseover"==this.settings.tooltips.show_tooltips&&this.hideAllTooltips());-1!=e&&(s.x>this.wrapOffsetLeft&&s.xthis.wrapOffsetTop&&s.y0&&isTrue(this.settings.tooltips.sticky_tooltips)&&"mouseover"==this.settings.tooltips.show_tooltips&&this.updateTooltipPosition(this.openedTooltips[this.openedTooltips.length-1],t),isTrue(this.settings.tooltips.show_title_on_mouseover)&&"click"==this.settings.tooltips.show_tooltips&&-1==this.openedTooltips.indexOf(e)&&this.updateTooltipPosition(e,t)))),$(t.target).is("video")||$(t.target).closest("video").length>0||(-1==e||(s.xthis.wrapOffsetLeft+this.wrapWidth||s.ythis.wrapOffsetTop+this.wrapHeight)&&!this.settings.runtime.is_fullscreen)&&(this.unhighlightAllShapes(),isTrue(this.settings.tooltips.show_title_on_mouseover)&&"click"==this.settings.tooltips.show_tooltips&&this.hideAllTitles(),"mouseover"==this.settings.tooltips.show_tooltips&&this.openedTooltips.length>0&&this.hideAllTooltips())}}},handleEventEnd:function(t){if(!this.isEventOnHTMLAPIElement(t)){if(isTrue(this.settings.zooming.enable_zooming)){if(this.panning&&(this.panning=!1,this.tooltipsContainer.removeClass("imp-no-transition")),this.pinching&&(this.pinching=!1),"mousewheel"==t.type)return this.hideAllTooltips(),this.unhighlightAllShapes(),t.deltaY>0&&this.zoomIn(t),void(t.deltaY<0&&this.zoomOut(t));if(this.panningOnNavigator&&$(t.target).closest(".imp-ui-navigator-root").length>0&&$(t.target).closest(".imp-ui-navigator-root").data("imp-id")==this.settings.id){this.panningOnNavigator=!1;var i=((o=this.getEventCoordinates(t)).x-this.uiNavigatorRoot.offset().left)/this.navigatorRatio*this.targetZoom,e=(o.y-this.uiNavigatorRoot.offset().top)/this.navigatorRatio*this.targetZoom;return void this.panTo(i,e)}if(this.panningOnNavigator&&(this.panningOnNavigator=!1),$(t.target).closest(".imp-ui-zoom-button").length>0&&$(t.target).closest(".imp-ui-zoom-button").data("imp-id")==this.settings.id)return void($(t.target).closest(".imp-ui-zoom-button-zoom-in").length>0?this.zoomIn():this.zoomOut())}if($(t.target).closest(".imp-fullscreen-button").length>0&&$(t.target).closest(".imp-fullscreen-button").data("imp-id")==this.settings.id&&this.toggleFullscreen(),$(t.target).closest(".imp-shapes-menu-button").length>0&&$(t.target).closest(".imp-shapes-menu-button").data("imp-id")==this.settings.id&&this.showResponsiveShapesMenu(),$(t.target).closest(".imp-close-responsive-menu").length>0&&$(t.target).closest(".imp-close-responsive-menu").data("imp-id")==this.settings.id&&this.hideResponsiveShapesMenu(),$(t.target).closest(".imp-ui-layer-switch-up").length>0&&$(t.target).closest(".imp-ui-layer-switch-up").data("imp-id")==this.settings.id)for(var s=0;s0){var n=this.settings.layers.layers_list[s-1].id;this.switchLayer(n);break}if($(t.target).closest(".imp-ui-layer-switch-down").length>0&&$(t.target).closest(".imp-ui-layer-switch-down").data("imp-id")==this.settings.id)for(s=0;sthis.wrapOffsetLeft&&o.xthis.wrapOffsetTop&&o.y0&&isTrue(this.settings.tooltips.sticky_tooltips)&&"mouseover"==this.settings.tooltips.show_tooltips&&this.updateTooltipPosition(this.openedTooltips[this.openedTooltips.length-1],t),isTrue(this.settings.zooming.enable_zooming)&&this.focusShape(s)),this.performClickAction(s)),(-1==s||(o.xthis.wrapOffsetLeft+this.wrapWidth||o.ythis.wrapOffsetTop+this.wrapHeight)&&!this.settings.runtime.is_fullscreen)&&(this.hideAllTooltips(),this.didPan||this.unhighlightAllShapes()),t.originalEvent.touches&&0==t.originalEvent.touches.length&&(this.didPan=!1),t.originalEvent.touches||(this.didPan=!1)}}},handleKeyDownEvent:function(t){t.ctrlKey&&(this.ctrlKeyDown=!0),t.metaKey&&(this.cmdKeyDown=!0)},handleKeyUpEvent:function(t){this.ctrlKeyDown=!1,this.cmdKeyDown=!1},getEventRelativeCoordinates:function(t){var i,e;if("touchstart"==t.type||"touchmove"==t.type||"touchend"==t.type||"touchcancel"==t.type){var s=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];i=s.pageX,e=s.pageY}else"mousedown"!=t.type&&"mouseup"!=t.type&&"mousemove"!=t.type&&"mouseover"!=t.type&&"mouseout"!=t.type&&"mouseenter"!=t.type&&"mouseleave"!=t.type||(i=t.pageX,e=t.pageY);return i-=this.zoomWrap.offset().left,e-=this.zoomWrap.offset().top,{x:i=i/(this.wrap.width()*this.zoom)*100,y:e=e/(this.wrap.height()*this.zoom)*100}},getEventCoordinates:function(t){var i,e;if("touchstart"==t.type||"touchmove"==t.type||"touchend"==t.type||"touchcancel"==t.type){var s=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];i=s.pageX,e=s.pageY}else"mousedown"!=t.type&&"mouseup"!=t.type&&"mousemove"!=t.type&&"mouseover"!=t.type&&"mouseout"!=t.type&&"mouseenter"!=t.type&&"mouseleave"!=t.type||(i=t.pageX,e=t.pageY);return{x:i,y:e}},matchShapeToCoords:function(t){for(var i=this.settings.spots.length-1;i>=0;i--)if(!isTrue(this.settings.layers.enable_layers)||parseInt(this.settings.spots[i].layerID,10)==this.settings.runtime.layerID){var e=this.settings.spots[i];if(!isTrue(e.static)){if("poly"==e.type||"path"==e.type){var s=t.x/100*this.zoomWrap.width(),n=t.y/100*this.zoomWrap.height();if(isPointInsidePolygon(s=s*this.settings.general.naturalWidth/this.zoomWrap.width(),n=n*this.settings.general.naturalHeight/this.zoomWrap.height(),e.vs))return i}if("spot"==e.type){var a=e.width<44?44:e.width,o=e.height<44?44:e.height;a/=this.zoom,o/=this.zoom;s=t.x/100*this.wrap.width(),n=t.y/100*this.wrap.height();var h=e.x/100*this.wrap.width()-a/2,r=e.y/100*this.wrap.height()-o/2,l=a,p=o;if(isTrue(e.default_style.icon_is_pin)&&isTrue(e.default_style.use_icon)&&(r-=o/2,e.height<44&&(r+=e.height/2)),isPointInsideRect(s,n,h,r,l,p))return i}if("rect"==e.type&&isPointInsideRect(t.x,t.y,e.x,e.y,e.width,e.height))return i;if("oval"==e.type)if(isPointInsideEllipse(s=t.x,n=t.y,e.x+e.width/2,e.y+e.height/2,h=e.width/2,r=e.height/2))return i;e.type}}return-1},isPointInsideVisibleTooltip:function(t){for(var i=0;i0&&s.find("path").attr("style","fill:"+t.icon_fill),"image"===t.background_type&&this.imageBackgroundsContainer.find('[data-id="'+e.id+'"]').css({"background-image":"url("+t.background_image_url+")",opacity:t.background_image_opacity,transform:"scale("+t.background_image_scale+") translate("+t.background_image_offset_x+"px, "+t.background_image_offset_y+"px)"})},highlightShape:function(t,i){var e=this.settings.spots[t];if(i&&""!=e.connected_to){var s=this.getIndexOfShapeWithID(e.connected_to);this.highlightShape(s,!0)}else{if(this.connectedShapes[e.id])for(var n=0;n0){var o=999,h=999,r=0,l=0;s.xr&&(r=s.x),s.y>l&&(l=s.y);for(e=0;er&&(r=i[e].x),i[e].y>l&&(l=i[e].y);n=r-o,a=l-h}else"spot"==s.type?(n/=this.wrapWidth,a/=this.wrapHeight,n<25&&(n=25),a<25&&(a=25)):(n=s.width,a=s.height);var p=0;n>=a&&(p=n),a>n&&(p=a);var g=50/p;g<1&&(g=1),g>this.maxZoomLevel&&(g=this.maxZoomLevel);var d=0,u=0;if("spot"==s.type?(d=s.x,u=s.y):(d=s.x+s.width/2,u=s.y+s.height/2),i.length>0){for(e=0;e'),$("#imp-temp-link").attr("href",s.actions.link),isTrue(s.actions.open_link_in_new_window)?$("#imp-temp-link").attr("target","_blank"):$("#imp-temp-link").removeAttr("target"),$("#imp-temp-link")[0].click()),"run-script"==s.actions.click&&eval(s.actions.script.replace("
","")),$.imageMapProEventClickedShape(this.settings.general.name,this.settings.spots[i].title)},showTooltip:function(t,i){if(-1==this.openedTooltips.indexOf(t)){if(isTrue(this.settings.tooltips.show_title_on_mouseover)&&"click"==this.settings.tooltips.show_tooltips)(a=this.tooltipsContainer.find('.imp-tooltip[data-index="'+t+'"]')).find(".imp-tooltip-title").hide(),a.find(".imp-tooltip-plain-text").show(),a.find(".squares-container").show(),a.css({left:0,top:0});var e=this.settings.spots[t];if(""!=e.connected_to&&isTrue(e.use_connected_shape_tooltip)){var s=this.getIndexOfShapeWithID(e.connected_to);this.showTooltip(s)}else{if(this.openedTooltips.length>0&&this.hideAllTooltips(),-1==this.openedTooltips.indexOf(t)&&this.openedTooltips.push(t),"mobile-only"==this.settings.tooltips.fullscreen_tooltips&&isMobile()||"always"==this.settings.tooltips.fullscreen_tooltips){this.visibleFullscreenTooltip=$('.imp-fullscreen-tooltip[data-index="'+t+'"]'),this.visibleFullscreenTooltipIndex=t,this.fullscreenTooltipsContainer.show(),this.visibleFullscreenTooltip.show();var n=this;setTimeout(function(){n.visibleFullscreenTooltip.addClass("imp-tooltip-visible")},20),this.fullscreenTooltipVisible=!0,this.bodyOverflow=$("body").css("overflow"),$("body").css({overflow:"hidden"})}else{var a;(a=this.tooltipsContainer.find('.imp-tooltip[data-index="'+t+'"]')).show(),setTimeout(function(){a.addClass("imp-tooltip-visible")},1),this.measureTooltipSize(t),this.updateTooltipPosition(t,i)}$.imageMapProEventOpenedTooltip(this.settings.general.name,this.settings.spots[t].title)}}},hideTooltip:function(t){if(-1==this.apiOpenedTooltips.indexOf(t)){var i=this.openedTooltips.indexOf(t);if(this.openedTooltips.splice(i,1),"mobile-only"==this.settings.tooltips.fullscreen_tooltips&&isMobile()||"always"==this.settings.tooltips.fullscreen_tooltips){(e=this.fullscreenTooltipsContainer.find('.imp-fullscreen-tooltip[data-index="'+t+'"]')).removeClass("imp-tooltip-visible"),this.fullscreenTooltipsContainer.hide(),e.hide(),this.fullscreenTooltipVisible=!1,$("body").css({overflow:this.bodyOverflow})}else{var e=this.tooltipsContainer.find('.imp-tooltip[data-index="'+t+'"]');setTimeout(function(){e.removeClass("imp-tooltip-visible"),e.hasClass("imp-tooltip-visible")||e.hide()},1),e.find("video").trigger("pause"),e.find("iframe").each(function(){$(this).attr("src",$(this).attr("src"))})}$.imageMapProEventClosedTooltip(this.settings.general.name,this.settings.spots[t].title)}},hideAllTooltips:function(){for(var t=this.openedTooltips.slice(0),i=0;ic&&(h+=c-(a+this.wrapOffsetLeft+h)),o+this.wrapOffsetTop<0&&(r=r+o+this.wrapOffsetTop,o=-this.wrapOffsetTop),o+this.wrapOffsetTop+r>m&&(r+=m-(o+this.wrapOffsetTop+r))):(a<0&&(h+=a,a=0),a+h>this.wrapWidth&&(h=this.wrapWidth-a),o<0&&(r+=o,o=0),o+r>this.wrapHeight&&(r=this.wrapHeight-o)),"left"==g.tooltip_style.position&&(d=a-s-20,u=o+r/2-n/2),"right"==g.tooltip_style.position&&(d=a+h+20,u=o+r/2-n/2),"top"==g.tooltip_style.position&&(d=a+h/2-s/2,u=o-n-20),"bottom"==g.tooltip_style.position&&(d=a+h/2-s/2,u=o+r+20);var v={x:d,y:u};isTrue(this.settings.tooltips.constrain_tooltips)&&((v=fitRectToScreen(d+this.wrapOffsetLeft,u+this.wrapOffsetTop,s,n)).x-=this.wrapOffsetLeft,v.y-=this.wrapOffsetTop),v.x+=g.tooltip_style.offset_x/100*this.wrapWidth,v.y+=g.tooltip_style.offset_y/100*this.wrapHeight,e.css({left:v.x+this.wrapOffsetLeft-this.tooltipsContainer.offset().left,top:v.y+this.wrapOffsetTop-this.tooltipsContainer.offset().top})}},updateOpenedTooltipsPosition:function(){for(var t=0;t
'),$("#image-map-pro-"+t.id).imageMapPro(t),this.disableEvents(),fullscreenMapParent=this}},resetZoomAndPan:function(){this.zoom=1,this.targetZoom=1,this.targetPanX=0,this.targetPanY=0,this.actualPanX=0,this.actualPanY=0,this.redraw(!1)},zoomIn:function(t){if(this.targetZoom1){var i=this.zoom/this.zoomMultiplier,e=0,s=0,n=this.wrap.width(),a=this.wrap.height();t?(e=t.pageX,s=t.pageY):(e=this.wrap.offset().left+n/2,s=this.wrap.offset().top+a/2),this.applyZoom(i,e,s)}},applyZoom:function(t,i,e){this.targetZoom=this.zoom,this.targetPanX=this.actualPanX,this.targetPanY=this.actualPanY,t>this.maxZoomLevel&&(t=this.maxZoomLevel),t<1&&(t=1),this.targetZoom=t;var s=(this.wrapWidth*this.targetZoom-this.wrapWidth*this.zoom)/2,n=(this.wrapHeight*this.targetZoom-this.wrapHeight*this.zoom)/2;if(i&&e){var a=i-this.zoomWrap.offset().left,o=e-this.zoomWrap.offset().top,h=s*((this.wrapWidth*this.zoom/2-a)/(this.wrapWidth*this.zoom/2)),r=n*((this.wrapHeight*this.zoom/2-o)/(this.wrapHeight*this.zoom/2));this.targetPanX-=s,this.targetPanY-=n,this.targetPanX+=h,this.targetPanY+=r}this.targetPanX>0&&(this.targetPanX=0),this.targetPanY>0&&(this.targetPanY=0),this.targetPanX0&&(this.targetPanX=0),this.targetPanY>0&&(this.targetPanY=0),this.targetPanX0&&(this.targetPanX=0),this.targetPanY>0&&(this.targetPanY=0),this.targetPanXh?(this.actualPanX>-a&&(this.actualPanX=-a),this.actualPanXr?(this.actualPanY>-o&&(this.actualPanY=-o),this.actualPanY0&&(this.actualPanX=0),this.actualPanY>0&&(this.actualPanY=0),this.actualPanX0?(this.shapesMenuWrap.addClass("imp-searching"),$(".imp-shapes-menu-shape-title").each(function(){var i=new RegExp("("+t+")","gi"),e=$(this).data("imp-content"),s=$(this).data("imp-content").replace(i,'$&');e!=s?($(this).show(),$(this).html(s)):($(this).hide(),$(this).html(e))})):(this.shapesMenuWrap.removeClass("imp-searching"),$(".imp-shapes-menu-shape-title, .imp-shapes-menu-layer-title").each(function(){$(this).show(),$(this).html($(this).data("imp-content"))})),this.settings.runtime.menu_search_string=t},displayScrollMessage:function(){this.scrollMessage.fadeIn(),clearTimeout(this.hideScrollMessageTimeout);var t=this;this.hideScrollMessageTimeout=setTimeout(function(){t.scrollMessage.fadeOut()},1e3)},showResponsiveShapesMenu:function(){this.responsiveShapesMenuWrap&&(this.responsiveShapesMenuWrap.addClass("imp-responsive-menu-visible"),$("body").addClass("imp-noscroll"))},hideResponsiveShapesMenu:function(){this.responsiveShapesMenuWrap&&(this.responsiveShapesMenuWrap.removeClass("imp-responsive-menu-visible"),$("body").removeClass("imp-noscroll"))}}),$.fn[pluginName]=function(t){return this.each(function(){$.data(this,"plugin_"+pluginName,new Plugin(this,t))})}}(jQuery,window,document),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(t){function i(i){var o=i||window.event,h=r.call(arguments,1),l=0,g=0,d=0,u=0,c=0,m=0;if((i=t.event.fix(o)).type="mousewheel","detail"in o&&(d=-1*o.detail),"wheelDelta"in o&&(d=o.wheelDelta),"wheelDeltaY"in o&&(d=o.wheelDeltaY),"wheelDeltaX"in o&&(g=-1*o.wheelDeltaX),"axis"in o&&o.axis===o.HORIZONTAL_AXIS&&(g=-1*d,d=0),l=0===d?g:d,"deltaY"in o&&(l=d=-1*o.deltaY),"deltaX"in o&&(g=o.deltaX,0===d&&(l=-1*g)),0!==d||0!==g){if(1===o.deltaMode){var f=t.data(this,"mousewheel-line-height");l*=f,d*=f,g*=f}else if(2===o.deltaMode){var v=t.data(this,"mousewheel-page-height");l*=v,d*=v,g*=v}if(u=Math.max(Math.abs(d),Math.abs(g)),(!a||a>u)&&(a=u,s(o,u)&&(a/=40)),s(o,u)&&(l/=40,g/=40,d/=40),l=Math[l>=1?"floor":"ceil"](l/a),g=Math[g>=1?"floor":"ceil"](g/a),d=Math[d>=1?"floor":"ceil"](d/a),p.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();c=i.clientX-y.left,m=i.clientY-y.top}return i.deltaX=g,i.deltaY=d,i.deltaFactor=a,i.offsetX=c,i.offsetY=m,i.deltaMode=0,h.unshift(i,l,g,d),n&&clearTimeout(n),n=setTimeout(e,200),(t.event.dispatch||t.event.handle).apply(this,h)}}function e(){a=null}function s(t,i){return p.settings.adjustOldDeltas&&"mousewheel"===t.type&&i%120==0}var n,a,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice;if(t.event.fixHooks)for(var l=o.length;l;)t.event.fixHooks[o[--l]]=t.event.mouseHooks;var p=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=h.length;e;)this.addEventListener(h[--e],i,!1);else this.onmousewheel=i;t.data(this,"mousewheel-line-height",p.getLineHeight(this)),t.data(this,"mousewheel-page-height",p.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=h.length;e;)this.removeEventListener(h[--e],i,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(i){var e=t(i),s=e["offsetParent"in t.fn?"offsetParent":"parent"]();return s.length||(s=t("body")),parseInt(s.css("fontSize"),10)||parseInt(e.css("fontSize"),10)||16},getPageHeight:function(i){return t(i).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})});