/* * Copyright (c) 2023, WebRotate 360 LLC. All rights reserved. */ var WR360=window.WR360={},_imageRotator=(Function.prototype.aK=function(eB){return eB.constructor==Function?(this.prototype=new eB,(this.prototype.constructor=this).prototype.ct=eB.prototype,this.prototype.iQ=0,this.prototype.aB=function(){for(var ct=this.ct,i=this.iQ;0")).replace(/\n\r/g,"
")).replace(/\r/g,"
")).replace(/\n/g,"
")},WR360.by=function(){},WR360.by.fI=function($elements,onclick,proxy){proxy=void 0===proxy?"":".proxy"+proxy;var gq="touchstart";window.navigator.pointerEnabled?gq="pointerdown":window.navigator.msPointerEnabled&&(gq="MSPointerDown"),$elements.each(function(){var gv=0;jQuery(this).bind(gq+proxy,function(e){return onclick.call(this,e),e.stopPropagation(),e.preventDefault(),gv=Date.now(),!1}),jQuery(this).bind("click"+proxy,function(e){Date.now()-gv<400||(gv=0,onclick.call(this,e))})})},WR360.by.oe=function($elements,proxy){proxy=void 0===proxy?"":".proxy"+proxy,$elements.each(function(){jQuery(this).unbind("touchstart"+proxy),jQuery(this).unbind("click"+proxy)})},WR360.by.mZ=function(){try{return window.self!==window.top}catch(e){return!0}},WR360.by.lf=function(){return!!(/iPad|iPhone|iPod/.test(navigator.platform)||/Android/.test(navigator.userAgent)||/Mac/.test(navigator.userAgent)&&navigator.maxTouchPoints&&1=y&&eJ.y<=cu)},WR360.by.pA=function(){var ajaxLocation="";try{ajaxLocation=location.href}catch(e){(ajaxLocation=document.createElement("a")).href="",ajaxLocation=ajaxLocation.href}ajaxLocation=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/.exec(ajaxLocation.toLowerCase())||[];return/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(ajaxLocation[1])},WR360.J=function(){this.dr=new Array},WR360.J.prototype.iS=function(item){for(var result=-1,i=0;iV.aw.length-1)&&(qI=0),rootPath=V.aw[qI].src,av&&V.settings.control.qc&&this.bh.bV.lc&&(rootPath=(null!=V.aw[qI].cS?V.aw[qI].cS:V.aw[qI]).src)}else if(1==this.bh.dV&&0<=this.bh.reloadImageIndex){av=this.bh.reloadImageIndex;0V.aw.length-1&&(av=0),rootPath=V.aw[av].src}else if(0==V.settings.eH.image.length||V.settings.eH.image.toLowerCase()==WR360.cL.la)return void this.dispatchEvent(new WR360.cO(WR360.cO.COMPLETE,!0,!1,null,!0,""));this.image=new Image,(this.image.be=this).image.onload=this.os,this.image.onerror=this.mj,this.image.src=this.rootPath+rootPath},WR360.cL.prototype.os=function(){this.be.dispatchEvent(new WR360.cO(WR360.cO.COMPLETE,!0,!1,this.be.image,!0,""))},WR360.cL.prototype.mj=function(){this.be.dispatchEvent(new WR360.cO(WR360.cO.ERROR,!0,!1,null,!1,"Preloader IO ERROR: "+this.src))},WR360.cO=function(type,bubbles,cancelable,image,success,errorMessage){this.aB().constructor.call(this,type,bubbles,cancelable),this.image=image,this.success=success,this.errorMessage=errorMessage},WR360.cO.aK(WR360.Event),WR360.cO.COMPLETE="complete",WR360.cO.ERROR="error",WR360.dP=function(cR){this.aB().constructor.call(this),this.aw=new Array,this.sU=new Array,this.rd=0,this.ty=0,this.cG=0,this.cR=cR,this.mu="cache_"+cR.substr(1,cR.length)},WR360.dP.aK(WR360.dY),WR360.dP.prototype.lU=function(row){return row>this.sU.length&&(row=0),this.sU[row]},WR360.dP.prototype.sd=function(){return this.sU.length},WR360.dP.prototype.sM=function(){return this.rd},WR360.dP.prototype.rr=function(){return this.aw.length},WR360.dP.prototype.Init=function(rootPath,graphicsPath,V,oq){this.ct.Init.call(this,rootPath,V),this.uT(rootPath,graphicsPath,V,oq)},WR360.dP.prototype.uT=function(rootPath,graphicsPath,V,oq){this.rd=V.aw.length/V.aw.rows,this.rd%1&&(this.rd=V.aw.length,V.aw.rows=1);for(var row=0;row=sK*this.rd&&(sK++,sl=0);var af=new WR360.ba(V.aw[i],sl,rootPath,graphicsPath,oq);this.aw[i]=af,this.sU[sK-1][sl++]=af,V.settings.rotation.fE==i&&(this.ty=sK-1)}},WR360.dP.prototype.kE=function(){for(var i=this.cG=0;i=this.aw.length&&(eR=WR360.cf.COMPLETE,this.cQ=!0),this.dispatchEvent(new WR360.cf(eR,!0,!1,e.af,Math.round(100*this.cG/this.aw.length),!0,"")))},WR360.dP.prototype.ou=function(e){var bu=this.be;bu.dispatchEvent(new WR360.cf(WR360.cf.ERROR,!0,!1,e.af,Math.round(100*bu.cG/bu.aw.length),!1,e.errorMessage))},WR360.cf=function(type,bubbles,cancelable,af,ee,success,errorMessage){this.aB().constructor.call(this,type,bubbles,cancelable),this.af=af,this.ee=ee,this.errorMessage=errorMessage,this.success=success},WR360.cf.aK(WR360.Event),WR360.cf.PROGRESS="ImagesCache_progress",WR360.cf.COMPLETE="ImagesCache_complete",WR360.cf.ERROR="ImagesCache_error",WR360.cf.bJ="ImagesCache_canceled",WR360.dc=function(){this.aB().constructor.call(this),this.dH=0,this.bF=[],this.hu=-1},WR360.dc.aK(WR360.dY),WR360.dc.prototype.Init=function(rootPath,V){this.ct.Init.call(this,rootPath,V),this.ku(rootPath,V)},WR360.dc.prototype.ku=function(rootPath,V){for(var eW=0,i=0;i=this.bF.length&&(eR=WR360.dK.COMPLETE,this.cQ=!0),this.dispatchEvent(new WR360.dK(eR,!0,!1,e.aO,Math.round(100*this.dH/this.bF.length),!0,""))},WR360.dc.prototype.og=function(e){var bu=this.be;bu.dispatchEvent(new WR360.dK(WR360.dK.ERROR,!0,!1,e.aO,Math.round(100*bu.dH/bu.bF.length),!1,e.errorMessage))},WR360.dK=function(type,bubbles,cancelable,aO,ee,success,errorMessage){this.aB().constructor.call(this,type,bubbles,cancelable),this.aO=aO,this.ee=ee,this.errorMessage=errorMessage,this.success=success},WR360.dK.aK(WR360.Event),WR360.dK.PROGRESS="HotspotsCache_progress",WR360.dK.COMPLETE="HotspotsCache_complete",WR360.dK.ERROR="HotspotsCache_error",WR360.dK.bJ="HotspotsCache_canceled",WR360.cI=function(visible,aO,bV,H){this.df=visible,this.dz=0,this.dg=0,this.aO=aO,this.bV=bV,this.bh=bV.bh,this.playing=!1,this.H=H},WR360.cI.prototype.cD=function(){this.fR()},WR360.cI.prototype.aH=function(visible){},WR360.cI.prototype.tz=function(visible,uk){},WR360.cI.prototype.uv=function(x,y){this.dz=x,this.dg=y},WR360.cI.prototype.nT=function(){var aM;null!=this.bH&&(aM=this.bV.oy(this.aO,this.bH.qh,this.bH.qw),this.dz=aM.x,this.dg=aM.y,this.bH.gM.css("left",this.dz),this.bH.gM.css("top",this.dg),null!=this.bH.image)&&0==this.aO.bi.hotspotInfo.imgNoScale&&this.bH.gM.css("width",this.aO.ea(this.bV.lB))},WR360.cI.prototype.fR=function(){null==this.bH&&this.aO.gL()&&(this.bH=new WR360.bx(this.bV,this.aO,this.H),this.bH.jw(),this.bH.jl(this.gV()))},WR360.cI.prototype.gV=function(){return{x:this.dz,y:this.dg}},WR360.cI.prototype.pM=function(){null!=this.bH&&this.bH.delete()},WR360.aT=function(visible,aO,bV,H){this.aB().constructor.call(this),this.df=visible,this.dz=0,this.dg=0,this.clip=null,this.aO=aO,this.bV=bV,this.bh=bV.bh,this.dW=!1,this.H=H,this.bb=null,this.image=new Image,this.bH=null,this.fc=!1,this.gB=0,this.gE=0,this.pl="indicator_active "+this.aO.bi.id+"_indicator_active",this.image.onload=jQuery.proxy(this.nK,this),this.image.onerror=jQuery.proxy(this.nY,this),this.hotspotHtmlId=this.bh.gK(this.aO.bi),this.cb=0,this.kn=0,this.isClip=this.aO.bi.clipStyle.parsed,this.jP=jQuery.proxy(this.jP,this),this.mC=jQuery.proxy(this.mC,this),this.uS=jQuery.proxy(this.uS,this),this.kG(),this.aO.bi.indicatorImage&&(this.image.src=this.bh.settings.graphicsPath+"/"+this.aO.bi.indicatorImage),this.aH(visible)},WR360.aT.aK(WR360.dh),WR360.aT.Events={},WR360.aT.Events.tn="HOTSPOT_API_ACTIVATE",WR360.aT.Events.uo="HOTSPOT_API_DEACTIVATE",WR360.aT.Events.mI="HOTSPOT_ROLLOVER_REMOVED",WR360.aT.prototype.kG=function(){var self=this,baseClass="hotspot_indicator ",isSelfUrl=(this.isClip&&(baseClass+="clip_indicator "),this.aO.lT()&&(!this.aO.gL()||!this.aO.bi.activateOnClick));this.bb=(isSelfUrl?jQuery(""):jQuery("
")).appendTo(this.H),this.aO.bi.effects&&((baseClass={class:"indicator_effect_"+(baseClass=this.aO.bi.effects.split(","))[0],duration:baseClass[1]||null,stopOnActivation:baseClass[2]||!1}).duration&&this.bb[0].style.setProperty("--anim-duration",baseClass.duration+"ms"),this.bb.addClass(baseClass.class),this.aO.bi.parsedEffect=baseClass),this.aO.bi.dummy&&this.bb.addClass("indicator_dummy"),this.aO.bi.alwaysActive||(this.bb.mouseover(jQuery.proxy(function(event){this.OnMouseOver(event)},this)),this.bb.mouseout(jQuery.proxy(function(event){this.OnMouseOut(event)},this))),isSelfUrl?this.bb.click(function(){self.bh.gD()&&self.bh.sm.Event(WR360.sY.rU.rR)}):WR360.by.fI(this.bb,jQuery.proxy(function(event){return this.kf(event)},this)),this.bh.addEventListener(WR360.Events.hG,this.mC),this.bh.addEventListener(WR360.ImageRotator.Events.un,this.uS),this.bb.bind("touchend mousedown",function(e){e.stopPropagation(),self.bh.jB(e)})},WR360.aT.prototype.nK=function(e){var image=e.target,self=this;setTimeout(function(){document.ad.msie&&WR360.by.pe(self.aO.bi.indicatorImage,image),self.uv(self.dz,self.dg);var uW=self.nC(image);self.bb.css({"background-image":"url("+image.src+")",width:uW.width,height:uW.height,"background-size":"contain"})},document.ad.msie?100:0)},WR360.aT.prototype.nY=function(e){WR360.bZ.gA("DynamicHotspotPresenter. Error loading image: "+e.target.src)},WR360.aT.prototype.cD=function(){},WR360.aT.prototype.aH=function(visible,aX){(this.df=visible)?aX?this.bb.fadeIn(300):this.bb.show():aX?this.bb.fadeOut(300):this.bb.hide()},WR360.aT.prototype.uS=function(){this.bH&&this.bH.tx(!1)},WR360.aT.prototype.tz=function(visible,uk){this.aO.bi.alwaysActive&&(visible||!uk&&this.aO.bi.alwaysActive==WR360.kc.uc.uD?(this.uy(),this.bH&&this.bH.tx(visible)):(this.gY(!0),this.bH&&this.bH.tx(!1)))},WR360.aT.prototype.SetClip=function(coord,size,points){var pointIdx,polygon="polygon(";for(pointIdx in points)var eJ=points[pointIdx],polygon=(polygon+=eJ.x+"% ")+(eJ.y+"%,");polygon=polygon.slice(0,-1),polygon+=")";var scaledSize=this.bV.GetPolySize(size.width,size.height),clipStyle=this.aO.bi.clipStyle,hotspotElm=(this.bb.css({"clip-path":polygon,width:scaledSize.width,height:scaledSize.height,left:coord.scaleX,top:coord.scaleY,"background-color":clipStyle.backColor,opacity:clipStyle.backOpacity}),this.bb[0]),hotspotElm=(hotspotElm.style.setProperty("--back-color-hover",clipStyle.backColorHover),hotspotElm.style.setProperty("--back-opacity-hover",clipStyle.backOpacityHover),this.getClipCentroid(points));hotspotElm.x=hotspotElm.x*size.width/100,hotspotElm.y=hotspotElm.y*size.height/100,hotspotElm.x=hotspotElm.x*scaledSize.width/size.width+coord.scaleX,hotspotElm.y=hotspotElm.y*scaledSize.height/size.height+coord.scaleY,this.clip={centroid:hotspotElm}},WR360.aT.prototype.uv=function(x,y){this.dz=x,this.dg=y;var uW=this.nC();this.bb.css({left:x-uW.width/2,top:y-uW.height/2,width:uW.width,height:uW.height})},WR360.aT.prototype.mC=function(e){this.aO.bi.alwaysActive&&"toggle"!==e.param||e.param!=this.hotspotHtmlId&&this.gY("toggle"===e.param)},WR360.aT.prototype.OnMouseOut=function(e){e.stopPropagation(),this.fc=!1},WR360.aT.prototype.OnMouseOver=function(e){1!=this.bh.pY&&(e.stopPropagation(),e.preventDefault(),0==this.aO.bi.activateOnClick)&&1==this.fR()&&(this.gE=Date.now())},WR360.aT.prototype.kf=function(e){if(this.aO.bi.alwaysActive)this.aO.js()&&this.aO.cv(this.bh,this.gV());else{if(0==this.aO.bi.activateOnClick){if(Date.now()-this.gE<150)return;this.gE=0}if(1==this.aO.js())if(0==this.aO.gL()||0==this.aO.bi.activateOnClick&&1==this.dW)return 0==this.aO.gL()&&this.bh.dispatchEvent(new WR360.Event(WR360.Events.hG,!1,!1,this.hotspotHtmlId)),void(0==this.aO.cv(this.bh,this.gV())&&1==this.dW&&this.gY(!1));this.fc=!1,1==this.dW?this.gY(!1):this.fR()}},WR360.aT.prototype.jP=function(e){var lM;clearInterval(this.gB),clearTimeout(this.kn),clearTimeout(this.cb),this.cb=0,this.bb.removeClass(this.pl),this.dW&&(this.dW=!1,e.param||this.ld(),this.aO.bi.activateOnClick||WR360.by.fU||0==(e={x:this.bh.dO,y:this.bh.ei}).x&&0==e.y||WR360.by.fA(this.bb,e)&&(this.fc=!0,(lM=this).gB=setInterval(function(){lM.lb()},200)))},WR360.aT.prototype.eb=function(timeout,hZ){var self;this.fR(timeout,!0),void 0===timeout||this.cb||((self=this).cb=setTimeout(function(){self.gY(!0),void 0!==hZ&&hZ(self.mv())},timeout))},WR360.aT.prototype.fR=function(timeout,qp){var effect=this.aO.bi.parsedEffect;return effect&&effect.stopOnActivation&&this.bb.removeClass(effect.class),!(this.bh.fu&&!qp||this.dW||this.fc||(this.bh.dispatchEvent(new WR360.Event(WR360.Events.hG,!1,!1,this.hotspotHtmlId)),this.bh.cJ(),this.dW=!0,this.bh.lp(),this.bb.addClass(this.pl),this.ll()||!this.aO.gL()?(this.oX(timeout),1):(this.bH||(this.bH=new(this.aO.bi.renderMode==WR360.kc.bf.kd?WR360.fH:WR360.bx)(this.bV,this.aO,this.H),this.bH.addEventListener(WR360.aT.Events.mI,this.jP),this.bH.jw()),this.bH.jl(this.gV()),this.oX(timeout),0)))},WR360.aT.prototype.uy=function(){this.aO.gL()&&(null==this.bH?(this.bH=new WR360.bx(this.bV,this.aO,this.H),this.bH.jw(),this.bH.jl(this.gV()),this.dW=!0):this.bH.jl(this.gV()))},WR360.aT.prototype.ll=function(){return this.dispatchEvent(new WR360.Event(WR360.aT.Events.tn,!1,!1))},WR360.aT.prototype.ld=function(){return this.dispatchEvent(new WR360.Event(WR360.aT.Events.uo,!1,!1))},WR360.aT.prototype.gY=function(aX){clearInterval(this.gB),clearTimeout(this.cb),this.cb=0,clearTimeout(this.kn),this.bb.removeClass(this.pl),0!=this.dW&&(1==this.ld()?this.dW=!1:null!=this.bH&&this.bH.cN(aX,!0))},WR360.aT.prototype.gV=function(){return this.clip?this.clip.centroid:{x:this.dz,y:this.dg}},WR360.aT.prototype.getClipCentroid=function(points){var idx,x0=points[0].x,y0=points[0].y,x=0,y=0,twiceArea=0,prev=points[points.length-1];for(idx in points){var next=points[idx],x1=prev.x-x0,y1=prev.y-y0,x2=next.x-x0,y2=next.y-y0,a=x1*y2-x2*y1;twiceArea+=a,x+=(x1+x2)*a,y+=(y1+y2)*a,prev=next}var factor=3*twiceArea;return{x:(x/=factor)+x0,y:(y/=factor)+y0}},WR360.aT.prototype.oX=function(timeout){var self;1!=WR360.by.fU&&(clearInterval(this.gB),timeout=void 0!==timeout?timeout:0,1!=(self=this).aO.bi.deactivateOnClick||0!=timeout)&&(this.kn=setTimeout(function(){self.gB=setInterval(function(){self.jE()},300)},timeout))},WR360.aT.prototype.jE=function(){var cV=this.bh.hA;0==cV.x&&0==cV.y||0!=WR360.by.fA(this.bb,cV)||null!=this.bH&&0!=this.bH.iI(cV)||(this.gY(!0),clearInterval(this.gB))},WR360.aT.prototype.lb=function(){var cV={x:this.bh.dO,y:this.bh.ei};0==cV.x&&0==cV.y||0==WR360.by.fA(this.bb,cV)&&(this.fc=!1,clearInterval(this.gB),this.gB=0)},WR360.aT.prototype.nT=function(){this.bH&&this.aO.bi.renderMode!=WR360.kc.bf.kd&&(this.aO.bi.alwaysActive&&this.bH.uU(this.gV()),this.bH.image)&&!this.aO.bi.hotspotInfo.imgNoScale&&this.bH.gM.css("width",this.aO.ea(this.bV.lB))},WR360.aT.prototype.mv=function(){return{hotspotHtmlId:this.hotspotHtmlId,parentContainer:this.H,hotspotConfig:this.aO.bi,coordX:this.dz,coordY:this.dg,isVisible:this.df}},WR360.aT.prototype.pM=function(){this.bb.unbind(),this.bb.remove(),null!=this.bH&&(this.bH.removeEventListener(WR360.aT.Events.mI,this.jP),this.bH.delete()),clearInterval(this.gB),clearTimeout(this.cb),clearTimeout(this.kn),this.bh.removeEventListener(WR360.Events.hG,this.mC),this.bh.removeEventListener(WR360.ImageRotator.Events.un,this.uS),this.bV=null,this.bh=null},WR360.aT.prototype.pZ=function(isHide){var ps="hotspot_indicator_hidden";1==isHide?this.bb.addClass(ps):this.bb.removeClass(ps)},WR360.aT.prototype.vb=function(){this.aO.cv(this.bh,this.gV())},WR360.aT.prototype.nC=function(image){image=image||this.image;var scale=this.aO.bi.minIndicatorScale,lB=this.bh.lB;if(!scale||100<=scale||1<=lB)return{width:image.width,height:image.height};var width=image.width*lB,lB=image.height*lB;if(0").appendTo(this.H),this.tO=jQuery("